1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7453],{29413:function(t,a,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/bhutan-innovation-forum/application/list",function(){return e(96043)}])},50613:function(t,a,e){"use strict";var n=e(85893),i=e(87918),o=e(86010),r=e(50591);let l=t=>{let{sx:a,skin:e,color:l,rounded:s}=t,c=(0,r.Z)(),d={primary:{...c.primaryLight},secondary:{...c.secondaryLight},success:{...c.successLight},error:{...c.errorLight},warning:{...c.warningLight},info:{...c.infoLight}},p={...t};p.rounded=void 0;let u="light"===e&&l&&d[l]?Object.assign({},d[l],a||{}):a;return(0,n.jsx)(i.Z,{...p,variant:"filled",className:(0,o.Z)({"MuiChip-rounded":s,"MuiChip-light":"light"===e}),sx:u})};a.Z=l},50591:function(t,a,e){"use strict";var n=e(2734),i=e(25812);let o=()=>{let t=(0,n.Z)();return{primaryFilled:{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.main},primaryLight:{color:t.palette.primary.main,backgroundColor:(0,i.E)(t.palette.primary.main,.16)},secondaryFilled:{color:t.palette.secondary.contrastText,backgroundColor:t.palette.secondary.main},secondaryLight:{color:t.palette.secondary.main,backgroundColor:(0,i.E)(t.palette.secondary.main,.16)},successFilled:{color:t.palette.success.contrastText,backgroundColor:t.palette.success.main},successLight:{color:t.palette.success.main,backgroundColor:(0,i.E)(t.palette.success.main,.16)},errorFilled:{color:t.palette.error.contrastText,backgroundColor:t.palette.error.main},errorLight:{color:t.palette.error.main,backgroundColor:(0,i.E)(t.palette.error.main,.16)},warningFilled:{color:t.palette.warning.contrastText,backgroundColor:t.palette.warning.main},warningLight:{color:t.palette.warning.main,backgroundColor:(0,i.E)(t.palette.warning.main,.16)},infoFilled:{color:t.palette.info.contrastText,backgroundColor:t.palette.info.main},infoLight:{color:t.palette.info.main,backgroundColor:(0,i.E)(t.palette.info.main,.16)}}};a.Z=o},96043:function(t,a,e){"use strict";e.r(a);var n=e(85893),i=e(36822),o=e(16216),r=e(50135),l=e(87109),s=e(83321),c=e(90629),d=e(72882),p=e(7906),u=e(53184),g=e(53816),h=e(53252),m=e(15861),f=e(295),x=e(98456),Z=e(12171),y=e(2734),j=e(32912),v=e(39332),w=e(67294),A=e(63730),b=e(50613),C=e(63856);let P=()=>{let t=(0,v.useRouter)(),[a,e]=(0,w.useState)(!1),[P,k]=(0,w.useState)(0),[S,T]=(0,w.useState)(""),[N,z]=(0,w.useState)(10),[D,L]=(0,w.useState)(""),[E,I]=(0,w.useState)(null),[_,F]=(0,w.useState)([]),[R,M]=(0,w.useState)({page:1,perPage:10,itemCount:0,pageCount:1,hasPreviousPage:!1,hasNextPage:!1});(0,w.useEffect)(()=>{e(!0),(0,C.getNonTouristApplications)(N,P,D).then(t=>{F(t.data),M(t.meta),e(!1)}).catch(t=>{var a;e(!1),T((null==t?void 0:null===(a=t.response)||void 0===a?void 0:a.data.message)?t.response.data.message:null==t?void 0:t.message)})},[N,P,D]);let O=(t,a)=>{k(a)},V=t=>{z(parseInt(t.target.value,10)),k(0)},B=t=>{let a=t.target.value.toLowerCase();L(a),k(0)},q=t=>{I(a=>a===t?null:t)},U=[..._].sort((t,a)=>E?t[E]>a[E]?1:-1:0),W=U.filter(t=>Object.values(t).some(t=>String(t).toLowerCase().includes(D.toLowerCase()))),X=(0,y.Z)(),H=X.palette.divider;return(0,n.jsx)(i.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(o.Z,{direction:"row",justifyContent:"flex-end",children:[(0,n.jsx)(i.Z,{mr:1,children:(0,n.jsx)(r.Z,{InputProps:{startAdornment:(0,n.jsx)(l.Z,{position:"start",children:(0,n.jsx)(A.Z,{icon:"tabler:navigation-search"})})},placeholder:"Search",size:"small",onChange:B,value:D})}),(0,n.jsx)(i.Z,{children:(0,n.jsx)(s.Z,{variant:"tonal",onClick:()=>t.push("/bhutan-innovation-forum/select-agency"),children:"Apply for Non Tourist Application"})})]}),(0,n.jsxs)(c.Z,{variant:"outlined",sx:{mt:1,border:"1px solid ".concat(H)},children:[(0,n.jsx)(d.Z,{children:(0,n.jsxs)(p.Z,{sx:{minWidth:750},"aria-labelledby":"tableTitle",children:[(0,n.jsx)(u.Z,{children:(0,n.jsxs)(g.Z,{children:[(0,n.jsx)(h.Z,{onClick:()=>q("hostAgencyName"),children:(0,n.jsx)(m.Z,{variant:"h6",children:"Host Agency Name"})}),(0,n.jsx)(h.Z,{onClick:()=>q("applicationNo"),children:(0,n.jsx)(m.Z,{variant:"h6",children:"Application No."})}),(0,n.jsx)(h.Z,{onClick:()=>q("submissionDate"),children:(0,n.jsx)(m.Z,{variant:"h6",children:"Submitted Date"})}),(0,n.jsx)(h.Z,{onClick:()=>q("status"),children:(0,n.jsx)(m.Z,{variant:"h6",children:"Status"})}),(0,n.jsx)(h.Z,{children:(0,n.jsx)(m.Z,{variant:"h6",children:"Action"})})]})}),(0,n.jsx)(f.Z,{children:a?(0,n.jsx)(g.Z,{children:(0,n.jsx)(h.Z,{colSpan:9,children:(0,n.jsx)(i.Z,{display:"flex",justifyContent:"center",textAlign:"center",my:3,children:(0,n.jsx)(x.Z,{})})})}):(0,n.jsx)(n.Fragment,{children:0!==W.length?W.map((a,e)=>(0,n.jsxs)(g.Z,{children:[(0,n.jsx)(h.Z,{children:(0,n.jsx)(m.Z,{color:"textSecondary",children:null==a?void 0:a.hostAgencyName})}),(0,n.jsx)(h.Z,{children:(0,n.jsx)(m.Z,{color:"textSecondary",children:null==a?void 0:a.applicationNo})}),(0,n.jsx)(h.Z,{children:(0,n.jsx)(m.Z,{color:"textSecondary",children:(0,j.Z)(new Date(null==a?void 0:a.submissionDate),"dd/MM/yyyy")})}),(0,n.jsx)(h.Z,{children:(0,n.jsx)(m.Z,{variant:"subtitle1",fontWeight:600,children:(0,n.jsxs)("span",{children:[(null==a?void 0:a.status)==="pending"&&(0,n.jsx)(b.Z,{rounded:!0,skin:"light",size:"small",label:"Pending",color:"warning",sx:{textTransform:"capitalize"}}),(null==a?void 0:a.status)==="submitted"&&(0,n.jsx)(b.Z,{rounded:!0,skin:"light",size:"small",label:"Submitted",color:"success",sx:{textTransform:"capitalize"}}),(null==a?void 0:a.status)==="reviewed"&&(0,n.jsx)(b.Z,{rounded:!0,skin:"light",size:"small",label:"Reviewed",color:"success",sx:{textTransform:"capitalize"}}),(null==a?void 0:a.status)==="assessed"&&(0,n.jsx)(b.Z,{rounded:!0,skin:"light",size:"small",label:"Assessed",color:"success",sx:{textTransform:"capitalize"}}),(null==a?void 0:a.status)==="verified"&&(0,n.jsx)(b.Z,{rounded:!0,skin:"light",size:"small",label:"Verified",color:"success",sx:{textTransform:"capitalize"}}),(null==a?void 0:a.status)==="approved"&&(0,n.jsx)(b.Z,{rounded:!0,skin:"light",size:"small",label:"Approved",color:"success",sx:{textTransform:"capitalize"}}),(null==a?void 0:a.status)==="issued"&&(0,n.jsx)(b.Z,{rounded:!0,skin:"light",size:"small",label:"Issued",color:"success",sx:{textTransform:"capitalize"}})]})})}),(0,n.jsx)(h.Z,{children:(0,n.jsx)(A.Z,{icon:"tabler:eye-check",style:{marginRight:"10px",cursor:"pointer"},onClick:()=>t.push("/bhutan-innovation-forum/application/view/".concat(null==a?void 0:a.id))})})]},e)):(0,n.jsx)(g.Z,{children:(0,n.jsx)(h.Z,{colSpan:9,children:(0,n.jsx)(o.Z,{direction:"row",justifyContent:"center",alignItems:"center",children:(0,n.jsx)(m.Z,{variant:"subtitle1",fontWeight:600,children:S||"No application found"})})})})})})]})}),(0,n.jsx)(Z.Z,{rowsPerPageOptions:[10,25,50],component:"div",count:R.itemCount,rowsPerPage:N,page:P,onPageChange:O,onRowsPerPageChange:V})]})]})})};a.default=P},63856:function(t,a,e){"use strict";e.r(a),e.d(a,{addDraftApplicationFinalSubmission:function(){return c},addVisaApplication:function(){return l},finalSubmitApplication:function(){return u},getAllDraftApplications:function(){return s},getNonTouristApplicantByApplicationId:function(){return r},getNonTouristApplications:function(){return o},getVisaApplicationById:function(){return d},uploadApplicationDocuments:function(){return p},visaApplicationSlice:function(){return g}});var n=e(77236),i=e(31606);let o=async(t,a,e)=>{let n=await i.ZP.nonTouristApplicationList(t,a,e);return n},r=async(t,a,e,n)=>{try{let o=await i.ZP.getNonTouristApplicantByApplicationId(t,a,e,n);return o}catch(t){return t}},l=(0,n.hg)("application/addApplication",async(t,a)=>{let{rejectWithValue:e}=a;try{let a=await i.ZP.addDraftApplication(t);return a}catch(t){return e(t)}}),s=async(t,a,e)=>{let n=await i.ZP.getAllDraftVisaApplications(t,a,e);return n},c=(0,n.hg)("application/addApplication",async(t,a)=>{let{draftVisaApplicationId:e,data:n}=t,{rejectWithValue:o}=a;try{let t=await i.ZP.addDraftApplicationFinalSubmission(e,n);return t}catch(t){return o(t)}}),d=(0,n.hg)("application/addApplication",async(t,a)=>{let{rejectWithValue:e}=a;try{let a=await i.ZP.getVisaApplicationById(t);return a}catch(t){return e(t)}}),p=(0,n.hg)("application/uploadApplicationDocuments",async(t,a)=>{let{rejectWithValue:e}=a;try{let a=await i.ZP.uploadApplicationDocuments(t);return a}catch(t){return e(t)}}),u=(0,n.hg)("application/finalSubmitApplication",async(t,a)=>{let{rejectWithValue:e}=a;try{let a=await i.ZP.finalSubmitApplication(t);return a}catch(t){return e(t)}}),g=(0,n.oM)({name:"visaApplication",initialState:{visaApplication:null,draftApplications:{data:[],totalPages:0,meta:{},allData:[],loading:!0,errors:null}},reducers:{},extraReducers:t=>{t.addCase(s.fulfilled,(t,a)=>{t.draftApplications.data=a.payload.data,t.draftApplications.meta=a.payload.meta,t.draftApplications.totalPages=a.payload.totalPages,t.draftApplications.error=null,t.draftApplications.loading=!1}).addCase(s.pending,t=>{t.draftApplications={data:[],meta:{},totalPages:0,error:null,loading:!0}}).addCase(s.rejected,(t,a)=>{t.draftApplications={data:[],meta:{},totalPages:0,error:a.payload,loading:!1}})}}),{}=g.actions;a.default=g.reducer},31606:function(t,a,e){"use strict";e.d(a,{_P:function(){return Z}});var n=e(61723),i=e(83563);let o="".concat("".concat("https://api.immi.gov.bt"),"/svc/non-tourist-visa/api"),r=async(t,a,e)=>{let n="".concat(o,"/applications?perPage=").concat(t,"&page=").concat(a+1);""!==e.trim()&&(n+="&q=".concat(encodeURIComponent(e)));let r=await i.Z.get(n);return{data:r.data.data||[],meta:r.data.meta||{page:1,perPage:10,itemCount:0,pageCount:1,hasPreviousPage:!1,hasNextPage:!1}}},l=async(t,a,e,n)=>{let r="".concat(o,"/applications/").concat(t,"/guests?perPage=").concat(a,"&page=").concat(e+1,"&id=").concat(t);""!==n.trim()&&(r+="&q=".concat(encodeURIComponent(n)));let l=await i.Z.get(r);return{data:l.data.data||[],meta:l.data.meta||{page:1,perPage:10,itemCount:0,pageCount:1,hasPreviousPage:!1,hasNextPage:!1}}},s=async t=>{let a=await i.Z.get("".concat(o,"/applications/").concat(t));return a.data},c=async t=>{let{id:a,visaApplicationDocuments:e}
1=t,n=new FormData;e.forEach(t=>{n.append("attachments",t.file)});let r=await i.Z.post("".concat(o,"/visa-applications/").concat(a,"/upload-documents"),n,{headers:{"Content-Type":"multipart/form-data"}});return r.data},d=async t=>{let a=await i.Z.get("".concat(o,"/draft-applications/").concat(t));return a.data},p=async(t,a)=>{let e=await i.Z.put("".concat(o,"/draft-applications/initiate/").concat(t),a);return e.data},u=async(t,a,e)=>{let n="".concat(o,"/draft-applications/bif?perPage=").concat(t,"&page=").concat(a+1);""!==e.trim()&&(n+="&q=".concat(encodeURIComponent(e)));let r=await i.Z.get(n);return{data:r.data.data||[],meta:r.data.meta||{page:1,perPage:10,itemCount:0,pageCount:1,hasPreviousPage:!1,hasNextPage:!1}}},g=async t=>{let{hostAgencyId:a,hostAgencyName:e}=t,n=new FormData;n.append("hostAgencyId",a),n.append("hostAgencyName",e);let r=await i.Z.post("".concat(o,"/draft-applications/initiate"),n,{headers:{"Content-Type":"multipart/form-data"}});return r.data},h=async t=>{let{draftVisaApplicationId:a}=t,e=new FormData;e.append("file",t.data.file[0]);let n=await i.Z.post("".concat(o,"/draft-application-guests/upload-and-read-mrz-passport?draftApplicationId=").concat(a),e,{headers:{"Content-Type":"multipart/form-data"}});return n.data},m=async(t,a)=>{let e=await i.Z.get("".concat(o,"/draft-application-guests/by-draft-visa-application-id/").concat(t),{params:(0,n.yY)(a)});return e.data},f=async(t,a)=>{let e=await i.Z.post("".concat(o,"/draft-applications/").concat(t,"/final-submission"),a);return e.data},x=async t=>{let a=await i.Z.patch("".concat(o,"/applications/").concat(t,"/submit"),{});return a.data},Z=async t=>{let a=await i.Z.get("".concat(o,"/applications/check-payment-status/").concat(t,"/guests"));return a.data},y=async t=>{let a=await i.Z.delete("".concat(o,"/draft-applications/").concat(t));return a.data};a.ZP={deleteDraftVisaApplication:y,finalSubmitApplication:x,nonTouristApplicationList:r,getNonTouristApplicantByApplicationId:l,uploadApplicationDocuments:c,getVisaApplicationById:s,addDraftApplication:g,draftUploadAndReadMrz:h,getAllDraftVisaApplications:u,getAllDraftApplicantByDraftApplicationId:m,getDraftApplicationById:d,updateDraftApplication:p,addDraftApplicationFinalSubmission:f}}},function(t){t.O(0,[18360,50135,56261,12171,62852,49774,92888,40179],function(){return t(t.s=29413)}),_N_E=t.O()}]);
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.