{"version":3,"sources":["webpack:///./node_modules/randomstring/lib/randomstring.js","webpack:///./src/components/LoadingScreen.vue?7cf0","webpack:///./node_modules/randomstring/lib/charset.js","webpack:///./@core/components/AppNewClientManual.vue?f891","webpack:///./node_modules/randomstring/index.js","webpack:///./@core/assets/myinfo-icon.svg","webpack:///./node_modules/randomstring/node_modules/randombytes/browser.js","webpack:///./src/views/kyc-form/KYCForm.vue?7064","webpack:///./src/components/LoadingScreen.vue?5bb2","webpack:///./src/components/LoadingBar.vue?509a","webpack:///./src/components/LoadingBar.vue","webpack:///./src/components/LoadingBar.vue?85f0","webpack:///./src/components/LoadingBar.vue?5ccc","webpack:///./src/components/LoadingScreen.vue","webpack:///./src/components/LoadingScreen.vue?5926","webpack:///./src/components/LoadingScreen.vue?8a25","webpack:///./@core/components/TheCompletionCheckModal.vue?f9a1","webpack:///./@core/components/TheCompletionCheckModal.vue","webpack:///./@core/components/TheCompletionCheckModal.vue?c828","webpack:///./@core/components/TheCompletionCheckModal.vue?8a94","webpack:///./src/validation/AdviserDeclarationValidation.ts","webpack:///./src/validation/AdviserDetailsValidation.ts","webpack:///./src/validation/CKAValidation.ts","webpack:///./src/validation/ClientDeclarationValidation.ts","webpack:///./src/validation/DependantValidation.ts","webpack:///./src/validation/ExistingPortfolioDeclarationValidation.ts","webpack:///./src/validation/ExistingPortfolioValidation.ts","webpack:///./src/validation/ExistingInvestmentDeclarationValidation.ts","webpack:///./src/validation/ExistingInvestValidation.ts","webpack:///./src/validation/ILPPortfolioValidation.ts","webpack:///./@master/logic/NRICFINValidationLogic.ts","webpack:///./src/validation/PersonalDetailsValidation.ts","webpack:///./src/validation/RcmdBasisValidation.ts","webpack:///./src/validation/RPAValidation.ts","webpack:///./src/validation/SwitchingValidation.ts","webpack:///./src/validation/ThirdPartyPayorValidation.ts","webpack:///./src/validation/TrustedIndividualValidation.ts","webpack:///./src/validation/SharedRcmdBasisValidation.ts","webpack:///./src/validation/SharedCKAValidation.ts","webpack:///./src/validation/RcmdValidation.ts","webpack:///./src/validation/BasicProductValidation.ts","webpack:///./src/validation/SavingsNeedsValidation.ts","webpack:///./src/validation/RetirementNeedsValidation.ts","webpack:///./src/validation/InvestmentNeedsValidation.ts","webpack:///./src/validation/EducationNeedsValidation.ts","webpack:///./src/validation/LongTermNeedsValidation.ts","webpack:///./src/validation/DisabilityProtectionValidation.ts","webpack:///./src/validation/DisabilityIncomeProtectionValidation.ts","webpack:///./src/validation/DeathProtectionValidation.ts","webpack:///./src/validation/CriticalllnessValidation.ts","webpack:///./src/validation/OtherNeedsValidation.ts","webpack:///./src/validation/HospitalizationValidation.ts","webpack:///./src/validation/PersonalAccidentValidation.ts","webpack:///./src/validation/DependantProtectionNeedsValidation.ts","webpack:///./src/validation/ECDDValidation.ts","webpack:///./src/validation/NetWorthValidation.ts","webpack:///./src/validation/CashFlowValidation.ts","webpack:///./src/validation/BudgetValidation.ts","webpack:///./src/validation/BeneficialOwnerValidation.ts","webpack:///./src/validation/IdentifyingYourPriorities.ts","webpack:///./src/validation/AMLValidation.ts","webpack:///./src/validation/KYCValidators.ts","webpack:///./src/validation/KYCFormValidation.ts","webpack:///./@core/components/AppCloneForm.vue?a7ec","webpack:///./@core/components/AppCloneForm.vue","webpack:///./@core/components/AppCloneForm.vue?c180","webpack:///./@core/components/AppCloneForm.vue?f10f","webpack:///./src/views/kyc-form/model/CloneSectionMapping.ts","webpack:///./src/views/kyc-form/KYCForm.vue","webpack:///./src/views/kyc-form/KYCForm.vue?6586","webpack:///./src/views/kyc-form/KYCForm.vue?5a05","webpack:///./@core/components/TheCompletionCheckModal.vue?528f","webpack:///./@core/components/AppCloneForm.vue?ce35","webpack:///./@core/components/AppForm.vue?baa9","webpack:///./@core/components/AppCurrencyNA.vue?af5e","webpack:///./src/views/kyc-form/KYCForm.vue?ae83","webpack:///./@core/components/AppNewClientManual.vue?50dd","webpack:///./@core/components/AppNewClientManual.vue","webpack:///./@core/components/AppNewClientManual.vue?288a","webpack:///./@core/components/AppNewClientManual.vue?53fb","webpack:///./node_modules/randomstring/node_modules/array-uniq/index.js","webpack:///./@core/components/AppForm.vue?4190","webpack:///./@core/components/AppCurrencyNA.vue?2c19","webpack:///./@core/components/AppCurrencyNA.vue","webpack:///./@core/components/AppCurrencyNA.vue?4219","webpack:///./@core/components/AppCurrencyNA.vue?6502","webpack:///./@core/components/AppForm.vue","webpack:///./@core/components/AppForm.vue?cec5","webpack:///./@core/components/AppForm.vue?3db6","webpack:///./src/components/LoadingBar.vue?4b7c"],"names":["randomBytes","Charset","unsafeRandomBytes","length","stack","i","push","Math","floor","random","readUInt8","index","safeRandomBytes","e","processString","buf","initialString","chars","reqLen","maxByte","string","randomByte","charAt","getAsyncString","cb","err","generatedString","exports","generate","options","charset","setType","capitalization","setcapitalization","readable","removeUnreadable","removeDuplicates","charsLen","ceil","arrayUniq","this","prototype","type","numbers","charsLower","charsUpper","toUpperCase","hexChars","binaryChars","octalChars","unreadableChars","replace","toLowerCase","charMap","split","join","module","oldBrowser","Error","crypto","global","msCrypto","size","rawBytes","Uint8Array","getRandomValues","bytes","Buffer","buffer","process","nextTick","render","_vm","_h","$createElement","_c","_self","attrs","loadingState","staticClass","isSubmissionPage","_e","on","save","_m","submit","previewPDF","projectSettings","$event","isModalCloneVisible","deleteForm","updateShowCompletionModalState","kycForm","clientDeclaration","pdpaConsent","cloneAppMapping","staticRenderFns","_v","component","components","LoadingBar","model","value","callback","$$v","activeName","expression","currentSection","_l","computedValidationResult","domain","key","element","class","_s","mandatory","Object","keys","organisedValidation","section","kycFormStore","kycSectionStore","isSectionDisplay","console","time","sections","subs","completed","subsections","subIndex","result","name","timeEnd","organiseValidationToSection","$router","currentRoute","State","Action","declaration","switchings","belongsTo","validator","getMessages","ADD","REQUIRE","REQUIRE_TRUE","WHEN","clientInformation","clientMeetingVenue","statements","anyYes","acknowledgement","acknowledgementNotes","monthlyAllowance","haveJointFieldWork","financialConsultantName","financialConsultantMasNo","financialConsultantComment","switching","surrenderedInvestment","topUp","advisedBefore","some","Validation","adviserDetails","REQUIRE_ARRAY","importantNoticeList","includes","importantNoticeOthers","cka","sharedCKA","ckaCompleted","higherEducation","educationList","professionalQualification","professionalList","investmentExperience","investmentList","workExperience","workList","educationSpecify","profSpecify","investmentSpecify","workSpecify","clientDecl","trustedIndividual","client2Included","reviewDate","clientDeclFcProvideCopy","clientDeclStatements","clientDeclAdvisoryProcess","clientDeclIntroduced","clientDeclIntroducedName","clientDeclIntroducedId","recommendations","rcmd","clientDeclAcknowledgement","disclosure","disclosureAps","contactingYou","crcPartI","crcPartIi","crcPartIii","crcPartIv","explainedFeesCharges","accompanied","confirmLanguage","confirmLanguageOthers","client0DeclarationPoliticallyExposed","pepList","find","pep","policyholderName","errorMsg","forEach","isNotComplete","client1DeclarationPoliticallyExposed","clientPEP","dependant","isRequired","isEmpty","REQUIRE_NUMBER","nric","dob","age","gender","yearsSupport","relationship","portfolios","review","reviewReasons","pf","isValid","portfolio","owner","companyName","policyInsured","policyName","premium","policyTerms","lifeProtection","disabilityProtection","accidentProtection","criticalIllnessProtection","maturityAge","investments","invest","ownedBy","fundManager","fundName","assetType","investmentAmt","currentRealisableValue","investmentAmtRsp","ilpPortfolio","ilpRcmd","filter","product","isIlpPlan","ilp","foundIlp","productName","funds","fund","invAmt","isValidNRICOrFIN","valueToCheck","identityType","str","toString","icArray","parseInt","weight","theAlpha","offset","temp","st","fg","personalDetails","annualIncome","contactEmail","educationLevel","employmentStatus","citizenship","intendedRetirementAge","involvedInActivities","maritalStatus","previousOccupation","occupation","exactDuties","residentialAddress","postalCode","residentialCountry","smoker","familyMedical","familyMedicalSpecified","spokenLanguage","title","writtenLanguage","activitiesSpecified","citizenshipSpecified","contactHome","contactMobile","spokenLanguageSpecified","writtenLanguageSpecified","mainBasis","timeHorizonProtection","timeHorizonSavings","timeHorizonDeviationReason","riskToleranceInTune","riskToleranceDeviationReason","liquidityEmergencyFundsDuration","liquidityConsideration","liquidityDeviationReason","productDeviationsExistence","productDeviationsExistenceReason","rpa","riskProfile","ownChoice","question1","question2","question3","question4","question5","question6","reviewConfirmation","agreement","riskProfilePreferred","detail","planType","benefitsProvided","switching1","switching2","reasons","thirdPartyPayor","payingPremium","budgetNameOfPayor","budgetContactPayor","budgetNricppPayor","budget3rdPartyPayor","budgetPayorRelationship","budgetOccupationPayor","currentClientIndex","prods","clientChoice","clientIndex","map","referenceId","productAccount","client1PersonalDetails","client2PersonalDetails","isClient1SelectedClient","isSelectedClient","isClient2SelectedClient","hasClient2","hasAccompaniment","contact","toContact","preferredTime","preferredDate","dependantBasis","productRecommendationElaboration","productRiskAndLimitationsElaboration","clientDisagreeDecision","recommendationDecision","allProducts","needsBases1","needsBases2","ADDMANDATORY","productNamePrefix","productNameInfo","combinedNeeds","needs","plan","level","undefined","uniqueNeeds","Set","need","metNeeds","needsCovered","productNeedsCovered","priority","frequency","lifeAssured","premiumAmount","sumAssured","paymentMode","policyTerm","premiumTerm","transactionType","wrap","savingsNeed","SavingsStructure","data","_data","validationMsg","retirementNeed","RetirementStructure","investmentNeed","InvestmentStructure","educationNeedDetail","educationNeeds","educationNeed","providedFor","costOfEducation","countryOfStudy","yearsToSave","inflation","courseDuration","maturityValueOfExistingPolicies","existingResources","longTermNeed","LongTermCareProtectionStructure","DisabilityProtectionStructure","disabilityIncomeProtection","DisabilityIncomeProtectionStructure","deathProtection","DeathProtectionStructure","ciProtection","CriticalIllnessProtectionStructure","otherNeeds","planningFor","amountNeeded","existingBenefits","hospitalNeed","HospitalisationStructure","hospitalType","personalAccidentNeed","PersonalAccidentStructure","firstSectionKey","label","secondSectionKey","thirdSectionKey","fortSectionKey","dependentsProtectionDataArray","client1","client2","every","entry","depName","dependents","sectionEntry","partialCompletedSection","getPartialCompletedSection","eachField","allSectionEmpty","flatMap","sectionKey","targetDependent","emptyFields","field","preferredHospitalType","ecdd","highRiskCountry","stayInSg","residingAddress","sourceOfFunds","sourceOfFunds2","sourceOfFunds2Info","additionalNote","netWorth","netWorthPlanning","cash","residentialAssets","motor","otherPersonalAssets","investBusiness","stocksShares","investProperty","unitTrust","cpfOrdinary","cpfSpecial","cpfRa","cpfMedisave","srs","lifeInsuranceCash","bankDeposits","homeMortgage","carLoans","educationLoans","creditCard","tax","noPlanningReason","cashFlow","cashFlowPlanning","employment","business","investmentIncome","dividends","rentalIncome","mortgageLoan","carLoan","insurancePremiums","regularSavings","parentalSupport","personalExpenses","lifestyleExpenses","others12Text","others12","cashFlowChanges","cashFlowChangesReasons","cashFlowPlanningReasons","budget","budgetCashPerAnnum","budgetUtilizeCpfMedisave","budgetCash","budgetCpfOrdinary","budgetCpfSpecial","budgetSrsAccount","budgetSourceOfFunds","budgetSourceOfWealth","budgetOthers1","budgetOthers2","budgetOthers3","budgetC1","budgetC2","smallBudgetSize","budgetSubstantialReasons","bo","declarationBeneficialOwner","beneficialOwnerParticulars","isBeneficialOwnerDetailsNotFilled","beneficialOwner","contactNumber","correspondenceAddress","dateOfBirth","fullName","nationality","reasonsForAppointment","relationshipToCustomer","atLeastOnePlan","aml","adverseDBChecks","redFlag","sanctioned","financialFlowHighRisk","pepAssociated","transactValueBelowThreshold","applyMedicalProduct","thirdParty","basis","existingPorfolioDeclaration","existingPortfolio","existingInvestmentDeclaration","existingInvest","adviserDeclaration","products","identifyingYourPriorities","savingNeeds","retirementNeeds","investmentNeeds","longTermNeeds","criticalIllness","hospitalizationNeeds","personalAccidentNeeds","dependentsProtection","sharedRcmdBasis","sharedCka","pretransactionChecklist","verifiedPretransactionChecklist","validators","validationProgress","validationResult","rpaNotRequired","rpaCompleted","validate","recommendationBasis","deathProtectionNeeds","disabilityIncomeNeeds","criticalIllnessNeeds","disabilityProtectionNeeds","longTermProtectionClient","dependantsProtection","savingsNeeds","other1Needs","other2Needs","allRecommendations","validatePEP","included","dependants","dependantsProtectionClient","educationNeedsForC1C2","educationNeedsDetails","newIlpPortfolios","ilpPortfolios","validBasicProduct","existingInvestment","validateShare","adviser","details","client1Needs","NeedsBase","client2Needs","flatAllProducts","flatProductWithInvestMainAccount","citizenshipSpecified2","structured","message","category","$emit","slot","ref","clonedSections","defaultCheckedKeys","kycPersonalDetails","cloneKYCForm","dateService","get","IDateService","IProjectSettings","riskRatingService","IRiskRatingService","newKycForm","KYCForm","excludedSections","srcSectionMap","defaultSectionsMapping","insurance","investment","priorities","bop","$store","getters","currentUser","client","ThePrioritiesNeeds","getPriorities","sectionTree","$refs","checkedSections","getCheckedNodes","children","clonedModels","sectionModels","sectionsMapping","id","removedDuplicatedModels","toCopy","adviserOid","accountID","rawKycForm","convertToRawData","$api","meta","_oid","JSON","parse","stringify","response","uiService","confirm","show","isConfirm","window","location","href","updateMeta","assignAllKYCForm","saveKYCForm","excludeBranches","concat","additionalExcludedSection","url","sharedVariable","initSectionTree","initKYCForm","AppDialog","AppNewClientManual","thePrioritiesNeeds","isIdentifyAnalysis","dataDetail","CloneSectionMapping","TheSectionNavi","kycSubmissionStore","snakeCaseKycForm","debounceValidate","$route","params","formOid","checkKycDocUploadEnabled","loadAssumption","loadKYCForm","kycFormErrors","alert","sysInfo","kyc_doc_upload","log","hideSection","uploadDoc","list","kycFormOid","uploadedPDFList","updateTotalUploadedPdf","setLoadingState","then","finally","isPTCVerified","isSuperiorVerified","appendixIsMorethan10MB","kycPdf","completion","KYCFormCompletionCheck","hasNtuc","verifyDsfFields","dsfVerified","prepareForSubmission","createKycPdfEntry","kycResult","success","kycPdfOid","saveNewESubmissionData","adviserResult","stampAdviserSignedPdf","amlResult","stampAdviserSignedAMLPdf","stampBeneficialOwnersPdf","boResult","stampPEPPdfs","pepResult","mergeUploadedAppendix","mergedResult","error","ntucisEnabled","esub_ntuc","dsf","verifyFields","res","useEjsTemplate","useDynamicPdf","enable","apiVersion","version","open","totalUploadedPdf","totalSize","fileSize","reduce","sum","total","validation","getPTCChecklist","updatedValidationResult","kycPdfSubmission","create","catch","stampedPdf","generateKycPdfNest","stampedKycPdf","status","stampedAMLPdf","stampedBeneficialOwnerPdf","stampPEPPdf","merge","esub","esubRes","updateConsolidateGroupsStatus","boDecl","bo2Decl","isClient2Included","pepDeclClient0","pepDeclClient1","amlValidation","doesKycPdfExist","delete","showCancelButton","query","queryArgs","headers","Mutation","Getter","deep","LoadingScreen","TheCompletionCheckModal","AppCloneForm","beforeRouteUpdate","to","from","next","structures","hideActionButtons","createClient","ma_name","ma_nric","ma_title","ma_gender","ma_contact_mobile","ja_name","ja_nric","ja_title","ja_gender","ja_contact_mobile","ja_included","adviser_oid","adviser_name","fullname","adviser_fa_code","company_code","adviser_mas_rep_no","mas_repno","important_notice_list","adviser_products","important_notice_others","other_adviser_products","review_date","Date","getTime","kyc_status","default","AppForm","uniqNoSet","arr","ret","indexOf","uniqSet","seen","el","has","add","uniqSetWithForEach","doesForEachActuallyWork","style","structure","shouldShow","shouldDisabled","disabled","getCustomClass","hasErrors","focusId","getId","focusInner","getTestId","domProps","labelModelValue","labelModel","set","target","directives","rawName","labelKey","composing","$set","tooltip","eidx","msg","full","fullErr","multiple","optionCols","multiLimit","buttonName","cycleMode","displayDirection","setValue","blurHandler","getValue","checkboxColumnNo","compact","option","isMyInfo","getLabelId","setSelectValue","decimal","maxChar","currencyFormat","precision","futureDate","disabledFutureDate","rows","isVertical","maxSize","columns","getValueForTable","remove","maxLength","counterMsg","isModernTheme","maxlength","numberAndNAOnly","onBlur","onFocus","onSelect","inputModal","textIsSelected","number","convertCurrencyToNumber","remainingChar","evt","event","charCode","which","keyCode","currentValue","isAlphabetN","isNonNumber","preventDefault","charCodeAt","isAlphabetA","formatValue","isNaN","Number","source","useCurrency","currencyPrefix","toLocaleString","currency","replaceAll","projectInfo","inputValue","minimal","errors","charLeft","getCharLeft","getCounterMsg","gridTemplateColumns","theme","condition","readOnly","Function","input","oriValue","String","labelValue","selectedOption","selectedIndex","_value","onChange","ex","uniqueID","snakeCaseKey","curAppForm","$el","hasOverflow","scrollWidth","clientWidth","eleId","ele","document","getElementById","focus","mc","classes","swe","first","s","scrollIntoView","behavior","block","arrangeCols","addEventListener","now","AppSmartSelect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gBAAP,kB,6BAED,gBADC,eAAK,CAAEA,QAAS,WAAQ,OAAOH,KAAKiJ,U,+BAGX,gBAAzB,eAAK,CAAE9I,SAAS,K,+BAGjB,gBADC,uB,kCAID,gBADC,uB,sCAmMD,gBADC,eAAM,oBAAqB,CAAErC,MAAM,K,yBASnC,MAxNkB,EAAO,gBAb3B,eAAU,CACThqB,WAAY,CACVo1B,iBAAA,KACAC,mBAAA,KACAC,oBAAA,KACAC,eAAA,KACAC,eAAA,KACAC,cAAA,EACAC,mBAAA,KACAC,aAAA,SAIiB,WCnR6W,ICQ9X,G,UAAY,eACd,EACAv3B,EACAyB,GACA,EACA,KACA,WACA,OAIa,S,2CCnBf,W","file":"js/chunk-6f5e0dea.cd999555.js","sourcesContent":["\"use strict\";\n\nvar randomBytes = require('randombytes');\nvar Charset = require('./charset.js');\n\n\nfunction unsafeRandomBytes(length) {\n var stack = [];\n for (var i = 0; i < length; i++) {\n stack.push(Math.floor(Math.random() * 255));\n }\n\n return {\n length,\n readUInt8: function (index) {\n return stack[index];\n }\n };\n}\n\nfunction safeRandomBytes(length) {\n try {\n return randomBytes(length);\n } catch (e) {\n /* React/React Native Fix + Eternal loop removed */\n return unsafeRandomBytes(length);\n }\n}\n\nfunction processString(buf, initialString, chars, reqLen, maxByte) {\n var string = initialString;\n for (var i = 0; i < buf.length && string.length < reqLen; i++) {\n var randomByte = buf.readUInt8(i);\n if (randomByte < maxByte) {\n string += chars.charAt(randomByte % chars.length);\n }\n }\n return string;\n}\n\nfunction getAsyncString(string, chars, length, maxByte, cb) {\n randomBytes(length, function(err, buf) {\n if (err) {\n // Since it is waiting for entropy, errors are legit and we shouldn't just keep retrying\n cb(err);\n }\n var generatedString = processString(buf, string, chars, length, maxByte);\n if (generatedString.length < length) {\n getAsyncString(generatedString, chars, length, maxByte, cb);\n } else {\n cb(null, generatedString);\n }\n })\n}\n\nexports.generate = function(options, cb) {\n var charset = new Charset();\n\n var length, chars, capitalization, string = '';\n\n // Handle options\n if (typeof options === 'object') {\n length = typeof options.length === 'number' ? options.length : 32;\n\n if (options.charset) {\n charset.setType(options.charset);\n }\n else {\n charset.setType('alphanumeric');\n }\n\n if (options.capitalization) {\n charset.setcapitalization(options.capitalization);\n }\n\n if (options.readable) {\n charset.removeUnreadable();\n }\n\n charset.removeDuplicates();\n }\n else if (typeof options === 'number') {\n length = options;\n charset.setType('alphanumeric');\n }\n else {\n length = 32;\n charset.setType('alphanumeric');\n }\n\n // Generate the string\n var charsLen = charset.chars.length;\n var maxByte = 256 - (256 % charsLen);\n\n if (!cb) {\n while (string.length < length) {\n var buf = safeRandomBytes(Math.ceil(length * 256 / maxByte));\n string = processString(buf, string, charset.chars, length, maxByte);\n }\n\n return string;\n }\n\n getAsyncString(string, charset.chars, length, maxByte, cb);\n\n};\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LoadingScreen.vue?vue&type=style&index=0&id=e2773f1a&lang=scss&scoped=true&\"","var arrayUniq = require('array-uniq');\n\nfunction Charset() {\n this.chars = '';\n}\n\nCharset.prototype.setType = function(type) {\n var chars;\n\n var numbers = '0123456789';\n var charsLower = 'abcdefghijklmnopqrstuvwxyz';\n var charsUpper = charsLower.toUpperCase();\n var hexChars = 'abcdef';\n var binaryChars = '01';\n var octalChars = '01234567';\n\n if (type === 'alphanumeric') {\n chars = numbers + charsLower + charsUpper;\n }\n else if (type === 'numeric') {\n chars = numbers;\n }\n else if (type === 'alphabetic') {\n chars = charsLower + charsUpper;\n }\n else if (type === 'hex') {\n chars = numbers + hexChars;\n }\n else if (type === 'binary') {\n chars = binaryChars;\n }\n else if (type === 'octal') {\n chars = octalChars;\n }\n else {\n chars = type;\n }\n\n this.chars = chars;\n}\n\nCharset.prototype.removeUnreadable = function() {\n var unreadableChars = /[0OIl]/g;\n this.chars = this.chars.replace(unreadableChars, '');\n}\n\nCharset.prototype.setcapitalization = function(capitalization) {\n if (capitalization === 'uppercase') {\n this.chars = this.chars.toUpperCase();\n }\n else if (capitalization === 'lowercase') {\n this.chars = this.chars.toLowerCase();\n }\n}\n\nCharset.prototype.removeDuplicates = function() {\n var charMap = this.chars.split('');\n charMap = arrayUniq(charMap);\n this.chars = charMap.join('');\n}\n\nmodule.exports = exports = Charset;\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppNewClientManual.vue?vue&type=style&index=0&id=979ebe7e&lang=scss&scoped=true&\"","module.exports = require(\"./lib/randomstring\");","module.exports = __webpack_public_path__ + \"img/myinfo-icon.28e75045.svg\";","'use strict'\n\nfunction oldBrowser () {\n throw new Error('secure random number generation not supported by this browser\\nuse chrome, FireFox or Internet Explorer 11')\n}\n\nvar crypto = global.crypto || global.msCrypto\n\nif (crypto && crypto.getRandomValues) {\n module.exports = randomBytes\n} else {\n module.exports = oldBrowser\n}\n\nfunction randomBytes (size, cb) {\n // phantomjs needs to throw\n if (size > 65536) throw new Error('requested too many random bytes')\n // in case browserify isn't using the Uint8Array version\n var rawBytes = new global.Uint8Array(size)\n\n // This will not work in older browsers.\n // See https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues\n if (size > 0) { // getRandomValues fails on IE if size == 0\n crypto.getRandomValues(rawBytes)\n }\n // phantomjs doesn't like a buffer being passed here\n var bytes = new Buffer(rawBytes.buffer)\n\n if (typeof cb === 'function') {\n return process.nextTick(function () {\n cb(null, bytes)\n })\n }\n\n return bytes\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"kyc-form\"}},[_c('div',{attrs:{\"id\":\"scroll-container\"}},[_c('div',{attrs:{\"id\":\"toolbar\",\"disabled\":_vm.loadingState === 'loading'}},[_c('div',{staticClass:\"form-action\"},[(!_vm.isSubmissionPage)?_c('div',{staticClass:\"form-button\",on:{\"click\":_vm.save}},[_vm._m(0)]):_vm._e(),(_vm.isSubmissionPage)?_c('div',{staticClass:\"form-button\",on:{\"click\":_vm.submit}},[_vm._m(1)]):_vm._e(),_c('div',{staticClass:\"form-button-preview\",on:{\"click\":_vm.previewPDF}},[_vm._m(2)]),(_vm.projectSettings.cloneKycForm)?_c('div',{staticClass:\"form-button\",on:{\"click\":function($event){_vm.isModalCloneVisible = true}}},[_vm._m(3)]):_vm._e(),(_vm.projectSettings.deleteKycForm)?_c('div',{staticClass:\"form-button\",on:{\"click\":_vm.deleteForm}},[_vm._m(4)]):_vm._e()]),_c('div',{attrs:{\"completion\":\"\"},on:{\"click\":function($event){return _vm.updateShowCompletionModalState(true)}}},[_vm._m(5)])]),[_c('TheSectionNavi',{attrs:{\"pdpaConsent\":_vm.kycForm.clientDeclaration.pdpaConsent}}),(_vm.loadingState !== 'loading')?_c('router-view',{on:{\"save\":_vm.save}}):_vm._e()]],2),_c('TheCompletionCheckModal'),(_vm.isModalCloneVisible)?_c('AppCloneForm',{attrs:{\"srcSectionMap\":_vm.cloneAppMapping},on:{\"close\":function($event){_vm.isModalCloneVisible = false}}}):_vm._e(),(_vm.loadingState === 'loading' || _vm.loadingState === 'saving')?_c('LoadingScreen'):_vm._e()],1)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"far fa-save\"}),_vm._v(\"   \"),_c('span',{attrs:{\"btn-text\":\"\"}},[_vm._v(\"Save Form\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"far fa-save\"}),_vm._v(\"   \"),_c('span',{attrs:{\"btn-text\":\"\"}},[_vm._v(\"Submit Form\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"far fa-file-pdf\"}),_vm._v(\"   \"),_c('span',{attrs:{\"btn-text\":\"\"}},[_vm._v(\"Preview PDF\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"far fa-copy\"}),_vm._v(\"   \"),_c('span',{attrs:{\"btn-text\":\"\"}},[_vm._v(\"Clone KYC Form\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"fas fa-trash\"}),_vm._v(\"   \"),_c('span',{attrs:{\"btn-text\":\"\"}},[_vm._v(\"Delete Form\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"fas fa-tasks\"}),_vm._v(\"   \"),_c('span',{attrs:{\"btn-text\":\"\"}},[_vm._v(\"Completion\")])])}]\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"loading-screen\"},[_c('div',{staticClass:\"backdrop\"}),_c('div',{staticClass:\"content\"},[_c('LoadingBar',{staticClass:\"loading-bar\"})],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"loading-bar\"},[_c('div',{staticClass:\"percentage\"})])}]\n\nexport { render, staticRenderFns }","\n\n\n\n\n\nimport { Component, Vue } from 'vue-property-decorator'\n\n@Component\nexport default class LoadingBar extends Vue {\n}\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LoadingBar.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LoadingBar.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./LoadingBar.vue?vue&type=template&id=39858f38&scoped=true&\"\nimport script from \"./LoadingBar.vue?vue&type=script&lang=ts&\"\nexport * from \"./LoadingBar.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./LoadingBar.vue?vue&type=style&index=0&id=39858f38&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"39858f38\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n\n\n\n\nimport { Component, Vue } from 'vue-property-decorator'\nimport LoadingBar from './LoadingBar.vue'\n\n@Component({\n components: {\n LoadingBar\n }\n})\nexport default class LoadingScreen extends Vue {\n\n}\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LoadingScreen.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LoadingScreen.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./LoadingScreen.vue?vue&type=template&id=e2773f1a&scoped=true&\"\nimport script from \"./LoadingScreen.vue?vue&type=script&lang=ts&\"\nexport * from \"./LoadingScreen.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./LoadingScreen.vue?vue&type=style&index=0&id=e2773f1a&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"e2773f1a\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showCompletionModalState)?_c('div',{attrs:{\"id\":\"completion-check\"}},[_c('div',{staticClass:\"backdrop\",on:{\"click\":function($event){return _vm.updateShowCompletionModalState(false)}}}),_c('el-tabs',{staticClass:\"content\",model:{value:(_vm.activeName),callback:function ($$v) {_vm.activeName=$$v},expression:\"activeName\"}},[(_vm.isSectionDisplay)?_c('el-tab-pane',{attrs:{\"label\":_vm.currentSection,\"name\":\"first\"}},[(_vm.isSectionCompleted)?_c('span',[_vm._v(\"This section is completed.\")]):_c('el-collapse',{attrs:{\"accordion\":\"\"}},_vm._l((_vm.computedValidationResult[_vm.currentSection]),function(domain,key,index){return _c('el-collapse-item',{key:index,attrs:{\"title\":key,\"name\":key}},_vm._l((domain),function(element,index){return _c('el-row',{key:index,class:{ 'bg-disabled': index % 2 === 0, 'row-content': true }},[_c('el-col',{attrs:{\"span\":24}},[_c('div',[_vm._v(\" \"+_vm._s((\"\" + (element.mandatory?'* ':'') + (element.message)))+\" \")])])],1)}),1)}),1)],1):_vm._e(),_c('el-tab-pane',{attrs:{\"label\":\"All Sections\",\"name\":\"second\"}},[(!Object.keys(_vm.organisedValidation).length)?_c('span',[_vm._v(\"All sections are completed.\")]):_c('el-collapse',{attrs:{\"accordion\":\"\"}},_vm._l((_vm.organisedValidation),function(section,key,index){return _c('el-collapse-item',{key:'section' + index,staticClass:\"level-1\",attrs:{\"title\":key,\"name\":key}},[_c('el-collapse',{attrs:{\"accordion\":\"\"}},_vm._l((section),function(domain,key,index){return _c('el-collapse-item',{key:index,staticClass:\"level-2\",attrs:{\"title\":key,\"name\":key}},_vm._l((domain),function(element,index){return _c('el-row',{key:index,class:{ 'bg-disabled': index % 2 === 0, 'row-content': true }},[_c('el-col',{attrs:{\"span\":24}},[_c('div',[_vm._v(\" \"+_vm._s((\"\" + (element.mandatory?'* ':'') + (element.message)))+\" \")])])],1)}),1)}),1)],1)}),1)],1)],1)],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue, Watch } from 'vue-property-decorator'\n\nimport { namespace } from 'vuex-class'\n\nconst kycFormStore = namespace('KYCFormStore')\nconst kycSectionStore = namespace('KYCSectionStore')\n\n@Component\nexport default class TheCompletionCheckModal extends Vue {\n @kycFormStore.State\n private computedValidationResult: {}\n\n @kycFormStore.State\n private showCompletionModalState\n\n @kycSectionStore.State\n private sections: { name: string; url: string; completed: boolean; allowed: boolean; subs?: any[] } []\n\n @kycFormStore.Action\n private updateShowCompletionModalState!: (state) => void\n\n private isSectionDisplay = true\n private activeName = 'first'\n private currentSection = ''\n\n // Getters\n\n get isSectionCompleted () {\n return this.organisedValidation[this.currentSection] === null ||\n typeof this.organisedValidation[this.currentSection] === 'undefined'\n }\n\n // Methods\n\n private organisedValidation = {}\n\n organiseValidationToSection () {\n console.time('organising validation')\n this.organisedValidation = {}\n for (let index = 0; index < this.sections.length; index++) {\n const section = this.sections[index]\n if (section.subs) {\n section.completed = true\n const subsections = section.subs\n for (let subIndex = 0; subIndex < subsections.length; subIndex++) {\n const result = this.computedValidationResult[subsections[subIndex].name]\n if (result) {\n this.organisedValidation[subsections[subIndex].name] = result\n }\n }\n\n for (let subIndex = 0; subIndex < subsections.length; subIndex++) {\n section.completed =\n section.completed && subsections[subIndex].completed\n }\n } else {\n const result = this.computedValidationResult[section.name]\n if (result) {\n this.organisedValidation[section.name] = result\n }\n }\n }\n console.timeEnd('organising validation')\n }\n\n // Watchers\n\n @Watch('showCompletionModalState')\n displaySection () {\n this.organiseValidationToSection()\n this.currentSection = this.$router.currentRoute.name\n this.isSectionDisplay = this.currentSection !== 'KYC Confirmation'\n if (!this.isSectionDisplay) {\n this.activeName = 'second'\n } else {\n this.activeName = 'first'\n }\n }\n}\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TheCompletionCheckModal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TheCompletionCheckModal.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./TheCompletionCheckModal.vue?vue&type=template&id=7310256a&scoped=true&\"\nimport script from \"./TheCompletionCheckModal.vue?vue&type=script&lang=ts&\"\nexport * from \"./TheCompletionCheckModal.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./TheCompletionCheckModal.vue?vue&type=style&index=0&id=7310256a&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7310256a\",\n null\n \n)\n\nexport default component.exports","import AdviserDeclaration from '@company-common/model/kyc-form/AdviserDeclaration'\nimport Validation from '@core/logic/Validation'\nimport Switching from '@master/model/kyc-form/Switching'\n\nexport default class AdviserDeclarationValidation extends Validation {\n validate (declaration: AdviserDeclaration, switchings: Switching[], belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, REQUIRE_TRUE, WHEN } = this.validator()\n\n ADD(REQUIRE(declaration.clientInformation, 'Adviser must declare the recommendations are on the client\\'s needs.'), ['Financial Adviser\\'s Declaration'], ['clientInformation'])\n // ADD(REQUIRE(declaration.clientMeetingDate, 'Adviser must specify the date of meeting'), ['Financial Adviser\\'s Declaration'], ['clientMeetingDate'])\n // ADD(REQUIRE(declaration.clientMeetingTime, 'Adviser must specify the time of meeting'), ['Financial Adviser\\'s Declaration'], ['clientMeetingTime'])\n ADD(REQUIRE(declaration.clientMeetingVenue, 'Adviser must specify the venue of meeting'), ['Financial Adviser\\'s Declaration'], ['clientMeetingVenue'])\n ADD(REQUIRE(declaration.statements, 'Adviser must declare that all statements are true'), ['Financial Adviser\\'s Declaration'], ['statements'])\n ADD(WHEN(this.anyYes(switchings), REQUIRE_TRUE(declaration.acknowledgement, 'Adviser is to acknowledge when ticked \\'Yes\\' to any of the above 3 replacement/switching questions')), ['Replacement / Switching'], ['acknowledgement'])\n ADD(WHEN(this.anyYes(switchings), REQUIRE(declaration.acknowledgementNotes, 'Adviser is note down when ticked \\'Yes\\' to any of the above 3 replacement/switching questions')), ['Replacement / Switching'], ['acknowledgementNotes'])\n\n // ADD(REQUIRE(declaration.cashRebate, 'Adviser must declare the cash rebate or gift to the client in relation to the transaction '), ['Financial Adviser\\'s Declaration'], ['cashRebate'])\n ADD(REQUIRE(declaration.monthlyAllowance, 'Adviser must declare the monthly allowance or transitional allowance in relation to the transaction '), ['Financial Adviser\\'s Declaration'], ['monthlyAllowance'])\n\n ADD(WHEN(declaration.haveJointFieldWork, REQUIRE(declaration.financialConsultantName, 'Name of Financial Adviser 2 is required.')), ['Financial Adviser\\'s Declaration'], ['financialConsultantName'])\n ADD(WHEN(declaration.haveJointFieldWork, REQUIRE(declaration.financialConsultantMasNo, 'MAS Representative No. is required.')), ['Financial Adviser\\'s Declaration'], ['financialConsultantMasNo'])\n ADD(WHEN(declaration.haveJointFieldWork, REQUIRE(declaration.financialConsultantComment, 'Joint Field Work comment is required.')), ['Financial Adviser\\'s Declaration'], ['financialConsultantComment'])\n\n return getMessages()\n }\n\n anyYes (switching: Switching[]) {\n for (let i = 0; i < switching.length; i++) {\n if ([switching[i].surrenderedInvestment, switching[i].topUp, switching[i].advisedBefore].some(value => value === 'yes')) {\n return true\n }\n }\n return false\n }\n}\n","import AdviserDetails from '@master/model/kyc-form/AdviserDetails'\nimport Validation from '@core/logic/Validation'\n\nexport default class AdviserDetailsValidation extends Validation {\n validate (adviserDetails: AdviserDetails, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, REQUIRE_ARRAY, WHEN } = this.validator()\n ADD(REQUIRE_ARRAY(adviserDetails.importantNoticeList, 'Adviser must be able to advise clients on a list of specific items'), ['Important Notices'], ['importantNoticeList'])\n ADD(WHEN(adviserDetails.importantNoticeList.includes('others'), REQUIRE(adviserDetails.importantNoticeOthers, 'Adviser must need to specify what to advise when others are selected.')), ['Important Notices'], ['importantNoticeOthers'])\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport CKA from '@master/model/kyc-form/CKA'\n\nexport default class CKAValidation extends Validation {\n validate (cka: CKA, sharedCKA: CKA, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, REQUIRE_TRUE, REQUIRE_ARRAY, WHEN } = this.validator()\n ADD(WHEN(!sharedCKA.ckaCompleted, REQUIRE(cka.higherEducation, 'Higher Education is required')), ['Customer Knowledge Assessment'], ['higherEducation'])\n ADD(WHEN(cka.higherEducation === 'yes', REQUIRE_ARRAY(cka.educationList, 'Type of Education Qualification cannot be empty when higher education option is yes.')), ['Customer Knowledge Assessment'], ['educationList'])\n\n ADD(WHEN(!sharedCKA.ckaCompleted, REQUIRE(cka.professionalQualification, 'Professional Qualification is required')), ['Customer Knowledge Assessment'], ['professionalQualification'])\n ADD(WHEN(cka.professionalQualification === 'yes', REQUIRE_ARRAY(cka.professionalList, 'Type of Professional Qualification cannot be empty when professional option is yes.')), ['Customer Knowledge Assessment'], ['professionalList'])\n\n ADD(WHEN(!sharedCKA.ckaCompleted, REQUIRE(cka.investmentExperience, 'Investment Experience is required')), ['Customer Knowledge Assessment'], ['investmentExperience'])\n ADD(WHEN(cka.investmentExperience === 'yes', REQUIRE_ARRAY(cka.investmentList, 'Type of Investment cannot be empty when investment option is yes')), ['Customer Knowledge Assessment'], ['investmentList'])\n\n ADD(WHEN(!sharedCKA.ckaCompleted, REQUIRE(cka.workExperience, 'Work Experience is required')), ['Customer Knowledge Assessment'], ['workExperience'])\n ADD(WHEN(cka.workExperience === 'yes', REQUIRE_ARRAY(cka.workList, 'Type of Work Experience cannot be empty when work experience option is yes')), ['Customer Knowledge Assessment'], ['workList'])\n // ADD(WHEN(!sharedCKA.ckaCompleted, REQUIRE(cka.ckaMet, '')), ['Customer Knowledge Assessment'])\n // ADD(WHEN(cka.investmentList.includes('others'), REQUIRE(cka.otherInvestmentExp, 'Need to specify investment experiences when Others is selected')), ['Customer Knowledge Assessment'], ['otherInvestmentExp'])\n ADD(WHEN(cka.higherEducation === 'yes', REQUIRE(cka.educationSpecify, 'Specifying education is required when higher education is yes.')), ['Customer Knowledge Assessment'], ['educationSpecify'])\n ADD(WHEN(cka.professionalQualification === 'yes', REQUIRE(cka.profSpecify, 'Specifying profession is required when professional qualification is yes.')), ['Customer Knowledge Assessment'], ['profSpecify'])\n ADD(WHEN(cka.investmentExperience === 'yes', REQUIRE(cka.investmentSpecify, 'Specifying investment is required when investment experience is yes.')), ['Customer Knowledge Assessment'], ['investmentSpecify'])\n ADD(WHEN(cka.workExperience === 'yes', REQUIRE(cka.workSpecify, 'Specifying work experience is required when work experience is yes.')), ['Customer Knowledge Assessment'], ['workSpecify'])\n\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport KYCForm from '@company-common/model/kyc-form/KYCForm'\nimport ClientDeclaration from '@company-common/model/kyc-form/ClientDeclaration'\nimport TrustedIndividual from '@master/model/kyc-form/TrustedIndividual'\n\nexport default class ClientDeclarationValidation extends Validation {\n validate (clientDecl: ClientDeclaration, trustedIndividual: TrustedIndividual, client2Included: boolean, kycForm: KYCForm, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, REQUIRE_TRUE, WHEN } = this.validator()\n\n ADD(REQUIRE(clientDecl.reviewDate, 'Date of First Appointment is required'), ['Client Summary'], ['reviewDate'])\n\n ADD(REQUIRE(clientDecl.clientDeclFcProvideCopy, 'CA Declaration Acknowledgement must be filled'), ['Client\\'s Declaration'], ['clientDeclFcProvideCopy'])\n ADD(REQUIRE_TRUE(clientDecl.clientDeclFcProvideCopy, 'CA Declaration Acknowledgement must be true'), ['Client\\'s Declaration'], ['clientDeclFcProvideCopy'])\n\n ADD(REQUIRE(clientDecl.clientDeclStatements, 'CA Declaration Statement must be filled'), ['Client\\'s Declaration'], ['clientDeclStatements'])\n ADD(REQUIRE_TRUE(clientDecl.clientDeclStatements, 'CA Declaration Statement must be true'), ['Client\\'s Declaration'], ['clientDeclStatements'])\n\n ADD(REQUIRE(clientDecl.clientDeclAdvisoryProcess, 'Declaration Advisory Process must be filled'), ['Client\\'s Declaration'], ['clientDeclAdvisoryProcess'])\n\n ADD(REQUIRE(clientDecl.clientDeclIntroduced, 'Declaration of Introduced Option must be filled'), ['Client\\'s Declaration'], ['clientDeclIntroduced'])\n ADD(WHEN(clientDecl.clientDeclIntroduced === 'yes', REQUIRE(clientDecl.clientDeclIntroducedName, 'Introducer Name must be filled with declaration of introducer is yes')), ['Client\\'s Declaration'], ['clientDeclIntroducedName'])\n ADD(WHEN(clientDecl.clientDeclIntroduced === 'yes', REQUIRE(clientDecl.clientDeclIntroducedId, 'Introducer Id must be filled with declaration of introducer is yes')), ['Client\\'s Declaration'], ['clientDeclIntroducedId'])\n\n // ADD(REQUIRE(clientDecl.clientDeclPoliticallyExposed, 'Declaration of Political Exposed Person must be filled'), ['Client\\'s Declaration'])\n\n // PEP should out from Common\n // ADD(REQUIRE(clientDecl.client0DeclarationPoliticallyExposed, 'Declaration of Political Exposed Person for Client 1 must be filled'), ['Client\\'s Declaration'])\n // ADD(WHEN(client2Included === true, REQUIRE(clientDecl.client1DeclarationPoliticallyExposed, 'Declaration of Political Exposed Person for Client 2 must be filled')), ['Client\\'s Declaration'])\n\n ADD(WHEN(kycForm.recommendations.rcmd.length > 0, REQUIRE_TRUE(clientDecl.clientDeclAcknowledgement, 'Client Acknowledgement Declaration must be filled')), ['Client\\'s Decision'], ['clientDeclAcknowledgement'])\n\n ADD(REQUIRE(clientDecl.disclosure, 'Disclosure Option must be filled'), ['Disclaimers & Client\\'s Checklist'], ['disclosure'])\n ADD(REQUIRE_TRUE(clientDecl.disclosure, 'Disclosure Option must be true'), ['Disclaimers & Client\\'s Checklist'], ['disclosure'])\n\n ADD(REQUIRE(clientDecl.disclosureAps, 'Disclosure APS Option must be filled'), ['Disclaimer & Client\\'s Checklist'], ['disclosureAps'])\n ADD(REQUIRE_TRUE(clientDecl.disclosureAps, 'Disclosure APS Option must be true'), ['Disclaimers & Client\\'s Checklist'], ['disclosureAps'])\n\n // To be double confirm\n ADD(REQUIRE(clientDecl.contactingYou, 'Contacting You option must be filled'), ['Disclaimers & Client\\'s Checklist'], ['contactingYou'])\n ADD(REQUIRE_TRUE(clientDecl.contactingYou, 'Contacting You option must be true'), ['Disclaimers & Client\\'s Checklist'], ['contactingYou'])\n ADD(REQUIRE(clientDecl.crcPartI, 'Client\\'s Reference Checklist I must be filled'), ['Disclaimers & Client\\'s Checklist'], ['crcPartI'])\n ADD(REQUIRE_TRUE(clientDecl.crcPartI, 'Client\\'s Reference Checklist I must be true'), ['Disclaimers & Client\\'s Checklist'], ['crcPartI'])\n ADD(REQUIRE(clientDecl.crcPartIi, 'Client\\'s Reference Checklist II must be filled'), ['Disclaimers & Client\\'s Checklist'], ['crcPartIi'])\n ADD(REQUIRE_TRUE(clientDecl.crcPartIi, 'Client\\'s Reference Checklist II must be true'), ['Disclaimers & Client\\'s Checklist'], ['crcPartIi'])\n ADD(REQUIRE(clientDecl.crcPartIii, 'Client\\'s Reference Checklist III must be filled'), ['Disclaimers & Client\\'s Checklist'], ['crcPartIii'])\n ADD(REQUIRE_TRUE(clientDecl.crcPartIii, 'Client\\'s Reference Checklist III must be true'), ['Disclaimers & Client\\'s Checklist'], ['crcPartIii'])\n ADD(REQUIRE(clientDecl.crcPartIv, 'Client\\'s Reference Checklist IV must be filled'), ['Disclaimers & Client\\'s Checklist'], ['crcPartIv'])\n ADD(REQUIRE_TRUE(clientDecl.crcPartIv, 'Client\\'s Reference Checklist IV must be true'), ['Disclaimers & Client\\'s Checklist'], ['crcPartIv'])\n\n ADD(REQUIRE(clientDecl.explainedFeesCharges, 'Explained Fee Charges Option must be filled'), ['Client\\'s Declaration'], ['explainedFeesCharges'])\n\n ADD(REQUIRE(clientDecl.pdpaConsent, 'PDPA Consent Option must be filled'), ['Client\\'s Declaration'], ['pdpaConsent'])\n\n // Trusted Individual/ Client’s Accompaniment\n ADD(WHEN(trustedIndividual.accompanied === 'yes' && trustedIndividual.confirmLanguage === 'others', REQUIRE(trustedIndividual.confirmLanguageOthers, 'Others Languages has to be filled when Others is chosen.')), ['Client\\'s Declaration'], ['confirmLanguageOthers'])\n\n ADD(WHEN(clientDecl.client0DeclarationPoliticallyExposed === 'yes', () => {\n if (!clientDecl.pepList || clientDecl.pepList.length === 0 || !clientDecl.pepList.find(pep => pep.policyholderName === 'C1')) {\n return 'There should be at least 1 political personal details for client 1'\n }\n\n let errorMsg = null\n clientDecl.pepList.forEach((pep) => {\n if (pep.isNotComplete() && pep.policyholderName === 'C1') {\n errorMsg = 'Poltically Exposed Person Details (for client 1) is not filled properly.'\n }\n })\n return errorMsg\n }), ['Politically Exposed Person Form'])\n\n ADD(WHEN(client2Included === true && clientDecl.client1DeclarationPoliticallyExposed === 'yes', () => {\n if (!clientDecl.pepList || clientDecl.pepList.length === 0 || !clientDecl.pepList.find(pep => pep.policyholderName === 'C2')) {\n return 'There should be at least 1 political personal details for client 2'\n }\n\n let errorMsg = null\n clientDecl.pepList.forEach((pep) => {\n if (pep.isNotComplete() && pep.policyholderName === 'C2') {\n errorMsg = 'Poltically Exposed Person Details (for client 2) is not filled properly.'\n }\n })\n return errorMsg\n }), ['Politically Exposed Person Form'])\n\n return getMessages()\n }\n\n // to made PEP validation out from common\n validatePEP (clientPEP: string, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE } = this.validator()\n ADD(REQUIRE(clientPEP, 'Declaration of Political Exposed Person must be filled'), ['Client\\'s Declaration'])\n return getMessages()\n }\n}\n","import { isNull, isUndefined } from 'lodash/fp'\nimport Dependant from '@master/model/kyc-form/Dependant'\nimport Validation from '@core/logic/Validation'\n\nexport default class DependantValidation extends Validation {\n validate (dependant: Dependant, index: number, belongsTo: string) {\n this.belongsTo = belongsTo\n const isRequired = (!isNull(dependant.name) && !isUndefined(dependant.name) && !this.isEmpty(dependant.name))\n\n const { getMessages, ADD, REQUIRE, REQUIRE_NUMBER, WHEN } = this.validator()\n ADD(WHEN(isRequired, REQUIRE(dependant.nric, `Dependant ${index} nric must be filled when dependant name is supplied.`)), ['Dependants'], ['nric'], index)\n ADD(WHEN(isRequired, REQUIRE_NUMBER(dependant.dob, `Dependant ${index} date of birth must be filled when dependant name is supplied.`)), ['Dependants'], ['dob'], index)\n ADD(WHEN(isRequired, REQUIRE_NUMBER(dependant.age, `Dependant ${index} age must be filled when dependant name is supplied.`)), ['Dependants'], ['age'], index)\n ADD(WHEN(isRequired, REQUIRE(dependant.gender, `Dependant ${index} gender must be filled when dependant name is supplied.`)), ['Dependants'], ['gender'], index)\n ADD(WHEN(isRequired, REQUIRE(dependant.yearsSupport, `Dependant ${index} years of support must be filled when dependant name is supplied.`)), ['Dependants'], ['yearsSupport'], index)\n ADD(WHEN(isRequired, REQUIRE(dependant.relationship, `Dependant ${index} relationship must be filled when dependant name is supplied.`)), ['Dependants'], ['relationship'], index)\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport ExistingPortfolioDeclaration from '@master/model/kyc-form/existing-plans/ExistingPortfolioDeclaration'\nimport { IExistingPortfolio } from '@master/model/kyc-form/existing-plans/IExistingPortfolio'\n\nexport default class ExistingPortfolioDeclarationValidation extends Validation {\n validate (declaration: ExistingPortfolioDeclaration, portfolios: IExistingPortfolio[], belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n ADD(REQUIRE(declaration.review, 'Existing Portfolio Review Option must be filled'), ['Insurance Portfolio'], ['review'])\n ADD(WHEN(declaration.review === 'no', REQUIRE(declaration.reviewReasons, 'Review reasons must be filled when client do not want to existing portfolios to take into consideration.')), ['Insurance Portfolio'], ['reviewReasons'])\n\n ADD(() => {\n if (declaration.review === 'yes') {\n if (!portfolios.some(pf => pf.isValid())) {\n return 'At least one policy must be stated when Yes is selected.'\n }\n }\n return null\n }, ['Insurance Portfolio'])\n\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport CustomExistingPortfolioV2 from '@company-common/model/kyc-form/existing-plans/CustomExistingPortfolioV2'\nimport ExistingPortfolioDeclaration from '@master/model/kyc-form/existing-plans/ExistingPortfolioDeclaration'\n\nexport default class ExistingPortfolioValidation extends Validation {\n validate (portfolio: CustomExistingPortfolioV2, index: number, declaration: ExistingPortfolioDeclaration, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, REQUIRE_NUMBER, WHEN } = this.validator()\n ADD(WHEN(!this.isEmpty(portfolio.owner) && declaration.review === 'yes', REQUIRE(portfolio.companyName, `Product ${index}'s Insurance Company must be filled when owner is provided.`)), ['Insurance Portfolio'], ['companyName'], index)\n ADD(WHEN(!this.isEmpty(portfolio.owner) && declaration.review === 'yes', REQUIRE(portfolio.policyInsured, `Product ${index}'s Policy Insured must be filled when owner is provided.`)), ['Insurance Portfolio'], ['policyInsured'], index)\n // ADD(WHEN(!this.isEmpty(portfolio.owner) && declaration.review === 'yes', REQUIRE(portfolio.policyType, `Product ${index}'s Policy Type must be filled when owner is provided.`)), ['Insurance Portfolio'])\n ADD(WHEN(!this.isEmpty(portfolio.owner) && declaration.review === 'yes', REQUIRE(portfolio.policyName, `Product ${index}'s Policy Name must be filled when owner is provided.`)), ['Insurance Portfolio'], ['policyName'], index)\n ADD(WHEN(!this.isEmpty(portfolio.owner) && declaration.review === 'yes', REQUIRE_NUMBER(portfolio.premium, `Product ${index}'s Policy Premium must be filled when owner is provided.`)), ['Insurance Portfolio'], ['premium'], index)\n // JPara specific change\n ADD(WHEN(!this.isEmpty(portfolio.owner) && declaration.review === 'yes', REQUIRE(portfolio.policyTerms, `Product ${index}'s Policy Term must be filled when owner is provided.`)), ['Insurance Portfolio'], ['policyTerms'], index)\n ADD(WHEN(!this.isEmpty(portfolio.owner) && declaration.review === 'yes', REQUIRE_NUMBER(portfolio.lifeProtection, `Product ${index}'s Life Protection Amount must be filled when owner is provided.`)), ['Insurance Portfolio'], ['lifeProtection'], index)\n ADD(WHEN(!this.isEmpty(portfolio.owner) && declaration.review === 'yes', REQUIRE_NUMBER(portfolio.disabilityProtection, `Product ${index}'s Disability Protection Amount must be filled when owner is provided.`)), ['Insurance Portfolio'], ['disabilityProtection'], index)\n ADD(WHEN(!this.isEmpty(portfolio.owner) && declaration.review === 'yes', REQUIRE_NUMBER(portfolio.accidentProtection, `Product ${index}'s Accident Protection Amount must be filled when owner is provided.`)), ['Insurance Portfolio'], ['accidentProtection'], index)\n ADD(WHEN(!this.isEmpty(portfolio.owner) && declaration.review === 'yes', REQUIRE_NUMBER(portfolio.criticalIllnessProtection, `Product ${index}'s Critical Illness Protection Amount must be filled when owner is provided.`)), ['Insurance Portfolio'], ['criticalIllnessProtection'], index)\n ADD(WHEN(!this.isEmpty(portfolio.owner) && declaration.review === 'yes', REQUIRE_NUMBER(portfolio.maturityAge, `Product ${index}'s Maturity Age must be filled when owner is provided.`)), ['Insurance Portfolio'], ['maturityValue'], index)\n\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport ExistingInvestDeclaration from '@master/model/kyc-form/existing-plans/ExistingInvestDeclaration'\nimport { IExistingInvestment } from '@master/model/kyc-form/existing-plans/IExistingInvestment'\n\nexport default class ExistingInvestmentDeclarationValidation extends Validation {\n validate (declaration: ExistingInvestDeclaration, investments: IExistingInvestment[], belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n ADD(REQUIRE(declaration.review, 'Existing Investment Review Option must be filled'), ['Investment Portfolio'], ['review'])\n ADD(WHEN(declaration.review === 'no', REQUIRE(declaration.reviewReasons, 'Review reasons must be filled when client do not want to existing portfolios to take into consideration.')), ['Investment Portfolio'], ['reviewReasons'])\n ADD(() => {\n if (declaration.review === 'yes') {\n if (!investments.some(invest => invest.isValid())) {\n return 'At least one investment detail must be stated when Yes is selected'\n }\n }\n return null\n }, ['Investment Portfolio'])\n\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport ExistingInvestmentV2 from '@master/model/kyc-form/existing-plans/ExistingInvestmentV2'\nimport ExistingInvestDeclaration from '@master/model/kyc-form/existing-plans/ExistingInvestDeclaration'\n\nexport default class ExistingInvestValidation extends Validation {\n validate (portfolio: ExistingInvestmentV2, index: number, declaration: ExistingInvestDeclaration, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, REQUIRE_NUMBER, WHEN } = this.validator()\n ADD(WHEN(!this.isEmpty(portfolio.ownedBy) && declaration.review === 'yes', REQUIRE(portfolio.fundManager, `Portfolio ${index}'s Investment Platform must be filled when owner is provided.`)), ['Investment Portfolio'], ['fundManager'], index)\n ADD(WHEN(!this.isEmpty(portfolio.ownedBy) && declaration.review === 'yes', REQUIRE(portfolio.fundName, `Portfolio ${index}'s Company Name must be filled when owner is provided.`)), ['Investment Portfolio'], ['fundName'], index)\n ADD(WHEN(!this.isEmpty(portfolio.ownedBy) && declaration.review === 'yes', REQUIRE(portfolio.assetType, `Portfolio ${index}'s Asset Type must be filled when owner is provided.`)), ['Investment Portfolio'], ['assetType'], index)\n ADD(WHEN(!this.isEmpty(portfolio.ownedBy) && declaration.review === 'yes', REQUIRE_NUMBER(portfolio.investmentAmt, `Portfolio ${index}'s Investment Amount must be filled when owner is provided.`)), ['Investment Portfolio'], ['investmentAmt'], index)\n ADD(WHEN(!this.isEmpty(portfolio.ownedBy) && declaration.review === 'yes', REQUIRE_NUMBER(portfolio.currentRealisableValue, `Portfolio ${index}'s Current Realisable Value must be filled when owner is provided.`)), ['Investment Portfolio'], ['currentRealisableValue'], index)\n ADD(WHEN(!this.isEmpty(portfolio.ownedBy) && declaration.review === 'yes', REQUIRE_NUMBER(portfolio.investmentAmtRsp, `Portfolio ${index}'s Investment Amount RSP must be filled when owner is provided.`)), ['Investment Portfolio'], ['investmentAmtRsp'], index)\n // JPara specific change\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport ILPPortfolioV2 from '@master/model/kyc-form/ILPPortfolioV2'\nimport { BasicProductV2 as BasicProduct } from '@master/model/kyc-form/product/BasicProductV2'\n\nexport default class ILPPortfolioValidation extends Validation {\n validate (ilpPortfolio: ILPPortfolioV2[], rcmd: BasicProduct[], belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n const ilpRcmd = rcmd.filter(product => product.isIlpPlan)\n\n ilpRcmd.forEach(ilp => {\n const foundIlp = ilpPortfolio.find(portfolio => portfolio.name === ilp.productName)\n ADD(WHEN((!foundIlp || foundIlp.funds.length === 0), () => {\n return `At least one subfund for ${ilp.productName} must be filled when product recommended`\n }), ['ILP/Sub funds'])\n })\n\n ilpPortfolio.forEach(ilp => {\n ilp.funds.forEach(fund => {\n ADD(WHEN(!this.isEmpty(ilp.name), REQUIRE(fund.name, `ILP Portfolio ${ilp.name} Fund name must be filled when ILP Portfolio name exists`)), ['ILP/Sub funds'])\n ADD(WHEN(!this.isEmpty(ilp.name), () => {\n if (fund.invAmt && fund.invAmt !== 0) return null\n return `ILP Portfolio ${ilp.name} Investment amount must be filled when ILP Portfolio name exists`\n }), ['ILP/Sub funds'])\n })\n })\n\n return getMessages()\n }\n}\n","export const isValidNRICOrFIN = (valueToCheck: string, identityType: string) => {\n // Taken from https://gist.github.com/eddiemoore/7131781\n // with few changes\n\n const str = valueToCheck?.toString().toUpperCase() || ''\n identityType = identityType?.toLowerCase() || ''\n\n // if identity type is nric, fin or null, continue checksum validation\n // else, no validation required\n if (!(identityType === null || identityType === 'nric' || identityType === 'fin')) {\n return true\n }\n\n // if first letter doesn't being with any of these letters, it can be considered a pasport number\n // as such, no validation required\n if (str.charAt(0) !== 'S' && str.charAt(0) !== 'T' && str.charAt(0) !== 'F' && str.charAt(0) !== 'G') {\n return true\n }\n\n // length must be 9 characters long\n if (str.length !== 9) {\n return false\n }\n\n // The Checksum\n const icArray = []\n for (let i = 0; i < 9; i++) {\n icArray[i] = str.charAt(i)\n }\n\n icArray[1] = parseInt(icArray[1], 10) * 2\n icArray[2] = parseInt(icArray[2], 10) * 7\n icArray[3] = parseInt(icArray[3], 10) * 6\n icArray[4] = parseInt(icArray[4], 10) * 5\n icArray[5] = parseInt(icArray[5], 10) * 4\n icArray[6] = parseInt(icArray[6], 10) * 3\n icArray[7] = parseInt(icArray[7], 10) * 2\n\n let weight = 0\n for (let i = 1; i < 8; i++) {\n weight += icArray[i]\n }\n\n const offset = (icArray[0] === 'T' || icArray[0] === 'G') ? 4 : 0\n const temp = (offset + weight) % 11\n\n const st = ['J', 'Z', 'I', 'H', 'G', 'F', 'E', 'D', 'C', 'B', 'A']\n const fg = ['X', 'W', 'U', 'T', 'R', 'Q', 'P', 'N', 'M', 'L', 'K']\n\n let theAlpha\n if (icArray[0] === 'S' || icArray[0] === 'T') {\n theAlpha = st[temp]\n } else if (icArray[0] === 'F' || icArray[0] === 'G') {\n theAlpha = fg[temp]\n }\n\n return (icArray[8] === theAlpha)\n}\n","import PersonalDetails from '@company-common/model/kyc-form/PersonalDetails'\nimport Validation from '@core/logic/Validation'\nimport { isValidNRICOrFIN } from '@master/logic/NRICFINValidationLogic'\n\nexport default class PersonalDetailsValidation extends Validation {\n validate (personalDetails: PersonalDetails, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN, REQUIRE_ARRAY } = this.validator()\n ADD(REQUIRE(personalDetails.annualIncome, 'Annual Income must be filled'), ['Personal Details'], ['annualIncome'])\n\n ADD(REQUIRE(personalDetails.contactEmail, 'Contact Email must be filled'), ['Personal Details'], ['contactEmail'])\n ADD(REQUIRE(personalDetails.dob, 'Date of Birth must be filled'), ['Personal Details'], ['dob'])\n ADD(REQUIRE(personalDetails.educationLevel, 'Education Level must be filled'), ['Personal Details'], ['educationLevel'])\n ADD(REQUIRE(personalDetails.employmentStatus, 'Employment Status must be filled'), ['Personal Details'], ['employmentStatus'])\n ADD(REQUIRE(personalDetails.gender, 'Gender must be filled'), ['Personal Details'], ['gender'])\n ADD(REQUIRE(personalDetails.citizenship, 'Citizenship must be filled'), ['Personal Details'], ['citizenship'])\n ADD(REQUIRE(personalDetails.intendedRetirementAge, 'Intended Retirement Age must be filled'), ['Personal Details'], ['intendedRetirementAge'])\n ADD(REQUIRE(personalDetails.involvedInActivities, 'Involved in Activities must be filled'), ['Personal Details'], ['involvedInActivities'])\n ADD(REQUIRE(personalDetails.maritalStatus, 'Marital Status must be filled'), ['Personal Details'], ['maritalStatus'])\n ADD(REQUIRE(personalDetails.name, 'Name must be filled'), ['Client Summary', 'Personal Details'], ['name'])\n ADD(REQUIRE(personalDetails.nric, 'NRIC/FIN/Passport No. must be filled'), ['Client Summary', 'Personal Details'], ['nric'])\n\n // if previous occupation is student/homemaker, these 3 fields is not mandatory\n if (!(personalDetails.employmentStatus === 'unemployed' && (personalDetails.previousOccupation === 'student' || personalDetails.previousOccupation === 'homemaker'))) {\n ADD(REQUIRE(personalDetails.companyName, 'Company Name must be filled'), ['Personal Details'], ['companyName'])\n ADD(REQUIRE(personalDetails.occupation, 'Occupation must be filled'), ['Personal Details'], ['occupation'])\n ADD(REQUIRE(personalDetails.exactDuties, 'Exact Duties must be filled'), ['Personal Details'], ['exactDuties'])\n }\n\n ADD(WHEN(!this.isEmpty(personalDetails.nric), () => {\n if (isValidNRICOrFIN(personalDetails.nric, 'nric') || isValidNRICOrFIN(personalDetails.nric, 'fin')) {\n return null\n }\n return 'Invalid NRIC/FIN/Passport No.'\n }), ['Client Summary', 'Personal Details'], ['nric'])\n\n ADD(REQUIRE(personalDetails.residentialAddress, 'Residential Address must be filled'), ['Personal Details'], ['residentialAddress'])\n ADD(REQUIRE(personalDetails.postalCode, 'Postal Code must be filled'), ['Personal Details'], ['postalCode'])\n ADD(REQUIRE(personalDetails.residentialCountry, 'Residential Country must be filled'), ['Personal Details'], ['residentialCountry'])\n ADD(REQUIRE(personalDetails.smoker, 'Smoker indicator must be filled'), ['Personal Details'], ['smoker'])\n ADD(REQUIRE(personalDetails.familyMedical, 'Family Medical Condition must be filled'), ['Personal Details'], ['familyMedical'])\n ADD(WHEN(personalDetails.familyMedical === 'yes', REQUIRE(personalDetails.familyMedicalSpecified, 'Family Medical Condition must be specified when Family Medical Condition is yes')), ['Personal Details'], ['familyMedicalSpecified'])\n ADD(REQUIRE_ARRAY(personalDetails.spokenLanguage, 'Spoken Language must be filled'), ['Personal Details'], ['spokenLanguage'])\n ADD(REQUIRE(personalDetails.title, 'Title must be filled'), ['Client Summary', 'Personal Details'], ['title'])\n ADD(REQUIRE_ARRAY(personalDetails.writtenLanguage, 'Written Language must be filled'), ['Personal Details'], ['writtenLanguage'])\n ADD(WHEN(personalDetails.involvedInActivities === 'yes', REQUIRE(personalDetails.activitiesSpecified, 'Activities must be specified when Involvement is yes')), ['Personal Details'], ['activitiesSpecified'])\n ADD(WHEN(personalDetails.citizenship === 'others', REQUIRE(personalDetails.citizenshipSpecified, 'Citizenship must be specified when Citizenship is others')), ['Personal Details'], ['citizenshipSpecified'])\n ADD(REQUIRE(this.isEmpty(personalDetails.contactHome) && this.isEmpty(personalDetails.contactMobile), 'Either home number or mobile number must be filled.'), ['Client Summary', 'Personal Details'], ['contactHome', 'contactMobile'])\n ADD(WHEN(!this.isEmpty(personalDetails.contactHome), () => {\n if (personalDetails.contactHome.length < 8) {\n return 'Invalid home contact number.'\n }\n return null\n }), ['Personal Details'], ['contactHome'])\n ADD(WHEN(!this.isEmpty(personalDetails.contactMobile), () => {\n if (personalDetails.contactMobile.length < 8) {\n return 'Invalid mobile contact number.'\n }\n return null\n }), ['Client Summary', 'Personal Details'], ['contactMobile'])\n ADD(WHEN(personalDetails.employmentStatus === 'unemployed', REQUIRE(personalDetails.previousOccupation, 'Previous Occupation is required when Employment Status is unemployed')), ['Personal Details'], ['previousOccupation'])\n ADD(WHEN(personalDetails.spokenLanguage.includes('others'), REQUIRE(personalDetails.spokenLanguageSpecified, 'Spoken Language Specified is required when Spoken Language is Others')), ['Personal Details'], ['spokenLanguageSpecified'])\n ADD(WHEN(personalDetails.writtenLanguage.includes('others'), REQUIRE(personalDetails.writtenLanguageSpecified, 'Written Language Specified is required when Written Language is Others')), ['Personal Details'], ['writtenLanguageSpecified'])\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport { BasicProductV2 as BasicProduct } from '@master/model/kyc-form/product/BasicProductV2'\nimport RecommendationBasis from '@company-common/model/kyc-form/RecommendationBasis'\n\nexport default class RcmdBasisValidation extends Validation {\n validate (mainBasis: RecommendationBasis, rcmd: BasicProduct[], belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n if (!rcmd.length) {\n return getMessages()\n }\n\n // ADD(REQUIRE(mainBasis.riskConcentration, 'Risk Concentration is required to be filled.'), ['Basis of Recommendation'], ['riskConcentration'])\n\n ADD(REQUIRE(mainBasis.timeHorizonProtection, 'Time Horizon Protection is required to be filled.'), ['Basis of Recommendation'], ['timeHorizonProtection'])\n ADD(REQUIRE(mainBasis.timeHorizonSavings, 'Time Horizon Savings is required to be filled.'), ['Basis of Recommendation'], ['timeHorizonSavings'])\n ADD(WHEN(mainBasis.timeHorizonProtection === 'no' || mainBasis.timeHorizonSavings === 'no', REQUIRE(mainBasis.timeHorizonDeviationReason, 'Time Horizon Deviation reason is required when Time Horizon Protection is no.')), ['Basis of Recommendation'])\n\n ADD(REQUIRE(mainBasis.riskToleranceInTune, 'Risk Tolerance in Tune is required to be filled.'), ['Basis of Recommendation'], ['riskToleranceInTune'])\n ADD(WHEN(mainBasis.riskToleranceInTune === 'no', REQUIRE(mainBasis.riskToleranceDeviationReason, 'Risk Tolerance Deviation Reason is required when recommended premium(s) is NOT in line with the client\\'s risk tolerance.')), ['Basis of Recommendation'])\n\n ADD(REQUIRE(mainBasis.liquidityEmergencyFundsDuration, 'Liquidity Emergency Funds Duration is required to be filled.'), ['Basis of Recommendation'])\n ADD(WHEN(mainBasis.liquidityEmergencyFundsDuration === 'no' || mainBasis.liquidityConsideration === 'no', REQUIRE(mainBasis.liquidityDeviationReason, 'Liquidity Deviation Reason is required when Liquidity Emergency Funds is no')), ['Basis of Recommendation'])\n ADD(REQUIRE(mainBasis.liquidityConsideration, 'Liquidity Consideration is required to be filled.'), ['Basis of Recommendation'])\n ADD(REQUIRE(mainBasis.productDeviationsExistence, 'Product Deviation Existence is required to be filled.'), ['Basis of Recommendation'], ['productDeviationsExistence'])\n ADD(WHEN(mainBasis.productDeviationsExistence === 'yes', REQUIRE(mainBasis.productDeviationsExistenceReason, 'Budget Deviation Existence Reason is required when recommended premium(s) is NOT in line with the client\\'s budget.')), ['Basis of Recommendation'])\n\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport RPA from '@company-common/model/kyc-form/CustomRPA'\n\nexport default class RPAValidation extends Validation {\n validate (rpa: RPA, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, REQUIRE_NUMBER, REQUIRE_TRUE, WHEN } = this.validator()\n ADD(REQUIRE(rpa.riskProfile, 'Risk Profile is required to be filled.'), ['Risk Profile Assessment'])\n ADD(WHEN(rpa.riskProfile !== 'as_per_questionnaire', REQUIRE_TRUE(rpa.ownChoice, 'Own Choice is required when Risk Profile is NOT \\'As Per Questionnaire\\'')), ['Risk Profile Assessment'], ['ownChoice'])\n ADD(WHEN(rpa.riskProfile === 'as_per_questionnaire', REQUIRE_NUMBER(rpa.question1, 'Question 1 is required when Risk Profile is \\'As Per Questionnaire\\'')), ['Risk Profile Assessment'], ['question1'])\n ADD(WHEN(rpa.riskProfile === 'as_per_questionnaire', REQUIRE_NUMBER(rpa.question2, 'Question 2 is required when Risk Profile is \\'As Per Questionnaire\\'')), ['Risk Profile Assessment'], ['question2'])\n ADD(WHEN(rpa.riskProfile === 'as_per_questionnaire', REQUIRE_NUMBER(rpa.question3, 'Question 3 is required when Risk Profile is \\'As Per Questionnaire\\'')), ['Risk Profile Assessment'], ['question3'])\n ADD(WHEN(rpa.riskProfile === 'as_per_questionnaire', REQUIRE_NUMBER(rpa.question4, 'Question 4 is required when Risk Profile is \\'As Per Questionnaire\\'')), ['Risk Profile Assessment'], ['question4'])\n ADD(WHEN(rpa.riskProfile === 'as_per_questionnaire', REQUIRE_NUMBER(rpa.question5, 'Question 5 is required when Risk Profile is \\'As Per Questionnaire\\'')), ['Risk Profile Assessment'], ['question5'])\n ADD(WHEN(rpa.riskProfile === 'as_per_questionnaire', REQUIRE_NUMBER(rpa.question6, 'Question 6 is required when Risk Profile is \\'As Per Questionnaire\\'')), ['Risk Profile Assessment'], ['question6'])\n ADD(WHEN(rpa.riskProfile === 'as_per_questionnaire', REQUIRE(rpa.reviewConfirmation, 'Review Confirmation is required when Risk Profile is \\'As Per Questionnaire\\'')), ['Risk Profile Assessment'], ['reviewConfirmation'])\n ADD(WHEN(rpa.riskProfile === 'as_per_questionnaire', REQUIRE(rpa.agreement, 'Client Agreement is required when Risk Profile is \\'As Per Questionnaire\\'')), ['Risk Profile Assessment'], ['agreement'])\n ADD(WHEN(rpa.agreement === 'no', REQUIRE(rpa.riskProfilePreferred, 'Risk Profile Preferred is required when you do not agree to the calculated risk profile.')), ['Risk Profile Assessment'], ['riskProfilePreferred'])\n\n return getMessages()\n }\n}\n","import Switching from '@master/model/kyc-form/Switching'\nimport Validation from '@core/logic/Validation'\n\nexport default class SwitchingValidation extends Validation {\n validate (switching: Switching, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, REQUIRE_NUMBER, WHEN } = this.validator()\n ADD(REQUIRE(switching.surrenderedInvestment, 'Surrendered Investment must be filled'), ['Replacement / Switching'], ['surrenderedInvestment'])\n ADD(REQUIRE(switching.topUp, 'Replacement Top Up must be filled'), ['Replacement / Switching'], ['topUp'])\n ADD(REQUIRE(switching.advisedBefore, 'Have you been advised before replacing/switching?'), ['Replacement / Switching'], ['advisedBefore'])\n ADD(REQUIRE(switching.surrenderedInvestment, 'Surrendered Investment must be filled'), ['Replacement / Switching'], ['surrenderedInvestment'])\n ADD(WHEN(this.anyYes(switching), REQUIRE(switching.detail, 'Details of Original Product is required when ticked \\'Yes\\' to any of the above 3 questions')), ['Replacement / Switching'], ['detail']) // Specific to JPara change, ['detail']s\n ADD(WHEN(this.anyYes(switching), REQUIRE(switching.name, 'Name is required when ticked \\'Yes\\' to any of the above 3 questions')), ['Replacement / Switching'], ['name'])\n ADD(WHEN(this.anyYes(switching), REQUIRE(switching.planType, 'Plan Type is required when ticked \\'Yes\\' to any of the above 3 questions')), ['Replacement / Switching'], ['planType'])\n // Not required for AWG\n // ADD(WHEN(this.anyYes(switching), REQUIRE(switching.policyNum, 'Policy Number is required when ticked \\'Yes\\' to any of the above 3 questions')), ['Replacement / Switching'], ['policyNum'])\n // ADD(WHEN(this.anyYes(switching), REQUIRE_NUMBER(switching.inceptionDate, 'Inception Date is required when ticked \\'Yes\\' to any of the above 3 questions')), ['Replacement / Switching'], ['inceptionDate'])\n // ADD(WHEN(this.anyYes(switching), REQUIRE_NUMBER(switching.surrenderDate, 'Surrender Date is required when ticked \\'Yes\\' to any of the above 3 questions')), ['Replacement / Switching'], ['surrenderDate'])\n ADD(WHEN(this.anyYes(switching), REQUIRE(switching.benefitsProvided, 'Benefits Provided is required when ticked \\'Yes\\' to any of the above 3 questions')), ['Replacement / Switching'], ['benefitsProvided'])\n return getMessages()\n }\n\n validateShare (switching1: Switching, switching2: Switching, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN, REQUIRE_TRUE } = this.validator()\n\n ADD(WHEN(this.anyYes(switching1) || this.anyYes(switching2), REQUIRE(switching1.reasons, 'Reasons for Replacement is required when ticked \\'Yes\\' to any of the above 3 questions')), ['Replacement / Switching'], ['reasons'])\n // ADD(WHEN(this.anyYes(switching1) || this.anyYes(switching2), REQUIRE_TRUE(switching1.noticeCheck, 'Client is to acknowledge when ticked \\'Yes\\' to any of the above 2 replacement/switching questions')), ['Replacement / Switching'])\n\n return getMessages()\n }\n\n anyYes (switching: Switching) {\n return [switching.surrenderedInvestment, switching.topUp, switching.advisedBefore].some(value => value === 'yes')\n }\n}\n","import ThirdPartyPayor from '@master/model/kyc-form/ThirdPartyPayor'\nimport Validation from '@core/logic/Validation'\nimport { BasicProductV2 as BasicProduct } from '@master/model/kyc-form/product/BasicProductV2'\n\nexport default class ThirdPartyPayorValidation extends Validation {\n validate (thirdPartyPayor: ThirdPartyPayor, rcmd: BasicProduct[], belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n ADD(REQUIRE(thirdPartyPayor.payingPremium, 'Are you paying the premiums for the policy(ies)?'), ['Budget'], ['payingPremium'])\n ADD(WHEN(thirdPartyPayor.payingPremium === 'no', REQUIRE(thirdPartyPayor.budgetNameOfPayor, 'Name of Payor must be filled when you are not paying for the premium')), ['Budget'], ['budgetNameOfPayor'])\n ADD(WHEN(thirdPartyPayor.payingPremium === 'no', REQUIRE(thirdPartyPayor.budgetContactPayor, 'Contact of Payor must be filled when you are not paying for the premium')), ['Budget'], ['budgetContactPayor'])\n ADD(WHEN(thirdPartyPayor.payingPremium === 'no', REQUIRE(thirdPartyPayor.budgetNricppPayor, 'Identity Number of Payor must be filled when you are not paying for the premium')), ['Budget'], ['budgetNricppPayor'])\n ADD(WHEN(thirdPartyPayor.payingPremium === 'no', REQUIRE(thirdPartyPayor.budget3rdPartyPayor, 'Reason for Payor must be filled when you are not paying for the premium')), ['Budget'], ['budget3rdPartyPayor'])\n ADD(WHEN(thirdPartyPayor.payingPremium === 'no', REQUIRE(thirdPartyPayor.budgetPayorRelationship, 'Relationship of Payor must be filled when you are not paying for the premium')), ['Budget'], ['budgetPayorRelationship'])\n ADD(WHEN(thirdPartyPayor.payingPremium === 'no', REQUIRE(thirdPartyPayor.budgetOccupationPayor, ' Occupation of Payor must be filled when you are not paying for the premium')), ['Budget'], ['budgetOccupationPayor'])\n ADD(WHEN(thirdPartyPayor.payingPremium === 'no', () => {\n const currentClientIndex = belongsTo === 'Client 1' ? 0 : 1\n const prods = rcmd\n .filter(rcmd => (rcmd.clientChoice === 'accept' || rcmd.clientChoice === 'ownchoice') && rcmd.clientIndex === currentClientIndex)\n .map(rcmd => rcmd.referenceId)\n if (prods.includes(thirdPartyPayor.productAccount)) return null\n return 'For which insurance product/ investment account(s) must be filled when you are not paying for the premium'\n }), ['Budget'], ['productAccount'])\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport TrustedIndividual from '@master/model/kyc-form/TrustedIndividual'\nimport PersonalDetails from '@master/model/kyc-form/PersonalDetails'\nimport ClientDeclaration from '@master/model/kyc-form/ClientDeclaration'\nimport KYCForm from '@company-common/model/kyc-form/KYCForm'\n\nexport default class TrustedIndividualValidation extends Validation {\n validate (trustedIndividual: TrustedIndividual, client1PersonalDetails: PersonalDetails,\n client2PersonalDetails: PersonalDetails, clientDeclaration: ClientDeclaration, kycForm: KYCForm,\n belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, REQUIRE_NUMBER, WHEN } = this.validator()\n\n const reviewDate = clientDeclaration.reviewDate\n const isClient1SelectedClient = client1PersonalDetails.isSelectedClient()\n const isClient2SelectedClient = client2PersonalDetails.isSelectedClient()\n\n ADD(WHEN(isClient1SelectedClient || (kycForm.hasClient2 && isClient2SelectedClient), () => {\n if (!kycForm.hasAccompaniment) {\n return 'Trusted Individual Option must be select when one of the clients is a selected client.'\n }\n }), ['Trusted Individual'], ['hasAccompaniment'])\n ADD(WHEN(kycForm.hasAccompaniment, REQUIRE(trustedIndividual.name, 'Trusted Individual Name must be filled when client\\'s accompaniment is checked.')), ['Trusted Individual'], ['name'])\n ADD(WHEN(kycForm.hasAccompaniment, REQUIRE(trustedIndividual.nric, 'Trusted Individual NRIC must be filled when client\\'s accompaniment is checked.')), ['Trusted Individual'], ['nric'])\n ADD(WHEN(kycForm.hasAccompaniment, REQUIRE(trustedIndividual.relationship, 'Trusted Individual Relationship must be filled when client\\'s accompaniment is checked.')), ['Trusted Individual'], ['relationship'])\n ADD(WHEN(kycForm.hasAccompaniment, REQUIRE(trustedIndividual.contact, 'Trusted Individual Contact Number must be filled when client\\'s accompaniment is checked.')), ['Trusted Individual'], ['contact'])\n // JPara Specific Change\n // ADD(WHEN(kycForm.hasAccompaniment, REQUIRE_NUMBER(trustedIndividual.dob, 'Trusted Individual Date of Birth must be filled when client\\'s accompaniment is checked.')), ['Trusted Individual'])\n // ADD(WHEN(kycForm.hasAccompaniment, REQUIRE(trustedIndividual.preferredTime, 'Trusted Individual Preferred Time must be filled when client\\'s accompaniment is checked.')), ['Trusted Individual'], ['preferredTime'])\n // ADD(WHEN(kycForm.hasAccompaniment, REQUIRE_NUMBER(trustedIndividual.preferredDate, 'Trusted Individual Preferred Date must be filled when client\\'s accompaniment is checked.')), ['Trusted Individual'])\n\n // JPara Specific Change\n ADD(WHEN(trustedIndividual.accompanied === 'yes' && trustedIndividual.toContact === 'yes', REQUIRE(trustedIndividual.preferredTime, 'Trusted Individual Preferred Time must be filled when client\\'s accompaniment is checked.')), ['Trusted Individual'], ['preferredTime'])\n ADD(WHEN(trustedIndividual.accompanied === 'yes' && trustedIndividual.toContact === 'yes', REQUIRE_NUMBER(trustedIndividual.preferredDate, 'Trusted Individual Preferred Date must be filled when client\\'s accompaniment is checked.')), ['Trusted Individual'], ['preferredDate'])\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport { BasicProductV2 as BasicProduct } from '@master/model/kyc-form/product/BasicProductV2'\nimport RecommendationBasis from '@company-common/model/kyc-form/RecommendationBasis'\nimport ClientDeclaration from '@company-common/model/kyc-form/ClientDeclaration'\n\nexport default class SharedRcmdBasisValidation extends Validation {\n validate (mainBasis: RecommendationBasis, dependantBasis: RecommendationBasis, clientDeclaration: ClientDeclaration, rcmd: BasicProduct[], belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, REQUIRE_NUMBER, REQUIRE_TRUE, WHEN } = this.validator()\n if (!rcmd.length) {\n return getMessages()\n }\n\n // ADD(WHEN(this.productDeviationReasonPreCondition(mainBasis, dependantBasis), REQUIRE(mainBasis.productDeviationsExistenceReason, 'Budget Deviation Existence Reason is required when recommended premium(s) is NOT in line with the client\\'s budget.')), ['Basis of Recommendation'], ['productDeviationsExistenceReason'])\n ADD(REQUIRE(mainBasis.productRecommendationElaboration, 'Product Recommendation Elaboration is required to be filled.'), ['Basis of Recommendation'], ['productRecommendationElaboration'])\n ADD(REQUIRE(mainBasis.productRiskAndLimitationsElaboration, 'Product Risk and Limitations Elaboration is required to be filled.'), ['Basis of Recommendation'], ['productRiskAndLimitationsElaboration'])\n\n // Specify to JPara Changes\n // ADD(WHEN(!clientDeclaration.clientDecisionAgree, REQUIRE(mainBasis.recommendationDecision, 'Please provide the details that you want to specify')), ['Our Recommendation'])\n\n // Specify to JPara Changes\n ADD(WHEN(clientDeclaration.clientDisagreeDecision, REQUIRE(mainBasis.recommendationDecision, 'Please provide the details that you want to specify')), ['Client\\'s Decision'], ['recommendationDecision'])\n\n // ADD(WHEN(this.riskConcentrationDeviationReasonPreCondition(mainBasis, dependantBasis), REQUIRE(mainBasis.riskConcentrationDeviationReason, 'Risk Concentration Deviation Reason is required when recommended premium(s) is NOT in line with the client\\'s risk concentration.')), ['Basis of Recommendation'])\n // ADD(WHEN(this.riskToleranceDeviationReasonPreCondition(mainBasis, dependantBasis), REQUIRE(mainBasis.riskToleranceDeviationReason, 'Risk Tolerance Deviation Reason is required when recommended premium(s) is NOT in line with the client\\'s risk tolerance.')), ['Basis of Recommendation'], ['riskToleranceDeviationReason'])\n // ADD(WHEN(this.timeHorizonDeviationReasonPreCondition(mainBasis, dependantBasis), REQUIRE(mainBasis.timeHorizonDeviationReason, 'Time Horizon Deviation reason is required when Time Horizon Protection is no.')), ['Basis of Recommendation'], ['timeHorizonDeviationReason'])\n\n return getMessages()\n }\n\n productDeviationReasonPreCondition (mainBasis: RecommendationBasis, dependantBasis: RecommendationBasis) {\n return mainBasis.productDeviationsExistence === 'yes' ||\n dependantBasis.productDeviationsExistence === 'yes'\n }\n\n // riskConcentrationDeviationReasonPreCondition (mainBasis: RecommendationBasis, dependantBasis: RecommendationBasis) {\n // return mainBasis.riskConcentration === 'no' ||\n // dependantBasis.riskConcentration === 'no'\n // }\n\n riskToleranceDeviationReasonPreCondition (mainBasis: RecommendationBasis, dependantBasis: RecommendationBasis) {\n return mainBasis.riskToleranceInTune === 'no' ||\n dependantBasis.riskToleranceInTune === 'no'\n }\n\n timeHorizonDeviationReasonPreCondition (mainBasis: RecommendationBasis, dependantBasis: RecommendationBasis) {\n return mainBasis.timeHorizonProtection === 'no' ||\n mainBasis.timeHorizonSavings === 'no' ||\n dependantBasis.timeHorizonProtection === 'no' ||\n dependantBasis.timeHorizonSavings === 'no'\n }\n}\n","import Validation from '@core/logic/Validation'\nimport CKA from '@master/model/kyc-form/CKA'\n\nexport default class SharedCKAValidation extends Validation {\n validate (cka: CKA, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD } = this.validator()\n ADD(() => {\n if (cka.ckaCompleted === null || typeof cka.ckaCompleted === 'undefined') {\n return 'Client must select to complete or not to complete CKA.'\n }\n return null\n }, ['Customer Knowledge Assessment'], ['ckaCompleted'])\n\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport { BasicProductV2 as BasicProduct } from '@master/model/kyc-form/product/BasicProductV2'\nimport NeedsBase from '@master/model/kyc-form/need-analysis/NeedsBase'\n\nexport default class RcmdValidation extends Validation {\n validate (allProducts: BasicProduct[], needsBases1: NeedsBase[], needsBases2: NeedsBase[], hasClient2: boolean, belongsTo: string) {\n const { getMessages, ADD, ADDMANDATORY } = this.validator()\n this.belongsTo = belongsTo\n\n if (allProducts.length === 0) {\n ADD(() => 'At least one product must be recommended.', ['Product Recommendations'])\n return getMessages()\n }\n\n allProducts\n .forEach((product, index) => {\n ADDMANDATORY(() => {\n if (!product.clientChoice) {\n const productNamePrefix = 'Product ' + index\n const productNameInfo = product.productName ? productNamePrefix + ' ( ' + product.productName + ' )' : productNamePrefix\n return `Client's Decision: ${productNameInfo}'s Client Choice cannot be empty`\n }\n }, ['Client\\'s Decision'])\n })\n\n let combinedNeeds = needsBases1\n if (hasClient2) combinedNeeds = [...needsBases1, ...needsBases2]\n const needs = combinedNeeds\n .filter(({ plan, level }) => plan && (level !== null && level !== undefined && level !== 'na' && level !== ''))\n .map(({ needs }) => needs)\n\n const uniqueNeeds = [...new Set(needs)]\n\n uniqueNeeds.forEach(need => {\n if (typeof need === 'undefined') {\n // need not found from map, no need to check\n return\n }\n\n ADD(() => {\n const metNeeds = allProducts\n .some(product => {\n const needsCovered = product.productNeedsCovered || []\n return needsCovered.includes(need)\n })\n\n if (!metNeeds) {\n return `Current products do not meet the ${need} needs of the client.`\n }\n }, ['Product Recommendations'])\n })\n\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\n\nexport default class BasicProductValidation extends Validation {\n validate (product, index: number, belongsTo: string) {\n this.belongsTo = belongsTo\n const productNamePrefix = 'Product ' + index\n const productNameInfo = product.productName ? productNamePrefix + ' ( ' + product.productName + ' )' : productNamePrefix\n const { getMessages, ADDMANDATORY, REQUIRE } = this.validator()\n\n if (product.type === 'investment') { // investment main account only check for client choice\n ADDMANDATORY(REQUIRE(product.clientChoice, `${productNameInfo}'s Client Choice needs to be filled.`), ['Client\\'s Decision'])\n } else {\n ADDMANDATORY(REQUIRE(product.priority, `${productNameInfo}'s priority to be filled.`), ['Product Recommendations'])\n ADDMANDATORY(REQUIRE(product.productName, `${productNameInfo}'s plan name needs to be filled.`), ['Product Recommendations'])\n ADDMANDATORY(REQUIRE(product.frequency, `${productNameInfo}'s frequency needs to be filled.`), ['Product Recommendations'])\n\n if (product.type === 'insurance') {\n ADDMANDATORY(REQUIRE(product.clientIndex, `${productNameInfo}'s owner needs to be filled.`), ['Product Recommendations'])\n ADDMANDATORY(REQUIRE(product.lifeAssured, `${productNameInfo}'s life assured to be filled.`), ['Product Recommendations'])\n ADDMANDATORY(REQUIRE(product.premiumAmount, `${productNameInfo}'s premium amount needs to be filled.`), ['Product Recommendations'])\n ADDMANDATORY(REQUIRE(product.sumAssured, `${productNameInfo}'s sum assured needs to be filled.`), ['Product Recommendations'])\n ADDMANDATORY(REQUIRE(product.paymentMode, `${productNameInfo}'s payment mode needs to be filled.`), ['Product Recommendations'])\n ADDMANDATORY(REQUIRE(product.policyTerm, `${productNameInfo}'s policy term needs to be filled.`), ['Product Recommendations'])\n ADDMANDATORY(REQUIRE(product.premiumTerm, `${productNameInfo}'s premium term needs to be filled.`), ['Product Recommendations'])\n } else if (product.type === 'investment-subFunds') {\n ADDMANDATORY(REQUIRE(product.clientIndex, `${productNameInfo}'s owner needs to be filled.`), ['Product Recommendations'])\n ADDMANDATORY(REQUIRE(product.sumAssured, `${productNameInfo}'s investment amount needs to be filled.`), ['Product Recommendations'])\n ADDMANDATORY(REQUIRE(product.transactionType, `${productNameInfo}'s type of transactions needs to be filled.`), ['Product Recommendations'])\n ADDMANDATORY(REQUIRE(product.paymentMode, `${productNameInfo}'s payment mode needs to be filled.`), ['Product Recommendations'])\n ADDMANDATORY(REQUIRE(product.wrap, `${productNameInfo}'s wrap/non-wrap needs to be filled.`), ['Product Recommendations'])\n } else if (product.type === 'insurance-rider') {\n // rider\n ADDMANDATORY(REQUIRE(product.sumAssured, `${productNameInfo}'s sum assured needs to be filled.`), ['Product Recommendations'])\n ADDMANDATORY(REQUIRE(product.premiumAmount, `${productNameInfo}'s premium amount needs to be filled.`), ['Product Recommendations'])\n }\n }\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport SavingsNeeds from '@master/model/kyc-form/need-analysis/savings/SavingsNeeds'\nimport { SavingsStructure } from '@company-common/model/kyc-form/needs-analysis/structure/savingInvestment/SavingsStructure'\nimport { Input } from '@core/model/structure/FNAStructure'\n\nexport default class SavingsNeedsValidation extends Validation {\n validate (savingsNeed: SavingsNeeds, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n\n SavingsStructure(undefined).data\n // get only with validationMsg\n .filter(data => 'validationMsg' in data)\n .forEach(data => {\n const _data = data as Input\n ADD(WHEN(savingsNeed.plan, REQUIRE(savingsNeed[_data.key], _data.validationMsg)), ['Needs Analysis Calculation'], [_data.key])\n })\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport RetirementNeeds from '@master/model/kyc-form/need-analysis/savings/RetirementNeeds'\nimport { RetirementStructure } from '@company-common/model/kyc-form/needs-analysis/structure/savingInvestment/RetirementStructure'\nimport { Input } from '@core/model/structure/FNAStructure'\n\nexport default class RetirementNeedsValidation extends Validation {\n validate (retirementNeed: RetirementNeeds, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n\n RetirementStructure(undefined).data\n // get only with validationMsg\n .filter(data => 'validationMsg' in data)\n .forEach(data => {\n const _data = data as Input\n ADD(WHEN(retirementNeed.plan, REQUIRE(retirementNeed[_data.key], _data.validationMsg)), ['Needs Analysis Calculation'], [_data.key])\n })\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport InvestmentNeeds from '@master/model/kyc-form/need-analysis/savings/InvestmentNeeds'\nimport { InvestmentStructure } from '@company-common/model/kyc-form/needs-analysis/structure/savingInvestment/InvestmentStructure'\nimport { Input } from '@core/model/structure/FNAStructure'\n\nexport default class InvestmentNeedsValidation extends Validation {\n validate (investmentNeed: InvestmentNeeds, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n\n InvestmentStructure().data\n // get only with validationMsg\n .filter(data => 'validationMsg' in data)\n .forEach(data => {\n const _data = data as Input\n ADD(WHEN(investmentNeed.plan, REQUIRE(investmentNeed[_data.key], _data.validationMsg)), ['Needs Analysis Calculation'], [_data.key])\n })\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport EducationNeedsDetail from '@master/model/kyc-form/need-analysis/savings/EducationNeedsDetail'\nimport EducationNeeds from '@master/model/kyc-form/need-analysis/savings/EducationNeeds'\n\nexport default class EducationNeedsValidation extends Validation {\n validate (educationNeedDetail: EducationNeedsDetail, index: number, educationNeeds: EducationNeeds[], belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n\n educationNeeds.some((educationNeed) => {\n ADD(WHEN(educationNeed.plan && !this.isEmpty(educationNeedDetail.providedFor), REQUIRE(educationNeedDetail.age, `Child ${index + 1} age needs to be filled.`)), ['Needs Analysis Calculation'], ['age'], index)\n ADD(WHEN(educationNeed.plan && !this.isEmpty(educationNeedDetail.providedFor), REQUIRE(educationNeedDetail.costOfEducation, `Child ${index + 1} cost of education needs to be filled.`)), ['Needs Analysis Calculation'], ['costOfEducation'], index)\n ADD(WHEN(educationNeed.plan && !this.isEmpty(educationNeedDetail.providedFor), REQUIRE(educationNeedDetail.countryOfStudy, `Child ${index + 1} country of study needs to be filled.`)), ['Needs Analysis Calculation'], ['countryOfStudy'], index)\n ADD(WHEN(educationNeed.plan && !this.isEmpty(educationNeedDetail.providedFor), REQUIRE(educationNeedDetail.yearsToSave, `Child ${index + 1} years to save needs to be filled.`)), ['Needs Analysis Calculation'], ['yearsToSave'], index)\n ADD(WHEN(educationNeed.plan && !this.isEmpty(educationNeedDetail.providedFor), REQUIRE(educationNeedDetail.inflation, `Child ${index + 1} inflation needs to be filled.`)), ['Needs Analysis Calculation'], ['inflation'], index)\n ADD(WHEN(educationNeed.plan && !this.isEmpty(educationNeedDetail.providedFor), REQUIRE(educationNeedDetail.courseDuration, `Child ${index + 1} duration of course needs to be filled.`)), ['Needs Analysis Calculation'], ['courseDuration'], index)\n ADD(WHEN(educationNeed.plan && !this.isEmpty(educationNeedDetail.providedFor), REQUIRE(educationNeedDetail.maturityValueOfExistingPolicies, `Child ${index + 1} maturity value needs to be filled.`)), ['Needs Analysis Calculation'], ['maturityValueOfExistingPolicies'], index)\n ADD(WHEN(educationNeed.plan && !this.isEmpty(educationNeedDetail.providedFor), REQUIRE(educationNeedDetail.existingResources, `Child ${index + 1} existing resources needs to be filled.`)), ['Needs Analysis Calculation'], ['existingResources'], index)\n return educationNeed // redundant\n })\n\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport LongTermProtectionClient from '@master/model/kyc-form/need-analysis/protection/LongTermProtectionClient'\nimport { LongTermCareProtectionStructure } from '@company-common/model/kyc-form/needs-analysis/structure/protection/LongTermCareProtectionStructure'\nimport { Input } from '@core/model/structure/FNAStructure'\n\nexport default class LongTermNeedsValidation extends Validation {\n validate (longTermNeed: LongTermProtectionClient, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n\n LongTermCareProtectionStructure().data\n // get only with validationMsg\n .filter(data => 'validationMsg' in data)\n .forEach(data => {\n const _data = data as Input\n ADD(WHEN(longTermNeed.plan, REQUIRE(longTermNeed[_data.key], _data.validationMsg)), ['Needs Analysis Calculation'], [_data.key])\n })\n\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport DisabilityProtectionClient from '@master/model/kyc-form/need-analysis/protection/DisabilityProtectionClient'\nimport { DisabilityProtectionStructure } from '@company-common/model/kyc-form/needs-analysis/structure/protection/DisabilityProtectionStructure'\nimport { Input } from '@core/model/structure/FNAStructure'\n\nexport default class DisabilityProtectionValidation extends Validation {\n validate (disabilityProtection: DisabilityProtectionClient, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n\n DisabilityProtectionStructure(undefined).data\n // get only with validationMsg\n .filter(data => 'validationMsg' in data)\n .forEach(data => {\n const _data = data as Input\n ADD(WHEN(disabilityProtection.plan, REQUIRE(disabilityProtection[_data.key], _data.validationMsg)), ['Needs Analysis Calculation'], [_data.key])\n })\n\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport DisabilityIncomeProtectionClient from '@master/model/kyc-form/need-analysis/protection/DisabilityIncomeProtectionClient'\nimport { DisabilityIncomeProtectionStructure } from '@company-common/model/kyc-form/needs-analysis/structure/protection/DisabilityIncomeProtectionStructure'\nimport { Input } from '@core/model/structure/FNAStructure'\n\nexport default class DisabilityIncomeProtectionValidation extends Validation {\n validate (disabilityIncomeProtection: DisabilityIncomeProtectionClient, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n\n DisabilityIncomeProtectionStructure(undefined).data\n // get only with validationMsg\n .filter(data => 'validationMsg' in data)\n .forEach(data => {\n const _data = data as Input\n ADD(WHEN(disabilityIncomeProtection.plan, REQUIRE(disabilityIncomeProtection[_data.key], _data.validationMsg)), ['Needs Analysis Calculation'], [_data.key])\n })\n\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport DeathProtectionClient from '@master/model/kyc-form/need-analysis/protection/DeathProtectionClient'\nimport { DeathProtectionStructure } from '@company-common/model/kyc-form/needs-analysis/structure/protection/DeathProtectionStructure'\nimport { Input } from '@core/model/structure/FNAStructure'\n\nexport default class DeathProtectionValidation extends Validation {\n validate (deathProtection: DeathProtectionClient, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n\n DeathProtectionStructure(undefined).data\n // get only with validationMsg\n .filter(data => 'validationMsg' in data)\n .forEach(data => {\n const _data = data as Input\n ADD(WHEN(deathProtection.plan, REQUIRE(deathProtection[_data.key], _data.validationMsg)), ['Needs Analysis Calculation'], [_data.key])\n })\n\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport { CriticalIllnessProtectionClient } from '@master/model/kyc-form/need-analysis/protection/CriticalIllnessProtectionClient'\nimport { CriticalIllnessProtectionStructure } from '@company-common/model/kyc-form/needs-analysis/structure/protection/CriticalIllnessProtectionStructure'\nimport { Input } from '@core/model/structure/FNAStructure'\n\nexport default class CriticalIllnessValidation extends Validation {\n validate (ciProtection: CriticalIllnessProtectionClient, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n\n CriticalIllnessProtectionStructure(undefined).data\n // get only with validationMsg\n .filter(data => 'validationMsg' in data)\n .forEach(data => {\n const _data = data as Input\n ADD(WHEN(ciProtection.plan, REQUIRE(ciProtection[_data.key], _data.validationMsg)), ['Needs Analysis Calculation'], [_data.key])\n })\n\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport OtherNeeds from '@master/model/kyc-form/need-analysis/others/OtherNeeds'\n\nexport default class OtherNeedsValidation extends Validation {\n validate (otherNeeds: OtherNeeds, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n\n ADD(WHEN(otherNeeds.plan, REQUIRE(otherNeeds.planningFor, 'Other Needs requires to indicate planning for.')), ['Needs Analysis Calculation'], ['planningFor'])\n ADD(WHEN(otherNeeds.plan && !this.isEmpty(otherNeeds.planningFor), REQUIRE(otherNeeds.amountNeeded, 'Other Needs requires to indicate amount needed.')), ['Needs Analysis Calculation'], ['amountNeeded'])\n ADD(WHEN(otherNeeds.plan && !this.isEmpty(otherNeeds.planningFor), REQUIRE(otherNeeds.existingBenefits, 'Other Needs requires to specify existing benefits.')), ['Needs Analysis Calculation'], ['existingBenefits'])\n\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport HospitalizationNeeds from '@master/model/kyc-form/need-analysis/health/HospitalizationNeeds'\nimport { HospitalisationStructure } from '@company-common/model/kyc-form/needs-analysis/structure/accidentHealth/HospitalisationStructure'\nimport { Input } from '@core/model/structure/FNAStructure'\n\nexport default class HospitalizationNeedsValidation extends Validation {\n validate (hospitalNeed: HospitalizationNeeds, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n\n HospitalisationStructure(undefined).data\n // get only with validationMsg\n .filter(data => 'validationMsg' in data)\n .forEach(data => {\n const _data = data as Input\n if (hospitalNeed.hospitalType === 'private' && _data.key === 'wardType') return\n ADD(WHEN(hospitalNeed.plan, REQUIRE(hospitalNeed[_data.key], _data.validationMsg)), ['Needs Analysis Calculation'], [_data.key])\n })\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport PersonalAccidentNeeds from '@company-common/model/kyc-form/needs-analysis/health/CustomPersonalAccidentNeeds'\nimport { PersonalAccidentStructure } from '@company-common/model/kyc-form/needs-analysis/structure/accidentHealth/PersonalAccidentStructure'\nimport { Input } from '@core/model/structure/FNAStructure'\n\nexport default class PersonalAccidentNeedsValidation extends Validation {\n validate (personalAccidentNeed: PersonalAccidentNeeds, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n\n PersonalAccidentStructure(undefined).data\n // get only with validationMsg\n .filter(data => 'validationMsg' in data)\n .forEach(data => {\n const _data = data as Input\n ADD(WHEN(personalAccidentNeed.plan, REQUIRE(personalAccidentNeed[_data.key], _data.validationMsg)), ['Needs Analysis Calculation'], [_data.key])\n })\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport CustomDependantsProtectionClient from '@company-common/model/kyc-form/needs-analysis/protection/CustomDependantsProtectionClient'\nimport DependantsProtection from '@master/model/kyc-form/need-analysis/protection/DependantsProtection'\ninterface Section {\n label: string;\n key: string;\n}\n// i. In the Event of Hospitalisation\nconst firstSectionKey: Section[] = [{\n label: '(i. Event of Hospitalisation)\\'s Preferred Hospital Type',\n key: 'preferredHospitalType'\n}, {\n label: '(i. Event of Hospitalisation)\\'s Preferred Ward Type',\n key: 'preferredWardType'\n}, {\n label: '(i. Event of Hospitalisation)\\'s Rider for Deductible & Co-Insurance',\n key: 'riderDeductible'\n}, {\n label: '(i. Event of Hospitalisation)\\'s Existing hospital coverage',\n key: 'existingCoverage'\n}]\n// ii. In the Event of Critical Illness\nconst secondSectionKey: Section[] = [{\n label: '(ii. Event of Critical Illness)\\'s Total Funds Required',\n key: 'totalFundsRequired'\n}, {\n label: '(ii. Event of Critical Illness)\\'s Less existing resources',\n key: 'iiLessExisting'\n}]\n// iii. In the Event of Disability\nconst thirdSectionKey: Section[] = [{\n label: '(iii. Event of Disability)\\'s Annual expenses required',\n key: 'annualExpenses'\n}, {\n label: '(iii. Event of Disability)\\'s Number of years required',\n key: 'yearsRequired'\n}, {\n label: '(iii. Event of Disability)\\'s Inflation adjusted rate return',\n key: 'infAdjusted'\n}, {\n label: '(iii. Event of Disability)\\'s Cost of medical treatment',\n key: 'medicalTreatment'\n}, {\n label: '(iii. Event of Disability)\\'s Other funds available',\n key: 'otherFunds'\n}]\n// iv. In the Event of Death\nconst fortSectionKey: Section[] = [{\n label: '(iv. Event of Death)\\'s Final Expenses',\n key: 'finalExpenses'\n}, {\n label: '(iv. Event of Death)\\'s Loans',\n key: 'loans'\n}, {\n label: '(iv. Event of Death)\\'s Others',\n key: 'others'\n}, {\n label: '(iv. Event of Death)\\'s Less existing resources',\n key: 'ivLessExisting'\n}]\n\nexport default class DependantProtectionNeedsValidation extends Validation {\n validate (dependentsProtectionDataArray: CustomDependantsProtectionClient[], client1: DependantsProtection, client2: DependantsProtection, hasClient2: boolean, belongsTo: string) {\n this.belongsTo = belongsTo\n const section = 'Needs Analysis Calculation'\n const { getMessages, ADD } = this.validator()\n\n if (!client1.plan && (!hasClient2 || (hasClient2 && !client2.plan))) {\n return []\n }\n\n ADD(() => {\n if (dependentsProtectionDataArray.every(entry => !entry.depName)) {\n return 'There should be at least one Dependant’s Protection Needs Analysis selected.'\n }\n }, [section])\n\n // check if any section is incomplete, then list the required field\n dependentsProtectionDataArray.forEach((dependents, index) => {\n if (!dependents.depName) return\n\n for (const sectionEntry of [firstSectionKey, secondSectionKey, thirdSectionKey, fortSectionKey]) {\n const partialCompletedSection = this.getPartialCompletedSection(sectionEntry, dependents)\n if (partialCompletedSection) {\n partialCompletedSection.forEach(eachField => {\n ADD(() => {\n return `Dependant ${index + 1} ${eachField} needs to be filled.`\n }, [section])\n })\n }\n }\n\n // check if all section is empty, if yes, then 'At least one of the Priorities for Dependant ' + (index + 1) + ' must be completed'\n const allSectionEmpty = [...firstSectionKey.flatMap(({ key }) => key), ...secondSectionKey.flatMap(({ key }) => key), ...thirdSectionKey.flatMap(({ key }) => key), ...fortSectionKey.flatMap(({ key }) => key)].every(key => this.isEmpty(dependents[key]))\n if (allSectionEmpty) {\n ADD(() => {\n return `At least one of the Priorities for Dependant ${index + 1} must be completed.`\n }, [section])\n }\n })\n\n return getMessages()\n }\n\n private getPartialCompletedSection (sectionKey: Section[], targetDependent) {\n const emptyFields = sectionKey.map(field => {\n if (field.key === 'preferredWardType' && targetDependent.preferredHospitalType === 'private') return\n if (this.isEmpty(targetDependent[field.key])) return field.label\n }).filter(data => data)\n // if emptyFields is same with sectionKey length means all section empty, no need do checking\n return emptyFields.length === sectionKey.length ? [] : emptyFields\n }\n}\n","import Validation from '@core/logic/Validation'\nimport ECDD from '@master/model/kyc-form/ECDD'\n\nexport default class ECDDValidation extends Validation {\n validate (ecdd: ECDD, belongsTo: string) {\n this.belongsTo = belongsTo\n\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n\n ADD(REQUIRE(ecdd.highRiskCountry, 'From high risk country is required'), ['Enhanced Client Due Diligence Form'], ['highRiskCountry'])\n ADD(WHEN(ecdd.highRiskCountry === 'yes', REQUIRE(ecdd.stayInSg, 'Stay in Singapore is required when from high risk country is Yes')), ['Enhanced Client Due Diligence Form'], ['stayInSg'])\n ADD(WHEN(ecdd.highRiskCountry === 'yes' && ecdd.stayInSg === 'no', REQUIRE(ecdd.residingAddress, 'Residing address is required when stay in Singapore is No')), ['Enhanced Client Due Diligence Form'], ['residingAddress'])\n ADD(REQUIRE(ecdd.sourceOfFunds, 'Transaction is more than SGD$500,000 is required'), ['Enhanced Client Due Diligence Form'], ['sourceOfFunds'])\n ADD(WHEN(ecdd.sourceOfFunds === 'yes', REQUIRE(ecdd.sourceOfFunds2, 'Source of Funds is required when transaction is more than SGD$500,000')), ['Enhanced Client Due Diligence Form'], ['sourceOfFunds2'])\n ADD(WHEN(ecdd.sourceOfFunds === 'yes' && ecdd.sourceOfFunds2 === 'yes', REQUIRE(ecdd.sourceOfFunds2Info, 'Source of Funds details is required when Source of Funds is Yes')), ['Enhanced Client Due Diligence Form'], ['sourceOfFunds2Info'])\n ADD(REQUIRE(ecdd.additionalNote, 'Additional note is required'), ['Enhanced Client Due Diligence Form'], ['additionalNote'])\n\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport NetWorth from '@company-common/model/kyc-form/finances/NetWorth'\n\nexport default class NetWorthValidation extends Validation {\n readonly sections = ['Net Worth']\n\n validate (netWorth: NetWorth, netWorthPlanning: string, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.cash, 'Cash/ Fixed Deposits/ Cash Equivalents ($) is required when Net Worth planning is Yes')), this.sections, ['cash'])\n // Personal Use Assets\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.residentialAssets, 'Residential Property ($) is required when Net Worth planning is Yes')), this.sections, ['residentialAssets'])\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.motor, 'Motor Vehicle ($) is required when Net Worth planning is Yes')), this.sections, ['motor'])\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.otherPersonalAssets, 'Other personal assets ($) is required when Net Worth planning is Yes')), this.sections, ['otherPersonalAssets'])\n // Invested Assets\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.investBusiness, 'Business ($) is required when Net Worth planning is Yes')), this.sections, ['investBusiness'])\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.stocksShares, 'Stock / Shares ($) is required when Net Worth planning is Yes')), this.sections, ['stocksShares'])\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.investProperty, 'Residential/ Commercial property ($) is required when Net Worth planning is Yes')), this.sections, ['investProperty'])\n\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.unitTrust, 'Unit Trust ($) is required when Net Worth planning is Yes')), this.sections, ['unitTrust'])\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.cpfOrdinary, 'CPF (OA) ($) is required when Net Worth planning is Yes')), this.sections, ['cpfOrdinary'])\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.cpfSpecial, 'CPF (SA) ($) is required when Net Worth planning is Yes')), this.sections, ['cpfSpecial'])\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.cpfRa, 'CPF (RA) ($) is required when Net Worth planning is Yes')), this.sections, ['cpfRa'])\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.cpfMedisave, 'CPF Medisave ($) is required when Net Worth planning is Yes')), this.sections, ['cpfMedisave'])\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.srs, 'SRS ($) is required when Net Worth planning is Yes')), this.sections, ['srs'])\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.lifeInsuranceCash, 'Life Insurance Cash Value($) is required when Net Worth planning is Yes')), this.sections, ['lifeInsuranceCash'])\n\n // Cash/Cash Equivalents\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.bankDeposits, 'Bank deposit(s) ($) is required when Net Worth planning is Yes')), this.sections, ['bankDeposits'])\n // Liabilities Calculation\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.homeMortgage, 'Home Mortgage ($) is required when Net Worth planning is Yes')), this.sections, ['homeMortgage'])\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.carLoans, 'Car loan ($) is required when Net Worth planning is Yes')), this.sections, ['carLoans'])\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.educationLoans, 'Education Loan ($) is required when Net Worth planning is Yes')), this.sections, ['educationLoans'])\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.creditCard, 'Credit card balance / overdraft ($) is required when Net Worth planning is Yes')), this.sections, ['creditCard'])\n ADD(WHEN(netWorthPlanning === 'yes', REQUIRE(netWorth.tax, 'Income tax ($) is required when Net Worth planning is Yes')), this.sections, ['tax'])\n\n return getMessages()\n }\n\n validateShare (netWorth: NetWorth, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n ADD(REQUIRE(netWorth.netWorthPlanning, 'Net Worth planning is required'), this.sections, ['netWorthPlanning'])\n ADD(WHEN(netWorth.netWorthPlanning === 'no', REQUIRE(netWorth.noPlanningReason, 'Net Worth Planning Reason is required when Net Worth planning is No')), this.sections, ['noPlanningReason'])\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport CashFlow from '@company-common/model/kyc-form/finances/JParaCashFlow'\n\nexport default class CashFlowValidation extends Validation {\n readonly sections = ['Cash Flow']\n\n validate (cashFlow: CashFlow, cashFlowPlanning: string, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n\n // Income Calculation\n ADD(WHEN(cashFlowPlanning === 'yes', REQUIRE(cashFlow.employment, 'Employment (less CPF) ($) is required when Cash Flow planning is Yes')), this.sections, ['employment'])\n ADD(WHEN(cashFlowPlanning === 'yes', REQUIRE(cashFlow.business, 'Business ($) is required when Cash Flow planning is Yes')), this.sections, ['business'])\n ADD(WHEN(cashFlowPlanning === 'yes', REQUIRE(cashFlow.investmentIncome, 'Investment Income ($) is required when Cash Flow planning is Yes')), this.sections, ['investmentIncome'])\n ADD(WHEN(cashFlowPlanning === 'yes', REQUIRE(cashFlow.dividends, 'Dividends ($) is required when Cash Flow planning is Yes')), this.sections, ['dividends'])\n ADD(WHEN(cashFlowPlanning === 'yes', REQUIRE(cashFlow.rentalIncome, 'Rental income ($) is required when Cash Flow planning is Yes')), this.sections, ['rentalIncome'])\n // Expenses Calculation\n ADD(WHEN(cashFlowPlanning === 'yes', REQUIRE(cashFlow.mortgageLoan, 'Mortgage Loan ($) is required when Cash Flow planning is Yes')), this.sections, ['mortgageLoan'])\n ADD(WHEN(cashFlowPlanning === 'yes', REQUIRE(cashFlow.carLoan, 'Car/Other Loans ($) is required when Cash Flow planning is Yes')), this.sections, ['carLoan'])\n ADD(WHEN(cashFlowPlanning === 'yes', REQUIRE(cashFlow.insurancePremiums, 'Insurance Premiums ($) is required when Cash Flow planning is Yes')), this.sections, ['insurancePremiums'])\n ADD(WHEN(cashFlowPlanning === 'yes', REQUIRE(cashFlow.regularSavings, 'Regular Savings ($) is required when Cash Flow planning is Yes')), this.sections, ['regularSavings'])\n\n ADD(WHEN(cashFlowPlanning === 'yes', REQUIRE(cashFlow.parentalSupport, 'Family Expenses ($) is required when Cash Flow planning is Yes')), this.sections, ['parentalSupport'])\n ADD(WHEN(cashFlowPlanning === 'yes', REQUIRE(cashFlow.personalExpenses, 'Personal Expenses ($) is required when Cash Flow planning is Yes')), this.sections, ['personalExpenses'])\n\n ADD(WHEN(cashFlowPlanning === 'yes', REQUIRE(cashFlow.lifestyleExpenses, 'Lifestyle Expenses is required when Cash Flow planning is Yes')), this.sections, ['lifestyleExpenses'])\n ADD(\n WHEN(cashFlowPlanning === 'yes' && !this.isEmpty(cashFlow.others12Text),\n REQUIRE(cashFlow.others12, `Amount of ${cashFlow.others12Text} (expenses) is required when Cash Flow planning is Yes and expense's category is defined`))\n , this.sections, ['others12'])\n ADD(WHEN(cashFlowPlanning === 'yes' && cashFlow.cashFlowChanges === 'yes', REQUIRE(cashFlow.cashFlowChangesReasons, 'Cash Flow Changes reason is required when Cash Flow planning is Yes and Cash Flow Changes is Yes')), this.sections, ['cashFlowChangesReasons'])\n ADD(WHEN(!cashFlow.cashFlowChanges, REQUIRE(cashFlow.cashFlowChanges, 'Cash Flow Changes should be yes or no')), this.sections, ['cashFlowChangesReasons'])\n ADD(WHEN(cashFlow.cashFlowChanges === 'yes', REQUIRE(cashFlow.cashFlowChangesReasons, 'Cash Flow Changes reason is required when Cash Flow Changes is Yes')), this.sections, ['cashFlowChangesReasons'])\n\n return getMessages()\n }\n\n validateShare (cashFlow: CashFlow, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n ADD(REQUIRE(cashFlow.cashFlowPlanning, 'Cash Flow planning is required'), this.sections, ['cashFlowPlanning'])\n ADD(WHEN(cashFlow.cashFlowPlanning === 'no', REQUIRE(cashFlow.cashFlowPlanningReasons, 'Cash Flow planning Reason is required when Cash Flow planning is No')), this.sections, ['cashFlowPlanningReasons'])\n return getMessages()\n }\n}\n","import Validation from '@core/logic/Validation'\nimport Budget from '@company-common/model/kyc-form/finances/Budget'\n\nexport default class BudgetValidation extends Validation {\n readonly sections = ['Budget']\n\n validate (budget: Budget, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, WHEN, REQUIRE, REQUIRE_NUMBER, REQUIRE_ARRAY } = this.validator()\n\n ADD(REQUIRE_NUMBER(budget.budgetCashPerAnnum, 'Regular Cash (per Annum) is required'), this.sections, ['budgetCashPerAnnum'])\n // ADD(REQUIRE_NUMBER(budget.budgetCashPerMonth, 'Regular Cash (per Month) is required'), this.sections, ['budgetCashPerMonth'])\n ADD(REQUIRE_NUMBER(budget.budgetUtilizeCpfMedisave, 'CPF Medisave Account (per Annum) is required'), this.sections, ['budgetUtilizeCpfMedisave'])\n ADD(REQUIRE_NUMBER(budget.budgetCash, 'Single Cash is required'), this.sections, ['budgetCash'])\n ADD(REQUIRE_NUMBER(budget.budgetCpfOrdinary, 'Single CPF Ordinary Account is required'), this.sections, ['budgetCpfOrdinary'])\n ADD(REQUIRE_NUMBER(budget.budgetCpfSpecial, 'Single CPF Special Account is required'), this.sections, ['budgetCpfSpecial'])\n ADD(REQUIRE_NUMBER(budget.budgetSrsAccount, 'Single SRS Account is required'), this.sections, ['budgetSrsAccount'])\n ADD(REQUIRE_ARRAY(budget.budgetSourceOfFunds, 'Source of funds is required'), this.sections, ['budgetSourceOfFunds'])\n ADD(REQUIRE_ARRAY(budget.budgetSourceOfWealth, 'Source of wealth is required'), this.sections, ['budgetSourceOfWealth'])\n ADD(WHEN(budget.budgetSourceOfFunds.includes('others_1'), REQUIRE(budget.budgetOthers1, 'Source of funds Others 1 is require when Source of funds Others selected others 1')), this.sections, ['budgetOthers1'])\n ADD(WHEN(budget.budgetSourceOfFunds.includes('others_2'), REQUIRE(budget.budgetOthers2, 'Source of funds Others 2 is require when Source of funds Others selected others 2')), this.sections, ['budgetOthers2'])\n ADD(WHEN(budget.budgetSourceOfWealth.includes('others_3'), REQUIRE(budget.budgetOthers3, 'Source of Wealth Others is require when Source of Wealth Others selected')), this.sections, ['budgetOthers3'])\n\n return getMessages()\n }\n\n validateShare (budgetC1: Budget, budgetC2: Budget, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, WHEN } = this.validator()\n // ADD(WHEN(budgetC1.budgetSourceOfFunds.includes('others_1'), REQUIRE(budgetC1.budgetOthers1, 'Source of funds Others 1 is require when Client 1 Source of funds Others selected others 1')), this.sections)\n // ADD(WHEN(budgetC2.budgetSourceOfFunds.includes('others_1'), REQUIRE(budgetC2.budgetOthers1, 'Source of funds Others 1 is require when Client 2 Source of funds Others selected others 1')), this.sections)\n // ADD(WHEN(budgetC1.budgetSourceOfFunds.includes('others_2'), REQUIRE(budgetC1.budgetOthers2, 'Source of funds Others 2 is require when Client 1 Source of funds Others selected others 2')), this.sections)\n // ADD(WHEN(budgetC2.budgetSourceOfFunds.includes('others_2'), REQUIRE(budgetC2.budgetOthers2, 'Source of funds Others 2 is require when Client 2 Source of funds Others selected others 2')), this.sections)\n // ADD(WHEN(budgetC1.budgetSourceOfWealth.includes('others_3'), REQUIRE(budgetC1.budgetOthers3, 'Source of wealth Others 1 is require when Client 1 Source of wealth Others selected others 1')), this.sections)\n // ADD(WHEN(budgetC2.budgetSourceOfWealth.includes('others_3'), REQUIRE(budgetC2.budgetOthers3, 'Source of wealth Others 1 is require when Client 2 Source of wealth Others selected others 1')), this.sections)\n ADD(REQUIRE(budgetC1.smallBudgetSize, 'Small budget size is required'), this.sections)\n ADD(WHEN(budgetC1.smallBudgetSize === 'yes', REQUIRE(budgetC1.budgetSubstantialReasons, 'Substantial reason is require when Small budget size is Yes')), this.sections)\n return getMessages()\n }\n}\n","import BeneficialOwner from '@company-common/model/kyc-form/BeneficialOwner'\nimport CustomBOPParticulars from '@company-common/model/kyc-form/CustomBOPParticulars'\nimport Validation from '@core/logic/Validation'\n\nexport default class BeneficialOwnerValidation extends Validation {\n validate (bo: BeneficialOwner, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, REQUIRE_TRUE, WHEN } = this.validator()\n ADD(REQUIRE(bo.declarationBeneficialOwner, 'Declaration of Beneficial Owner must be filled'), ['Client\\'s Declaration'], ['declarationBeneficialOwner'])\n ADD(WHEN(bo.declarationBeneficialOwner === 'no', () => {\n if (!bo.beneficialOwnerParticulars || this.isEmpty(bo.beneficialOwnerParticulars)) {\n return 'Beneficial Owner details should be filled'\n }\n\n let errorMsg = null\n if (this.isBeneficialOwnerDetailsNotFilled(bo.beneficialOwnerParticulars)) {\n errorMsg = 'Beneficial Owner Details is not filled properly.'\n }\n return errorMsg\n }), ['Beneficial Owner Particulars Form'], [\n 'contactNumber',\n 'correspondenceAddress',\n 'dateOfBirth',\n 'fullName',\n 'nationality',\n 'nric',\n 'reasonsForAppointment',\n 'relationshipToCustomer',\n 'residentialAddress'\n ])\n\n return getMessages()\n }\n\n isBeneficialOwnerDetailsNotFilled (beneficialOwner: CustomBOPParticulars) {\n return this.isEmpty(beneficialOwner.contactNumber) ||\n this.isEmpty(beneficialOwner.correspondenceAddress) ||\n this.isEmpty(beneficialOwner.dateOfBirth) ||\n this.isEmpty(beneficialOwner.fullName) ||\n this.isEmpty(beneficialOwner.nationality) ||\n this.isEmpty(beneficialOwner.nric) ||\n // this.isEmpty(beneficialOwner.politicallyExposedPerson) ||\n this.isEmpty(beneficialOwner.reasonsForAppointment) ||\n this.isEmpty(beneficialOwner.relationshipToCustomer) ||\n this.isEmpty(beneficialOwner.residentialAddress)\n }\n}\n","import Validation from '@core/logic/Validation'\nimport NeedsBase from '@master/model/kyc-form/need-analysis/NeedsBase'\n\nexport default class IdentifyingYourPriorities extends Validation {\n readonly sections = ['Identifying Your Priorities']\n\n validate (needs: NeedsBase[], belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, WHEN, REQUIRE } = this.validator()\n\n ADD(() => {\n const atLeastOnePlan = needs.some(need => need.plan)\n if (!atLeastOnePlan) {\n return 'For completion, at least 1 \\'To Plan For\\' priority type must be selected.'\n }\n }, this.sections)\n\n needs.filter(need => need.plan).forEach(need => {\n ADD(WHEN(!need.level, REQUIRE(need.level, `Priority level for the ${need.name} plan is required`)), this.sections)\n })\n\n return getMessages()\n }\n}\n","import AML from '@company-common/model/kyc-form/AML'\nimport Validation from '@core/logic/Validation'\n\nexport default class AMLValidation extends Validation {\n validate (aml: AML, belongsTo: string) {\n this.belongsTo = belongsTo\n const { getMessages, ADD, REQUIRE, REQUIRE_TRUE, WHEN } = this.validator()\n\n ADD(REQUIRE(aml.adverseDBChecks, 'Adverse results from private database check must be yes or no.'), ['Client\\'s AML Check'], ['adverseDBChecks'])\n ADD(REQUIRE(aml.redFlag, ' Red Flags must be yes or no'), ['Client\\'s AML Check'], ['redFlag'])\n ADD(REQUIRE(aml.sanctioned, 'Positive identification against Singapore and international sanctions /wanted / blacklists must be yes or no'), ['Client\\'s AML Check'], ['sanctioned'])\n ADD(REQUIRE(aml.financialFlowHighRisk, 'Financial flows involving tax-havens and/or High-Risk Countries must be yes or no'), ['Client\\'s AML Check'], ['financialFlowHighRisk'])\n ADD(REQUIRE(aml.pepAssociated, 'PEP or associated/related to PEP must be yes or no'), ['Client\\'s AML Check'], ['pepAssociated'])\n ADD(REQUIRE(aml.transactValueBelowThreshold, 'Transaction Value Below S$20,000 must be yes or no'), ['Client\\'s AML Check'], ['transactValueBelowThreshold'])\n ADD(REQUIRE(aml.applyMedicalProduct, 'Applying for Medical Plan products must be yes or no'), ['Client\\'s AML Check'], ['applyMedicalProduct'])\n\n return getMessages()\n }\n}\n","import AdviserDeclarationValidation from './AdviserDeclarationValidation'\nimport AdviserDetailsValidation from './AdviserDetailsValidation'\nimport CKAValidation from './CKAValidation'\nimport ClientDeclarationValidation from './ClientDeclarationValidation'\nimport DependantValidation from './DependantValidation'\nimport ExistingPortfolioDeclarationValidation from './ExistingPortfolioDeclarationValidation'\nimport ExistingPortfolioValidation from './ExistingPortfolioValidation'\nimport ExistingInvestmentDeclarationValidation from './ExistingInvestmentDeclarationValidation'\nimport ExistingInvestValidation from './ExistingInvestValidation'\nimport ILPPortfolioValidation from './ILPPortfolioValidation'\nimport PersonalDetailsValidation from './PersonalDetailsValidation'\nimport RecommendationBasisValidation from './RcmdBasisValidation'\nimport RPAValidation from './RPAValidation'\nimport SwitchingValidation from './SwitchingValidation'\nimport ThirdPartyPayorValidation from './ThirdPartyPayorValidation'\nimport TrustedIndividualValidation from './TrustedIndividualValidation'\nimport SharedRcmdBasisValidation from './SharedRcmdBasisValidation'\nimport SharedCKAValidation from './SharedCKAValidation'\nimport RcmdValidation from './RcmdValidation'\nimport BasicProductValidation from './BasicProductValidation'\nimport SavingsNeedsValidation from './SavingsNeedsValidation'\nimport RetirementNeedsValidation from './RetirementNeedsValidation'\nimport InvestmentNeedsValidation from './InvestmentNeedsValidation'\nimport EducationNeedsValidation from './EducationNeedsValidation'\nimport LongTermNeedsValidation from './LongTermNeedsValidation'\nimport DisabilityProtectionValidation from './DisabilityProtectionValidation'\nimport DisabilityIncomeProtectionValidation from './DisabilityIncomeProtectionValidation'\nimport DeathProtectionValidation from './DeathProtectionValidation'\nimport CriticalIllnessValidation from './CriticalllnessValidation'\nimport OtherNeedsValidation from './OtherNeedsValidation'\nimport HospitalizationNeedsValidation from './HospitalizationValidation'\nimport PersonalAccidentNeedsValidation from './PersonalAccidentValidation'\nimport DependantProtectionNeedsValidation from './DependantProtectionNeedsValidation'\nimport ECDDValidation from './ECDDValidation'\nimport NetWorthValidation from './NetWorthValidation'\nimport CashFlowValidation from './CashFlowValidation'\nimport BudgetValidation from './BudgetValidation'\nimport BeneficialOwnerValidation from './BeneficialOwnerValidation'\nimport IdentifyingYourPriorities from './IdentifyingYourPriorities'\nimport AMLValidation from './AMLValidation'\n\nexport default class KYCValidators {\n personalDetails = new PersonalDetailsValidation()\n dependant = new DependantValidation()\n clientDeclaration = new ClientDeclarationValidation()\n trustedIndividual = new TrustedIndividualValidation()\n thirdParty = new ThirdPartyPayorValidation()\n switching = new SwitchingValidation()\n rpa = new RPAValidation()\n basis = new RecommendationBasisValidation()\n ilpPortfolio = new ILPPortfolioValidation()\n existingPorfolioDeclaration = new ExistingPortfolioDeclarationValidation()\n existingPortfolio = new ExistingPortfolioValidation()\n existingInvestmentDeclaration = new ExistingInvestmentDeclarationValidation()\n existingInvest = new ExistingInvestValidation()\n cka = new CKAValidation()\n adviserDetails = new AdviserDetailsValidation()\n adviserDeclaration = new AdviserDeclarationValidation()\n recommendations = new RcmdValidation()\n products = new BasicProductValidation()\n beneficialOwner = new BeneficialOwnerValidation()\n\n // FNA\n identifyingYourPriorities = new IdentifyingYourPriorities()\n savingNeeds = new SavingsNeedsValidation()\n retirementNeeds = new RetirementNeedsValidation()\n investmentNeeds = new InvestmentNeedsValidation()\n educationNeeds = new EducationNeedsValidation()\n longTermNeeds = new LongTermNeedsValidation()\n disabilityProtection = new DisabilityProtectionValidation()\n disabilityIncomeProtection = new DisabilityIncomeProtectionValidation()\n deathProtection = new DeathProtectionValidation()\n criticalIllness = new CriticalIllnessValidation()\n otherNeeds = new OtherNeedsValidation()\n hospitalizationNeeds = new HospitalizationNeedsValidation()\n personalAccidentNeeds = new PersonalAccidentNeedsValidation()\n dependentsProtection = new DependantProtectionNeedsValidation()\n aml = new AMLValidation()\n ecdd = new ECDDValidation()\n netWorth = new NetWorthValidation()\n cashFlow = new CashFlowValidation()\n budget = new BudgetValidation()\n\n // Shared validators\n sharedRcmdBasis = new SharedRcmdBasisValidation()\n sharedCka = new SharedCKAValidation()\n}\n","import KYCForm from '@company-common/model/kyc-form/KYCForm'\nimport KYCValidators from './KYCValidators'\nimport PretransactionalChecklist from '@/views/kyc-pdf/model/ptc/PretransactionalChecklist'\nimport NeedsBase from '@master/model/kyc-form/need-analysis/NeedsBase'\nimport { get } from 'lodash/fp'\nimport { highRiskCheck } from '@master/logic/PretransactionsLogic'\nimport highRiskCountryList from '@company-common/config/high-risk-country.json'\nimport ExistingInvestmentV2 from '@master/model/kyc-form/existing-plans/ExistingInvestmentV2'\nimport CustomExistingPortfolioV2 from '@company-common/model/kyc-form/existing-plans/CustomExistingPortfolioV2'\nimport { BasicProductV2 as BasicProduct } from '@master/model/kyc-form/product/BasicProductV2'\n\n/**\n * Temporary solutions after updated the JPara @core, @master, @company-common to the latest branch\n * Will need to change the logic from frontend to @core or @master\n */\n\nexport default class KYCFormValidation {\n private kycForm!: KYCForm\n private validators!: KYCValidators\n private verifiedPretransactionChecklist!: PretransactionalChecklist\n\n constructor (kycForm: KYCForm, pretransactionChecklist: PretransactionalChecklist) {\n this.kycForm = kycForm\n this.verifiedPretransactionChecklist = pretransactionChecklist\n this.validators = new KYCValidators()\n }\n\n validate () {\n return this.validationProgress(this.validators)\n }\n\n protected validationProgress (validators: KYCValidators) {\n const validationResult = []\n\n const rpaNotRequired = this.kycForm.client1.rpa.rpaCompleted // this is a shared attribute\n\n // Validate Client 1 information\n validationResult.push(...validators.personalDetails.validate(this.kycForm.client1.personalDetails, 'Client 1'))\n validationResult.push(...validators.switching.validate(this.kycForm.client1.switching, 'Client 1'))\n if (!rpaNotRequired) validationResult.push(...validators.rpa.validate(this.kycForm.client1.rpa, 'Client 1'))\n validationResult.push(...validators.basis.validate(this.kycForm.client1.recommendationBasis, this.kycForm.recommendations.rcmd, 'Client 1'))\n validationResult.push(...validators.cka.validate(this.kycForm.client1.cka, this.kycForm.client1.cka, 'Client 1'))\n const {\n deathProtectionNeeds,\n disabilityIncomeNeeds,\n criticalIllnessNeeds,\n disabilityProtectionNeeds,\n longTermProtectionClient,\n dependantsProtection,\n personalAccidentNeeds,\n hospitalizationNeeds,\n retirementNeeds,\n savingsNeeds,\n investmentNeeds,\n educationNeeds,\n other1Needs,\n other2Needs\n } = this.kycForm.client1\n const needs = [\n deathProtectionNeeds,\n disabilityIncomeNeeds,\n criticalIllnessNeeds,\n disabilityProtectionNeeds,\n longTermProtectionClient,\n dependantsProtection,\n personalAccidentNeeds,\n hospitalizationNeeds,\n retirementNeeds,\n savingsNeeds,\n investmentNeeds,\n educationNeeds,\n other1Needs,\n other2Needs\n ]\n validationResult.push(...validators.identifyingYourPriorities.validate(needs, 'Client 1'))\n\n validationResult.push(...validators.aml.validate(this.kycForm.client1.aml, 'Client 1'))\n validationResult.push(...validators.criticalIllness.validate(this.kycForm.client1.criticalIllnessNeeds, 'Client 1'))\n validationResult.push(...validators.deathProtection.validate(this.kycForm.client1.deathProtectionNeeds, 'Client 1'))\n validationResult.push(...validators.disabilityIncomeProtection.validate(this.kycForm.client1.disabilityIncomeNeeds, 'Client 1'))\n validationResult.push(...validators.disabilityProtection.validate(this.kycForm.client1.disabilityProtectionNeeds, 'Client 1'))\n validationResult.push(...validators.longTermNeeds.validate(this.kycForm.client1.longTermProtectionClient, 'Client 1'))\n validationResult.push(...validators.investmentNeeds.validate(this.kycForm.client1.investmentNeeds, 'Client 1'))\n validationResult.push(...validators.retirementNeeds.validate(this.kycForm.client1.retirementNeeds, 'Client 1'))\n validationResult.push(...validators.savingNeeds.validate(this.kycForm.client1.savingsNeeds, 'Client 1'))\n validationResult.push(...validators.otherNeeds.validate(this.kycForm.client1.other1Needs, 'Client 1'))\n validationResult.push(...validators.otherNeeds.validate(this.kycForm.client1.other2Needs, 'Client 1'))\n validationResult.push(...validators.hospitalizationNeeds.validate(this.kycForm.client1.hospitalizationNeeds, 'Client 1'))\n validationResult.push(...validators.personalAccidentNeeds.validate(this.kycForm.client1.personalAccidentNeeds, 'Client 1'))\n validationResult.push(...validators.netWorth.validate(this.kycForm.client1.netWorth, this.kycForm.client1.netWorth.netWorthPlanning, 'Client 1'))\n validationResult.push(...validators.cashFlow.validate(this.kycForm.client1.cashFlow, this.kycForm.client1.cashFlow.cashFlowPlanning, 'Client 1'))\n validationResult.push(...validators.budget.validate(this.kycForm.client1.budget, 'Client 1'))\n validationResult.push(...validators.thirdParty.validate(this.kycForm.client1.thirdPartyPayor, this.kycForm.allRecommendations, 'Client 1'))\n validationResult.push(...validators.beneficialOwner.validate(this.kycForm.client1.beneficialOwner, 'Client 1'))\n\n validationResult.push(...validators.clientDeclaration.validatePEP(this.kycForm.clientDeclaration.client0DeclarationPoliticallyExposed, 'Client 1'))\n\n // Validate Client 2 if it is included\n if (this.kycForm.client2.personalDetails.included) {\n // Validate Client 2 information\n validationResult.push(...validators.personalDetails.validate(this.kycForm.client2.personalDetails, 'Client 2'))\n validationResult.push(...validators.switching.validate(this.kycForm.client2.switching, 'Client 2'))\n if (!rpaNotRequired) validationResult.push(...validators.rpa.validate(this.kycForm.client2.rpa, 'Client 2'))\n validationResult.push(...validators.basis.validate(this.kycForm.client2.recommendationBasis, this.kycForm.recommendations.rcmd, 'Client 2'))\n validationResult.push(...validators.cka.validate(this.kycForm.client2.cka, this.kycForm.client1.cka, 'Client 2'))\n const {\n deathProtectionNeeds,\n disabilityIncomeNeeds,\n criticalIllnessNeeds,\n disabilityProtectionNeeds,\n longTermProtectionClient,\n dependantsProtection,\n personalAccidentNeeds,\n hospitalizationNeeds,\n retirementNeeds,\n savingsNeeds,\n investmentNeeds,\n educationNeeds,\n other1Needs,\n other2Needs\n } = this.kycForm.client2\n const needs = [\n deathProtectionNeeds,\n disabilityIncomeNeeds,\n criticalIllnessNeeds,\n disabilityProtectionNeeds,\n longTermProtectionClient,\n dependantsProtection,\n personalAccidentNeeds,\n hospitalizationNeeds,\n retirementNeeds,\n savingsNeeds,\n investmentNeeds,\n educationNeeds,\n other1Needs,\n other2Needs\n ]\n validationResult.push(...validators.identifyingYourPriorities.validate(needs, 'Client 2'))\n validationResult.push(...validators.aml.validate(this.kycForm.client2.aml, 'Client 2'))\n validationResult.push(...validators.criticalIllness.validate(this.kycForm.client2.criticalIllnessNeeds, 'Client 2'))\n validationResult.push(...validators.deathProtection.validate(this.kycForm.client2.deathProtectionNeeds, 'Client 2'))\n validationResult.push(...validators.disabilityIncomeProtection.validate(this.kycForm.client2.disabilityIncomeNeeds, 'Client 2'))\n validationResult.push(...validators.disabilityProtection.validate(this.kycForm.client2.disabilityProtectionNeeds, 'Client 2'))\n validationResult.push(...validators.longTermNeeds.validate(this.kycForm.client2.longTermProtectionClient, 'Client 2'))\n validationResult.push(...validators.investmentNeeds.validate(this.kycForm.client2.investmentNeeds, 'Client 2'))\n validationResult.push(...validators.retirementNeeds.validate(this.kycForm.client2.retirementNeeds, 'Client 2'))\n validationResult.push(...validators.savingNeeds.validate(this.kycForm.client2.savingsNeeds, 'Client 2'))\n validationResult.push(...validators.otherNeeds.validate(this.kycForm.client2.other1Needs, 'Client 2'))\n validationResult.push(...validators.otherNeeds.validate(this.kycForm.client2.other2Needs, 'Client 2'))\n validationResult.push(...validators.hospitalizationNeeds.validate(this.kycForm.client2.hospitalizationNeeds, 'Client 2'))\n validationResult.push(...validators.personalAccidentNeeds.validate(this.kycForm.client2.personalAccidentNeeds, 'Client 2'))\n validationResult.push(...validators.netWorth.validate(this.kycForm.client2.netWorth, this.kycForm.client1.netWorth.netWorthPlanning, 'Client 2'))\n validationResult.push(...validators.cashFlow.validate(this.kycForm.client2.cashFlow, this.kycForm.client1.cashFlow.cashFlowPlanning, 'Client 2'))\n validationResult.push(...validators.budget.validate(this.kycForm.client2.budget, 'Client 2'))\n validationResult.push(...validators.thirdParty.validate(this.kycForm.client2.thirdPartyPayor, this.kycForm.allRecommendations, 'Client 2'))\n validationResult.push(...validators.beneficialOwner.validate(this.kycForm.client2.beneficialOwner, 'Client 2'))\n\n validationResult.push(...validators.clientDeclaration.validatePEP(this.kycForm.clientDeclaration.client1DeclarationPoliticallyExposed, 'Client 2'))\n }\n\n // Validate all shared information\n this.kycForm.dependants.forEach((dependant, index) => {\n validationResult.push(...validators.dependant.validate(dependant, index + 1, 'Common'))\n })\n\n validationResult.push(...validators.dependentsProtection.validate(this.kycForm.dependantsProtectionClient, this.kycForm.client1.dependantsProtection, this.kycForm.client2.dependantsProtection, this.kycForm.hasClient2, 'Common'))\n\n const educationNeedsForC1C2 = [this.kycForm.client1.educationNeeds, this.kycForm.client2.educationNeeds]\n this.kycForm.educationNeedsDetails.forEach((educationNeedDetail, index) => {\n validationResult.push(...validators.educationNeeds.validate(educationNeedDetail, index, educationNeedsForC1C2, 'Common'))\n })\n\n validationResult.push(...validators.clientDeclaration.validate(this.kycForm.clientDeclaration, this.kycForm.trustedIndividual, this.kycForm.client2.personalDetails.included, this.kycForm, 'Common'))\n validationResult.push(...validators.trustedIndividual.validate(this.kycForm.trustedIndividual, this.kycForm.client1.personalDetails, this.kycForm.client2.personalDetails, this.kycForm.clientDeclaration, this.kycForm, 'Common'))\n validationResult.push(...validators.sharedRcmdBasis.validate(this.kycForm.client1.recommendationBasis, this.kycForm.client2.recommendationBasis, this.kycForm.clientDeclaration, this.kycForm.recommendations.rcmd, 'Common'))\n\n validationResult.push(...validators.ilpPortfolio.validate(this.kycForm.newIlpPortfolios.ilpPortfolios, this.kycForm.recommendations.validBasicProduct, 'Common'))\n\n validationResult.push(...validators.existingPorfolioDeclaration.validate(this.kycForm.existingPortfolio.declaration, this.kycForm.existingPortfolio.portfolios, 'Common'))\n validationResult.push(...validators.existingInvestmentDeclaration.validate(this.kycForm.existingInvestment.declaration, this.kycForm.existingInvestment.portfolios, 'Common'))\n\n this.kycForm.existingPortfolio.portfolios\n .filter((portfolio: CustomExistingPortfolioV2) => portfolio.owner === 'C1' || (this.kycForm.hasClient2 && portfolio.owner === 'C2'))\n .forEach((portfolio: CustomExistingPortfolioV2, index) => {\n validationResult.push(...validators.existingPortfolio.validate(portfolio, index + 1, this.kycForm.existingPortfolio.declaration, 'Common'))\n })\n\n this.kycForm.existingInvestment.portfolios\n .filter((portfolio: ExistingInvestmentV2) => portfolio.ownedBy === 'C1' || (this.kycForm.hasClient2 && portfolio.ownedBy === 'C2'))\n .forEach((portfolio: ExistingInvestmentV2, index) => {\n validationResult.push(...validators.existingInvest.validate(portfolio, index + 1, this.kycForm.existingInvestment.declaration, 'Common'))\n })\n\n validationResult.push(...validators.sharedCka.validate(this.kycForm.client1.cka, 'Common'))\n validationResult.push(...validators.netWorth.validateShare(this.kycForm.client1.netWorth, 'Common'))\n validationResult.push(...validators.cashFlow.validateShare(this.kycForm.client1.cashFlow, 'Common'))\n validationResult.push(...validators.budget.validateShare(this.kycForm.client1.budget, this.kycForm.client2.budget, 'Common'))\n validationResult.push(...validators.adviserDetails.validate(this.kycForm.adviser.details, 'Adviser'))\n validationResult.push(...validators.adviserDeclaration.validate(this.kycForm.adviser.declaration, [this.kycForm.client1.switching, this.kycForm.client2.switching], 'Adviser'))\n\n // Specify to SonyLife changes\n validationResult.push(...validators.switching.validateShare(this.kycForm.client1.switching, this.kycForm.client2.switching, 'Common'))\n\n // Product Recommendations check\n const client1Needs: NeedsBase[] = Object.keys(this.kycForm.client1).filter((key) => { return (get(key, this.kycForm.client1) instanceof NeedsBase) }).map((key) => { return get(key, this.kycForm.client1) })\n const client2Needs: NeedsBase[] = Object.keys(this.kycForm.client2).filter((key) => { return (get(key, this.kycForm.client2) instanceof NeedsBase) }).map((key) => { return get(key, this.kycForm.client2) })\n validationResult.push(...validators.recommendations.validate(this.kycForm.recommendations.flatAllProducts as BasicProduct[], client1Needs, client2Needs, this.kycForm.hasClient2, 'Products'))\n this.kycForm.recommendations.flatProductWithInvestMainAccount.forEach((product, index) => {\n validationResult.push(...validators.products.validate(product, index, 'Common'))\n })\n\n if (highRiskCheck(0, this.kycForm.client1.personalDetails.citizenship, this.kycForm.client1.personalDetails.citizenshipSpecified, this.kycForm.recommendations.rcmd, highRiskCountryList, this.kycForm.client1.personalDetails.citizenshipSpecified2)) {\n validationResult.push(...validators.ecdd.validate(this.kycForm.client1.ecdd, 'Client 1'))\n }\n\n if (highRiskCheck(1, this.kycForm.client2.personalDetails.citizenship, this.kycForm.client2.personalDetails.citizenshipSpecified, this.kycForm.recommendations.rcmd, highRiskCountryList, this.kycForm.client2.personalDetails.citizenshipSpecified2)) {\n validationResult.push(...validators.ecdd.validate(this.kycForm.client2.ecdd, 'Client 2'))\n }\n\n // Organise all into sections\n const structured: any = {}\n validationResult.forEach(({ message, sections, category, belongsTo, key, index }) => {\n sections.forEach((section) => {\n // if structured has no section, create one\n if (!structured[section]) {\n structured[section] = {}\n }\n\n // if current section is new, create one that belongsTo it\n if (!structured[section][belongsTo]) {\n structured[section][belongsTo] = []\n }\n\n structured[section][belongsTo].push({ message, sections, category, belongsTo, key, index })\n })\n })\n return structured\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('AppDialog',{staticClass:\"clone-dialog\",attrs:{\"size\":'large'},on:{\"close\":function($event){return _vm.$emit('close')}}},[_c('template',{slot:\"header\"},[_vm._v(\"Clone KYC Form\")]),_c('template',{slot:\"body\"},[_c('div',{staticClass:\"sections\"},[_c('el-tree',{ref:\"sectionTree\",attrs:{\"data\":_vm.clonedSections,\"node-key\":\"id\",\"default-checked-keys\":_vm.defaultCheckedKeys,\"show-checkbox\":\"\"}})],1),_c('AppNewClientManual',{staticClass:\"form\",attrs:{\"model\":_vm.kycPersonalDetails,\"hideActionButtons\":true}})],1),_c('template',{slot:\"footer\"},[_c('button',{staticClass:\"btn-default\",on:{\"click\":_vm.cloneKYCForm}},[_vm._v(\"Clone KYC Form\")])])],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop, Vue } from 'vue-property-decorator'\nimport { namespace } from 'vuex-class'\nimport KYCForm from '@master/model/kyc-form/KYCForm'\nimport AppDialog from '@core/components/AppDialog.vue'\nimport AppNewClientManual from '@core/components/AppNewClientManual.vue'\nimport { container, cid, inject } from 'inversify-props'\nimport API from '@core/services/API'\nimport { IRiskRatingService } from '@master/services/IRiskRatingService'\nimport { IProjectSettings } from '@master/config/IProjectSettings'\nimport { IDateService } from '@master/services/IDateService'\nimport { UIService } from '@core/services/UIService'\nimport { SharedVariable } from '@core/model/SharedVariable'\nimport { cloneDeep } from 'lodash/fp'\nimport FullPersonalDetails from '@master/model/kyc-form/PersonalDetails'\nimport { Tree } from 'element-ui'\nimport { IPrioritiesStructure } from '@master/model/kyc-form/need-analysis/IPrioritiesStructure'\nimport { get, set } from 'lodash'\nimport KYCClient from '@master/model/kyc-form/KYCClient'\n\nconst kycFormStore = namespace('KYCFormStore')\nconst kycSectionStore = namespace('KYCSectionStore')\nconst dateService = container.get(cid.IDateService)\nconst projectSettings = container.get(cid.IProjectSettings)\nconst riskRatingService = container.get(cid.IRiskRatingService)\n\n@Component({\n components: {\n AppDialog,\n AppNewClientManual\n }\n})\nexport default class AppCloneForm extends Vue {\n @Prop() srcSectionMap\n @Prop() additionalExcludedSection?: string []\n @kycSectionStore.State\n private sections\n\n @kycFormStore.State\n private kycForm!: KYCForm\n\n @inject()\n private $api: API\n\n uiService: UIService\n\n @inject()\n private sharedVariable: SharedVariable\n\n @inject()\n private ThePrioritiesNeeds: IPrioritiesStructure\n\n private newKycForm: KYCForm = new KYCForm(dateService, projectSettings, riskRatingService)\n private clonedSections = []\n protected defaultCheckedKeys = ['about-you', 'our-recommendation'] // default checked tree\n protected excludedSections = ['disclaimers-and-client-checklist', 'client-declaration', 'financial-consultant-declaration', 'kyc-confirmation', 'appendix']\n\n private kycPersonalDetails = {\n client1: new FullPersonalDetails('client_0', dateService),\n client2: new FullPersonalDetails('client_1', dateService)\n }\n\n get sectionsMapping () {\n return this.srcSectionMap || this.defaultSectionsMapping\n }\n\n get defaultSectionsMapping () {\n return {\n 'client-summary': [\n 'client1.personalDetails',\n 'client2.personalDetails',\n 'clientDeclaration'\n ],\n 'important-notices': [\n 'clientDeclaration'\n ],\n 'personal-details': [\n 'client1.personalDetails',\n 'client2.personalDetails'\n ],\n dependants: [\n 'client1.personalDetails',\n 'client2.personalDetails',\n 'dependants'\n ],\n 'client-accompaniment': [\n 'trustedIndividual',\n 'client1.personalDetails',\n 'client2.personalDetails'\n ],\n 'ai-oi': [\n 'client1.aioi',\n 'client2.aioi'\n ],\n 'property-financing': [\n 'client1.propertyFinancing'\n ],\n 'risk-profile-assessment': [\n 'client1.rpa',\n 'client2.rpa'\n ],\n 'customer-knowledge-assessment': [\n 'client1.cka',\n 'client2.cka'\n ],\n 'cash-flow': [\n 'client1.cashFlow',\n 'client2.cashFlow'\n ],\n 'net-worth': [\n 'client1.netWorth',\n 'client2.netWorth'\n ],\n budget: [\n 'client1.budget',\n 'client2.budget',\n 'client1.thirdPartyPayor',\n 'client2.thirdPartyPayor'\n ],\n insurance: [\n 'existingPortfolio'\n ],\n investment: [\n 'existingInvestment'\n ],\n 'identifying-your-priorities': [\n 'clientDeclaration',\n ...this.priorities('client1'),\n ...this.priorities('client2')\n ],\n 'needs-analysis-calculation': [\n ...this.priorities('client1'),\n ...this.priorities('client2')\n ],\n 'adjustments-and-assumptions': [\n 'clientAssumptions'\n ],\n 'our-recommendation': [\n 'recommendations',\n 'ilpPortfolios',\n 'rpa',\n 'client1.recommendationBasis',\n 'client2.recommendationBasis',\n 'clientDeclaration',\n 'client1.personalDetails',\n 'client2.personalDetails'\n ],\n 'replacement-or-switching': [\n 'client1.switching',\n 'client2.switching',\n 'adviser.declaration'\n ],\n bop: [\n 'client1.beneficialOwner',\n 'client2.beneficialOwner'\n ],\n pep: [\n 'clientDeclaration'\n ],\n ecdd: [\n 'client1.ecdd',\n 'client2.ecdd',\n 'client1.personalDetails',\n 'client2.personalDetails'\n ]\n }\n }\n\n get currentUser () {\n return this.$store.getters.currentUser\n }\n\n priorities (client: 'client1' | 'client2') {\n return this.ThePrioritiesNeeds.getPriorities().map(priority => `${client}.${priority.key}`) || []\n }\n\n assignAllKYCForm () {\n // Get all checked sections & subsections tree, and filtered only the subsections or our-recommendations\n const sectionTree = this.$refs.sectionTree as Tree\n const checkedSections = sectionTree.getCheckedNodes().filter(section => !section.children || section.children.length === 0)\n\n // Get all sections models based on the sectionsMapping\n const clonedModels = []\n checkedSections.forEach(section => {\n const sectionModels = this.sectionsMapping[section.id]\n clonedModels.push(...sectionModels)\n })\n\n // Removed duplicated models\n const removedDuplicatedModels = [...new Set(clonedModels)]\n\n // Assign new KYC Form based on the selected sections\n removedDuplicatedModels.forEach(model => {\n const toCopy = get(this.kycForm, model)\n set(this.newKycForm, model, toCopy)\n })\n\n // Assign new kycform with the kyc client\n this.newKycForm.client1.personalDetails.title = cloneDeep(this.kycPersonalDetails.client1.title)\n this.newKycForm.client1.personalDetails.name = cloneDeep(this.kycPersonalDetails.client1.name)\n this.newKycForm.client1.personalDetails.nric = cloneDeep(this.kycPersonalDetails.client1.nric)\n this.newKycForm.client1.personalDetails.contactMobile = cloneDeep(this.kycPersonalDetails.client1.contactMobile)\n\n if (this.newKycForm.client2.personalDetails.included || this.kycPersonalDetails.client2.name) {\n this.newKycForm.client2.personalDetails.included = true\n this.newKycForm.client2.personalDetails.title = cloneDeep(this.kycPersonalDetails.client2.title)\n this.newKycForm.client2.personalDetails.name = cloneDeep(this.kycPersonalDetails.client2.name)\n this.newKycForm.client2.personalDetails.nric = cloneDeep(this.kycPersonalDetails.client2.nric)\n this.newKycForm.client2.personalDetails.contactMobile = cloneDeep(this.kycPersonalDetails.client2.contactMobile)\n }\n\n // Assign adviser oid\n this.newKycForm.adviser.details.adviserOid = this.currentUser.accountID\n }\n\n async saveKYCForm () {\n const rawKycForm = this.newKycForm.convertToRawData()\n const response = await this.$api.kycForm.meta({\n _oid: 'new',\n meta: JSON.parse(JSON.stringify(rawKycForm))\n })\n\n this.$emit('close')\n const isConfirm = await this.uiService.confirm.show({\n type: 'success',\n message: 'KYC Form cloned successfully! Do you wish to go to the new KYC Form?'\n })\n if (isConfirm) {\n window.location.href = '/live/kyc-form/' + response.updateMeta._oid\n }\n }\n\n async cloneKYCForm () {\n await this.assignAllKYCForm()\n await this.saveKYCForm()\n }\n\n initSectionTree () {\n const excludeBranches = this.excludedSections.concat(this.additionalExcludedSection)\n this.clonedSections =\n this.sections\n .filter(section => !excludeBranches.includes(section.url) && section.url) // excludes some sections & only include route with valid url\n .map(section => {\n const children = section.subs ? section.subs.map(({ name, url }) => ({ label: name, id: url })) : []\n return {\n label: section.name,\n children,\n id: section.url\n }\n })\n }\n\n initKYCForm () {\n this.kycPersonalDetails.client1 = cloneDeep(this.kycForm.client1.personalDetails)\n if (this.kycForm.client2.personalDetails.included) {\n this.kycPersonalDetails.client2 = cloneDeep(this.kycForm.client2.personalDetails)\n }\n }\n\n mounted () {\n this.uiService = this.sharedVariable.uiService\n this.initSectionTree()\n this.initKYCForm()\n }\n}\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppCloneForm.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppCloneForm.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./AppCloneForm.vue?vue&type=template&id=ec484c66&scoped=true&\"\nimport script from \"./AppCloneForm.vue?vue&type=script&lang=ts&\"\nexport * from \"./AppCloneForm.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./AppCloneForm.vue?vue&type=style&index=0&id=ec484c66&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"ec484c66\",\n null\n \n)\n\nexport default component.exports","import { ThePrioritiesNeeds } from '@company-common/model/kyc-form/needs-analysis/ThePrioritiesNeeds'\nconst thePrioritiesNeeds = new ThePrioritiesNeeds()\n\nfunction priorities (\n client: 'client1' | 'client2',\n isIdentifyAnalysis: boolean\n) {\n return (\n thePrioritiesNeeds.getPriorities().map(priority => {\n if (isIdentifyAnalysis) {\n return `${client}.${priority.key}`\n }\n\n return priority.dataDetail\n ? priority.dataDetail\n : `${client}.${priority.key}`\n }) || []\n )\n}\nexport const CloneSectionMapping = {\n 'client-summary': [\n 'client1.personalDetails.title',\n 'client1.personalDetails.name',\n 'client1.personalDetails.nric',\n 'client1.personalDetails.contactMobile',\n 'client2.personalDetails.title',\n 'client2.personalDetails.name',\n 'client2.personalDetails.nric',\n 'client2.personalDetails.contactMobile',\n 'clientDeclaration.reviewDate'\n ],\n 'important-notices': [\n 'adviser.details.importantNoticeList',\n 'clientDeclaration.marketingConsent',\n 'clientDeclaration.pdpaConsent',\n 'client1.personalDetails.pdpaMarketing',\n 'client2.personalDetails.pdpaMarketing'\n ],\n 'personal-details': ['client1.personalDetails', 'client2.personalDetails'],\n dependants: [\n 'client1.personalDetails',\n 'client2.personalDetails',\n 'dependants'\n ],\n 'trusted-individual': [\n 'trustedIndividual',\n 'client1.personalDetails',\n 'client2.personalDetails'\n ],\n 'ai-oi': ['client1.aioi', 'client2.aioi'],\n 'property-financing': ['client1.propertyFinancing'],\n 'risk-profile-assessment': ['client1.rpa', 'client2.rpa'],\n 'customer-knowledge-assessment': ['client1.cka', 'client2.cka'],\n 'cash-flow': ['client1.cashFlow', 'client2.cashFlow'],\n 'net-worth': ['client1.netWorth', 'client2.netWorth'],\n budget: [\n 'client1.budget',\n 'client2.budget',\n 'client1.thirdPartyPayor',\n 'client2.thirdPartyPayor'\n ],\n insurance: ['existingPortfolio'],\n investment: ['existingInvestment'],\n 'identifying-your-priorities': [\n 'clientDeclaration',\n ...priorities('client1', true),\n ...priorities('client2', true)\n ],\n 'needs-analysis-calculation': [\n ...priorities('client1', false),\n ...priorities('client2', false)\n ],\n 'adjustments-and-assumptions': ['clientAssumptions'],\n 'product-recommendations': ['recommendations'],\n 'ilp-sub-funds': ['newIlpPortfolios'],\n 'basis-of-recommendation': [\n 'client1.rpa',\n 'client2.rpa',\n 'client1.recommendationBasis',\n 'client2.recommendationBasis',\n 'recommendations'\n ],\n 'client-decision': [\n 'clientDeclaration',\n 'recommendations',\n 'client1.recommendationBasis'\n ],\n 'replacement-or-switching': [\n 'client1.switching',\n 'client2.switching',\n 'adviser.declaration'\n ],\n bop: ['client1.beneficialOwner', 'client2.beneficialOwner'],\n pep: ['clientDeclaration'],\n ecdd: [\n 'client1.ecdd',\n 'client2.ecdd',\n 'client1.personalDetails',\n 'client2.personalDetails'\n ],\n aml: [\n 'client1.personalDetails.name',\n 'client1.aml',\n 'client2.personalDetails.name',\n 'client2.aml'\n ]\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue, Watch } from 'vue-property-decorator'\n// import TheSectionNavi from './component/TheSectionNavi.vue'\n\nimport { namespace } from 'vuex-class'\nimport KYCForm from '@company-common/model/kyc-form/KYCForm'\nimport { isNull, isUndefined } from 'lodash'\nimport { debounce } from 'lodash/fp'\nimport LoadingScreen from '@/components/LoadingScreen.vue'\nimport TheCompletionCheckModal from '@core/components/TheCompletionCheckModal.vue'\nimport KYCFormValidation from '@/validation/KYCFormValidation'\nimport API from '@core/services/API'\nimport { Route } from 'vue-router'\nimport { FormOptions } from '@master/model/kyc-form/FormOptions'\nimport { inject } from 'inversify-props'\nimport { SharedVariable } from '@core/model/SharedVariable'\nimport { IProjectSettings } from '@master/config/IProjectSettings'\nimport AppCloneForm from '@core/components/AppCloneForm.vue'\nimport { UIService } from '@core/services/UIService'\nimport { IDateService } from '@master/services/IDateService'\nimport { IRiskRatingService } from '@master/services/IRiskRatingService'\nimport { CloneSectionMapping } from './model/CloneSectionMapping'\n\nconst TheSectionNavi = () => import('./component/TheSectionNavi.vue')\n\nconst kycFormStore = namespace('KYCFormStore')\nconst kycSubmissionStore = namespace('KYCSubmissionStore')\nconst kycSectionStore = namespace('KYCSectionStore')\n\n@Component({\n components: {\n TheSectionNavi,\n LoadingScreen,\n TheCompletionCheckModal,\n AppCloneForm\n },\n beforeRouteUpdate (to: Route, from: Route, next: any) {\n this.save()\n next()\n }\n})\nexport default class TheKYCForm extends Vue {\n @inject()\n private sharedVariable: SharedVariable\n\n @kycFormStore.State\n loadingState!: 'loading' | 'loaded'\n\n @kycFormStore.State\n private kycForm!: KYCForm\n\n @kycFormStore.State\n private formOptions!: FormOptions\n\n @kycFormStore.Mutation\n public setLoadingState!: (state: string) => void\n\n @kycFormStore.State\n private kycFormErrors: {}\n\n @kycFormStore.State\n private computedValidationResult: {}\n\n @kycFormStore.Action\n public loadKYCForm!: (formOid: string) => void\n\n @kycFormStore.Action\n public loadAssumption!: () => void\n\n @kycFormStore.Action\n public updatedValidationResult!: (result) => void\n\n @kycFormStore.Action\n public updateShowCompletionModalState!: (state) => void\n\n @kycSectionStore.State\n private totalUploadedPdf: []\n\n @kycSectionStore.Mutation\n private updateTotalUploadedPdf: (list: []) => void\n\n @kycSectionStore.Mutation\n private hideSection: (name: string) => void\n\n @kycSubmissionStore.Getter\n isSuperiorVerified\n\n @kycSubmissionStore.Getter\n isPTCVerified\n\n @kycSubmissionStore.Getter\n kycPdf\n\n @kycSubmissionStore.Getter\n getPTCChecklist\n\n @inject()\n private $api: API\n\n uiService: UIService\n\n @inject()\n private projectSettings: IProjectSettings\n\n @inject()\n private dateService: IDateService\n\n @inject()\n private riskRatingService: IRiskRatingService\n\n private isModalCloneVisible = false\n\n get isSubmissionPage () {\n return this.$route.name === 'KYC Confirmation'\n }\n\n get kycFormOid () {\n return this.$route.params.formOid\n }\n\n private snakeCaseKycForm = {}\n\n private cloneAppMapping = CloneSectionMapping\n\n debounceValidate = debounce(500, this.validate)\n\n // Vue lifecycles\n\n async created () {\n // take injected UIService and set it to local\n this.uiService = this.sharedVariable.uiService\n await this.checkKycDocUploadEnabled()\n await this.loadAssumption()\n await this.loadKYCForm(this.$route.params.formOid)\n if (!isNull(this.kycFormErrors) && !isUndefined(this.kycFormErrors)) {\n window.alert(this.kycFormErrors)\n }\n }\n\n async checkKycDocUploadEnabled () {\n /* eslint-disable @typescript-eslint/camelcase */\n const { kyc_doc_upload } = await this.sharedVariable.sysInfo\n console.log(kyc_doc_upload)\n\n if (!kyc_doc_upload) {\n this.hideSection('appendix')\n } else {\n const uploadedPDFList = await this.$api.uploadDoc.list({ kycFormOid: this.kycFormOid })\n this.updateTotalUploadedPdf(uploadedPDFList)\n }\n /* eslint-enable */\n }\n\n // Methods\n async save () {\n const rawKycForm = this.kycForm.convertToRawData()\n rawKycForm._oid = this.$route.params.formOid\n // Not saving it yet until all has been confirmed to be equal/similar\n this.setLoadingState('saving')\n // including the calculations\n await this.$api.kycForm.meta({\n _oid: this.$route.params.formOid,\n meta: JSON.parse(JSON.stringify(rawKycForm))\n }).then((response) => {\n console.log(response)\n return response\n }).finally(() => {\n this.setLoadingState('loaded')\n })\n }\n\n async submit () {\n if (!this.isPTCVerified) {\n window.alert('You must verify all PTC fields before you can confirm this submission.')\n } else if (!this.isSuperiorVerified) {\n window.alert('You must select a supervisor to submit to before you can confirm this submission.')\n } else if (this.kycForm.recommendations.rcmd.length === 0) {\n window.alert('No product selected, unable to proceed.')\n } else if (this.appendixIsMorethan10MB()) {\n await this.uiService.alert.show({\n type: 'warning',\n message: 'Total size of appendix cannot more than 10MB'\n })\n } else {\n console.time('submission')\n // Run the validation again\n // this.validate()\n this.kycPdf.completion = JSON.parse(JSON.stringify(this.computedValidationResult))\n\n if (!this.KYCFormCompletionCheck()) {\n return\n }\n\n if (this.kycForm.recommendations.hasNtuc) {\n const dsfVerified = await this.verifyDsfFields()\n if (!dsfVerified) return\n }\n\n // Check for recommended products risk rating, if its higher than client's risk profile rating\n // @TODO: Not tested, wait till recommendation is completed\n // if(!this.productRiskRatingGreaterThanRPACheck()){\n // return;\n // }\n\n // Perform a save before submission\n await this.save()\n this.setLoadingState('saving')\n // Get the form to be submitted\n this.kycPdf.kycFormOid = this.$route.params.formOid\n const data = this.kycPdf.prepareForSubmission()\n\n // Call for creation of kyc pdf\n const kycResult = await this.createKycPdfEntry(data)\n\n // Only when it succeed, then call for the rest of the endpoints\n if (kycResult.success) {\n const kycPdfOid = kycResult._oid\n const esubResult = await this.saveNewESubmissionData(kycPdfOid)\n const adviserResult = this.stampAdviserSignedPdf(kycPdfOid)\n if (!adviserResult) {\n window.alert('An error occured while generating the pdf for this case')\n }\n const amlResult = this.stampAdviserSignedAMLPdf(kycPdfOid)\n if (!amlResult) {\n window.alert('An error occured while generating the aml pdf for this case')\n }\n const boResult = await this.stampBeneficialOwnersPdf(kycPdfOid)\n if (!boResult) {\n window.alert('An error occured while generating the beneficial owners pdf for this case.')\n return\n }\n const pepResult = await this.stampPEPPdfs(kycPdfOid)\n if (!pepResult) {\n window.alert('An error occured while generating the pep pdfs for this case')\n }\n // JPara's specific, AML will sort of take the place\n // const ecddResult = await this.stampECDDPdfs(kycPdfOid)\n // if (!ecddResult) {\n // window.alert('An error occured while generating the ecdd pdfs for this case')\n // }\n // merge appendix\n const mergedResult = await this.mergeUploadedAppendix(kycPdfOid)\n if (!mergedResult) {\n await this.uiService.alert.show({\n type: 'error',\n message: 'An error occured while merging appendix to client pdf for this case'\n })\n }\n\n // Redirect to the kyc pdf\n window.location.href = '/live/kyc-pdf/' + kycPdfOid\n } else {\n window.alert('An error occured while submitting this form with message: ' + kycResult.error)\n }\n this.setLoadingState('loaded')\n console.timeEnd('submission')\n }\n }\n\n async verifyDsfFields () {\n const ntucisEnabled = this.sharedVariable?.sysInfo?.esub_ntuc\n if (!ntucisEnabled) return true // if ntuc is disabled , no need do verification\n\n const res = await this.$api.dsf.verifyFields({\n kycFormOid: this.$route.params.formOid\n })\n if (res && res.error) {\n alert(res.error)\n return false\n } else return true\n }\n\n async previewPDF () {\n // should trigger a save first before opening preview\n await this.save()\n // eslint-disable-next-line @typescript-eslint/camelcase\n const useEjsTemplate = this.projectSettings?.useDynamicPdf?.enable ?? false\n\n // eslint-disable-next-line @typescript-eslint/camelcase\n if (useEjsTemplate) { // if the flag is on use the latest api where generate pdf preview using ejs template\n const apiVersion = this.projectSettings.useDynamicPdf.apiVersion\n const version = apiVersion === 'v1' || !apiVersion ? '' : `/${this.projectSettings.useDynamicPdf.apiVersion}`\n window.open(`/live/api${version}/kycPdf/preview/${this.kycFormOid}`, '_blank')\n // window.open(`/live/api/kycPdf/ecdd?_oid=${this.kycFormOid}&index=0`, '_blank')\n } else {\n window.open('/live/pdf/stampedpreviewpdf?_oid=' + this.kycFormOid, '_blank')\n }\n }\n\n appendixIsMorethan10MB () {\n const list = this.totalUploadedPdf\n if (!list.length) return false\n const totalSize = list.map(({ fileSize }) => fileSize)\n .reduce((sum, size) => {\n const total = sum + size\n return total\n }, 0)\n return totalSize > 10000000\n }\n\n validate () {\n console.time('Validation')\n const validation = new KYCFormValidation(this.kycForm, this.getPTCChecklist)\n this.updatedValidationResult(validation.validate())\n console.timeEnd('Validation')\n }\n\n // Submission methods\n\n createKycPdfEntry (kycPdfSubmission) {\n return this.$api.kycPdf.create(kycPdfSubmission)\n .then((res) => {\n console.log('api.createKycPdfEntry.POST res', res)\n return res\n }).catch((err) => {\n console.log('api.createKycPdfEntry.POST err', err)\n return { error: err }\n })\n }\n\n async stampAdviserSignedPdf (kycPdfOid) {\n const useEjsTemplate = this.projectSettings?.useDynamicPdf?.enable ?? false\n const stampedPdf = useEjsTemplate\n ? () => this.$api.kycPdf.generateKycPdfNest({ _oid: kycPdfOid })\n : () => this.$api.kycPdf.stampedKycPdf({\n _oid: kycPdfOid,\n status: 'adviser-confirmed'\n })\n\n return await stampedPdf().then((res) => {\n return res.success ?? true\n }).catch((err) => {\n console.error(err)\n return false\n })\n }\n\n stampAdviserSignedAMLPdf (kycPdfOid) {\n return this.$api.kycPdf.stampedAMLPdf({\n _oid: kycPdfOid,\n status: 'adviser-confirmed'\n })\n .then((res) => { return res.success })\n .catch((err) => {\n console.log(err)\n return false\n })\n }\n\n stampBeneficialOwnersPdf (kycPdfOid) {\n return this.$api.kycPdf.stampedBeneficialOwnerPdf({ _oid: kycPdfOid })\n .then((res) => { return res.success })\n .catch((err) => {\n console.log(err)\n return false\n })\n }\n\n stampPEPPdfs (kycPdfOid) {\n return this.$api.kycPdf.stampPEPPdf({ _oid: kycPdfOid })\n .then((res) => { return res.success })\n .catch((err) => {\n console.log(err)\n return false\n })\n }\n // JPara's specific\n // stampECDDPdfs (kycPdfOid) {\n // return this.$api.kycPdf.stampECDDPdf({ _oid: kycPdfOid })\n // .then((res) => { return res.success })\n // .catch((err) => {\n // console.log(err)\n // return false\n // })\n // }\n\n async mergeUploadedAppendix (kycPdfOid) {\n const params = {\n kycFormOid: this.kycFormOid,\n kycPdfOid: kycPdfOid\n }\n return await this.$api.uploadDoc.merge(params)\n }\n\n saveNewESubmissionData (kycPdfOid) {\n return this.$api.esub.create({ kycPdfOid: kycPdfOid })\n .then((esubRes) => {\n console.log('esubRes', esubRes)\n return this.$api.kycPdf.updateConsolidateGroupsStatus({ kycPdfOid: kycPdfOid })\n .then((res) => {\n console.log('updateConsolidatedGroupsStatus res', res)\n return res\n })\n })\n }\n\n KYCFormCompletionCheck () {\n const boDecl = this.kycForm.client1.beneficialOwner.declarationBeneficialOwner\n const bo2Decl = this.kycForm.client2.beneficialOwner.declarationBeneficialOwner\n const isClient2Included = this.kycForm.client2.personalDetails.included\n const pepDeclClient0 = this.kycForm.clientDeclaration.client0DeclarationPoliticallyExposed\n const pepDeclClient1 = this.kycForm.clientDeclaration.client1DeclarationPoliticallyExposed\n\n if ((boDecl === null || boDecl === undefined || boDecl === '') || (isClient2Included && (bo2Decl === null || bo2Decl === undefined || bo2Decl === ''))) {\n window.alert('You must complete the BOP section under Client Declaration before proceeding.')\n return false\n }\n\n if ((pepDeclClient0 === null || pepDeclClient0 === undefined || pepDeclClient0 === '') || (isClient2Included && (pepDeclClient1 === null || pepDeclClient1 === undefined || pepDeclClient1 === ''))) {\n window.alert('You must complete the PEP section under Client Declaration before proceeding.')\n return false\n }\n\n const boResult = this.computedValidationResult['Beneficial Owner Particulars Form']\n\n if ((boDecl === 'no' || bo2Decl === 'no') && boResult) {\n window.alert('You must complete the Beneficial Owner Particulars Form before you can confirm this submission.')\n return false\n }\n\n const pepResult = this.computedValidationResult['Politically Exposed Person Form']\n if (pepResult) { // clientdeclarationvalidation will take care of declaration flag check\n window.alert('You must complete the Policitally Exposed Person Form before you can confirm this submission.')\n return false\n }\n\n const amlValidation = this.computedValidationResult['Client\\'s AML Check']\n if (amlValidation) {\n window.alert('You must complete the AML Form before you can confirm this submission.')\n return false\n }\n\n return true\n }\n\n async deleteForm () {\n if (!this.doesKycPdfExist()) {\n await this.uiService.alert.show({\n type: 'warning',\n message: 'You may only delete a KYC Form that has not had a KYC PDF generated.'\n })\n return false\n }\n\n const isConfirm = await this.uiService.confirm.show({\n type: 'warning',\n message: 'Are you sure you want to permanently delete this KYCForm?'\n })\n if (isConfirm) {\n const resp = await this.$api.kycForm.delete({ _oid: this.$route.params.formOid })\n await this.uiService.confirm.show({\n type: 'success',\n message: 'KYCForm has been deleted',\n showCancelButton: false\n })\n window.location.href = '/live/home-adviser'\n }\n }\n\n async doesKycPdfExist () {\n const response = await this.$api.kycPdf.list({\n query: 'kyc_id = ?',\n queryArgs: JSON.stringify([this.$route.params.formOid]),\n headers: JSON.stringify([\n '_oid',\n 'pdf_status'\n ])\n })\n return response.data.length > 0\n }\n\n // productRiskRatingGreaterThanRPACheck () {\n // let result = true\n\n // const rcmdObjs = this.kycForm.recommendations.rcmd || []\n // if (rcmdObjs.length > 0) {\n // for (let i = 0; i < rcmdObjs.length; ++i) {\n // const clientChoice = rcmdObjs[i].clientChoice\n // const typeOfProduct = rcmdObjs[i].typeOfProduct // either 'insurance' or 'investment'\n // const productListType = rcmdObjs[i].productType || '' // 'product type' value from the product library\n // const productListCategory = rcmdObjs[i].category || '' // 'category' value from the product library\n\n // const rcmdRiskRating = rcmdObjs[i].recommendedRiskProfile\n // const clientIndex = rcmdObjs[i].clientIndex\n // const clientCka = clientIndex === 0 ? this.kycForm.client1.cka : this.kycForm.client2.cka\n\n // const clientRpa = clientIndex === 0 ? this.kycForm.client1.rpa : this.kycForm.client2.rpa\n // let clientRiskProfile = clientRpa.riskProfile\n // if (clientRpa.riskProfile === 'as_per_questionnaire') {\n // if (clientRpa.agreement === 'no') {\n // clientRiskProfile = clientRpa.riskProfilePreferred\n // } else {\n // clientRiskProfile = clientRpa.riskProfileCalculated\n // }\n // }\n\n // const clientPassedCKA = (clientCka.ckaMet || 'yes') === 'yes'\n\n // // if product is of type investment\n // if (typeOfProduct === 'investment') {\n // if (clientChoice === 'ownchoice') {\n // // if product risk rating is greater than client rpa result\n // if (this.isRcmdRiskRatingGreaterThanClientRPA(rcmdRiskRating, clientRiskProfile)) {\n // if (!clientPassedCKA) {\n // result = false\n // window.alert('Unable to submit KYC as a non-recommended investment product has a higher risk rating than Client ' + (clientIndex + 1) + '\\'s risk profile rating, and Client failed CKA.')\n // }\n // }\n // }\n // } else if ((productListType.toLowerCase().indexOf('ilp') !== -1 || productListCategory.toLowerCase().indexOf('investment-linked') !== -1)) { // if product is an ILP\n // if (clientChoice === 'accept' || clientChoice === 'ownchoice') {\n // if (this.isRcmdRiskRatingGreaterThanClientRPA(rcmdRiskRating, clientRiskProfile)) {\n // result = false\n // window.alert('Unable to submit KYC as an ILP product has a higher risk rating than Client ' + (clientIndex + 1) + '\\'s risk profile rating.')\n // }\n // }\n // }\n // }\n // }\n // return result\n // }\n\n // isRcmdRiskRatingGreaterThanClientRPA (rcmdRiskRating, clientRiskProfile) {\n // // if client risk profile result is null, always return true\n // if (clientRiskProfile === undefined || clientRiskProfile === null) {\n // return true\n // }\n\n // let enumClientRiskProfile = 0\n // switch (clientRiskProfile) {\n // case 'conservative':\n // enumClientRiskProfile = 1\n // break\n // case 'moderately_conservative':\n // enumClientRiskProfile = 2\n // break\n // case 'balanced':\n // enumClientRiskProfile = 3\n // break\n // case 'moderately_aggressive':\n // enumClientRiskProfile = 4\n // break\n // case 'aggressive':\n // enumClientRiskProfile = 5\n // break\n // default:\n // enumClientRiskProfile = 0\n // }\n\n // if (rcmdRiskRating > enumClientRiskProfile) {\n // return true\n // }\n\n // return false\n // }\n\n // Watchers\n @Watch('kycForm', { deep: true })\n kycFormChanged () {\n this.debounceValidate()\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./KYCForm.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./KYCForm.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./KYCForm.vue?vue&type=template&id=af230e7a&scoped=true&\"\nimport script from \"./KYCForm.vue?vue&type=script&lang=ts&\"\nexport * from \"./KYCForm.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./KYCForm.vue?vue&type=style&index=0&id=af230e7a&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"af230e7a\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TheCompletionCheckModal.vue?vue&type=style&index=0&id=7310256a&lang=scss&scoped=true&\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppCloneForm.vue?vue&type=style&index=0&id=ec484c66&lang=scss&scoped=true&\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppForm.vue?vue&type=style&index=0&id=11928856&lang=scss&scoped=true&\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppCurrencyNA.vue?vue&type=style&index=0&id=423a3b72&lang=scss&scoped=true&\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./KYCForm.vue?vue&type=style&index=0&id=af230e7a&lang=scss&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:\"form-body\"},[_c('p',[_vm._v(\"Main Client\")]),_c('AppForm',{attrs:{\"uniqueID\":\"client_1\",\"structures\":_vm.structures,\"model\":_vm.client1PersonalDetails}})],1),_c('div',{staticClass:\"form-body\"},[_c('p',[_vm._v(\"Joint Application\")]),_c('AppForm',{attrs:{\"uniqueID\":\"client_2\",\"structures\":_vm.structures,\"model\":_vm.client2PersonalDetails}})],1),(!_vm.hideActionButtons)?_c('div',{staticClass:\"wrapper-btn\"},[_c('button',{staticClass:\"btn-default\",on:{\"click\":_vm.createClient}},[_vm._v(\" Create Client(s) \")])]):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* eslint-disable @typescript-eslint/camelcase */\nimport { Component, Vue, Prop } from 'vue-property-decorator'\nimport { container, cid, inject } from 'inversify-props'\nimport API from '@core/services/API'\nimport { isEmpty } from 'lodash/fp'\nimport AppForm from '@core/components/AppForm.vue'\nimport AppDialog from '@core/components/AppDialog.vue'\nimport KYCForm from '@master/model/kyc-form/KYCForm'\nimport { IDateService } from '@master/services/IDateService'\nimport FullPersonalDetails from '@master/model/kyc-form/PersonalDetails'\nimport { TitleOptions } from '@core/pages/client-management/model/ClientProfile'\n\nconst dateService = container.get(cid.IDateService)\n\n@Component({\n components: {\n AppForm,\n AppDialog\n }\n})\nexport default class AppNewClientManual extends Vue {\n @Prop({ default: false }) readonly hideActionButtons?: boolean\n @Prop() readonly model: KYCForm\n\n @inject()\n private $api: API\n\n get structures () {\n return [\n {\n label: 'Title',\n key: 'title',\n options: TitleOptions\n },\n {\n label: 'Name',\n key: 'name'\n },\n {\n label: 'NRIC',\n key: 'nric'\n },\n {\n label: 'Contact Mobile',\n key: 'contactMobile'\n }\n ]\n }\n\n get client1PersonalDetails (): FullPersonalDetails {\n return this.model ? this.model.client1 as unknown as FullPersonalDetails : new FullPersonalDetails('client_0', dateService)\n // return this.model ? this.model.client1 as unknown as PersonalDetailsCustom : cloneDeep(this.personalDetailsModel)\n }\n\n get client2PersonalDetails (): FullPersonalDetails {\n return this.model ? this.model.client2 as unknown as FullPersonalDetails : new FullPersonalDetails('client_1', dateService)\n // return this.model ? this.model.client2 as unknown as PersonalDetailsCustom : cloneDeep(this.personalDetailsModel)\n }\n\n get currentUser () {\n return this.$store.getters.currentUser\n }\n\n async createClient () {\n const gender = (title) => {\n if (title === 'mr') return 'male'\n if (['mrs', 'mdm', 'miss'].includes(title)) return 'female'\n return ''\n }\n const meta = {\n ma_name: this.client1PersonalDetails.name,\n ma_nric: this.client1PersonalDetails.nric,\n ma_title: this.client1PersonalDetails.title,\n ma_gender: gender(this.client1PersonalDetails.title),\n ma_contact_mobile: this.client1PersonalDetails.contactMobile,\n ja_name: this.client2PersonalDetails.name,\n ja_nric: this.client2PersonalDetails.nric,\n ja_title: this.client2PersonalDetails.title,\n ja_gender: gender(this.client2PersonalDetails.title),\n ja_contact_mobile: this.client2PersonalDetails.contactMobile,\n ja_included: !isEmpty(this.client2PersonalDetails.name) || !isEmpty(this.client2PersonalDetails.nric),\n adviser_oid: this.currentUser.accountID,\n adviser_name: this.currentUser.fullname,\n adviser_fa_code: this.currentUser.company_code,\n adviser_mas_rep_no: this.currentUser.mas_repno,\n important_notice_list: this.currentUser.adviser_products ? JSON.parse(this.currentUser.adviser_products) : [],\n important_notice_others: this.currentUser?.other_adviser_products,\n review_date: (new Date()).getTime(),\n kyc_status: 'new'\n }\n const response = await this.$api.kycForm.meta({\n _oid: 'new',\n meta: JSON.stringify(meta)\n })\n window.location.href = '/live/kyc-form/' + response.updateMeta._oid\n }\n}\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppNewClientManual.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppNewClientManual.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./AppNewClientManual.vue?vue&type=template&id=979ebe7e&scoped=true&\"\nimport script from \"./AppNewClientManual.vue?vue&type=script&lang=ts&\"\nexport * from \"./AppNewClientManual.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./AppNewClientManual.vue?vue&type=style&index=0&id=979ebe7e&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"979ebe7e\",\n null\n \n)\n\nexport default component.exports","'use strict';\n\n// there's 3 implementations written in increasing order of efficiency\n\n// 1 - no Set type is defined\nfunction uniqNoSet(arr) {\n\tvar ret = [];\n\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tif (ret.indexOf(arr[i]) === -1) {\n\t\t\tret.push(arr[i]);\n\t\t}\n\t}\n\n\treturn ret;\n}\n\n// 2 - a simple Set type is defined\nfunction uniqSet(arr) {\n\tvar seen = new Set();\n\treturn arr.filter(function (el) {\n\t\tif (!seen.has(el)) {\n\t\t\tseen.add(el);\n\t\t\treturn true;\n\t\t}\n\t});\n}\n\n// 3 - a standard Set type is defined and it has a forEach method\nfunction uniqSetWithForEach(arr) {\n\tvar ret = [];\n\n\t(new Set(arr)).forEach(function (el) {\n\t\tret.push(el);\n\t});\n\n\treturn ret;\n}\n\n// V8 currently has a broken implementation\n// https://github.com/joyent/node/issues/8449\nfunction doesForEachActuallyWork() {\n\tvar ret = false;\n\n\t(new Set([true])).forEach(function (el) {\n\t\tret = el;\n\t});\n\n\treturn ret === true;\n}\n\nif ('Set' in global) {\n\tif (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) {\n\t\tmodule.exports = uniqSetWithForEach;\n\t} else {\n\t\tmodule.exports = uniqSet;\n\t}\n} else {\n\tmodule.exports = uniqNoSet;\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"column-group\",style:(_vm.gridStyle),attrs:{\"id\":\"app-form\"}},[_vm._l((_vm.structuresDetails),function(structure){return [(_vm.shouldShow(structure.show))?_c('div',{key:structure.key,staticClass:\"input-group-with-theme\",class:[{ 'input-disabled': _vm.shouldDisabled(structure.disabled)}, _vm.getCustomClass(structure)],attrs:{\"has-msg\":structure.hasErrors,\"focusing\":_vm.focusId == _vm.getId(structure.key),\"id\":(\"box-\" + (_vm.getId(structure.key)))},on:{\"click\":function($event){return _vm.focusInner(structure)}}},[[(structure.labelModel)?_c('input',{staticClass:\"label\",attrs:{\"type\":\"text\",\"placeholder\":structure.label,\"data-test\":(\"label-input:\" + (_vm.getTestId(structure.key)))},domProps:{\"value\":_vm.labelModelValue(structure.labelModel.get())},on:{\"input\":function($event){return structure.labelModel.set($event.target.value)}}}):(structure.labelKey)?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.model[structure.labelKey]),expression:\"model[structure.labelKey]\"}],staticClass:\"label\",attrs:{\"type\":\"text\",\"data-test\":(\"label-input:\" + (_vm.getTestId(structure.key)))},domProps:{\"value\":(_vm.model[structure.labelKey])},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.model, structure.labelKey, $event.target.value)}}}):_vm._e(),(structure.labelModel || structure.labelKey)?_c('i',{staticClass:\"fa fa-pencil-alt right-sided\"}):(structure.type === 'single-checkbox')?_c('span'):_c('label',{attrs:{\"for\":_vm.getId(structure.key),\"id\":_vm.getId(structure.key) + '_label'},domProps:{\"innerHTML\":_vm._s(structure.label)}}),(structure.tooltip)?_c('AppTooltip',{attrs:{\"tooltipConfig\":structure.tooltip}}):_vm._e(),(_vm.isModernTheme)?_vm._l((structure.errors),function(ref,eidx){\nvar msg = ref.msg;\nreturn _c('div',{key:((structure.key) + \"-error-\" + eidx),staticClass:\"form-msg\",class:{\n full:\n eidx === 0 || _vm.fullErr === ((structure.key) + \"-error-\" + eidx),\n },on:{\"click\":function($event){_vm.fullErr = (structure.key) + \"-error-\" + eidx}}},[_c('el-tooltip',[_c('span',{staticClass:\"el-icon-warning\"}),_c('span',{attrs:{\"slot\":\"content\"},slot:\"content\"},[_vm._v(_vm._s(msg))])])],1)}):_vm._e()],(structure.options && structure.type === 'smart')?_c('AppSmartSelect',{attrs:{\"options\":structure.options,\"value\":_vm.model[structure.key],\"multiple\":structure.multiple,\"cols\":structure.optionCols,\"multiLimit\":structure.multiLimit,\"buttonName\":structure.buttonName,\"cycleMode\":structure.cycleMode,\"displayDirection\":structure.displayDirection,\"disabled\":_vm.shouldDisabled(structure.disabled)},on:{\"input\":function($event){return _vm.setValue(structure, $event)},\"blur\":function($event){return _vm.blurHandler()}}}):(structure.type === 'single-checkbox')?_c('el-checkbox',{attrs:{\"value\":_vm.getValue(structure),\"disabled\":_vm.shouldDisabled(structure.disabled)},on:{\"change\":function($event){return _vm.setValue(structure, $event)}}},[_vm._v(\" \"+_vm._s(structure.label)+\" \")]):(structure.options && structure.type === 'checkbox')?_c('AppCheckboxGroup',{attrs:{\"structure\":structure,\"model\":_vm.model,\"column\":structure.checkboxColumnNo,\"compact\":structure.compact},on:{\"change\":function($event){return _vm.setValue(structure, $event)},\"blur\":function($event){return _vm.blurHandler()}}}):(structure.options && structure.type === 'radio')?_c('AppRadioSelection',{attrs:{\"options\":structure.options,\"value\":_vm.model[structure.key],\"buttonName\":structure.buttonName,\"displayDirection\":structure.displayDirection,\"disabled\":_vm.shouldDisabled(structure.disabled)},on:{\"input\":function($event){return _vm.setValue(structure, $event)},\"blur\":function($event){return _vm.blurHandler()}}}):(structure.type === 'multi')?_c('el-select',{staticClass:\"form-multi-select\",attrs:{\"value\":_vm.getValue(structure),\"disabled\":_vm.shouldDisabled(structure.disabled),\"multiple\":\"\",\"collapse-tags\":\"\",\"size\":'small',\"popper-class\":'wen-popper-class'},on:{\"change\":function($event){return _vm.setValue(structure, $event)}}},_vm._l((structure.options),function(option,index){return _c('el-option',{key:index,attrs:{\"value\":option.value,\"label\":option.label}})}),1):(structure.options)?_c('select',{class:{ 'myinfo-disabled': structure.isMyInfo },attrs:{\"id\":_vm.getId(structure.key),\"data-test\":_vm.getTestId(structure.key),\"aria-labelledby\":_vm.getLabelId(structure.key),\"disabled\":_vm.shouldDisabled(structure.disabled)},domProps:{\"value\":_vm.getValue(structure)},on:{\"input\":function($event){return _vm.setSelectValue($event.target, structure)}}},_vm._l((structure.options),function(option,index){return _c('option',{key:index,domProps:{\"value\":option.value}},[_vm._v(\" \"+_vm._s(option.label)+\" \")])}),0):(structure.type === 'decimal-number')?[_c('AppDecimalNumber',{class:{ 'myinfo-disabled': structure.isMyInfo },attrs:{\"decimal\":structure.decimal,\"inputValue\":_vm.getValue(structure),\"disabled\":_vm.shouldDisabled(structure.disabled)},on:{\"input\":function($event){return _vm.setValue(structure, $event)}}})]:(structure.type === 'number' || structure.type === 'time' || structure.type === 'password')?_c('input',{class:{ 'myinfo-disabled': structure.isMyInfo },attrs:{\"id\":_vm.getId(structure.key),\"data-test\":_vm.getTestId(structure.key),\"aria-labelledby\":_vm.getLabelId(structure.key),\"type\":structure.type,\"disabled\":_vm.shouldDisabled(structure.disabled),\"maxlength\":structure.maxChar},domProps:{\"value\":_vm.getValue(structure)},on:{\"input\":function($event){return _vm.setValue(structure, $event.target.value)},\"blur\":function($event){return _vm.blurHandler()}}}):(structure.type === 'currency')?_c('currency-input',{class:{ 'myinfo-disabled': structure.isMyInfo },attrs:{\"id\":_vm.getId(structure.key),\"data-test\":_vm.getTestId(structure.key),\"currency\":structure.currencyFormat,\"aria-labelledby\":_vm.getLabelId(structure.key),\"value\":_vm.getValue(structure),\"disabled\":_vm.shouldDisabled(structure.disabled),\"precision\":structure.precision},on:{\"input\":function($event){return _vm.setValue(structure, $event)},\"blur\":function($event){return _vm.blurHandler()}}}):(structure.type === 'date' || structure.type === 'month')?_c('AppDateInput',{class:{ 'myinfo-disabled': structure.isMyInfo },attrs:{\"value\":_vm.getValue(structure),\"id\":_vm.getId(structure.key),\"input-type\":structure.type,\"data-test\":_vm.getTestId(structure.key),\"aria-label\":structure.label,\"disabled\":_vm.shouldDisabled(structure.disabled),\"futureDate\":structure.futureDate,\"disabledFutureDate\":structure.disabledFutureDate},on:{\"input\":function($event){return _vm.setValue(structure, $event)},\"blur\":function($event){return _vm.blurHandler()}}}):(structure.type === 'textarea')?_c('textarea',{class:{ 'myinfo-disabled': structure.isMyInfo },attrs:{\"id\":_vm.getId(structure.key),\"data-test\":_vm.getTestId(structure.key),\"aria-labelledby\":_vm.getLabelId(structure.key),\"disabled\":_vm.shouldDisabled(structure.disabled),\"maxlength\":structure.maxChar,\"rows\":structure.rows || 10},domProps:{\"value\":_vm.getValue(structure)},on:{\"input\":function($event){return _vm.setValue(structure, $event.target.value)},\"blur\":function($event){return _vm.blurHandler()}}}):(structure.type === 'table')?_c('AppFormTable',{staticClass:\"inner-table\",attrs:{\"innerTable\":true,\"vertical\":structure.isVertical,\"maxSize\":structure.maxSize,\"fields\":structure.columns,\"data\":_vm.getValueForTable(structure)},on:{\"add\":structure.add,\"remove\":structure.remove}}):(structure.type==='na-currency')?[_c('AppCurrencyNA',{attrs:{\"inputValue\":_vm.getValue(structure),\"disabled\":_vm.shouldDisabled(structure.disabled),\"maxlength\":structure.maxLength},on:{\"input\":function($event){return _vm.setValue(structure, $event)}}})]:_c('input',{class:{ 'myinfo-disabled': structure.isMyInfo },attrs:{\"id\":_vm.getId(structure.key),\"data-test\":_vm.getTestId(structure.key),\"aria-labelledby\":_vm.getLabelId(structure.key),\"type\":\"text\",\"disabled\":_vm.shouldDisabled(structure.disabled),\"maxlength\":structure.maxChar},domProps:{\"value\":_vm.getValue(structure)},on:{\"input\":function($event){return _vm.setValue(structure, $event.target.value)},\"blur\":function($event){return _vm.blurHandler(structure, $event.target.value)}}}),(structure.isMyInfo)?_c('img',{staticClass:\"input-hint logo\",attrs:{\"src\":require(\"@core/assets/myinfo-icon.svg\")}}):_vm._e(),(structure.counterMsg && _vm.isModernTheme)?_c('div',{staticClass:\"char-counter\"},[_vm._v(\" \"+_vm._s(structure.counterMsg)+\" \")]):_vm._e()],2):_vm._e()]})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.inputModal),expression:\"inputModal\"}],attrs:{\"maxlength\":_vm.maxlength,\"disabled\":_vm.disabled},domProps:{\"value\":(_vm.inputModal)},on:{\"keypress\":function($event){return _vm.numberAndNAOnly($event)},\"blur\":function($event){return _vm.onBlur()},\"focus\":function($event){return _vm.onFocus()},\"select\":function($event){return _vm.onSelect($event)},\"input\":function($event){if($event.target.composing){ return; }_vm.inputModal=$event.target.value}}}),(!_vm.disabled)?_c('div',{staticClass:\"char-counter\"},[_vm._v(\" \"+_vm._s(_vm.counterMsg)+\" \")]):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop, Vue, Watch } from 'vue-property-decorator'\nimport { IProjectInfo } from '@master/config/IProjectInfo'\nimport { inject } from 'inversify-props'\n\n@Component\nexport default class AppCurrencyNA extends Vue {\n @Prop() inputValue\n @Prop({ default: true }) useCurrency!: boolean\n @Prop({ default: 10 }) maxlength?: number\n @Prop({ default: false }) disabled: boolean\n\n @inject()\n private projectInfo: IProjectInfo\n\n inputModal = ''\n textIsSelected = false\n\n get counterMsg () {\n if (typeof this.maxlength === 'undefined') return\n const number = this.convertCurrencyToNumber(this.inputModal)\n const remainingChar = this.maxlength - (number.toString().length || 0)\n return remainingChar > 0 ? `${remainingChar} letter(s) remaining` : 'Max character limit reached'\n }\n\n numberAndNAOnly (evt) {\n evt = (evt) || window.event\n const charCode = (evt.which) ? evt.which : evt.keyCode\n\n const currentValue = evt.target.value\n if (this.textIsSelected) {\n if (!this.isAlphabetN(charCode) && this.isNonNumber(charCode)) {\n evt.preventDefault()\n } else {\n this.textIsSelected = false\n }\n return true\n }\n\n // if current value is 'NA', cannot key in other character\n if (currentValue.toUpperCase() === 'NA') {\n evt.preventDefault()\n }\n\n // if current value is N, the followed char must be A\n if (this.isAlphabetN(currentValue.charCodeAt(0))) {\n if (this.isAlphabetA(charCode)) {\n return true\n }\n evt.preventDefault() // only can accept A\n }\n\n // if there is empty value, it can either key in char N or number only\n if (!currentValue) {\n if (this.isAlphabetN(charCode)) {\n return true\n }\n }\n\n // cannot key in non number value\n if (this.isNonNumber(charCode)) {\n evt.preventDefault()\n } else {\n return true\n }\n }\n\n isAlphabetN (charCode) {\n return charCode === 78 || charCode === 110\n }\n\n isAlphabetA (charCode) {\n return charCode === 65 || charCode === 97\n }\n\n isNonNumber (charCode) {\n return charCode > 31 && (charCode < 48 || charCode > 57)\n }\n\n onBlur () {\n if (!this.inputModal && this.inputModal !== '0') {\n this.inputModal = this.formatValue('')\n this.$emit('input', '')\n return\n }\n\n // format na to NA to display\n if (this.inputModal.toUpperCase() === 'NA') {\n this.inputModal = 'NA'\n this.$emit('input', 'NA')\n return\n }\n\n // in case only key in 'n' and on blur, format it to NA\n if (isNaN(Number(this.inputModal))) {\n this.inputModal = 'NA'\n this.$emit('input', 'NA')\n return\n }\n\n const number = this.convertCurrencyToNumber(this.inputModal)\n this.inputModal = this.formatValue(number)\n this.$emit('input', Number(number))\n }\n\n onFocus () {\n this.inputModal = this.convertCurrencyToNumber(this.inputModal)\n }\n\n onSelect () {\n this.textIsSelected = true\n }\n\n formatValue (source) {\n if (typeof source === 'string') {\n if (source.toUpperCase() === 'NA' || source === '') {\n return source\n }\n source = Number(source.replace('$', '').replace(',', ''))\n } else if (source === undefined || source == null) {\n source = ''\n }\n return this.useCurrency ? this.currencyPrefix + source?.toLocaleString('en-US') : source?.toLocaleString('en-US')\n }\n\n convertCurrencyToNumber (currency) {\n return currency.replaceAll(this.currencyPrefix, '').replaceAll(',', '')\n }\n\n get currencyPrefix () {\n return this.projectInfo.currency ?? 'SGD$'\n }\n\n @Watch('inputValue')\n inputValueOnChange () {\n if (this.inputValue || this.inputValue === '0' || Number(this.inputValue) === 0) {\n this.inputModal = this.formatValue(this.inputValue)\n } else {\n this.inputModal = this.formatValue('')\n }\n }\n\n mounted () {\n this.inputModal = this.formatValue(this.inputValue)\n }\n}\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppCurrencyNA.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppCurrencyNA.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./AppCurrencyNA.vue?vue&type=template&id=423a3b72&scoped=true&\"\nimport script from \"./AppCurrencyNA.vue?vue&type=script&lang=ts&\"\nexport * from \"./AppCurrencyNA.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./AppCurrencyNA.vue?vue&type=style&index=0&id=423a3b72&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"423a3b72\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Base } from '@master/model/Base'\nimport { FormStructure, Input, TableSetup } from '@master/model/structure/FormStructure'\nimport { Component, Prop, Vue, Watch } from 'vue-property-decorator'\nimport AppCheckboxGroup from '@core/components/AppCheckboxGroup.vue'\nimport AppFormTable from '@core/components/AppFormTable.vue'\nimport AppRadioSelection from '@core/components/AppRadioSelection.vue'\nimport AppSmartSelect from '@core/components/AppSmartSelect.vue'\nimport { inject } from 'inversify-props'\nimport { IDateService } from '@master/services/IDateService'\nimport AppDateInput from './AppDateInput.vue'\nimport { getMaxChar } from '@master/annotation/MaxChar'\nimport { IProjectSettings } from '@master/config/IProjectSettings'\nimport { isUndefined } from 'lodash/fp'\nimport randomstring from 'randomstring'\nimport AppCurrencyNA from './AppCurrencyNA.vue'\nimport AppDecimalNumber from './AppDecimalNumber.vue'\nimport AppTooltip from './AppTooltip.vue'\n\n@Component({\n components: {\n AppSmartSelect,\n AppCheckboxGroup,\n AppRadioSelection,\n AppDateInput,\n AppFormTable,\n AppCurrencyNA,\n AppDecimalNumber,\n AppTooltip\n }\n})\n\nexport default class AppForm extends Vue {\n @Prop() readonly structures!: FormStructure[];\n @Prop() readonly model!: T;\n @Prop({ default: 1 }) readonly columns: number;\n @Prop() readonly errors?: { key: string; msg: string }[];\n @Prop({ default: () => { return Date.now() } })\n readonly uniqueID: string;\n\n @Prop({ default: false }) readonly readOnly: boolean;\n\n @inject()\n private dateService: IDateService;\n\n @inject()\n private projectSettings: IProjectSettings;\n\n private minimal = true;\n // private renderCnt = 0;\n private focusId = null;\n private fullErr = null;\n\n get structuresDetails () {\n return this.structures.map((structure) => {\n const key = (structure as any).key\n const errors = this.errors?.filter((err) => err.key === key) || []\n const maxChar = getMaxChar(this.model, key)\n const charLeft = this.getCharLeft(key)\n const counterMsg = this.getCounterMsg(maxChar, charLeft)\n return {\n errors,\n hasErrors: errors?.length > 0,\n maxChar,\n counterMsg,\n ...structure\n }\n })\n }\n\n get gridStyle () {\n return {\n gridTemplateColumns: `repeat(${this.columns}, minmax(0, 1fr))`\n }\n }\n\n get isModernTheme () {\n return this.projectSettings.theme === 'Modern'\n }\n\n getCounterMsg (maxChar, charLeft) {\n if (!this.isModernTheme) return '' // counterMsg only used in Modern Theme\n return maxChar ? charLeft > 0 ? `${charLeft} letters remaining` : 'Max character limit reached' : ''\n }\n\n shouldDisabled (condition: boolean | Function = false) {\n if (this.readOnly) return true\n if (condition === undefined) {\n return false\n } else if (condition instanceof Function) {\n return condition(this.model)\n } else {\n return condition\n }\n }\n\n shouldShow (condition: boolean | Function = true) {\n if (condition === undefined) {\n return false\n } else if (condition instanceof Function) {\n return condition(this.model)\n } else {\n return condition\n }\n }\n\n getValue (input: Input) {\n if (input.type === 'currency') {\n const oriValue = this.model[input.key]\n if (typeof oriValue === 'string' || oriValue instanceof String) {\n return Number(this.model[input.key])\n }\n }\n if (input.key) {\n return this.model[input.key]\n } else if (input.model) {\n return input.model.get()\n } else {\n throw new Error(\n `Invalid config for label ${input.label}: key or model is required`\n )\n }\n }\n\n /**\n * Return null as the label if it is empty so\n * that the placeholder will appear\n */\n labelModelValue (labelValue: string) {\n return !labelValue ? null : labelValue\n }\n\n getValueForTable (input: TableSetup) {\n if (input.key) {\n return this.model[input.key]\n } else if (input.data) {\n return input.data\n } else {\n throw new Error(\n `Invalid config for label ${input.label}: key or model is required`\n )\n }\n }\n\n // this is to resolve the issue of event.target.value is always passed as string, but our use cases might need number\n setSelectValue (event, structure) {\n const selectedOption = structure.options[event.selectedIndex]\n this.setValue(structure, selectedOption.value)\n }\n\n setValue (input: Input, _value: T[keyof T]) {\n const value: any = input.type === 'number' ? +_value || 0 : _value\n\n if (input.key) {\n if (input.onChange) {\n input.onChange(this.model[input.key], value)\n }\n // when only has getter (for currency input), sidestep the error\n try {\n this.model[input.key] = value\n } catch (ex) {}\n } else if (input.model) {\n if (input.onChange) {\n input.onChange(this.model[input.key], value)\n }\n return input.model.set(value)\n } else {\n throw new Error(`Invalid config for label ${input.label}: key or model is required`)\n }\n }\n\n getId (key: string) {\n if (this.model && 'snakeCaseKey' in this.model) {\n return `${this.uniqueID}_${this.model.snakeCaseKey(key)}`\n }\n\n if (isUndefined(key)) {\n key = randomstring.generate(6)\n }\n\n if (this.uniqueID) {\n return `${this.uniqueID}_${key}`\n }\n\n return `${key}`\n }\n\n getTestId (key: string) {\n if (this.model && 'snakeCaseKey' in this.model) {\n return `${this.model.snakeCaseKey(key)}`\n }\n return undefined\n }\n\n getLabelId (key: string) {\n return this.getId(key) + '_label'\n }\n\n arrangeCols () {\n const curAppForm = this.$el\n const hasOverflow = curAppForm.scrollWidth > curAppForm.clientWidth\n if (hasOverflow) this.minimal = true\n }\n\n blurHandler (input: Input, _value: T[keyof T]) {\n if (this.isModernTheme) {\n this.focusId = null\n }\n\n if (input && input?.onBlur) {\n input.onBlur(_value)\n }\n }\n\n // use to handle Modern theme\n focusInner (structure: any) {\n // this means label is also editable, thus do not auto focus input\n if (structure.labelModel || structure.labelKey || structure.model) return\n const eleId = this.getId(structure.key)\n this.focusId = eleId\n const ele = document.getElementById(eleId)\n if (ele) ele.focus()\n }\n\n getCharLeft (key: string) {\n const mc = getMaxChar(this.model, key)\n return mc ? mc - (this.model[key]?.length || 0) : mc\n }\n\n getCustomClass (structure) {\n return structure.classes ? [...structure.classes] : []\n }\n\n // @Watch('structures')\n // structuresUpdated () {\n // // this is to allow view to be updated when structures change\n // this.renderCnt++\n // }\n\n @Watch('structuresDetails', { deep: true })\n focusError (swe) {\n if (!this.isModernTheme) return // this is used for Modern Theme\n\n const first = swe.find((s) => 'msg' in s)\n if (!first) return\n const ele = document.getElementById(`box-${this.getId(first.key)}`)\n if (!ele) return\n ele.scrollIntoView({ behavior: 'smooth', block: 'end' })\n }\n\n updated () {\n this.arrangeCols()\n }\n\n mounted () {\n this.arrangeCols()\n window.addEventListener('resize', () => this.arrangeCols())\n }\n}\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppForm.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppForm.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./AppForm.vue?vue&type=template&id=11928856&scoped=true&\"\nimport script from \"./AppForm.vue?vue&type=script&lang=ts&\"\nexport * from \"./AppForm.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./AppForm.vue?vue&type=style&index=0&id=11928856&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"11928856\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LoadingBar.vue?vue&type=style&index=0&id=39858f38&lang=scss&scoped=true&\""],"sourceRoot":""}