1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5835],{86738:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var l=n(39291),a=n(94184),r=n.n(a),s=n(21770),i=n(15105),o=n(67294),c=n(98423),d=n(53124),u=n(55241),m=n(96159),p=n(71577),x=n(87149),h=n(86743),f=n(74342),v=n(40378),g=n(81643),j=n(66330),y=n(67968);let b=e=>{let{componentCls:t,iconCls:n,zIndexPopup:l,colorText:a,colorWarning:r,marginXS:s,fontSize:i,fontWeightStrong:o,lineHeight:c}=e;return{[t]:{zIndex:l,[`${t}-inner-content`]:{color:a},[`${t}-message`]:{position:"relative",marginBottom:s,color:a,fontSize:i,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${n}`]:{color:r,fontSize:i,flex:"none",lineHeight:1,paddingTop:(Math.round(i*c)-i)/2},"&-title":{flex:"auto",marginInlineStart:s},"&-title-only":{fontWeight:o}},[`${t}-description`]:{position:"relative",marginInlineStart:i+s,marginBottom:s,color:a,fontSize:i},[`${t}-buttons`]:{textAlign:"end",button:{marginInlineStart:s}}}}};var Z=(0,y.Z)("Popconfirm",e=>b(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}}),k=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);a<l.length;a++)0>t.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(n[l[a]]=e[l[a]]);return n};let C=e=>{let{prefixCls:t,okButtonProps:n,cancelButtonProps:a,title:s,description:i,cancelText:c,okText:u,okType:m="primary",icon:j=o.createElement(l.Z,null),showCancel:y=!0,close:b,onConfirm:Z,onCancel:k}=e,{getPrefixCls:C}=o.useContext(d.E_);return o.createElement(f.Z,{componentName:"Popconfirm",defaultLocale:v.Z.Popconfirm},e=>o.createElement("div",{className:`${t}-inner-content`},o.createElement("div",{className:`${t}-message`},j&&o.createElement("span",{className:`${t}-message-icon`},j),o.createElement("div",{className:r()(`${t}-message-title`,{[`${t}-message-title-only`]:!!i})},(0,g.Z)(s))),i&&o.createElement("div",{className:`${t}-description`},(0,g.Z)(i)),o.createElement("div",{className:`${t}-buttons`},y&&o.createElement(p.ZP,Object.assign({onClick:k,size:"small"},a),null!=c?c:e.cancelText),o.createElement(h.Z,{buttonProps:Object.assign(Object.assign({size:"small"},(0,x.n)(m)),n),actionFn:Z,close:b,prefixCls:C("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},null!=u?u:e.okText))))};var N=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);a<l.length;a++)0>t.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(n[l[a]]=e[l[a]]);return n};let S=o.forwardRef((e,t)=>{let{getPrefixCls:n}=o.useContext(d.E_),[a,p]=(0,s.Z)(!1,{value:e.open,defaultValue:e.defaultOpen}),x=(t,n)=>{var l;p(t,!0),null===(l=e.onOpenChange)||void 0===l||l.call(e,t,n)},h=e=>{x(!1,e)},f=t=>{var n;return null===(n=e.onConfirm)||void 0===n?void 0:n.call(void 0,t)},v=t=>{var n;x(!1,t),null===(n=e.onCancel)||void 0===n||n.call(void 0,t)},g=e=>{e.keyCode===i.Z.ESC&&a&&x(!1,e)},j=t=>{let{disabled:n=!1}=e;n||x(t)},{prefixCls:y,placement:b="top",trigger:k="click",okType:S="primary",icon:w=o.createElement(l.Z,null),children:O,overlayClassName:P}=e,E=N(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName"]),T=n("popconfirm",y),$=r()(T,P),[_]=Z(T);return _(o.createElement(u.Z,Object.assign({},(0,c.Z)(E,["title"]),{trigger:k,placement:b,onOpenChange:j,open:a,ref:t,overlayClassName:$,content:o.createElement(C,Object.assign({okType:S,icon:w},e,{prefixCls:T,close:h,onConfirm:f,onCancel:v})),"data-popover-inject":!0}),(0,m.Tm)(O,{onKeyDown(e){var t,n;o.isValidElement(O)&&(null===(n=null==O?void 0:(t=O.props).onKeyDown)||void 0===n||n.call(t,e)),g(e)}})))});S._InternalPanelDoNotUseOrYouWillBeFired=function(e){let{prefixCls:t,placement:n,className:l,style:a}=e,s=k(e,["prefixCls","placement","className","style"]),{getPrefixCls:i}=o.useContext(d.E_),c=i("popconfirm",t),[u]=Z(c);return u(o.createElement(j.ZP,{placement:n,className:r()(c,l),style:a,content:o.createElement(C,Object.assign({prefixCls:c},s))}))};var w=S},51904:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var l=n(85846),a=n(94184),r=n.n(a),s=n(67294),i=n(53124),o=n(98787),c=n(45353),d=n(67968),u=n(45503),m=n(63443),p=n(14747);let x=(e,t,n)=>{let l=function(e){if("string"!=typeof e)return e;let t=e.charAt(0).toUpperCase()+e.slice(1);return t}(n);return{[`${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${l}Bg`],borderColor:e[`color${l}Border`]}}},h=e=>(0,m.j)(e,(t,n)=>{let{textColor:l,lightBorderColor:a,lightColor:r,darkColor:s}=n;return{[`${e.componentCls}-${t}`]:{color:l,background:r,borderColor:a,"&-inverse":{color:e.colorTextLightSolid,background:s,borderColor:s}}}}),f=e=>{let{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:l,componentCls:a}
1=e,r=l-n;return{[a]:Object.assign(Object.assign({},(0,p.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:r,fontSize:e.tagFontSize,lineHeight:`${e.tagLineHeight}px`,whiteSpace:"nowrap",background:e.tagDefaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",[`&${a}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.tagDefaultColor},[`${a}-close-icon`]:{marginInlineStart:t-n,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${a}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${a}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:r}})}};var v=(0,d.Z)("Tag",e=>{let{fontSize:t,lineHeight:n,lineWidth:l,fontSizeIcon:a}=e,r=e.fontSizeSM,s=e.colorFillAlter,i=e.colorText,o=(0,u.TS)(e,{tagFontSize:r,tagLineHeight:Math.round(t*n)-2*l,tagDefaultBg:s,tagDefaultColor:i,tagIconSize:a-2*l,tagPaddingHorizontal:8});return[f(o),h(o),x(o,"success","Success"),x(o,"processing","Info"),x(o,"error","Error"),x(o,"warning","Warning")]}),g=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);a<l.length;a++)0>t.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(n[l[a]]=e[l[a]]);return n};let j=e=>{var{prefixCls:t,className:n,checked:l,onChange:a,onClick:o}=e,c=g(e,["prefixCls","className","checked","onChange","onClick"]);let{getPrefixCls:d}=s.useContext(i.E_),u=e=>{null==a||a(!l),null==o||o(e)},m=d("tag",t),[p,x]=v(m),h=r()(m,{[`${m}-checkable`]:!0,[`${m}-checkable-checked`]:l},n,x);return p(s.createElement("span",Object.assign({},c,{className:h,onClick:u})))};var y=function(e,t){var n={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(n[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,l=Object.getOwnPropertySymbols(e);a<l.length;a++)0>t.indexOf(l[a])&&Object.prototype.propertyIsEnumerable.call(e,l[a])&&(n[l[a]]=e[l[a]]);return n};let b=(e,t)=>{var{prefixCls:n,className:a,rootClassName:d,style:u,children:m,icon:p,color:x,onClose:h,closeIcon:f,closable:g=!1}=e,j=y(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable"]);let{getPrefixCls:b,direction:Z}=s.useContext(i.E_),[k,C]=s.useState(!0);s.useEffect(()=>{"visible"in j&&C(j.visible)},[j.visible]);let N=(0,o.o2)(x)||(0,o.yT)(x),S=Object.assign({backgroundColor:x&&!N?x:void 0},u),w=b("tag",n),[O,P]=v(w),E=r()(w,{[`${w}-${x}`]:N,[`${w}-has-color`]:x&&!N,[`${w}-hidden`]:!k,[`${w}-rtl`]:"rtl"===Z},a,d,P),T=e=>{e.stopPropagation(),null==h||h(e),e.defaultPrevented||C(!1)},$="function"==typeof j.onClick||m&&"a"===m.type,_=p||null,A=_?s.createElement(s.Fragment,null,_,s.createElement("span",null,m)):m,I=s.createElement("span",Object.assign({},j,{ref:t,className:E,style:S}),A,g?f?s.createElement("span",{className:`${w}-close-icon`,onClick:T},f):s.createElement(l.Z,{className:`${w}-close-icon`,onClick:T}):null);return O($?s.createElement(c.Z,null,I):I)},Z=s.forwardRef(b);Z.CheckableTag=j;var k=Z},62474:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/claim",function(){return n(14274)}])},23284:function(e,t,n){"use strict";var l=n(85893),a=n(83473),r=n(87547),s=n(98293),i=n(55687),o=n.n(i);let c=e=>{let{label:t}=e,n=t?o()(t):null;return(0,l.jsx)(s.C,{style:n&&{backgroundColor:n},icon:!t&&(0,l.jsx)(r.Z,{}),...e,children:t&&(0,a.qK)(t)})};t.Z=c},70850:function(e,t,n){"use strict";var l=n(85893),a=n(28611),r=n(27484),s=n.n(r);let i=e=>{let{value:t,onChange:n,style:r={},className:i=""}=e,o=[{label:"Yesterday",value:[s()().add(-1,"d"),s()().add(-1,"d")]},{label:"Today",value:[s()(),s()()]},{label:"This Month",value:[s()().startOf("month"),s()()]},{label:"Last Month",value:[s()().add(-1,"month").startOf("month"),s()().add(-1,"month").endOf("month")]},{label:"Last 7 Days",value:[s()().add(-7,"d"),s()()]},{label:"Last 14 Days",value:[s()().add(-14,"d"),s()()]},{label:"Last 30 Days",value:[s()().add(-30,"d"),s()()]},{label:"Last 90 Days",value:[s()().add(-90,"d"),s()()]}];return(0,l.jsx)(a.Z.RangePicker,{className:i,style:r,value:t,onChange:n,presets:o})};t.Z=i},10635:function(e,t,n){"use strict";var l=n(85893),a=n(83473),r=n(62616),s=n(34041),i=n(25675),o=n.n(i),c=n(67294);let d=e=>{let{showAll:t=!0,value:n,onChange:i,placeholder:d="Pilih Kurir",additional:u=[],style:m={}
1,className:p=""}=e,[x,h]=(0,c.useState)(""),[f,v]=(0,c.useState)(""),g=e=>{h(e),i(e)};return(0,c.useEffect)(()=>{let e=(0,r.cY)();v(e)},[]),(0,c.useEffect)(()=>{h(n)},[n]),(0,l.jsx)(s.Z,{style:m,className:p,value:x,onChange:g,dropdownMatchSelectWidth:!1,placeholder:d,options:(()=>{let e=(0,a.V$)(),n=[];if(t&&n.push({value:"",label:(0,l.jsx)(l.Fragment,{children:"Semua Kurir"})}),u&&u.length)for(let r of u)n.push(r);for(let s of e)["Jibril","Mikail"].includes(f)&&s.onlyAdmin&&(s.hide=!1),s.hide||n.push({value:s.code,label:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(o(),{className:"my-auto",src:s.icon||s.image,height:24,width:24}),s.name]})});return n})()})};t.Z=d},73603:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var l=n(85893),a=n(7851);n(83473),n(53649);var r=n(67294);n(27484);var s=n(52152),i=n(82356),o=n(58687),c=n(50888),d=n(57953);let u=e=>{let{chat:t,user:n}=e,[u,m]=(0,r.useState)(!1),[p,x]=(0,r.useState)([]),h=e=>{m(!0),a.api.get("/api/ticket/".concat(e,"/reply")).then(e=>{let{data:t}=e.data;x(t),m(!1)}).catch(()=>{})};return(0,r.useEffect)(()=>{h(t.id||t._id)},[t]),(0,l.jsxs)("div",{children:[(0,l.jsx)(i.Z,{user:n,data:t}),(0,l.jsxs)("div",{className:"grow p-4 flex flex-col-reverse scroll-smooth overflow-auto",children:[u&&(0,l.jsx)("div",{className:"mx-auto",children:(0,l.jsx)(d.Z,{indicator:(0,l.jsx)(c.Z,{style:{fontSize:36},spin:!0})})}),p.map(e=>(0,l.jsx)(s.Z,{data:e,chat:t},e.id))]}),(0,l.jsx)("div",{className:"flex-none",children:(0,l.jsx)(o.Z,{user:n,loadMessages:h,chat:t})})]})};var m=u},82356:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var l=n(85893),a=n(83473),r=n(7851),s=n(48702),i=n(82826),o=n(63606),c=n(88360),d=n(51904),u=n(86738),m=n(71577),p=n(67294),x=n(24969),h=n(4310),f=n(23284),v=function(e){let{data:t,onSave:n}=e,{assigned:a}=t,[s,i]=(0,p.useState)([]),[o,c]=(0,p.useState)(!1),d=e=>{r.api.post("/api/ticket/".concat(t.id||t._id,"/assign"),{user:e}).then(e=>{let{data:t}=e;"function"==typeof n&&n()})},v=async e=>{let t=[];for(let n of(c(!0),e)){let l=await r.api.get("/api/support-team/".concat(n,"/users")).then(e=>{let{data:t}=e;return t.data}).catch(e=>[]);t=[...t,...l]}c(!1),i(t)};return(0,p.useEffect)(()=>{let e=[];for(let n of t.assigned){let{team:l}=n;"External"==l.type&&e.push(l.id||l._id)}v(e)},[t]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"mb-3 border-b border-slate-200 bg-white",children:a.map(e=>{let{user:t,team:n}=e;return(0,l.jsxs)("div",{className:"flex",children:[(0,l.jsx)(f.Z,{className:"mb-2 mr-2",label:t.name,src:t.avatar}),(0,l.jsxs)("div",{children:[t.name," - ",t.email]})]})})}),(0,l.jsx)("div",{className:"mt-3",children:(0,l.jsx)(h.Z,{loading:o,children:s.map(e=>{let{user:t}=e;return(0,l.jsxs)("div",{className:"flex",children:[(0,l.jsx)(f.Z,{className:"flex-none mb-2 mr-2",label:t.name,src:t.avatar}),(0,l.jsxs)("div",{className:"flex-auto",children:[t.name," - ",t.email]}),(0,l.jsx)(u.Z,{onConfirm:()=>d(t.id||t._id),title:"Yakin ingin menambahkan user ini?",okText:"Ya, Tambahkan",cancelText:"Batal",okType:"danger",children:(0,l.jsx)(m.ZP,{className:"flex-none",size:"small",type:"primary",ghost:!0,icon:(0,l.jsx)(x.Z,{}),children:"Assign"})})]})})})})]})},g=n(62616),j=function(e){var t;let{data:n,screens:x,setCollapsed:h,collapsed:f,user:j,setChat:y}=e,{order:b}=n,Z=(0,p.useContext)(s.Z),k=Z.showModal,[C,N]=(0,p.useState)("Closed"==n.status),S=()=>{let{destroy:e,update:t}=k();
1t({title:"Assign User",closable:!0,width:"50%",content:(0,l.jsx)(v,{data:n,onSave(){e()}}),icon:null,style:{top:80,minWidth:400},maskClosable:!1,okButtonProps:{style:{display:"none"}},onCancel(){e()}})},w=()=>{r.api.post("/api/ticket/".concat(n.id||n._id,"/close"),{}).then(e=>{let{data:t}=e;N(!0),"function"==typeof y&&y(e=>({...e,status:"Closed"}))})};return(0,p.useEffect)(()=>{N("Closed"==n.status)},[n]),(0,l.jsx)("div",{className:"p-4 border-b border-slate-200 bg-white",children:(0,l.jsxs)("div",{className:"flex flex-wrap",children:[(0,l.jsxs)("div",{className:"flex-auto flex",children:[(0,l.jsx)(i.Z,{className:"flex-none mr-5 sm:hidden",onClick(){x.xs&&h(!f)}}),(0,l.jsxs)("div",{className:"flex-auto my-auto",children:[(0,l.jsxs)("h3",{children:[null==n?void 0:n.title," ",(0,l.jsx)(d.Z,{className:"ml-3",color:{Open:"yellow","On Progress":"blue","Need Reply":"orange",Closed:"green",Reopen:"purple"}[n.status],children:{Open:"Tiket Baru","On Progress":"Sedang Ditangani","Need Reply":"Butuh Balasan",Closed:"Selesai",Reopen:"Reopen"}[n.status]})," "]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("span",{className:"text-gray-400",children:[{lost:"Seputar Paket Hilang",broken:"Seputar Paket Rusak",shipment:"Seputar Pengiriman",cod:"Seputar COD",courier:"Seputar Kurir","no update":"Kiriman tidak ada update","request resend":"Permintaan kirim ulang","update status":"Update status kiriman","request self pickup":"Permintaan diambil sendiri","request return":"Permintaan return kiriman",claim:"Claim Kiriman",other:"Kendala lainnya",pickup:"Kendala Pick Up"}[null==n?void 0:n.category]," - "]}),(0,a.P$)(null==b?void 0:b.courier)," ",null==b?void 0:b.courier_type]})]})]}),(0,l.jsx)("div",{className:"flex-none ml-auto",children:(0,l.jsxs)("div",{className:"sm:mt-0 mt-2 flex sm:flex-col flex-row",children:[(0,l.jsx)(u.Z,{onConfirm:w,title:"Yakin ingin menutup ticket ini?",okText:"Ya, Saya Yakin",cancelText:"Batal",okType:"danger",children:(0,l.jsx)(m.ZP,{type:"primary",ghost:!C,icon:(0,l.jsx)(o.Z,{}),className:"mb-0 sm:mb-1 mr-1 sm:mr-0 ".concat(C&&"bg-green-400"),children:C?"Closed":"Mark as Closed"})}),!C&&(["Jibril","Mikail"].includes((0,g.cY)())||(null===(t=j.section)||void 0===t?void 0:t.toLowerCase())=="internal")&&(0,l.jsx)(m.ZP,{onClick:S,type:"primary",block:!0,icon:(0,l.jsx)(c.Z,{}),children:"Assign To"})]})})]})})}},52152:function(e,t,n){"use strict";var l=n(85893),a=n(23430),r=n(71577),s=n(23284),i=n(30381),o=n.n(i);n(7851),t.Z=function(e){let{data:t,chat:n}=e,{message:i,user:c,createdAt:d,files:u}=t,{assigned:m}=n,p=o()(d).format("DD MMM HH:mm"),x="",h=(null==c?void 0:c.id)||(null==c?void 0:c._id);if(h&&Array.isArray(m)){let f=m.find(e=>{var t,n;return((null===(t=e.user)||void 0===t?void 0:t.id)||(null===(n=e.user)||void 0===n?void 0:n._id))==h});if(f){var v;x=null===(v=f.team)||void 0===v?void 0:v.name}}let g=e=>{window.open("https://assets.lincah.id/".concat(e))};return(0,l.jsxs)("div",{className:"items-end",children:["message"==t.type&&(0,l.jsxs)("div",{className:"flex border-b border-slate-200 py-5 max-w-full",children:[(0,l.jsx)("div",{className:"flex-none mr-3",children:(0,l.jsx)(s.Z,{src:c.avatar,size:"large",label:c.name})}),(0,l.jsxs)("div",{className:"my-auto flex-auto",children:[(0,l.jsxs)("p",{className:"mb-0 flex",children:[(0,l.jsxs)("div",{className:"flex-auto",children:[c.name," ",x&&"- ".concat(x)]}),(0,l.jsx)("div",{className:"flex-none text-gray-400 text-sm",children:p})]}),(0,l.jsx)("p",{className:"mb-0 text-sm text-gray-500 whitespace-pre-wrap break-words overflow-hidden",children:i}),(0,l.jsx)("div",{className:"flex flex-wrap mt-1",children:u.map((e,t)=>(0,l.jsxs)(r.ZP,{onClick:()=>g(e),size:"small",icon:(0,l.jsx)(a.Z,{}),children:["Attachment ",t+1]}))})]})]}),"reopen"==t.type&&(0,l.jsx)("div",{className:"flex border-b border-slate-200 py-2 text-gray-500",children:(0,l.jsxs)("div",{className:"mx-auto text-center text-sm",children:[c.name,x&&" - ".concat(x),' membuka ulang tiket "',t.message,'" - ',p]})}),"closed"==t.type&&(0,l.jsx)("div",{className:"flex border-b border-slate-200 py-2 text-gray-500",children:(0,l.jsxs)("div",{className:"mx-auto text-center text-sm",children:[c.name,x&&" - ".concat(x)," menutup tiket - ",p]})}),"call_external"==t.type&&(0,l.jsx)("div",{className:"flex border-b border-slate-200 py-2 text-gray-500",children:(0,l.jsxs)("div",{className:"mx-auto text-center text-sm",children:[c.name,x&&" - ".concat(x)," memanggil pihak ekpedisi"]})})]})}},58687:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var l=n(85893),a=n(83473),r=n(62616),s=n(7851),i=n(48702),o=n(5392),c=n(28548),d=n(11486),u=n(71577),m=n(45036),p=n(86738),x=n(99138),h=n(67294),f=n(92477),v=n(26855),g=n(71230),j=n(15746),y=function(e){let{destroy:t,id:n,refresh:a,loadMessages:r}=e,[i]=f.Z.useForm(),[o,c]=(0,h.useState)(!1),[m,p]=(0,h.useState)(!1);return(0,l.jsxs)(f.Z,{form:i,initialValues:{order:null,title:null,category:null,priority:"Medium",other_problem:null,problem:null,files:null},layout:"vertical",onFinish:function(){i.validateFields().then(e=>{c(!0),s.api.post("/api/ticket/".concat(n,"/reopen"),e).then(e=>{c(!1),v.Z.success({message:"Tiket Berhasil Dibuka ulang"}),"function"==typeof a&&a(),"function"==typeof t&&t(),"function"==typeof r&&r()}).catch(e=>{c(!1)})})},children:[(0,l.jsx)(g.Z,{gutter:8,children:(0,l.jsx)(j.Z,{xs:24,children:(0,l.jsx)(f.Z.Item,{name:"message",label:"Alasan Buka Ulang Tiket",rules:[{required:!0,message:"${label} harus diisi"}],children:(0,l.jsx)(d.Z.TextArea,{placeholder:"Tulis Alasan Buka Ulang Tiket"})})})}),(0,l.jsx)("div",{className:"modal-form-button",children:(0,l.jsx)(u.ZP,{type:"primary",disabled:m,loading:o,htmlType:"submit",children:"Buka Ulang Ticket"})})]})},b=function(e){var t;let{loadMessages:n,chat:f,user:v}=e,g=(0,h.useRef)(null),j=(0,h.useRef)(null),[b,Z]=(0,h.useState)(""),[k,C]=(0,h.useState)([]),[N,S]=(0,h.useState)(!1),w=(0,h.useContext)(i.Z),O=w.showModal,P=()=>{let{fileList:e}=j.current,t=[];if(e&&e.length)for(let l of e)l.response.success&&t.push(l.response.name);S(!0),s.api.post("".concat(a.v2,"/api/ticket/").concat(f.id||f._id,"/reply"),{message:b,files:t}).then(e=>{n(f.id||f._id),S(!1),C([]),Z("")}).catch(e=>{S(!1)})},E=e=>{};(0,h.useEffect)(()=>{var e;
1null===(e=g.current)||void 0===e||e.focus({cursor:"end"})},[]);let T={name:"file",action:"".concat(a.v2,"/api/upload"),headers:{"x-access-token":(0,s.getAccessToken)()},onChange(e){let{file:t,fileList:n}=e;C(n)}},$=()=>{S(!0),s.api.get("".concat(a.v2,"/api/ticket/").concat(f.id||f._id,"/call/ekspedisi")).then(e=>{f.status="Need Reply",n(f.id||f._id),S(!1)}).catch(e=>{S(!1)})};return"Closed"!=f.status?(0,l.jsx)("div",{className:"min-w-0 p-2",children:(0,l.jsx)("div",{className:"relative",children:(0,l.jsxs)("div",{className:"overflow-hidden bg-white rounded-lg border border-gray-200 shadow-sm p-4",children:[(0,l.jsxs)("div",{className:"flex",children:[(0,l.jsx)(d.Z.TextArea,{disabled:N,className:"flex-auto p-0",onKeyDown:E,ref:g,value:b,onChange:e=>Z(e.target.value),autoSize:{minRows:1,maxRows:3},placeholder:"Balas Pesan . . .",rows:1,bordered:!1,style:{resize:"none"}}),(0,l.jsx)(u.ZP,{loading:N,onClick:P,type:"primary",className:"mr-2 flex-none justify-between ".concat(!b.length&&"hidden"),children:"Kirim"})]}),(0,l.jsxs)("div",{className:"mt-2 flex",children:[(0,l.jsx)(m.Z,{className:"flex-auto",disabled:N,fileList:k,ref:j,...T,children:(0,l.jsxs)("div",{className:"cursor-pointer pr-2 text-sm",children:[(0,l.jsx)(o.Z,{})," Add Attachment"]})}),(null===(t=v.section)||void 0===t?void 0:t.toLowerCase())=="internal"&&"On Progress"==f.status&&(0,l.jsx)("div",{className:"mx-2 flex-none",children:(0,l.jsx)(p.Z,{onConfirm:$,title:"Panggil Ekspedisi?",description:"Minta jawaban eksepedisi",children:(0,l.jsxs)(u.ZP,{size:"small",className:"text-sm",children:[(0,l.jsx)(c.Z,{})," Panggil Ekspedisi"]})})})]})]})})}):(0,l.jsxs)("div",{className:"min-w-0 px-4 pb-8",children:[(0,l.jsx)(x.Z,{message:"Tiket sudah selesai/ditutup"}),["Member","MemberAdmin","CSShipper","CS","SubAkun"].includes((0,r.cY)())&&(0,l.jsx)("div",{className:"pt-4",children:(0,l.jsx)(u.ZP,{onClick:function(){let{destroy:e,update:t}=O();t({title:"Bantuan Pickup",closable:!0,width:700,content:(0,l.jsx)(y,{id:f.id||f._id,destroy:e,loadMessages:n,refresh(){f.status="Reopen"}}),icon:null,maskClosable:!0,okButtonProps:{style:{display:"none"}}})},type:"dashed",danger:!0,block:!0,children:"Buka Ulang Tiket"})})]})}},14274:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return _}});var l=n(85893),a=n(67294),r=n(9008),s=n.n(r),i=n(11486),o=n(28611),c=n(92477),d=n(26713),u=n(71577),m=n(73016),p=n(53575),x=n(71230),h=n(15746),f=n(4393),v=n(34041),g=n(76920),j=n(27484),y=n.n(j),b=n(59734),Z=n(83473),k=n(44689),C=n(22172);n(7851);var N=n(10635),S=n(48702),w=n(73603),O=n(70850);let{Search:P}=i.Z,{RangePicker:E}=o.Z;var T=function(){let{session:e,couriers:t}=(0,a.useContext)(k.Z);(0,a.useContext)(C.Z).showNotification;let n=(0,a.useContext)(S.Z),r=n.showModal,{user:s}=e,[i]=c.Z.useForm(),o={claimAt:[y()().subtract(1,"month"),y()()],solution:"",courier:"",search:""},[j,E]=(0,a.useState)(o),[T,$]=(0,a.useState)({current:1,total:0,pageSize:10,position:["bottomRight"]}),[_,A]=(0,a.useState)([]),{data:I,mutate:z,error:R}=(0,b.ZP)(["".concat(Z.v2,"/api/claim?search=").concat(JSON.stringify(j),"¤t=").concat(T.current,"&pageSize=").concat(T.pageSize),null==e?void 0:e.accessToken],Z._i);return(0,a.useEffect)(()=>{I&&(A(null==I?void 0:I.data),$(e=>({...e,total:null==I?void 0:I.total})))},[I]),(0,l.jsx)(x.Z,{gutter:[16,16],children:(0,l.jsx)(h.Z,{span:24,children:(0,l.jsx)(f.Z,{title:"Claim",style:{width:"100%"},children:(0,l.jsxs)(x.Z,{gutter:[16,16],children:[(0,l.jsx)(h.Z,{span:24,children:(0,l.jsx)(c.Z,{form:i,initialValues:o,onValuesChange:function(e){let t=i.getFieldsValue();e.search?setTimeout(()=>{let e=i.getFieldsValue();E(e)},1e3):E(t)},children:(0,l.jsxs)(x.Z,{justify:"space-between",gutter:[16,16],align:"middle",children:[(0,l.jsx)(h.Z,{xs:24,lg:12,children:(0,l.jsxs)(x.Z,{gutter:[16,16],align:"middle",children:[(0,l.jsx)(h.Z,{xs:24,lg:12,children:(0,l.jsx)(c.Z.Item,{noStyle:!0,name:"claimAt",children:(0,l.jsx)(O.Z,{})})}),(0,l.jsx)(h.Z,{xs:24,lg:6,children:(0,l.jsx)(c.Z.Item,{noStyle:!0,name:"courier",children:(0,l.jsx)(N.Z,{})})}),(0,l.jsx)(h.Z,{xs:24,lg:6,children:(0,l.jsx)(c.Z.Item,{noStyle:!0,name:"status",children:(0,l.jsxs)(v.Z,{placeholder:"Semua Status",style:{width:"100%"},children:[(0,l.jsx)(v.Z.Option,{value:"",children:"Semua Status"}),(0,l.jsx)(v.Z.Option,{value:"Diajukan",children:"Diajukan"}),(0,l.jsx)(v.Z.Option,{value:"On Progress",children:"On Progress"}),(0,l.jsx)(v.Z.Option,{value:"Approved",children:"Approved"}),(0,l.jsx)(v.Z.Option,{value:"Rejected",children:"Rejected"})]})})})]})}),(0,l.jsx)(h.Z,{xs:24,lg:6,children:(0,l.jsx)(c.Z.Item,{name:"search",children:(0,l.jsx)(P,{placeholder:"Cari No. Order/Resi",enterButton:!0})})})]})})}),(0,l.jsx)(h.Z,{span:24,children:(0,l.jsx)(g.Z,{rowKey:e=>e.id,columns:[{title:"No. Order",dataIndex:"no_order",render(e,t){var n,r,s;return(0,l.jsx)(a.Fragment,{children:(0,l.jsxs)(d.Z,{direction:"vertical",size:0,children:[(0,l.jsx)(u.ZP,{type:"link",style:{padding:0},children:(null==t?void 0:null===(n=t.order)||void 0===n?void 0:n.no_order)||""}),(0,l.jsxs)(m.Z.Text,{copyable:{text:(null==t?void 0:null===(r=t.order)||void 0===r?void 0:r.resi)||""},className:"text-xs text-[#8D99AE]",children:[(0,l.jsx)("span",{children:"No. Resi: "})," ",(null==t?void 0:null===(s=t.order)||void 0===s?void 0:s.resi)||""]})]})})}},{title:"Claim Note",dataIndex:"note",key:"note"},{title:"Kurir",dataIndex:"order",render(e,t){var n;return(0,l.jsx)(a.Fragment,{children:(0,l.jsx)(d.Z,{direction:"vertical",size:0,children:(0,l.jsx)(m.Z.Text,{className:"whitespace-nowrap",children:(null==t?void 0:null===(n=t.order)||void 0===n?void 0:n.courier.toUpperCase())||null})})})}},{title:"Status Terakhir",dataIndex:"order",render(e,t){var n,r;return(0,l.jsx)(a.Fragment,{children:(0,l.jsxs)(d.Z,{direction:"vertical",size:0,children:[(0,l.jsx)(m.Z.Text,{children:(null==t?void 0:null===(n=t.order)||void 0===n?void 0:n.lastStatus)||null}),(0,l.jsx)(m.Z.Text,{style:{color:"#8D99AE",fontSize:12},className:"whitespace-nowrap",children:(0,Z.vc)(null==t?void 0:null===(r=t.order)||void 0===r?void 0:r.lastUpdate)||null})]})})}}
1,{title:"Nilai Claim",dataIndex:"amount",key:"amount",render:(e,t)=>(0,l.jsx)(a.Fragment,{children:(0,l.jsx)(d.Z,{direction:"vertical",size:0,className:"whitespace-nowrap",children:(0,l.jsx)(m.Z.Text,{children:(0,Z.OH)(e)||null})})})},{title:"Status",dataIndex:"status",key:"status",render(e,t){let n="Approved"===e?(0,l.jsx)(p.Z,{status:"success",text:"Approved"}):"On Progress"===e?(0,l.jsx)(p.Z,{status:"warning",text:"On Progress"}):"Rejected"===e?(0,l.jsx)(p.Z,{status:"error",text:"Rejected"}):e;return(0,l.jsx)(d.Z,{direction:"vertical",size:0,className:"whitespace-nowrap",children:(0,l.jsx)(m.Z.Text,{children:n||null})})}},{title:"Action",dataIndex:"id",render:(e,t)=>(0,l.jsx)(d.Z,{direction:"horizontal",size:16,children:(0,l.jsx)(u.ZP,{type:"link",onClick:()=>(function(e){let{destroy:t,update:n}=r();n({title:"Lihat Tiket",closable:!0,width:700,content:(0,l.jsx)(w.Z,{user:s,chat:e}),icon:null,maskClosable:!0,okButtonProps:{style:{display:"none"}}})})(t.ticket),className:"p-0",children:"Lihat Tiket"})})}],loading:!I&&!R,pagination:T,dataSource:_,onChange:function(e){$(t=>({...t,current:e.current}))}})})]})})})})};function $(){return(0,l.jsxs)(a.Fragment,{children:[(0,l.jsxs)(s(),{children:[(0,l.jsx)("title",{children:"Claim"}),(0,l.jsx)("meta",{name:"Claim",content:"Claim Lincah.id"})]}),(0,l.jsx)("main",{children:(0,l.jsx)(T,{})})]})}$.layout="main";var _=$}},function(e){e.O(0,[8925,9160,9801,2185,95,4310,4393,2808,5742,4533,6920,8611,8463,24,3649,9774,2888,179],function(){return e(e.s=62474)}),_N_E=e.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.