1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0cd3da2d-bbc7-4363-9025-679caf70b9e4",e._sentryDebugIdIdentifier="sentry-dbid-0cd3da2d-bbc7-4363-9025-679caf70b9e4")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7887,9037],{61597:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/product/unit-category",function(){return a(71134)}])},19360:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var s=a(74848);let l=()=>{let e=["","","",""];return(0,s.jsx)("div",{className:"overflow-auto",children:(0,s.jsxs)("table",{className:"table-auto w-full text-left mt-6",children:[(0,s.jsx)("thead",{className:"animate-pulse",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"px-4 py-3 text-sm text-gray-600 border-b-[3px]",children:(0,s.jsx)("div",{className:"w-20 h-4 bg-gray-200 rounded mx-auto"})}),(0,s.jsx)("th",{className:"px-4 py-3 text-sm text-gray-600 border-b-[3px]",children:(0,s.jsx)("div",{className:"w-20 h-4 bg-gray-200 rounded mx-auto"})}),(0,s.jsx)("th",{className:"px-4 py-3 text-sm text-gray-600 border-b-[3px]",children:(0,s.jsx)("div",{className:"w-20 h-4 bg-gray-200 rounded mx-auto"})}),(0,s.jsx)("th",{className:"px-4 py-3 text-sm text-gray-600 border-b-[3px]",children:(0,s.jsx)("div",{className:"w-20 h-4 bg-gray-200 rounded mx-auto"})}),(0,s.jsx)("th",{className:"px-4 py-3 text-sm text-gray-600 border-b-[3px]",children:(0,s.jsx)("div",{className:"w-12 h-4 bg-gray-200 rounded mx-auto"})})]})}),(0,s.jsx)("tbody",{className:"",children:null==e?void 0:e.map((t,a)=>(0,s.jsxs)("tr",{className:"animate-pulse",children:[(0,s.jsx)("td",{className:"px-4 py-3 text-sm text-gray-600 ".concat(e.length===a+1?"":"border-b-[1px]"),children:(0,s.jsx)("div",{className:"w-48 h-4 bg-gray-200 rounded mx-auto"})}),(0,s.jsx)("td",{className:"px-4 py-3 text-sm text-gray-600 ".concat(e.length===a+1?"":"border-b-[1px]"),children:(0,s.jsx)("div",{className:"w-48 h-4 bg-gray-200 rounded mx-auto"})}),(0,s.jsx)("td",{className:"px-4 py-3 text-sm text-gray-600 ".concat(e.length===a+1?"":"border-b-[1px]"),children:(0,s.jsx)("div",{className:"w-48 h-4 bg-gray-200 rounded mx-auto"})}),(0,s.jsx)("td",{className:"px-4 py-3 text-sm text-gray-600 ".concat(e.length===a+1?"":"border-b-[1px]"),children:(0,s.jsx)("div",{className:"w-48 h-4 bg-gray-200 rounded mx-auto"})}),(0,s.jsx)("td",{className:"px-4 py-3 text-sm text-gray-600 text-center ".concat(e.length===a+1?"":"border-b-[1px]"),children:(0,s.jsx)("div",{className:"w-16 h-4 bg-gray-200 rounded-3xl mx-auto px-3 py-d center"})})]},a))})]})})}},44414:(e,t,a)=>{"use strict";a.d(t,{A:()=>x});var s=a(74848),l=a(52177),r=a(64847),i=a(29965),n=a.n(i),d=a(86715),o=a(23927),c=a(32578);let x=e=>{let{onClick:t,type:a="Edit",isSubmiting:i=!1}=e,[{dataMe:x}]=(0,l.w)(),u=(0,c.useTranslations)("GeneralTranslate"),h=(0,d.useRouter)(),p=[""];p="/product/product/variant"===h.pathname?["variant-product"]:h.pathname.split("/");let m=(0,r.F)(x,p,"Edit"),g=(0,r.F)(x,p,"Delete");return"Edit"===a?m&&(0,s.jsx)(o.Ay,{id:"edit-icon",content:u("Edit"),children:(0,s.jsx)("button",{onClick:()=>t(),className:"w-5 h-5",children:(0,s.jsx)(n(),{src:"/icon/edit_icon.svg",alt:"edit-icon",width:20,height:20})})}):g&&(0,s.jsx)(o.Ay,{id:"delete-icon",content:u("Delete"),children:(0,s.jsx)("button",{disabled:i,onClick:()=>t(),className:"w-5 h-5",children:(0,s.jsx)(n(),{src:"/icon/delete_icon.svg",alt:"delete-icon",width:20,height:20})})})}},8871:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var s=a(74848),l=a(52177),r=a(64847),i=a(32578),n=a(91106),d=a.n(n),o=a(86715);let c=e=>{let{url:t,className:a}=e,[{dataMe:n}]=(0,l.w)(),c=(0,i.useTranslations)("GeneralTranslate"),x=(0,o.useRouter)();return("/product/product/variant"===x.pathname?(0,r.F)(n,["variant-product"],"Add"):(0,r.F)(n,x.pathname.split("/"),"Add"))&&(0,s.jsx)(d(),{href:t,className:a,children:(0,s.jsx)("button",{className:"bg-primary text-white px-12 py-2 rounded-lg text-sm",children:c("Add")})})}},21740:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var s=a(74848),l=a(96540),r=a(86715),i=a(94053),n=a(94216),d=a(49764),o=a.n(d);let c=e=>{let t="flex items-center justify-center w-8 h-8 rounded-lg text-sm",{total:a}=e,[d,c]=(0,l.useState)(0),x=(0,r.useRouter)();return(0,l.useEffect)(()=>
1{if(x.isReady){var e,t,a,s;c((null===(a=parseInt)||void 0===a?void 0:a(null!==(s=null===(t=x.query)||void 0===t?void 0:null===(e=t.page)||void 0===e?void 0:e.toString())&&void 0!==s?s:"1"))-1||0)}},[x.query,x.isReady]),1!==a?(0,s.jsx)(o(),{nextLabel:(0,s.jsx)(i.A,{width:15,height:15}),onPageChange:e=>{new URLSearchParams(window.location.search).set("page",(e.selected+1).toString()),x.query.page=(e.selected+1).toString(),x.push(x)},pageRangeDisplayed:3,marginPagesDisplayed:2,pageCount:a,forcePage:d,previousLabel:(0,s.jsx)(n.A,{width:15,height:15}),pageLinkClassName:"".concat(t," bg-white"),activeLinkClassName:"".concat(t," bg-primary/50"),disabledLinkClassName:"".concat(t," bg-white grayscale brightness-75 cursor-not-allowed"),previousLinkClassName:"page-link",nextLinkClassName:"page-link",breakLabel:"...",containerClassName:"flex justify-center items-center gap-2",activeClassName:"active",renderOnZeroPageCount:()=>(0,s.jsx)("div",{})}):(0,s.jsx)("div",{})}},52550:(e,t,a)=>{"use strict";a.d(t,{A:()=>x,W:()=>o});var s=a(74848),l=a(52177),r=a(21740),i=a(28212),n=a(86715),d=a(32578);let o=[{value:10,label:"10"},{value:25,label:"25"},{value:50,label:"50"}],c=[{value:5,label:"5"},{value:10,label:"10"},{value:15,label:"15"}];function x(e){var t,a,x,u;let{dashboard:h=!1,tableData:p,tablePageCount:m,isPagination:g,classNames:v}=e,[{itemPerPage:b},y]=(0,l.w)(),j=(0,n.useRouter)(),w=(0,d.useTranslations)("GeneralTranslate");return(0,s.jsxs)("div",{className:"bg-white overflow-x-auto mt-5 w-full ".concat(v),children:[(0,s.jsxs)("table",{className:"table-auto text-sm w-full",children:[(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:null==p?void 0:null===(t=p.th)||void 0===t?void 0:t.map((e,t)=>(0,s.jsx)("th",{className:"px-3 py-3 text-sm font-bold text-left text-secondary border-b-4 border-thirdary max-w-[200px] md:min-w-full min-w-[150px] whitespace-pre-wrap",children:e},t))})}),(0,s.jsx)("tbody",{className:"divide-y divide-gray-300 border-b border-gray-300",children:(null==p?void 0:null===(a=p.tb)||void 0===a?void 0:a.length)>0?null==p?void 0:null===(x=p.tb)||void 0===x?void 0:x.map((e,t)=>(0,s.jsx)("tr",{className:"",children:e.map((e,t)=>(0,s.jsx)("td",{className:"py-6 px-3 text-sm text-gray-800 max-w-[200px] md:min-w-full min-w-[150px] whitespace-pre-wrap",children:e},t))},t)):(0,s.jsx)("tr",{children:(0,s.jsx)("td",{className:"py-6 px-3",colSpan:null==p?void 0:null===(u=p.th)||void 0===u?void 0:u.length,children:w("No Data")})})})]}),g&&(0,s.jsxs)("div",{className:"grid grid-cols-3 mt-5 w-full",children:[(0,s.jsx)("div",{}),(0,s.jsx)(r.A,{total:m}),(0,s.jsx)(i.Ay,{className:"w-fit text-sm justify-self-end p-1",label:"",placeholder:"",type:"dropdown",dropdownList:h?c:o,name:"",value:Number(b),handleValueChange:e=>{void 0!==e&&(y({type:"SET_ITEM_PER_PAGE",payload:{value:e}}),j.replace({pathname:j.pathname,query:{...j.query,limit:e,page:1}}))}})]})]})}},10610:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var s=a(74848),l=a(29965),r=a.n(l),i=a(86715);let n=()=>{let e=(0,i.useRouter)();return(0,s.jsx)("div",{className:'"bg-backgroundColor flex flex-col items-center justify-center h-screen',children:(0,s.jsxs)("div",{className:"overflow-x-hidden flex flex-col items-center rounded-2xl w-full",children:[(0,s.jsx)(r(),{alt:"Page Not Found",src:"/ic_error.svg",width:250,height:100}),(0,s.jsx)("h1",{className:"text-2xl text-center font-semibold mt-4 mb-3 text-primaryDark",children:"Oops. Terjadi masalah silahkan coba lagi nanti"}),(0,s.jsx)("button",{className:"bg-primary text-white px-12 py-2 rounded-lg text-sm",onClick:()=>{e.reload()},children:"Retry"})]})})}},63935:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>s,ep:()=>l,n_:()=>r});let s=(e,t,a)=>void 0===e?"-":1===e?t:a,l=[{value:1,label:"Active"},{value:0,label:"Inactive"}];function r(e){return 0===e?"Main":1===e?"Branch":2===e?"Mix":void 0}},23927:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>i});var s=a(74848);a(91106),a(96540);var l=a(67008),r=a(32578);function i(e){let{id:t,content:a,children:i}=e,n=(0,r.useTranslations)("GeneralTranslate");return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"cursor-pointer w-fit","data-tooltip-id":t,"data-tooltip-content":n(a),children:i}),(0,s.jsx)(l.m_,{id:t})]})}},59037:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>l});var s=a(74848);let l=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("svg",{role:"status",className:"w-6 h-6 text-white animate-spin dark:text-white dark:text-xl fill-primary mx-auto",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.
11071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})})},71134:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__N_SSP:()=>N,default:()=>A});var s=a(74848),l=a(4340),r=a(69621),i=a(86715),n=a(63935),d=a(77969),o=a(95420),c=a(96540),x=a(38189),u=a(52550),h=a(8871),p=a(86818),m=a(10610),g=a(19360),v=a(4293),b=a(99279),y=a(59037),j=a(52177),w=a(44414),f=a(32578),C=a(75249),N=!0;let A=function(){var e,t;let[a,N]=(0,c.useState)(!1),A=(0,i.useRouter)(),[_,k]=(0,c.useState)(!1),[T,E]=(0,c.useState)(""),S=(0,f.useTranslations)("GeneralTranslate"),[{itemPerPage:R}]=(0,j.w)();(0,c.useEffect)(()=>{A.isReady&&I({variables:{limit:R,page:A.query.page?A.query.page:"1",filter:{}}})},[A.isReady,A.query,R]);let[I,{loading:P,error:D,data:L}]=(0,d._)(x.cH,{fetchPolicy:"no-cache"}),F=[{type:"Search",options:[{label:S("Category"),value:"name"}]},{type:"Dropdown",name:S("Type"),field:"type",options:[{label:S("Service"),value:"SERVICE"},{label:S("Item"),value:"ITEM"}]},{type:"Dropdown",name:"Status",field:"status",options:[{label:S("Active"),value:1},{label:S("Inactive"),value:0}]}],[M,{loading:q,error:G}]=(0,o.n)(x.IA,{onCompleted:e=>{null!=e?A.reload():(k(!1),C.oR.warning(e))},onError:e=>{k(!1),C.oR.error(e.message)}}),Z=e=>{M({variables:{id:e}})};if(D)return(0,s.jsx)(m.A,{});let O={th:[S("Unit Category"),S("Type"),"Status",S("Action")],tb:null==L?void 0:null===(e=L.unitCategory.unit_categories)||void 0===e?void 0:e.data.map((e,t)=>[(0,s.jsx)("div",{children:e.name},1),"".concat(0==e.type?S("Service"):S("Item")),"".concat((0,n.Ay)(e.status,S("Active"),S("Inactive"))),(0,s.jsxs)("div",{className:"flex flex-row gap-3 items-center h-full cursor-pointer",children:[(0,s.jsx)(w.A,{onClick:()=>{A.push("unit-category/form?id=".concat(e.id))},type:"Edit"}),(0,s.jsx)(w.A,{isSubmiting:_,onClick:()=>{E(e.id),N(!0)},type:"Delete"})]},2)])},B=()=>{N(!1)};return(0,s.jsxs)("div",{className:"h-full w-full absolute",children:[(0,s.jsx)(l.A,{title:S("Product Unit Category")}),(0,s.jsx)(r.A,{children:(0,s.jsxs)("div",{className:"my-5 rounded-2xl p-6 shadow-lg overflow-auto bg-white",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(h.A,{url:"/product/unit-category/form",className:"w-fit self-end"}),(0,s.jsx)(p.A,{filterOptions:F,onChangeHandler:e=>{I({variables:{limit:R,page:A.query.page,filter:e}})}})]}),P?(0,s.jsx)(g.A,{}):(0,s.jsx)(u.A,{tableData:O,tablePageCount:Math.ceil((null!==(t=null==L?void 0:L.unitCategory.unit_categories.total_data)&&void 0!==t?t:0)/R),isPagination:!0})]})}),(0,s.jsx)(v.e,{appear:!0,show:a,children:(0,s.jsxs)(b.l,{as:"div",className:"relative",onClose:B,children:[(0,s.jsx)("div",{className:"fixed inset-0 bg-black/50","aria-hidden":"true"}),(0,s.jsx)(v.e.Child,{enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)("div",{className:"fixed inset-0 overflow-auto",children:(0,s.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,s.jsxs)("div",{className:"bg-white text-white md:w-[600px] rounded overflow-hidden shadow",children:[(0,s.jsxs)("div",{className:"flex flex-row py-3 px-6 bg-[#2C323F] items-center justify-between",children:[(0,s.jsxs)("p",{className:"whitespace-nowrap text-sm text-white ",children:[S("Warning"),"!"]}),(0,s.jsx)("button",{className:"rounded text-sm bg-white text-black p-2",type:"button",onClick:B,children:(0,s.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M2.50818 11.2383C2.27652 11.4699 1.96232 11.6001 1.6347 11.6001C1.30708 11.6001 0.992882 11.4699 0.761221 11.2383C0.52956 11.0066 0.399414 10.6924 0.399414 10.3648C0.399414 10.2026 0.431366 10.042 0.493445 9.89213C0.555524 9.74227 0.646514 9.6061 0.761221 9.4914L9.49108 0.763215C9.60571 0.648513 9.74181 0.557512 9.8916 0.495405C10.0414 0.433298 10.202 0.401303 10.3641 0.401245C10.5263 0.401188 10.6869 0.43307 10.8367 0.495071C10.9866 0.557072 11.1227 0.647978 11.2374 0.762598C11.3521 0.877218 11.4431 1.01331 11.5052 1.1631C11.5674 1.31289 11.5994 1.47344 11.5994 1.6356C11.5995 1.79775 11.5676 1.95833 11.5056 2.10816C11.4436 2.258 11.3527 2.39415 11.238 2.50885L2.50818 11.237V11.2383Z",fill:"#909090"}),(0,s.jsx)("path",{d:"M0.761221 2.50868C0.52956 2.27703 0.399414 1.96285 0.399414 1.63525C0.399414 1.30765 0.52956 0.993463 0.761221 0.761813C0.992882 0.530164 1.30708 0.400024 1.6347 0.400024C1.96232 0.400024 2.27652 0.530164 2.50818 0.761813L11.2368 9.49123C11.3515 9.60585 11.4425 9.74194 11.5046 9.89173C11.5667 10.0415 11.5987 10.2021 11.5988 10.3642C11.5989 10.5264 11.567 10.687 11.505 10.8368C11.443 10.9866 11.3521 11.1228 11.2374 11.2375C11.1228 11.3522 10.9867 11.4432 10.8369 11.5053C10.6871 11.5674 10.5265 11.5994 10.3644 11.5995C10.2022 11.5995 10.0416 11.5676 9.89179 11.5056C9.74195 11.4436 9.60579 11.3527 9.49108 11.2381L0.761221 2.50868Z",fill:"#909090"})]})})]}),(0,s.jsxs)("div",{className:"text-black p-5",children:[(0,s.jsx)("p",{children:S("warning message1")}),(0,s.jsxs)("p",{children:["(",S("warning message2"),")"]})]}),"(",S("warning message2"),")",(0,s.jsx)("div",{className:"flex justify-end pb-3 px-6",children:(0,s.jsx)("button",{disabled:q,className:"rounded text-sm bg-[#0B5089] text-white px-4 py-1 mt-6",type:"button",onClick:()=>{Z(T)},children:q?(0,s.jsx)(y.default,{}):(0,s.jsx)("span",{children:S("Yes")})})})]})})})})]})})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[4453,3197,9965,9190,1106,1348,4967,6485,9785,7796,2434,2809,8150,1323,7008,4293,9279,4726,9621,3111,6818,8189,636,6593,8792],()=>t(61597)),_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.