{"version":3,"sources":["MortgageDashboard/PropertyAndAppraisal/domain.ts","Login/Login.tsx","MortgageDashboard/Bonita/Income/domain.ts","Login/LocaleSelector.tsx","Login/LoginLandingWrapper.tsx","MortgageDashboard/Offer/domain.ts","Login/api.ts","MortgageDashboard/PurposeAndFinancing/domain.ts","Login/IdleLogout.tsx","Login/LoginLanding.tsx","Login/ForgotPasswordLink.tsx","Login/IdleWarningDialog.tsx","KYC/utils.tsx","KYC/api.ts","MortgageDashboard/Communication/util.ts","KYC/domain.ts","MortgageDashboard/Registers/CBResults/ConsumerLoanOrMortgageForm.tsx","MortgageDashboard/Registers/CBResults/CreditCardForm.tsx","MortgageDashboard/Documents/Section.treat.ts","MortgageDashboard/Applicants/applicantsUtils.ts","MortgageDashboard/Documents/api.ts","MortgageDashboard/Registers/CBResults/CreditCardStack.tsx","KYC/TaxPayerCountryForm.tsx","KYC/RiskyActivitiesDialog.tsx","MortgageDashboard/Documents/domain.ts"],"names":["SubPropertyType","t","Apartment","House","Land","ObjectOfIndividualRecreation","OtherObjects","matchSubPropertyType","pattern","subProperty","subPropertyTypes","record","keys","BasePurposeOfUse","OwnLivingOfCoApplicantsOrRelatives","PurposeOfUseSK","Others","PurposeOfUseCZ","Lease","Recreation","RelatedPersonOwnLivingNoPropertyShareOfCoApplicant","PurposeOfUse","PurposeType","Construction","Purchase","PropertyInput","propertyId","UUID","eqPropertyInput","pipe","eq","eqString","contramap","input","ProceedPropertyAndAppraisal","optional","allowMoreProperties","allowUnpledgeFirstProperty","appraisalSectionRequired","collateralType","NonEmptyString","nonSpecifiedProperty","pledgeSelectionError","propertyIdentificationSectionRequired","purposeType","valueOfPropertySectionRequired","CanAddSubProperty","canAddSubProperty","PropertyAddress","city","numberOfApartment","optionFromUndefined","numberOfDescriptiveOrParcel","postCode","street","showPropertyAddress","show","SubProperty","address","purpose","subPropertyId","type","AppraisalType","BulkOfDeveloperProjects","External","Original","PriceMap","ApartmentInformation","isOutOfRange","isRecreationOrHighRisk","isTechnicalConditionUnmaintained","moreThanFiveRooms","AppraisalDetails","addressOfProperty","dateOfEvaluation","DateFromISOString","firstName","lastName","valueOfProperty","MoneyAmount","ConstructionType","Brick","Panel","constructionTypes","OtherInformation","commentsForAppraiser","districtOfProperty","isDifferentContact","nameOfContact","phoneNumber","AppraisalQuestions","apartmentInformation","appraisalDetails","constructionType","developerProject","floodZoneIV","legalConstraint","moreThan10Apartments","noLegalAccessToTheProperty","originalAppraisal","externalAppraisal","otherInformation","otherRestrictions","pledgeForAnotherInstitution","Appraisal","appraisalQuestions","appraisalType","AddSubProperty","AddSubPropertyInput","AddProperty","EditSubPropertyInput","SaveSubPropertyInput","SaveSubPropertyOutput","canAddAnotherProperty","canAddAnotherSubProperty","RemoveSubProperty","PledgeProperty","pledged","selectedPropertyId","PledgeSubPropertyOutput","noPropertyPledgedError","appraisalRequired","acquiringRentalRightWarning","ConfirmProperty","linkedToPurpose","validated","ValidateProperty","ProceedAppraisal","apartment","possibleAppraisals","DistrictOfProperty","district","DeveloperProjects","developerProjects","ConfirmAppraisalInput","appraisal","ConfirmAppraisalOutput","appraisalFee","AppraisalStatus","status","lockCurrentProperty","lockAllProperties","PropertyValueDetails","isVisible","isEditable","value","Risk","riskId","riskText","RuntimeLocaleKey","additionalNote","checked","PropertyValue","actualValue","futureValue","totalActualValue","totalFutureValue","propertyInsuranceFee","isDocumentMissing","isValueSufficient","isRiskSubSectionVisible","isRiskQuestionVisible","isBrokerWarning","isRisksSaved","isConfirmButtonVisible","pledgedCurrentValue","isPropertyPledgedForAnotherLoan","ValueOfPropertyRisks","risk","comment","hasRisks","riskList","ValueOfProperty","SaveActualValueOutput","totalValueOfProperty","PledgedValues","pledgedForAnotherLoan","loginFormError","message","action","error","option","fromNullable","loginFormWarning","Login","props","formatMessage","useFormatMessage","maxLength","validEmail","useValidators","is3P","onThirdPartyPasswordSetup","disabled","useEffect","document","body","style","overflow","fieldProps","handleSubmit","formErrors","handleReset","useForm","initialValues","username","password","fieldValidators","validators","inSequence","nonBlankString","nonEmptyString","onSubmit","onLogin","portalStatus","usePortalStatusContext","foldPortalStatus","onActive","onInitial","constVoid","onNone","onScheduled","grow","shrink","hAlignContent","vAlignContent","column","width","submitButton","label","errors","map","nonEmptyArray","of","formError","toUndefined","formWarning","placeholder","showHideButton","some","hideLabel","showLabel","onClick","IncomeSource","Employed","SpecialType","Freelancer","CompanyOwner","TradesmanCoOperatingPerson","BrokerOfUCB","IncomeSourceForFreelancerOrTradesman","PaymentMethodSK","SalarySentUCB","SalarySentOtherBank","PaymentInCash","PaymentMethodCZ","Cash","BankTransfer","PaymentMethod","TypeOfRent","RentFromOtherRealEstate","RentFromPledgedRealEstate","JobPosition","id","NonNegativeInteger","key","tenant","Tenant","language","name","FreelancerType","BusinessSector","EmploymentType","IndefiniteContract","LimitedContract","Agreement","SeasonalContract","Other","SpecialTypeOfIncomeCZ","Alimony","AllowanceForSoldiers","HousingAllowanceForSoldiers","HomeDuties","MaternityLeave","NonStandard","Pensioner","Student","Unemployed","SpecialTypeOfIncomeSK","IncomeFromCapitalAssets","RentForProperty","SpecialTypeOfIncome","AllowanceType","Parental","FutureParental","PensionTypeCZ","Disability","OldAge","Orphans","Widower","Retirement","PensionTypeSK","FullInvalidityPension","ParentalAllowance","RetirementAnnuity","OtherPensionOrAllowance","Bursary","TravelCompensationDiets","PensionType","ThirdParty","Policeman","FireRescueCorps","CustomAdministration","PrisonService","GeneralInspectorate","SecurityInformationService","OfficeForForeignRelations","FormerArmyMembers","ico","ndg","IncomeSimplified","simplifiedVersion","totalAvgMonthlyIncome","isIncomeSimplified","income","GetIncomeSimplified","completed","IncomeFull","companyInfo","applicantsShareHigherThan33","businessSector","businessStartingDate","MonthYear","companyIco","companyName","addIco","nameOfEntrepreneur","entrepreneurIco","country","houseNr","zipCode","phone","equityPositive","freelancerType","nameOf3P","ico3P","stakeInCompany","contractInfo","contractIndefinitePeriod","contractPeriodExpiration","employedInSpecificProfessions","employmentType","inProbation","jobPosition","lengthOfUninterruptedCurrentEmployment","lengthOfUninterruptedOverallEmployment","paymentMethod","paymentMethodLabel","startingDate","workBasedOnAgreementOnWorkingActivity","incomeInfo","incomeSource","alimonyChildrenInvolved","allowanceType","amortizationOfRentedRe","annualGrossIncome","bruttoComissions","businessGrossIncome","employedInCompany","equityFromLastYear","grossIncomes","incomeAsDeductibleExpenses","incomeDescription","incomeFromRentContract","incomeSourceLabel","isAlimonyIdentifiable","isAlimonyOutsideCountry","isApplicantDeclareAsUserInDeclaration","isCooperativeOwnership","keepsAccountancy","last3YearsPaidSharedProfit","lastPeriodProfit","monthlyIncome","negativeBusinessProfit","pensionType","profitSharingIncome","r101BruttoIncomes","r201IncomeFromLease","r37PartialTaxBase","r38PartialTaxBase","r39PartialTaxBase","reCoOwned","reInPersonalOwnership","reUsedAsCollateral","salaryCurrency","specialTypeOfIncome","tax","taxBase","typeOfRent","youngPeopleConditions","taxAdvisor","calculationBasedOnTurnover","profitLastPeriodPositive","MainIncome","AdditionalIncome","recordId","GetIncomeFull","additionalIncomes","isIncomeFull","SaveIncomeFull","GetIncome","SaveIncome","DeleteAdditionalIncome","LocaleSelector","isSubmitting","useLoadingStatusRead","context","useAppContext","apiParameters","getLabelForLocale","loc","localesOptions","options","array","findFirst","locale","onChange","isSome","setLocale","onBlur","clearable","searchable","issues","none","LoginLandingWrapper","title","backgroundImageURL","onLogoClick","iconAction","onStepClick","steps","contentBackground","palette","background","units","children","LoanTypeCommon","Purpose","NonPurpose","LoanTypeCombined","LoanType","Fees","processingFee","optionFromNullable","appraisalFeeEditable","propertyInsuranceFeeEditable","appraisalFeeTooltip","appraisalFeeMessage","propertyInsuranceFeeMessage","propertyInsuranceFeeTooltip","DiscountOf","INTEREST_RATE","FEE_PROCESS","FEE_APPRAISAL","GREEN_MORTGAGE_APPR","GREEN_MORTGAGE_PROC","CPI_DISCOUNT_ON_PROCESSING_FEE","REFINANCING_DISCOUNT_ON_PROCESSING_FEE","APPRAISAL_BENEFIT","DiscountParameters","discountType","discountProcessType","discountReason","discountComment","disabledForSelection","discountValueFeeMarketing","discountValueFeeManagement","appraisalFeeMKTDiscountPercentage","appraisalFeeMNGDiscountPercentage","discountIRMarketing","discountIRManagement","Percentage","OneHundred","SeventyFive","Fifty","TwentyFive","eqCustomFees","loading","success","getEq","getStructEq","eqMoneyAmount","CpiType","cpiType","CpiTypeNone","InsuranceType","TenorType","Years","Months","Tenor","tenorValue","tenorType","eqTenor","eqNumber","TenorLimits","tenorMin","tenorMax","tenorMaxMain","tenorMaxCoApplicant","stepSize","Positive","CPIFeature","DEATH","PERMANENT_DISABILITY","TEMPORARY_DISABILITY","LOSS_OF_INCOME","INSURANCE_OF_SERIOUS_DISEASES","CpiFeatureRecord","LocalizedString","LoanParameters","loanPurpose","loanPurposeLabel","collateralTypeLabel","estimatedPropertyValue","estimatedPropertyValueEditable","tenor","selectedInsurance","selectedInsuranceLabel","insuranceFeaturesLabels","selectedInsuredClient","NumberFromString","ApplicantIndex","applicantIndex","customFees","showCustomFees","interestRateDiscount","PercentageLikeFromNumber","dateOfBirth","DateFromSQLString","dateOfBirthCoApplicant","loanTypeLabel","update","dayOfInstallment","greenMortgage","loanAmount","loanType","purposeAmount","nonPurposeAmount","OfferResult","fixationPeriod","PositiveInteger","insuranceFee","interestRate","monthlyInstallment","CalculateAmountError","minPurposeLoanAmount","minNonPurposeAmount","maxNonPurposeAmount","loanAmountOutOfRange","CalculateError","genericCalculateError","minClientsAge","maxClientsAge","minCoapplicantAge","maxCoapplicantAge","minEstimatedPropertyValue","maxCustomProcessingFee","maxCustomApraisalFee","maxCustomPropertyInsuranceFee","CalculateErrors","optionFromArray","OfferResults","OfferPackage","offerResults","selectedOffer","offerSummary","duration","loanToValue","ltvOverLimit","startDate","expirationDate","loanTypeChanged","loanAmountMax","loanAmountMin","loanAmountStepSize","nonPurposeAmountMax","loanAmountFor80LTV","maxClientAge","standardFees","tenorLimitsYears","offerId","showCPI","discountParametersList","totalFeesDiscount","DetailRecord","mktValue","mngValue","isManagement","isMarketing","reasonOfDiscount","mktPercent","mngPercent","DiscountDetails","details","Offer","aprPercentage","totalPaidAmount","discountDetails","selectedPackage","insuredClientName","discountOnIR","InputParameterListCode","CPIPackage","reasonsOfDiscount","InputParameterNumberCode","customAppraisalFee","clientsAge","customProcessingFee","purposeLoanAmount","discountOnInterestRate","InputParameterCode","InputParameterTypeNumber","InputParameterTypeText","InputParameterTypeList","InputParameterOptions","code","InputParameterNumber","defaultValue","NonNegative","numberOfDecimals","InputParameterText","InputParameterList","InputParameter","InputParameters","ModifiedParameterCode","ModifiedParameter","parameter","oldValue","ModifiedParameters","available","cpiFeatures","CalculateOfferResponse","loanParameters","offerPackage","inputParameters","modifiedParameters","SimpleRefinancingStatusYES","discIRManagement","discIRMarketing","editable","processingFeeMNGDiscountValue","processingFeeMKTDiscountValue","greenMNGDiscount","greenMTGDiscount","appraisalFeeMNGDiscountValue","appraisalFeeMKTDiscountValue","CPIProcessingFeeMNGDiscountValue","CPIProcessingFeeDiscountValue","refinancingProcessingFeeMNGDiscountValue","refinancingProcessingFeeDiscountValue","appraisalBenefitMNG","appraisalBenefit","SimpleRefinancingStatusNO","SimpleRefinancingStatusNOT_KNOWN","SimpleRefinancingStatus","LoginInput","anonymousToken","eqLoginInput","LoginOutput","token","refreshToken","flowId","LoginAPIError","login","apiCall","inputEq","path","inputCodec","outputCodec","errorCodec","FormVisibility","None","NotApplicable","LoanPurposeOptionsSK","CONSTRUCTION","PURCHASE","PURCHASE_FROM_DEVELOPER_PROJECT","RECONSTRUCTION","REIMBURSEMENT_OF_OWN_FUNDS","SETTLEMENT_OF_CO_OWNERSHIP","LoanPurposeOptionsCZ","PAYMENT_OF_COOPERATIVE_SHARE","LoanPurpose","NON_PURPOSE","REFINANCING_OF_LOANS","PropertyPledgedMap","PurposeAndFinancingInitialInfo","allowOtherPurposes","propertyPledgedMap","DisbursementCZ","DepositAccountWithARealEstateAgency","EscrowAccount","LawyerCustody","NotaryCustody","WithoutCustody","DisbursementSK","DirectlyAccordingToThePurpose","Disbursement","DisbursementBasedOnRegisteredPledge","AlreadyRegisteredPledge","ProposalForRegistrationOfPledge","YesNo","No","Yes","PurposeOfOriginalInvestment","ConstructionOrReconstruction","StateOfRegisteredPledge","TypeOfAcquiringOfRentalRights","AnotherCooperativeShareBuy","ObtainingTheRightToLease","TypeOfSettlementSK","SettlementOfInheritanceClaimsOnTheProperty","SettlementOfPropertyClaims","TypeOfSettlementCZ","SettlementOfCoOwnershipClaims","TypeOfSettlement","AdditionalInfoBase","disbursement","disbursementBasedOnRegisteredPledge","isOwnershipFromHousingType","previousClientsAreCurrentBorrowers","propertyOwner","purposeOfOriginalInvestment","stateOfRegisteredPledge","typeOfAcquiringOfRentalRights","typeOfSettlement","AdditionalInfo","disbursement_0","disbursementBasedOnRegisteredPledge_0","isOwnershipFromHousingType_0","previousClientsAreCurrentBorrowers_0","propertyOwner_0","purposeOfOriginalInvestment_0","stateOfRegisteredPledge_0","typeOfAcquiringOfRentalRights_0","typeOfSettlement_0","disbursement_1","disbursementBasedOnRegisteredPledge_1","isOwnershipFromHousingType_1","previousClientsAreCurrentBorrowers_1","propertyOwner_1","purposeOfOriginalInvestment_1","stateOfRegisteredPledge_1","typeOfAcquiringOfRentalRights_1","typeOfSettlement_1","disbursement_2","disbursementBasedOnRegisteredPledge_2","isOwnershipFromHousingType_2","previousClientsAreCurrentBorrowers_2","propertyOwner_2","purposeOfOriginalInvestment_2","stateOfRegisteredPledge_2","typeOfAcquiringOfRentalRights_2","typeOfSettlement_2","disbursement_3","disbursementBasedOnRegisteredPledge_3","isOwnershipFromHousingType_3","previousClientsAreCurrentBorrowers_3","propertyOwner_3","purposeOfOriginalInvestment_3","stateOfRegisteredPledge_3","typeOfAcquiringOfRentalRights_3","typeOfSettlement_3","disbursement_4","disbursementBasedOnRegisteredPledge_4","isOwnershipFromHousingType_4","previousClientsAreCurrentBorrowers_4","propertyOwner_4","purposeOfOriginalInvestment_4","stateOfRegisteredPledge_4","typeOfAcquiringOfRentalRights_4","typeOfSettlement_4","disbursement_5","disbursementBasedOnRegisteredPledge_5","isOwnershipFromHousingType_5","previousClientsAreCurrentBorrowers_5","propertyOwner_5","purposeOfOriginalInvestment_5","stateOfRegisteredPledge_5","typeOfAcquiringOfRentalRights_5","typeOfSettlement_5","disbursement_6","disbursementBasedOnRegisteredPledge_6","isOwnershipFromHousingType_6","previousClientsAreCurrentBorrowers_6","propertyOwner_6","purposeOfOriginalInvestment_6","stateOfRegisteredPledge_6","typeOfAcquiringOfRentalRights_6","typeOfSettlement_6","disbursement_7","disbursementBasedOnRegisteredPledge_7","isOwnershipFromHousingType_7","previousClientsAreCurrentBorrowers_7","propertyOwner_7","purposeOfOriginalInvestment_7","stateOfRegisteredPledge_7","typeOfAcquiringOfRentalRights_7","typeOfSettlement_7","disbursement_8","disbursementBasedOnRegisteredPledge_8","isOwnershipFromHousingType_8","previousClientsAreCurrentBorrowers_8","propertyOwner_8","purposeOfOriginalInvestment_8","stateOfRegisteredPledge_8","typeOfAcquiringOfRentalRights_8","typeOfSettlement_8","disbursement_9","disbursementBasedOnRegisteredPledge_9","isOwnershipFromHousingType_9","previousClientsAreCurrentBorrowers_9","propertyOwner_9","purposeOfOriginalInvestment_9","stateOfRegisteredPledge_9","typeOfAcquiringOfRentalRights_9","typeOfSettlement_9","PurposeAndFinancingFormStateBase","loanPurpose_0","amountOfLoan_0","amountOfOwnFunds_0","amountOfNonOwnFunds_0","financedProperty_0","loanPurpose_1","amountOfLoan_1","amountOfOwnFunds_1","amountOfNonOwnFunds_1","financedProperty_1","loanPurpose_2","amountOfLoan_2","amountOfOwnFunds_2","amountOfNonOwnFunds_2","financedProperty_2","loanPurpose_3","amountOfLoan_3","amountOfOwnFunds_3","amountOfNonOwnFunds_3","financedProperty_3","loanPurpose_4","amountOfLoan_4","amountOfOwnFunds_4","amountOfNonOwnFunds_4","financedProperty_4","loanPurpose_5","amountOfLoan_5","amountOfOwnFunds_5","amountOfNonOwnFunds_5","financedProperty_5","loanPurpose_6","amountOfLoan_6","amountOfOwnFunds_6","amountOfNonOwnFunds_6","financedProperty_6","loanPurpose_7","amountOfLoan_7","amountOfOwnFunds_7","amountOfNonOwnFunds_7","financedProperty_7","loanPurpose_8","amountOfLoan_8","amountOfOwnFunds_8","amountOfNonOwnFunds_8","financedProperty_8","loanPurpose_9","amountOfLoan_9","amountOfOwnFunds_9","amountOfNonOwnFunds_9","financedProperty_9","Financing","amountOfLoan","amountOfNonOwnFunds","amountOfOwnFunds","additionalInfo","currentBalance","financedProperty","financing","isFinancedPropertySameAsPledged","isPropertiesDefined","mainPurpose","predefinedPurpose","provider","purposeId","creditType","CreditType","errorSave","errorDelete","SavePurposeInput","SavePurposeInputArray","purposes","PurposeOverview","totalSum","amountFromOffer","sameAmount","IdleLogout","logout","useAuthenticationContext","logoutHandler","getOrElse","constant","minutesBeforeIdle","minutesWarningDuration","onIdle","renderWarning","dismiss","remainingTime","LoginLanding","displaySnackbar","setDisplaySnackbar","useState","constFalse","constTrue","inAuthenticatedPage","successMessage","filter","onClose","toNullable","ForgotPasswordLink","config","settingsPageURL","size","weight","buttonLink","link","IdleWarningDialog","variant","onDismiss","icon","ClockIcon","minutes","Math","floor","seconds","subtitle","actions","useFormatIndustry","industry","useFormatPaymentDestination","paymentDestination","useFormatTransactionType","transactionType","useFormatAverageIncomingPayments","paymentAmount","useFormatSourceOfFunds","sourceOfFunds","useFormatSourceOfIncome","sourceOfIncome","foldKYCVariant","match","whenUKonto","whenLegalData","shouldAskPaymentDestinationCountries","exists","shouldAskOtherFundsDetails","v","incomeSourcesWithIndustry2","SubmitKYCInput","answers","KYCAnswersSubmit","eqSubmitKYCInput","eqStrict","SubmitKYCErrorId","ClientNumberNotReserved","RiskyClient","SubmitKYCError","SubmitKYCOutput","idConfirmedRemote","submitKYC","Country","countryName","countryCode","TIN","countries","fromEquals","embargoedCountries","messageTimeFormat","threadPageSize","unsafePositiveInteger","UKonto","LegalData","Entrepreneur","Industry","AccomodationAndFoodServiceActivities","ActivitiesOfExtraTerritorialOrganizationsAndBodies","ActivitiesOfHouseholds","AdministrativeAndSupportServiceActivities","AgricultureForestryFishing","ArtsEntertainmentAndRecreation","Education","ElectricityGasSteamAndAirConditioningSupply","FinancialAndInsuranceActivities","HealthAndSocialCare","InformationAndCommunicationActivities","ManufacturingIndustry","MiningAndQuarrying","ProfessionalScientificAndTechnicalActivities","PublicAdministrationAndDefense","CompulsorySocialSecurity","RealEstateActivities","TransportAndStorage","WaterSupply","WasteAndRemediationActivities","WholeAndRetailTrade","RepairAndMaintenanceServicesOfMotorVehicles","incomeSourcesWithIndustry","incomeSourcesWithIndustryMTG","IncomeInfo","industryLabel","otherIndustry","employerName","companyICO","riskyActivities","PaymentDestination","Domestic","ForeignEU","OutsideEU","PaymentDestination2","DomesticAndEU","TransactionType","CashAndCashless","Cashless","NegativeReputationType","FinancialCrime","Corruption","ViolenceBrutalityBlackmail","OrganizedCrime","Fraud","SexOffence","StatusW4","SourceOfWealth","Investment","PropertySale","Divorce","Business","Gambling","Employment","PaymentRelation","MostlyForeign","ForeignAndDomestic","MostlyNotCash","MostlyCash","AverageIncomingPaymentsIdCz","CZ_0_50","CZ_50_100","CZ_100_250","CZ_250","AverageIncomingPaymentsIdSk","SK_0_2","SK_2_4","SK_4_6","SK_6","AverageIncomingPaymentsId","AverageIncomingPayments","SourceOfFundsId","Salary","Pension","GiftOrWin","SaleEstate","SaleShares","Heritage","Loans","CompanyProfitDividends","InsurancePayment","PersonalSavings","SourceOfFunds","otherSource","SourceOfIncomeId","Employee","StudentOrKid","Rentier","SourceOfIncome","TransactionsInfo2","averageMonthlyIncomePayments","paymentDestinationLabel","paymentDestinationCountries","paymentDestinationCountriesWithLabels","reasonOfTransactions","TransactionsInfo1","transactionTypeLabel","cashTransactionMotivation","localTransactionsYear","foreignTransactionsMonth","cashDepositsMonth","originOfFunds","sourceOfWealthType","negativeReputation","negativeReputationType","sourceOfWealthText","netWorth","creditTurnoverYear","reasonCash","paymentRelation","TransactionsInfo","TransactionsInfoCZ","TransactionsInfoSK","ReasonNote","NotIssuedToMe","DoNotKnow","RefuseToProvide","TaxPayerCountry","note","PersonalAndTaxInfo","politicallyExposedPerson","taxPayerOutsideCzechRepublic","otherTaxPayerCountries","usCitizenOrTaxPayer","ssn","secondCitizenship","AllCitizenships","KYCAnswers","transactionsInfo","personalAndTaxInfo","KYCAnswers2","ClientTransactionsInput","formStateFromInitialValues","fold","originalLoanAmount","monthlyInstallmentAmount","endDate","usedForRefinance","loansForLiving","repaidBeforeDisbursement","contractNumber","originalLoanPurpose","values","foldLiabilitiesVariant","onMtg","approvedCreditAmount","onCf","onOvd","resolveAmount","finalDate","month","getMonth","year","getFullYear","getRefinanceDisbursementConflict","toFalse","getDisplayedFields","formSetup","rework","r8EnableSimpleRefinancing","manuallyAdded","displayLoansForLiving","canBeRefinanced","loansForLivingDefaultValue","refinanceLoansForLivingSelection","isUsedForRefinance","edit","displayOriginalLoanPurpose","getRequiredFields","isACPhase","ConsumerLoanOrMortgageForm","defined","definedNoExtract","nonNegativeNumber","amountMinMax","currency","useTenantCurrency","formatCreditType","useFormatCreditType","formatIssues","formatFeedback","useFormatReworkData","reworkConsumerLoan","formatLoanPurpose","formatOriginalLoanPurpose","addLoan","useCommand","api","editLoan","addLoanStandardLoan","standardLoanApi","addLoanOverdraft","ovdApi","editLoanStandardLoan","editLoanOverdraft","a","onEdit","sharedCreditCoApplicantName","setValues","requiredFields","console","log","undefined","amountLimits","mtgOriginalLoanAmount","min","max","mtgCurrentBalance","fromPredicate","validateIfDefined","selectedApplicant","index","amount","taskEither","chain","newValues","finalDateOfTheLoan","left","genericError","loan","fromIO","onSave","previousEdit","usePrevious","creditTypeFieldProps","creditTypeOptions","creditTypeValue","selectedDropdownOption","loanPurposeFieldProps","loanPurposeOptions","loanPurposeValue","originalLoanPurposeFieldProps","originalLoanPurposeOptions","OriginalLoanPurpose","foldTenant","originalLoanPurposeValue","providerFieldProps","currentYear","Date","displayedFields","dropdownOptionToValue","feedback","minYear","maxYear","ascending","newValue","content","providersList","length","description","borrower","checkRequiredFieldsProvided","onCancel","labels","normal","fluid","isViewMode","isInteractingWithAnyForm","onRemove","boolean","constNull","creditCardLimit","changeLimit","newCreditCardLimit","getChangeLimitDisbursementConflict","CreditCardForm","addCreditCard","editCreditCard","addCreditCardStandardLoan","editCreditCardStandardLoan","reworkCreditCard","creditCard","ccAndOvdCurrentBalance","ccAndOvdLimit","foldPredicate","i","includedInBonita","documentTimestamp","noteTitle","noteBody","exceptionComment","subPropertyWrapper","getMainApplicant","applicants","applicant","data","getCurrentApplicant","getCoApplicant","selectedApplicantFromIndex","is","selectedCoApplicant","selectedMainApplicant","selectedApplicantFromStringIndex","decode","fromEither","FilenetDocumentType","NA","PROOF_OF_INCOME","Product","MORTGAGE","CL","SL","TL","RPL","RL","DocumentTab","First","Second","Identity","Income","Property","RestoreDeletedDocumentInput","docTypeId","applicationElementId","restoreDeletedDocument","DeleteRequiredDocumentInput","deleteRequiredDocument","RemoveDocumentInput","docId","removeDocument","removeDocumentByClient","documentsModifiedInput","eqDocumentsModifiedInput","documentsModifiedOutput","documentsModified","DocumentUploadStatus","OK","TECHNICAL_ERROR","FILE_SIZE_ERROR","FORMAT_NOT_SUPPORTED","NoteUploadStatus","DocumentConfirmOutput","DocumentConfirmInput","documentConfirm","proofOfIncomeConfirm","withApplicantIndex","documentCancel","proofOfIncomeCancel","RequiredDocument","applicationElementID","clientID","documentTypeID","documentTypeName","section","translationCode","maxLengthNote","deletedRequiredDocument","UploadedDocument","docHash","docTitle","docType","docTypeName","docset","isReadUpdateTime","mimeType","read","sealedDocHash","sealedDocId","suffix","timestampAdded","LiabilityInfo","providerName","typeOfProduct","moneyAmount","Document","requiredDocument","uploadedDocument","OptionalDocument","PropertyAdditionalData","propertyCity","propertyNumber","propertyStreet","propertyType","IncomeAdditionalData","incomeType","PurposeAdditionalData","AllAdditionalData","SectionData","additionalData","sectionDocuments","sectionName","sectionElementId","ExtendedSectionData","subpropertyList","appraisalSection","ProceedWithDocumentsOutput","optionalDocuments","applicantDocumentSections","ApplicantsRecordC","identityDocumentsSection","incomeDocumentsSections","allowDeleteRequiredDoc","commonDocumentsSection","otherDocumentsSections","propertyDocumentsSections","purposeDocumentsSections","proceedWithDocuments","requestRequiredDocuments","RequiredDocumentsStatusOutput","requiredDocumentsStatus","Complete","Error","ErrorInvalid","InProgress","Timeout","Todo","UploadDocumentInput","documentContent","CompressedFileContent","fileName","applicationNumber","DocumentMime","UploadRequiredDocumentInput","UploadClientRequiredDocumentInput","uploaderApplicantIndex","UploadDocumentOutput","ConfirmDocumentUploadOutput","uploadRequiredDocument","uploadClientRequiredDocument","UploadProofOfIncomeDocumentInput","filenetDocumentType","product","fileContent","uploadProofOfIncomeDocument","uploadProofOfIncomeDocumentByClient","UploadProofOfIncomeDocumentsMobileInput","firstPage","sameDevice","uploadProofOfIncomeDocumentMobile","proofOfIncomeMortgageComplete","uploadPOIByClient","proofOfIncomeMortgageCompleteMobile","UploadOptionalDocumentInput","NewRequiredDocuments","UploadClientOptionalDocumentInput","UploadOptionalDocumentOutput","uploadOptionalDocument","uploadClientOptionalDocument","exitDocumentsSection","SkipOrEditDocumentInput","skipDocument","editDocumentComment","sendEmailInput","notes","sendEmail","ClientUploadLinkStatusOutput","SENT","NOT_SENT","APP_SENT_TO_BANK","clientUploadLinkStatus","ProofOfIncomeSealingStatusInput","appElementId","ProofOfIncomeSealingStatusOutput","SealingStatus","ProofOfIncomeSealingStatus","CreditCardStack","creditCardsList","right","manuallyAddedCreditCardsList","partition","creditCardsFormat","credit","getReworkCreditCard","onEditing","editingRecordID","newCreditCardData","onAdding","addNew","isAdding","onAdd","TaxPayerCountryForm","tinByCountryURL","isTinRequired","showRemoveButton","newCountry","onChangeValues","countryRequiresTIN","c","noTIN","resetForm","countryOptions","cta","window","open","multiline","noteOptions","RiskyActivitiesDialog","optionalDocumentToIdMapCZ","OtherDocuments","RealEstateDocuments","LoanDocuments","ReceiptDocuments","optionalDocumentToIdMapSK","optionalDocumentToIdMap","fileTypes","Object","proofOfIncomeFileTypes","fileTypeExtMap","fileTypesExts","it","proofOfIncomeDocuments","checkIfProofOfIncomeDocument","proofOfIncomeDocTypeId","decodeFileType","fileType","either","mapLeft","decodeProofOfIncomeFileType","encodeFileToBase64","file","tryCatch","Promise","resolve","reject","reader","FileReader","readAsDataURL","onload","result","onerror","toBase64","chainW","fileBase64Url","fromIOEither","split","FileContent","mapSubmitDocumentStatus","mapSubmitNoteStatus","checkOptionArrayToBeEmpty","arr","isNone","checkDocumentObjectsUploaded","obj","every","doc","val","allDocumentsUploaded","dataVariants","sec"],"mappings":"6FAAA,mqCAcO,MAAMA,EAAkBC,QAC7B,CACEC,WAAW,EACXC,OAAO,EACPC,MAAM,EACNC,8BAA8B,EAC9BC,cAAc,GAEhB,mBAKK,SAASC,EACdC,GAEA,OAAOC,GAAeD,EAAQC,KAGzB,MAAMC,EAAmBC,IAAOC,KAAKZ,EAAgBY,MAKtDC,EAAmB,CACvBC,oCAAoC,GAGzBC,EAAiBd,QAAQ,IACjCY,EACHG,QAAQ,IAGGC,EAAiBhB,QAAQ,IACjCY,EACHK,OAAO,EACPC,YAAY,EACZC,oDAAoD,IAKzCC,EAAepB,QAAQ,CAACgB,EAAgBF,IAMxCO,EAAcrB,QACzB,CACEsB,cAAc,EACdC,UAAU,GAEZ,eAQWC,EAAgBxB,OAAO,CAClCyB,WAAYC,SAKDC,EAAkBC,YAC7BC,IAAGC,SACHD,IAAGE,UAAWC,GAAyBA,EAAMP,aAMlCQ,EAA8BC,YAAS,CAClDC,oBAAqBnC,UACrBoC,2BAA4BpC,UAC5BqC,yBAA0BrC,UAC1BsC,eAAgBC,iBAChBC,qBAAsBxC,UACtByC,qBAAsBzC,UACtB0C,sCAAuC1C,UACvC2C,YAAatB,EACbuB,+BAAgC5C,YAUrB6C,EAAoB7C,OAAO,CACtC8C,kBAAmB9C,YAQf+C,EAAkB/C,OACtB,CACEgD,KAAMhD,SACNiD,kBAA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A,EAAI3J,gBAAgBsJ,MAAMF,KACzB7zC,IAAO4zC,OAAOQ,EAAI1J,mBACjBmJ,EAA6BO,EAAI1J,iBAAiB9sC","file":"static/js/index~f64f0252.da182f60.chunk.js","sourcesContent":["import { eq, record } from \"fp-ts\";\nimport { pipe } from \"fp-ts/function\";\nimport { Reader } from \"fp-ts/Reader\";\nimport { Show } from \"fp-ts/Show\";\nimport * as t from \"io-ts\";\nimport { DateFromISOString } from \"io-ts-types/lib/DateFromISOString\";\nimport { NonEmptyString } from \"io-ts-types/lib/NonEmptyString\";\nimport { UUID } from \"io-ts-types/lib/UUID\";\nimport { MoneyAmount, optional, optionFromUndefined } from \"../../globalDomain\";\nimport { RuntimeLocaleKey } from \"../../intl\";\n\n/**\n * SubPropertyType\n */\nexport const SubPropertyType = t.keyof(\n {\n Apartment: true,\n House: true,\n Land: true,\n ObjectOfIndividualRecreation: true,\n OtherObjects: true,\n },\n \"SubPropertyType\"\n);\n\nexport type SubPropertyType = t.TypeOf;\n\nexport function matchSubPropertyType(\n pattern: { [T in SubPropertyType]: () => A }\n): Reader {\n return subProperty => pattern[subProperty]();\n}\n\nexport const subPropertyTypes = record.keys(SubPropertyType.keys);\n\n/**\n * PurposeOfUse\n */\nconst BasePurposeOfUse = {\n OwnLivingOfCoApplicantsOrRelatives: true,\n};\n\nexport const PurposeOfUseSK = t.keyof({\n ...BasePurposeOfUse,\n Others: true,\n});\n\nexport const PurposeOfUseCZ = t.keyof({\n ...BasePurposeOfUse,\n Lease: true,\n Recreation: true,\n RelatedPersonOwnLivingNoPropertyShareOfCoApplicant: true,\n});\nexport type PurposeOfUseSK = t.TypeOf;\nexport type PurposeOfUseCZ = t.TypeOf;\n\nexport const PurposeOfUse = t.union([PurposeOfUseCZ, PurposeOfUseSK]);\nexport type PurposeOfUse = t.TypeOf;\n\n/*\n * PurposeType\n */\nexport const PurposeType = t.keyof(\n {\n Construction: true,\n Purchase: true,\n },\n \"PurposeType\"\n);\n\nexport type PurposeType = t.TypeOf;\n\n/**\n * PropertyInput\n */\nexport const PropertyInput = t.type({\n propertyId: UUID,\n});\n\nexport type PropertyInput = t.TypeOf;\n\nexport const eqPropertyInput = pipe(\n eq.eqString,\n eq.contramap((input: PropertyInput) => input.propertyId)\n);\n\n/**\n * ProceedPropertyAndAppraisal\n */\nexport const ProceedPropertyAndAppraisal = optional({\n allowMoreProperties: t.boolean,\n allowUnpledgeFirstProperty: t.boolean,\n appraisalSectionRequired: t.boolean,\n collateralType: NonEmptyString,\n nonSpecifiedProperty: t.boolean,\n pledgeSelectionError: t.boolean,\n propertyIdentificationSectionRequired: t.boolean,\n purposeType: PurposeType,\n valueOfPropertySectionRequired: t.boolean,\n});\n\nexport type ProceedPropertyAndAppraisal = t.TypeOf<\n typeof ProceedPropertyAndAppraisal\n>;\n\n/**\n * CanAddSubProperty\n */\nexport const CanAddSubProperty = t.type({\n canAddSubProperty: t.boolean,\n});\n\nexport type CanAddSubProperty = t.TypeOf;\n\n/**\n * PropertyAddress\n */\nconst PropertyAddress = t.type(\n {\n city: t.string,\n numberOfApartment: optionFromUndefined(t.string),\n numberOfDescriptiveOrParcel: t.string,\n postCode: t.string,\n street: t.string,\n },\n \"PropertyAddress\"\n);\n\nexport type PropertyAddress = t.TypeOf;\n\nexport const showPropertyAddress: Show = {\n show: ({ street, city, postCode }) => `${street} - ${city} - ${postCode}`,\n};\n\n/*\n * SubProperty\n */\nexport const SaveSubProperty = t.type(\n {\n address: PropertyAddress,\n purpose: PurposeOfUse,\n subPropertyId: optionFromUndefined(UUID),\n type: SubPropertyType,\n },\n \"SaveSubProperty\"\n);\n\nexport type SaveSubProperty = t.TypeOf;\n\nexport const SubProperty = t.type(\n {\n address: PropertyAddress,\n purpose: PurposeOfUse,\n subPropertyId: UUID,\n type: SubPropertyType,\n },\n \"SubProperty\"\n);\n\nexport type SubProperty = t.TypeOf;\n\n/**\n * AppraisalType\n */\nexport const AppraisalType = t.keyof(\n {\n BulkOfDeveloperProjects: true,\n External: true,\n Original: true,\n PriceMap: true,\n },\n \"AppraisalType\"\n);\n\nexport type AppraisalType = t.TypeOf;\n\n/**\n * AppraisalQuestions\n */\nexport const ApartmentInformation = optional(\n {\n isOutOfRange: t.boolean,\n isRecreationOrHighRisk: t.boolean,\n isTechnicalConditionUnmaintained: t.boolean,\n moreThanFiveRooms: t.boolean,\n },\n \"ApartmentInformation\"\n);\n\nexport type ApartmentInformation = t.TypeOf;\n\nexport const AppraisalDetails = optional(\n {\n addressOfProperty: t.string,\n dateOfEvaluation: DateFromISOString,\n firstName: t.string,\n lastName: t.string,\n valueOfProperty: MoneyAmount,\n },\n \"AppraisalDetails\"\n);\n\nexport type AppraisalDetails = t.TypeOf;\n\nexport const ConstructionType = t.keyof(\n {\n Brick: true,\n Panel: true,\n },\n \"ConstructionType\"\n);\n\nexport type ConstructionType = t.TypeOf;\n\nexport const constructionTypes = record.keys(ConstructionType.keys);\n\nexport const OtherInformation = optional(\n {\n commentsForAppraiser: t.string,\n districtOfProperty: t.string,\n isDifferentContact: t.boolean,\n nameOfContact: t.string,\n phoneNumber: t.string,\n },\n \"OtherInformation\"\n);\n\nexport type OtherInformation = t.TypeOf;\n\nexport const AppraisalQuestions = optional(\n {\n apartmentInformation: ApartmentInformation,\n appraisalDetails: AppraisalDetails,\n constructionType: ConstructionType,\n developerProject: t.string,\n floodZoneIV: t.boolean,\n legalConstraint: t.boolean,\n moreThan10Apartments: t.boolean,\n noLegalAccessToTheProperty: t.boolean,\n originalAppraisal: t.boolean,\n externalAppraisal: t.boolean,\n otherInformation: OtherInformation,\n otherRestrictions: t.boolean,\n pledgeForAnotherInstitution: t.boolean,\n },\n \"AppraisalQuestions\"\n);\n\nexport type AppraisalQuestions = t.TypeOf;\n\n/**\n * Appraisal\n */\nexport const Appraisal = t.type(\n {\n appraisalQuestions: optionFromUndefined(AppraisalQuestions),\n appraisalType: AppraisalType,\n },\n \"Appraisal\"\n);\n\nexport type Appraisal = t.TypeOf;\n\n/**\n * SaveSubProperty\n */\nexport const AddSubProperty = t.type({\n address: PropertyAddress,\n purpose: PurposeOfUse,\n type: SubPropertyType,\n});\n\nexport type AddSubProperty = t.TypeOf;\n\nconst AddSubPropertyInput = t.type({\n propertyId: UUID,\n subProperty: AddSubProperty,\n});\n\nconst AddProperty = t.type({\n subProperty: AddSubProperty,\n});\n\nconst EditSubPropertyInput = t.type({\n propertyId: UUID,\n subProperty: SubProperty,\n});\n\nexport const SaveSubPropertyInput = t.union(\n [AddProperty, AddSubPropertyInput, EditSubPropertyInput],\n \"SaveSubPropertyInput\"\n);\n\nexport type SaveSubPropertyInput = t.TypeOf;\n\nexport const SaveSubPropertyOutput = optional(\n {\n canAddAnotherProperty: t.boolean,\n canAddAnotherSubProperty: t.boolean,\n propertyId: UUID,\n subPropertyId: UUID,\n },\n \"SaveSubPropertyOutput\"\n);\n\nexport type SaveSubPropertyOutput = t.TypeOf;\n\n/**\n * RemoveSubProperty\n */\nexport const RemoveSubProperty = t.type(\n {\n propertyId: UUID,\n subPropertyId: UUID,\n },\n \"RemoveSubProperty\"\n);\n\nexport type RemoveSubProperty = t.TypeOf;\n\n/**\n * PledgeProperty\n */\nexport const PledgeProperty = t.type({\n pledged: optionFromUndefined(t.boolean),\n selectedPropertyId: UUID,\n});\n\nexport type PledgeProperty = t.TypeOf;\n\nexport const PledgeSubPropertyOutput = t.type(\n {\n noPropertyPledgedError: optionFromUndefined(t.boolean),\n appraisalRequired: optionFromUndefined(t.boolean),\n acquiringRentalRightWarning: t.boolean,\n },\n \"PledgeSubPropertyOutput\"\n);\n\nexport type PledgeSubPropertyOutput = t.TypeOf;\n/*\n * ConfirmProperty\n */\nexport const ConfirmProperty = optional({\n acquiringRentalRightWarning: t.boolean,\n appraisalRequired: t.boolean,\n linkedToPurpose: t.boolean,\n validated: t.boolean,\n});\n\nexport type ConfirmProperty = t.TypeOf;\n\n/**\n * ValidateProperty\n */\nexport const ValidateProperty = t.type({\n validated: optionFromUndefined(t.boolean),\n});\n\nexport type ValidateProperty = t.TypeOf;\n\n/** ProceedAppraisal */\nexport const ProceedAppraisal = optional(\n {\n acquiringRentalRightWarning: t.boolean,\n apartment: t.boolean,\n appraisalRequired: t.boolean,\n possibleAppraisals: t.array(AppraisalType),\n },\n \"ProceedAppraisal\"\n);\n\nexport type ProceedAppraisal = t.TypeOf;\n\n/** DistrictOfProperty */\nexport const DistrictOfProperty = t.type(\n {\n district: optionFromUndefined(t.string),\n },\n \"DistrictOfProperty\"\n);\n\nexport type DistrictOfProperty = t.TypeOf;\n\n/** DeveloperProjects */\nexport const DeveloperProjects = t.type(\n {\n developerProjects: t.record(t.string, t.string),\n },\n \"DeveloperProjects\"\n);\n\nexport type DeveloperProjects = t.TypeOf;\n\n/** ConfirmAppraisal */\nexport const ConfirmAppraisalInput = t.type(\n {\n appraisal: Appraisal,\n selectedPropertyId: UUID,\n },\n \"ConfirmAppraisalInput\"\n);\n\nexport type ConfirmAppraisalInput = t.TypeOf;\n\nexport const ConfirmAppraisalOutput = t.type(\n {\n appraisalFee: optionFromUndefined(MoneyAmount),\n },\n \"ConfirmAppraisalOutput\"\n);\n\nexport type ConfirmAppraisalOutput = t.TypeOf;\n\n/**\n * AppraisalStatus\n */\nexport const AppraisalStatus = t.type(\n {\n status: t.boolean,\n lockCurrentProperty: t.boolean,\n lockAllProperties: t.boolean,\n },\n \"AppraisalStatus\"\n);\n\nexport type AppraisalStatus = t.TypeOf;\n\n/**\n * PropertyValueDetails\n */\nexport const PropertyValueDetails = t.type({\n isVisible: t.boolean,\n isEditable: t.boolean,\n value: optionFromUndefined(MoneyAmount),\n});\nexport type PropertyValueDetails = t.TypeOf;\n\n/**\n * Risk\n */\nexport const Risk = t.type({\n riskId: UUID,\n riskText: RuntimeLocaleKey,\n additionalNote: t.string,\n checked: t.boolean,\n});\n\nexport type Risk = t.TypeOf;\n\n/**\n * ValueOfProperty\n */\nexport const PropertyValue = t.type({\n appraisalType: AppraisalType,\n actualValue: PropertyValueDetails,\n futureValue: PropertyValueDetails,\n totalActualValue: PropertyValueDetails,\n totalFutureValue: PropertyValueDetails,\n appraisalFee: PropertyValueDetails,\n propertyInsuranceFee: PropertyValueDetails,\n isDocumentMissing: t.boolean,\n isValueSufficient: t.boolean,\n isRiskSubSectionVisible: t.boolean,\n isRiskQuestionVisible: t.boolean,\n isBrokerWarning: t.boolean,\n isRisksSaved: t.boolean,\n isConfirmButtonVisible: t.boolean,\n pledgedCurrentValue: optionFromUndefined(MoneyAmount),\n isPropertyPledgedForAnotherLoan: t.boolean,\n});\n\nexport type PropertyValue = t.TypeOf;\n\n/**\n * ValueOfPropertyRisk\n */\nexport const ValueOfPropertyRisks = t.type({\n risk: t.type({\n comment: t.string,\n hasRisks: t.boolean,\n riskList: optionFromUndefined(t.array(Risk)),\n }),\n});\n\nexport const ValueOfProperty = t.type({\n isVisible: t.boolean,\n isEditable: t.boolean,\n value: MoneyAmount,\n});\n\nexport type ValueOfProperty = t.TypeOf;\n\nexport const SaveActualValueOutput = optional(\n {\n totalValueOfProperty: ValueOfProperty,\n isValueSufficient: t.boolean,\n },\n \"SaveActualValueOutput\"\n);\n\nexport const PledgedValues = t.type({\n pledgedForAnotherLoan: t.boolean,\n pledgedCurrentValue: optionFromUndefined(t.number),\n});\n\nexport type ValueOfPropertyRisks = t.TypeOf;\n","import {\n Box,\n Form,\n FormRow,\n TextField,\n PasswordField,\n FormSection,\n Card,\n useForm,\n validators,\n formError,\n formWarning,\n FormError,\n} from \"design-system\";\n\nimport { option, nonEmptyArray } from \"fp-ts\";\nimport { LocaleKey, useFormatMessage } from \"../intl\";\nimport { ForgotPasswordLink } from \"./ForgotPasswordLink\";\nimport { LocaleSelector } from \"./LocaleSelector\";\nimport { useValidators } from \"../Common/useValidators\";\nimport { TaskEither } from \"fp-ts/TaskEither\";\nimport { constVoid, pipe } from \"fp-ts/function\";\nimport { usePortalStatusContext } from \"../PortalStatusContext\";\nimport { useEffect } from \"react\";\nimport { foldPortalStatus } from \"../globalDomain\";\nimport { Option } from \"fp-ts/Option\";\nimport { NonEmptyArray } from \"fp-ts/NonEmptyArray\";\n\nexport type LoginCredentials = { username: string; password: string };\n\nexport type LoginFormError = LoginWarning | LoginError;\ntype LoginWarning = {\n type: \"warning\";\n error: LocaleKey;\n action: Option;\n};\ntype LoginError = {\n type: \"error\";\n error: LocaleKey;\n action: Option;\n};\nexport type LoginFormErrorAction = {\n label: LocaleKey;\n action: () => unknown;\n};\n\nexport function loginFormError(\n message: LocaleKey,\n action?: LoginFormErrorAction\n): LoginFormError {\n return { type: \"error\", error: message, action: option.fromNullable(action) };\n}\n\nexport function loginFormWarning(\n message: LocaleKey,\n action?: LoginFormErrorAction\n): LoginFormError {\n return {\n type: \"warning\",\n error: message,\n action: option.fromNullable(action),\n };\n}\n\ntype Props = {\n onThirdPartyPasswordSetup?: () => unknown;\n onLogin: (\n credentials: LoginCredentials\n ) => TaskEither;\n disabled?: boolean;\n};\n\nexport function Login(props: Props) {\n const formatMessage = useFormatMessage();\n\n const { maxLength, validEmail } = useValidators();\n\n const is3P = !!props.onThirdPartyPasswordSetup;\n\n const { disabled } = props;\n\n useEffect(() => {\n //workaround for when we arrived in login page because of the IdleGuard shown on top of another dialog\n document.body.style.overflow = \"\";\n }, []);\n\n const { fieldProps, handleSubmit, formErrors, handleReset } = useForm(\n {\n initialValues: {\n username: \"\",\n password: \"\",\n },\n fieldValidators: () => ({\n username: is3P\n ? validators.inSequence(\n validators.nonBlankString(\n formatMessage(\"3PLogin.usernameRequiredError\")\n ),\n maxLength(254),\n validEmail\n )\n : validators.inSequence(\n validators.nonBlankString(\n formatMessage(\"Login.usernameRequiredError\")\n ),\n maxLength(254)\n ),\n password: validators.inSequence(\n validators.nonEmptyString(\n formatMessage(\"Login.passwordRequiredError\")\n ),\n maxLength(254)\n ),\n }),\n },\n {\n onSubmit: props.onLogin,\n }\n );\n\n const { portalStatus } = usePortalStatusContext();\n\n useEffect(() => {\n foldPortalStatus(portalStatus, {\n onActive: handleReset,\n onInitial: constVoid,\n onNone: constVoid,\n onScheduled: constVoid,\n });\n }, [portalStatus.type]);\n\n function formatLoginError(error: LoginFormError): NonEmptyArray {\n return nonEmptyArray.of(\n (() => {\n switch (error.type) {\n case \"error\":\n return formError(\n formatMessage(error.error),\n pipe(\n error.action,\n option.map(action => ({\n ...action,\n label: formatMessage(action.label),\n })),\n option.toUndefined\n )\n );\n case \"warning\":\n return formWarning(\n formatMessage(error.error),\n pipe(\n error.action,\n option.map(action => ({\n ...action,\n label: formatMessage(action.label),\n })),\n option.toUndefined\n )\n );\n }\n })()\n );\n }\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {!disabled && (\n \n \n \n )}\n \n \n \n \n \n );\n}\n","import { NonNegativeInteger } from \"design-system\";\nimport * as t from \"io-ts\";\nimport { NonEmptyString } from \"io-ts-types/lib/NonEmptyString\";\nimport { UUID } from \"io-ts-types/lib/UUID\";\nimport {\n MonthYear,\n optional,\n optionFromUndefined,\n Tenant,\n} from \"../../../globalDomain\";\n\n/**\n * IncomeSource\n */\nexport const IncomeSource = t.keyof(\n {\n Employed: true,\n SpecialType: true,\n Freelancer: true,\n CompanyOwner: true,\n TradesmanCoOperatingPerson: true,\n BrokerOfUCB: true,\n },\n \"IncomeSource\"\n);\n\nexport const IncomeSourceForFreelancerOrTradesman = t.keyof(\n {\n Employed: true,\n SpecialType: true,\n CompanyOwner: true,\n BrokerOfUCB: true,\n },\n \"IncomeSourceForFreelancerOrTradesman\"\n);\n\nexport type IncomeSource = t.TypeOf;\n\n/**\n * PaymentMethod\n */\nexport const PaymentMethodSK = t.keyof(\n {\n SalarySentUCB: true,\n SalarySentOtherBank: true,\n PaymentInCash: true,\n },\n \"PaymentMethodSK\"\n);\n\nexport type PaymentMethodSK = t.TypeOf;\n\nexport const PaymentMethodCZ = t.keyof(\n {\n Cash: true,\n BankTransfer: true,\n },\n \"PaymentMethodCZ\"\n);\n\nexport type PaymentMethodCZ = t.TypeOf;\n\nexport const PaymentMethod = t.union(\n [PaymentMethodCZ, PaymentMethodSK],\n \"PaymentMethod\"\n);\n\nexport type PaymentMethod = t.TypeOf;\n\n/**\n * TypeOfRent\n */\nexport const TypeOfRent = t.keyof(\n {\n RentFromOtherRealEstate: true,\n RentFromPledgedRealEstate: true,\n },\n \"TypeOfRent\"\n);\n\nexport type TypeOfRent = t.TypeOf;\n\nexport const JobPosition = t.type(\n {\n id: NonNegativeInteger,\n key: NonEmptyString,\n tenant: Tenant,\n language: NonEmptyString,\n name: NonEmptyString,\n },\n \"JobPosition\"\n);\n\nexport type JobPosition = t.TypeOf;\n\nexport const FreelancerType = t.type(\n {\n id: NonNegativeInteger,\n key: NonEmptyString,\n tenant: Tenant,\n language: NonEmptyString,\n name: NonEmptyString,\n },\n \"FreelancerType\"\n);\n\nexport type FreelancerType = t.TypeOf;\n\nexport const BusinessSector = t.type(\n {\n id: NonNegativeInteger,\n key: NonEmptyString,\n tenant: Tenant,\n language: NonEmptyString,\n name: NonEmptyString,\n },\n \"BusinessSector\"\n);\n\nexport type BusinessSector = t.TypeOf;\n\nexport const EmploymentType = t.keyof(\n {\n IndefiniteContract: true,\n LimitedContract: true,\n Agreement: true,\n SeasonalContract: true,\n Other: true,\n },\n \"EmploymentType\"\n);\n\nexport type EmploymentType = t.TypeOf;\n\n/**\n * SpecialTypeIncome\n */\nexport const SpecialTypeOfIncomeCZ = t.keyof({\n Alimony: true,\n AllowanceForSoldiers: true,\n HousingAllowanceForSoldiers: true,\n HomeDuties: true,\n MaternityLeave: true,\n NonStandard: true,\n Pensioner: true,\n Student: true,\n Unemployed: true,\n});\n\nexport type SpecialTypeOfIncomeCZ = t.TypeOf;\n\nexport const SpecialTypeOfIncomeSK = t.keyof({\n AllowanceForSoldiers: true,\n HousingAllowanceForSoldiers: true,\n HomeDuties: true,\n IncomeFromCapitalAssets: true,\n NonStandard: true,\n Pensioner: true,\n RentForProperty: true,\n Unemployed: true,\n});\n\nexport type SpecialTypeOfIncomeSK = t.TypeOf;\n\nexport const SpecialTypeOfIncome = t.union(\n [SpecialTypeOfIncomeCZ, SpecialTypeOfIncomeSK],\n \"SpecialTypeOfIncome\"\n);\n\nexport type SpecialTypeOfIncome = t.TypeOf;\n\nexport const AllowanceType = t.keyof({\n Parental: true,\n FutureParental: true,\n});\n\nexport type AllowanceType = t.TypeOf;\n\nexport const PensionTypeCZ = t.keyof({\n Disability: true,\n OldAge: true,\n Orphans: true,\n Widower: true,\n Retirement: true,\n});\n\nexport type PensionTypeCZ = t.TypeOf;\n\nexport const PensionTypeSK = t.keyof({\n OldAge: true,\n Widower: true,\n FullInvalidityPension: true,\n ParentalAllowance: true,\n RetirementAnnuity: true,\n OtherPensionOrAllowance: true,\n Bursary: true,\n TravelCompensationDiets: true,\n});\n\nexport type PensionTypeSK = t.TypeOf;\n\nexport const PensionType = t.union(\n [PensionTypeCZ, PensionTypeSK],\n \"PensionType\"\n);\n\nexport type PensionType = t.TypeOf;\n\nexport const RetirementRentType = t.keyof({\n Policeman: true,\n FireRescueCorps: true,\n CustomAdministration: true,\n PrisonService: true,\n GeneralInspectorate: true,\n SecurityInformationService: true,\n OfficeForForeignRelations: true,\n FormerArmyMembers: true,\n Other: true,\n});\n\nexport type RetirementRentType = t.TypeOf;\n\nexport const ThirdParty = t.type(\n {\n id: NonNegativeInteger,\n tenant: Tenant,\n name: NonEmptyString,\n ico: optionFromUndefined(t.string),\n ndg: optionFromUndefined(t.string),\n },\n \"ThirdParty\"\n);\n\nexport type ThirdParty = t.TypeOf;\n\n/**\n * IncomeSimplified\n */\nexport const IncomeSimplified = t.type(\n {\n simplifiedVersion: t.literal(true),\n totalAvgMonthlyIncome: t.number,\n },\n \"IncomeSimplified\"\n);\n\nexport type IncomeSimplified = t.TypeOf;\n\nexport function isIncomeSimplified(\n income: GetIncome\n): income is GetIncomeSimplified {\n return income.simplifiedVersion;\n}\n\nexport const GetIncomeSimplified = t.intersection(\n [IncomeSimplified, optional({ completed: t.boolean })],\n \"GetIncomeSimplified\"\n);\n\nexport type GetIncomeSimplified = t.TypeOf;\n\nexport const IncomeFull = t.type(\n {\n companyInfo: optional(\n {\n applicantsShareHigherThan33: t.boolean,\n businessSector: NonEmptyString,\n businessStartingDate: MonthYear,\n companyIco: t.string,\n companyName: t.string,\n addIco: t.boolean,\n nameOfEntrepreneur: t.string,\n entrepreneurIco: t.string,\n country: t.string,\n city: t.string,\n street: t.string,\n houseNr: t.string,\n zipCode: t.string,\n phone: t.string,\n equityPositive: t.boolean,\n freelancerType: NonEmptyString,\n nameOf3P: t.string,\n ico3P: t.string,\n stakeInCompany: t.number,\n },\n \"CompanyInfo\"\n ),\n contractInfo: optional(\n {\n contractIndefinitePeriod: t.boolean,\n contractPeriodExpiration: MonthYear,\n employedInSpecificProfessions: t.boolean,\n employmentType: EmploymentType,\n inProbation: t.boolean,\n jobPosition: NonEmptyString,\n lengthOfUninterruptedCurrentEmployment: t.number,\n lengthOfUninterruptedOverallEmployment: t.number,\n paymentMethod: PaymentMethod,\n paymentMethodLabel: t.string,\n startingDate: MonthYear,\n workBasedOnAgreementOnWorkingActivity: t.boolean,\n },\n \"ContractInfo\"\n ),\n incomeInfo: t.intersection(\n [\n t.type({\n incomeSource: IncomeSource,\n }),\n optional({\n alimonyChildrenInvolved: t.number,\n allowanceType: AllowanceType,\n amortizationOfRentedRe: t.number,\n annualGrossIncome: t.number,\n bruttoComissions: t.number,\n businessGrossIncome: t.number,\n employedInCompany: t.boolean,\n equityFromLastYear: t.number,\n grossIncomes: t.number,\n incomeAsDeductibleExpenses: t.boolean,\n incomeDescription: t.string,\n incomeFromRentContract: t.number,\n incomeSourceLabel: t.string,\n isAlimonyIdentifiable: t.boolean,\n isAlimonyOutsideCountry: t.boolean,\n isApplicantDeclareAsUserInDeclaration: t.boolean,\n isCooperativeOwnership: t.boolean,\n keepsAccountancy: t.boolean,\n last3YearsPaidSharedProfit: t.number,\n lastPeriodProfit: t.number,\n monthlyIncome: t.number,\n negativeBusinessProfit: t.boolean,\n pensionType: PensionType,\n profitSharingIncome: t.boolean,\n r101BruttoIncomes: t.number,\n r201IncomeFromLease: t.number,\n r37PartialTaxBase: t.number,\n r38PartialTaxBase: t.number,\n r39PartialTaxBase: t.number,\n // r74TaxAfterClaimedRelief: t.number,\n reCoOwned: t.boolean,\n reInPersonalOwnership: t.boolean,\n reUsedAsCollateral: t.boolean,\n // retirementRentType: RetirementRentType,\n salaryCurrency: t.string,\n specialTypeOfIncome: SpecialTypeOfIncome,\n tax: t.number,\n taxBase: t.number,\n typeOfRent: TypeOfRent,\n youngPeopleConditions: t.boolean,\n taxAdvisor: t.boolean,\n calculationBasedOnTurnover: t.boolean,\n profitLastPeriodPositive: t.boolean,\n }),\n ],\n \"IncomeInfo\"\n ),\n },\n \"IncomeFull\"\n);\n\nexport type IncomeFull = t.TypeOf;\n\n/**\n * MainIncome\n */\nexport const MainIncome = t.intersection(\n [IncomeFull, t.type({ simplifiedVersion: t.literal(false) })],\n \"MainIncome\"\n);\n\nexport type MainIncome = t.TypeOf;\n\n/**\n * AdditionalIncome\n */\nexport const AdditionalIncome = t.intersection(\n [\n IncomeFull,\n t.type({\n recordId: UUID,\n }),\n ],\n \"AdditionalIncome\"\n);\n\nexport type AdditionalIncome = t.TypeOf;\n\n/**\n * GetIncomeFull\n */\nexport const GetIncomeFull = t.intersection(\n [\n MainIncome,\n optional({\n additionalIncomes: t.array(AdditionalIncome),\n completed: t.boolean,\n }),\n ],\n \"GetIncomeFull\"\n);\n\nexport type GetIncomeFull = t.TypeOf;\n\nexport function isIncomeFull(income: GetIncome): income is GetIncomeFull {\n return !income.simplifiedVersion;\n}\n\n/**\n * AddIncomeFull\n */\nexport const SaveIncomeFull = t.intersection(\n [\n MainIncome,\n t.partial({\n additionalIncomes: t.array(IncomeFull),\n }),\n ],\n \"SaveIncomeFull\"\n);\n\nexport type SaveIncomeFull = t.TypeOf;\n\n/**\n * GetIncome\n */\nexport const GetIncome = t.union(\n [GetIncomeFull, GetIncomeSimplified],\n \"GetIncome\"\n);\n\nexport type GetIncome = t.TypeOf;\n\n/**\n * SaveIncome\n */\nexport const SaveIncome = t.union(\n [SaveIncomeFull, IncomeSimplified],\n \"SaveIncome\"\n);\n\nexport type SaveIncome = t.TypeOf;\n\n/**\n * DeleteAdditionalIncome\n */\nexport const DeleteAdditionalIncome = t.type(\n {\n recordId: UUID,\n },\n \"DeleteAdditionalIncome\"\n);\n\nexport type DeleteAdditionalIncome = t.TypeOf;\n","import { array, option } from \"fp-ts\";\nimport { useFormatMessage } from \"../intl\";\nimport { LocalizedString, useLoadingStatusRead } from \"design-system\";\nimport { pipe } from \"fp-ts/function\";\nimport { useAppContext } from \"../useAppContext\";\nimport { DropdownField } from \"../Common/DropdownField/DropdownField\";\n\nimport { SupportedLocales } from \"../globalDomain\";\n\ntype Props = {\n width?: string;\n};\n\nexport const LocaleSelector = (props: Props) => {\n const formatMessage = useFormatMessage();\n\n const { isSubmitting } = useLoadingStatusRead();\n\n const context = useAppContext();\n\n const {\n apiParameters: { tenant },\n } = useAppContext();\n\n const orderedLocales: Array =\n tenant === \"CZ\" ? [\"en\", \"cs\"] : [\"en\", \"sk\"];\n\n const getLabelForLocale = (loc: SupportedLocales): LocalizedString => {\n switch (loc) {\n case \"en\":\n return formatMessage(\"Languages.english\");\n case \"cs\":\n return formatMessage(\"Languages.czech\");\n case \"sk\":\n return formatMessage(\"Languages.slovak\");\n }\n };\n\n const getOptionFromValue = (value: SupportedLocales) => {\n return {\n value: value,\n label: getLabelForLocale(value),\n };\n };\n\n const localesOptions = orderedLocales.map(getOptionFromValue);\n\n return (\n option.value === context.locale)\n )}\n onChange={value => {\n if (option.isSome(value)) {\n context.setLocale(value.value.value);\n }\n }}\n onBlur={() => {}}\n clearable={false}\n searchable={false}\n issues={option.none}\n label={formatMessage(\"Languages.select\")}\n disabled={isSubmitting}\n width={props.width}\n />\n );\n};\n","import { option } from \"fp-ts\";\nimport { constVoid } from \"fp-ts/function\";\nimport { Box, Space, Children } from \"design-system\";\nimport { palette } from \"design-system/lib/styleConstants\";\n\nimport { MainLayout } from \"../Common/MainLayout/MainLayout\";\n\ntype Props = {\n children: Children;\n};\n\nexport function LoginLandingWrapper(props: Props) {\n return (\n \n \n \n {props.children}\n \n \n );\n}\n","import * as t from \"io-ts\";\nimport { UUID } from \"io-ts-types/lib/UUID\";\nimport {\n NonNegative,\n Positive,\n PositiveInteger,\n NonNegativeInteger,\n LocalizedString,\n} from \"design-system\";\nimport {\n DateFromSQLString,\n eqMoneyAmount,\n MoneyAmount,\n optionFromArray,\n optionFromUndefined,\n PercentageLikeFromNumber,\n} from \"../../globalDomain\";\nimport { NonEmptyString } from \"io-ts-types/lib/NonEmptyString\";\nimport { ApplicantIndex } from \"../domain\";\nimport { nonEmptyArray } from \"io-ts-types/lib/nonEmptyArray\";\nimport { NumberFromString } from \"io-ts-types/lib/NumberFromString\";\nimport { Eq } from \"fp-ts/Eq\";\nimport { Option } from \"fp-ts/Option\";\nimport { eq, option } from \"fp-ts\";\nimport { optionFromNullable } from \"io-ts-types/lib/optionFromNullable\";\nimport { RuntimeLocaleKey } from \"../../intl\";\n\nexport const LoanTypeCommon = t.keyof(\n {\n Purpose: true,\n NonPurpose: true,\n },\n \"LoanType\"\n);\n\nexport const LoanTypeCombined = t.literal(\"Combined\");\n\nexport const LoanType = t.union([LoanTypeCommon, LoanTypeCombined], \"LoanType\");\nexport type LoanType = t.TypeOf;\n\nexport const Fees = t.type(\n {\n processingFee: MoneyAmount,\n appraisalFee: optionFromNullable(MoneyAmount),\n propertyInsuranceFee: optionFromNullable(MoneyAmount),\n appraisalFeeEditable: optionFromUndefined(t.boolean),\n propertyInsuranceFeeEditable: optionFromUndefined(t.boolean),\n appraisalFeeTooltip: optionFromUndefined(t.boolean),\n appraisalFeeMessage: optionFromUndefined(t.boolean),\n propertyInsuranceFeeMessage: optionFromUndefined(t.boolean),\n propertyInsuranceFeeTooltip: optionFromUndefined(t.boolean),\n },\n \"Fees\"\n);\nexport type Fees = t.TypeOf;\n\nexport const DiscountOf = t.keyof({\n INTEREST_RATE: true,\n FEE_PROCESS: true,\n FEE_APPRAISAL: true,\n GREEN_MORTGAGE_APPR: true,\n GREEN_MORTGAGE_PROC: true,\n CPI_DISCOUNT_ON_PROCESSING_FEE: true,\n REFINANCING_DISCOUNT_ON_PROCESSING_FEE: true,\n APPRAISAL_BENEFIT: true,\n});\nexport type DiscountOf = t.TypeOf;\n\nconst DiscountParameters = t.type(\n {\n discountType: DiscountOf,\n discountProcessType: t.string,\n discountReason: optionFromUndefined(t.string),\n discountComment: optionFromUndefined(t.string),\n disabledForSelection: t.boolean,\n discountValueFeeMarketing: optionFromUndefined(t.number),\n discountValueFeeManagement: optionFromUndefined(t.number),\n appraisalFeeMKTDiscountPercentage: optionFromUndefined(t.number),\n appraisalFeeMNGDiscountPercentage: optionFromUndefined(t.number),\n discountIRMarketing: optionFromUndefined(t.number),\n discountIRManagement: optionFromUndefined(t.number),\n },\n \"DiscountParameters\"\n);\nexport type DiscountParameters = t.TypeOf;\n\nexport const Percentage = t.keyof({\n OneHundred: true,\n SeventyFive: true,\n Fifty: true,\n TwentyFive: true,\n});\n\nexport const TableState = t.keyof({\n loading: true,\n error: true,\n success: true,\n});\nexport type TableState = t.TypeOf;\n\nexport type Percentage = t.TypeOf;\n\nexport const eqCustomFees: Eq> = option.getEq(\n eq.getStructEq({\n processingFee: eqMoneyAmount,\n appraisalFee: option.getEq(eqMoneyAmount),\n })\n);\n\nexport type CPITypeBrand = NonEmptyString & {\n readonly CPIType: unique symbol;\n};\n\nexport const CpiType = t.brand(\n NonEmptyString,\n (cpiType): cpiType is t.Branded =>\n cpiType !== \"No\",\n \"CPIType\"\n);\nexport type CpiType = t.TypeOf;\n\nexport const CpiTypeNone = t.literal(\"No\", \"CpiTypeNone\");\nexport type CpiTypeNone = t.TypeOf;\n\nexport const InsuranceType = t.union([CpiType, CpiTypeNone], \"InsuranceType\");\nexport type InsuranceType = t.TypeOf;\n\nconst TenorType = t.keyof(\n {\n Years: true,\n Months: true,\n },\n \"TenorType\"\n);\n\nconst Tenor = t.type(\n {\n tenorValue: NonNegativeInteger,\n tenorType: TenorType,\n },\n \"Tenor\"\n);\n\nexport type Tenor = t.TypeOf;\n\nexport const eqTenor: Eq = eq.getStructEq({\n tenorValue: eq.eqNumber,\n tenorType: eq.eqString,\n});\n\nconst TenorLimits = t.type({\n tenorMin: NonNegativeInteger,\n tenorMax: NonNegativeInteger,\n tenorMaxMain: optionFromUndefined(NonNegativeInteger),\n tenorMaxCoApplicant: optionFromUndefined(NonNegativeInteger),\n stepSize: Positive,\n});\n\nexport type TenorLimits = t.TypeOf;\n\nexport type CPIFeature = t.TypeOf;\nexport const CPIFeature = t.keyof(\n {\n DEATH: true,\n PERMANENT_DISABILITY: true,\n TEMPORARY_DISABILITY: true,\n LOSS_OF_INCOME: true,\n INSURANCE_OF_SERIOUS_DISEASES: true,\n },\n \"CpiFeature\"\n);\n\nexport const CpiFeatureRecord = t.record(\n CPIFeature,\n t.union([LocalizedString, t.undefined]),\n \"CpiFeaturesLabels\"\n);\nexport type CpiFeatureRecord = t.TypeOf;\n\nexport const LoanParameters = t.intersection(\n [\n t.type(\n {\n loanPurpose: NonEmptyString,\n loanPurposeLabel: optionFromUndefined(t.string),\n collateralType: NonEmptyString,\n collateralTypeLabel: optionFromUndefined(t.string),\n estimatedPropertyValue: MoneyAmount,\n estimatedPropertyValueEditable: optionFromUndefined(t.boolean),\n tenor: Tenor,\n selectedInsurance: InsuranceType,\n selectedInsuranceLabel: optionFromUndefined(LocalizedString),\n insuranceFeaturesLabels: optionFromUndefined(CpiFeatureRecord),\n selectedInsuredClient: optionFromUndefined(\n NumberFromString.pipe(ApplicantIndex.props.applicantIndex)\n ),\n customFees: optionFromUndefined(Fees),\n showCustomFees: optionFromUndefined(t.boolean),\n interestRateDiscount: optionFromUndefined(PercentageLikeFromNumber),\n dateOfBirth: optionFromNullable(DateFromSQLString),\n dateOfBirthCoApplicant: optionFromNullable(DateFromSQLString),\n loanTypeLabel: optionFromUndefined(LocalizedString),\n update: optionFromUndefined(t.boolean),\n dayOfInstallment: t.number,\n nonSpecifiedProperty: optionFromUndefined(t.boolean),\n greenMortgage: optionFromUndefined(t.boolean),\n loanAmount: MoneyAmount,\n },\n \"BaseParameters\"\n ),\n t.union(\n [\n t.type(\n {\n loanType: LoanTypeCommon,\n },\n \"CommonLoan\"\n ),\n t.type(\n {\n loanType: LoanTypeCombined,\n purposeAmount: MoneyAmount,\n nonPurposeAmount: MoneyAmount,\n },\n \"CombinedLoan\"\n ),\n ],\n \"LoanTypeParameters\"\n ),\n ],\n \"LoanParameters\"\n);\n\nexport type LoanParameters = t.TypeOf;\n\nconst OfferResult = t.type(\n {\n fixationPeriod: PositiveInteger,\n insuranceFee: optionFromUndefined(MoneyAmount),\n interestRate: PercentageLikeFromNumber,\n monthlyInstallment: MoneyAmount,\n },\n \"OfferResult\"\n);\nexport type OfferResult = t.TypeOf;\n\nexport const CalculateAmountError = t.keyof(\n {\n minPurposeLoanAmount: true,\n minNonPurposeAmount: true,\n maxNonPurposeAmount: true,\n loanAmountOutOfRange: true,\n },\n \"CalculateAmountError\"\n);\n\nexport type CalculateAmountError = t.TypeOf;\n\nexport const CalculateError = t.union(\n [\n t.keyof({\n genericCalculateError: true,\n minClientsAge: true,\n maxClientsAge: true,\n minCoapplicantAge: true,\n maxCoapplicantAge: true,\n minEstimatedPropertyValue: true,\n maxCustomProcessingFee: true,\n maxCustomApraisalFee: true,\n maxCustomPropertyInsuranceFee: true,\n }),\n CalculateAmountError,\n ],\n \"CalculateError\"\n);\n\nexport type CalculateError = t.TypeOf;\n\nexport const CalculateErrors = optionFromArray(CalculateError);\n\nexport type CalculateErrors = t.TypeOf;\n\nconst OfferResults = t.record(t.string, OfferResult);\n\nexport const OfferPackage = t.type(\n {\n offerResults: OfferResults,\n selectedOffer: optionFromUndefined(t.string),\n offerSummary: t.type({\n duration: NonNegativeInteger,\n loanAmount: MoneyAmount,\n loanToValue: PercentageLikeFromNumber,\n ltvOverLimit: t.boolean,\n startDate: DateFromSQLString,\n expirationDate: DateFromSQLString,\n loanTypeChanged: t.boolean,\n }),\n loanAmountMax: MoneyAmount,\n loanAmountMin: MoneyAmount,\n loanAmountStepSize: Positive,\n nonPurposeAmountMax: optionFromUndefined(MoneyAmount),\n loanAmountFor80LTV: optionFromUndefined(NonNegativeInteger),\n maxClientAge: optionFromUndefined(NonNegativeInteger),\n standardFees: Fees,\n tenorLimitsYears: TenorLimits,\n offerId: optionFromUndefined(UUID),\n errors: CalculateErrors,\n showCPI: t.boolean,\n discountParametersList: t.array(DiscountParameters),\n interestRateDiscount: optionFromUndefined(PercentageLikeFromNumber),\n totalFeesDiscount: optionFromUndefined(MoneyAmount),\n },\n \"OfferPackage\"\n);\n\nexport type OfferPackage = t.TypeOf;\n\nexport type DetailRecord = t.TypeOf;\nexport const DetailRecord = t.type({\n name: t.string,\n mktValue: t.number,\n mngValue: t.number,\n isEditable: t.boolean,\n isManagement: optionFromUndefined(t.boolean),\n isMarketing: optionFromUndefined(t.boolean),\n reasonOfDiscount: optionFromUndefined(t.string),\n mktPercent: optionFromUndefined(t.number),\n mngPercent: optionFromUndefined(t.number),\n comment: optionFromUndefined(t.string),\n});\n\nexport const DiscountDetails = t.type(\n {\n details: t.array(DetailRecord),\n },\n \"DiscountDetails\"\n);\n\nexport const Offer = t.intersection(\n [\n t.type(\n {\n greenMortgage: optionFromUndefined(t.boolean),\n nonSpecifiedProperty: optionFromUndefined(t.boolean),\n loanType: LoanType,\n loanPurposeLabel: RuntimeLocaleKey,\n fixationPeriod: PositiveInteger,\n interestRate: PercentageLikeFromNumber,\n interestRateDiscount: optionFromUndefined(PercentageLikeFromNumber),\n totalFeesDiscount: optionFromUndefined(MoneyAmount),\n loanAmount: MoneyAmount,\n monthlyInstallment: MoneyAmount,\n duration: NonNegativeInteger,\n aprPercentage: PercentageLikeFromNumber,\n totalPaidAmount: MoneyAmount,\n collateralTypeLabel: RuntimeLocaleKey,\n estimatedPropertyValue: MoneyAmount,\n loanToValue: PercentageLikeFromNumber,\n tenorValue: NonNegativeInteger,\n tenorType: TenorType,\n discountDetails: DiscountDetails,\n },\n \"Offer\"\n ),\n Fees,\n t.union(\n [\n t.type(\n {\n selectedPackage: CpiType,\n insuranceFee: MoneyAmount,\n insuredClientName: LocalizedString,\n discountOnIR: PercentageLikeFromNumber,\n },\n \"CPI\"\n ),\n t.type(\n {\n selectedPackage: CpiTypeNone,\n },\n \"NoCPI\"\n ),\n ],\n \"OfferCPI\"\n ),\n ],\n \"Offer\"\n);\n\nexport type Offer = t.TypeOf;\n\nconst InputParameterListCode = t.keyof(\n {\n loanPurpose: true,\n collateralType: true,\n CPIPackage: true,\n dayOfInstallment: true,\n greenMortgage: true,\n reasonsOfDiscount: true,\n },\n \"InputParameterListCode\"\n);\nexport type InputParameterListCode = t.TypeOf;\n\nconst InputParameterNumberCode = t.keyof(\n {\n customAppraisalFee: true,\n estimatedPropertyValue: true,\n clientsAge: true,\n tenor: true,\n customProcessingFee: true,\n loanAmount: true,\n nonPurposeAmount: true,\n purposeLoanAmount: true,\n discountOnInterestRate: true,\n },\n \"InputParameterNumberCode\"\n);\nexport type InputParameterNumberCode = t.TypeOf<\n typeof InputParameterNumberCode\n>;\n\nconst InputParameterCode = t.union(\n [InputParameterListCode, InputParameterNumberCode],\n \"InputParameterCode\"\n);\nexport type InputParameterCode = t.TypeOf;\n\nconst InputParameterTypeNumber = t.literal(\"NUMBER\");\nconst InputParameterTypeText = t.literal(\"TEXT\");\nconst InputParameterTypeList = t.literal(\"LIST\");\n\nexport const InputParameterType = t.union(\n [InputParameterTypeNumber, InputParameterTypeText, InputParameterTypeList],\n \"InputParameterType\"\n);\nexport type InputParameterType = t.TypeOf;\n\nconst InputParameterOptions = nonEmptyArray(\n t.type(\n {\n code: NonEmptyString,\n label: RuntimeLocaleKey,\n },\n \"Option\"\n ),\n \"InputParameterOptions\"\n);\nexport type InputParameterOptions = t.TypeOf;\n\nexport const InputParameterNumber = t.type(\n {\n type: InputParameterTypeNumber,\n code: InputParameterNumberCode,\n defaultValue: NonNegative,\n numberOfDecimals: NonNegativeInteger,\n },\n \"Number\"\n);\nexport type InputParameterNumber = t.TypeOf;\n\nconst InputParameterText = t.type(\n {\n type: InputParameterTypeText,\n code: InputParameterCode,\n defaultValue: NonEmptyString,\n },\n \"Text\"\n);\nexport type InputParameterText = t.TypeOf;\n\nconst InputParameterList = t.type(\n {\n type: InputParameterTypeList,\n code: InputParameterListCode,\n defaultValue: NonEmptyString,\n options: InputParameterOptions,\n },\n \"InputParameterList\"\n);\nexport type InputParameterList = t.TypeOf;\n\nconst InputParameter = t.union(\n [InputParameterNumber, InputParameterText, InputParameterList],\n \"InputParameter\"\n);\nexport type InputParameter = t.TypeOf;\n\nexport const InputParameters = nonEmptyArray(InputParameter, \"InputParameters\");\nexport type InputParameters = t.TypeOf;\n\nexport const ModifiedParameterCode = t.keyof(\n { loanAmount: true, loanPurpose: true },\n \"ModifiedParameterCode\"\n);\nexport type ModifiedParameterCode = t.TypeOf;\n\nexport const ModifiedParameter = t.type({\n parameter: ModifiedParameterCode,\n oldValue: t.string,\n});\nexport type ModifiedParameter = t.TypeOf;\n\nexport const ModifiedParameters = nonEmptyArray(\n ModifiedParameter,\n \"ModifiedParameters\"\n);\nexport type ModifiedParameters = t.TypeOf;\n\nexport type CPIPackage = t.TypeOf;\nexport const CPIPackage = t.type({\n available: t.boolean,\n cpiFeatures: nonEmptyArray(CPIFeature),\n insuranceFee: MoneyAmount,\n type: CpiType,\n});\n\nexport const CalculateOfferResponse = t.type({\n loanParameters: LoanParameters,\n offerPackage: OfferPackage,\n inputParameters: optionFromUndefined(InputParameters),\n modifiedParameters: optionFromUndefined(ModifiedParameters),\n});\n\nexport type CalculateOfferResponse = t.TypeOf;\n\nexport type InterestRate = t.TypeOf;\nexport const InterestRate = t.type({\n discIRManagement: t.number,\n discIRMarketing: t.number,\n editable: t.boolean,\n});\n\nexport type ProcessingFee = t.TypeOf;\nexport const ProcessingFee = t.type({\n processingFeeMNGDiscountValue: t.number,\n processingFeeMKTDiscountValue: t.number,\n editable: t.boolean,\n});\n\nexport type GreenMortgage = t.TypeOf;\nexport const GreenMortgage = t.type({\n greenMNGDiscount: t.number,\n greenMTGDiscount: t.number,\n editable: t.boolean,\n});\n\nexport type AppraisalFee = t.TypeOf;\nexport const AppraisalFee = t.type({\n appraisalFeeMNGDiscountValue: t.number,\n appraisalFeeMKTDiscountValue: t.number,\n editable: t.boolean,\n});\n\nexport type CPIDiscountOnProcessingFee = t.TypeOf<\n typeof CPIDiscountOnProcessingFee\n>;\nexport const CPIDiscountOnProcessingFee = t.type({\n CPIProcessingFeeMNGDiscountValue: t.number,\n CPIProcessingFeeDiscountValue: t.number,\n editable: t.boolean,\n});\n\nexport type RefinancingDiscountOnProcessingFee = t.TypeOf<\n typeof RefinancingDiscountOnProcessingFee\n>;\nexport const RefinancingDiscountOnProcessingFee = t.type({\n refinancingProcessingFeeMNGDiscountValue: t.number,\n refinancingProcessingFeeDiscountValue: t.number,\n editable: t.boolean,\n});\n\nexport type AppraisalBenefit = t.TypeOf;\nexport const AppraisalBenefit = t.type({\n appraisalBenefitMNG: t.number,\n appraisalBenefit: t.number,\n editable: t.boolean,\n});\n\nconst SimpleRefinancingStatusYES = t.literal(\"YES\");\nconst SimpleRefinancingStatusNO = t.literal(\"NO\");\nconst SimpleRefinancingStatusNOT_KNOWN = t.literal(\"NOT_KNOWN\");\n\nexport const SimpleRefinancingStatus = t.union(\n [\n SimpleRefinancingStatusYES,\n SimpleRefinancingStatusNO,\n SimpleRefinancingStatusNOT_KNOWN,\n ],\n \"SimpleRefinancingStatus\"\n);\nexport type SimpleRefinancingStatus = t.TypeOf;\n","import * as t from \"io-ts\";\nimport { Eq } from \"fp-ts/Eq\";\nimport { eq, option } from \"fp-ts\";\nimport { NonEmptyString } from \"io-ts-types/lib/NonEmptyString\";\nimport { apiCall } from \"../APICall\";\nimport { optionFromUndefined } from \"../globalDomain\";\nimport { UUID } from \"io-ts-types/lib/UUID\";\n\nconst LoginInput = t.type(\n {\n username: t.string,\n password: t.string,\n anonymousToken: optionFromUndefined(NonEmptyString),\n },\n \"LoginInput\"\n);\ninterface LoginInput extends t.TypeOf {}\nconst eqLoginInput: Eq = eq.getStructEq({\n username: eq.eqString,\n password: eq.eqString,\n anonymousToken: option.getEq(eq.eqString),\n});\nexport const LoginOutput = t.type(\n { token: NonEmptyString, refreshToken: NonEmptyString, flowId: UUID },\n \"LoginOutput\"\n);\nexport interface LoginOutput extends t.TypeOf {}\nconst LoginAPIError = t.type({\n id: t.literal(\"Unauthorized\"),\n});\nexport interface LoginAPIError extends t.TypeOf {}\n\nexport const login = apiCall({\n inputEq: eqLoginInput,\n path: [\"authorization\", \"banker\", \"token\"],\n inputCodec: LoginInput,\n outputCodec: LoginOutput,\n errorCodec: LoginAPIError,\n});\n","import * as t from \"io-ts\";\nimport { MoneyAmount, optionFromUndefined } from \"../../globalDomain\";\nimport { LoanType, LoanTypeCombined, LoanTypeCommon } from \"../Offer/domain\";\nimport { UUID } from \"io-ts-types/lib/UUID\";\nimport { RuntimeLocaleKey } from \"../../intl\";\nimport { CreditType } from \"../domain\";\n\nexport const FormVisibility = t.keyof({\n None: true,\n NotApplicable: true,\n});\nexport type FormVisibility = t.TypeOf;\n\nexport type FormSummaryState = {\n amountOfLoan: { [key: number]: number };\n amountOfNonOwnFunds: { [key: number]: number };\n amountOfOwnFunds: { [key: number]: number };\n};\n\nexport const LoanPurposeOptionsSK = t.keyof({\n CONSTRUCTION: true,\n PURCHASE: true,\n PURCHASE_FROM_DEVELOPER_PROJECT: true,\n RECONSTRUCTION: true,\n REIMBURSEMENT_OF_OWN_FUNDS: true,\n SETTLEMENT_OF_CO_OWNERSHIP: true,\n});\nexport type LoanPurposeOptionsSK = t.TypeOf;\n\nexport const LoanPurposeOptionsCZ = t.union([\n t.keyof({\n PAYMENT_OF_COOPERATIVE_SHARE: true,\n }),\n LoanPurposeOptionsSK,\n]);\n\nexport type LoanPurposeOptionsCZ = t.TypeOf;\n\nexport const LoanPurposeOptions = t.union([\n LoanPurposeOptionsCZ,\n LoanPurposeOptionsSK,\n]);\nexport type LoanPurposeOptions = t.TypeOf;\n\nexport const LoanPurpose = t.keyof({\n CONSTRUCTION: true,\n NON_PURPOSE: true,\n PAYMENT_OF_COOPERATIVE_SHARE: true,\n PURCHASE: true,\n PURCHASE_FROM_DEVELOPER_PROJECT: true,\n RECONSTRUCTION: true,\n REFINANCING_OF_LOANS: true,\n REIMBURSEMENT_OF_OWN_FUNDS: true,\n SETTLEMENT_OF_CO_OWNERSHIP: true,\n});\n\nexport type LoanPurpose = t.TypeOf;\n\nexport const PropertyPledgedMap = t.record(t.string, t.boolean);\nexport type PropertyPledgedMap = t.TypeOf;\n\nexport const PurposeAndFinancingInitialInfo = t.intersection([\n t.type({\n allowOtherPurposes: t.boolean,\n loanAmount: MoneyAmount,\n loanPurpose: LoanPurpose,\n loanPurposeLabel: RuntimeLocaleKey,\n propertyPledgedMap: PropertyPledgedMap,\n }),\n t.union([\n t.type({\n loanType: LoanTypeCommon,\n }),\n t.type({\n loanType: LoanTypeCombined,\n nonPurposeAmount: MoneyAmount,\n purposeAmount: MoneyAmount,\n }),\n ]),\n]);\n\nexport type PurposeAndFinancingInitialInfo = t.TypeOf<\n typeof PurposeAndFinancingInitialInfo\n>;\n\nexport const DisbursementCZ = t.keyof({\n DepositAccountWithARealEstateAgency: true,\n EscrowAccount: true,\n LawyerCustody: true,\n NotaryCustody: true,\n WithoutCustody: true,\n None: true,\n NotApplicable: true,\n});\n\nexport const DisbursementSK = t.keyof({\n DirectlyAccordingToThePurpose: true,\n EscrowAccount: true,\n NotaryCustody: true,\n None: true,\n NotApplicable: true,\n});\n\nexport const Disbursement = t.union([DisbursementCZ, DisbursementSK]);\n\nexport type Disbursement = t.TypeOf;\n\nexport const DisbursementBasedOnRegisteredPledge = t.keyof({\n AlreadyRegisteredPledge: true,\n ProposalForRegistrationOfPledge: true,\n});\nexport type DisbursementBasedOnRegisteredPledge = t.TypeOf<\n typeof DisbursementBasedOnRegisteredPledge\n>;\n\nexport const YesNo = t.keyof({\n No: true,\n Yes: true,\n});\nexport type YesNo = t.TypeOf;\n\nexport const PurposeOfOriginalInvestment = t.keyof({\n ConstructionOrReconstruction: true,\n Purchase: true,\n});\nexport type PurposeOfOriginalInvestment = t.TypeOf<\n typeof PurposeOfOriginalInvestment\n>;\n\nexport const StateOfRegisteredPledge = t.keyof({\n AlreadyRegisteredPledge: true,\n ProposalForRegistrationOfPledge: true,\n});\nexport type StateOfRegisteredPledge = t.TypeOf;\n\nexport const TypeOfAcquiringOfRentalRights = t.keyof({\n AnotherCooperativeShareBuy: true,\n ObtainingTheRightToLease: true,\n});\nexport type TypeOfAcquiringOfRentalRights = t.TypeOf<\n typeof TypeOfAcquiringOfRentalRights\n>;\n\nexport const TypeOfSettlementSK = t.keyof({\n SettlementOfInheritanceClaimsOnTheProperty: true,\n SettlementOfPropertyClaims: true,\n});\nexport type TypeOfSettlementSK = t.TypeOf;\n\nexport const TypeOfSettlementCZ = t.keyof({\n SettlementOfCoOwnershipClaims: true,\n SettlementOfInheritanceClaimsOnTheProperty: true,\n SettlementOfPropertyClaims: true,\n});\nexport type TypeOfSettlementCZ = t.TypeOf;\n\nexport const TypeOfSettlement = t.union([\n TypeOfSettlementCZ,\n TypeOfSettlementSK,\n]);\nexport type TypeOfSettlement = t.TypeOf;\n\nexport const AdditionalInfoBase = t.type({\n disbursement: optionFromUndefined(t.union([Disbursement, FormVisibility])),\n disbursementBasedOnRegisteredPledge: optionFromUndefined(\n t.union([DisbursementBasedOnRegisteredPledge, FormVisibility])\n ),\n isOwnershipFromHousingType: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n previousClientsAreCurrentBorrowers: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n propertyOwner: optionFromUndefined(t.union([YesNo, FormVisibility])),\n purposeOfOriginalInvestment: optionFromUndefined(\n t.union([PurposeOfOriginalInvestment, FormVisibility])\n ),\n stateOfRegisteredPledge: optionFromUndefined(\n t.union([StateOfRegisteredPledge, FormVisibility])\n ),\n typeOfAcquiringOfRentalRights: optionFromUndefined(\n t.union([TypeOfAcquiringOfRentalRights, FormVisibility])\n ),\n typeOfSettlement: optionFromUndefined(\n t.union([TypeOfSettlement, FormVisibility])\n ),\n});\nexport type AdditionalInfoBase = t.TypeOf;\n\nexport const AdditionalInfo = t.type({\n disbursement_0: optionFromUndefined(t.union([Disbursement, FormVisibility])),\n disbursementBasedOnRegisteredPledge_0: optionFromUndefined(\n t.union([DisbursementBasedOnRegisteredPledge, FormVisibility])\n ),\n isOwnershipFromHousingType_0: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n previousClientsAreCurrentBorrowers_0: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n propertyOwner_0: optionFromUndefined(t.union([YesNo, FormVisibility])),\n purposeOfOriginalInvestment_0: optionFromUndefined(\n t.union([PurposeOfOriginalInvestment, FormVisibility])\n ),\n stateOfRegisteredPledge_0: optionFromUndefined(\n t.union([StateOfRegisteredPledge, FormVisibility])\n ),\n typeOfAcquiringOfRentalRights_0: optionFromUndefined(\n t.union([TypeOfAcquiringOfRentalRights, FormVisibility])\n ),\n typeOfSettlement_0: optionFromUndefined(\n t.union([TypeOfSettlement, FormVisibility])\n ),\n\n disbursement_1: optionFromUndefined(t.union([Disbursement, FormVisibility])),\n disbursementBasedOnRegisteredPledge_1: optionFromUndefined(\n t.union([DisbursementBasedOnRegisteredPledge, FormVisibility])\n ),\n isOwnershipFromHousingType_1: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n previousClientsAreCurrentBorrowers_1: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n propertyOwner_1: optionFromUndefined(t.union([YesNo, FormVisibility])),\n purposeOfOriginalInvestment_1: optionFromUndefined(\n t.union([PurposeOfOriginalInvestment, FormVisibility])\n ),\n stateOfRegisteredPledge_1: optionFromUndefined(\n t.union([StateOfRegisteredPledge, FormVisibility])\n ),\n typeOfAcquiringOfRentalRights_1: optionFromUndefined(\n t.union([TypeOfAcquiringOfRentalRights, FormVisibility])\n ),\n typeOfSettlement_1: optionFromUndefined(\n t.union([TypeOfSettlement, FormVisibility])\n ),\n\n disbursement_2: optionFromUndefined(t.union([Disbursement, FormVisibility])),\n disbursementBasedOnRegisteredPledge_2: optionFromUndefined(\n t.union([DisbursementBasedOnRegisteredPledge, FormVisibility])\n ),\n isOwnershipFromHousingType_2: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n previousClientsAreCurrentBorrowers_2: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n propertyOwner_2: optionFromUndefined(t.union([YesNo, FormVisibility])),\n purposeOfOriginalInvestment_2: optionFromUndefined(\n t.union([PurposeOfOriginalInvestment, FormVisibility])\n ),\n stateOfRegisteredPledge_2: optionFromUndefined(\n t.union([StateOfRegisteredPledge, FormVisibility])\n ),\n typeOfAcquiringOfRentalRights_2: optionFromUndefined(\n t.union([TypeOfAcquiringOfRentalRights, FormVisibility])\n ),\n typeOfSettlement_2: optionFromUndefined(\n t.union([TypeOfSettlement, FormVisibility])\n ),\n\n disbursement_3: optionFromUndefined(t.union([Disbursement, FormVisibility])),\n disbursementBasedOnRegisteredPledge_3: optionFromUndefined(\n t.union([DisbursementBasedOnRegisteredPledge, FormVisibility])\n ),\n isOwnershipFromHousingType_3: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n previousClientsAreCurrentBorrowers_3: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n propertyOwner_3: optionFromUndefined(t.union([YesNo, FormVisibility])),\n purposeOfOriginalInvestment_3: optionFromUndefined(\n t.union([PurposeOfOriginalInvestment, FormVisibility])\n ),\n stateOfRegisteredPledge_3: optionFromUndefined(\n t.union([StateOfRegisteredPledge, FormVisibility])\n ),\n typeOfAcquiringOfRentalRights_3: optionFromUndefined(\n t.union([TypeOfAcquiringOfRentalRights, FormVisibility])\n ),\n typeOfSettlement_3: optionFromUndefined(\n t.union([TypeOfSettlement, FormVisibility])\n ),\n\n disbursement_4: optionFromUndefined(t.union([Disbursement, FormVisibility])),\n disbursementBasedOnRegisteredPledge_4: optionFromUndefined(\n t.union([DisbursementBasedOnRegisteredPledge, FormVisibility])\n ),\n isOwnershipFromHousingType_4: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n previousClientsAreCurrentBorrowers_4: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n propertyOwner_4: optionFromUndefined(t.union([YesNo, FormVisibility])),\n purposeOfOriginalInvestment_4: optionFromUndefined(\n t.union([PurposeOfOriginalInvestment, FormVisibility])\n ),\n stateOfRegisteredPledge_4: optionFromUndefined(\n t.union([StateOfRegisteredPledge, FormVisibility])\n ),\n typeOfAcquiringOfRentalRights_4: optionFromUndefined(\n t.union([TypeOfAcquiringOfRentalRights, FormVisibility])\n ),\n typeOfSettlement_4: optionFromUndefined(\n t.union([TypeOfSettlement, FormVisibility])\n ),\n\n disbursement_5: optionFromUndefined(t.union([Disbursement, FormVisibility])),\n disbursementBasedOnRegisteredPledge_5: optionFromUndefined(\n t.union([DisbursementBasedOnRegisteredPledge, FormVisibility])\n ),\n isOwnershipFromHousingType_5: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n previousClientsAreCurrentBorrowers_5: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n propertyOwner_5: optionFromUndefined(t.union([YesNo, FormVisibility])),\n purposeOfOriginalInvestment_5: optionFromUndefined(\n t.union([PurposeOfOriginalInvestment, FormVisibility])\n ),\n stateOfRegisteredPledge_5: optionFromUndefined(\n t.union([StateOfRegisteredPledge, FormVisibility])\n ),\n typeOfAcquiringOfRentalRights_5: optionFromUndefined(\n t.union([TypeOfAcquiringOfRentalRights, FormVisibility])\n ),\n typeOfSettlement_5: optionFromUndefined(\n t.union([TypeOfSettlement, FormVisibility])\n ),\n\n disbursement_6: optionFromUndefined(t.union([Disbursement, FormVisibility])),\n disbursementBasedOnRegisteredPledge_6: optionFromUndefined(\n t.union([DisbursementBasedOnRegisteredPledge, FormVisibility])\n ),\n isOwnershipFromHousingType_6: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n previousClientsAreCurrentBorrowers_6: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n propertyOwner_6: optionFromUndefined(t.union([YesNo, FormVisibility])),\n purposeOfOriginalInvestment_6: optionFromUndefined(\n t.union([PurposeOfOriginalInvestment, FormVisibility])\n ),\n stateOfRegisteredPledge_6: optionFromUndefined(\n t.union([StateOfRegisteredPledge, FormVisibility])\n ),\n typeOfAcquiringOfRentalRights_6: optionFromUndefined(\n t.union([TypeOfAcquiringOfRentalRights, FormVisibility])\n ),\n typeOfSettlement_6: optionFromUndefined(\n t.union([TypeOfSettlement, FormVisibility])\n ),\n\n disbursement_7: optionFromUndefined(t.union([Disbursement, FormVisibility])),\n disbursementBasedOnRegisteredPledge_7: optionFromUndefined(\n t.union([DisbursementBasedOnRegisteredPledge, FormVisibility])\n ),\n isOwnershipFromHousingType_7: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n previousClientsAreCurrentBorrowers_7: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n propertyOwner_7: optionFromUndefined(t.union([YesNo, FormVisibility])),\n purposeOfOriginalInvestment_7: optionFromUndefined(\n t.union([PurposeOfOriginalInvestment, FormVisibility])\n ),\n stateOfRegisteredPledge_7: optionFromUndefined(\n t.union([StateOfRegisteredPledge, FormVisibility])\n ),\n typeOfAcquiringOfRentalRights_7: optionFromUndefined(\n t.union([TypeOfAcquiringOfRentalRights, FormVisibility])\n ),\n typeOfSettlement_7: optionFromUndefined(\n t.union([TypeOfSettlement, FormVisibility])\n ),\n\n disbursement_8: optionFromUndefined(t.union([Disbursement, FormVisibility])),\n disbursementBasedOnRegisteredPledge_8: optionFromUndefined(\n t.union([DisbursementBasedOnRegisteredPledge, FormVisibility])\n ),\n isOwnershipFromHousingType_8: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n previousClientsAreCurrentBorrowers_8: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n propertyOwner_8: optionFromUndefined(t.union([YesNo, FormVisibility])),\n purposeOfOriginalInvestment_8: optionFromUndefined(\n t.union([PurposeOfOriginalInvestment, FormVisibility])\n ),\n stateOfRegisteredPledge_8: optionFromUndefined(\n t.union([StateOfRegisteredPledge, FormVisibility])\n ),\n typeOfAcquiringOfRentalRights_8: optionFromUndefined(\n t.union([TypeOfAcquiringOfRentalRights, FormVisibility])\n ),\n typeOfSettlement_8: optionFromUndefined(\n t.union([TypeOfSettlement, FormVisibility])\n ),\n\n disbursement_9: optionFromUndefined(t.union([Disbursement, FormVisibility])),\n disbursementBasedOnRegisteredPledge_9: optionFromUndefined(\n t.union([DisbursementBasedOnRegisteredPledge, FormVisibility])\n ),\n isOwnershipFromHousingType_9: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n previousClientsAreCurrentBorrowers_9: optionFromUndefined(\n t.union([YesNo, FormVisibility])\n ),\n propertyOwner_9: optionFromUndefined(t.union([YesNo, FormVisibility])),\n purposeOfOriginalInvestment_9: optionFromUndefined(\n t.union([PurposeOfOriginalInvestment, FormVisibility])\n ),\n stateOfRegisteredPledge_9: optionFromUndefined(\n t.union([StateOfRegisteredPledge, FormVisibility])\n ),\n typeOfAcquiringOfRentalRights_9: optionFromUndefined(\n t.union([TypeOfAcquiringOfRentalRights, FormVisibility])\n ),\n typeOfSettlement_9: optionFromUndefined(\n t.union([TypeOfSettlement, FormVisibility])\n ),\n});\nexport type AdditionalInfo = t.TypeOf;\n\nexport const PurposeAndFinancingFormStateBase = t.type({\n loanPurpose_0: optionFromUndefined(LoanPurpose),\n amountOfLoan_0: optionFromUndefined(t.number),\n amountOfOwnFunds_0: optionFromUndefined(t.number),\n amountOfNonOwnFunds_0: optionFromUndefined(t.number),\n financedProperty_0: optionFromUndefined(t.string),\n\n loanPurpose_1: optionFromUndefined(LoanPurpose),\n amountOfLoan_1: optionFromUndefined(t.number),\n amountOfOwnFunds_1: optionFromUndefined(t.number),\n amountOfNonOwnFunds_1: optionFromUndefined(t.number),\n financedProperty_1: optionFromUndefined(t.string),\n\n loanPurpose_2: optionFromUndefined(LoanPurpose),\n amountOfLoan_2: optionFromUndefined(t.number),\n amountOfOwnFunds_2: optionFromUndefined(t.number),\n amountOfNonOwnFunds_2: optionFromUndefined(t.number),\n financedProperty_2: optionFromUndefined(t.string),\n\n loanPurpose_3: optionFromUndefined(LoanPurpose),\n amountOfLoan_3: optionFromUndefined(t.number),\n amountOfOwnFunds_3: optionFromUndefined(t.number),\n amountOfNonOwnFunds_3: optionFromUndefined(t.number),\n financedProperty_3: optionFromUndefined(t.string),\n\n loanPurpose_4: optionFromUndefined(LoanPurpose),\n amountOfLoan_4: optionFromUndefined(t.number),\n amountOfOwnFunds_4: optionFromUndefined(t.number),\n amountOfNonOwnFunds_4: optionFromUndefined(t.number),\n financedProperty_4: optionFromUndefined(t.string),\n\n loanPurpose_5: optionFromUndefined(LoanPurpose),\n amountOfLoan_5: optionFromUndefined(t.number),\n amountOfOwnFunds_5: optionFromUndefined(t.number),\n amountOfNonOwnFunds_5: optionFromUndefined(t.number),\n financedProperty_5: optionFromUndefined(t.string),\n\n loanPurpose_6: optionFromUndefined(LoanPurpose),\n amountOfLoan_6: optionFromUndefined(t.number),\n amountOfOwnFunds_6: optionFromUndefined(t.number),\n amountOfNonOwnFunds_6: optionFromUndefined(t.number),\n financedProperty_6: optionFromUndefined(t.string),\n\n loanPurpose_7: optionFromUndefined(LoanPurpose),\n amountOfLoan_7: optionFromUndefined(t.number),\n amountOfOwnFunds_7: optionFromUndefined(t.number),\n amountOfNonOwnFunds_7: optionFromUndefined(t.number),\n financedProperty_7: optionFromUndefined(t.string),\n\n loanPurpose_8: optionFromUndefined(LoanPurpose),\n amountOfLoan_8: optionFromUndefined(t.number),\n amountOfOwnFunds_8: optionFromUndefined(t.number),\n amountOfNonOwnFunds_8: optionFromUndefined(t.number),\n financedProperty_8: optionFromUndefined(t.string),\n\n loanPurpose_9: optionFromUndefined(LoanPurpose),\n amountOfLoan_9: optionFromUndefined(t.number),\n amountOfOwnFunds_9: optionFromUndefined(t.number),\n amountOfNonOwnFunds_9: optionFromUndefined(t.number),\n financedProperty_9: optionFromUndefined(t.string),\n});\n\nexport const PurposeAndFinancingFormState = t.intersection([\n PurposeAndFinancingFormStateBase,\n AdditionalInfo,\n]);\nexport type PurposeAndFinancingFormState = t.TypeOf<\n typeof PurposeAndFinancingFormState\n>;\n\nexport const Financing = t.type({\n amountOfLoan: optionFromUndefined(MoneyAmount),\n amountOfNonOwnFunds: optionFromUndefined(MoneyAmount),\n amountOfOwnFunds: optionFromUndefined(MoneyAmount),\n});\nexport type Financing = t.TypeOf;\n\nexport const Purpose = t.type({\n additionalInfo: optionFromUndefined(AdditionalInfoBase),\n currentBalance: optionFromUndefined(MoneyAmount),\n financedProperty: optionFromUndefined(t.string),\n financing: Financing,\n isFinancedPropertySameAsPledged: t.boolean,\n isPropertiesDefined: t.boolean,\n loanPurpose: LoanPurpose,\n loanType: LoanType,\n mainPurpose: t.boolean,\n predefinedPurpose: t.boolean,\n provider: optionFromUndefined(t.string),\n purposeId: optionFromUndefined(UUID),\n creditType: optionFromUndefined(CreditType),\n errorSave: t.boolean,\n errorDelete: t.boolean,\n completed: t.boolean,\n});\nexport type Purpose = t.TypeOf;\n\nexport const SavePurposeInput = t.intersection([\n t.type({\n purposeId: optionFromUndefined(UUID),\n loanPurpose: LoanPurpose,\n amountOfLoan: MoneyAmount,\n amountOfNonOwnFunds: optionFromUndefined(MoneyAmount),\n amountOfOwnFunds: optionFromUndefined(MoneyAmount),\n financedProperty: optionFromUndefined(t.string),\n }),\n AdditionalInfoBase,\n]);\nexport type SavePurposeInput = t.TypeOf;\n\nexport const SavePurposeInputArray = t.type({\n purposes: t.array(SavePurposeInput),\n});\nexport type SavePurposeInputArray = t.TypeOf;\n\nexport const IndexAmountMap = t.record(t.number, t.number);\nexport type IndexAmountMap = t.TypeOf;\n\nexport const IndexStateOfRegisteredPledgeMap = t.record(\n t.number,\n t.union([StateOfRegisteredPledge, FormVisibility])\n);\nexport type IndexStateOfRegisteredPledgeMap = t.TypeOf<\n typeof IndexStateOfRegisteredPledgeMap\n>;\n\nexport const IndexYesNoMap = t.record(\n t.number,\n t.union([YesNo, FormVisibility])\n);\nexport type IndexYesNoMap = t.TypeOf;\n\nexport const IndexStringMap = t.record(\n t.number,\n t.union([t.string, FormVisibility])\n);\nexport type IndexStringMap = t.TypeOf;\n\nexport const IndexDisbursementMap = t.record(\n t.number,\n t.union([Disbursement, FormVisibility])\n);\nexport type IndexDisbursementMap = t.TypeOf;\n\nexport const IndexPurposeOfOriginalInvestmentMap = t.record(\n t.number,\n t.union([PurposeOfOriginalInvestment, FormVisibility])\n);\nexport type IndexPurposeOfOriginalInvestmentMap = t.TypeOf<\n typeof IndexPurposeOfOriginalInvestmentMap\n>;\n\nexport const IndexTypeOfAcquiringOfRentalRightsMap = t.record(\n t.number,\n t.union([TypeOfAcquiringOfRentalRights, FormVisibility])\n);\nexport type IndexTypeOfAcquiringOfRentalRightsMap = t.TypeOf<\n typeof IndexTypeOfAcquiringOfRentalRightsMap\n>;\n\nexport const IndexDisbursementBasedOnRegisteredPledgeMap = t.record(\n t.number,\n t.union([DisbursementBasedOnRegisteredPledge, FormVisibility])\n);\nexport type IndexDisbursementBasedOnRegisteredPledgeMap = t.TypeOf<\n typeof IndexDisbursementBasedOnRegisteredPledgeMap\n>;\n\nexport const IndexTypeOfSettlementMap = t.record(\n t.number,\n t.union([TypeOfSettlement, FormVisibility])\n);\nexport type IndexTypeOfSettlementMap = t.TypeOf<\n typeof IndexTypeOfSettlementMap\n>;\n\nexport const PurposeOverview = t.type({\n amountOfLoan: MoneyAmount,\n amountOfOwnFunds: MoneyAmount,\n amountOfNonOwnFunds: MoneyAmount,\n totalSum: MoneyAmount,\n amountFromOffer: MoneyAmount,\n sameAmount: t.boolean,\n});\n\nexport type PurposeOverview = t.TypeOf;\nexport type FormVariant = \"Predefined\" | \"Additional\";\n","import { useAuthenticationContext, Children } from \"design-system\";\nimport { option } from \"fp-ts\";\nimport { Option } from \"fp-ts/Option\";\nimport { constant, pipe } from \"fp-ts/function\";\n\nimport { IdleGuard } from \"../Common/IdleGuard/IdleGuard\";\nimport { IdleWarningDialog } from \"./IdleWarningDialog\";\n\ntype Props = {\n children: Children;\n logoutHandler: Option<() => void>;\n};\n\nexport function IdleLogout(props: Props) {\n const DEFAULT_MIN_BEFORE_IDLE = 15;\n const DEFAULT_MIN_WARN_DURATION = 2;\n\n const { logout } = useAuthenticationContext();\n\n const logoutHandler = pipe(\n props.logoutHandler,\n option.getOrElse(constant(logout))\n );\n\n return (\n (\n \n )}\n >\n {props.children}\n \n );\n}\n","import { Login } from \"./Login\";\nimport { LoginLandingWrapper } from \"./LoginLandingWrapper\";\nimport { ComponentProps, useState } from \"react\";\nimport { LocalizedString, Snackbar, Space } from \"design-system\";\nimport { Option } from \"fp-ts/Option\";\nimport { constant, constFalse, constTrue, pipe } from \"fp-ts/function\";\nimport { option } from \"fp-ts\";\n\nimport { PortalStatusAlert } from \"../Common/PortalStatusAlert/PortalStatusAlert\";\nimport { usePortalStatusContext } from \"../PortalStatusContext\";\nimport { foldPortalStatus } from \"../globalDomain\";\n\ntype Props = ComponentProps & {\n successMessage: Option;\n};\n\nexport function LoginLanding(props: Props) {\n const [displaySnackbar, setDisplaySnackbar] = useState(true);\n const { portalStatus } = usePortalStatusContext();\n\n const disabled = foldPortalStatus(portalStatus, {\n onInitial: constFalse,\n onNone: constFalse,\n onActive: constTrue,\n onScheduled: constFalse,\n });\n\n return (\n \n {foldPortalStatus(portalStatus, {\n onInitial: () => ,\n onNone: () => ,\n onActive: () => (\n <>\n \n \n \n ),\n onScheduled: () => (\n <>\n \n \n \n ),\n })}\n\n \n {pipe(\n props.successMessage,\n option.filter(constant(displaySnackbar)),\n option.map(message => (\n setDisplaySnackbar(false)}\n />\n )),\n option.toNullable\n )}\n \n );\n}\n","import { Body, buttonLink, link } from \"design-system\";\nimport { useFormatMessage } from \"../intl\";\nimport { useAppContext } from \"../useAppContext\";\n\ntype Props = {\n onClick?: () => unknown;\n};\n\nexport function ForgotPasswordLink(props: Props) {\n const formatMessage = useFormatMessage();\n const {\n config: { settingsPageURL },\n } = useAppContext();\n return (\n \n {[\n formatMessage(\"Login.forgotPasswordText\"),\n props.onClick\n ? buttonLink(props.onClick, formatMessage(\"Login.forgotPasswordLink\"))\n : link(settingsPageURL, formatMessage(\"Login.forgotPasswordLink\")),\n ]}\n \n );\n}\n","import { option } from \"fp-ts\";\nimport { useFormatMessage } from \"../intl\";\nimport { ClockIcon, Dialog } from \"design-system\";\n\ntype Props = {\n remainingTime: number;\n logout: () => void;\n dismiss: () => void;\n};\n\nexport function IdleWarningDialog(props: Props) {\n const formatMessage = useFormatMessage();\n return (\n \n );\n}\n","import { LocaleKey, useFormatMessage } from \"../intl\";\nimport {\n AverageIncomingPaymentsId,\n Industry,\n KYCVariant,\n PaymentDestination,\n PaymentDestination2,\n SourceOfFundsId,\n SourceOfIncomeId,\n TransactionType,\n} from \"./domain\";\nimport { Option } from \"fp-ts/Option\";\nimport { pipe } from \"fp-ts/function\";\nimport { option } from \"fp-ts\";\n\nexport function useFormatIndustry() {\n const formatMessage = useFormatMessage();\n return (industry: Industry) =>\n formatMessage(`KYC.Income.Industry.${industry}` as LocaleKey);\n}\n\nexport function useFormatPaymentDestination() {\n const formatMessage = useFormatMessage();\n return (paymentDestination: PaymentDestination | PaymentDestination2) =>\n formatMessage(\n `KYC.Transactions.PaymentDestination.${paymentDestination}` as LocaleKey\n );\n}\n\nexport function useFormatTransactionType() {\n const formatMessage = useFormatMessage();\n return (transactionType: TransactionType) =>\n formatMessage(\n `KYC.Transactions.TransactionType.${transactionType}` as LocaleKey\n );\n}\n\nexport function useFormatAverageIncomingPayments() {\n const formatMessage = useFormatMessage();\n return (paymentAmount: AverageIncomingPaymentsId) =>\n formatMessage(\n `KYC.Transactions.averageIncomingPayments.${paymentAmount}` as LocaleKey\n );\n}\n\nexport function useFormatSourceOfFunds() {\n const formatMessage = useFormatMessage();\n return (sourceOfFunds: SourceOfFundsId) =>\n formatMessage(\n `KYC.Transactions.sourceOfFunds.${sourceOfFunds}` as LocaleKey\n );\n}\n\nexport function useFormatSourceOfIncome() {\n const formatMessage = useFormatMessage();\n return (sourceOfIncome: SourceOfIncomeId) =>\n formatMessage(\n `KYC.Transactions.sourceOfIncome.${sourceOfIncome}` as LocaleKey\n );\n}\n\nexport function foldKYCVariant(\n variant: KYCVariant,\n match: {\n whenUKonto: () => T;\n whenLegalData: () => T;\n }\n): T {\n switch (variant) {\n case \"UKonto\":\n return match.whenUKonto();\n case \"LegalData\":\n return match.whenLegalData();\n }\n}\n\nexport function shouldAskPaymentDestinationCountries(\n paymentDestination: Option\n) {\n return pipe(\n paymentDestination,\n option.exists(paymentDestination => paymentDestination === \"OutsideEU\")\n );\n}\n\nexport function shouldAskOtherFundsDetails(\n sourceOfFunds: Option\n) {\n return pipe(\n sourceOfFunds,\n option.exists(v => v === \"Other\")\n );\n}\n\nexport const incomeSourcesWithIndustry2: Array = [\n \"Employee\",\n \"Rentier\",\n \"Entrepreneur\",\n];\n","import * as t from \"io-ts\";\nimport { eq } from \"fp-ts\";\nimport { apiCall } from \"../APICall\";\nimport { Eq } from \"fp-ts/Eq\";\nimport { KYCAnswersSubmit } from \"./domain\";\nimport { constTrue } from \"fp-ts/function\";\nimport { LocalizedString } from \"design-system\";\n\nconst SubmitKYCInput = t.type({\n answers: KYCAnswersSubmit,\n});\ntype SubmitKYCAnswersInput = t.TypeOf;\n\nconst eqSubmitKYCInput: Eq = eq.getStructEq({\n answers: eq.eqStrict,\n});\n\nconst SubmitKYCErrorId = t.keyof({\n ClientNumberNotReserved: true,\n RiskyClient: true,\n});\n\nconst SubmitKYCError = t.type(\n {\n id: SubmitKYCErrorId,\n message: LocalizedString,\n },\n \"SubmitKYCError\"\n);\nexport type SubmitKYCError = t.TypeOf;\n\nconst SubmitKYCOutput = t.type(\n {\n idConfirmedRemote: t.boolean,\n },\n \"SubmitKYCOutput\"\n);\nexport type SubmitKYCOutput = t.TypeOf;\n\nexport const submitKYC = apiCall({\n inputEq: eqSubmitKYCInput,\n path: [\"packages\", \"uKonto\", \"knowYourCustomer\", \"submit\"],\n inputCodec: SubmitKYCInput,\n errorCodec: SubmitKYCError,\n outputCodec: SubmitKYCOutput,\n});\n\nexport const Country = t.type(\n {\n countryName: LocalizedString,\n countryCode: t.string,\n TIN: t.boolean,\n },\n \"Country\"\n);\n\nexport type Country = t.TypeOf;\n\nexport const countries = apiCall({\n inputEq: eq.fromEquals(constTrue),\n path: [\"clients\", \"knowYourCustomer\", \"countries\"],\n inputCodec: t.void,\n outputCodec: t.array(Country, \"KYCCountries\"),\n});\n\nexport const embargoedCountries = apiCall({\n inputEq: eq.fromEquals(constTrue),\n path: [\"clients\", \"knowYourCustomer\", \"embargoedHighRiskCountries\"],\n inputCodec: t.void,\n outputCodec: t.array(Country, \"EmbargoedCountries\"),\n});\n","import { unsafePositiveInteger } from \"design-system\";\n\nexport const messageTimeFormat = \"DD/MM/YYYY - HH:mm\";\nexport const threadPageSize = unsafePositiveInteger(10);\n","import * as t from \"io-ts\";\nimport { LocalizedString, NonNegative } from \"design-system\";\nimport { optionFromUndefined } from \"../globalDomain\";\nimport { NonEmptyString } from \"io-ts-types/lib/NonEmptyString\";\nimport { AllCitizenships } from \"../IdUpload/domain\";\n\nexport const KYCVariant = t.keyof({\n UKonto: true,\n LegalData: true,\n});\nexport type KYCVariant = t.TypeOf;\n\nexport const IncomeSource = t.keyof({\n Employed: true,\n Entrepreneur: true,\n Freelancer: true,\n Pensioner: true,\n MaternityLeave: true,\n CompanyOwner: true,\n HomeDuties: true,\n Unemployed: true,\n Student: true,\n Other: true,\n});\nexport type IncomeSource = t.TypeOf;\n\nexport const Industry = t.keyof({\n AccomodationAndFoodServiceActivities: true,\n ActivitiesOfExtraTerritorialOrganizationsAndBodies: true,\n ActivitiesOfHouseholds: true,\n AdministrativeAndSupportServiceActivities: true,\n AgricultureForestryFishing: true,\n ArtsEntertainmentAndRecreation: true,\n Construction: true,\n Education: true,\n ElectricityGasSteamAndAirConditioningSupply: true,\n FinancialAndInsuranceActivities: true,\n HealthAndSocialCare: true,\n InformationAndCommunicationActivities: true,\n ManufacturingIndustry: true,\n MiningAndQuarrying: true,\n ProfessionalScientificAndTechnicalActivities: true,\n PublicAdministrationAndDefense: true,\n CompulsorySocialSecurity: true,\n RealEstateActivities: true,\n TransportAndStorage: true,\n WaterSupply: true,\n WasteAndRemediationActivities: true,\n WholeAndRetailTrade: true,\n RepairAndMaintenanceServicesOfMotorVehicles: true,\n Other: true,\n});\nexport type Industry = t.TypeOf;\n\nexport const incomeSourcesWithIndustry: Array = [\n \"Employed\",\n \"Entrepreneur\",\n \"Freelancer\",\n \"CompanyOwner\",\n];\n\nexport const incomeSourcesWithIndustryMTG: Array = [\n \"Employed\",\n \"Freelancer\",\n \"EmployedAbroad\",\n \"CompanyOwner\",\n \"TradesmanCoOperatingPerson\",\n];\n\nexport const IncomeInfo = t.type({\n monthlyIncome: optionFromUndefined(NonNegative),\n incomeSource: optionFromUndefined(IncomeSource),\n incomeSourceLabel: optionFromUndefined(LocalizedString),\n industry: optionFromUndefined(Industry),\n industryLabel: optionFromUndefined(LocalizedString),\n otherIndustry: optionFromUndefined(t.string),\n employerName: optionFromUndefined(t.string),\n companyICO: optionFromUndefined(t.string),\n riskyActivities: optionFromUndefined(t.boolean),\n});\nexport type IncomeInfo = t.TypeOf;\n\nexport const PaymentDestination = t.keyof({\n Domestic: true,\n ForeignEU: true,\n OutsideEU: true,\n});\nexport type PaymentDestination = t.TypeOf;\n\nexport const PaymentDestination2 = t.keyof({\n DomesticAndEU: true,\n OutsideEU: true,\n});\nexport type PaymentDestination2 = t.TypeOf;\n\nexport const TransactionType = t.keyof({\n CashAndCashless: true,\n Cashless: true,\n Cash: true,\n});\nexport type TransactionType = t.TypeOf;\n\nexport const NegativeReputationType = t.keyof({\n FinancialCrime: true,\n Corruption: true,\n ViolenceBrutalityBlackmail: true,\n OrganizedCrime: true,\n Other: true,\n Fraud: true,\n SexOffence: true,\n StatusW4: true,\n});\nexport type NegativeReputationType = t.TypeOf;\nexport const SourceOfWealth = t.keyof({\n Investment: true,\n Other: true,\n PropertySale: true,\n Divorce: true,\n Business: true,\n Gambling: true,\n Employment: true,\n});\nexport type SourceOfWealth = t.TypeOf;\nexport const PaymentRelation = t.keyof({\n MostlyForeign: true,\n ForeignAndDomestic: true,\n});\n\nexport type PaymentRelation = t.TypeOf;\nexport const PaymentMethod = t.keyof({\n MostlyNotCash: true,\n MostlyCash: true,\n});\nexport type PaymentMethod = t.TypeOf;\n\nexport const AverageIncomingPaymentsIdCz = t.keyof({\n CZ_0_50: true,\n CZ_50_100: true,\n CZ_100_250: true,\n CZ_250: true,\n});\n\nexport type AverageIncomingPaymentsIdCz = t.TypeOf<\n typeof AverageIncomingPaymentsIdCz\n>;\n\nexport const AverageIncomingPaymentsIdSk = t.keyof({\n SK_0_2: true,\n SK_2_4: true,\n SK_4_6: true,\n SK_6: true,\n});\n\nexport type AverageIncomingPaymentsIdSk = t.TypeOf<\n typeof AverageIncomingPaymentsIdSk\n>;\n\nexport const AverageIncomingPaymentsId = t.union([\n AverageIncomingPaymentsIdCz,\n AverageIncomingPaymentsIdSk,\n]);\n\nexport type AverageIncomingPaymentsId = t.TypeOf<\n typeof AverageIncomingPaymentsId\n>;\n\nexport const AverageIncomingPayments = t.type({\n id: AverageIncomingPaymentsId,\n value: t.unknown,\n});\nexport type AverageIncomingPayments = t.TypeOf;\n\nexport const SourceOfFundsId = t.keyof({\n Salary: true,\n Pension: true,\n GiftOrWin: true,\n SaleEstate: true,\n SaleShares: true,\n Heritage: true,\n Loans: true,\n CompanyProfitDividends: true,\n InsurancePayment: true,\n PersonalSavings: true,\n Other: true,\n});\nexport type SourceOfFundsId = t.TypeOf;\n\nexport const SourceOfFunds = t.type({\n id: SourceOfFundsId,\n value: t.unknown,\n otherSource: optionFromUndefined(t.string),\n});\nexport type SourceOfFunds = t.TypeOf;\n\nexport const SourceOfIncomeId = t.keyof({\n Employee: true,\n StudentOrKid: true,\n Pensioner: true,\n Rentier: true,\n Entrepreneur: true,\n Unemployed: true,\n});\nexport type SourceOfIncomeId = t.TypeOf;\n\nexport const SourceOfIncome = t.type({\n id: SourceOfIncomeId,\n value: t.unknown,\n});\nexport type SourceOfIncome = t.TypeOf;\n\nexport const Country = t.type(\n {\n countryName: LocalizedString,\n countryCode: t.string,\n TIN: t.boolean,\n },\n \"Country\"\n);\n\nexport type Country = t.TypeOf;\n\n//used for new kyc questionnaire, under FF\nexport const TransactionsInfo2 = t.type({\n averageMonthlyIncomePayments: optionFromUndefined(AverageIncomingPayments),\n paymentDestination: optionFromUndefined(PaymentDestination2),\n paymentDestinationLabel: optionFromUndefined(LocalizedString),\n paymentDestinationCountries: optionFromUndefined(t.string),\n paymentDestinationCountriesWithLabels: optionFromUndefined(t.array(Country)),\n reasonOfTransactions: optionFromUndefined(t.string),\n sourceOfFunds: optionFromUndefined(SourceOfFunds),\n sourceOfIncome: optionFromUndefined(SourceOfIncome),\n monthlyIncome: optionFromUndefined(t.number),\n employerName: optionFromUndefined(t.string),\n companyICO: optionFromUndefined(t.string),\n});\nexport type TransactionsInfo2 = t.TypeOf;\n\n//used for old kyc questionnaire which is under FF + foreigners\nexport const TransactionsInfo1 = t.intersection([\n t.type({\n paymentDestination: PaymentDestination,\n paymentDestinationLabel: LocalizedString,\n paymentDestinationCountries: optionFromUndefined(t.string),\n transactionType: TransactionType,\n transactionTypeLabel: LocalizedString,\n cashTransactionMotivation: optionFromUndefined(t.string),\n }),\n t.partial({\n localTransactionsYear: t.number,\n foreignTransactionsMonth: t.number,\n cashDepositsMonth: t.number,\n originOfFunds: t.string,\n sourceOfWealthType: SourceOfWealth,\n negativeReputation: t.boolean,\n negativeReputationType: optionFromUndefined(NegativeReputationType),\n sourceOfWealthText: NonEmptyString,\n netWorth: NonEmptyString,\n creditTurnoverYear: t.number,\n paymentMethod: PaymentMethod,\n reasonCash: optionFromUndefined(t.string),\n paymentRelation: PaymentRelation,\n }),\n]);\nexport type TransactionsInfo1 = t.TypeOf;\n\nexport const TransactionsInfo = t.union([TransactionsInfo1, TransactionsInfo2]);\nexport type TransactionsInfo = t.TypeOf;\n\nexport const TransactionsInfoCZ = t.type({\n paymentDestination: PaymentDestination,\n paymentDestinationLabel: LocalizedString,\n paymentDestinationCountries: optionFromUndefined(t.string),\n transactionType: TransactionType,\n transactionTypeLabel: LocalizedString,\n cashTransactionMotivation: optionFromUndefined(t.string),\n localTransactionsYear: t.number,\n foreignTransactionsMonth: t.number,\n cashDepositsMonth: t.number,\n originOfFunds: t.string,\n sourceOfWealthType: SourceOfWealth,\n negativeReputation: t.boolean,\n negativeReputationType: optionFromUndefined(NegativeReputationType),\n});\n\nexport const TransactionsInfoSK = t.type({\n paymentDestination: PaymentDestination,\n paymentDestinationLabel: LocalizedString,\n paymentDestinationCountries: optionFromUndefined(t.string),\n transactionType: TransactionType,\n transactionTypeLabel: LocalizedString,\n cashTransactionMotivation: optionFromUndefined(t.string),\n sourceOfWealthText: NonEmptyString,\n netWorth: NonEmptyString,\n creditTurnoverYear: t.number,\n paymentMethod: PaymentMethod,\n reasonCash: optionFromUndefined(t.string),\n paymentRelation: PaymentRelation,\n});\nexport type TransactionsInfoSK = t.TypeOf;\nexport type TransactionsInfoCZ = t.TypeOf;\n\nexport const ReasonNote = t.keyof({\n NotIssuedToMe: true,\n DoNotKnow: true,\n RefuseToProvide: true,\n});\n\nexport type ReasonNote = t.TypeOf;\n\nexport const TaxPayerCountry = t.type({\n country: t.string,\n TIN: optionFromUndefined(t.string),\n note: optionFromUndefined(ReasonNote),\n});\nexport type TaxPayerCountry = t.TypeOf;\n\nexport type TaxPayerCountryWithRequiresTIN = TaxPayerCountry & {\n countryRequiresTIN: boolean;\n};\n\nexport const PersonalAndTaxInfo = t.type({\n politicallyExposedPerson: t.boolean,\n taxPayerOutsideCzechRepublic: t.boolean,\n otherTaxPayerCountries: t.array(TaxPayerCountry),\n usCitizenOrTaxPayer: t.boolean,\n ssn: optionFromUndefined(t.string),\n secondCitizenship: optionFromUndefined(AllCitizenships),\n});\nexport type PersonalAndTaxInfo = t.TypeOf;\n\nexport const KYCAnswers = t.type({\n incomeInfo: optionFromUndefined(IncomeInfo),\n transactionsInfo: TransactionsInfo,\n personalAndTaxInfo: PersonalAndTaxInfo,\n});\nexport type KYCAnswers = t.TypeOf;\n\nexport const KYCAnswers2 = t.type({\n transactionsInfo: TransactionsInfo2,\n personalAndTaxInfo: PersonalAndTaxInfo,\n});\nexport type KYCAnswers2 = t.TypeOf;\n\nexport const KYCAnswersSubmit = t.type({\n incomeInfo: optionFromUndefined(IncomeInfo),\n transactionsInfo: optionFromUndefined(TransactionsInfo),\n personalAndTaxInfo: optionFromUndefined(PersonalAndTaxInfo),\n});\nexport type KYCAnswersSubmit = t.TypeOf;\n\nexport const ClientTransactionsInput = t.type({\n averageMonthlyIncomePayments: optionFromUndefined(AverageIncomingPayments),\n});\nexport type ClientTransactionsInput = t.TypeOf;\n","import { useEffect } from \"react\";\nimport { usePrevious } from \"react-use\";\nimport {\n Box,\n Button,\n DropdownOption,\n FormRow,\n Space,\n FormSection,\n Stack,\n Body,\n InlineMessage,\n unsafePositiveInteger,\n useForm,\n validators,\n LocalizedString,\n CheckboxField,\n Banner,\n ActionButtonGroup,\n} from \"design-system\";\nimport { array, record, option, taskEither, boolean } from \"fp-ts\";\nimport {\n pipe,\n constant,\n constVoid,\n constNull,\n constTrue,\n constFalse,\n} from \"fp-ts/function\";\nimport { Option } from \"fp-ts/Option\";\nimport { NonEmptyString } from \"io-ts-types/lib/NonEmptyString\";\nimport {\n MonthYear,\n Month,\n Tenant,\n foldTenant,\n genericError,\n} from \"../../../globalDomain\";\nimport { useFormatMessage } from \"../../../intl\";\nimport { useCommand } from \"../../../useAPI\";\nimport { OptionalEditYesNoField } from \"../../../Common/OptionalEditFields/OptionalEditYesNoField\";\nimport { OptionalEditMoneyField } from \"../../../Common/OptionalEditFields/OptionalEditMoneyField\";\nimport { OptionalEditDropdownField } from \"../../../Common/OptionalEditFields/OptionalEditDropdownField\";\nimport { OptionalEditMonthYearField } from \"../../../Common/OptionalEditFields/OptionalEditMonthYearField\";\nimport { OptionalEditTextField } from \"../../../Common/OptionalEditFields/OptionalEditTextField\";\nimport {\n dropdownOptionToValue,\n selectedDropdownOption,\n} from \"../../../Common/selectDropdownOption\";\nimport { useTenantCurrency } from \"../../../Common/useTenantCurrency\";\nimport { useValidators } from \"../../../Common/useValidators\";\nimport { AmountLimit } from \"../../api\";\nimport {\n ConsumerLoanOrMortgage,\n CreditType,\n LoanPurpose,\n OriginalLoanPurpose,\n RefinanceLoansForLivingSelection,\n ReworkConsumerLoanOrMortgage,\n} from \"../../domain\";\nimport { SelectedApplicant } from \"../../mortgageDashboardUtils\";\nimport { useFormatCreditType } from \"../../useFormatCreditType\";\nimport { useAppContext } from \"../../../useAppContext\";\nimport { toFalse, resolveAmount, checkRequiredFieldsProvided } from \"./utils\";\nimport * as api from \"./api\";\nimport * as standardLoanApi from \"../../../StandardLoan/ExpensesAndAdditionalIncome/ExpensesConfirmation/CurrentLiabilitiesDialog/api\";\nimport * as ovdApi from \"../../../PreapprovedOverdraft/ExpensesPage/ExpensesConfirmation/CurrentLiabilitiesDialog/api\";\nimport { LiabilitiesVariant } from \"./Liabilities\";\nimport { foldLiabilitiesVariant } from \"../../../StandardLoan/domain\";\nimport { useFormatReworkData } from \"../../useFormatReworkData\";\n\ntype Props = {\n selectedApplicant: SelectedApplicant;\n initialValues: Option;\n onSave: (loan: ConsumerLoanOrMortgage) => unknown;\n onCancel: () => unknown;\n onEdit: () => unknown;\n onRemove: () => unknown;\n isACPhase: boolean;\n isInteractingWithAnyForm: boolean;\n isViewMode: boolean;\n providersList: DropdownOption[];\n amountLimits: {\n [key in\n | \"monthlyInstallmentAmount\"\n | \"mtgCurrentBalance\"\n | \"mtgOriginalLoanAmount\"]: AmountLimit;\n };\n edit: boolean;\n variant: LiabilitiesVariant;\n reworkConsumerLoan: Option;\n};\n\ntype FormState = {\n creditType: Option;\n loanPurpose: Option;\n provider: Option;\n originalLoanAmount: Option;\n currentBalance: Option;\n monthlyInstallmentAmount: Option;\n endDate: Option;\n usedForRefinance: Option;\n loansForLiving: Option;\n repaidBeforeDisbursement: Option;\n propertyOwner: Option;\n contractNumber: Option;\n originalLoanPurpose: Option;\n};\n\ntype FormSetup = {\n tenant: Tenant;\n isACPhase: boolean;\n edit: boolean;\n manuallyAdded: boolean;\n displayLoansForLiving: boolean;\n displayOriginalLoanPurpose: boolean;\n canBeRefinanced: boolean;\n refinanceLoansForLivingSelection: RefinanceLoansForLivingSelection;\n loansForLivingDefaultValue: boolean;\n sharedCreditCoApplicantName: Option;\n};\n\nfunction formStateFromInitialValues(\n initialValues: Option,\n variant: LiabilitiesVariant\n): FormState {\n return pipe(\n initialValues,\n option.fold(\n () => ({\n creditType: option.none,\n loanPurpose: option.none,\n provider: option.none,\n originalLoanAmount: option.none,\n currentBalance: option.none,\n monthlyInstallmentAmount: option.none,\n endDate: option.none,\n usedForRefinance: option.none,\n loansForLiving: option.none,\n repaidBeforeDisbursement: option.none,\n propertyOwner: option.none,\n contractNumber: option.none,\n originalLoanPurpose: option.none,\n }),\n values => ({\n creditType: values.creditType,\n loanPurpose: values.loanPurpose,\n provider: values.provider,\n originalLoanAmount: pipe(\n foldLiabilitiesVariant(variant, {\n onMtg: () => values.approvedCreditAmount,\n onCf: () => values.originalLoanAmount,\n onOvd: () => values.originalLoanAmount,\n }),\n resolveAmount\n ),\n currentBalance: resolveAmount(values.currentBalance),\n monthlyInstallmentAmount: resolveAmount(values.monthlyInstallment),\n endDate: pipe(\n values.finalDate,\n option.map(finalDate => ({\n month: (finalDate.getMonth() + 1) as Month,\n year: unsafePositiveInteger(finalDate.getFullYear()),\n }))\n ),\n usedForRefinance: values.usedForRefinance,\n loansForLiving: values.loansForLiving,\n repaidBeforeDisbursement: values.repaidBeforeDisbursement,\n propertyOwner: values.propertyOwner,\n contractNumber: values.contractNumber,\n originalLoanPurpose: values.originalLoanPurpose,\n })\n )\n );\n}\n\nconst getShowUsedForRefinance = (\n loansForLiving: Option,\n refinanceLoansForLivingSelection: RefinanceLoansForLivingSelection\n) =>\n pipe(\n loansForLiving,\n option.map(loansForLiving => {\n switch (refinanceLoansForLivingSelection) {\n case \"REFINANCE_WITH_LOANS_FOR_LIVING_TRUE\":\n return loansForLiving;\n case \"REFINANCE_WITH_LOANS_FOR_LIVING_FALSE\":\n return loansForLiving === false;\n case \"REFINANCE_WITH_ANY_LOANS_FOR_LIVING\":\n default:\n return true;\n }\n }),\n toFalse\n );\n\nconst getRefinanceDisbursementConflict = (values: FormState) =>\n toFalse(values.usedForRefinance) && toFalse(values.repaidBeforeDisbursement);\n\nconst getDisplayedFields = (\n values: FormState,\n formSetup: FormSetup,\n rework: Option,\n r8EnableSimpleRefinancing: boolean\n) => ({\n creditType: formSetup.manuallyAdded,\n loanPurpose: formSetup.manuallyAdded,\n originalLoanAmount: formSetup.manuallyAdded,\n monthlyInstallmentAmount: !formSetup.manuallyAdded,\n currentBalance: true,\n endDate: true,\n loansForLiving:\n formSetup.displayLoansForLiving && option.isSome(values.loansForLiving),\n usedForRefinance:\n (formSetup.canBeRefinanced &&\n getShowUsedForRefinance(\n option.isSome(values.loansForLiving)\n ? values.loansForLiving\n : option.of(formSetup.loansForLivingDefaultValue),\n formSetup.refinanceLoansForLivingSelection\n )) ||\n pipe(\n rework,\n option.exists(v => option.isSome(v.isUsedForRefinance))\n ),\n repaidBeforeDisbursement: pipe(\n rework,\n option.fold(constTrue, v => option.isSome(v.repaidBeforeDisbursement))\n ),\n provider:\n !getRefinanceDisbursementConflict(values) &&\n (formSetup.edit || option.isSome(values.provider)) &&\n (toFalse(values.usedForRefinance) ||\n toFalse(values.repaidBeforeDisbursement)),\n contractNumber:\n !getRefinanceDisbursementConflict(values) &&\n formSetup.tenant === \"CZ\" &&\n (toFalse(values.usedForRefinance) ||\n toFalse(values.repaidBeforeDisbursement)),\n propertyOwner:\n (!getRefinanceDisbursementConflict(values) &&\n toFalse(values.usedForRefinance) &&\n toFalse(values.loansForLiving)) ||\n pipe(\n rework,\n option.exists(v => option.isSome(v.propertyOwner))\n ),\n\n originalLoanPurpose:\n !getRefinanceDisbursementConflict(values) &&\n formSetup.displayOriginalLoanPurpose &&\n r8EnableSimpleRefinancing\n ? toFalse(values.usedForRefinance)\n : formSetup.tenant === \"CZ\",\n});\nconst getRequiredFields = (\n values: FormState,\n formSetup: FormSetup,\n rework: Option,\n r8EnableSimpleRefinancing: boolean\n) => ({\n ...getDisplayedFields(values, formSetup, rework, r8EnableSimpleRefinancing),\n ...(!formSetup.isACPhase\n ? {\n provider: false,\n contractNumber: false,\n originalLoanPurpose: false,\n }\n : toFalse(values.usedForRefinance) ||\n toFalse(values.repaidBeforeDisbursement)\n ? {\n provider: true,\n }\n : {\n provider: false,\n }),\n});\n\nexport function ConsumerLoanOrMortgageForm(props: Props) {\n const formatMessage = useFormatMessage();\n const {\n apiParameters: { tenant },\n config: { r8EnableSimpleRefinancing },\n } = useAppContext();\n\n const {\n defined,\n definedNoExtract,\n nonNegativeNumber,\n amountMinMax,\n maxLength,\n } = useValidators();\n const currency = useTenantCurrency();\n const formatCreditType = useFormatCreditType();\n\n const { formatIssues, formatFeedback } = useFormatReworkData(\n props.reworkConsumerLoan\n );\n\n function formatLoanPurpose(loanPurpose: LoanPurpose): LocalizedString {\n switch (loanPurpose) {\n case \"PURPOSE\":\n return formatMessage(\n \"Liabilities.AddConsumerLoanOrMortgage.loanPurpose.purpose\"\n );\n case \"NOT_PURPOSE\":\n return formatMessage(\n \"Liabilities.AddConsumerLoanOrMortgage.loanPurpose.notPurpose\"\n );\n }\n }\n\n function formatOriginalLoanPurpose(\n originalLoanPurpose: OriginalLoanPurpose\n ): LocalizedString {\n switch (originalLoanPurpose) {\n case \"PURCHASE\":\n return formatMessage(\n \"Liabilities.AddConsumerLoanOrMortgage.originalLoanPurpose.purchase\"\n );\n case \"CONSTRUCTION\":\n return formatMessage(\n \"Liabilities.AddConsumerLoanOrMortgage.originalLoanPurpose.construction\"\n );\n case \"RECONSTRUCTION\":\n return formatMessage(\n \"Liabilities.AddConsumerLoanOrMortgage.originalLoanPurpose.reconstruction\"\n );\n case \"REVERSE_REPAYMENT\":\n return formatMessage(\n \"Liabilities.AddConsumerLoanOrMortgage.originalLoanPurpose.reverseRepayment\"\n );\n case \"REPAYMENT_OF_PREVIOUSLY_GRANTED_LOAN\":\n return formatMessage(\n \"Liabilities.AddConsumerLoanOrMortgage.originalLoanPurpose.repaymentOfPreviouslyGrantedLoan\"\n );\n case \"REPAYMENT_OF_PREVIOUSLY_GRANTED_NON_PURPOSE_LOAN\":\n return formatMessage(\n \"Liabilities.AddConsumerLoanOrMortgage.originalLoanPurpose.repaymentOfPreviouslyGrantedNonPurposeLoan\"\n );\n case \"NOT_PURPOSE\":\n default:\n return formatMessage(\n \"Liabilities.AddConsumerLoanOrMortgage.originalLoanPurpose.notPurpose\"\n );\n }\n }\n\n const addLoan = useCommand(api.addConsumerLoanOrMortgage);\n const editLoan = useCommand(api.editConsumerLoanOrMortgage);\n const addLoanStandardLoan = useCommand(\n standardLoanApi.addConsumerLoanOrMortgage\n );\n\n const addLoanOverdraft = useCommand(ovdApi.addConsumerLoanOrMortgage);\n\n const editLoanStandardLoan = useCommand(\n standardLoanApi.editConsumerLoanOrMortgage\n );\n\n const editLoanOverdraft = useCommand(ovdApi.editConsumerLoanOrMortgage);\n\n const monthlyInstallment = pipe(\n props.initialValues,\n option.fold(\n () => option.none,\n a => a.monthlyInstallment\n )\n );\n const currentBalance = pipe(\n props.initialValues,\n option.fold(\n () => option.none,\n a => a.currentBalance\n )\n );\n const finalDate = pipe(\n props.initialValues,\n option.fold(\n () => option.none,\n a => a.finalDate\n )\n );\n\n useEffect(() => {\n if (\n (r8EnableSimpleRefinancing && !option.isSome(monthlyInstallment)) ||\n !option.isSome(currentBalance) ||\n !option.isSome(finalDate)\n ) {\n props.onEdit();\n }\n }, [monthlyInstallment, currentBalance, finalDate]);\n\n const formSetup = pipe(\n props.initialValues,\n option.fold(\n (): FormSetup => ({\n tenant,\n edit: props.edit,\n isACPhase: props.isACPhase,\n manuallyAdded: true,\n displayLoansForLiving: foldLiabilitiesVariant(props.variant, {\n onMtg: constTrue,\n onCf: constFalse,\n onOvd: constFalse,\n }),\n displayOriginalLoanPurpose: true,\n canBeRefinanced: foldLiabilitiesVariant(props.variant, {\n onMtg: constTrue,\n onCf: constFalse,\n onOvd: constFalse,\n }),\n refinanceLoansForLivingSelection: \"REFINANCE_WITH_ANY_LOANS_FOR_LIVING\",\n loansForLivingDefaultValue: false,\n sharedCreditCoApplicantName: option.none,\n }),\n values => ({\n tenant,\n edit:\n props.edit ||\n !option.isSome(values.monthlyInstallment) ||\n !option.isSome(values.currentBalance) ||\n !option.isSome(values.finalDate),\n isACPhase: props.isACPhase,\n manuallyAdded: values.manuallyAdded,\n canBeRefinanced: toFalse(values.canBeRefinanced),\n displayLoansForLiving: toFalse(values.displayLoansForLiving),\n displayOriginalLoanPurpose: toFalse(values.displayOriginalLoanPurpose),\n refinanceLoansForLivingSelection: pipe(\n values.refinanceLoansForLivingSelection,\n option.getOrElse(\n constant(\n \"REFINANCE_WITH_ANY_LOANS_FOR_LIVING\" as RefinanceLoansForLivingSelection\n )\n )\n ),\n loansForLivingDefaultValue: toFalse(values.loansForLivingDefaultValue),\n sharedCreditCoApplicantName: values.sharedCreditCoApplicantName,\n })\n )\n );\n\n const { fieldProps, handleSubmit, setValues, values } = useForm(\n {\n initialValues: formStateFromInitialValues(\n props.initialValues,\n props.variant\n ),\n fieldValidators: function (values) {\n const requiredFields = getRequiredFields(\n values,\n formSetup,\n props.reworkConsumerLoan,\n r8EnableSimpleRefinancing\n );\n console.log(requiredFields, values);\n return {\n creditType: formSetup.manuallyAdded ? definedNoExtract() : undefined,\n loanPurpose:\n formSetup.manuallyAdded && props.variant !== \"OVD\"\n ? definedNoExtract()\n : undefined,\n provider: requiredFields.provider ? definedNoExtract() : undefined,\n originalLoanAmount: validators.inSequence(\n defined(),\n nonNegativeNumber,\n amountMinMax(\n props.amountLimits.mtgOriginalLoanAmount.min,\n props.amountLimits.mtgOriginalLoanAmount.max\n )\n ),\n currentBalance: validators.inSequence(\n defined(),\n nonNegativeNumber,\n amountMinMax(\n props.amountLimits.mtgCurrentBalance.min,\n props.amountLimits.mtgCurrentBalance.max\n )\n ),\n monthlyInstallmentAmount: validators.inSequence(\n defined(),\n nonNegativeNumber,\n amountMinMax(\n props.amountLimits.monthlyInstallmentAmount.min,\n props.amountLimits.monthlyInstallmentAmount.max\n )\n ),\n endDate: defined(),\n loansForLiving: defined(),\n usedForRefinance: requiredFields.usedForRefinance\n ? validators.inSequence(\n definedNoExtract(),\n validators.fromPredicate(\n () => !getRefinanceDisbursementConflict(values),\n formatMessage(\n \"Mortgage.CBResults.Liabilities.selectForRefinancingError\"\n )\n )\n )\n : undefined,\n repaidBeforeDisbursement:\n requiredFields.repaidBeforeDisbursement && props.variant !== \"CF\"\n ? definedNoExtract()\n : undefined,\n propertyOwner:\n requiredFields.propertyOwner && props.variant !== \"CF\"\n ? definedNoExtract()\n : undefined,\n contractNumber:\n requiredFields.contractNumber && props.variant !== \"CF\"\n ? validators.inSequence(\n definedNoExtract(),\n validators.validateIfDefined(maxLength(200))\n )\n : validators.validateIfDefined(maxLength(200)),\n originalLoanPurpose: requiredFields.originalLoanPurpose\n ? definedNoExtract()\n : undefined,\n };\n },\n },\n {\n onSubmit: values =>\n pipe(\n {\n applicantIndex: props.selectedApplicant.index,\n creditType: values.creditType,\n loanPurpose: values.loanPurpose,\n provider: values.provider,\n approvedCreditAmount: {\n currency,\n amount: values.originalLoanAmount,\n },\n currentBalance: { currency, amount: values.currentBalance },\n monthlyInstallment: {\n currency,\n amount: values.monthlyInstallmentAmount,\n },\n endDate: values.endDate,\n usedForRefinance: values.usedForRefinance,\n loansForLiving: values.loansForLiving,\n repaidBeforeDisbursement: values.repaidBeforeDisbursement,\n propertyOwner: values.propertyOwner,\n contractNumber: values.contractNumber,\n originalLoanPurpose: values.originalLoanPurpose,\n },\n taskEither.of,\n taskEither.chain(newValues =>\n pipe(\n props.initialValues,\n option.fold(\n () =>\n pipe(\n foldLiabilitiesVariant(props.variant, {\n onMtg: () =>\n addLoan({ ...newValues, manuallyAdded: true }),\n onCf: () => {\n return option.isSome(newValues.creditType) &&\n option.isSome(newValues.loanPurpose)\n ? addLoanStandardLoan({\n creditType: newValues.creditType.value,\n currentBalance: newValues.currentBalance,\n finalDateOfTheLoan: newValues.endDate,\n loanPurpose: newValues.loanPurpose.value,\n monthlyInstallment: newValues.monthlyInstallment,\n originalLoanAmount:\n newValues.approvedCreditAmount,\n usedForRefinance: newValues.usedForRefinance,\n })\n : taskEither.left(() => genericError);\n },\n onOvd: () => {\n return option.isSome(newValues.creditType)\n ? addLoanOverdraft({\n creditType: newValues.creditType.value,\n currentBalance: newValues.currentBalance,\n finalDateOfTheLoan: newValues.endDate,\n monthlyInstallment: newValues.monthlyInstallment,\n originalLoanAmount:\n newValues.approvedCreditAmount,\n usedForRefinance: newValues.usedForRefinance,\n })\n : taskEither.left(() => genericError);\n },\n }),\n taskEither.chain(loan =>\n taskEither.fromIO(() => props.onSave(loan))\n )\n ),\n initialValues =>\n pipe(\n foldLiabilitiesVariant(props.variant, {\n onMtg: () =>\n editLoan({\n ...newValues,\n manuallyAdded: formSetup.manuallyAdded,\n usedForRefinance: toFalse(\n initialValues.canBeRefinanced\n )\n ? newValues.usedForRefinance\n : option.some(false),\n recordId: initialValues.recordId,\n }),\n onCf: () => {\n return option.isSome(newValues.creditType) &&\n option.isSome(newValues.loanPurpose)\n ? editLoanStandardLoan({\n creditType: newValues.creditType.value,\n currentBalance: newValues.currentBalance,\n finalDate: newValues.endDate,\n loanPurpose: newValues.loanPurpose.value,\n monthlyInstallmentAmount:\n newValues.monthlyInstallment,\n approvedCreditAmount:\n newValues.approvedCreditAmount,\n recordId: initialValues.recordId,\n })\n : taskEither.left(() => genericError);\n },\n onOvd: () => {\n return option.isSome(newValues.creditType)\n ? editLoanOverdraft({\n creditType: newValues.creditType.value,\n currentBalance: newValues.currentBalance,\n finalDate: newValues.endDate,\n monthlyInstallmentAmount:\n newValues.monthlyInstallment,\n approvedCreditAmount:\n newValues.approvedCreditAmount,\n recordId: initialValues.recordId,\n })\n : taskEither.left(() => genericError);\n },\n }),\n taskEither.chain(loan =>\n taskEither.fromIO(() => props.onSave(loan))\n )\n )\n )\n )\n )\n ),\n }\n );\n\n const previousEdit = usePrevious(formSetup.edit);\n useEffect(() => {\n if (!formSetup.edit || formSetup.edit === previousEdit) return;\n\n setValues({\n originalLoanAmount: values.originalLoanAmount,\n loansForLiving: pipe(\n values.loansForLiving,\n option.getOrElse(constant(formSetup.loansForLivingDefaultValue)),\n option.some\n ),\n usedForRefinance: pipe(values.usedForRefinance, toFalse, option.some),\n repaidBeforeDisbursement: pipe(\n values.repaidBeforeDisbursement,\n toFalse,\n option.some\n ),\n });\n }, [formSetup, previousEdit, values, setValues]);\n\n const handleCancel = () => {\n pipe(\n formStateFromInitialValues(props.initialValues, props.variant),\n setValues\n );\n props.onCancel();\n };\n\n const creditTypeFieldProps = fieldProps(\"creditType\");\n const creditTypeOptions = pipe(\n CreditType.keys,\n record.keys,\n array.map(value => ({ value, label: formatCreditType(value) }))\n );\n const creditTypeValue = selectedDropdownOption(\n creditTypeFieldProps.value,\n creditTypeOptions\n );\n const creditTypeOnChange = (value: Option>) => {\n creditTypeFieldProps.onChange(dropdownOptionToValue(value));\n };\n\n const loanPurposeFieldProps = fieldProps(\"loanPurpose\");\n const loanPurposeOptions = pipe(\n LoanPurpose.keys,\n record.keys,\n array.map(value => ({ value, label: formatLoanPurpose(value) }))\n );\n const loanPurposeValue = selectedDropdownOption(\n loanPurposeFieldProps.value,\n loanPurposeOptions\n );\n const loanPurposeOnChange = (value: Option>) => {\n loanPurposeFieldProps.onChange(dropdownOptionToValue(value));\n if (\n formSetup.manuallyAdded &&\n option.isSome(value) &&\n value.value.value === \"PURPOSE\" &&\n option.isSome(values.loansForLiving) &&\n !values.loansForLiving.value\n ) {\n fieldProps(\"usedForRefinance\").onChange(option.some(false));\n }\n };\n const originalLoanPurposeFieldProps = fieldProps(\"originalLoanPurpose\");\n const originalLoanPurposeOptions = pipe(\n OriginalLoanPurpose.keys,\n record.keys,\n array.filter(key =>\n foldTenant(\n tenant,\n () =>\n r8EnableSimpleRefinancing\n ? true\n : key !== \"REPAYMENT_OF_PREVIOUSLY_GRANTED_LOAN\" &&\n key !== \"REPAYMENT_OF_PREVIOUSLY_GRANTED_NON_PURPOSE_LOAN\",\n () =>\n key !== \"REPAYMENT_OF_PREVIOUSLY_GRANTED_LOAN\" &&\n key !== \"REPAYMENT_OF_PREVIOUSLY_GRANTED_NON_PURPOSE_LOAN\"\n )\n ),\n array.map(value => ({ value, label: formatOriginalLoanPurpose(value) }))\n );\n const originalLoanPurposeValue = selectedDropdownOption(\n originalLoanPurposeFieldProps.value,\n originalLoanPurposeOptions\n );\n const originalLoanPurposeOnChange = (\n value: Option>\n ) => {\n originalLoanPurposeFieldProps.onChange(dropdownOptionToValue(value));\n };\n\n const providerFieldProps = fieldProps(\"provider\");\n const providerOnChange = (value: Option>) => {\n providerFieldProps.onChange(dropdownOptionToValue(value));\n };\n\n const currentYear = new Date().getFullYear();\n\n const displayedFields = getDisplayedFields(\n values,\n formSetup,\n props.reworkConsumerLoan,\n r8EnableSimpleRefinancing\n );\n\n const removeUCBProviderCode = (\n providersList: DropdownOption[],\n manuallyAdded: boolean\n ) => {\n return !manuallyAdded\n ? providersList\n : providersList.filter(\n provider =>\n provider.value !=\n foldTenant(\n tenant,\n () => \"1111\",\n () => \"2700\"\n )\n );\n };\n\n return (\n \n {(displayedFields.creditType || displayedFields.loanPurpose) && (\n \n {displayedFields.creditType ? (\n \n ) : null}\n {displayedFields.loanPurpose && props.variant !== \"OVD\" ? (\n \n ) : null}\n \n )}\n \n {formSetup.manuallyAdded ? (\n \n ) : (\n \n )}\n \n \n {formSetup.manuallyAdded && (\n \n \n {null}\n \n )}\n \n \n \n {displayedFields.loansForLiving && (\n \n {\n fieldProps(\"loansForLiving\").onChange(newValue);\n pipe(\n newValue,\n option.filter(value => value === false),\n option.fold(constVoid, () => {\n fieldProps(\"usedForRefinance\").onChange(option.some(false));\n })\n );\n }}\n edit={formSetup.edit}\n issues={formatIssues(\n \"loansForLiving\",\n fieldProps(\"loansForLiving\").issues\n )}\n feedback={formatFeedback(\"loansForLiving\")}\n />\n \n )}\n {displayedFields.usedForRefinance &&\n formSetup.edit &&\n props.variant !== \"OVD\" &&\n !(\n option.isSome(values.loanPurpose) &&\n values.loanPurpose.value === \"PURPOSE\" &&\n option.isSome(values.loansForLiving) &&\n !values.loansForLiving.value &&\n option.isSome(values.creditType) &&\n values.creditType.value === \"MORTGAGE_LOAN\" &&\n formSetup.manuallyAdded\n ) && (\n \n \n pipe(\n newValue,\n option.some,\n fieldProps(\"usedForRefinance\").onChange\n )\n }\n issues={formatIssues(\"isUsedForRefinance\", option.none)}\n />\n \n )}\n {displayedFields.repaidBeforeDisbursement &&\n props.variant !== \"CF\" &&\n props.variant !== \"OVD\" &&\n formSetup.edit && (\n \n \n pipe(\n newValue,\n option.some,\n fieldProps(\"repaidBeforeDisbursement\").onChange\n )\n }\n issues={formatIssues(\n \"repaidBeforeDisbursement\",\n fieldProps(\"repaidBeforeDisbursement\").issues\n )}\n />\n \n )}\n {getRefinanceDisbursementConflict(values) && props.variant !== \"CF\" && (\n \n )}\n\n {(displayedFields.provider || displayedFields.contractNumber) &&\n props.variant !== \"CF\" && (\n \n {displayedFields.provider ? (\n \n ) : null}\n {displayedFields.contractNumber ? (\n \n pipe(\n value,\n option.fromPredicate(value => value.length > 0),\n fieldProps(\"contractNumber\").onChange\n )\n }\n label={formatMessage(\n !formSetup.isACPhase && formSetup.edit\n ? \"Mortgage.CBResults.Liabilities.contractNumberOptional\"\n : \"Mortgage.CBResults.Liabilities.contractNumber\"\n )}\n placeholder={formatMessage(\n \"Mortgage.CBResults.Liabilities.contractNumber\"\n )}\n edit={formSetup.edit}\n issues={formatIssues(\n \"contractNumber\",\n fieldProps(\"contractNumber\").issues\n )}\n feedback={formatFeedback(\"contractNumber\")}\n />\n ) : null}\n \n )}\n\n {displayedFields.propertyOwner && (\n \n \n \n )}\n {displayedFields.originalLoanPurpose && (\n \n \n \n )}\n\n {!formSetup.edit && toFalse(values.repaidBeforeDisbursement) && (\n \n )}\n\n {!formSetup.edit &&\n props.variant !== \"OVD\" &&\n pipe(\n formSetup.sharedCreditCoApplicantName,\n option.fold(\n constant(\n toFalse(values.usedForRefinance) ? (\n \n ) : null\n ),\n sharedCreditCoApplicantName => (\n \n \n {formatMessage(\n \"Mortgage.CBResults.Liabilities.coApplicantOfBorrower\",\n {\n borrower: sharedCreditCoApplicantName,\n }\n )}\n \n {toFalse(values.usedForRefinance) && props.variant !== \"OVD\" ? (\n \n ) : null}\n \n )\n )\n )}\n\n {formSetup.isACPhase &&\n !formSetup.edit &&\n !checkRequiredFieldsProvided(\n values,\n getRequiredFields(\n values,\n formSetup,\n props.reworkConsumerLoan,\n r8EnableSimpleRefinancing\n )\n ) && (\n \n )}\n\n {formSetup.edit ? (\n ({\n normal: formatMessage(\"Liabilities.Add\"),\n loading: formatMessage(\"Liabilities.Add\"),\n error: formatMessage(\"Liabilities.Add\"),\n success: formatMessage(\"Liabilities.Add\"),\n }),\n () => ({\n normal: formatMessage(\"Save\"),\n loading: formatMessage(\"Save\"),\n error: formatMessage(\"Save\"),\n success: formatMessage(\"Save\"),\n })\n )\n ),\n disabled: false,\n variant: \"loading\",\n type: \"submit\",\n }, // as Action\n ]}\n />\n ) : (\n \n \n\n {formSetup.manuallyAdded && !props.isViewMode && (\n \n )}\n \n {foldLiabilitiesVariant(props.variant, {\n onCf: () =>\n formSetup.manuallyAdded ? (\n \n ) : null,\n onOvd: () =>\n formSetup.manuallyAdded ? (\n \n ) : null,\n onMtg: () =>\n pipe(\n props.isViewMode,\n boolean.fold(\n () => (\n \n ),\n constNull\n )\n ),\n })}\n \n )}\n \n );\n}\n","import { useEffect } from \"react\";\nimport { usePrevious } from \"react-use\";\nimport {\n ActionButtonGroup,\n Banner,\n Box,\n Button,\n CheckboxField,\n DropdownOption,\n FormRow,\n FormSection,\n InlineMessage,\n Space,\n useForm,\n validators,\n} from \"design-system\";\nimport { boolean, option, taskEither } from \"fp-ts\";\nimport {\n constant,\n constFalse,\n constNull,\n constTrue,\n pipe,\n} from \"fp-ts/function\";\nimport { Option } from \"fp-ts/Option\";\nimport { NonEmptyString } from \"io-ts-types/lib/NonEmptyString\";\nimport { Tenant, foldTenant } from \"../../../globalDomain\";\nimport { useFormatMessage } from \"../../../intl\";\nimport { useCommand } from \"../../../useAPI\";\nimport { OptionalEditMoneyField } from \"../../../Common/OptionalEditFields/OptionalEditMoneyField\";\nimport { OptionalEditDropdownField } from \"../../../Common/OptionalEditFields/OptionalEditDropdownField\";\nimport { OptionalEditTextField } from \"../../../Common/OptionalEditFields/OptionalEditTextField\";\nimport {\n dropdownOptionToValue,\n selectedDropdownOption,\n} from \"../../../Common/selectDropdownOption\";\nimport { useTenantCurrency } from \"../../../Common/useTenantCurrency\";\nimport { useValidators } from \"../../../Common/useValidators\";\nimport { AmountLimit } from \"../../api\";\nimport { CreditCard, ReworkCreditCard } from \"../../domain\";\nimport { SelectedApplicant } from \"../../mortgageDashboardUtils\";\nimport { useAppContext } from \"../../../useAppContext\";\nimport { checkRequiredFieldsProvided, resolveAmount, toFalse } from \"./utils\";\nimport * as api from \"./api\";\nimport { LiabilitiesVariant } from \"./Liabilities\";\nimport * as standardLoanApi from \"../../../StandardLoan/ExpensesAndAdditionalIncome/ExpensesConfirmation/CurrentLiabilitiesDialog/api\";\nimport { foldLiabilitiesVariant } from \"../../../StandardLoan/domain\";\nimport { useFormatReworkData } from \"../../useFormatReworkData\";\n\ntype Props = {\n selectedApplicant: SelectedApplicant;\n initialValues: Option;\n onSave: (loan: CreditCard) => unknown;\n onCancel: () => unknown;\n onEdit: () => unknown;\n onRemove: () => unknown;\n isACPhase: boolean;\n isInteractingWithAnyForm: boolean;\n isViewMode: boolean;\n providersList: DropdownOption[];\n amountLimits: {\n [key in \"ccAndOvdCurrentBalance\" | \"ccAndOvdLimit\"]: AmountLimit;\n };\n edit: boolean;\n variant: LiabilitiesVariant;\n reworkCreditCard: Option;\n};\n\ntype FormState = {\n currentBalance: Option;\n creditCardLimit: Option;\n repaidBeforeDisbursement: Option;\n changeLimit: Option;\n provider: Option;\n contractNumber: Option;\n newCreditCardLimit: Option;\n};\n\ntype FormSetup = {\n tenant: Tenant;\n isACPhase: boolean;\n edit: boolean;\n manuallyAdded: boolean;\n};\n\nfunction formStateFromInitialValues(\n initialValues: Option\n): FormState {\n return pipe(\n initialValues,\n option.fold(\n () => ({\n currentBalance: option.none,\n creditCardLimit: option.none,\n repaidBeforeDisbursement: option.none,\n changeLimit: option.none,\n provider: option.none,\n contractNumber: option.none,\n newCreditCardLimit: option.none,\n }),\n values => ({\n currentBalance: resolveAmount(values.currentBalance),\n creditCardLimit: resolveAmount(values.creditCardLimit),\n repaidBeforeDisbursement: values.repaidBeforeDisbursement,\n changeLimit: values.changeLimit,\n provider: values.provider,\n contractNumber: values.contractNumber,\n newCreditCardLimit: resolveAmount(values.newCreditCardLimit),\n })\n )\n );\n}\n\nconst getChangeLimitDisbursementConflict = (\n repaidBeforeDisbursement: Option,\n changeLimit: Option\n) => toFalse(changeLimit) && toFalse(repaidBeforeDisbursement);\n\nconst getDisplayedFields = (\n values: FormState,\n formSetup: FormSetup,\n variant: LiabilitiesVariant\n): { [K in keyof FormState]: boolean } => ({\n currentBalance: true,\n creditCardLimit: true,\n repaidBeforeDisbursement: foldLiabilitiesVariant(variant, {\n onMtg: constTrue,\n onCf: constFalse,\n onOvd: constFalse,\n }),\n changeLimit: foldLiabilitiesVariant(variant, {\n onMtg: () => formSetup.tenant === \"CZ\",\n onCf: constFalse,\n onOvd: constFalse,\n }),\n provider:\n !getChangeLimitDisbursementConflict(\n values.repaidBeforeDisbursement,\n values.changeLimit\n ) &&\n (formSetup.edit || option.isSome(values.provider)) &&\n (toFalse(values.changeLimit) || toFalse(values.repaidBeforeDisbursement)),\n contractNumber:\n !getChangeLimitDisbursementConflict(\n values.repaidBeforeDisbursement,\n values.changeLimit\n ) &&\n formSetup.tenant === \"CZ\" &&\n (toFalse(values.changeLimit) || toFalse(values.repaidBeforeDisbursement)),\n newCreditCardLimit:\n !getChangeLimitDisbursementConflict(\n values.repaidBeforeDisbursement,\n values.changeLimit\n ) &&\n formSetup.tenant === \"CZ\" &&\n toFalse(values.changeLimit),\n});\n\nconst getRequiredFields = (\n values: FormState,\n formSetup: FormSetup,\n variant: LiabilitiesVariant\n): { [K in keyof FormState]: boolean } => ({\n ...getDisplayedFields(values, formSetup, variant),\n ...(!formSetup.isACPhase\n ? {\n provider: false,\n contractNumber: false,\n }\n : {}),\n});\n\nexport function CreditCardForm(props: Props) {\n const formatMessage = useFormatMessage();\n const {\n apiParameters: { tenant },\n config: { r8EnableSimpleRefinancing },\n } = useAppContext();\n const {\n defined,\n definedNoExtract,\n nonNegativeNumber,\n amountMinMax,\n maxLength,\n } = useValidators();\n const currency = useTenantCurrency();\n\n const addCreditCard = useCommand(api.addCreditCard);\n const editCreditCard = useCommand(api.editCreditCard);\n const addCreditCardStandardLoan = useCommand(standardLoanApi.addCreditCard);\n const editCreditCardStandardLoan = useCommand(standardLoanApi.editCreditCard);\n\n const { formatIssues, formatFeedback } = useFormatReworkData(\n props.reworkCreditCard\n );\n\n const currentBalance = pipe(\n props.initialValues,\n option.fold(\n () => option.none,\n a => a.currentBalance\n )\n );\n const creditCard = pipe(\n props.initialValues,\n option.fold(\n () => option.none,\n a => a.creditCardLimit\n )\n );\n\n useEffect(() => {\n if (\n (r8EnableSimpleRefinancing && !option.isSome(currentBalance)) ||\n !option.isSome(creditCard)\n ) {\n props.onEdit();\n }\n }, [currentBalance, creditCard]);\n\n const formSetup = pipe(\n props.initialValues,\n option.fold(\n (): FormSetup => ({\n tenant,\n edit: props.edit,\n isACPhase: props.isACPhase,\n manuallyAdded: true,\n }),\n values => ({\n tenant,\n edit:\n props.edit ||\n !option.isSome(values.currentBalance) ||\n !option.isSome(values.creditCardLimit),\n isACPhase: props.isACPhase,\n manuallyAdded: values.manuallyAdded,\n })\n )\n );\n\n const { fieldProps, handleSubmit, setValues, values } = useForm(\n {\n initialValues: formStateFromInitialValues(props.initialValues),\n fieldValidators: function (values) {\n const requiredFields = getRequiredFields(\n values,\n formSetup,\n props.variant\n );\n return {\n provider: requiredFields.provider ? definedNoExtract() : undefined,\n currentBalance: validators.inSequence(\n defined(),\n nonNegativeNumber,\n amountMinMax(\n props.amountLimits.ccAndOvdCurrentBalance.min,\n props.amountLimits.ccAndOvdCurrentBalance.max\n )\n ),\n creditCardLimit: validators.inSequence(\n defined(),\n nonNegativeNumber,\n amountMinMax(\n props.amountLimits.ccAndOvdLimit.min,\n props.amountLimits.ccAndOvdLimit.max\n )\n ),\n repaidBeforeDisbursement: requiredFields.repaidBeforeDisbursement\n ? definedNoExtract()\n : undefined,\n changeLimit: requiredFields.repaidBeforeDisbursement\n ? definedNoExtract()\n : undefined,\n newCreditCardLimit: validators.foldPredicate(\n constant(requiredFields.newCreditCardLimit),\n constant(option.none),\n validators.inSequence(\n definedNoExtract(),\n validators.validateIfDefined(\n validators.inSequence(\n nonNegativeNumber,\n amountMinMax(0, 999999999)\n )\n )\n )\n ),\n contractNumber: requiredFields.contractNumber\n ? validators.inSequence(\n definedNoExtract(),\n validators.validateIfDefined(maxLength(200))\n )\n : validators.validateIfDefined(maxLength(200)),\n };\n },\n },\n {\n onSubmit: values =>\n pipe(\n !getChangeLimitDisbursementConflict(\n values.repaidBeforeDisbursement,\n values.changeLimit\n ),\n boolean.fold(\n () => taskEither.left(\"Error\" as unknown),\n () =>\n pipe(\n {\n applicantIndex: props.selectedApplicant.index,\n currentBalance: { currency, amount: values.currentBalance },\n creditCardLimit: { currency, amount: values.creditCardLimit },\n repaidBeforeDisbursement: values.repaidBeforeDisbursement,\n changeLimit: values.changeLimit,\n provider: values.provider,\n contractNumber: values.contractNumber,\n newCreditCardLimit: pipe(\n values.newCreditCardLimit,\n option.map(amount => ({ currency, amount }))\n ),\n },\n taskEither.of,\n taskEither.chain(newValues =>\n pipe(\n props.initialValues,\n option.fold(\n () =>\n pipe(\n foldLiabilitiesVariant(props.variant, {\n onMtg: () =>\n addCreditCard({\n ...newValues,\n manuallyAdded: true,\n }),\n onCf: () =>\n addCreditCardStandardLoan({\n currentBalance: newValues.currentBalance,\n creditCardLimit: newValues.creditCardLimit,\n }),\n onOvd: () =>\n addCreditCardStandardLoan({\n currentBalance: newValues.currentBalance,\n creditCardLimit: newValues.creditCardLimit,\n }),\n }),\n taskEither.chain(creditCard =>\n taskEither.fromIO(() => props.onSave(creditCard))\n )\n ),\n initialValues =>\n pipe(\n foldLiabilitiesVariant(props.variant, {\n onMtg: () =>\n editCreditCard({\n ...newValues,\n manuallyAdded: formSetup.manuallyAdded,\n recordId: initialValues.recordId,\n }),\n onCf: () =>\n editCreditCardStandardLoan({\n currentBalance: newValues.currentBalance,\n creditCardLimit: newValues.creditCardLimit,\n recordId: initialValues.recordId,\n }),\n onOvd: () =>\n editCreditCardStandardLoan({\n currentBalance: newValues.currentBalance,\n creditCardLimit: newValues.creditCardLimit,\n recordId: initialValues.recordId,\n }),\n }),\n taskEither.chain(creditCard =>\n taskEither.fromIO(() => props.onSave(creditCard))\n )\n )\n )\n )\n )\n )\n )\n ),\n }\n );\n\n const previousEdit = usePrevious(formSetup.edit);\n useEffect(() => {\n if (!formSetup.edit || formSetup.edit === previousEdit) return;\n\n setValues({\n repaidBeforeDisbursement: pipe(\n values.repaidBeforeDisbursement,\n toFalse,\n option.some\n ),\n changeLimit: pipe(values.changeLimit, toFalse, option.some),\n });\n }, [formSetup, previousEdit, values, setValues]);\n\n const handleCancel = () => {\n pipe(props.initialValues, formStateFromInitialValues, setValues);\n props.onCancel();\n };\n\n const providerFieldProps = fieldProps(\"provider\");\n const providerOnChange = (value: Option>) => {\n providerFieldProps.onChange(dropdownOptionToValue(value));\n };\n\n const displayedFields = getDisplayedFields(values, formSetup, props.variant);\n\n const displayProductIsUsed = () => {\n if (props.variant === \"OVD\" && r8EnableSimpleRefinancing) {\n return <>;\n }\n\n if (\n r8EnableSimpleRefinancing &&\n toFalse(\n pipe(\n props.initialValues,\n option.chain(i => i.includedInBonita)\n )\n )\n ) {\n return (\n \n );\n } else {\n return (\n \n );\n }\n };\n\n const removeUCBProviderCode = (\n providersList: DropdownOption[],\n manuallyAdded: boolean\n ) => {\n return !manuallyAdded\n ? providersList\n : providersList.filter(\n provider =>\n provider.value !=\n foldTenant(\n tenant,\n () => \"1111\",\n () => \"2700\"\n )\n );\n };\n\n return (\n \n {(displayedFields.currentBalance || displayedFields.creditCardLimit) && (\n \n {displayedFields.currentBalance ? (\n \n ) : null}\n {displayedFields.creditCardLimit ? (\n \n ) : null}\n \n )}\n\n {displayedFields.repaidBeforeDisbursement && formSetup.edit && (\n \n \n pipe(\n newValue,\n option.some,\n fieldProps(\"repaidBeforeDisbursement\").onChange\n )\n }\n issues={formatIssues(\n \"repaidBeforeDisbursement\",\n fieldProps(\"repaidBeforeDisbursement\").issues\n )}\n />\n \n )}\n\n {displayedFields.changeLimit && formSetup.edit && (\n \n \n pipe(newValue, option.some, fieldProps(\"changeLimit\").onChange)\n }\n />\n \n )}\n\n {getChangeLimitDisbursementConflict(\n values.repaidBeforeDisbursement,\n values.changeLimit\n ) && (\n \n )}\n\n {(displayedFields.provider || displayedFields.contractNumber) && (\n \n {displayedFields.provider ? (\n \n ) : null}\n\n {displayedFields.contractNumber ? (\n \n pipe(\n value,\n option.fromPredicate(value => value.length > 0),\n fieldProps(\"contractNumber\").onChange\n )\n }\n label={formatMessage(\n !formSetup.isACPhase && formSetup.edit\n ? \"Mortgage.CBResults.Liabilities.contractNumberOptional\"\n : \"Mortgage.CBResults.Liabilities.contractNumber\"\n )}\n placeholder={formatMessage(\n \"Mortgage.CBResults.Liabilities.contractNumber\"\n )}\n edit={formSetup.edit}\n issues={formatIssues(\n \"contractNumber\",\n fieldProps(\"contractNumber\").issues\n )}\n feedback={formatFeedback(\"contractNumber\")}\n />\n ) : null}\n \n )}\n\n {displayedFields.newCreditCardLimit && (\n \n \n {null}\n \n )}\n\n {!formSetup.edit && toFalse(values.changeLimit) && (\n \n )}\n {!formSetup.edit && toFalse(values.repaidBeforeDisbursement) && (\n \n )}\n {!formSetup.edit &&\n toFalse(\n pipe(\n props.initialValues,\n option.chain(i => i.usedForRefinance)\n )\n ) &&\n props.variant !== \"OVD\" ? (\n \n ) : null}\n\n {displayProductIsUsed()}\n\n {formSetup.isACPhase &&\n !formSetup.edit &&\n !checkRequiredFieldsProvided(\n values,\n getRequiredFields(values, formSetup, props.variant)\n ) &&\n (toFalse(values.changeLimit) ||\n toFalse(values.repaidBeforeDisbursement)) && (\n \n )}\n\n {formSetup.edit ? (\n ({\n normal: formatMessage(\"Liabilities.Add\"),\n loading: formatMessage(\"Liabilities.Add\"),\n error: formatMessage(\"Liabilities.Add\"),\n success: formatMessage(\"Liabilities.Add\"),\n }),\n () => ({\n normal: formatMessage(\"Save\"),\n loading: formatMessage(\"Save\"),\n error: formatMessage(\"Save\"),\n success: formatMessage(\"Save\"),\n })\n )\n ),\n disabled: false,\n variant: \"loading\",\n type: \"submit\",\n }, // as Action\n ]}\n />\n ) : (\n \n \n\n {formSetup.manuallyAdded && !props.isViewMode && (\n \n )}\n \n {foldLiabilitiesVariant(props.variant, {\n onCf: () =>\n formSetup.manuallyAdded ? (\n \n ) : null,\n onOvd: () =>\n formSetup.manuallyAdded ? (\n \n ) : null,\n onMtg: () =>\n pipe(\n props.isViewMode,\n boolean.fold(\n () => (\n \n ),\n constNull\n )\n ),\n })}\n \n )}\n \n );\n}\n","import \"!../../../../node_modules/extract-css-chunks-webpack-plugin/dist/loader.js!css-loader?{\\\"modules\\\":false,\\\"url\\\":false}!./Section.treat.1roA_MZ.css\";\nexport var documentTimestamp = '_37R28';\nexport var noteTitle = 'GfY-D';\nexport var noteBody = '_1z1Qe';\nexport var subProperty = '_1k6gm';\nexport var exceptionComment = '_3uAEZ';\nexport var subPropertyWrapper = '_2k5rq';","import { NonNegativeInteger, PositiveInteger } from \"design-system\";\nimport { array, option } from \"fp-ts\";\nimport { pipe } from \"fp-ts/function\";\nimport { Option } from \"fp-ts/Option\";\nimport { NumberFromString } from \"io-ts-types/lib/NumberFromString\";\nimport { ApplicantRecord } from \"../domain\";\nimport {\n SelectedApplicant,\n selectedCoApplicant,\n selectedMainApplicant,\n} from \"../mortgageDashboardUtils\";\n\n/* There isn't a better-provided value to identify the main applicant, \n applicantIndex value eq \"0\" should always represent the main applicant. \n Currently positional access at first element guarantees the main applicant in many parts of codebase\n (investigate if BFF, in the future, will provide a properly value or fields to detect the main applicant from list)\n*/\nexport function getMainApplicant(applicants: ApplicantRecord): Option {\n return pipe(\n applicants,\n array.findFirst(applicant => applicant.applicantIndex === 0),\n option.map(({ data }) => data)\n );\n}\n\nexport function getCurrentApplicant(\n selectedApplicant: SelectedApplicant,\n applicants: ApplicantRecord\n): Option {\n return pipe(\n applicants,\n array.findFirst(\n applicant => applicant.applicantIndex === selectedApplicant.index\n ),\n option.map(({ data }) => data)\n );\n}\n\nexport function getCoApplicant(applicants: ApplicantRecord): Option {\n return pipe(\n applicants,\n array.findFirst(applicant => applicant.applicantIndex === 1),\n option.map(({ data }) => data)\n );\n}\n\nexport function selectedApplicantFromIndex(\n index: NonNegativeInteger\n): SelectedApplicant {\n return PositiveInteger.is(index)\n ? selectedCoApplicant(index)\n : selectedMainApplicant;\n}\n\nexport function selectedApplicantFromStringIndex(\n applicantIndex: String\n): Option {\n return pipe(\n applicantIndex,\n NumberFromString.pipe(NonNegativeInteger).decode,\n option.fromEither,\n option.map(selectedApplicantFromIndex)\n );\n}\n","import * as t from \"io-ts\";\nimport { eq } from \"fp-ts\";\nimport { apiCall } from \"../../APICall\";\nimport { NonEmptyString } from \"io-ts-types/lib/NonEmptyString\";\nimport { constFalse } from \"fp-ts/function\";\nimport {\n CompressedFileContent,\n MoneyAmount,\n optionFromUndefined,\n} from \"../../globalDomain\";\nimport { optionFromNullable } from \"io-ts-types/lib/optionFromNullable\";\nimport { ApplicantsRecordC, withApplicantIndex } from \"../domain\";\nimport { LocalizedString, PositiveInteger } from \"design-system\";\nimport { RuntimeLocaleKey } from \"../../intl\";\nimport { SubPropertyType } from \"../PropertyAndAppraisal/domain\";\nimport { LoanPurpose } from \"../PurposeAndFinancing/domain\";\nimport { IncomeSource } from \"../Bonita/Income/domain\";\nimport { DocumentMime } from \"../../Common/documentAPI\";\nimport { SealingStatus } from \"../../UploadDocuments/domain\";\n\nconst FilenetDocumentType = t.keyof({\n NA: true,\n PROOF_OF_INCOME: true,\n});\nconst Product = t.keyof({\n MORTGAGE: true,\n CL: true,\n SL: true,\n TL: true,\n RPL: true,\n RL: true,\n});\nconst DocumentSlot = t.keyof({\n First: true,\n Second: true,\n});\nexport type DocumentSlot = t.TypeOf;\n\nconst DocumentTab = t.keyof({\n Identity: true,\n Income: true,\n Purpose: true,\n Property: true,\n Others: true,\n});\nexport type DocumentTab = t.TypeOf;\n\nconst RestoreDeletedDocumentInput = t.type({\n docTypeId: NonEmptyString,\n applicantIndex: optionFromUndefined(t.string),\n applicationElementId: optionFromNullable(t.string),\n});\n\nexport const restoreDeletedDocument = apiCall({\n inputCodec: RestoreDeletedDocumentInput,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: t.unknown,\n path: [\"packages\", \"mortgage\", \"document\", \"restoreDeleteRequired\"],\n});\n\nconst DeleteRequiredDocumentInput = t.type({\n docTypeId: NonEmptyString,\n applicantIndex: optionFromUndefined(t.string),\n applicationElementId: optionFromNullable(t.string),\n});\n\nexport const deleteRequiredDocument = apiCall({\n inputCodec: DeleteRequiredDocumentInput,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: t.unknown,\n path: [\"packages\", \"mortgage\", \"document\", \"deleteRequired\"],\n});\n\nconst RemoveDocumentInput = t.type({\n docId: NonEmptyString,\n});\n\nexport const removeDocument = apiCall({\n inputCodec: RemoveDocumentInput,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: t.unknown,\n path: [\"packages\", \"mortgage\", \"document\", \"remove\"],\n});\n\nexport const removeDocumentByClient = apiCall({\n inputCodec: RemoveDocumentInput,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: t.unknown,\n path: [\"packages\", \"mortgage\", \"document\", \"removeClient\"],\n});\n\nconst documentsModifiedInput = t.type({\n applicantIndex: t.string,\n});\n\nconst eqDocumentsModifiedInput = eq.getStructEq({\n applicantIndex: eq.eqString,\n});\n\nconst documentsModifiedOutput = t.type({\n value: t.boolean,\n});\n\nexport const documentsModified = apiCall({\n inputCodec: documentsModifiedInput,\n inputEq: eqDocumentsModifiedInput,\n outputCodec: documentsModifiedOutput,\n path: [\"packages\", \"mortgage\", \"document\", \"check\"],\n});\n\nconst DocumentUploadStatus = t.keyof({\n OK: true,\n TECHNICAL_ERROR: true,\n FILE_SIZE_ERROR: true,\n FORMAT_NOT_SUPPORTED: true,\n});\nexport type DocumentUploadStatus = t.TypeOf;\n\nconst NoteUploadStatus = t.keyof({\n OK: true,\n TECHNICAL_ERROR: true,\n});\n\nconst DocumentConfirmOutput = t.type({\n status: NoteUploadStatus,\n});\nexport type DocumentConfirmOutput = t.TypeOf;\n\nconst DocumentConfirmInput = t.type({\n note: optionFromNullable(t.string),\n});\n\nexport const documentConfirm = apiCall({\n inputCodec: DocumentConfirmInput,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: DocumentConfirmOutput,\n path: [\"packages\", \"mortgage\", \"document\", \"confirm\"],\n});\n\nexport const proofOfIncomeConfirm = apiCall({\n inputCodec: withApplicantIndex(DocumentConfirmInput),\n inputEq: eq.fromEquals(constFalse),\n outputCodec: DocumentConfirmOutput,\n path: [\"clients\", \"identification\", \"document\", \"confirm\"],\n});\n\nexport const documentCancel = apiCall({\n inputCodec: t.void,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: t.unknown,\n path: [\"packages\", \"mortgage\", \"document\", \"cancel\"],\n});\n\nexport const proofOfIncomeCancel = apiCall({\n inputCodec: t.void,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: t.unknown,\n path: [\"clients\", \"identification\", \"document\", \"cancel\"],\n});\n\nconst RequiredDocument = t.type({\n applicationElementID: optionFromNullable(NonEmptyString),\n clientID: optionFromNullable(NonEmptyString),\n documentTypeID: NonEmptyString,\n documentTypeName: RuntimeLocaleKey,\n section: t.string,\n translationCode: t.string,\n maxLengthNote: PositiveInteger,\n deletedRequiredDocument: optionFromNullable(t.boolean),\n});\nexport type RequiredDocument = t.TypeOf;\n\nexport const UploadedDocument = t.type({\n applicationElementId: optionFromNullable(t.string),\n clientID: optionFromNullable(t.string),\n comment: t.string,\n docHash: t.string,\n docId: NonEmptyString,\n docTitle: RuntimeLocaleKey,\n docType: t.string,\n docTypeId: t.string,\n docTypeName: t.string,\n docset: t.string,\n isReadUpdateTime: t.number,\n mimeType: t.string,\n read: t.boolean,\n sealedDocHash: t.string,\n sealedDocId: t.string,\n section: DocumentTab,\n suffix: t.string,\n timestampAdded: t.number,\n applicantIndex: optionFromNullable(t.string),\n});\nexport type UploadedDocument = t.TypeOf;\n\nexport const LiabilityInfo = t.type({\n providerName: LocalizedString,\n typeOfProduct: LocalizedString,\n moneyAmount: MoneyAmount,\n});\n\nexport const Document = t.type({\n note: optionFromNullable(t.string),\n requiredDocument: RequiredDocument,\n uploadedDocument: optionFromNullable(UploadedDocument),\n exceptionComment: optionFromNullable(t.string),\n additionalInfo: optionFromNullable(LiabilityInfo),\n});\nexport type Document = t.TypeOf;\n\nexport const OptionalDocument = t.type({\n note: optionFromNullable(t.string),\n uploadedDocument: UploadedDocument,\n});\nexport const NewRequiredDocument = t.type({\n note: optionFromNullable(t.string),\n uploadedDocument: UploadedDocument,\n});\nexport type OptionalDocument = t.TypeOf;\n\nconst PropertyAdditionalData = t.type({\n type: t.literal(\"Property\"),\n propertyCity: LocalizedString,\n propertyNumber: LocalizedString,\n propertyStreet: LocalizedString,\n propertyType: SubPropertyType,\n});\nconst IncomeAdditionalData = t.type({\n type: t.literal(\"Income\"),\n incomeType: IncomeSource,\n companyName: optionFromNullable(LocalizedString),\n});\nconst PurposeAdditionalData = t.type({\n type: t.literal(\"Purpose\"),\n purposeType: LoanPurpose,\n});\n\nconst AllAdditionalData = t.union([\n PropertyAdditionalData,\n IncomeAdditionalData,\n PurposeAdditionalData,\n]);\nexport type AllAdditionalData = t.TypeOf;\n\nconst SectionData = t.type({\n additionalData: optionFromNullable(AllAdditionalData),\n sectionDocuments: optionFromNullable(t.array(Document)),\n sectionName: optionFromNullable(RuntimeLocaleKey),\n sectionElementId: optionFromNullable(t.string),\n});\n\nexport type SectionData = t.TypeOf;\n\nconst ExtendedSectionData = t.intersection([\n SectionData,\n t.type({\n subpropertyList: t.array(SectionData),\n appraisalSection: optionFromNullable(SectionData),\n }),\n]);\nexport type ExtendedSectionData = t.TypeOf;\n\nconst ProceedWithDocumentsOutput = t.type({\n optionalDocuments: t.array(OptionalDocument),\n applicantDocumentSections: ApplicantsRecordC(\n t.type({\n identityDocumentsSection: optionFromNullable(SectionData),\n incomeDocumentsSections: t.array(SectionData),\n })\n ),\n allowDeleteRequiredDoc: optionFromNullable(t.boolean),\n commonDocumentsSection: t.type({\n otherDocumentsSections: optionFromNullable(SectionData),\n propertyDocumentsSections: t.array(ExtendedSectionData),\n purposeDocumentsSections: t.array(SectionData),\n }),\n});\nexport type ProceedWithDocumentsOutput = t.TypeOf<\n typeof ProceedWithDocumentsOutput\n>;\n\nexport const proceedWithDocuments = apiCall({\n inputCodec: t.void,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: ProceedWithDocumentsOutput,\n path: [\"packages\", \"mortgage\", \"document\", \"proceedWithDocuments\"],\n});\n\nexport const requestRequiredDocuments = apiCall({\n inputCodec: t.void,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: t.unknown,\n path: [\"packages\", \"mortgage\", \"document\", \"requestRequiredDocuments\"],\n});\n\nconst RequiredDocumentsStatusOutput = t.type({\n requiredDocumentsStatus: t.keyof({\n Complete: true,\n Error: true,\n ErrorInvalid: true,\n InProgress: true,\n Timeout: true,\n Todo: true,\n }),\n});\n\nexport const requiredDocumentsStatus = apiCall({\n inputCodec: t.void,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: RequiredDocumentsStatusOutput,\n path: [\"packages\", \"mortgage\", \"document\", \"requiredDocumentsStatus\"],\n});\n\nconst UploadDocumentInput = t.type({\n documentContent: CompressedFileContent,\n fileName: t.string,\n documentTypeID: NonEmptyString,\n applicationNumber: t.string,\n mimeType: DocumentMime,\n applicantIndex: optionFromNullable(t.string),\n});\n\nconst UploadRequiredDocumentInput = t.intersection([\n UploadDocumentInput,\n t.type({\n sectionElementId: optionFromNullable(t.string),\n }),\n]);\n\nconst UploadClientRequiredDocumentInput = t.intersection([\n UploadDocumentInput,\n t.type({\n sectionElementId: optionFromNullable(t.string),\n uploaderApplicantIndex: t.string,\n }),\n]);\n\nexport const UploadDocumentOutput = t.type({\n status: DocumentUploadStatus,\n});\nexport type UploadDocumentOutput = t.TypeOf;\n\nexport const ConfirmDocumentUploadOutput = t.type({\n status: NoteUploadStatus,\n});\nexport type ConfirmDocumentUploadOutput = t.TypeOf<\n typeof ConfirmDocumentUploadOutput\n>;\n\nexport const uploadRequiredDocument = apiCall({\n inputCodec: UploadRequiredDocumentInput,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: UploadDocumentOutput,\n path: [\"packages\", \"mortgage\", \"document\", \"uploadRequiredDocument\"],\n});\n\nexport const uploadClientRequiredDocument = apiCall({\n inputCodec: UploadClientRequiredDocumentInput,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: UploadDocumentOutput,\n path: [\"packages\", \"mortgage\", \"document\", \"uploadClientRequiredDocument\"],\n});\n\nconst UploadProofOfIncomeDocumentInput = t.type({\n applicantIndex: t.string,\n filenetDocumentType: FilenetDocumentType,\n product: Product,\n fileContent: CompressedFileContent,\n docTypeId: NonEmptyString,\n applicationElementID: optionFromUndefined(NonEmptyString),\n});\n\nexport const uploadProofOfIncomeDocument = apiCall({\n path: [\"clients\", \"identification\", \"document\", \"upload\"],\n inputCodec: UploadProofOfIncomeDocumentInput,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: UploadDocumentOutput,\n});\n\nexport const uploadProofOfIncomeDocumentByClient = apiCall({\n path: [\"clients\", \"identification\", \"document\", \"uploadClient\"],\n inputCodec: UploadProofOfIncomeDocumentInput,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: UploadDocumentOutput,\n});\n\nconst UploadProofOfIncomeDocumentsMobileInput = t.type({\n product: Product,\n docTypeId: NonEmptyString,\n applicationElementID: NonEmptyString,\n filenetDocumentType: FilenetDocumentType,\n firstPage: t.type({\n content: CompressedFileContent,\n mimeType: DocumentMime,\n }),\n sameDevice: t.boolean,\n});\n\nexport const uploadProofOfIncomeDocumentMobile = apiCall({\n path: [\"clients\", \"identification\", \"mobileUpload\", \"document\"],\n inputCodec: UploadProofOfIncomeDocumentInput,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: UploadDocumentOutput,\n});\n\nexport const proofOfIncomeMortgageComplete = apiCall({\n path: [\"packages\", \"mortgage\", \"document\", \"complete\"],\n inputCodec: t.void,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: t.unknown,\n});\n\nexport const uploadPOIByClient = apiCall({\n path: [\"packages\", \"loans\", \"standard-loan\", \"document\", \"uploadPOIByClient\"],\n inputCodec: UploadProofOfIncomeDocumentsMobileInput,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: UploadDocumentOutput,\n});\n\nexport const proofOfIncomeCfComplete = apiCall({\n path: [\"clients\", \"identification\", \"mobileUpload\", \"cf\", \"complete\"],\n inputCodec: t.void,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: t.unknown,\n});\n\nexport const proofOfIncomeMortgageCompleteMobile = apiCall({\n path: [\"clients\", \"identification\", \"mobileUpload\", \"complete\"],\n inputCodec: t.void,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: t.unknown,\n});\n\nconst UploadOptionalDocumentInput = t.intersection([\n UploadDocumentInput,\n t.type({\n section: t.keyof({\n Income: true,\n Purpose: true,\n Property: true,\n Identity: true,\n Others: true,\n NewRequiredDocuments: true,\n }),\n }),\n]);\n\nconst UploadClientOptionalDocumentInput = t.intersection([\n UploadDocumentInput,\n t.type({\n uploaderApplicantIndex: t.string,\n section: t.keyof({\n Income: true,\n Purpose: true,\n Property: true,\n Identity: true,\n Others: true,\n NewRequiredDocuments: true,\n }),\n }),\n]);\n\nconst UploadOptionalDocumentOutput = t.intersection([\n UploadDocumentOutput,\n t.type({\n maxLengthNote: PositiveInteger,\n }),\n]);\n\nexport const uploadOptionalDocument = apiCall({\n inputCodec: UploadOptionalDocumentInput,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: UploadOptionalDocumentOutput,\n path: [\"packages\", \"mortgage\", \"document\", \"uploadOptionalDocument\"],\n});\n\nexport const uploadClientOptionalDocument = apiCall({\n inputCodec: UploadClientOptionalDocumentInput,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: UploadOptionalDocumentOutput,\n path: [\"packages\", \"mortgage\", \"document\", \"uploadClientOptionalDocument\"],\n});\n\nexport const exitDocumentsSection = apiCall({\n inputCodec: t.void,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: t.unknown,\n path: [\"packages\", \"mortgage\", \"document\", \"exit\"],\n});\n\nconst SkipOrEditDocumentInput = t.type({\n docTypeId: NonEmptyString,\n comment: t.string,\n applicantIndex: optionFromUndefined(t.string),\n});\n\nexport const skipDocument = apiCall({\n inputCodec: SkipOrEditDocumentInput,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: t.unknown,\n path: [\"packages\", \"mortgage\", \"document\", \"skipDocument\"],\n});\n\nexport const editDocumentComment = apiCall({\n inputCodec: SkipOrEditDocumentInput,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: t.unknown,\n path: [\"packages\", \"mortgage\", \"document\", \"editDocumentComment\"],\n});\n\nconst sendEmailInput = t.type({\n applicantIndex: t.string,\n notes: optionFromUndefined(NonEmptyString),\n});\n\nexport const sendEmail = apiCall({\n inputCodec: sendEmailInput,\n inputEq: eq.fromEquals(constFalse),\n path: [\"packages\", \"mortgage\", \"email\", \"client\"],\n});\n\nconst ClientUploadLinkStatusOutput = t.type({\n status: t.keyof({\n SENT: true,\n NOT_SENT: true,\n APP_SENT_TO_BANK: true,\n }),\n applicantIndex: optionFromUndefined(t.string),\n});\n\nexport const clientUploadLinkStatus = apiCall({\n inputCodec: t.void,\n inputEq: eq.fromEquals(constFalse),\n path: [\"packages\", \"mortgage\", \"document\", \"clientUploadLinkStatus\"],\n outputCodec: ClientUploadLinkStatusOutput,\n});\n\nconst ProofOfIncomeSealingStatusInput = t.type({\n docTypeId: NonEmptyString,\n appElementId: NonEmptyString,\n});\n\nconst ProofOfIncomeSealingStatusOutput = t.type({ status: SealingStatus });\n\nexport const ProofOfIncomeSealingStatus = apiCall({\n path: [\"packages\", \"loans\", \"standard-loan\", \"document\", \"getSealingStatus\"],\n inputCodec: ProofOfIncomeSealingStatusInput,\n inputEq: eq.fromEquals(constFalse),\n outputCodec: ProofOfIncomeSealingStatusOutput,\n});\n","import { Box, DropdownOption, Stack } from \"design-system\";\nimport { LiabilitySection } from \"./LiabilitySection\";\nimport { array, option } from \"fp-ts\";\nimport { pipe, constFalse, constTrue, constVoid } from \"fp-ts/function\";\nimport { Option } from \"fp-ts/Option\";\nimport {\n CreditCard,\n LoanList,\n ReworkConsumerLoanOrMortgage,\n ReworkCreditCard,\n} from \"../../domain\";\nimport { useFormatMessage } from \"../../../intl\";\nimport { SelectedApplicant } from \"../../mortgageDashboardUtils\";\nimport { EditSection } from \"./EditSection\";\nimport { CreditCardForm } from \"./CreditCardForm\";\nimport { NonEmptyString } from \"io-ts-types/NonEmptyString\";\nimport { AmountLimit } from \"../../api\";\nimport { LiabilitiesVariant } from \"./Liabilities\";\n\ntype Props = {\n isInteractingWithAnyForm: boolean;\n creditCardsList: Array;\n selectedApplicant: SelectedApplicant;\n isAdding: boolean;\n isACPhase: boolean;\n isViewMode: boolean;\n editingRecordID: Option;\n\n onEdit: (creditCard: CreditCard) => unknown;\n onCancel: () => unknown;\n onAdding: (type: keyof LoanList) => unknown;\n onAdd: (creditCard: CreditCard) => unknown;\n onRemove: (recordId: NonEmptyString) => unknown;\n onEditing: (recordId: NonEmptyString) => unknown;\n providersList: DropdownOption[];\n amountLimits: {\n [key in \"ccAndOvdCurrentBalance\" | \"ccAndOvdLimit\"]: AmountLimit;\n };\n variant: LiabilitiesVariant;\n getReworkCreditCard: (recordId: NonEmptyString) => Option;\n getReworkConsumerLoan: (\n recordId: NonEmptyString\n ) => Option;\n};\n\nexport function CreditCardStack(props: Props) {\n const formatMessage = useFormatMessage();\n\n const { left: creditCardsList, right: manuallyAddedCreditCardsList } = pipe(\n props.creditCardsList,\n array.partition(creditCard => creditCard.manuallyAdded)\n );\n\n const creditCardsFormat = (credit: CreditCard) => {\n const reworkCreditCard = props.getReworkCreditCard(credit.recordId);\n\n return (\n \n props.onEditing(credit.recordId)}\n onRemove={() => props.onRemove(credit.recordId)}\n isACPhase={props.isACPhase}\n isInteractingWithAnyForm={props.isInteractingWithAnyForm}\n selectedApplicant={props.selectedApplicant}\n providersList={props.providersList}\n amountLimits={props.amountLimits}\n edit={\n !props.isViewMode &&\n pipe(\n props.editingRecordID,\n option.filter(id => id === credit.recordId),\n option.fold(constFalse, constTrue)\n )\n }\n isViewMode={props.isViewMode}\n variant={props.variant}\n reworkCreditCard={reworkCreditCard}\n />\n \n );\n };\n\n const newCreditCardData = {\n label: formatMessage(\"Mortgage.CBResults.Liabilities.addCreditCards\"),\n action: () => props.onAdding(\"creditCardsList\"),\n disabled: props.isInteractingWithAnyForm,\n };\n\n return (\n \n \n !props.isViewMode &&\n !props.isAdding &&\n manuallyAddedCreditCardsList.length === 0\n )\n )}\n />\n {manuallyAddedCreditCardsList.length > 0 && (\n !props.isViewMode && !props.isAdding)\n )}\n />\n )}\n {props.isAdding && (\n \n \n \n )}\n \n );\n}\n","import {\n Box,\n Button,\n Form,\n TextField,\n Space,\n DropdownOption,\n CheckboxField,\n FormSection,\n useLoadingStatusRead,\n Card,\n ComputedFieldProps,\n} from \"design-system\";\nimport { useFormatMessage } from \"../intl\";\nimport { option } from \"fp-ts\";\nimport { Option } from \"fp-ts/Option\";\nimport { ReasonNote } from \"./domain\";\nimport { useAppContext } from \"../useAppContext\";\n\nimport { pipe } from \"fp-ts/function\";\nimport { dropdownOptionToValue } from \"../Common/selectDropdownOption\";\nimport * as kycApi from \"./api\";\nimport { DropdownField } from \"../Common/DropdownField/DropdownField\";\n\nexport type TaxPayerCountryFormModel = {\n country: Option>;\n TIN: string;\n note: Option>;\n countryRequiresTIN: boolean;\n noTIN: boolean;\n};\n\nexport function TaxPayerCountryForm(props: {\n namePrefix: string;\n onRemove: () => unknown;\n showRemoveButton: boolean;\n onChangeValues: (value: TaxPayerCountryFormModel) => void;\n fieldProps: (\n name: K\n ) => ComputedFieldProps;\n noteOptions: DropdownOption[];\n countryOptions: DropdownOption[];\n}) {\n const formatMessage = useFormatMessage();\n const { isSubmitting } = useLoadingStatusRead();\n\n const {\n config: { tinByCountryURL },\n } = useAppContext();\n\n const isTinRequired = props.fieldProps(\"countryRequiresTIN\").value;\n\n function resetForm(newCountry: Option>) {\n props.onChangeValues({\n country: newCountry,\n TIN: \"\",\n note: option.none,\n countryRequiresTIN: pipe(\n newCountry,\n dropdownOptionToValue,\n option.exists(c => c.TIN)\n ),\n noTIN: false,\n });\n }\n\n const handleOnCountryChange = (\n newCountry: Option>\n ) => {\n resetForm(newCountry);\n };\n\n const handleChangeNoTin = (noTIN: boolean) => {\n props.onChangeValues({\n TIN: \"\",\n note: option.none,\n country: props.fieldProps(\"country\").value,\n countryRequiresTIN: props.fieldProps(\"countryRequiresTIN\").value,\n noTIN: noTIN,\n });\n };\n\n return (\n \n \n \n {props.showRemoveButton && (\n \n )}\n \n \n
\n \n \n window.open(tinByCountryURL, \"_blank\"),\n }}\n disabled={\n props.fieldProps(\"noTIN\").value ||\n !isTinRequired ||\n isSubmitting\n }\n />\n {isTinRequired && (\n \n )}\n {isTinRequired && props.fieldProps(\"noTIN\").value && (\n <>\n \n \n \n )}\n \n
\n
\n
\n );\n}\n","import { Stack, Body, Dialog } from \"design-system\";\nimport { option } from \"fp-ts\";\nimport { useFormatMessage } from \"../intl\";\n\ntype Props = {\n onDismiss: () => unknown;\n};\n\nexport function RiskyActivitiesDialog(props: Props) {\n const formatMessage = useFormatMessage();\n return (\n \n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity0`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity1`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity2`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity3`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity4`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity5`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity6`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity7`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity8`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity9`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity10`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity11`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity12`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity13`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity14`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity15`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity16`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity17`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity18`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity19`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity20`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity21`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity22`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity23`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity24`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity25`)}\n \n \n {formatMessage(`KYC.RiskyActivitiesModal.activity26`)}\n \n \n \n );\n}\n","import { NonEmptyString } from \"io-ts-types/lib/NonEmptyString\";\nimport { either, option, taskEither } from \"fp-ts\";\nimport { Option } from \"fp-ts/Option\";\nimport { pipe } from \"fp-ts/function\";\nimport * as api from \"./api\";\nimport { FileContent, PositiveInteger } from \"design-system\";\nimport { DocumentUploadError } from \"../../Common/Dialogs/DocumentUploadDialog/domain\";\nimport { foldTenant, Tenant } from \"../../globalDomain\";\nimport { DocumentMime } from \"../../Common/documentAPI\";\n\nexport type StepStatus = \"complete\" | \"active\";\n\nexport type DocumentFlow =\n | {\n variant: \"MainPage\";\n }\n | {\n variant: \"ExceptionProcess\";\n }\n | {\n variant: \"UploadRequiredDocument\";\n document: api.Document;\n sectionElementId: Option;\n }\n | {\n variant: \"UploadOptionalDocument\";\n dialogDocId: NonEmptyString;\n documentTab: api.DocumentTab;\n }\n | {\n variant: \"UploadProofOfIncomeDocument\";\n document: api.Document;\n }\n | {\n variant: \"RemoveDocument\";\n document: api.UploadedDocument;\n }\n | {\n variant: \"ViewDocument\";\n document: api.UploadedDocument;\n }\n | {\n variant: \"ExceptionProcessWithDocument\";\n document: api.Document;\n }\n | {\n variant: \"DeleteRequiredDocument\";\n document: api.Document;\n sectionElementId: Option;\n }\n | {\n variant: \"RestoreDeletedDocument\";\n document: api.Document;\n sectionElementId: Option;\n }\n | {\n variant: \"DeleteRequiredDocumentAlreadyUploaded\";\n uploadedDocument: api.UploadedDocument;\n };\n\nexport type UploadResultTaskEither = taskEither.TaskEither<\n DocumentUploadError,\n {\n status: api.DocumentUploadStatus;\n maxLengthNote: PositiveInteger;\n fileType: DocumentMime;\n fileBase64: FileContent;\n }\n>;\n\nexport type OtherDocumentsDropdownKey =\n | \"OtherDocuments\"\n | \"RealEstateDocuments\"\n | \"LoanDocuments\"\n | \"ReceiptDocuments\";\n\nexport const optionalDocumentToIdMapCZ: Record<\n OtherDocumentsDropdownKey,\n NonEmptyString\n> = {\n OtherDocuments: \"37E51279-028C-487C-8B72-669949883EF2\" as NonEmptyString,\n RealEstateDocuments: \"3B566DD0-2C8A-4F05-86E4-C1C0362E9B4E\" as NonEmptyString,\n LoanDocuments: \"968C02C8-6957-4898-8FDA-EFCA9B117B8B\" as NonEmptyString,\n ReceiptDocuments: \"D6330AE7-CE1C-4780-84F6-F71EF7935C8A\" as NonEmptyString,\n};\n\nexport const optionalDocumentToIdMapSK: Record<\n OtherDocumentsDropdownKey,\n NonEmptyString\n> = {\n OtherDocuments: \"11046937-948E-44B7-8609-FD6723E19102\" as NonEmptyString,\n RealEstateDocuments: \"B1F406EF-FE1F-4A88-8200-6F7B94FC1931\" as NonEmptyString,\n LoanDocuments: \"F4CB6B87-3E72-4281-884B-E6D7B645E871\" as NonEmptyString,\n ReceiptDocuments: \"6AEE7CEC-B766-4E98-9BE2-FC08FF44F289\" as NonEmptyString,\n};\n\nexport const optionalDocumentToIdMap = (tenant: Tenant) =>\n foldTenant(\n tenant,\n () => optionalDocumentToIdMapSK,\n () => optionalDocumentToIdMapCZ\n );\n\nexport const fileTypes = Object.keys(DocumentMime.keys) as Array;\nexport const proofOfIncomeFileTypes = [\"application/pdf\" as const];\nexport const fileTypeExtMap: { [key in DocumentMime]: string } = {\n \"application/pdf\": \".pdf\",\n \"application/vnd.ms-outlook\": \".msg\",\n \".msg\": \".msg\",\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \".xlsx\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\":\n \".docx\",\n \"image/jpeg\": \".jpg\",\n \"image/tiff\": \".tiff\",\n};\n\nexport const fileTypesExts = fileTypes.map(it => fileTypeExtMap[it]);\n\nexport type DocumentManagement = {\n openDialogWithDocument: (\n document: api.Document,\n sectionElementId: Option\n ) => void;\n openRemoveDialog: (document: api.UploadedDocument) => void;\n openViewDialog: (document: api.UploadedDocument) => void;\n openExceptionDialog: (document: api.Document) => void;\n openDeleteRequiredDialog: (\n document: api.Document,\n sectionElementId: Option\n ) => void;\n openRestoreDeleteRequiredDialog: (\n document: api.Document,\n sectionElementId: Option\n ) => void;\n openDeleteRequiredAlreadyUploadedDialog: (\n uploadedDocument: api.UploadedDocument\n ) => void;\n isExceptionProcess: boolean;\n isViewMode: boolean;\n};\n\nexport type DataVariants =\n | {\n variant: \"SectionData\";\n data: api.SectionData;\n }\n | {\n variant: \"SectionDataArray\";\n data: api.SectionData[];\n }\n | {\n variant: \"ExtendedSectionDataArray\";\n data: api.ExtendedSectionData[];\n };\n\nexport type DataVariantsNoArray =\n | {\n variant: \"SectionData\";\n data: api.SectionData;\n }\n | {\n variant: \"ExtendedSectionData\";\n data: api.ExtendedSectionData;\n };\n\nconst proofOfIncomeDocuments = [\n \"3A58A263-20C3-CD1C-AF12-6489C5800000\",\n \"C6A621E6-E74B-CEC5-B577-6489C5800000\",\n \"FD0F265F-BFD6-4FCA-8552-7BAF120EF671\",\n \"D61C4D0F-1CDD-4112-8B98-D682B5CD3245\",\n \"509C6B80-0000-CE4A-A83D-73041889BD36\",\n];\n\nexport const checkIfProofOfIncomeDocument = (docTypeId: NonEmptyString) => {\n return proofOfIncomeDocuments.some(\n proofOfIncomeDocTypeId => proofOfIncomeDocTypeId === docTypeId\n );\n};\n\nconst toBase64 = (file: File): Promise =>\n new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () =>\n typeof reader.result === \"string\" && resolve(reader.result);\n reader.onerror = error => reject(error);\n });\n\nexport const decodeFileType = (fileType: string) =>\n pipe(\n DocumentMime.decode(fileType),\n either.mapLeft(() => \"UnsupportedDocumentFormat\" as const)\n );\n\nexport const decodeProofOfIncomeFileType = (fileType: string) =>\n fileType === \"application/pdf\"\n ? either.right(\"application/pdf\" as const)\n : either.left(\"POIUnsupportedDocumentFormat\" as const);\n\nexport function encodeFileToBase64(file: File) {\n return pipe(\n taskEither.tryCatch(\n () => toBase64(file),\n () => \"GenericError\" as const\n ),\n taskEither.chainW(fileBase64Url =>\n taskEither.fromIOEither(() =>\n pipe(\n fileBase64Url.split(\",\")[1],\n FileContent.decode,\n either.mapLeft(() => \"GenericError\" as const)\n )\n )\n )\n );\n}\n\nexport function mapSubmitDocumentStatus(\n status: api.UploadDocumentOutput[\"status\"]\n) {\n switch (status) {\n case \"OK\": {\n return either.right(undefined);\n }\n case \"FILE_SIZE_ERROR\": {\n return either.left(\"UnsupportedDocumentSize\" as const);\n }\n case \"FORMAT_NOT_SUPPORTED\": {\n return either.left(\"UnsupportedDocumentFormat\" as const);\n }\n case \"TECHNICAL_ERROR\": {\n return either.left(\"GenericError\" as const);\n }\n }\n}\n\nexport function mapSubmitNoteStatus(\n status: api.DocumentConfirmOutput[\"status\"]\n) {\n switch (status) {\n case \"OK\": {\n return either.right(undefined);\n }\n case \"TECHNICAL_ERROR\": {\n return either.left(\"GenericError\" as const);\n }\n }\n}\n\nexport const checkOptionArrayToBeEmpty = (arr: Option>) =>\n option.isNone(arr) || arr.value.length === 0;\n\nconst checkDocumentObjectsUploaded = (obj: api.SectionData) =>\n option.isNone(obj.sectionDocuments) ||\n obj.sectionDocuments.value.every(\n doc =>\n option.isSome(doc.uploadedDocument) ||\n option.isSome(doc.exceptionComment) ||\n pipe(\n doc.requiredDocument.deletedRequiredDocument,\n option.fold(\n () => false,\n val => val\n )\n )\n );\n\nexport const allDocumentsUploaded = (dataVariants: DataVariants) => {\n switch (dataVariants.variant) {\n case \"SectionData\":\n return checkDocumentObjectsUploaded(dataVariants.data);\n case \"SectionDataArray\":\n return dataVariants.data.every(checkDocumentObjectsUploaded);\n case \"ExtendedSectionDataArray\":\n return dataVariants.data.every(\n sec =>\n checkDocumentObjectsUploaded(sec) &&\n sec.subpropertyList.every(checkDocumentObjectsUploaded) &&\n (option.isNone(sec.appraisalSection) ||\n checkDocumentObjectsUploaded(sec.appraisalSection.value))\n );\n }\n};\n"],"sourceRoot":""}