(null); \n const [searchParams] = useSearchParams();\n const documentGuids = searchParams.get(\"docGuids\");\n if (documentGuids) {\n console.log(documentGuids);\n }\n\n useEffect(() => {\n const docs = documentGuids?.split(\";\") || [];\n waitForUploadSucess(docs, applicationId, applicantId).then(() => {\n logInfoToServerSide(\"Got all SBL-documents, redirecting to front of sign-page\", applicationId, applicantId);\n navigateToStep(ApplicationPaths.sign, applicationId, navigate, applicantId);\n }).catch(() => {\n setErrorMsg(\"Noe gikk galt. Prøv på nytt senere, eller last opp dokumentet manuelt\");\n logErrorToServerside(\"failed waiting for SBL-documents\", applicationId, applicantId, docs);\n })\n }, [applicationId, navigate, applicantId, isMainApplicant, productType, country, documentGuids]);\n\n return (\n <>\n \n navigateToStep(ApplicationPaths.sign, applicationId, navigate, applicantId)\n }\n > {\"< \"}Tilbake \n \n \n Dokumenter lastes opp\n {Fullfører, vennligst vent \n }\n {errorMsg ? {errorMsg} : null}\n
\n >\n );\n}\n\nexport default SblCompleted;","import { useState, useEffect, useMemo, PropsWithChildren } from 'react';\nimport { useNavigate } from 'react-router';\nimport { DismissableErrorMessage, DismissableErrorMessageProps, Headline, Paragraph } from '../../ui';\nimport style from './style.module.scss';\nimport { navigateToStep, ApplicationPaths } from '../ApplicationFormsHelpers';\nimport { useApplicationIdContext } from '../../components/ApplicationContext';\nimport { trackSectionView } from '../../lib/gtm';\nimport { useTranslation } from 'react-i18next';\nimport { SignCommonComponent, useApplicationSignContext } from '@n2-common/components/Sign/SignCommon';\nimport { type CommonStatusPageProps } from '@n2-common/components/ApplicationStatusPage';\nimport { SubmitProgressBox } from '@n2-common/ui/SubmitProgress';\nimport { type SubmitState } from '@n2-common/components/MultiStageOnePageWizard/types';\nimport { NavigateLink } from '@n2-common/ui/Button';\nimport { TFunction } from 'i18next';\nimport { type NoteInfo } from '@n2-common/lib/useFootnotes';\nimport { type DocumentInfo, SingleUploadBox } from '@n2-common/components/UploadDocuments';\nimport { O1DocumentationContextProvider, useDocumentationContext } from '@n2-common/components/UploadDocuments';\nimport icons from '@n2-common/icons/icons.module.scss';\n\nexport function UploadDocumentsPage({ navigateToCorrectStepFunc }: CommonStatusPageProps): JSX.Element {\n return (\n \n \n \n \n \n \n \n );\n}\n\nfunction PageContent({ children }: PropsWithChildren) {\n const { t } = useTranslation('common');\n const navigate = useNavigate();\n\n const { applicantId, applicationId, isMainApplicant } = useApplicationSignContext();\n return (\n <>\n ('Navigation.Back')} `}\n onClick={() => navigateToStep(ApplicationPaths.sign, applicationId, navigate, applicantId)}\n />\n \n
\n {t('Sign.Documents.Headline')} {isMainApplicant === false ? `(${t('CoApplicant')})` : ''}\n \n
{t('Sign.Documents.SubHeadline')}\n {children}\n
\n >\n );\n}\n\nexport function UploadDocumentsComponent(): JSX.Element {\n const { t } = useTranslation('common');\n const footnoteSelector = useMemo(() => createFootnoteSelector(t), [t]);\n const { requirements, createUploadDocumentHandler, deleteDocument, trustedUpload } = useDocumentationContext();\n const [trustedStatus, setTrustedStatus] = useState('NotSent');\n const { country, productType } = useApplicationIdContext();\n const [error, setError] = useState();\n\n useEffect(() => {\n document.title = t('Sign.Documents.Headline');\n }, [t]);\n\n useEffect(() => {\n trackSectionView(productType, country, '4.3', 'Upload documents');\n }, [country, productType]);\n\n const uploadBoxes = useMemo(() => {\n return requirements.map((requirement, i) => {\n const uploadDocumentHandler = createUploadDocumentHandler(requirement.documentType);\n const trustedUploaHandler = async () => {\n setTrustedStatus('Submitted');\n try {\n await trustedUpload();\n } catch (err) {\n setError(err as Error);\n setTrustedStatus('Error');\n }\n };\n\n return (\n \n );\n });\n }, [requirements, createUploadDocumentHandler, deleteDocument, footnoteSelector, trustedUpload]);\n\n return (\n <>\n setError(undefined)} />\n {uploadBoxes}\n ('Sign.Documents.Trusted.SubmitText')}\n processingText={t('Sign.Documents.Trusted.ProcessingText')}\n >\n >\n );\n}\n\nfunction createFootnoteSelector(t: TFunction) {\n const memo: Record = {};\n let errcount = 0;\n return function selector(info: DocumentInfo): NoteInfo {\n if (info.status in memo) {\n return memo[info.status];\n }\n let x = null;\n if (info.trusted) {\n x = { symbol: '🟡', description: t('Sign.Documents.Trusted.ItemDescription') };\n } else {\n switch (info.status) {\n case 'P.New':\n x = { className: icons.iconCircle, description: t('Sign.Documents.ReceivedDescription') };\n break;\n case 'A.Ok':\n x = { className: icons.iconChecked, description: t('Sign.Documents.Accepted') };\n break;\n default:\n if (info.error) {\n x = { className: icons.iconDanger, id: `${++errcount}`, description: info.error };\n } else {\n x = null as never;\n }\n break;\n }\n }\n memo[info.status as keyof typeof memo] = x;\n return x as NoteInfo;\n };\n}\n","import { PropsWithChildren, createContext, useContext } from 'react';\n\ntype BackendContextType = { provider: Backend; country: Country };\nexport const BackendContext = createContext({ provider: 'O1', country: 'FI' });\n\nexport function useBackendContext() {\n return useContext(BackendContext);\n}\n\nexport const BackendContextProvider: React.FC = ({ children, provider, country }) => {\n const context = { provider, country };\n return {children};\n};\n"],"names":["NavigateLink","props","jsx","style","useTrigger","key","setKey","useState","createIntervalCalculator","strategy","tries","useRefresh","refresh","context","retry","initialTimeout","refreshRef","useRef","condition","setCondition","timeout","retries","getTimeout","useMemo","onConditionNotMetRef","reason","onConditionMetRef","refreshUntil","useCallback","refreshCondition","resolve","reject","useEffect","controller","DocumentationContextProvider","children","useTranslation","applicationId","applicantId","country","useApplicationIdContext","requirements","setRequirements","touch","getApplicationDocumentStatus","res","documentRequirementMapper","createPartialContext","DocumentationContext","t","startSbl","err","logErrorToServerside","message","logInfoToServerSide","documentId","removeDocument","r","d","documentType","data","uploadDocument","docs","_a","section","applicationIsInValidStateForCdd","applicationStatus","N2MajorApplicationStatus","N2ApplicationStatus","CddPage","navigateToCorrectStepFunc","product","afterCddFunc","navigate","useNavigate","setErrorMessage","ErrorOutput","useDismissableErrorMessage","setApplicationStatus","questions","setQuestions","countries","setCountries","isMainApplicant","setIsMainApplicant","fetched","CddService","fetchApplicationStatusAndRedirectIfNotExpectedState","mainApp","productStringFromProduct","preFilledAnswers","mapPrefilledAnswers","questionGroups","getAmlQuestions","getPepQuestions","getExtendedQuestions","onSubmit","answerPayload","setSubmitState","setWizardStep","includesEnhanced","CddSteps","appStatus","pollForExpectedApplicationState","ex","action","errorToAction","navigateToStep","ApplicationPaths","jsxs","Fragment","CddForm","isPepFieldName","afterCddFuncForPpiProducts","setPpi","arr","incomeQuestion","m","incomeToUse","correctAnswer","getIncomeAnswer","inRange","a","b","SblCompleted","SignCommonComponent","SblCompletedInner","useApplicationSignContext","productType","errorMsg","setErrorMsg","searchParams","useSearchParams","documentGuids","waitForUploadSucess","Headline","Hero","ErrorMessage","UploadDocumentsPage","O1DocumentationContextProvider","PageContent","UploadDocumentsComponent","Paragraph","footnoteSelector","createFootnoteSelector","createUploadDocumentHandler","deleteDocument","trustedUpload","useDocumentationContext","trustedStatus","setTrustedStatus","error","setError","trackSectionView","uploadBoxes","requirement","i","uploadDocumentHandler","trustedUploaHandler","SingleUploadBox","DismissableErrorMessage","SubmitProgressBox","memo","errcount","info","x","icons","BackendContext","createContext","useBackendContext","useContext","BackendContextProvider","provider"],"mappings":"koBACO,SAASA,GAAaC,EAA8C,CAEnE,OAAAC,EAAA,IAAC,QAAK,UAAWC,EAAM,eAAgB,QAASF,EAAM,QACjD,SAAAA,EAAM,IACX,CAAA,CAER,CCLA,SAAwBG,IAAa,CACjC,KAAM,CAACC,EAAKC,CAAM,EAAIC,WAAS,CAAC,EAEzB,MAAA,CAAE,IAAAF,EAAK,MAAO,IAAMC,EAAO,KAAK,OAAQ,CAAA,EACnD,CCSO,SAASE,GAAyBC,EAAmD,CACxF,OAAQA,EAAS,KAAM,CACnB,IAAK,QACD,MAAO,IAAMA,EAAS,SAC1B,IAAK,sBACD,OAAQC,GAAkB,KAAK,IAAI,EAAGA,CAAK,EAAID,EAAS,SAC5D,IAAK,iBACM,OAACC,GAAkBA,EAAQD,EAAS,SAC/C,IAAK,iBACD,MAAO,KAAO,KAAK,OAAO,EAAI,GAAKA,EAAS,SAChD,QACI,MAAM,IAAI,MAAM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