2 lines
22 KiB
JavaScript
2 lines
22 KiB
JavaScript
import{r as l,n as V,p as G,s as b,t as c,q as T,_ as I,j as f,v as M,f as r,w as Y,a2 as fe,bu as be,a3 as N,bv as H,bw as q,bx as K,T as S,bj as he,bt as Ce,m as de,aO as ue,S as C,aW as ee,h as E,a5 as te,B as J,i as Se,P as ve,y as ye,aS as Re}from"./index.8aed0a19.js";import{r as re,i as ie,a as se,m as $e}from"./jsonToFormData.9dc5ce0d.js";import{C as Le}from"./Card.d296fd42.js";const we=l.exports.createContext({}),Z=we,Me=l.exports.createContext({}),ae=Me;function Te(e){return V("MuiStep",e)}G("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const Ie=["active","children","className","component","completed","disabled","expanded","index","last"],Be=e=>{const{classes:t,orientation:o,alternativeLabel:n,completed:s}=e;return Y({root:["root",o,n&&"alternativeLabel",s&&"completed"]},Te,t)},De=b("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.orientation],o.alternativeLabel&&t.alternativeLabel,o.completed&&t.completed]}})(({ownerState:e})=>c({},e.orientation==="horizontal"&&{paddingLeft:8,paddingRight:8},e.alternativeLabel&&{flex:1,position:"relative"})),_e=l.exports.forwardRef(function(t,o){const n=T({props:t,name:"MuiStep"}),{active:s,children:a,className:i,component:p="div",completed:u,disabled:x,expanded:g=!1,index:m,last:h}=n,U=I(n,Ie),{activeStep:k,connector:L,alternativeLabel:$,orientation:A,nonLinear:z}=l.exports.useContext(Z);let[w=!1,W=!1,B=!1]=[s,u,x];k===m?w=s!==void 0?s:!0:!z&&k>m?W=u!==void 0?u:!0:!z&&k<m&&(B=x!==void 0?x:!0);const j=l.exports.useMemo(()=>({index:m,last:h,expanded:g,icon:m+1,active:w,completed:W,disabled:B}),[m,h,g,w,W,B]),D=c({},n,{active:w,orientation:A,alternativeLabel:$,completed:W,disabled:B,expanded:g,component:p}),P=Be(D),d=f(De,c({as:p,className:M(P.root,i),ref:o,ownerState:D},U,{children:[L&&$&&m!==0?L:null,a]}));return r(ae.Provider,{value:j,children:L&&!$&&m!==0?f(l.exports.Fragment,{children:[L,d]}):d})}),Ne=_e,ke=fe(r("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),Ae=fe(r("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");function ze(e){return V("MuiStepIcon",e)}const Pe=G("MuiStepIcon",["root","active","completed","error","text"]),oe=Pe;var me;const Ue=["active","className","completed","error","icon"],We=e=>{const{classes:t,active:o,completed:n,error:s}=e;return Y({root:["root",o&&"active",n&&"completed",s&&"error"],text:["text"]},ze,t)},ne=b(be,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${oe.completed}`]:{color:(e.vars||e).palette.primary.main},[`&.${oe.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${oe.error}`]:{color:(e.vars||e).palette.error.main}})),je=b("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily})),Fe=l.exports.forwardRef(function(t,o){const n=T({props:t,name:"MuiStepIcon"}),{active:s=!1,className:a,completed:i=!1,error:p=!1,icon:u}=n,x=I(n,Ue),g=c({},n,{active:s,completed:i,error:p}),m=We(g);if(typeof u=="number"||typeof u=="string"){const h=M(a,m.root);return p?r(ne,c({as:Ae,className:h,ref:o,ownerState:g},x)):i?r(ne,c({as:ke,className:h,ref:o,ownerState:g},x)):f(ne,c({className:h,ref:o,ownerState:g},x,{children:[me||(me=r("circle",{cx:"12",cy:"12",r:"12"})),r(je,{className:m.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:g,children:u})]}))}return u}),Oe=Fe;function qe(e){return V("MuiStepLabel",e)}const Ee=G("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),O=Ee,He=["children","className","componentsProps","error","icon","optional","slotProps","StepIconComponent","StepIconProps"],Ke=e=>{const{classes:t,orientation:o,active:n,completed:s,error:a,disabled:i,alternativeLabel:p}=e;return Y({root:["root",o,a&&"error",i&&"disabled",p&&"alternativeLabel"],label:["label",n&&"active",s&&"completed",a&&"error",i&&"disabled",p&&"alternativeLabel"],iconContainer:["iconContainer",n&&"active",s&&"completed",a&&"error",i&&"disabled",p&&"alternativeLabel"],labelContainer:["labelContainer",p&&"alternativeLabel"]},qe,t)},Ve=b("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.orientation]]}})(({ownerState:e})=>c({display:"flex",alignItems:"center",[`&.${O.alternativeLabel}`]:{flexDirection:"column"},[`&.${O.disabled}`]:{cursor:"default"}},e.orientation==="vertical"&&{textAlign:"left",padding:"8px 0"})),Ge=b("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})(({theme:e})=>c({},e.typography.body2,{display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),[`&.${O.active}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${O.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${O.alternativeLabel}`]:{marginTop:16},[`&.${O.error}`]:{color:(e.vars||e).palette.error.main}})),Ye=b("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})(()=>({flexShrink:0,display:"flex",paddingRight:8,[`&.${O.alternativeLabel}`]:{paddingRight:0}})),Je=b("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>({width:"100%",color:(e.vars||e).palette.text.secondary,[`&.${O.alternativeLabel}`]:{textAlign:"center"}})),xe=l.exports.forwardRef(function(t,o){var n;const s=T({props:t,name:"MuiStepLabel"}),{children:a,className:i,componentsProps:p={},error:u=!1,icon:x,optional:g,slotProps:m={},StepIconComponent:h,StepIconProps:U}=s,k=I(s,He),{alternativeLabel:L,orientation:$}=l.exports.useContext(Z),{active:A,disabled:z,completed:w,icon:W}=l.exports.useContext(ae),B=x||W;let j=h;B&&!j&&(j=Oe);const D=c({},s,{active:A,alternativeLabel:L,completed:w,disabled:z,error:u,orientation:$}),P=Ke(D),d=(n=m.label)!=null?n:p.label;return f(Ve,c({className:M(P.root,i),ref:o,ownerState:D},k,{children:[B||j?r(Ye,{className:P.iconContainer,ownerState:D,children:r(j,c({completed:w,active:A,error:u,icon:B},U))}):null,f(Je,{className:P.labelContainer,ownerState:D,children:[a?r(Ge,c({ownerState:D},d,{className:M(P.label,d==null?void 0:d.className),children:a})):null,g]})]}))});xe.muiName="StepLabel";const Qe=xe;function Xe(e){return V("MuiStepConnector",e)}G("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);const Ze=["className"],et=e=>{const{classes:t,orientation:o,alternativeLabel:n,active:s,completed:a,disabled:i}=e,p={root:["root",o,n&&"alternativeLabel",s&&"active",a&&"completed",i&&"disabled"],line:["line",`line${N(o)}`]};return Y(p,Xe,t)},tt=b("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.orientation],o.alternativeLabel&&t.alternativeLabel,o.completed&&t.completed]}})(({ownerState:e})=>c({flex:"1 1 auto"},e.orientation==="vertical"&&{marginLeft:12},e.alternativeLabel&&{position:"absolute",top:8+4,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"})),ot=b("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.line,t[`line${N(o.orientation)}`]]}})(({ownerState:e,theme:t})=>{const o=t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600];return c({display:"block",borderColor:t.vars?t.vars.palette.StepConnector.border:o},e.orientation==="horizontal"&&{borderTopStyle:"solid",borderTopWidth:1},e.orientation==="vertical"&&{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24})}),nt=l.exports.forwardRef(function(t,o){const n=T({props:t,name:"MuiStepConnector"}),{className:s}=n,a=I(n,Ze),{alternativeLabel:i,orientation:p="horizontal"}=l.exports.useContext(Z),{active:u,disabled:x,completed:g}=l.exports.useContext(ae),m=c({},n,{alternativeLabel:i,orientation:p,active:u,completed:g,disabled:x}),h=et(m);return r(tt,c({className:M(h.root,s),ref:o,ownerState:m},a,{children:r(ot,{className:h.line,ownerState:m})}))}),rt=nt;function it(e){return V("MuiStepper",e)}G("MuiStepper",["root","horizontal","vertical","alternativeLabel"]);const st=["activeStep","alternativeLabel","children","className","component","connector","nonLinear","orientation"],at=e=>{const{orientation:t,alternativeLabel:o,classes:n}=e;return Y({root:["root",t,o&&"alternativeLabel"]},it,n)},lt=b("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.orientation],o.alternativeLabel&&t.alternativeLabel]}})(({ownerState:e})=>c({display:"flex"},e.orientation==="horizontal"&&{flexDirection:"row",alignItems:"center"},e.orientation==="vertical"&&{flexDirection:"column"},e.alternativeLabel&&{alignItems:"flex-start"})),ct=r(rt,{}),pt=l.exports.forwardRef(function(t,o){const n=T({props:t,name:"MuiStepper"}),{activeStep:s=0,alternativeLabel:a=!1,children:i,className:p,component:u="div",connector:x=ct,nonLinear:g=!1,orientation:m="horizontal"}=n,h=I(n,st),U=c({},n,{alternativeLabel:a,orientation:m,component:u}),k=at(U),L=l.exports.Children.toArray(i).filter(Boolean),$=L.map((z,w)=>l.exports.cloneElement(z,c({index:w,last:w+1===L.length},z.props))),A=l.exports.useMemo(()=>({activeStep:s,alternativeLabel:a,connector:x,nonLinear:g,orientation:m}),[s,a,x,g,m]);return r(Z.Provider,{value:A,children:r(lt,c({as:u,ownerState:U,className:M(k.root,p),ref:o},h,{children:$}))})}),dt=pt,ut=l.exports.createContext({}),X=ut;function mt(e){return H("MuiTimeline",e)}q("MuiTimeline",["root","positionLeft","positionRight","positionAlternate"]);const ft=["position","className"],vt=e=>{const{position:t,classes:o}=e,n={root:["root",t&&`position${N(t)}`]};return K(n,mt,o)},xt=b("ul",{name:"MuiTimeline",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.position&&t[`position${N(o.position)}`]]}})({display:"flex",flexDirection:"column",padding:"6px 16px",flexGrow:1}),gt=l.exports.forwardRef(function(t,o){const n=T({props:t,name:"MuiTimeline"}),{position:s="right",className:a}=n,i=I(n,ft),p=c({},n,{position:s}),u=vt(p);return r(X.Provider,{value:{position:s},children:r(xt,c({className:M(u.root,a),ownerState:p,ref:o},i))})}),bt=gt;function ht(e){return H("MuiTimelineConnector",e)}q("MuiTimelineConnector",["root"]);const Ct=["className"],St=e=>{const{classes:t}=e;return K({root:["root"]},ht,t)},yt=b("span",{name:"MuiTimelineConnector",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:2,backgroundColor:e.palette.grey[400],flexGrow:1})),Rt=l.exports.forwardRef(function(t,o){const n=T({props:t,name:"MuiTimelineConnector"}),{className:s}=n,a=I(n,Ct),i=n,p=St(i);return r(yt,c({className:M(p.root,s),ownerState:i,ref:o},a))}),$t=Rt;function Lt(e){return H("MuiTimelineContent",e)}const wt=q("MuiTimelineContent",["root","positionLeft","positionRight","positionAlternate"]),Mt=wt,Tt=["className"],It=e=>{const{position:t,classes:o}=e,n={root:["root",`position${N(t)}`]};return K(n,Lt,o)},Bt=b(S,{name:"MuiTimelineContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[`position${N(o.position)}`]]}})(({ownerState:e})=>c({flex:1,padding:"6px 16px",textAlign:"left"},e.position==="left"&&{textAlign:"right"})),Dt=l.exports.forwardRef(function(t,o){const n=T({props:t,name:"MuiTimelineContent"}),{className:s}=n,a=I(n,Tt),{position:i}=l.exports.useContext(X),p=c({},n,{position:i||"right"}),u=It(p);return r(Bt,c({component:"div",className:M(u.root,s),ownerState:p,ref:o},a))}),_t=Dt;function Nt(e){return H("MuiTimelineDot",e)}q("MuiTimelineDot",["root","filled","outlined","filledGrey","outlinedGrey","filledPrimary","outlinedPrimary","filledSecondary","outlinedSecondary"]);const kt=["className","color","variant"],At=e=>{const{color:t,variant:o,classes:n}=e,s={root:["root",o,t!=="inherit"&&`${o}${N(t)}`]};return K(s,Nt,n)},zt=b("span",{name:"MuiTimelineDot",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.color!=="inherit"&&`${o.variant}${N(o.color)}`],t[o.variant]]}})(({ownerState:e,theme:t})=>c({display:"flex",alignSelf:"baseline",borderStyle:"solid",borderWidth:2,padding:4,borderRadius:"50%",boxShadow:t.shadows[1],margin:"11.5px 0"},e.variant==="filled"&&c({borderColor:"transparent"},e.color!=="inherit"&&c({},e.color==="grey"?{color:t.palette.grey[50],backgroundColor:t.palette.grey[400]}:{color:t.palette[e.color].contrastText,backgroundColor:t.palette[e.color].main})),e.variant==="outlined"&&c({boxShadow:"none",backgroundColor:"transparent"},e.color!=="inherit"&&c({},e.color==="grey"?{borderColor:t.palette.grey[400]}:{borderColor:t.palette[e.color].main})))),Pt=l.exports.forwardRef(function(t,o){const n=T({props:t,name:"MuiTimelineDot"}),{className:s,color:a="grey",variant:i="filled"}=n,p=I(n,kt),u=c({},n,{color:a,variant:i}),x=At(u);return r(zt,c({className:M(x.root,s),ownerState:u,ref:o},p))}),Ut=Pt,Wt=q("MuiTimelineOppositeContent",["root","positionLeft","positionRight","positionAlternate"]),jt=Wt;function Ft(e){return H("MuiTimelineItem",e)}const Ot=q("MuiTimelineItem",["root","positionLeft","positionRight","positionAlternate","missingOppositeContent"]),qt=Ot,Et=["position","className"],Ht=e=>{const{position:t,classes:o,hasOppositeContent:n}=e,s={root:["root",`position${N(t)}`,!n&&"missingOppositeContent"]};return K(s,Ft,o)},Kt=b("li",{name:"MuiTimelineItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[`position${N(o.position)}`]]}})(({ownerState:e})=>c({listStyle:"none",display:"flex",position:"relative",minHeight:70},e.position==="left"&&{flexDirection:"row-reverse"},e.position==="alternate"&&{"&:nth-of-type(even)":{flexDirection:"row-reverse",[`& .${Mt.root}`]:{textAlign:"right"},[`& .${jt.root}`]:{textAlign:"left"}}},!e.hasOppositeContent&&{"&:before":{content:'""',flex:1,padding:"6px 16px"}})),Vt=l.exports.forwardRef(function(t,o){const n=T({props:t,name:"MuiTimelineItem"}),{position:s,className:a}=n,i=I(n,Et),{position:p}=l.exports.useContext(X);let u=!1;l.exports.Children.forEach(n.children,m=>{he(m,["TimelineOppositeContent"])&&(u=!0)});const x=c({},n,{position:s||p||"right",hasOppositeContent:u}),g=Ht(x);return r(X.Provider,{value:{position:x.position},children:r(Kt,c({className:M(g.root,a),ownerState:x,ref:o},i))})}),Gt=Vt;function Yt(e){return H("MuiTimelineSeparator",e)}q("MuiTimelineSeparator",["root"]);const Jt=["className"],Qt=e=>{const{classes:t}=e;return K({root:["root"]},Yt,t)},Xt=b("div",{name:"MuiTimelineSeparator",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",flex:0,alignItems:"center"}),Zt=l.exports.forwardRef(function(t,o){const n=T({props:t,name:"MuiTimelineSeparator"}),{className:s}=n,a=I(n,Jt),i=n,p=Qt(i);return r(Xt,c({className:M(p.root,s),ownerState:i,ref:o},a))}),eo=Zt;var le={},to=ie.exports;Object.defineProperty(le,"__esModule",{value:!0});var Q=le.default=void 0,oo=to(re()),no=se,ro=(0,oo.default)((0,no.jsx)("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"}),"InsertDriveFile");Q=le.default=ro;const io=b(ve)(({theme:e})=>({...e.typography.body2,padding:e.spacing(1),textAlign:"center",backgroundColor:"#919EAB29",color:"#637381",width:"fit-content",marginRight:"auto"})),so=b(ve)(({theme:e})=>({backgroundColor:e.palette.mode==="dark"?"#1A2027":"#fff",...e.typography.body2,padding:e.spacing(1),textAlign:"center",color:e.palette.text.secondary,width:"fit-content",marginLeft:"auto"}));function So({data:e}){const[t,o]=l.exports.useState(null),[n,s]=l.exports.useState(null);l.exports.useEffect(()=>{e&&e.data&&(o(e.data.timeline),s(e.data.request_files))},[e]);const a=l.exports.useRef(null),[i,p]=l.exports.useState([]),u=d=>{d.target.files[0]&&p([...i,...d.target.files])},x=(d,_)=>{p(d.filter((y,R)=>R!=_))},g=l.exports.useRef(null),[m,h]=l.exports.useState([]),U=d=>{d.target.files[0]&&h([...m,...d.target.files])},k=(d,_)=>{h(d.filter((y,R)=>R!=_))},L=l.exports.useRef(null),[$,A]=l.exports.useState([]),z=d=>{d.target.files[0]&&A([...$,...d.target.files])},w=(d,_)=>{A(d.filter((y,R)=>R!=_))},{id:W}=Ce(),[B,j]=l.exports.useState(!1),D=()=>{j(!0);const d=$e({fileDiagnosis:i,fileKondisis:m,fileResults:$});ye.post("claim-requests/"+W+"/request-files",d).then(_=>{window.location.reload()}).catch(({response:_})=>{var y;Re((y=_.data.message)!=null?y:"Something Went Wrong",{variant:"error"})})},P=n==null?void 0:n.find(d=>d.check_files===null);return r(de,{children:t==null?void 0:t.map((d,_)=>f(bt,{sx:{[`& .${qt.root}:before`]:{flex:0,padding:0}},children:[r(S,{variant:"body2",gutterBottom:!0,fontWeight:"bold",children:d.date?ue(new Date(d.date),"d MMM yyyy"):""}),f(Gt,{children:[f(eo,{children:[r(Ut,{}),r($t,{})]}),r(_t,{spacing:3,children:r(Le,{sx:{borderRadius:"6px",paddingY:2},children:f(C,{sx:{marginLeft:2,marginRight:2,marginTop:2},children:[f(C,{direction:"row",spacing:2,sx:{marginBottom:2,paddingBottom:2,borderBottom:"1px solid #919EAB52"},children:[r(io,{children:d.date?ue(new Date(d.date),"HH : mm"):""}),r(so,{sx:{backgroundColor:d.txt_status_backgroundColor,color:d.txt_status_color},children:d.txt_status})]}),f(C,{direction:"row",spacing:2,sx:{marginBottom:2},children:[r(S,{variant:"body2",gutterBottom:!0,children:"Detail:"}),r(S,{variant:"body2",gutterBottom:!0,children:d.description})]}),d.status==="reviewed"&&n?f(de,{children:[P?r(S,{variant:"body2",gutterBottom:!0,children:"Request Document"}):r(S,{sx:{color:"#19BBBB"},variant:"body2",gutterBottom:!0,children:"Request Document Success Uploaded"}),n==null?void 0:n.map((y,R)=>y.type!=="claim-diagnosis"||y.check_files!==null?null:f(C,{spacing:2,sx:{marginBottom:2},children:[r(S,{variant:"body2",gutterBottom:!0,fontWeight:"bold",children:"Diagnosis"}),r(C,{divider:r(ee,{orientation:"horizontal",flexItem:!0}),spacing:1,sx:{marginY:2},children:i&&i.map((v,F)=>f(C,{direction:"row",justifyContent:"space-between",children:[f(C,{direction:"row",spacing:1,sx:{color:"#19BBBB"},children:[r(Q,{}),r(S,{variant:"body2",gutterBottom:!0,children:v.name?v.name:"-"})]}),r(E,{icon:"eva:trash-2-outline",color:"darkred",onClick:()=>{x(i,F)},sx:{cursor:"pointer"}})]},F))}),f(te,{sx:{p:4,border:"2px dashed #F9FAFB",bgcolor:"#919EAB52",borderRadius:"8px",width:"100%",height:"60px"},onClick:()=>{var v;return(v=a.current)==null?void 0:v.click()},children:[f(J,{sx:{display:"flex",placeItems:"center",gap:1,placeContent:"center"},children:[r(E,{icon:"icon-park-outline:upload-one",fontSize:"3em"}),r(S,{variant:"body1",fontWeight:"bold",children:"Add Result"})]}),r("input",{type:"file",id:`file-${R}`,ref:a,style:{display:"none"},multiple:!0,onChange:v=>u(v),accept:".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, text/plain, application/pdf"})]})]},R)),n==null?void 0:n.map((y,R)=>y.type!=="claim-kondisi"||y.check_files!==null?null:f(C,{spacing:2,sx:{marginBottom:2},children:[r(S,{variant:"body2",gutterBottom:!0,fontWeight:"bold",children:"Condition"}),r(C,{divider:r(ee,{orientation:"horizontal",flexItem:!0}),spacing:1,sx:{marginY:2},children:m&&m.map((v,F)=>f(C,{direction:"row",justifyContent:"space-between",children:[f(C,{direction:"row",spacing:1,sx:{color:"#19BBBB"},children:[r(Q,{}),r(S,{variant:"body2",gutterBottom:!0,children:v.name?v.name:"-"})]}),r(E,{icon:"eva:trash-2-outline",color:"darkred",onClick:()=>{k(m,F)},sx:{cursor:"pointer"}})]},F))}),f(te,{sx:{p:4,border:"2px dashed #F9FAFB",bgcolor:"#919EAB52",borderRadius:"8px",width:"100%",height:"60px"},onClick:()=>{var v;return(v=g.current)==null?void 0:v.click()},children:[f(J,{sx:{display:"flex",placeItems:"center",gap:1,placeContent:"center"},children:[r(E,{icon:"icon-park-outline:upload-one",fontSize:"3em"}),r(S,{variant:"body1",fontWeight:"bold",children:"Add Result"})]}),r("input",{type:"file",id:`file-${R}`,ref:g,style:{display:"none"},multiple:!0,onChange:v=>U(v),accept:".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, text/plain, application/pdf"})]})]},R)),n==null?void 0:n.map((y,R)=>y.type!=="claim-result"||y.check_files!==null?null:f(C,{spacing:2,sx:{marginBottom:2},children:[r(S,{variant:"body2",gutterBottom:!0,fontWeight:"bold",children:"Supporting Result"}),r(C,{divider:r(ee,{orientation:"horizontal",flexItem:!0}),spacing:1,sx:{marginY:2},children:$&&$.map((v,F)=>f(C,{direction:"row",justifyContent:"space-between",children:[f(C,{direction:"row",spacing:1,sx:{color:"#19BBBB"},children:[r(Q,{}),r(S,{variant:"body2",gutterBottom:!0,children:v.name?v.name:"-"})]}),r(E,{icon:"eva:trash-2-outline",color:"darkred",onClick:()=>{w($,F)},sx:{cursor:"pointer"}})]},F))}),f(te,{sx:{p:4,border:"2px dashed #F9FAFB",bgcolor:"#919EAB52",borderRadius:"8px",width:"100%",height:"60px"},onClick:()=>{var v;return(v=L.current)==null?void 0:v.click()},children:[f(J,{sx:{display:"flex",placeItems:"center",gap:1,placeContent:"center"},children:[r(E,{icon:"icon-park-outline:upload-one",fontSize:"3em"}),r(S,{variant:"body1",fontWeight:"bold",children:"Add Result"})]}),r("input",{type:"file",id:`file-${R}`,ref:L,style:{display:"none"},multiple:!0,onChange:v=>z(v),accept:".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, text/plain, application/pdf"})]})]},R)),P?r(Se,{variant:"contained",sx:{marginTop:2,p:2,backgroundColor:"#19BBBB"},onClick:()=>{D()},loading:B,children:"Submit"}):""]}):""]})})})]})]},_))})}var ce={},ao=ie.exports;Object.defineProperty(ce,"__esModule",{value:!0});var ge=ce.default=void 0,lo=ao(re()),co=se,po=(0,lo.default)((0,co.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");ge=ce.default=po;const uo=["Request","Review","Approval","Decline"];function yo({data:e}){const[t,o]=l.exports.useState(0),[n,s]=l.exports.useState(null);let a=[...uo];return l.exports.useEffect(()=>{e&&e.data&&(e.data.status.status==="requested"?(o(1),a=a.filter(i=>i!=="Decline")):e.data.status.status==="reviewed"?(o(2),a=a.filter(i=>i!=="Decline")):e.data.status.status==="approved"?(o(3),a=a.filter(i=>i!=="Decline")):e.data.status.status==="declined"&&(o(4),a=a.filter(i=>i!=="Approval"))),s(a)},[e]),r(J,{sx:{width:"100%",marginBottom:2},children:r(dt,{activeStep:t,alternativeLabel:!0,children:n==null?void 0:n.map(i=>r(Ne,{children:r(Qe,{icon:i==="Decline"?r(ge,{sx:{color:"white",backgroundColor:"red",borderRadius:"50%"}}):"",children:i})},i))})})}var pe={},mo=ie.exports;Object.defineProperty(pe,"__esModule",{value:!0});var fo=pe.default=void 0,vo=mo(re()),xo=se,go=(0,vo.default)((0,xo.jsx)("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");fo=pe.default=go;export{yo as H,So as N,fo as d};
|