1"use strict";(self.webpackChunkscip_react=self.webpackChunkscip_react||[]).push([[64453],{90133(e,t,s){s.d(t,{A:()=>j});var l=s(89379),i=s(5544),a=s(97176),c=s(46114),n=s(91646),d=s(95961),r=s(15845),o=s(20532),h=s(9449),m=s(35887),u=s(9950),x=s(745),b=s(19429),A=s(44414);const j=e=>{var t;const s=(0,u.useState)([]),j=(0,i.A)(s,2),k=j[0],p=j[1],g=(0,u.useState)([]),f=(0,i.A)(g,2),N=f[0],v=f[1],w=(0,u.useState)([]),y=(0,i.A)(w,2),C=y[0],S=y[1],I=(0,h.mN)(),_=I.register,E=I.handleSubmit,F=I.reset,P=I.control,q=I.formState.errors;(0,u.useEffect)(()=>{D(),L()},[]);const D=()=>{x.A.getAPI({action:"/thirdparty-list"}).then(e=>{if(e&&e.list){let s=[];for(var t in e.list)s.push({id:e.list[t].roleId,value:e.list[t].role_name});v(s)}}).catch(e=>{})},T=[{id:"syndicate",value:"Admin"},{id:"investor",value:"Investor"},{id:"thirdparty",value:"Sme Advisor"}],L=()=>{e.modelData.checklistId&&x.A.getAPI({action:"/workflow-checklist-details/"+e.modelData.checklistId}).then(e=>{F(e.result),p(e.result.view_checklist_to.split(","));var t=e.result.thirdparty_role_id.split(",");for(var s in t)t[s]=Number(t[s]);S(t)}).catch(e=>{})};return(0,A.jsx)(d.A,{direction:"end",isOpen:e.show,id:"offcanvasExample",toggle:e.onCloseClick,className:"size-sm",children:(0,A.jsxs)("form",{onSubmit:E(t=>{t.view_checklist_to=k,t.thirdparty_role_id=C,t.substageId=e.modelData.Id,e.modelData.checklistId?(t.checklistId=e.modelData.checklistId,x.A.putAPI({action:"/edit-workflow-checklist",body:t,id:"addedit-workflow-checklist-submit-btn"}).then(t=>{m.Ay.success(t.message),e.onCloseClick(!e.show)}).catch(e=>{})):x.A.postAPI({action:"/add-workflow-checklist",body:t,id:"addedit-workflow-checklist-submit-btn"}).then(t=>{m.Ay.success(t.message),e.onCloseClick(!e.show)}).catch(e=>{})}),className:"d-flex flex-column justify-content-end h-100",children:[(0,A.jsx)(o.A,{className:"bg-light",toggle:e.onCloseClick,children:null!==(t=e.modelData)&&void 0!==t&&t.checklistId?"Edit Checklist":"Add Checklist"}),(0,A.jsx)(r.A,{children:(0,A.jsxs)(a.A,{children:[(0,A.jsx)(c.A,{lg:12,children:(0,A.jsxs)("div",{className:"mb-2",children:[(0,A.jsxs)(n.A,{htmlFor:"name-field",className:"form-label",children:[" ","Title ",(0,A.jsx)("span",{className:"text-danger",children:"*"})]}),(0,A.jsx)("input",(0,l.A)({id:"customername-field",className:"form-control",placeholder:"Enter Title",type:"text"},_("title",{required:!0}))),(0,A.jsx)("div",{children:q.title&&(0,A.jsxs)("span",{className:"text-danger fs-12",children:[" ","Please enter title"]})})]})}),(0,A.jsx)(c.A,{lg:12,children:(0,A.jsxs)("div",{className:"mb-2",children:[(0,A.jsxs)(n.A,{htmlFor:"name-field",className:"form-label",children:["Seq No"," "]}),(0,A.jsx)("input",(0,l.A)({id:"customerseq-field",className:"form-control",placeholder:"Enter Seq No",type:"text"},_("seq_no",{required:!1})))]})}),(0,A.jsx)(c.A,{lg:12,children:(0,A.jsxs)("div",{className:"mb-2",children:[(0,A.jsx)(n.A,{htmlFor:"name-field",className:"form-label",children:"Checklist can be viewed by"}),(0,A.jsx)(h.xI,{control:P,name:"view_checklist_to",render:e=>{let t=e.field;return(0,A.jsx)(b.A,{selectLimit:T.length,options:T,selected:k,placeholder:"Select user Type",onChange:e=>{if(e){let s=e.map(e=>(t.onChange(e.id),e.id));p(s)}}})}})]})}),k&&k.length>0&&k.map(e=>(0,A.jsx)(A.Fragment,{children:"thirdparty"==e&&(0,A.jsx)(c.A,{lg:12,children:(0,A.jsxs)("div",{className:"mb-2",children:[(0,A.jsx)(n.A,{htmlFor:"name-field",className:"form-label",children:"Select SME advisor who can view the checklist"}),(0,A.jsx)(h.xI,{control:P,name:"thirdparty_role_id",render:e=>{let t=e.field;return(0,A.jsx)(b.A,{selectLimit:N.length,options:N,selected:C,placeholder:"Select Role",onChange:e=>{if(e){let s=e.map(e=>(t.onChange(e.id),e.id));S(s)}}})}})]})})}))]})}),(0,A.jsxs)("div",{className:"offcanvas-footer border-top p-3 text-center hstack gap-2 justify-content-end",children:[(0,A.jsx)("button",{type:"submit",id:"addedit-workflow-checklist-submit-btn",color:"primary",className:"btn btn-brand-theme-save",children:"Submit"}),(0,A.jsx)("button",{type:"button",className:"btn btn-light",onClick:()=>(e.onCloseClick(!e.show),void F()),children:"Cancel"})]})]})})}},64453(e,t,s){s.r(t),s.d(t,{default:()=>C});var l=s(5544),i=s(9950),a=s(59335),c=s(97176),n=s(46114),d=s(34940),r=s(65276),o=s(33483),h=s(84084),m=s(87537),u=s(8081),x=s(61340),b=s(6754),A=s(23166),j=s(48029),k=s(52264),p=s(90133),g=s(57927),f=s(745),N=s(35887),v=s(28429),w=s(44414);const y=[{title:"Sr.no",classTitle:"text-start",isSorting:!0,isAsc:!0,sortingKey:"checklistId"},{title:"Title",classTitle:"text-start",isSorting:!0,isAsc:!0,sortingKey:"title"},{title:"Seq.no",classTitle:"text-start",isSorting:!0,isAsc:!0,sortingKey:"seq_no"},{title:"Action",class:"text-center"}],C=()=>{document.title="".concat((0,k.P_)()," | Checklist");const e=(0,i.useState)({name:"",id:0}),t=(0,l.A)(e,2),s=t[0],C=t[1],S=(0,i.useState)({alert:!1,id:0,status:""}),I=(0,l.A)(S,2),_=I[0],E=I[1],F=(0,i.useState)([]),P=(0,l.A)(F,2),q=P[0],D=P[1],T=(0,i.useState)(0),L=(0,l.A)(T,2),K=L[0],O=L[1],z=(0,i.useState)(!1),M=(0,l.A)(z,2),Y=M[0],R=M[1],B=(0,i.useState)(1),G=(0,l.A)(B,2),H=G[0],J=G[1];let Q=(0,v.g)().id;(0,i.useEffect)(()=>{U(1)},[]);const U=(e,t,s,l)=>{R(!0);let i=[],a={};
1a.offset=e-1,a.substageId=Q,t&&(a.keyword=t),l&&(a.order_by=1==s?"asc":"desc",a.sort_by=l||""),f.A.getAPI({action:"/workflow-checklist-pagination-list",body:a}).then(t=>{if(t&&t.list){for(var s in O(t.count),R(!1),t.list){let l=[];l.push({value:0==e?Number(s)+1:10*Number(e-1)+Number(s)+1}),l.push({value:t.list[s].title}),l.push({value:t.list[s].seq_no}),l.push({value:V({id:t.list[s].checklistId,active:t.list[s].active})}),i.push({data:l})}D([...i])}J(e)}).catch(e=>{R(!1)})},V=e=>(0,w.jsxs)(w.Fragment,{children:[" ",(0,w.jsx)("ul",{className:"list-inline gap-2 mb-0",children:(0,w.jsx)("li",{className:"list-inline-item",children:(0,w.jsxs)(A.A,{children:[(0,w.jsx)(o.A,{href:"#",className:"btn btn-soft-secondary btn-sm dropdown",tag:"button",children:(0,w.jsx)("i",{className:"ri-more-fill align-middle"})}),(0,w.jsxs)(r.A,{className:"dropdown-menu-end",children:[(0,w.jsxs)(d.A,{onClick:t=>C({name:"AddEditChecklist",Id:Q,checklistId:e.id}),children:[(0,w.jsx)("i",{className:"ri-edit-box-line align-middle me-1"}),"Edit"]}),"Y"==e.active?(0,w.jsx)(w.Fragment,{children:(0,w.jsxs)(d.A,{onClick:t=>E({alert:!0,id:e.id,status:"N"}),children:[(0,w.jsx)("i",{className:"ri-close-circle-line align-middle me-1",style:{color:"red"}}),"Deactivate"]})}):(0,w.jsx)(w.Fragment,{children:(0,w.jsxs)(d.A,{onClick:t=>E({alert:!0,id:e.id,status:"Y"}),children:[(0,w.jsx)("i",{className:"ri-checkbox-circle-line align-middle me-1",style:{color:"green"}}),"Activate"]})})]})]})})})]});return(0,w.jsxs)(i.Fragment,{children:[(0,w.jsx)("div",{className:"page-content",children:(0,w.jsxs)(a.A,{fluid:!0,children:[(0,w.jsx)(j.A,{title:"Checklist",pageTitle:"Checklist",location:"/admin/workflow"}),(0,w.jsx)(c.A,{children:(0,w.jsx)(n.A,{lg:12,children:(0,w.jsx)(h.A,{id:"leadsList",children:(0,w.jsxs)(m.A,{className:"border-0",children:[(0,w.jsx)(c.A,{className:"mb-4",children:(0,w.jsx)("div",{className:"col-sm-auto ms-auto",children:(0,w.jsx)("div",{className:"hstack gap-2 flex-wrap",children:(0,w.jsxs)("button",{type:"button",className:"btn btn-brand-theme",id:"create-btn",onClick:e=>C({name:"AddEditChecklist",Id:Q}),children:[(0,w.jsx)("i",{className:"ri-add-line align-bottom me-1"})," Add"]})})})}),(0,w.jsx)("div",{className:"px-3 mt-3",children:(0,w.jsx)("div",{className:"table-card",children:(0,w.jsx)(g.A,{headers:y,rows:q,count:K,errorMessage:"No Data Found",ShowLoader:Y,onPageChange:(e,t)=>
1{U(e,t),J(e)},currentPage:H,isShowSearch:!0,onSort:(e,t,s)=>{U(1,null,t,s)}})})})]})})})})]})}),"AddEditChecklist"==s.name&&(0,w.jsx)(p.A,{show:"AddEditChecklist"==s.name,onCloseClick:()=>{C(""),U(1)},modelData:s}),(0,w.jsxs)(u.A,{size:"md",isOpen:_.alert,centered:!0,children:[(0,w.jsx)(x.A,{className:"mb-2",toggle:()=>E({alert:!1,id:0,status:""}),children:"Are you sure you want to do this action?"}),(0,w.jsx)(b.A,{className:"border-top p-2",children:(0,w.jsxs)("div",{className:"hstack gap-2 justify-content-end",children:[(0,w.jsx)("button",{type:"button",className:"btn btn-light",onClick:()=>E({alert:!1,id:0,status:""}),children:"Cancel"}),(0,w.jsx)("button",{type:"submit",id:"workflow-checklist-modal-submit-btn",className:"btn btn-primary",onClick:()=>((e,t)=>{let s={};s.checklistId=e,s.status=t,f.A.postAPI({action:"/workflow-checklist-update-status",body:s,id:"workflow-checklist-modal-submit-btn"}).then(e=>{e&&(N.Ay.success(e.message),E({alert:!1,id:0,status:""}),U(1))}).catch(e=>{})})(_.id,_.status),children:"Ok"})]})})]})]})}}}]);
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.