1import{_ as I,a as M,b as w}from"./application_form_3.D1LBMp8B.js";import{s as B,u as H,x as V,a6 as F,o as t,c as a,h as e,i as T,L as P,z as u,B as j,a as i,e as n,T as v,S as g,F as d,r as y,t as c,a2 as A,U as E,ac as z,V as K,k as q,D,W as O,a7 as p,a9 as h}from"./index.BcDC3AA6.js";import{u as G}from"./policyStore.CaV_vudP.js";const J={key:1},W={class:"text-center mt-2 mb-4"},Q={key:0,class:"img-fluid",src:I,alt:"Hero Image"},X={key:1,class:"img-fluid",src:M,alt:"Hero Image"},Y={key:2,class:"img-fluid",src:w,alt:"Hero Image"},Z={class:"primary_txt modalSuccess_text mt-4",style:{"font-family":"'Futura PT Medium'","font-weight":"100",color:"black","font-size":"23px"}},oe={__name:"PolicyReinstate",setup(ee){const k=G();let{loader:te}=B(k);const U=H(),b=V();let m=q(!1),$=q(""),R=q(2);const x=JSON.parse(localStorage.getItem("USER"));let f=D({statement_of_good_health_url:[],revival_request_form_url:[],id_no_url:[],kra_no_url:[]}),o=D({statement_of_good_health:[],revival_request_form:[],id_no:[],kra_no:[]});const L=O(()=>({statement_of_good_health:{required:p.withMessage("Health Statement Document is Required",h)},revival_request_form:{required:p.withMessage("Revival Request Document is Required",h)},id_no:{required:p.withMessage("National ID Document is Required",h)},kra_no:{required:p.withMessage("KRA Document is Required",h)}})),s=F(L,o),S=()=>{s.value.$touch(),s.value.$invalid||C()},C=()=>{let N={quotation_id:b.params.policyId,revival_type:b.params.status,revival_documents:{statement_of_good_health:o.statement_of_good_health,revival_request_form:o.revival_request_form,id_no:o.id_no,kra_no:o.kra_no}};k.submitReinstateDocuments({...N}).then(r=>{r.data.code===200&&($.value=r.data.message,m.value=!0)})};return(N,r)=>(t(),a(d,null,[e(k).loader?(t(),T(P,{key:0})):(t(),a("div",J,[u(j,{"page-title":"Policy Reinstate"}),i("div",W,[e(R)===1?(t(),a("img",Q)):n("",!0),e(R)===2?(t(),a("img",X)):n("",!0),e(R)===3?(t(),a("img",Y)):n("",!0)]),u(A,null,{default:v(()=>[u(g,{fileTempURL:e(f).statement_of_good_health_url,label:"Statement of Good Health",required:"1",arrayName:e(o).statement_of_good_health},null,8,["fileTempURL","arrayName"]),e(s).statement_of_good_health.$error?(t(!0),a(d,{key:0},y(e(s).statement_of_good_health.$errors,(l,_)=>(t(),a("div",{class:"text-danger",key:_},c(l.$message),1))),128)):n("",!0),u(g,{fileTempURL:e(f).revival_request_form_url,label:"Revival Request Form",required:"1",arrayName:e(o).revival_request_form},null,8,["fileTempURL","arrayName"]),e(s).revival_request_form.$error?(t(!0),a(d,{key:1},y(e(s).revival_request_form.$errors,(l,_)=>(t(),a("div",{class:"text-danger",key:_},c(l.$message),1))),128)):n("",!0),u(g,{fileTempURL:e(f).id_no_url,label:"ID Document",required:"1",arrayName:e(o).id_no},null,8,["fileTempURL","arrayName"]),e(s).id_no.$error?(t(!0),a(d,{key:2},y(e(s).id_no.$errors,(l,_)=>(t(),a("div",{class:"text-danger",key:_},c(l.$message),1))),128)):n("",!0),u(g,{fileTempURL:e(f).kra_no,label:e(x).country_id==2?"KRA":e(x).country_id==3?" TIN":"URA TIN",required:"1",arrayName:e(o).kra_no},null,8,["fileTempURL","label","arrayName"]),e(s).kra_no.$error?(t(!0),a(d,{key:3},y(e(s).kra_no.$errors,(l,_)=>(t(),a("div",{class:"text-danger",key:_},c(l.$message),1))),128)):n("",!0),i("div",{class:"text-center"},[i("button",{class:"jhl_btn",onClick:S},"Continue")])]),_:1})])),e(m)?(t(),T(K,{key:2,firstClass:"modal-dialog-centered submitted_modal justify-content-center",secondClass:"sales_activity_modal success_modal",thridClass:"activity_modal_body",forthClass:"activity_modal_footer"},{header:v(()=>[i("button",{onClick:r[0]||(r[0]=l=>z(m)?m.value=!1:m=!1),type:"button",class:"close"},[...r[2]||(r[2]=[i("span",{"aria-hidden":"true"},"Ã",-1)])])]),default:v(()=>[r[3]||(r[3]=i("img",{class:"mx-auto d-block",style:{},src:E,alt:""},null,-1)),i("div",Z,c(e($)),1)]),footer:v(()=>[i("button",{type:"button",onClick:r[1]||(r[1]=l=>e(U).push("/policies")),class:"jbl_agnt_btn mt-0",style:{"margin-right":"5px","min-width":"130px"}},"Okay")]),_:1})):n("",!0)],64))}};export{oe as default};
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.