PageSourceSearch

https://www.alrajhitakaful.com/libs_my-space_src_lib_components_he…n-details_downgr-765a15.54c7c502037b9191.js

js alrajhitakaful.com collected 2026-09-24 17:41:50 UTC 16,649 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkDCP_Web=self.webpackChunkDCP_Web||[]).push([["libs_my-space_src_lib_components_health_downgrade-member_downgrade-member-iban-details_downgr-765a15"],{26560:(Y,f,o)=>{o.d(f,{dv:()=>D});var e=o(35347),h=o(3031);function D(){return i=>{if(!i.value)return null;const s=(0,e.Up)(i.value);return s.isValid?null:{mobile:{message:s.error||h.sD.MOBILE.INVALID}}}}},60940:(Y,f,o)=>{o.r(f),o.d(f,{DowngradeMemberIbanDetailsComponent:()=>$});var e=o(23214),h=o(98434),A=o(92947),E=o(89417),S=o(68018),D=o(25558),p=o(7673),v=o(88141),R=o(70980),y=o(33391),N=o(78478),L=o(84541),P=o(73755),C=o(10404),O=o(29040),i=o(13382),s=o(24473),u=o(18),c=o(22790),d=o(70011),M=o(76603),_=o(8051),b=o(61468);function w(l){return g=>{const t=g.value;return null==t||""===String(t).trim()?{required:{message:l.instant("COMMON.required")}}:null}}o(26560);var x=o(7031);const F=()=>[];function H(l,g){if(1&l&&(e.j41(0,"div",1),e.nrm(1,"art-icon",17),e.j41(2,"p",18)(3,"span",19),e.EFF(4),e.nI1(5,"translate"),e.j41(6,"span",20),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.EFF(9),e.nI1(10,"translate"),e.k0s()()()),2&l){const t=e.XpG();e.R7$(),e.Y8G("size",24),e.R7$(3),e.SpI(" ",e.bMT(5,5,"MY_SPACE.SME.THESE")," "),e.R7$(3),e.Lme(" ",t.memberDataCount()," ",e.bMT(8,7,"MY_SPACE.SME.SELECTED")," "),e.R7$(2),e.SpI(" ",e.bMT(10,9,"MY_SPACE.SME.MEMBERS_HAVE_MULTIPLE_PLANS_AND_THE_UPGRADE_WILL_APPLIED_TO_ALL_OF_THEM")," ")}}function G(l,g){if(1&l&&(e.j41(0,"div",21),e.nrm(1,"art-icon",17),e.j41(2,"p",18),e.EFF(3),e.nI1(4,"translate"),e.j41(5,"span",19),e.EFF(6),e.k0s(),e.j41(7,"span"),e.EFF(8),e.nI1(9,"translate"),e.j41(10,"span"),e.EFF(11),e.k0s()(),e.EFF(12),e.nI1(13,"translate"),e.j41(14,"span",20),e.EFF(15),e.k0s(),e.EFF(16),e.nI1(17,"translate"),e.j41(18,"span",19),e.EFF(19),e.k0s()()()),2&l){let t;const a=g,n=e.XpG(2);e.R7$(),e.Y8G("size",24),e.R7$(2),e.SpI(" ",e.bMT(4,9,"MY_SPACE.SME.DOWNGRADE_DESC1")," "),e.R7$(3),e.JRh(a.member_name_en),e.R7$(2),e.SpI(" ",e.bMT(9,11,"MY_SPACE.SME.DOWNGRADE_DESC2")," "),e.R7$(3),e.JRh(null!==(t=null==a||null==a.dependents?null:a.dependents.length)&&void 0!==t?t:0),e.R7$(),e.SpI(" ",e.bMT(13,13,"MY_SPACE.SME.DOWNGRADE_DESC3")," "),e.R7$(3),e.JRh(null==a?null:a.class_id),e.R7$(),e.SpI(" ",e.bMT(17,15,"MY_SPACE.SME.DOWNGRADE_DESC4")," "),e.R7$(3),e.JRh(n.newClass())}}function V(l,g){if(1&l&&e.DNE(0,G,20,17,"div",21),2&l){let t;const a=e.XpG();e.vxM((t=a.memberDataSelected())?0:-1,t)}}function B(l,g){if(1&l&&e.nrm(0,"art-alert",7),2&l){const t=e.XpG();e.Y8G("text",t.serverErrMsg())("variant","error")}}function U(l,g){if(1&l&&(e.j41(0,"section",14)(1,"h6",22),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"h3",23)(5,"span",24),e.EFF(6),e.nI1(7,"number"),e.k0s(),e.j41(8,"span",25),e.EFF(9),e.nI1(10,"translate"),e.k0s()()()),2&l){const t=e.XpG();e.R7$(2),e.SpI(" ",e.bMT(3,3,"COMMON.TOTAL_PREMIUM")," "),e.R7$(4),e.SpI(" ",e.i5U(7,5,t.totalPremium(),"1.2-2")," "),e.R7$(3),e.SpI(" ",e.bMT(10,8,"COMMON.CURRENCY")," ")}}let $=(()=>{class l{router=(0,e.WQX)(A.Ix);route=(0,e.WQX)(A.nX);fb=(0,e.WQX)(E.ok);healthSmeService=(0,e.WQX)(N.f);storage=(0,e.WQX)(L.sE);languageService=(0,e.WQX)(O.g);modalService=(0,e.WQX)(y.Bq);translate=(0,e.WQX)(S.c$);businessValidation=(0,e.WQX)(x.xb);ibanForm;isFormSubmitted=(0,e.vPA)(!1);storageData=(0,e.vPA)({});memberDataSelected=(0,e.vPA)(null);downgradeMultiple=(0,e.vPA)(!1);newClass=(0,e.vPA)("");totalPremium=(0,e.vPA)(null);memberDataAll=(0,e.vPA)([]);memberDataPaginated=(0,e.vPA)([]);paginationLimit=10;paginationOffset=(0,e.vPA)(1);paginationTotalCount=(0,e.vPA)(0);isLoading=(0,e.vPA)(!1);serverErrMsg=(0,e.vPA)(null);policyId=(0,e.vPA)(null);memberDataCount=(0,e.EWP)(()=>{const t=this.memberDataSelected();return Array.isArray(t)?t.length:t?1:0});tableHeadingList=["MY_SPACE.SME.NAME","MY_SPACE.SME.GENDER","MY_SPACE.SME.RELATION","MY_SPACE.SME.CURRENT_CLASS","MY_SPACE.SME.NEW_CLASS"];rowDataKeysMemberWithCheckBox=[{key:"member_name_en",type:"text"},{key:"gender",type:"gender"},{key:"relation",type:"text"},{key:"currentClass",type:"text"},{key:"newClass",type:"text"}];tableConfig={checkboxEnabled:!1,tabledActions:!1,paginationEnabled:!0,tableHeaderEnabled:!0,checkboxAllEnabled:!1,filterEnabled:!1,searchEnabled:!1,checkboxActionData:{actionEnable:!1,selectedArray:[],actionName:"gotoAddon",actionText:"MY_SPACE.SME.ADD_SELECTED_ADDONS",textClass:" cursor-pointer color-main-light-blue text-decoration-underline font-size-16"}};sublistConfig={enable:!0,subList:{rowDataKeys:[{key:"member_name_en",type:"text"},{key:"gender",type:"gender"},{key:"relation",type:"text"},{key:"currentClass",type:"text"},{key:"newClass",type:"text"}],actionsRows:{mode:"display-icon-withoutText",list:[{icon:"fa-thin fa-tras
1h",actionName:"deletedependent",actionClass:"color-error font-weight-500",enable:!0}]},tableHeadingList:["MY_SPACE.SME.NAME","MY_SPACE.SME.MOBILE_NUMBER","MY_SPACE.SME.GENDER","MY_SPACE.SME.AGE","MY_SPACE.SME.CLASS","MY_SPACE.SME.PREMIUM"],tableHeading:"MY_SPACE.SME.DEPENDENT_DETAILS",headerClass:"font-size-16 font-weight-600 color-main-light-blue"}};tableActionsRows=[];paginationData={footerText:"MY_SPACE.SME.TOTAL_MEMBERS",offset:1,limit:10,totalCount:0};totalPages(){const t=this.paginationTotalCount();return t<=0?1:Math.ceil(t/this.paginationLimit)}getPageNumbers(){return Array.from({length:this.totalPages()},(t,a)=>a+1)}headerConfig=(0,e.EWP)(()=>{const t=this.policyId(),n=this.storageData()?.policy_details?.policy_id,r=t||n;return{menu:[{NameTranslator:"MY_SPACE.COMMON.MY_POLICIES",path:"/my-space/individual/policies/list/all"},{NameTranslator:"MY_SPACE.SME.HEALTH_SME_DETAILS",path:r?`/my-space/sme/policies/detail/${r}`:"/my-space/sme/policies"},{NameTranslator:"MY_SPACE.SME.DOWNGRADE"},{NameTranslator:"MY_SPACE.SME.REVIEW_DOWNGRADE_REQUEST"}]}});ngOnInit(){const t=this.route.snapshot.paramMap.get("policyId"),a=this.route.snapshot.queryParamMap.get("policyId"),n=this.storage.GetValue(this.healthSmeService.STORAGE_KEY_HEALTH_SME_ENDORSEMENT)??{},m={...this.storage.GetValue(this.healthSmeService.STORAGE_KEY)??{},...n};this.storageData.set(m),this.policyId.set(t??a??m?.policy_details?.policy_id??null),this.memberDataSelected.set(m?.memberDataSelected??null),this.downgradeMultiple.set(!!m.multipleSelect),this.newClass.set((m.downgradeClassFormValues??{}).confirmPlan??"");const T=m.summary?.quote_details?.total_base_premium;this.totalPremium.set(null!=T&&""!==T?Number(T):null),this.ibanForm=this.fb.group({accountHolderName:["",[w(this.translate)]],iban_no:["",[E.k0.required,this.businessValidation.ibanWithSaPrefix()]],confirm1:[!1,E.k0.requiredTrue]}),this.setData()}setAcknowledgment(t){}setData(){const t=this.normalizeMemberList(this.memberDataSelected());if(!t.length)return void this.clearMemberTableState();this.attachDependentsToEmployees(t);const n=t.filter(r=>!r?.is_dependent).map(r=>this.mapEmployeeForTable(r));this.applyMemberTableState(n)}normalizeMemberList(t){return Array.isArray(t)?t:null!=t?[t]:[]}clearMemberTableState(){this.memberDataAll.set([]),this.memberDataPaginated.set([]),this.paginationTotalCount.set(0)}attachDependentsToEmployees(t){for(const a of t)"EMPLOYEE"===a?.member_type&&(a.is_dependent=!1),a?.dependents||(a.dependents=[]);for(let a=0;a<t.length;a++)for(let n=0;n<t.length;n++){const r=t[n],m=t[a];"EMPLOYEE"!==r?.member_type&&m?.id===r?.parent_member_id&&(m.depen
1dents.push(r),r.is_dependent=!0)}}mapEmployeeForTable(t){const a=this.newClass()??"";return{...t,id_no:t?.member_id,member_name_en:t?.member_name_en,mobile:t?.mobile,gender:t?.gender,dob:t?.date_of_birth,class_id:t?.class_id,premium:t?.premium??"__",relation:this.getRelationDetail(t?.relation),currentClass:t?.class_id,newClass:a,dependents:(t?.dependents??[]).map(n=>({member_name_en:n?.member_name_en,gender:n?.gender,dob:n?.date_of_birth,relation:this.getRelationDetail(n?.relation),currentClass:t?.class_id,newClass:a,class_id:t?.class_id,premium:n?.premium??"__"}))}}applyMemberTableState(t){this.memberDataAll.set(t),this.paginationTotalCount.set(t.length),this.memberDataPaginated.set(this.paginate(t,this.paginationLimit,1)),this.paginationOffset.set(1),this.paginationData.offset=1,this.paginationData.limit=this.paginationLimit,this.paginationData.totalCount=t.length}getRelationDetail(t){return"1"===t||1===t?"EMPLOYEE":"2"===t||2===t?"Spouse":"3"===t||3===t?"Child":"4"===t||4===t?"Parents":"Others"}paginate(t,a,n){return t.slice((n-1)*a,n*a)}onOffsetChange(t){if(null==t)return;this.paginationOffset.set(t),this.paginationData.offset=t;const a=this.memberDataAll()??[],n=this.paginate(a,this.paginationLimit,t);this.memberDataPaginated.set(n)}saveIban(t){return this.healthSmeService.saveIban(this.buildSaveIbanPayload(t)).pipe((0,D.n)(a=>"Active"===a?.account_status?this.updateInstance():(0,p.of)({message:"IBAN not active"})))}updateInstance(){const a=this.storageData()?.summary?.quote_details?.reference_number;if(!a)return(0,p.of)(null);const n=this.languageService.currentLang();return this.healthSmeService.updateInstance(a,n).pipe((0,v.M)(()=>{this.storage.mergeIntoExistValue(this.healthSmeService.STORAGE_KEY_HEALTH_SME_ENDORSEMENT,{isProduct:"true",reference_number:a}),this.storage.mergeIntoExistValue(this.healthSmeService.STORAGE_KEY,{isProduct:"true",reference_number:a}),this.serviceRequestPopUp()}))}serviceRequestPopUp(){const t=this.storageData(),a=t?.summary?.quote_details?.reference_number??null,n=t?.policy_details?.policy_id??null,r=this.modalService.open(b.b,{centered:!0,backdrop:"static",windowClass:"popup-variant__1"});r.componentInstance.referenceId=a,r.componentInstance.policyId=n,r.componentInstance.endorsementType="down_grade",r.componentInstance.headingTitle="MY_SPACE.SME.DOWNGRADE_REQUEST_SUBMITTED",r.componentInstance.secondaryActionButtonText="MY_SPACE.SME.GO_MEMBERS_LIST",r.componentInstance.secondaryActionGoesToPolicyList=!0}buildSaveIbanPayload(t){const a=this.storageData(),n=a?.policy_details??{},r=a?.downgradeMemberQuoteData,m=r?.company_id?.quote_id??r?.id??r?.quote_id??null;return{policy_id:n?.policy_id??null,iban_no:t?.iban_no??null,national_id:n?.national_id??null,quote_id:m,policy_no:n?.policy_number??null,mobile_no:n?.cust_contact_no??null,policy_holder_name:n?.cust_name??null,iban_acc_holder_name:t?.accountHolderName??null}}submitForm(){this.isFormSubmitted.set(!0),this.ibanForm.markAllAsTouched(),!this.ibanForm.invalid&&(this.serverErrMsg.set(null),this.isLoading.set(!0),this.saveIban(this.ibanForm.getRawValue()).pipe((0,R.j)(()=>this.isLoading.set(!1))).subscribe({next:()=>{},error:t=>this.serverErrMsg.set(this.getErrorMessage(t))}))}getErrorMessage(t){const a=t?.error||t?.message||t?.err_msg||t?.error_msg||t?.errors||"Request failed";return"string"==typeof a?a:JSON.stringify(a)}showSuccessAndNavigate(){const t=this.getResolvedPolicyId();this.router.navigate(t?[P.Y.POLICY_DETAIL(t)]:[C.B.MY_SPACE])}goBack(){this.router.navigate([this.languageService.translateRoute(C.B.SME_DOWNGRADE_MEMBER)])}getResolvedPolicyId(){return this.policyId()??this.storageData()?.policy_details?.policy_id??null}static \u0275fac=function(a){return new(a||l)};static \u0275cmp=e.VBU({type:l,selectors:[["art-downgrade-member-iban-details"]],decls:35,vars:63,consts:[[1,"color-main-light-blue","font-size-24","font-weight-700","mt-3"],[1,"d-flex","gap-2","background-tint-blue","alert-box","align-items-center","p-1","px-3","rounded-20"],[1,"d-flex","flex-column","justify-content-between"],[1,"background-bg-white","rounded-16","p-4","my-4"],[3,"offesetChange","data","tableConfig","paginationdata","filter","actions","tableHeading","headerClass","tableHeadingList","rowDataKeys","sublistConfig","actionsRows"],[3,"ngSubmit","formGroup"],[1,"font-size-20","font-weight-600","color-main-light-blue","mb-2","mt-2"],[1,"my-2",3,"text","variant"],["name","accountHolderName","formControlName","accountHolderName","type","text",3,"CustomContainerClass","label","subLabel","placeholder","control","customErrorMessage"],["name","iban_no","maxLength","24","minLength","22","formControlName","iban_no","type","text",3,"CustomContainerClass","label","subLabel","placeholder","control"],["controlName","confirm1","customClasses","align-items-center",3,"changevalue","form","onChangeNeeded","submitted","customErrorMessage","checkboxSize","text"],[1,"background-bg-white","px-4","py-3","mt-3","d-flex","justify-content-between","minus-margin-1point5"],[1,"d-flex","justify-content-start","gap-2"],["variant","circle","icon","fa-light fa-chevron-left","iconCustomClass","color-main-dark-blue","buttonCustomClass","shadow-low background-bg-white p-3",3,"clickAction","size"],[1,"d-flex","justify-content-between","align-items-center","flex-sm-column","justify-content-sm-center","align-items-sm-start"],[1,"d-flex","gap-2","justify-content-end"],["variant","primary","type","submit",3,"text","isLoading"],["icon","fa-thin fa-circle-exclamation",1,"me-2",3,"size"],[1,"color-text-secondary","font-size-14","font-weight-400","mt-3"],[1,"color-text-secondary","font-size-14","font-weight-600"],[1,"color-main-light-blue","font-size-14","font-weight-600"],[1,"d-flex","gap-2","background-tint-blue","alert-box","align-items-center","p-1","px-3","rounded-20","border-1px-main-light-blue"],[1,"font-size-16","color-text-secondary","font-weight-400","mb-2"],[1,"d-flex","align-items-center","gap-1","color-text-main","mb-0"],[1,"font-size-20","font-weight-600"],["artReplaceCurrencyWithIcon","",1,"font-size-16","font-weight-400","color-text-main"]],template:function(a,n){1&a&&(e.j41(0,"div")(1,"p",0),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.DNE(4,H,11,11,"div",1)(5,V,1,1),e.k0s(),e.j41(6,"div",2)(7,"section",3)(8,"art-rm-responsive-table",4),e.bIt("offesetChange",function(m){return n.onOffsetChange(m)}),e.k0s()(),e.j41(9,"form",5),e.bIt("ngSubmit",function(){return n.submitForm(
1)}),e.j41(10,"section",3)(11,"h3",6),e.EFF(12),e.nI1(13,"translate"),e.k0s(),e.DNE(14,B,1,2,"art-alert",7),e.nrm(15,"art-basic-input",8),e.nI1(16,"translate"),e.nI1(17,"translate"),e.nI1(18,"translate"),e.nI1(19,"translate"),e.nrm(20,"art-basic-input",9),e.nI1(21,"translate"),e.nI1(22,"translate"),e.nI1(23,"translate"),e.j41(24,"art-checkbox-input-with-text",10),e.nI1(25,"translate"),e.nI1(26,"translate"),e.bIt("changevalue",function(m){return n.setAcknowledgment(m)}),e.k0s()(),e.j41(27,"section")(28,"div",11)(29,"div",12)(30,"art-icon-button",13),e.bIt("clickAction",function(){return n.goBack()}),e.k0s(),e.DNE(31,U,11,10,"section",14),e.k0s(),e.j41(32,"div",15),e.nrm(33,"art-app-art-button",16),e.nI1(34,"translate"),e.k0s()()()()()),2&a&&(e.R7$(2),e.SpI(" ",e.bMT(3,37,"MY_SPACE.SME.REVIEW_DOWNGRADE_REQUEST")," "),e.R7$(2),e.vxM(n.downgradeMultiple()?4:5),e.R7$(4),e.Y8G("data",n.memberDataPaginated())("tableConfig",n.tableConfig)("paginationdata",n.paginationData)("filter",e.lJ4(61,F))("actions",e.lJ4(62,F))("tableHeading","MY_SPACE.SME.MEMBER_LIST")("headerClass","font-size-20 font-weight-600 color-main-dark-blue")("tableHeadingList",n.tableHeadingList)("rowDataKeys",n.rowDataKeysMemberWithCheckBox)("sublistConfig",n.sublistConfig)("actionsRows",n.tableActionsRows),e.R7$(),e.Y8G("formGroup",n.ibanForm),e.R7$(3),e.SpI(" ",e.bMT(13,39,"MY_SPACE.COMMON.REFUND_DETAILS")," "),e.R7$(2),e.vxM(n.serverErrMsg()?14:-1),e.R7$(),e.Y8G("CustomContainerClass","d-grid grid-col-2-200-auto")("label",e.bMT(16,41,"MY_SPACE.COMMON.ACCOUNT_HOLDER_NAME"))("subLabel",e.bMT(17,43,"MY_SPACE.COMMON.PLEASE_ENTER_THE_ACCOUNT_HOLDER_NAME"))("placeholder",e.bMT(18,45,"MY_SPACE.COMMON.ACCOUNT_HOLDER_NAME"))("control",n.ibanForm.get("accountHolderName"))("customErrorMessage",e.bMT(19,47,"COMMON.required")),e.R7$(5),e.Y8G("CustomContainerClass","d-grid grid-col-2-200-auto")("label",e.bMT(21,49,"MY_SPACE.COMMON.IBAN_NUMBER"))("subLabel",e.bMT(22,51,"MY_SPACE.COMMON.PLEASE_ENTER_IBAN_NUMBER"))("placeholder",e.bMT(23,53,"MY_SPACE.COMMON.IBAN_NUMBER_PLACEHOLDER"))("control",n.ibanForm.get("iban_no")),e.R7$(4),e.Y8G("form",n.ibanForm)("onChangeNeeded",!0)("submitted",n.isFormSubmitted())("customErrorMessage",e.bMT(25,55,"MY_SPACE.COMMON.THE_TERMS_ABD_CONDITIONS_MUST_BE_ACCEPTED"))("checkboxSize",24)("text",e.bMT(26,57,"MY_SPACE.SME.I_DECLARE_AS_AN_EMPLOYER_THAT_I_WILL_COMPLY_WITH_ALL_THE_REQUIREMENTS_OF_COUNCIL_OF_COOPERATIVE_HEALTH_INSURANCE_RULES_AND_THE_COUNCIL_S_REGULATIONS_AND_RELATED_RESOLUTIONS")),e.R7$(6),e.Y8G("size",24),e.R7$(),e.vxM(n.totalPremium()?31:-1),e.R7$(2),e.Y8G("text",e.bMT(34,59,"MY_SPACE.COMMON.PROCEED_TO_PAYMENT"))("isLoading",n.isLoading()))},dependencies:[h.MD,h.QX,E.X1,E.qT,E.BC,E.cb,E.j4,E.JD,S.h,S.D9,i.R,s.x,u.e,c.U,d.h,M.C,_.tG],styles:[".minus-margin-1point5[_ngcontent-%COMP%]{margin-bottom:-1.5px}"]})}return l})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.