%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/opti/www/ezone-inventory.optisoft.com.ng/static/js/
Upload File :
Create Path :
Current File : /home/opti/www/ezone-inventory.optisoft.com.ng/static/js/main.335f64e9.chunk.js

(this["webpackJsonpinventory-module"]=this["webpackJsonpinventory-module"]||[]).push([[0],{143:function(e,t){e.exports=e=>Object.keys(e).reduce(((t,a)=>((0===e[a]||e[a])&&(t+=t?"&".concat(a,"=").concat(e[a]):"?".concat(a,"=").concat(e[a])),t)),"")},290:function(e,t,a){},412:function(e,t,a){"use strict";a.r(t);var n,i=a(1),r=a.n(i),s=a(22),c=a.n(s),o=(a(290),a(30)),l=a(468),d=a(21),u=a(268);const j="#fff",m="#1A88E1",b="#242424",p="#C4C4C4",h=Object(u.a)({white:"#fff",primaryColor:"#1A88E1",primaryColor2:"#1702FF",primaryColor3:"#177ACA",background:"#F0F3FA",foreground:"#FFFFFF",subtleBlack:"#B4B4B4",lightText:"#5E5D5D",boldText:"#242424",headerText:"#000000",shadow:"0px 3px 10px #0000001A",filter:"drop-shadow(0px 4px 20px rgba(201, 201, 201, 0.25))",border:"#C4C4C4",highlight:"#F5F5F5",faintBlue:"#F0F3FA",red:"#F44336",grey:"#A0AEC0"}),g=Object(u.a)({white:"#fff",background:"#18191A",foreground:"#242526",primaryColor:"#1A88E1",primaryColor2:"#1702FF",primaryColor3:"#177ACA",border:"#C5C5C5",subtleBlack:"#fff",lightText:"#fff",boldText:"#fff",shadow:"none",filter:"none",headerText:"#fff",highlight:"#363838",faintBlue:"#363838",red:"#F44336",grey:"#A0AEC0"}),x=Object(d.b)(n||(n=Object(o.a)(["\n    body{\n        background: ",";\n        color: ",";\n        transition: all 0.5s linear;\n    }\n\n    p{\n        margin-bottom: 0px;\n        color: ",";\n    }\n"])),(e=>e.theme.background),(e=>e.theme.boldText),(e=>e.theme.boldText));var O=a(458),y=a(476),A=a(467),v=a(469),f=a(475),I=a(450),C=a(452),w=a(470),k=a(477);const S=function(){let{justifyContent:e,alignItems:t,display:a,flexDirection:n,flexWrap:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{display:null!==a&&void 0!==a?a:"flex","justify-content":null!==e&&void 0!==e?e:"center","align-items":null!==t&&void 0!==t?t:"center","flex-wrap":null!==i&&void 0!==i?i:"wrap","flex-direction":null!==n&&void 0!==n?n:"row"}},P="2.1vw",R="1.1vw";var B,V,q,N,E,F,T,W,z,D,G,Q;const U=Object(d.c)(f.a)(B||(B=Object(o.a)(["\n  background-color: ",";\n  width: 100%;\n  position: fixed;\n  z-index: 100;\n  top: 0;\n"])),(e=>e.theme.foreground)),M=d.c.img(V||(V=Object(o.a)(["\n  width: 10%;\n  height: auto;\n  cursor: pointer;\n"]))),L=Object(d.c)(w.a)(q||(q=Object(o.a)(["\n  color: ",";\n  & .ant-table-thead > tr > th:nth-child(odd) {\n    background-color: ",";\n    color: ",";\n  }\n\n  & .ant-table-thead > tr > th:nth-child(even) {\n    background-color: ",";\n    color: ",";\n  }\n\n  & .ant-table-row {\n    background-color: ",";\n    color: ",";\n    cursor: pointer;\n\n    &:nth-child(even) {\n      background-color: ",";\n    }\n  }\n\n  & .ant-table-tbody > tr > td {\n    border-bottom: none;\n  }\n\n  & .ant-table-tbody > tr.ant-table-row:hover > td {\n    background-color: ",";\n    color: ",";\n  }\n"])),(e=>e.theme.white),(e=>e.theme.primaryColor),(e=>e.theme.white),(e=>e.theme.primaryColor3),(e=>e.theme.white),(e=>e.theme.foreground),(e=>e.theme.boldText),(e=>e.theme.faintBlue),(e=>e.theme.highlight),(e=>e.theme.boldText)),Y=Object(d.c)(f.a)(N||(N=Object(o.a)(["\n  ","\n  border: 1px solid ",";\n  width: 100%;\n  padding: 4px;\n  border-radius: 5px;\n\n  & p {\n    color: ",";\n  }\n"])),S(),(e=>e.theme.border),(e=>e.theme.lightText)),K=Object(d.c)(I.a)(E||(E=Object(o.a)(["\n  background-color: ",";\n  color: ",";\n  text-transform: capitalize;\n\n  &:hover {\n    background-color: ",";\n  }\n"])),(e=>e.theme.primaryColor),(e=>e.theme.white),(e=>e.theme.primaryColor)),X=Object(d.c)(I.a)(F||(F=Object(o.a)(["\n  background-color: ",";\n  color: ",";\n  text-transform: capitalize;\n\n  &:hover {\n    background-color: ",";\n  }\n"])),(e=>e.theme.red),(e=>e.theme.white),(e=>e.theme.red)),H=Object(d.c)(I.a)(T||(T=Object(o.a)(["\n  color: ",";\n  border: 1px solid ",";\n  text-transform: capitalize;\n"])),(e=>e.theme.lightText),(e=>e.theme.border)),J=Object(d.c)(f.a)(W||(W=Object(o.a)(["\n  background-color: ",";\n  width: 100%;\n"])),(e=>e.theme.foreground)),Z=d.c.p(z||(z=Object(o.a)(["\n  font-size: ",";\n  font-weight: 500;\n  color: ",";\n"])),R,(e=>e.theme.lightText)),_=Object(d.c)(C.a)(D||(D=Object(o.a)(["\n  color: ",";\n"])),(e=>e.theme.lightText)),$=Object(d.c)(C.a)(G||(G=Object(o.a)(["\n  color: ",";\n"])),(e=>e.theme.boldText)),ee=Object(d.c)(k.a)(Q||(Q=Object(o.a)(["\n  background-color: transparent;\n  border-radius: 20px;\n  //min-width: 50vw;\n  color: ",";\n  text-align: center;\n  & .ant-modal-content {\n    border-radius: 8px;\n    margin: 0 auto;\n    background-color: ",";\n  }\n"])),(e=>e.theme.boldText),(e=>e.theme.foreground));var te=a(483),ae=a(453),ne=a(454),ie=a(455),re=a(456),se=a(484),ce=a(2);const oe=r.a.forwardRef(((e,t)=>{const a=e.items.map(((t,a)=>Object(ce.jsx)(te.a,{onClick:a=>e.handleClose(a,t),children:t},a)));return Object(ce.jsx)(ae.a,{open:e.open,anchorEl:t.current,role:void 0,transition:!0,disablePortal:!0,style:{zIndex:"1000"},children:t=>{let{TransitionProps:n,placement:i}=t;return Object(ce.jsx)(ne.a,{...n,style:{transformOrigin:"bottom"===i?"center top":"center bottom"},children:Object(ce.jsx)(ie.a,{children:Object(ce.jsx)(re.a,{onClickAway:e.handleClose,children:Object(ce.jsx)(se.a,{autoFocusItem:e.open,id:"menu-list-grow",onKeyDown:e.handleListKeyDown,children:a})})})})}})}));var le=a(12),de=a(135);const ue=e=>{const[t,a]=r.a.useState(!1),n=r.a.useRef(null);Object(le.f)();return Object(ce.jsxs)(U,{display:"flex",justifyContent:"space-between",alignItems:"center",style:{visibility:e.hidden?"hidden":"visible",position:e.hidden?"relative":"fixed"},px:3,py:1,children:[Object(ce.jsx)(M,{onClick:()=>window.location.assign("http://apps.ezoneerp.com/home"),src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOQAAABECAYAAACRS5ljAAAMKWlDQ1BJQ0MgUHJvZmlsZQAASImVlwdUk8kWgOcvSUhIQgmEIiX0JkqRLr1GEJAq2AhJIKHEkBBU7MiigmtBxYIVXRVRcC2ALCpiL4tg7w9EVJR1sWBD5U0SQFfPe++8e878/5c7d+7cezP/nBkA1KI5YnEWqg5AtihXEhMawJqYlMwidQEiwAEDaABrDlcq9o+OjgBQht7/lHc3ASJ/X7OX+/q5/7+KBo8v5QKARENO5Um52ZAPA4C7csWSXAAIPVBvNiNXDJkIowRaEhggZHM5pyvZXc6pSo5Q2MTFBEJOAUCFyuFI0gGgy+Ni5XHToR/6MsgOIp5QBLkRsg9XwOFB/gx5ZHb2dMhq1pCtU7/zk/4Pn6nDPjmc9GFW5qIQlSChVJzFmfV/luN/S3aWbGgOM9ioAklYjDxned0yp4fLmQr5vCg1MgqyJuTrQp7CXs5PBLKw+EH7D1xpIKwZYAKAUnmcoHDIBpBNRVmREYN6nzRhCBsyrD0aJ8xlxynHojzJ9JhB/+hMvjQ4dog5EsVccptiWWa8/6DPLQI+e8hnQ74gLlEZJ9qaJ0yIhEyHfF+aGRs+aPM8XxAYOWQjkcXIY4b/OQbSJCExShvMPFs6lBfmKRCyIwc5IlcQF6Yci03lchSx6ULO4EsnRgzFyeMHBSvzwgr4ovjB+LFScW5AzKD9TnFW9KA91sjPCpXrTSG3SPNih8b25sLFpswXB+Lc6DhlbLhWBmdctDIG3BZE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{a((e=>!e))},endIcon:Object(ce.jsx)(de.a,{}),children:Object(ce.jsx)($,{variant:"subtitle2",children:"Applications"})}),Object(ce.jsx)(oe,{items:["Home","Chat","File Management","Human Resources","Payroll","Task Management"],handleListKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),a(!1))},ref:n,open:t,handleClose:(e,t)=>{if(n.current&&n.current.contains(e.target))switch(console.log(t),t){case"Home":window.location.assign("http://apps.ezoneerp.com/home");break;case"Chat":window.location.assign("http://apps.ezoneerp.com/chats");break;case"File Management":window.location.assign("http://apps.ezoneerp.com/file-manager/folders");break;case"Human Resources":window.location.assign("http://apps.ezoneerp.com/hr/dashboard");break;case"Payroll":window.location.assign("http://apps.ezoneerp.com/payroll");break;case"Task Management":window.location.assign("http://apps.ezoneerp.com/task-manager/tasks")}else a(!1)}})]})]})};var je,me,be,pe,he=a(195),ge=a(156),xe=a(106);const{SubMenu:Oe}=he.a,ye=[{name:"Items",link:"/items"},{name:"Item Groups",link:"/item-groups"},{name:"Warehouse",link:"/warehouse"},{name:"Transfer Orders",link:"/transfer-orders"},{name:"Adjustments",link:"/inventory-adjustment"}],Ae=[{name:"Invoice",link:"/invoice"},{name:"Receipts",link:"/receipts"}],ve=[{name:"Customers",link:"/customers"},{name:"Vendors",link:"/vendors"}],fe=e=>{const t=ye.map(((e,t)=>Object(ce.jsx)(we,{children:Object(ce.jsx)(xe.b,{to:e.link,children:e.name})},"inventory-".concat(t)))),a=Ae.map(((e,t)=>Object(ce.jsx)(we,{children:Object(ce.jsx)(xe.b,{to:e.link,children:e.name})},"sales-".concat(t)))),n=ve.map(((e,t)=>Object(ce.jsx)(we,{children:Object(ce.jsx)(xe.b,{to:e.link,children:e.name})},"parties-".concat(t))));return Object(ce.jsx)(Ce,{children:Object(ce.jsxs)(f.a,{pt:3,children:[Object(ce.jsx)(ue,{hidden:!0}),Object(ce.jsxs)(ke,{onClick:e=>{},style:{width:"100%",backgroundColor:"transparent",color:"#fff"},defaultSelectedKeys:["1"],defaultOpenKeys:["sub1"],mode:"inline",children:[Object(ce.jsx)(we,{icon:Object(ce.jsx)(ge.a,{}),children:Object(ce.jsx)(xe.b,{to:"/",children:"Dashboard"})},"1"),Object(ce.jsx)(Ie,{icon:Object(ce.jsx)(ge.b,{}),title:"Inventory",children:t},"sub4"),Object(ce.jsx)(Ie,{icon:Object(ce.jsx)(ge.b,{}),title:"Sales",children:a},"sub5"),Object(ce.jsx)(Ie,{icon:Object(ce.jsx)(ge.b,{}),title:"Clients",children:n},"sub6")]})]})})},Ie=Object(d.c)(Oe)(je||(je=Object(o.a)(["\n  background-color: transparent;\n  color: #fff !important;\n  font-weight: bold;\n  &:hover {\n    color: #fff !important;\n  }\n\n  & .ant-menu-sub.ant-menu-inline {\n    background-color: transparent;\n    color: #fff !important;\n\n    &:hover {\n      color: #fff !important;\n    }\n  }\n"]))),Ce=Object(d.c)(f.a)(me||(me=Object(o.a)(["\n  width: 17%;\n  height: 100vh;\n  position: fixed;\n  background: linear-gradient(359.88deg, #250943 55.29%, #1702ff 127.12%);\n\n  & > div {\n    background-image: url(","), url(","), url(","),\n      url(","), url(",");\n    background-position: 50% -5%, 50% -5%, bottom, bottom, bottom;\n    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;\n    height: 100%;\n    width: 100%;\n  }\n"])),"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASsAAACpCAYAAABzqxvTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAu5SURBVHgB7d29UxzJHcbx7tnR8bIG1elKV0LaLbBOF3GRM8icKXMmRw6VXnrmUKmsKllSlTP9C458GRmOUISiU4YTre8srwR4KasKCjgQu903g1hY8bLs7M5Lv3w/kUBkEs8+3fPrHimQmlt/ezsjPjSHlRCbQRg23n1XeSsApEIKpOLa89fjIztX7p/5C6k2lJYNoWQjDrCRkV82at9+vS8AJEJYpWTi6c93AyGne/rhKMC0CDd1S9UJMKA3h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QHgHYJZEIY6gP8I5pJYVQLhIJhLYFUJhIVgLoBVJRAmgjknVpVAuAjmHMy1xjhWuwIgSARzBvltnYvBE85VAmEjmHfgtg6AIYI5gRns9H8++2vUVJsCAEIwx2KwA2AcXiB8i9mCp5EcyEAA4AZWmF+YLXhyenbMYAfAJART2IIDmE3wW3K24ABmFewKM9+Cv3h9yJvQAcwqlgCZF/yudi9OtET3BQBmFNwKk4PoABYVVDC7L7cOeMMQgEUFMfQZ3QXPODIEYHHeB9M8r5R+dqRixZEhAEvxekvO80oARfI2mDyvBFA077bkoyuOPK8EUDCvVphmuHP9vPKEK44AyuBNMPP74M3siOeVAMrixZZ8dB9cRwIAZXF+hcmHyQBUxdkV5ugTEjGfkABQDSdXmPnNnSs5VpJ1BAAq4twKczgJvy49k3AAlXJqhckkHECdnAnm5cvtrZVMHQoA1MSJLXk+Cc+YhAOol/XB/HwnXHEnHEDtrA3m6NhQxrEhAHaw8hlm/gKNX96ecGwIgE2sCyYv0ABgK6uCSSwB2MyaZ5jDT0kQSwC2smKFaWK5/l3rRw6kA7BZ7cE0B9JXtd4nlgBsV2swub0DwCW1PcPk9g4A19SywuSlvwBcVHkwiSUAV1UaTGIJwGWVBZNYAnBdJUOf3rPtJ3x7B4DrSl9h5rFsEksA7is1mMQSgE9KCyaxBOCbUoJJLAH4qPBgEksAvio0mMQSgM8KCyaxBOC7QoJJLAGEYOlgEksAoVgqmMQSQEgWDiaxBBCahe6SmxdpcDccQGjmXmHy1iEAoZormMQSQMhmDiaxBBC6mYJJLAFAJLrrD+jTzR1iCQAi8bQfmu+GK4l/EADA5BXm+6frnZVMHQoAIDc2mCaW69+1fhQAwMgfDq7rN49a0s+O0oE0BQAwcmNK/iWWJ9exbAsA4IZRMIklAEw32pInV3J8XU9iCQAT5EMf8+YhJVlHAAATNXjzEADM5nftudUsNC2kWQAAAABJRU5ErkJggg=="),we=Object(d.c)(he.a.Item)(be||(be=Object(o.a)(["\n  color: "," !important;\n  font-size: 14px !important;\n  font-weight: bold;\n\n  & a {\n    color: ",";\n  }\n\n  &:hover {\n    color: "," !important;\n  }\n"])),(e=>e.theme.white),(e=>e.theme.white),(e=>e.theme.white)),ke=Object(d.c)(he.a)(pe||(pe=Object(o.a)(["\n  width: 100%;\n  background-color: transparent;\n  color: #fff;\n"])));var Se=a(266),Pe=a(157),Re=a(479),Be=a(481),Ve=a(487),qe=a(472);const Ne=e=>{var t;return Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(L,{pagination:!1,onRow:e.onRow,columns:e.columns,dataSource:e.dataSource}),!e.hidePagination&&Object(ce.jsx)(qe.a,{component:"div",count:null!==(t=e.total)&&void 0!==t?t:100,page:e.page,onChangePage:e.handleChangePage,rowsPerPage:e.rowsPerPage,onChangeRowsPerPage:e.handleChangeRowsPerPage})]})};var Ee=a(460),Fe=a(459);const Te=Object(O.a)((e=>({root:{display:"flex",alignItems:"center"},wrapper:{position:"relative"},buttonProgress:{color:e.PrimaryButton,position:"absolute",top:"50%",left:"50%",marginTop:-12,marginLeft:-12}}))),We=e=>{const t=Te();return Object(ce.jsxs)("div",{className:t.wrapper,children:[Object(ce.jsx)(K,{disabled:e.loading,...e,variant:"contained",children:e.text}),e.loading&&Object(ce.jsx)(Fe.a,{size:24,className:t.buttonProgress})]})},ze=e=>{const t=Te();return Object(ce.jsxs)("div",{className:t.wrapper,children:[Object(ce.jsx)(X,{disabled:e.loading,...e,variant:"contained",children:e.text}),e.loading&&Object(ce.jsx)(Fe.a,{size:24,className:t.buttonProgress})]})},De=e=>Object(ce.jsx)(H,{variant:"outlined",endIcon:e.endIcon,...e,children:e.text}),{Option:Ge}=Pe.a,Qe=e=>Object(ce.jsx)(Y,{children:Object(ce.jsxs)(Pe.a,{showSearch:!0,bordered:!1,style:{width:"100%"},placeholder:"Select a person",optionFilterProp:"children",onChange:function(e){},onFocus:function(){console.log("focus")},onBlur:function(){console.log("blur")},onSearch:function(e){},filterOption:(e,t)=>t.children.toLowerCase().indexOf(e.toLowerCase())>=0,children:[Object(ce.jsx)(Ge,{value:"jack",children:"Jack"}),Object(ce.jsx)(Ge,{value:"lucy",children:"Lucy"}),Object(ce.jsx)(Ge,{value:"tom",children:"Tom"})]})}),Ue=e=>Object(ce.jsxs)(J,{px:3,py:2,children:[Object(ce.jsx)(C.a,{variant:"h6",children:e.title}),e.showtools&&Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(f.a,{display:"flex",justifyContent:"flex-end",alignItems:"center",children:Object(ce.jsx)(We,{text:e.createButtonText,onClick:e.onCreate})}),Object(ce.jsxs)(f.a,{mt:2,display:"flex",justifyContent:"space-between",alignItems:"center",children:[Object(ce.jsx)(f.a,{style:{width:"40%"},children:Object(ce.jsx)(Qe,{})}),Object(ce.jsxs)(f.a,{display:"flex",justifyContent:"center",alignItems:"center",children:[Object(ce.jsx)(De,{text:"Import",endIcon:Object(ce.jsx)(Ee.a,{children:"download"})}),Object(ce.jsx)(f.a,{ml:2,children:Object(ce.jsx)(De,{text:"Export",endIcon:Object(ce.jsx)(Ee.a,{children:"upload"})})})]})]})]})]});var Me,Le,Ye,Ke,Xe,He=a(273),Je=a(275),Ze=a(267),_e=a(473),$e=a(461),et=a(463),tt=a(471),at=a(19),nt=a(480),it=a(462),rt=a(464);const st=Object(d.c)(f.a)(Me||(Me=Object(o.a)(["\n  border: 2px "," ",";\n  width: 100%;\n  height: 40vh;\n  background-color: ",";\n  ",";\n \n    overflow: hidden;\n  & > :first-child {\n    font-size: ",";\n    color: ",";\n  }\n"])),(e=>{let{isImage:t,theme:a}=e;return t?a.subtleBlack:a.primaryColor}),(e=>e.isImage?"solid":"dashed"),(e=>e.theme.faintBlue),S({flexDirection:"column"}),P,(e=>e.theme.subtleBlack)),ct=Object(d.c)(f.a)(Le||(Le=Object(o.a)(["\n  width: 100%;\n  overflow: hidden;\n  & img {\n    width: 100%;\n    height: 100%;\n    object-fit: contain;\n  }\n"]))),ot=Object(d.c)(C.a)(Ye||(Ye=Object(o.a)(["\n  color: ",";\n"])),(e=>e.theme.subtleBlack)),lt=Object(d.c)(f.a)(Ke||(Ke=Object(o.a)(["\n  cursor: pointer;\n  margin-left: 8px;\n  width: 25%;\n  border: ",";\n  overflow: hidden;\n  height: 10vmin;\n\n  &:first-child {\n    margin-left: 0px;\n  }\n\n  & img {\n    height: auto;\n    width: 100%;\n    object-fit: cover;\n  }\n"])),(e=>e.isActive?"1px solid ".concat(e.theme.primaryColor):"none"));Object(d.c)(w.a)(Xe||(Xe=Object(o.a)(["\n\n    & .ant-table-row{\n        color: #fff;\n        background-color: ","; \n        color: ",";\n       \n        &:nth-child(even){\n            background-color: ",";\n            \n        } \n    }\n\n    & .ant-table-tbody > tr > td {\n        border-bottom: none; \n    }\n\n    & .ant-table-tbody > tr.ant-table-row:hover > td{\n        background-color: ","; \n        color: ",";\n    }\n\n    & .ant-table-thead > tr > td {\n        border-bottom: none; \n\n    }\n\n    & .ant-table-thead > tr > th{\n        background-color: ","; \n        color: ",";\n    }\n\n"])),(e=>e.theme.foreground),(e=>e.theme.boldText),(e=>e.theme.faintBlue),(e=>e.theme.highlight),(e=>e.theme.boldText),(e=>e.theme.foreground),(e=>e.theme.boldText));var dt=a(42),ut=a(197);const jt=e=>new Promise(((t,a)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(n.result),n.onerror=e=>a(e)}));var mt=a(54);var bt="https://dev.ezoneapps.com/gateway/inventoryserv/api/v1";var pt={createItemGroupRoute:"/add_item_group",getAllItemGroupRoute:"/get_all_item_groups",getItemGroupsByOrgId:e=>"/get_item_group_by_orgid/".concat(e),updateItemGroupRoute:e=>"/update_item_group/".concat(e),getItemGroupNumber:"/get_number_of_item_groups",getSingleItemGroup:e=>"/get_item_group_by_id/".concat(e),deleteItemGroup:e=>"/delete_contact_group/".concat(e),addWarehouse:"/add_warehouse",getAllWarehouse:"/get_all_warehouses",deleteWarehouse:e=>"/delete_warehouse/".concat(e),updateWarehouse:e=>"/update_warehouse/".concat(e),getSingleWarehouse:e=>"/get_single_warehouse/".concat(e),itemsRoute:"/items",userProfileRoute:"/users/profile",userByOrgRoute:e=>"/users/get_by_orgid/".concat(e),invoiceRoute:"/invoices",customersRoute:"/customers",paymentRoute:"/payments/invoice_id",logoutRoute:"/logout",getSingleInvoice:e=>"invoices/".concat(e,"/single"),vendorRoute:"/vendor",createReceiptRoute:"/receipts",getAllReceiptsRoute:"/receipts/getAllReceipts",getSingleReceiptRoute:e=>"/receipts/getReceipts/".concat(e),issueItemRoute:"/issue-items",getAllTransfarOrderRoute:"/get_all_transfer_orders",addTransfarOrderRoute:"/add_transfer_orders",adjustmentsListRoute:"/get_all_adjustments",addAdjustmentsRoute:"/add_adjustments"},ht=a(35),gt=a.n(ht),xt=a(143),Ot=a.n(xt);const yt="https://dev.ezoneapps.com/gateway/inventoryserv/api/v1";var At=class{static createItemGroup(e){return gt()({method:"POST",url:"".concat(bt).concat(pt.createItemGroupRoute),data:e.data,headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static fetchItemGroupsByOrgId(e){let{page:t,size:a,orgId:n}=e;const i=Ot()({page:t,size:a});return gt()({method:"GET",url:"".concat(bt).concat(pt.getItemGroupsByOrgId(n)).concat(i),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static fetchItemGroupNumber(){return gt()({method:"GET",url:"".concat(bt).concat(pt.getItemGroupNumber),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static fetchAllItemGroups(e){return gt()({method:"GET",url:"".concat(bt).concat(pt.getAllItemGroupRoute),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async updateItemGroups(e){return gt()({method:"PUT",url:"".concat(bt).concat(pt.updateItemGroupRoute(e.id)),headers:{Authorization:"Bearer ".concat(localStorage.invToken)},data:e.data})}static async deleteItemGroup(e){return gt()({method:"DELETE",url:"".concat(bt).concat(pt.deleteItemGroup(e.id)),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static fetchSingleItemGroup(e){return gt()({method:"GET",url:"".concat(bt).concat(pt.getSingleItemGroup(e.id)),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async addWarehouse(e){return gt()({method:"POST",url:"".concat(bt).concat(pt.addWarehouse),headers:{Authorization:"Bearer ".concat(localStorage.invToken)},data:e.data})}static async getAllWarehouse(e){const t=Ot()(e);return gt()({method:"GET",url:"".concat(bt).concat(pt.getAllWarehouse).concat(t),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async fetchSingleWarehouse(e){return console.log("...FETCH"),gt()({method:"GET",url:"".concat(bt).concat(pt.getSingleWarehouse(e.id)),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async updateWarehouse(e){return gt()({method:"PUT",url:"".concat(bt).concat(pt.updateWarehouse(e.id)),headers:{Authorization:"Bearer ".concat(localStorage.invToken)},data:e.data})}static async deleteWarehouse(e){return gt()({method:"DELETE",url:"".concat(bt).concat(pt.deleteWarehouse(e.id)),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async getAllItems(e){const t=Ot()(e);return gt()({method:"GET",url:"".concat(bt).concat(pt.itemsRoute).concat(t),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async getSingleItem(e){return gt()({method:"GET",url:"".concat(bt).concat(pt.itemsRoute,"/").concat(e.id),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async createItem(e){return gt()({method:"POST",url:"".concat(bt).concat(pt.itemsRoute),headers:{Authorization:"Bearer ".concat(localStorage.invToken)},data:e.data})}static async deleteItem(e){return gt()({method:"DELETE",url:"".concat(bt).concat(pt.itemsRoute,"/").concat(e.id),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async updateItem(e){return gt()({method:"PUT",url:"".concat(bt).concat(pt.itemsRouteId,"/").concat(e.id),headers:{Authorization:"Bearer ".concat(localStorage.invToken)},data:e.data})}static async getUserProfile(e){return gt()({method:"GET",url:"".concat(yt).concat(pt.userProfileRoute),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async getUsersByOrg(e){return gt()({method:"GET",url:"".concat(yt).concat(pt.userByOrgRoute(e.orgId),"?start=0&limit=10"),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async getCustomers(e){const t=Ot()(e);return gt()({method:"GET",url:"".concat(bt).concat(pt.customersRoute).concat(t),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async createCustomers(e){return gt()({method:"POST",url:"".concat(bt).concat(pt.customersRoute),headers:{Authorization:"Bearer ".concat(localStorage.invToken)},data:e.data})}static async editCustomers(e){return gt()({method:"PUT",url:"".concat(bt).concat(pt.customersRoute,"/").concat(e.id),headers:{Authorization:"Bearer ".concat(localStorage.invToken)},data:e.data})}static async createVendors(e){return gt()({method:"POST",url:"".concat(bt).concat(pt.vendorRoute),headers:{Authorization:"Bearer ".concat(localStorage.invToken)},data:e.data})}static async getVendors(e){return gt()({method:"GET",url:"".concat(bt).concat(pt.vendorRoute,"/listAllVendors/").concat(e.page,"/").concat(e.size),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async editVendors(e){return gt()({method:"PUT",url:"".concat(bt).concat(pt.vendorRoute,"/update/").concat(e.id),headers:{Authorization:"Bearer ".concat(localStorage.invToken)},data:e.data})}static async getAllInvoice(e){const t=Ot()(e);return gt()({method:"GET",url:"".concat(bt).concat(pt.invoiceRoute).concat(t),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async getInvoice(e){return gt()({method:"GET",url:"".concat(bt).concat(pt.invoiceRoute,"/").concat(e.id),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async createInvoice(e){return gt()({method:"POST",url:"".concat(bt).concat(pt.invoiceRoute,"/customer_id/").concat(e.id,"/add_invoice"),headers:{Authorization:"Bearer ".concat(localStorage.invToken)},data:e.data})}static async getPaymentInfo(e){return gt()({method:"GET",url:"".concat(bt).concat(pt.paymentRoute,"/").concat(e.id,"/init_payment"),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async makePayment(e){return gt()({method:"POST",url:"".concat(bt).concat(pt.paymentRoute,"/").concat(e.id,"/pay"),headers:{Authorization:"Bearer ".concat(localStorage.invToken)},data:e.data})}static async logout(){return gt()({method:"POST",url:"".concat(yt).concat(pt.logoutRoute),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async createReceipt(e){return gt()({method:"POST",url:"".concat(bt).concat(pt.createReceiptRoute),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async getAllReceipt(e){return gt()({method:"GET",url:"".concat(bt).concat(pt.getAllReceiptsRoute,"/").concat(e.page,"/").concat(e.size),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async getSingleReceipt(e){return gt()({method:"GET",url:"".concat(bt).concat(pt.getSingleReceiptRoute(e.id)),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async issueItem(e){return gt()({method:"POST",url:"".concat(bt).concat(pt.issueItemRoute),headers:{Authorization:"Bearer ".concat(localStorage.invToken)},data:e.data})}static async getAllTransfarOrder(e){return gt()({method:"GET",url:"".concat(bt).concat(pt.getAllTransfarOrderRoute),headers:{Authorization:"Bearer ".concat(localStorage.invToken)}})}static async createTransfarOrder(e){return gt()({method:"POST",url:"".concat(bt).concat(pt.addTransfarOrderRoute),headers:{Authorization:"Bearer ".concat(localStorage.invToken)},data:e.data})}static async createAdjustment(e){return gt()({method:"POST",url:"".concat(bt).concat(pt.addAdjustmentsRoute),headers:{Authorization:"Bearer ".concat(localStorage.invToken)},data:e.data})}static async getAllAdjustments(e){return gt()({method:"GET",url:"".concat(bt).concat(pt.adjustmentsListRoute),headers:{Authorization:"Bearer ".concat(localStorage.invToken,",")}})}};const vt=Object(mt.b)({name:"warehouseSlice",initialState:{warehouseList:[],paginationProps:{page:0,totalPages:0,totalItems:0},singleWarehouse:{}},reducers:{addWarehouseList:(e,t)=>{let{payload:a}=t;e.warehouseList=a},addPaginationProps:(e,t)=>{let{payload:a}=t;e.paginationProps=a},addSingleWarehouse:(e,t)=>{let{payload:a}=t;e.singleWarehouse=a}}}),{addWarehouseList:ft,addPaginationProps:It,addSingleWarehouse:Ct}=vt.actions,wt=e=>t=>At.getAllWarehouse(e).then((e=>{const{currentPage:a,totalPages:n,warehouses:i}=e.data.data;t(It({page:a,totalPages:n,totalItems:i.filter((e=>!e.delFlag)).length})),t(ft(i.filter((e=>!e.delFlag))))})).catch((e=>{if(e.response)return Promise.reject(e.response.data)})),kt=e=>e.warehouseReducer;var St=vt.reducer,Pt=a(16);const Rt=Object(mt.b)({name:"itemSlice",initialState:{itemList:[],singleItem:{},paginationProps:{page:0,totalPages:0,totalItems:0}},reducers:{addItemList:(e,t)=>{let{payload:a}=t;e.itemList=a},addSingleItem:(e,t)=>{let{payload:a}=t;e.singleItem=a},addPaginationProps:(e,t)=>{let{payload:a}=t;e.paginationProps=a}}}),{addItemList:Bt,addPaginationProps:Vt,addSingleItem:qt}=Rt.actions,Nt=e=>t=>At.getAllItems(e).then((e=>{console.log(e,"item234");const{currentPage:a,totalPages:n,totalItems:i,items:r}=e.data.data;return t(Vt({page:a,totalPages:n,totalItems:i})),t(Bt(r.filter((e=>!e.delFlag)))),Promise.resolve(e.data.data)})).catch((e=>{if(e.response)return Promise.reject(e.response.data)})),Et=e=>e.itemReducer;var Ft=Rt.reducer;const Tt=Object(mt.b)({name:"itemGroupSlice",initialState:{itemGroupList:[],paginationProps:{page:0,totalPages:0,totalItemGroup:0},singleItemGroup:{}},reducers:{addItemGroup:(e,t)=>{let{payload:a}=t;e.itemGroupList=a},addPaginationProps:(e,t)=>{let{payload:a}=t;e.paginationProps=a},addSingleItemGroup:(e,t)=>{let{payload:a}=t;e.singleItemGroup=a}}}),{addItemGroup:Wt,addPaginationProps:zt,addSingleItemGroup:Dt}=Tt.actions,Gt=e=>t=>At.fetchAllItemGroups(e).then((e=>(t(Wt(e.data.data.filter((e=>!e.delFlag)))),Promise.resolve(e.data.data)))).catch((e=>{if(e.response)return Promise.reject(e.response.data)})),Qt=e=>t=>At.fetchItemGroupsByOrgId(e).then((e=>{const{currentPage:a,totalPages:n,totalItemGroup:i,item_group:r}=e.data;return t(zt({page:a,totalPages:n,totalItemGroup:i})),t(Wt(r.filter((e=>!e.delFlag)))),Promise.resolve(r.filter((e=>!e.delFlag)))})).catch((e=>{if(e.response)return Promise.reject(e.response.data)})),Ut=e=>e.itemGroupReducer;var Mt=Tt.reducer,Lt=a(485),Yt=a(478);const Kt=r.a.forwardRef((function(e,t){return Object(ce.jsx)(Yt.a,{elevation:6,ref:t,variant:"filled",...e})}));function Xt(e){const[t,a]=r.a.useState(!1);return Object(ce.jsx)(Lt.a,{open:e.open,autoHideDuration:6e3,onClose:e.onClose,children:Object(ce.jsx)(Kt,{onClose:e.onClose,severity:e.type,sx:{width:"100%"},children:e.message})})}const Ht=Object(mt.b)({name:"dashboardSlice",initialState:{usersByOrg:[],userProfile:{},itemGroupCount:0},reducers:{addUserProfile:(e,t)=>{let{payload:a}=t;e.userProfile=a},addUsersByOrg:(e,t)=>{let{payload:a}=t;e.usersByOrg=a}}}),{addUserProfile:Jt,addUsersByOrg:Zt}=Ht.actions,_t=e=>t=>At.getUserProfile(e).then((e=>(t(Jt(e.data)),t((e=>t=>At.getUsersByOrg(e).then((e=>{t(Zt(e.data))})).catch((e=>{e.response&&Promise.reject(e.response.data)})))({orgId:e.data.organisation.orgId})),Promise.resolve(e.data)))).catch((e=>{if(e.response)return console.log(e.response.status),401===e.response.status&&window.location.assign((e=>yt.split("api").length>2?e.replace(/dev/,"apps"):e.replace(/apps/,"dev"))("http://apps.ezoneerp.com/login")),Promise.reject(e.response.data)})),$t=e=>e.dashboardReducer;var ea=Ht.reducer;const ta=Object(mt.b)({name:"vendorSlice",initialState:{vendorList:[],paginationProps:{page:0,totalPages:0,totalItems:0}},reducers:{addVendorList:(e,t)=>{let{payload:a}=t;e.vendorList=a},addPaginationProps:(e,t)=>{let{payload:a}=t;e.paginationProps=a}}}),{addVendorList:aa,addPaginationProps:na}=ta.actions,ia=e=>t=>At.getVendors(e).then((e=>{const{currentPage:a,totalPages:n,totalVendors:i,vendors:r}=e.data;t(na({page:a,totalPages:n,totalItems:i})),t(aa(r))})).catch((e=>{if(e.response)return console.log(e.response.status),Promise.reject(e.response.data)})),ra=e=>e.vendorReducer;var sa,ca,oa=ta.reducer;const{TextArea:la}=Ze.a,{Option:da}=Pe.a,ua=Object(at.a)((e=>({root:{color:e.boldText,"&$checked":{color:e.boldText}}})))((e=>Object(ce.jsx)(nt.a,{color:"default",...e}))),ja={labelCol:{span:24},wrapperCol:{span:24}},ma=[{name:"itemName",label:"Item Name",isRequired:!0,type:"text"},{name:"sku",label:"SKU",isRequired:!1,type:"text"},{name:"itemGroup",label:"Item Group",isRequired:!1,type:"select"},{name:"itemType",label:"Item Type",isRequired:!1,type:"select"},{name:"itemCategory",label:"Item Category",isRequired:!0,type:"select"},{name:"description",label:"Description",isRequired:!1,type:"textarea"}],ba=[{name:"partNumber",label:"Part Number",isRequired:!1,type:"number"},{name:"sellingPrice",label:"Selling Price",isRequired:!0,type:"number"},{name:"costPrice",label:"Cost Price",isRequired:!1,type:"number"},{name:"unit",label:"Unit",isRequired:!0,type:"select"},{name:"itemDimension",label:"Dimension",isRequired:!1,type:"text"},{name:"lastUnitCost",label:"Last Unit Cost",isRequired:!1,type:"number"},{name:"itemWeight",label:"Weight",isRequired:!1,type:"number"}],pa=[{name:"warehouse1",label:"Warehouse",isRequired:!0,type:"select"},{name:"openStock1",label:"Opening Stock",isRequired:!0,type:"number"}],ha=[{name:"salesAccountId",label:"Sales Account",isRequired:!1,type:"select"}],ga=[{name:"purchaseAccountId",label:"Purchase Account",isRequired:!1,type:"select"}],xa=[{name:"inventoryAccountId",label:"Inventory Account",isRequired:!1,type:"number"}],Oa=[{name:"taxAccountId",label:"Tax Account",isRequired:!1,type:"number"}],ya=[{name:"reOrderPoint",label:"Reorder point",isRequired:!1,type:"number"},{name:"reOrderQuantity",label:"Reorder Quantity",isRequired:!1,type:"number"},{name:"maxInventory",label:"Maximum Inventory",isRequired:!1,type:"number"}],Aa=[{name:"vendorId",label:"Preferred Vendor",isRequired:!1,type:"select"}],va={accountId:5,wareHouseId:2,barcode:"sdfsdf",manufacturer:"jqjdijqefok",trashed:!1,fileFormat:"ijqwpokwep",fileUrl:"sadfaijosdf",quantity:432,accountingNumber:4232342},fa=[{value:"STOCK_ITEM",name:"Stock Item"},{value:"COMPONENT_ITEM",name:"Component Item"}],Ia=[{value:"GOODS",name:"Goods"},{value:"SERVICE",name:"Service"}],Ca=["Pieces","Kg","Dozen","Packs"],wa=e=>{const[t,a]=Object(i.useState)(pa),[n,r]=Object(i.useState)(!1),[s,c]=Object(i.useState)({}),[o,l]=Object(i.useState)([]),[d,u]=Object(i.useState)(!1),[j,m]=Object(i.useState)({open:!1,type:"",message:""}),{warehouseList:b}=Object(Pt.c)(kt),{itemGroupList:p}=Object(Pt.c)(Ut),{vendorList:h}=Object(Pt.c)(ra),{userProfile:g}=Object(Pt.c)($t),[x]=_e.a.useForm(),O=Object(le.f)(),y=Object(Pt.b)(),A=h.map(((e,t)=>Object(ce.jsx)(da,{value:e.id,children:"".concat(e.firstName," ").concat(e.lastName)},t))),v=b.map(((e,t)=>{var a;return Object(ce.jsx)(da,{value:e.id,children:null!==(a=e.name)&&void 0!==a?a:"item".concat(t)},t)})),I=fa.map(((e,t)=>Object(ce.jsx)(da,{value:e.value,children:e.name},t))),w=Ia.map(((e,t)=>Object(ce.jsx)(da,{value:e.value,children:e.name},t))),k=p.map(((e,t)=>Object(ce.jsx)(da,{value:e.id,children:e.groupName},t))),S=Ca.map(((e,t)=>Object(ce.jsx)(da,{value:e,children:e},t))),P=e=>t=>{const a={...s};a[e]=t,c(a)},R=ma.map(((e,t)=>"itemCategory"===e.name?Sa(e,P,I):"itemType"===e.name?Sa(e,P,w):"itemGroup"===e.name?Sa(e,P,k):Sa(e))),B=ba.map(((e,t)=>Object(ce.jsx)($e.a,{sm:12,children:Sa(e,P,S)}))),V=[...t].map((e=>Object(ce.jsx)($e.a,{sm:12,children:Sa(e,P,v)}))),q=ha.map((e=>Sa(e,P))),N=ga.map((e=>Sa(e,P))),E=xa.map((e=>Sa(e,P))),F=Oa.map((e=>Sa(e,P))),T=ya.map((e=>Object(ce.jsx)($e.a,{xs:8,children:Sa(e,P)}))),W=Aa.map((e=>Sa(e,P,A)));return Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(Ue,{title:"Add Item"}),Object(ce.jsxs)(_e.a,{onFinish:async e=>{try{var t;u(!0);const i={...s},r=Object.fromEntries(Object.entries(e).map((e=>{var t;let[a,n]=e;return n=null!==(t=i[a])&&void 0!==t?t:n,[a,n]}))),c=Object.entries(r).filter((e=>{let[t,a]=e;return t.startsWith("openStock")})),l=Object.entries(r).filter((e=>{let[t,a]=e;return t.startsWith("warehouse")})).map(((e,t)=>{let[a,n]=e;const[i,r]=c[t];return{warehouseID:n,openingStock:r}}));let d=Object.fromEntries(Object.entries(r).filter((e=>{let[t,a]=e;return!t.startsWith("openStock")&&!t.startsWith("warehouse")})));d.wareHouseRequest=l;const j=[...o].map((e=>({productImage:e})));d.imageList=j,d.orgId=null===g||void 0===g||null===(t=g.organisation)||void 0===t?void 0:t.orgId,d=Object.fromEntries(Object.entries(d).filter((e=>{let[t,a]=e;return void 0!==a}))),d.purchaseAccountId=34,d.salesAccountId=54;const b=(n=d,Object.fromEntries(Object.entries(n).map((e=>(isNaN(1*e[1])||(e[1]=1*parseInt(e[1]).toFixed()),e)))));await y((a={data:{...b,...va,values:e}},e=>At.createItem(a).then((e=>Promise.resolve(e.data.data))).catch((e=>{if(e.response)return Promise.reject(e.response.data)})))),await y(Nt({})),u(!1),m((e=>({...e,message:"Item has been created",open:!0,type:"success"}))),O.push("/items")}catch(i){console.log(i),u(!1),m((e=>{var t;return{...e,message:null!==(t=null===i||void 0===i?void 0:i.message)&&void 0!==t?t:"Error Occurred, please try again later",open:!0,type:"error"}}))}var a,n},...ja,form:x,children:[Object(ce.jsxs)(J,{mt:2,py:3,px:4,display:"flex",children:[Object(ce.jsx)(it.a,{item:!0,xs:6,children:Object(ce.jsx)(ka,{getImage:e=>{l(e)},imageArr:o})}),Object(ce.jsx)(it.a,{item:!0,xs:6,children:Object(ce.jsx)(f.a,{px:3,children:R})})]}),Object(ce.jsx)(J,{mt:2,py:3,px:4,display:"flex",children:Object(ce.jsx)(it.a,{item:!0,xs:12,children:Object(ce.jsx)(f.a,{px:3,children:Object(ce.jsx)(et.a,{gutter:16,children:B})})})}),Object(ce.jsx)(J,{mt:2,py:3,px:4,display:"flex",children:Object(ce.jsxs)(it.a,{item:!0,xs:12,children:[Object(ce.jsx)(f.a,{px:3,children:Object(ce.jsx)(C.a,{variant:"subtitle1",children:"Warehouse"})}),Object(ce.jsx)(f.a,{px:3,mt:2,children:Object(ce.jsx)(et.a,{gutter:16,children:V})}),Object(ce.jsx)(f.a,{px:3,mt:2,children:Object(ce.jsx)(We,{text:"Add Warehouse",onClick:()=>{const e=[...t],n=[{name:"warehouse1".concat(e.length),label:"Warehouse",isRequired:!1,type:"select"},{name:"openStock1".concat(e.length),label:"Opening Stock",isRequired:!1,type:"number"}];a((e=>[...e,...n]))}})})]})}),Object(ce.jsx)(J,{mb:2,mt:2,py:3,px:4,display:"flex",children:Object(ce.jsxs)(it.a,{item:!0,xs:12,children:[Object(ce.jsxs)(f.a,{display:"flex",px:2,alignItems:"center",children:[Object(ce.jsx)(ua,{onChange:e=>{r(e.target.checked)}}),Object(ce.jsx)(C.a,{variant:"subtitle1",children:"Inventory Accounting"})]}),Object(ce.jsx)(rt.a,{in:n,children:Object(ce.jsx)(f.a,{px:3,mt:6,children:Object(ce.jsxs)(et.a,{gutter:16,children:[Object(ce.jsxs)($e.a,{xs:12,children:[Object(ce.jsxs)(f.a,{mb:6,children:[Object(ce.jsx)(f.a,{mb:2,children:Object(ce.jsxs)(C.a,{gutterBottom:!0,variant:"subtitle2",children:[" ","Sales"," "]})}),q]}),Object(ce.jsxs)(f.a,{children:[Object(ce.jsx)(f.a,{mb:2,children:Object(ce.jsxs)(C.a,{gutterBottom:!0,variant:"subtitle2",children:[" ","Inventory"," "]})}),E]})]}),Object(ce.jsxs)($e.a,{xs:12,pt:"2",children:[Object(ce.jsxs)(f.a,{mb:6,children:[Object(ce.jsx)(f.a,{mb:2,children:Object(ce.jsxs)(C.a,{gutterBottom:!0,variant:"subtitle2",children:[" ","Purchase"," "]})}),N]}),Object(ce.jsx)(f.a,{mb:2,children:Object(ce.jsxs)(C.a,{gutterBottom:!0,variant:"subtitle2",children:[" ","Tax"," "]})}),F]})]})})})]})}),Object(ce.jsxs)(J,{children:[Object(ce.jsx)(f.a,{pt:4,px:6,children:Object(ce.jsx)(C.a,{variant:"subtitle1",children:"Reorder point Parameters"})}),Object(ce.jsx)(f.a,{px:6,children:Object(ce.jsx)(et.a,{gutter:16,children:T})})]}),Object(ce.jsxs)(J,{children:[Object(ce.jsx)(it.a,{xs:6,children:Object(ce.jsx)(f.a,{pt:4,px:6,mt:2,children:W})}),Object(ce.jsx)(it.a,{xs:12,children:Object(ce.jsxs)(f.a,{pb:6,mt:6,display:"flex",justifyContent:"center",children:[Object(ce.jsx)(De,{style:{width:"30%",marginRight:"20px"},text:"Cancel"}),Object(ce.jsx)(We,{style:{width:"30%"},text:"Save",type:"submit",loading:d})]})})]})]}),Object(ce.jsx)(Xt,{open:j.open,message:j.message,type:j.type,onClose:()=>m((e=>({...e,open:!1})))})]})},ka=e=>{const[t,a]=Object(i.useState)(0),n=Object(i.useCallback)((t=>{let a=[];t.slice(0,3).forEach((async(n,i)=>{const r=await jt(n).catch((e=>console.log(e)));a=[...a,r],a.length===t.slice(0,3).length&&e.getImage(a)}))}),[]),{getRootProps:r,getInputProps:s,isDragActive:c}=Object(ut.a)({onDrop:n}),o=[...e.imageArr].map(((n,i)=>Object(ce.jsx)(lt,{onClick:()=>a(i),isActive:t===i,children:Object(ce.jsx)("img",{src:e.imageArr[i],alt:""})},i)));return Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(f.a,{px:3,pt:2,children:Object(ce.jsxs)(st,{isImage:e.imageArr.length,...r(),children:[Object(ce.jsx)("input",{...s()}),c?Object(ce.jsx)("p",{children:"Drop the image(s) here ..."}):e.imageArr.length?Object(ce.jsx)(ct,{children:Object(ce.jsx)("img",{src:e.imageArr[t],alt:""})}):Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(dt.a,{}),Object(ce.jsx)(ot,{variant:"body1",children:"Drag image to upload"}),Object(ce.jsx)(f.a,{mt:2,children:Object(ce.jsx)(We,{text:"Choose Image"})})]})]})}),!e.hideFooterText&&Object(ce.jsx)(f.a,{px:3,children:Object(ce.jsx)(C.a,{variant:"caption",children:"You can add up to 3 images"})}),Object(ce.jsx)(f.a,{mt:3,px:3,display:"flex",alignItems:"center",children:o})]})},Sa=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0;return"text"===e.type||"number"===e.type||"phone"===e.type?Object(ce.jsx)(_e.a.Item,{name:e.name,label:Object(ce.jsx)(Z,{children:e.label}),rules:[{required:e.isRequired}],children:Object(ce.jsx)(Y,{children:Object(ce.jsx)(Ze.a,{required:e.isRequired,type:e.type,disabled:e.disabled,defaultValue:e.defaultValue,bordered:!1})})},e.name):"textarea"===e.type?Object(ce.jsx)(_e.a.Item,{name:e.name,label:Object(ce.jsx)(Z,{children:e.label}),rules:[{required:e.isRequired}],children:Object(ce.jsx)(Y,{children:Object(ce.jsx)(la,{defaultValue:e.defaultValue,bordered:!1,autoSize:{minRows:3}})})},e.name):"select"===e.type?Object(ce.jsx)(_e.a.Item,{name:e.name,label:Object(ce.jsx)(Z,{children:e.label}),rules:[{required:e.isRequired}],children:Object(ce.jsx)(Pa,{placeholder:"Select ".concat(e.label),style:{width:"100%",textAlign:"left"},bordered:!1,onChange:t(e.name),defaultValue:e.defaultValue,children:a.length>0?a:Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(da,{value:"jack",children:"Jack"}),Object(ce.jsx)(da,{value:"lucy",children:"Lucy"}),Object(ce.jsx)(da,{value:"disabled",disabled:!0,children:"Disabled"}),Object(ce.jsx)(da,{value:"Yiminghe",children:"yiminghe"})]})})},e.name):"date"===e.type?Object(ce.jsx)(_e.a.Item,{name:e.name,label:Object(ce.jsx)(Z,{children:e.label}),rules:[{required:e.isRequired}],children:Object(ce.jsx)(Y,{children:Object(ce.jsx)(tt.a,{onChange:t(e.name),defaultValue:e.defaultValue,placeholder:"",style:{width:"100%"},bordered:!1})})},e.name):"search"===e.type?Object(ce.jsxs)(_e.a.Item,{name:e.name,label:Object(ce.jsx)(Z,{children:e.label}),rules:[{required:e.isRequired}],children:[Object(ce.jsx)(Y,{children:Object(ce.jsx)(Pe.a,{showSearch:!0,style:{width:"100%",textAlign:"left"},placeholder:"Select ".concat(e.label),bordered:!1,optionFilterProp:"children",onChange:t(e.name),onFocus:null===n||void 0===n?void 0:n.onFocus,onBlur:null===n||void 0===n?void 0:n.onBlur,onSearch:null===n||void 0===n?void 0:n.onSearch,filterOption:(e,t)=>t.children.toLowerCase().indexOf(e.toLowerCase())>=0,defaultValue:e.defaultValue,children:a.length>0?a:Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(da,{value:"jack",children:"Jack"}),Object(ce.jsx)(da,{value:"lucy",children:"Lucy"}),Object(ce.jsx)(da,{value:"disabled",disabled:!0,children:"Disabled"}),Object(ce.jsx)(da,{value:"Yiminghe",children:"yiminghe"})]})})}),i&&Object(ce.jsxs)(f.a,{onClick:()=>i(e.name),style:{cursor:"pointer",color:"red"},mt:1,display:"flex",alignItems:"center",justifyContent:"flex-end",children:[Object(ce.jsx)(dt.d,{}),Object(ce.jsx)(_,{style:{color:"red"},variant:"caption",children:"Add Customer"})]})]},e.name):void 0},Pa=(Object(d.c)(Pe.a)(sa||(sa=Object(o.a)(["\n  /* border: 1px solid ","; */\n  width: 100%;\n  padding: 4px;\n  border-radius: 5px;\n  & .ant-select:not(.ant-select-disabled):hover .ant-select-selector {\n    border-color: "," !important;\n    padding: 4px !important;\n    border-radius: 5px !important;\n  }\n\n  & .ant-form-item .ant-select, .ant-form-item .ant-cascader-picker{\n    border-color: "," !important;\n    padding: 4px !important;\n    border-radius: 5px !important;\n  }\n  & p {\n    color: ",";\n  }\n"])),(e=>e.theme.border),(e=>e.theme.border),(e=>e.theme.border),(e=>e.theme.lightText)),Object(d.c)(Pe.a)(ca||(ca=Object(o.a)(["\n    border: 1px solid ",";\n    background-color: ",";\n    box-shadow: none;\n    padding: 4px;\n    border-radius: 5px !important;\n\n    &:focus, &:hover{\n        /* border: 1px solid ","; */\n       /*  background-color: ","; */\n        outline: 0;\n    }\n\n\n  "])),(e=>e.theme.border),(e=>e.theme.secondaryColor),(e=>e.theme.primaryColor),(e=>e.theme.secondaryColor))),Ra=[{title:"Item Name",value:"Mike Bamidele",key:"itemName"},{title:"Item ID",value:"Lucas John",key:"id"},{title:"Item Category",value:"Service",key:"itemCategory"},{key:"itemGroup",title:"Item Group",value:""},{key:"itemType",title:"Item Type",value:""},{title:"SKU/UPC",value:"dd/mm/yy",key:"sku"},{title:"Description",value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Convallis tempor, tincidunt. Eget molestie placerat mattis sed eget hendrerit quam leo eget.",key:"description"}],Ba=[{key:"partNumber",title:"Part Number",value:""},{key:"sellingPrice",title:"Selling Price",isRequired:!1,type:"number"},{key:"costPrice",title:"Cost Price",isRequired:!1,type:"number"},{key:"unit",title:"Unit",isRequired:!1,type:"select"},{key:"itemDimension",title:"Dimension",isRequired:!1,type:"text"},{key:"lastUnitCost",title:"Last Unit Cost",isRequired:!1,type:"number"},{key:"itemWeight",title:"Weight",isRequired:!1,type:"number"}],Va=[{title:"Quantity on Hand",value:"2000",key:"quantity"},{title:"Reorder Level",value:"20",key:"reOrderPoint"}],qa=[{title:"Sales Account",value:"Income",key:"salesAccountId"}],Na=[{title:"Purchase Account",value:"Cost of good sold",key:"purchaseAccountId"}],Ea=[{title:"Inventory Account",value:"Income",key:"inventoryAccountCode"}],Fa=[{title:"Tax Account",value:"Income",key:"taxAccountId"}],Ta=e=>{var t;const{id:a}=Object(le.h)(),[n,r]=Object(i.useState)({itemsImages:[]});Object(i.useEffect)((()=>{(async()=>{try{const e=await At.getSingleItem({id:a});console.log(e,"singleItem"),r(e.data.data)}catch(e){console.log(e)}})()}),[a]);const s=Ra.map(((e,t)=>{if("itemCategory"===e.key)e.value=n[e.key]?n[e.key].split("_").join(" "):"No value";else if("itemGroup"===e.key){var a;e.value=null===n||void 0===n||null===(a=n.itemGroups)||void 0===a?void 0:a.id}else{var i;e.value=null!==(i=n[e.key])&&void 0!==i?i:"No value"}return Object(ce.jsx)(Wa,{title:e.title,value:e.value},t)})),c=Ba.map(((e,t)=>{var a;"itemType"===e.key?e.value="1"===n[e.key]?"Goods":"2"===n[e.key]?"Service":"No value":e.value=null!==(a=n[e.key])&&void 0!==a?a:"No value";return Object(ce.jsx)($e.a,{xs:12,children:Object(ce.jsx)(Wa,{title:e.title,value:e.value},t)})})),o=Va.map(((e,t)=>{var a;return e.value=null!==(a=n[e.key])&&void 0!==a?a:"No value",Object(ce.jsx)($e.a,{xs:12,children:Object(ce.jsx)(Wa,{title:e.title,value:e.value},t)})})),l=qa.map(((e,t)=>{var a;return e.value=null!==(a=n[e.key])&&void 0!==a?a:"No value",Object(ce.jsx)(Wa,{title:e.title,value:e.value},t)})),d=Na.map(((e,t)=>{var a;return e.value=null!==(a=n[e.key])&&void 0!==a?a:"No value",Object(ce.jsx)(Wa,{title:e.title,value:e.value},t)})),u=Ea.map(((e,t)=>{var a;return e.value=null!==(a=n[e.key])&&void 0!==a?a:"No value",Object(ce.jsx)(Wa,{title:e.title,value:e.value},t)})),j=Fa.map(((e,t)=>{var a;return e.value=null!==(a=n[e.key])&&void 0!==a?a:"No value",Object(ce.jsx)(Wa,{title:e.title,value:e.value},t)})),m=null===n||void 0===n||null===(t=n.itemsImages)||void 0===t?void 0:t.map((e=>(console.log(e,"888"),e.fileUrl))),b=n.itemGroups.items.map((e=>e.itemsImages.map((e=>e.fileName))));return console.log(b,"imageArr"),Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(Ue,{title:"Product Name"}),Object(ce.jsxs)(J,{mt:2,py:3,px:4,display:"flex",children:[Object(ce.jsx)(it.a,{xs:5,children:Object(ce.jsx)(ka,{imageArr:"data:image/jpg,base64,".concat(m),hideFooterText:!0})}),Object(ce.jsx)(it.a,{xs:7,children:Object(ce.jsx)(f.a,{ml:6,mt:2,children:s})})]}),Object(ce.jsx)(J,{mt:2,px:4,pt:4,children:Object(ce.jsx)(et.a,{children:c})}),Object(ce.jsxs)(J,{mt:2,px:4,pt:4,children:[Object(ce.jsx)(za,{text:"Physical Stock"}),Object(ce.jsx)(et.a,{children:o})]}),Object(ce.jsxs)(J,{mt:2,px:4,pt:4,children:[Object(ce.jsxs)(et.a,{style:{marginBottom:32},children:[Object(ce.jsxs)($e.a,{xs:12,children:[Object(ce.jsx)(za,{text:"Sales"}),l]}),Object(ce.jsxs)($e.a,{xs:12,children:[Object(ce.jsx)(za,{text:"Purchase"}),d]})]}),Object(ce.jsxs)(et.a,{children:[Object(ce.jsxs)($e.a,{xs:12,children:[Object(ce.jsx)(za,{text:"Inventory"}),u]}),Object(ce.jsxs)($e.a,{xs:12,children:[Object(ce.jsx)(za,{text:"Tax"}),j]})]})]})]})},Wa=e=>{let{title:t,value:a,...n}=e;return Object(ce.jsxs)(f.a,{display:"flex",alignItems:"flex-start",children:[Object(ce.jsx)(f.a,{flexShrink:0,flexBasis:"40%",mb:4,children:Object(ce.jsx)($,{variant:"body1",children:t})}),Object(ce.jsx)(f.a,{flexBasis:"auto",mx:2,children:Object(ce.jsx)($,{style:{fontWeight:500},variant:"body1",children:":"})}),Object(ce.jsx)(f.a,{flexBasis:"auto",children:Object(ce.jsx)(_,{variant:"body1",children:a})})]})},za=e=>Object(ce.jsx)(f.a,{mb:3,children:Object(ce.jsx)($,{variant:"subtitle2",children:e.text})});var Da=a(482),Ga=a(486),Qa=a(465);const Ua={labelCol:{span:24},wrapperCol:{span:24}},Ma=Object(O.a)((e=>({modal:{display:"flex",alignItems:"center",justifyContent:"center"}}))),La=e=>{const t=Ma();return Object(ce.jsx)(Da.a,{"aria-labelledby":"transition-modal-title","aria-describedby":"transition-modal-description",className:t.modal,open:e.open,onClose:e.onClose,closeAfterTransition:!0,BackdropComponent:Ga.a,BackdropProps:{timeout:500},children:Object(ce.jsx)(Qa.a,{direction:"up",in:e.open,mountOnEnter:!0,unmountOnExit:!0,children:e.children})})},Ya=e=>Object(ce.jsx)(ee,{title:e.title,visible:e.visible,okButtonProps:{loading:e.loading,htmlType:"submit",style:{backgroundColor:m,border:"1px solid ".concat(m)}},cancelButtonProps:{type:"danger"},onOk:()=>{e.form.submit()},okText:e.okText||"Create",onCancel:e.onCancel,children:Object(ce.jsx)(_e.a,{initialValues:e.initialValues,form:e.form,...Ua,onFinish:e.onFinish,children:e.children})}),Ka=e=>{var t;return Object(ce.jsx)(ee,{title:e.title,visible:e.visible,okButtonProps:{loading:e.loading,htmlType:"submit",style:{backgroundColor:m,border:"1px solid ".concat(m)}},cancelButtonProps:{type:"danger"},onOk:e.onOk,okText:null!==(t=e.okText)&&void 0!==t?t:"Create",onCancel:e.onCancel,children:e.children})};function Xa(e){return Object(ce.jsx)(La,{open:e.open,onClose:e.onClose,children:Object(ce.jsxs)(ie.a,{style:{minWidth:"30vw",padding:"16px"},children:[Object(ce.jsx)(f.a,{children:Object(ce.jsx)($,{align:"center",variant:"subtitle1",children:e.title})}),Object(ce.jsx)(f.a,{mt:3,children:Object(ce.jsxs)(_,{variant:"body2",align:"center",children:["Do you want to delete ",Object(ce.jsx)("strong",{children:e.itemName}),"?"]})}),Object(ce.jsxs)(f.a,{p:3,display:"flex",justifyContent:"flex-end",children:[Object(ce.jsx)(f.a,{mr:2,children:Object(ce.jsx)(De,{onClick:e.onClose,text:"Cancel"})}),Object(ce.jsx)(ze,{loading:e.loading,onClick:e.onDelete,type:"submit",text:"Delete"})]})]})})}const{TextArea:Ha}=Ze.a,{Option:Ja}=Pe.a,Za=Object(at.a)((e=>({root:{color:e.boldText,"&$checked":{color:e.boldText}}})))((e=>Object(ce.jsx)(nt.a,{color:"default",...e}))),_a={labelCol:{span:24},wrapperCol:{span:24}},$a=[{name:"itemName",label:"Item Name",isRequired:!0,type:"text"},{name:"sku",label:"SKU",isRequired:!0,type:"text"},{name:"itemGroup",label:"Item Group",isRequired:!1,type:"select"},{name:"itemType",label:"Item Type",isRequired:!1,type:"select"},{name:"itemCategory",label:"Item Category",isRequired:!1,type:"select"},{name:"description",label:"Description",isRequired:!0,type:"textarea"}],en=[{name:"partNumber",label:"Part Number",isRequired:!1,type:"number"},{name:"sellingPrice",label:"Selling Price",isRequired:!1,type:"number"},{name:"costPrice",label:"Cost Price",isRequired:!1,type:"number"},{name:"unit",label:"Unit",isRequired:!1,type:"select"},{name:"itemDimension",label:"Dimension",isRequired:!1,type:"text"},{name:"lastUnitCost",label:"Last Unit Cost",isRequired:!1,type:"number"},{name:"itemWeight",label:"Weight",isRequired:!1,type:"number"}],tn=[{name:"warehouse1",label:"Warehouse",isRequired:!1,type:"select"},{name:"openStock1",label:"Opening Stock",isRequired:!1,type:"number"}],an=[{name:"salesAccountId",label:"Sales Account",isRequired:!1,type:"select"}],nn=[{name:"purchaseAccountId",label:"Purchase Account",isRequired:!1,type:"select"}],rn=[{name:"inventoryAccountId",label:"Inventory Account",isRequired:!1,type:"number"}],sn=[{name:"taxAccountId",label:"Tax Account",isRequired:!1,type:"number"}],cn=[{name:"reOrderPoint",label:"Reorder point",isRequired:!1,type:"number"},{name:"reOrderQuantity",label:"Reorder Quantity",isRequired:!1,type:"number"},{name:"maxInventory",label:"Maximum Inventory",isRequired:!1,type:"number"}],on=[{name:"vendorId",label:"Preferred Vendor",isRequired:!1,type:"select"}],ln=[{value:"STOCK_ITEM",name:"Stock Item"},{value:"COMPONENT_ITEM",name:"Component Item"}],dn=[{value:"GOODS",name:"Goods"},{value:"SERVICE",name:"Service"}],un=["Pieces","Kg","Dozen","Packs"],jn=e=>{const{warehouseList:t}=Object(Pt.c)(kt),{itemGroupList:a}=Object(Pt.c)(Ut),{userProfile:n}=Object(Pt.c)($t),{vendorList:r}=Object(Pt.c)(ra),[s,c]=Object(i.useState)(tn),[o,l]=Object(i.useState)(!0),[d,u]=Object(i.useState)({}),[j,m]=Object(i.useState)([]),[b,p]=Object(i.useState)(!1),[h]=_e.a.useForm(),[g,x]=(Object(le.f)(),Object(Pt.b)(),Object(i.useState)({open:!1,type:"",message:""})),[O,y]=Object(i.useState)({}),{id:A}=Object(le.h)(),[v,I]=Object(i.useState)([]),[w,k]=Object(i.useState)([]),[S,P]=Object(i.useState)(tn),[R,B]=Object(i.useState)([]),[V,q]=Object(i.useState)([]),[N,E]=Object(i.useState)([]),[F,T]=Object(i.useState)([]),[W,z]=Object(i.useState)([]),[D,G]=Object(i.useState)([]);Object(i.useEffect)((()=>{(async()=>{try{const e=await At.getSingleItem({id:A});y(e.data.data),h.setFieldsValue({...e.data.data,itemType:"1"===e.data.data.itemType?"Goods":"Service",itemCategory:"1"===e.data.data.itemCategory?"Stock Item":"Component Item",itemGroup:e.data.data.itemGroups.groupName,vendorId:r.find((t=>t.id===e.data.data.vendorId))});const t=$a.map(((t,n)=>{if(t.defaultValue=e.data.data[t.name],"itemCategory"===t.name)return t.defaultValue=1*e.data.data[t.name]===1?"Stock Item":"Component Item",bn(t,Y,U);if("itemType"===t.name)return t.defaultValue=1*e.data.data[t.name]===1?"Goods":"Service",bn(t,Y,M);if("itemGroup"===t.name){const n=a.map(((e,t)=>Object(ce.jsx)(Ja,{value:e.groupName,children:e.groupName},t)));return t.defaultValue=e.data.data.itemGroups.groupName,bn(t,Y,n)}return bn(t)})),n=en.map(((t,a)=>(t.defaultValue=e.data.data[t.name],Object(ce.jsx)($e.a,{sm:12,children:bn(t,Y,L)})))),i=an.map((t=>(t.defaultValue=e.data.data[t.name],bn(t,Y)))),s=nn.map((t=>(t.defaultValue=e.data.data[t.name],bn(t,Y)))),c=rn.map((t=>(t.defaultValue=e.data.data[t.name],bn(t,Y)))),o=sn.map((t=>(t.defaultValue=e.data.data[t.name],bn(t,Y)))),l=cn.map((t=>(t.defaultValue=e.data.data[t.name],Object(ce.jsx)($e.a,{xs:8,children:bn(t,Y)})))),d=on.map((t=>{var a;const n=r.map(((e,t)=>Object(ce.jsx)(Ja,{value:e.id,children:"".concat(e.firstName," ").concat(e.lastName)},t)));return t.defaultValue=null===(a=e.data.data[t.name])||void 0===a?void 0:a.id,bn(t,Y,n)}));G(d),z(l),T(o),E(c),q(s),B(i),k(n),I(t)}catch(e){console.log(e)}})()}),[A,a]),Object(i.useEffect)((()=>{0===Object.entries(O).length?h.resetFields():h.setFieldsValue(O)}),[O]);const Q=t.map(((e,t)=>{var a;return Object(ce.jsx)(Ja,{value:e.id,children:null!==(a=e.name)&&void 0!==a?a:"item".concat(t)},t)})),U=ln.map(((e,t)=>Object(ce.jsx)(Ja,{value:e.value,children:e.name},t))),M=dn.map(((e,t)=>Object(ce.jsx)(Ja,{value:e.value,children:e.name},t))),L=un.map(((e,t)=>Object(ce.jsx)(Ja,{value:e,children:e},t))),Y=e=>t=>{const a={...d};a[e]=t,u(a)},K=[...s].map((e=>(e.defaultValue=O[e.name],Object(ce.jsx)($e.a,{sm:12,children:bn(e,Y,Q)}))));return Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(Ue,{title:"Edit Item"}),Object(ce.jsxs)(_e.a,{initialValues:O,onFinish:async e=>{try{const t={...O,itemType:"1"===O.itemType?"GOODS":"SERVICE",itemCategory:"1"===O.itemCategory?"STOCK_ITEM":"COMPONENT_ITEM"},a={...d};e.itemType="1"===e.itemType?"GOODS":"SERVICE",e.itemCategory="1"===e.itemCategory?"STOCK_ITEM":"COMPONENT_ITEM";let n=Object.fromEntries(Object.entries(e).map((e=>{var n,i;let[r,s]=e;return s=null!==(n=null!==(i=a[r])&&void 0!==i?i:s)&&void 0!==n?n:t[r],[r,s]})));n=Object.fromEntries(Object.entries(t).map((e=>{var t;let[a,i]=e;return i=null!==(t=n[a])&&void 0!==t?t:i,[a,i]}))),n.itemGroup=n.itemGroups.groupName,delete n.itemGroups,n.imageList=[{productImage:"sdevfewferf"}],console.log(e,"valuesEdit");const i=await At.updateItem({data:n,id:n.id});console.log(i,"editItem")}catch(t){console.log(t)}},..._a,form:h,children:[Object(ce.jsxs)(J,{mt:2,py:3,px:4,display:"flex",children:[Object(ce.jsx)(it.a,{item:!0,xs:6,children:Object(ce.jsx)(mn,{getImage:e=>{m(e)},imageArr:j})}),Object(ce.jsx)(it.a,{item:!0,xs:6,children:Object(ce.jsx)(f.a,{px:3,children:v})})]}),Object(ce.jsx)(J,{mt:2,py:3,px:4,display:"flex",children:Object(ce.jsx)(it.a,{item:!0,xs:12,children:Object(ce.jsx)(f.a,{px:3,children:Object(ce.jsx)(et.a,{gutter:16,children:w})})})}),Object(ce.jsx)(J,{mt:2,py:3,px:4,display:"flex",children:Object(ce.jsxs)(it.a,{item:!0,xs:12,children:[Object(ce.jsx)(f.a,{px:3,children:Object(ce.jsx)(C.a,{variant:"subtitle1",children:"Warehouse"})}),Object(ce.jsx)(f.a,{px:3,mt:2,children:Object(ce.jsx)(et.a,{gutter:16,children:K})}),Object(ce.jsx)(f.a,{px:3,mt:2,children:Object(ce.jsx)(We,{text:"Add Warehouse",onClick:()=>{const e=[...s],t=[{name:"warehouse1".concat(e.length),label:"Warehouse",isRequired:!1,type:"select"},{name:"openStock1".concat(e.length),label:"Opening Stock",isRequired:!1,type:"number"}];c((e=>[...e,...t]))}})})]})}),Object(ce.jsx)(J,{mb:2,mt:2,py:3,px:4,display:"flex",children:Object(ce.jsxs)(it.a,{item:!0,xs:12,children:[Object(ce.jsxs)(f.a,{display:"flex",px:2,alignItems:"center",children:[Object(ce.jsx)(Za,{onChange:e=>{l(e.target.checked)}}),Object(ce.jsx)(C.a,{variant:"subtitle1",children:"Inventory Accounting"})]}),Object(ce.jsx)(rt.a,{in:o,children:Object(ce.jsx)(f.a,{px:3,mt:6,children:Object(ce.jsxs)(et.a,{gutter:16,children:[Object(ce.jsxs)($e.a,{xs:12,children:[Object(ce.jsxs)(f.a,{mb:6,children:[Object(ce.jsx)(f.a,{mb:2,children:Object(ce.jsxs)(C.a,{gutterBottom:!0,variant:"subtitle2",children:[" ","Sales"," "]})}),R]}),Object(ce.jsxs)(f.a,{children:[Object(ce.jsx)(f.a,{mb:2,children:Object(ce.jsxs)(C.a,{gutterBottom:!0,variant:"subtitle2",children:[" ","Inventory"," "]})}),N]})]}),Object(ce.jsxs)($e.a,{xs:12,pt:"2",children:[Object(ce.jsxs)(f.a,{mb:6,children:[Object(ce.jsx)(f.a,{mb:2,children:Object(ce.jsxs)(C.a,{gutterBottom:!0,variant:"subtitle2",children:[" ","Purchase"," "]})}),V]}),Object(ce.jsx)(f.a,{mb:2,children:Object(ce.jsxs)(C.a,{gutterBottom:!0,variant:"subtitle2",children:[" ","Tax"," "]})}),F]})]})})})]})}),Object(ce.jsxs)(J,{children:[Object(ce.jsx)(f.a,{pt:4,px:6,children:Object(ce.jsx)(C.a,{variant:"subtitle1",children:"Reorder point Parameters"})}),Object(ce.jsx)(f.a,{px:6,children:Object(ce.jsx)(et.a,{gutter:16,children:W})})]}),Object(ce.jsxs)(J,{children:[Object(ce.jsx)(it.a,{xs:6,children:Object(ce.jsx)(f.a,{pt:4,px:6,mt:2,children:D})}),Object(ce.jsx)(it.a,{xs:12,children:Object(ce.jsxs)(f.a,{pb:6,mt:6,display:"flex",justifyContent:"center",children:[Object(ce.jsx)(De,{style:{width:"30%",marginRight:"20px"},text:"Cancel"}),Object(ce.jsx)(We,{style:{width:"30%"},text:"Save",type:"submit",loading:b})]})})]})]}),Object(ce.jsx)(Xt,{open:g.open,message:g.message,type:g.type,onClose:()=>x((e=>({...e,open:!1})))})]})},mn=e=>{const[t,a]=Object(i.useState)(0),n=Object(i.useCallback)((t=>{let a=[];t.slice(0,3).forEach((async(n,i)=>{const r=await jt(n).catch((e=>console.log(e)));a=[...a,r],a.length===t.slice(0,3).length&&e.getImage(a)}))}),[]),{getRootProps:r,getInputProps:s,isDragActive:c}=Object(ut.a)({onDrop:n}),o=[...e.imageArr].map(((n,i)=>Object(ce.jsx)(lt,{onClick:()=>a(i),isActive:t===i,children:Object(ce.jsx)("img",{src:e.imageArr[i],alt:""})},i)));return Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(f.a,{px:3,pt:2,children:Object(ce.jsxs)(st,{isImage:e.imageArr.length,...r(),children:[Object(ce.jsx)("input",{...s()}),c?Object(ce.jsx)("p",{children:"Drop the image(s) here ..."}):e.imageArr.length?Object(ce.jsx)(ct,{children:Object(ce.jsx)("img",{src:e.imageArr[t],alt:""})}):Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(dt.a,{}),Object(ce.jsx)(ot,{variant:"body1",children:"Drag image to upload"}),Object(ce.jsx)(f.a,{mt:2,children:Object(ce.jsx)(We,{text:"Choose Image"})})]})]})}),!e.hideFooterText&&Object(ce.jsx)(f.a,{px:3,children:Object(ce.jsx)(C.a,{variant:"caption",children:"You can add up to 3 images"})}),Object(ce.jsx)(f.a,{mt:3,px:3,display:"flex",alignItems:"center",children:o})]})},bn=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0;return"text"===e.type||"number"===e.type||"phone"===e.type?Object(ce.jsx)(_e.a.Item,{name:e.name,label:Object(ce.jsx)(Z,{children:e.label}),rules:[{required:e.isRequired}],children:Object(ce.jsx)(Y,{children:Object(ce.jsx)(Ze.a,{required:e.isRequired,type:e.type,disabled:e.disabled,defaultValue:e.defaultValue,bordered:!1})})},e.name):"textarea"===e.type?Object(ce.jsx)(_e.a.Item,{name:e.name,label:Object(ce.jsx)(Z,{children:e.label}),rules:[{required:e.isRequired}],children:Object(ce.jsx)(Y,{children:Object(ce.jsx)(Ha,{defaultValue:e.defaultValue,bordered:!1,autoSize:{minRows:3}})})},e.name):"select"===e.type?Object(ce.jsx)(_e.a.Item,{name:e.name,label:Object(ce.jsx)(Z,{children:e.label}),rules:[{required:e.isRequired}],children:Object(ce.jsx)(Y,{children:Object(ce.jsx)(Pe.a,{placeholder:"Select ".concat(e.label),style:{width:"100%",textAlign:"left"},bordered:!1,onChange:t(e.name),defaultValue:e.defaultValue,children:a.length>0?a:Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(Ja,{value:"jack",children:"Jack"}),Object(ce.jsx)(Ja,{value:"lucy",children:"Lucy"}),Object(ce.jsx)(Ja,{value:"disabled",disabled:!0,children:"Disabled"}),Object(ce.jsx)(Ja,{value:"Yiminghe",children:"yiminghe"})]})})})},e.name):"date"===e.type?Object(ce.jsx)(_e.a.Item,{name:e.name,label:Object(ce.jsx)(Z,{children:e.label}),rules:[{required:e.isRequired}],children:Object(ce.jsx)(Y,{children:Object(ce.jsx)(tt.a,{onChange:t(e.name),defaultValue:e.defaultValue,placeholder:"",style:{width:"100%"},bordered:!1})})},e.name):"search"===e.type?Object(ce.jsxs)(_e.a.Item,{name:e.name,label:Object(ce.jsx)(Z,{children:e.label}),rules:[{required:e.isRequired}],children:[Object(ce.jsx)(Y,{children:Object(ce.jsx)(Pe.a,{showSearch:!0,style:{width:"100%",textAlign:"left"},placeholder:"Select ".concat(e.label),bordered:!1,optionFilterProp:"children",onChange:t(e.name),onFocus:null===n||void 0===n?void 0:n.onFocus,onBlur:null===n||void 0===n?void 0:n.onBlur,onSearch:null===n||void 0===n?void 0:n.onSearch,filterOption:(e,t)=>t.children.toLowerCase().indexOf(e.toLowerCase())>=0,defaultValue:e.defaultValue,children:a.length>0?a:Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(Ja,{value:"jack",children:"Jack"}),Object(ce.jsx)(Ja,{value:"lucy",children:"Lucy"}),Object(ce.jsx)(Ja,{value:"disabled",disabled:!0,children:"Disabled"}),Object(ce.jsx)(Ja,{value:"Yiminghe",children:"yiminghe"})]})})}),i&&Object(ce.jsxs)(f.a,{onClick:()=>i(e.name),style:{cursor:"pointer",color:"red"},mt:1,display:"flex",alignItems:"center",justifyContent:"flex-end",children:[Object(ce.jsx)(dt.d,{}),Object(ce.jsx)(_,{style:{color:"red"},variant:"caption",children:"Add Customer"})]})]},e.name):void 0},pn=e=>{const[t,a]=r.a.useState(0),[n,s]=r.a.useState(10),{url:c,path:o}=Object(le.i)(),l=Object(le.f)(),{itemList:d,paginationProps:u}=Object(Pt.c)(Et),j=Object(Pt.b)();console.log({itemList:d,paginationProps:u},"itemlist");const[m,b]=Object(i.useState)({visible:!1,name:"",id:null,loading:!1}),[p,h]=Object(i.useState)({open:!1,type:"",message:""}),g=[{title:"Item",dataIndex:"itemName",key:"itemName"},{title:"Item Class",dataIndex:"itemCategory",key:"itemCategory",render:e=>"1"===e?"Stock Item":"Component Item"},{title:"Unit Price",dataIndex:"lastUnitCost",key:"lastUnitCost"},{title:"Unit Cost",dataIndex:"costPrice",key:"costPrice"},{title:"Stock on hand",dataIndex:"quantity",key:"quantity"},{title:"Warehouse",dataIndex:"wareHouseName",key:"wareHouseName"},{title:"Action",dataIndex:"action",key:"action",width:"5%",render:(e,t)=>{const a=Object(ce.jsxs)(He.b,{direction:"vertical",size:"small",children:[Object(ce.jsx)("p",{style:{cursor:"pointer"},onClick:()=>l.push("".concat(c,"/").concat(t.id)),children:"View Detail"}),Object(ce.jsx)("p",{style:{cursor:"pointer"},onClick:()=>l.push("".concat(c,"/").concat(t.id,"/edit")),children:"Edit"}),Object(ce.jsx)("p",{onClick:()=>b({name:t.itemName,id:t.id,visible:!0}),style:{color:"red",cursor:"pointer"},children:"Delete"})]});return Object(ce.jsx)(Je.a,{content:a,trigger:"click",children:Object(ce.jsx)(dt.c,{})})}}];return Object(ce.jsxs)(le.c,{children:[Object(ce.jsxs)(le.a,{exact:!0,path:o,children:[Object(ce.jsx)(Ue,{title:"All Items",showtools:!0,onCreate:()=>{l.push("".concat(c,"/add-item"))},createButtonText:"Create Item"}),Object(ce.jsx)(J,{mt:2,children:Object(ce.jsx)(Ne,{rowsPerPage:n,page:t,total:u.totalItems,handleChangeRowsPerPage:e=>{(async()=>{s(parseInt(e.target.value,10)),a(0),await j(Nt({page:0,size:parseInt(e.target.value,10)}))})()},handleChangePage:(e,t)=>{(async()=>{a(t),await j(Nt({page:t,size:n}))})()},columns:g,dataSource:d})}),Object(ce.jsx)(Xa,{open:m.visible,loading:m.loading,itemName:m.name,onClose:()=>b((e=>({...e,visible:!1}))),onDelete:async()=>{try{b((e=>({...e,loading:!0}))),await At.deleteItem({id:m.id}),await j(Nt({page:t,size:n})),h({type:"success",message:"".concat(m.name," has been deleted"),open:!0}),b((e=>({...e,loading:!1,visible:!1})))}catch(e){console.log(e),b((e=>({...e,loading:!1}))),h({type:"error",message:"Please try again",open:!0})}},title:"Delete Warehouse"}),Object(ce.jsx)(Xt,{open:p.open,message:p.message,type:p.type,onClose:()=>h((e=>({...e,open:!1})))})]}),Object(ce.jsx)(le.a,{path:"".concat(o,"/add-item"),children:Object(ce.jsx)(wa,{})}),Object(ce.jsx)(le.a,{exact:!0,path:"".concat(o,"/:id"),children:Object(ce.jsx)(Ta,{})}),Object(ce.jsx)(le.a,{path:"".concat(o,"/:id/edit"),children:Object(ce.jsx)(jn,{})})]})};var hn=a(215),gn=a(274);const xn=function(e,t,a){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"topRight";gn.a[e]({message:t,description:a,placement:n})};var On=a(474);const yn=e=>{const{id:t}=Object(le.h)(),a=Object(Pt.b)(),[n,s]=Object(i.useState)([]),[c,o]=Object(i.useState)([]),l=[{title:"Item",dataIndex:"itemName",key:"itemName"},{title:"Item Class",dataIndex:"itemCategory",key:"itemCategory",render:e=>"1"===e?"Stock Item":"Component Item"},{title:"Unit Price",dataIndex:"sellingPrice",key:"sellingPrice",render:e=>Object(ce.jsx)(On.a,{valueStyle:{fontSize:"1vw"},value:e,prefix:"\u20a6",precision:2})},{title:"Unit Cost",dataIndex:"lastUnitCost",key:"lastUnitCost",render:e=>Object(ce.jsx)(On.a,{valueStyle:{fontSize:"1vw"},value:e,prefix:"\u20a6",precision:2})},{title:"Stock on hand",dataIndex:"quantity",key:"quantity"}];r.a.useEffect((()=>{(async()=>{try{const n=await a((e={id:t},t=>At.fetchSingleItemGroup(e).then((e=>(console.log(e.data,"singleItemGroup222"),t(Dt(e.data)),Promise.resolve(e.data)))).catch((e=>{if(e.response)return Promise.reject(e.response.data)})))),{items:i,...r}=n,c=Object.entries(r).map((e=>{let[t,a]=e;return{title:t,value:a}})).filter((e=>e.value));s(c),o(i)}catch(n){console.log(n)}var e})()}),[t]);const d=n.map(((e,t)=>Object(ce.jsx)($e.a,{xs:12,children:Object(ce.jsx)(Wa,{title:e.title,value:e.value},t)})));return Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(Ue,{title:"Item Group Details"}),Object(ce.jsx)(J,{mt:2,p:4,children:Object(ce.jsx)(et.a,{children:d})}),Object(ce.jsx)(J,{mt:2,children:Object(ce.jsx)(Ne,{columns:l,dataSource:c,hidePagination:!0})})]})},An=[{name:"groupName",label:"Group Name",isRequired:!0,type:"text"},{name:"groupDescription",label:"Description",isRequired:!0,type:"textarea"}],vn={labelCol:{span:24},wrapperCol:{span:24}},fn=e=>{const{userProfile:t}=Object(Pt.c)($t),{itemGroupList:a,paginationProps:n}=Object(Pt.c)(Ut);console.log(a,"itemGroupList");const[r]=_e.a.useForm(),[s]=_e.a.useForm(),[c,o]=Object(i.useState)(0),[l,d]=Object(i.useState)(10),[u,j]=Object(i.useState)(!1),[m,b]=Object(i.useState)({isVisible:!1}),[p,h]=Object(i.useState)({open:!1,type:"",message:""}),[g,x]=Object(i.useState)({visible:!1,name:"",id:null,loading:!1}),[O,y]=Object(i.useState)({isVisible:!1,selectedItemInput:[],loading:!1,initialValues:{}}),{url:A,path:v}=Object(le.i)(),I=Object(le.f)(),C=Object(Pt.b)();Object(i.useEffect)((()=>{s.resetFields()}),[O.isVisible]);const w=[{title:"ID ",dataIndex:"id",key:"id"},{title:"Name",dataIndex:"groupName",key:"groupName"},{title:"Description",dataIndex:"groupDescription",key:"groupDescription",width:"40%"},{title:"Action",dataIndex:"action",key:"action",width:"5%",render:(e,t)=>{const a=Object(ce.jsxs)(He.b,{direction:"vertical",size:"small",children:[Object(ce.jsx)("p",{onClick:()=>{const e=An.map((e=>(e.defaultValue=t[e.name],Sa(e))));y((a=>({...a,selectedItemInput:e,isVisible:!0,initialValues:t})))},style:{cursor:"pointer"},children:"Edit"}),Object(ce.jsx)("p",{onClick:(n=t.id,async()=>{I.push("".concat(A,"/").concat(n))}),style:{cursor:"pointer"},children:"View Detail"}),Object(ce.jsx)("p",{onClick:()=>x({name:t.groupName,id:t.id,visible:!0}),style:{color:"red",cursor:"pointer"},children:"Delete"})]});var n;return Object(ce.jsx)(Je.a,{content:a,trigger:"click",children:Object(ce.jsx)(dt.c,{})})}}],k=An.map((e=>Sa(e)));return Object(ce.jsxs)(le.c,{children:[Object(ce.jsxs)(le.a,{exact:!0,path:v,children:[Object(ce.jsx)(Ue,{title:"All Item Groups",showtools:!0,onCreate:()=>b((e=>({...e,isVisible:!0}))),createButtonText:"Create Item Group"}),Object(ce.jsx)(J,{mt:2,children:Object(ce.jsx)(Ne,{rowsPerPage:l,page:c,total:n.totalPages*l,handleChangeRowsPerPage:e=>{(async()=>{d(parseInt(e.target.value,10)),o(0),await C(Qt({orgId:t.organisation.orgId,page:0,size:parseInt(e.target.value,10)}))})()},handleChangePage:(e,a)=>{(async()=>{o(a),await C(Qt({orgId:t.organisation.orgId,page:a,size:l}))})()},columns:w,dataSource:a})}),Object(ce.jsx)(In,{form:r,onCancel:()=>b((e=>({...e,isVisible:!1}))),title:"New Item Group",visible:m.isVisible,loading:u,onFinish:async e=>{try{j(!0),await C((a={data:e},e=>At.createItemGroup(a).then((e=>Promise.resolve(e.data.data))).catch((e=>{if(e.response)return Promise.reject(e.response.data)})))),await C(Qt({orgId:t.organisation.orgId,page:c,size:l})),await C(Gt({})),j(!1),b((e=>({...e,isVisible:!1}))),h({open:!0,type:"success",message:"".concat(e.groupName," was created")}),window.location.reload()}catch(n){j(!1),h({open:!0,type:"error",message:n.message||"Error occurred"})}var a},children:k}),Object(ce.jsx)(In,{form:s,onCancel:()=>y((e=>({...e,isVisible:!1}))),title:"Edit Item Group",visible:O.isVisible,loading:O.loading,onFinish:async e=>{console.log(e,"editgruop");try{y((e=>({...e,loading:!0}))),await At.updateItemGroups({data:e,id:O.initialValues.id}),await C(Qt({orgId:t.organisation.orgId,page:c,size:l})),y((e=>({...e,loading:!1,isVisible:!1}))),xn("success","Item Group updated","".concat(O.initialValues.groupName," has been updated"))}catch(a){y((e=>({...e,loading:!1}))),a.response?xn("error","Error Occurred",a.response.data.message||"Please try again later"):xn("error","Error Occurred","Please try again later")}},initialValues:O.initialValues,children:O.selectedItemInput}),Object(ce.jsx)(La,{open:g.visible,onClose:()=>x((e=>({...e,visible:!1}))),children:Object(ce.jsxs)(ie.a,{style:{minWidth:"30vw",padding:"16px"},children:[Object(ce.jsx)(f.a,{children:Object(ce.jsx)($,{align:"center",variant:"subtitle1",children:"Delete Item Group"})}),Object(ce.jsx)(f.a,{mt:3,children:Object(ce.jsxs)(_,{variant:"body2",align:"center",children:["Do you want to delete ",Object(ce.jsx)("strong",{children:g.name}),"?"]})}),Object(ce.jsxs)(f.a,{p:3,display:"flex",justifyContent:"flex-end",children:[Object(ce.jsx)(f.a,{mr:2,children:Object(ce.jsx)(De,{onClick:()=>x((e=>({...e,visible:!1}))),text:"Cancel"})}),Object(ce.jsx)(ze,{loading:g.loading,onClick:async()=>{try{x((e=>({...e,loading:!0})));await At.deleteItemGroup({id:g.id});await C(Qt({orgId:t.organisation.orgId,page:c,size:l})),h({type:"success",message:"".concat(g.name," has been deleted"),open:!0}),x((e=>({...e,loading:!1,visible:!1}))),window.location.reload()}catch(e){console.log(e),x((e=>({...e,loading:!1}))),h({type:"error",message:"Please try again",open:!0})}},type:"submit",text:"Delete"})]})]})}),Object(ce.jsx)(Xt,{open:p.open,message:p.message,type:p.type,onClose:(e,t)=>{"clickaway"!==t&&h((e=>({...e,open:!1})))}})]}),Object(ce.jsx)(le.a,{path:"".concat(v,"/:id"),children:Object(ce.jsx)(yn,{})})]})},In=e=>Object(ce.jsx)(ee,{title:e.title,visible:e.visible,okButtonProps:{loading:e.loading,htmlType:"submit",style:{backgroundColor:m,border:"1px solid ".concat(m)}},cancelButtonProps:{type:"danger"},onOk:()=>{e.form.submit()},okText:"Create",onCancel:e.onCancel,children:Object(ce.jsx)(_e.a,{initialValues:e.initialValues,form:e.form,...vn,onFinish:e.onFinish,children:e.children})}),Cn=[{title:"Item",dataIndex:"itemName",key:"itemName"},{title:"Item Class",dataIndex:"itemCategory",key:"itemCategory",render:e=>"1"===e?"Stock Item":"Component Item"},{title:"Unit Price",dataIndex:"sellingPrice",key:"sellingPrice",render:e=>Object(ce.jsx)(On.a,{valueStyle:{fontSize:"1vw"},value:e,prefix:"\u20a6",precision:2})},{title:"Unit Cost",dataIndex:"lastUnitCost",key:"lastUnitCost",render:e=>Object(ce.jsx)(On.a,{valueStyle:{fontSize:"1vw"},value:e,prefix:"\u20a6",precision:2})},{title:"Stock on hand",dataIndex:"quantity",key:"quantity"}],wn=e=>{const{id:t}=Object(le.h)(),a=Object(Pt.b)(),[n,s]=Object(i.useState)([]),[c,o]=Object(i.useState)([]);r.a.useEffect((()=>{(async()=>{try{const n=await a((e={id:t},t=>At.fetchSingleWarehouse(e).then((e=>(t(Ct(e.data.data)),Promise.resolve(e)))).catch((e=>{if(e.response)return Promise.reject(e.response.data)})))),{items:i,...r}=n.data.data,c=Object.entries(r).map((e=>{let[t,a]=e;return{title:t,value:a}})).filter((e=>e.value));s(c),o(i)}catch(n){console.log(n)}var e})()}),[t]);const l=n.map(((e,t)=>Object(ce.jsx)($e.a,{xs:12,children:Object(ce.jsx)(Wa,{title:e.title,value:e.value},t)})));return Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(Ue,{title:"Warehouse Details"}),Object(ce.jsx)(J,{mt:2,p:4,children:Object(ce.jsx)(et.a,{children:l})}),Object(ce.jsx)(J,{mt:2,children:Object(ce.jsx)(Ne,{columns:Cn,dataSource:c,hidePagination:!0})})]})},{Option:kn}=Pe.a,Sn=[{name:"name",label:"Warehouse Name",isRequired:!0,type:"text",defaultValue:""},{name:"warehousePhoneNumber",label:"Phone",isRequired:!1,type:"text",defaultValue:""},{name:"firstStreet",label:"First Street",isRequired:!1,type:"text",defaultValue:""},{name:"secondStreet",label:"Second Street",isRequired:!1,type:"text",defaultValue:""},{name:"city",label:"City",isRequired:!1,type:"text",defaultValue:""},{name:"state",label:"State",isRequired:!1,type:"text",defaultValue:""},{name:"zipCode",label:"Zip Code",isRequired:!1,type:"number",defaultValue:""},{name:"wareHouseContactEmail",label:"Warehouse Email",isRequired:!1,type:"text",defaultValue:""},{name:"headOfWareHouseId",label:"Head of Warehouse Name",isRequired:!1,type:"search"}],Pn={labelCol:{span:24},wrapperCol:{span:24}},Rn=e=>{const{warehouseList:t,paginationProps:a}=Object(Pt.c)(kt),{usersByOrg:n,userProfile:r}=Object(Pt.c)($t),[s]=_e.a.useForm(),[c,o]=Object(i.useState)(0),[l,d]=Object(i.useState)(10),[u,j]=Object(i.useState)([]),{path:m,url:b}=Object(le.i)(),p=Object(le.f)(),[h,g]=Object(i.useState)({}),[x,O]=Object(i.useState)({isVisible:!1,loading:!1}),[y,A]=Object(i.useState)({open:!1,type:"",message:""}),[v,f]=Object(i.useState)({visible:!1,name:"",id:null,loading:!1}),[I,C]=Object(i.useState)({isVisible:!1,selectedItemInput:[],loading:!1,initialValues:{}}),w=Object(Pt.b)();Object(i.useEffect)((()=>{s.resetFields()}),[I.isVisible]);const k=e=>t=>{const a={...h};a[e]=t,g(a)},S=[...n].map(((e,t)=>Object(ce.jsx)(kn,{value:e.id,children:" "!==e.fullName?e.fullName:"Adefisayo Adeniji"},t))),P={onSearch:e=>{}},R=[{title:"Name",dataIndex:"name",key:"name"},{title:"Email",dataIndex:"wareHouseContactEmail",key:"wareHouseContactEmail"},{title:"Phone Number",dataIndex:"warehousePhoneNumber",key:"warehousePhoneNumber"},{title:"Head of Warehouse",dataIndex:"headOfWarehouseName",key:"headOfWarehouseName"},{title:"City",dataIndex:"city",key:"city"},{title:"Action",dataIndex:"action",key:"action",width:"5%",render:(e,t)=>{const a=Object(ce.jsxs)(He.b,{direction:"vertical",size:"small",children:[Object(ce.jsx)("p",{onClick:(n=t.id,async()=>{p.push("".concat(b,"/").concat(n))}),style:{cursor:"pointer"},children:"View Detail"}),Object(ce.jsx)("p",{onClick:()=>{const e=Sn.map((e=>(e.defaultValue=t[e.name],Sa(e,k,S,P))));C((a=>({...a,selectedItemInput:e,isVisible:!0,initialValues:t})))},style:{cursor:"pointer"},children:"Edit"}),Object(ce.jsx)("p",{onClick:()=>f((e=>({...e,visible:!0,name:t.name,id:t.id}))),style:{color:"red",cursor:"pointer"},children:"Delete"})]});var n;return Object(ce.jsx)(Je.a,{onClick:()=>{},content:a,trigger:"click",children:Object(ce.jsx)(dt.c,{})})}}],B=Sn.map((e=>Sa(e,k,S,P)));return Object(ce.jsxs)(le.c,{children:[Object(ce.jsxs)(le.a,{exact:!0,path:m,children:[Object(ce.jsx)(Ue,{title:"All Warehouses",showtools:!0,onCreate:()=>O((e=>({...e,isVisible:!0}))),createButtonText:"Add new warehouse"}),Object(ce.jsx)(J,{mt:2,children:Object(ce.jsx)(Ne,{rowsPerPage:l,page:c,total:a.totalItems,handleChangeRowsPerPage:e=>{(async()=>{d(parseInt(e.target.value,10)),o(0),await w(wt({page:0,size:parseInt(e.target.value,10)}))})()},handleChangePage:(e,t)=>{(async()=>{o(t),await w(wt({page:t,size:l}))})()},columns:R,dataSource:t})}),Object(ce.jsx)(Bn,{visible:x.isVisible,onCancel:()=>O((e=>({...e,isVisible:!1}))),onFinish:async e=>{try{O((e=>({...e,loading:!0}))),e.headOfWareHouseId=h.headOfWareHouseId,e.orgId=r.orgId,e.uuid=r.uuId,await w((t={data:e},e=>At.addWarehouse(t).then((e=>Promise.resolve(e))).catch((e=>{if(e.response)return Promise.reject(e.response.data)})))),await w(wt({})),O((e=>({...e,isVisible:!1,loading:!1}))),A({type:"success",open:!0,message:"Warehouse has been added"})}catch(a){O((e=>({...e,loading:!1}))),A({type:"error",open:!0,message:"An error occurred, please try again later"})}var t},loading:x.loading,warehouseInputs:B}),Object(ce.jsx)(Vn,{visible:I.isVisible,onCancel:()=>C((e=>({...e,isVisible:!1}))),onFinish:async e=>{try{C((e=>({...e,loading:!0}))),await At.updateWarehouse({data:e,id:I.initialValues.id}),await w(wt({page:c,size:l})),C((e=>({...e,loading:!1,isVisible:!1}))),xn("success","Warehouse updated","".concat(I.initialValues.name," has been updated"))}catch(t){C((e=>({...e,loading:!1}))),t.response?xn("error","Error Occurred",t.response.data.message||"Please try again later"):xn("error","Error Occurred","Please try again later")}},loading:I.loading,warehouseInputs:I.selectedItemInput,form:s,initialValues:I.initialValues}),Object(ce.jsx)(Xt,{open:y.open,message:y.message,type:y.type,onClose:(e,t)=>{"clickaway"!==t&&A((e=>({...e,open:!1})))}}),Object(ce.jsx)(Xa,{open:v.visible,loading:v.loading,itemName:v.name,onClose:()=>f((e=>({...e,visible:!1}))),onDelete:async()=>{try{f((e=>({...e,loading:!0}))),await At.deleteWarehouse({id:v.id}),await w(wt({})),A({type:"success",open:!0,message:"Warehouse has been Deleted"}),f((e=>({...e,loading:!1,visible:!1})))}catch(e){A({type:"error",open:!0,message:"An error occurred, please try again"})}},title:"Delete Warehouse"})]}),Object(ce.jsx)(le.a,{path:"".concat(m,"/:id"),children:Object(ce.jsx)(wn,{})})]})},Bn=e=>{const[t]=_e.a.useForm();return Object(ce.jsx)(ee,{title:" New Warehouse",visible:e.visible,okButtonProps:{loading:e.loading,htmlType:"submit",style:{backgroundColor:m,border:"1px solid ".concat(m)}},cancelButtonProps:{type:"danger"},onOk:()=>{t.submit()},okText:"Create",onCancel:e.onCancel,children:Object(ce.jsx)(_e.a,{form:t,...Pn,onFinish:e.onFinish,children:e.warehouseInputs})})},Vn=e=>Object(ce.jsx)(ee,{title:"Edit Warehouse",visible:e.visible,okButtonProps:{loading:e.loading,htmlType:"submit",style:{backgroundColor:m,border:"1px solid ".concat(m)}},cancelButtonProps:{type:"danger"},onOk:()=>{e.form.submit()},okText:"Create",onCancel:()=>{e.onCancel()},children:Object(ce.jsx)(_e.a,{initialValues:e.initialValues,form:e.form,...Pn,onFinish:e.onFinish,children:e.warehouseInputs})}),qn=[{title:"Warehouse",value:"Ojota Zone"},{title:"Account",value:"Mike Bamidele"},{title:"Ref no",value:"000999000YU"},{title:"Date",value:"3rd Jul,2020"},{title:"Reason",value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Convallis tempor, tincidunt. Eget molestie placerat mattis sed eget hendrerit quam leo eget."}],Nn=[{title:"Item",dataIndex:"item",key:"item"},{title:"Previous Quantity",dataIndex:"previousQuantity",key:"previousQuantity"},{title:"Adjusted By",dataIndex:"adjustedBy",key:"adjustedBy"},{title:"Adjusted Quantity",dataIndex:"adjustedQuantity",key:"adjustedQuantity"}],En=[{item:"Drilling Machine",previousQuantity:30,adjustedBy:"-10",adjustedQuantity:20}],Fn=e=>{const t=qn.map(((e,t)=>Object(ce.jsx)($e.a,{xs:12,children:Object(ce.jsx)(Wa,{title:e.title,value:e.value},t)})));return Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(Ue,{title:"New Inventory Adjustments"}),Object(ce.jsx)(J,{mt:2,p:4,children:Object(ce.jsx)(et.a,{children:t})}),Object(ce.jsx)(J,{mt:2,children:Object(ce.jsx)(Ne,{columns:Nn,dataSource:En,hidePagination:!0})})]})};var Tn=a(62),Wn=a.n(Tn);const zn=Object(mt.b)({name:"customerSlice",initialState:{customerList:[],paginationProps:{page:0,totalPages:0,totalItems:0}},reducers:{addCustomerList:(e,t)=>{let{payload:a}=t;e.customerList=a},addPaginationProps:(e,t)=>{let{payload:a}=t;e.paginationProps=a}}}),{addCustomerList:Dn,addPaginationProps:Gn}=zn.actions,Qn=e=>t=>At.getCustomers(e).then((e=>{const{currentPage:a,totalPages:n,count:i,customers:r}=e.data.data;t(Gn({page:a,totalPages:n,totalItems:i})),t(Dn(r))})).catch((e=>{if(e.response)return console.log(e.response.status),Promise.reject(e.response.data)})),Un=e=>t=>At.createCustomers(e).then((e=>Promise.resolve(e))).catch((e=>{if(e.response)return Promise.reject(e.response.data)})),Mn=e=>e.customerReducer;var Ln=zn.reducer;const Yn=Object(mt.b)({name:"adjustmentsSlice",initialState:{adjustmentsList:[],singleAdjustments:{},paginationProps:{page:0,totalPages:0,totalItems:0}},reducers:{allAdjustments:(e,t)=>{let{payload:a}=t;e.adjustmentsList=a},singleAdjustments:(e,t)=>{let{payload:a}=t;e.singleAdjustments=a},addPaginationProps:(e,t)=>{let{payload:a}=t;e.paginationProps=a}}}),{allAdjustments:Kn,singleAdjustments:Xn,addPaginationProps:Hn}=Yn.actions,Jn=e=>t=>At.getAllAdjustments(e).then((e=>{console.log(e,"allAdjustment");const{currentPage:a,totalPages:n,totalItems:i,adjustments:r}=e.data;return t(Kn(r)),t(Hn({page:a,totalPages:n,totalItems:i})),Promise.resolve(r)}),(e=>{if(e.response)return Promise.reject(e.response.data)})),Zn=e=>e.adjustmentsReducer;var _n=Yn.reducer;const{Option:$n}=Pe.a,ei=[{name:"warehouseName",label:"Warehouse Name",isRequired:!1,type:"select"},{name:"referenceNumber",label:"Reference Number",isRequired:!1,type:"text"},{name:"inventoryAdjustedDate",label:" Adjusted Date",isRequired:!1,type:"date"},{name:"reason",label:"Reason",isRequired:!1,type:"text"},{name:"reasonDescription",label:"Reason Description",isRequired:!1,type:"textarea"}],ti={labelCol:{span:24},wrapperCol:{span:24}},ai=[{item:[{itemName:"Rice",count:20},{itemName:"Beans",count:15}],previousQuantity:0,adjustedQuantity:"",itemDescription:"",itemId:"",itemName:"",orgId:"ORG-1593451692921"}],ni=e=>{const[t,a]=Object(i.useState)(ai),[n,r]=Object(i.useState)({}),[s,c]=Object(i.useState)(null),[o,l]=Object(i.useState)(!1),[d]=_e.a.useForm(),u=Object(Pt.b)(),{warehouseList:j}=Object(Pt.c)(kt),{itemList:m}=Object(Pt.c)(Et),{customerList:b}=Object(Pt.c)(Mn),p=Object(Pt.c)($t).userProfile.workShift;console.log({warehouseList:j,itemList:m,customerList:b},"selectedItem");const h=e=>(t,a)=>{const i={...n};i[e]="inventoryAdjustedDate"===e?Wn()(a).toISOString():t,r(i)},g=(ei.map((e=>Object(ce.jsx)($e.a,{xs:11,children:Sa(e,h)}))),e=>e.find(((e,t)=>t===s)));Object(i.useEffect)((()=>{const e=[...t].map((e=>(e.item=m,e)));a(e)}),[m]);const x=(e,t)=>{e.splice(s,1,t),a(e)},O=()=>{const e=[...t];e.splice(s,1),a(e)},y=e=>{const a=[...t],n=g(a),i=n.item.find((t=>t.id===e));n.itemId=e,n.itemName=i.itemName,n.itemDescription=i.description,n.previousQuantity=i.quantity,x(a,n)},A=e=>{const a=[...t],n=g(a),i=e.target.value;n.adjustedQuantity=i,x(a,n)},v=[{title:"Item",dataIndex:"item",key:"item",render:e=>{const t=e.map(((e,t)=>Object(ce.jsx)($n,{value:e.id,children:e.itemName},t)));return Object(ce.jsx)(Y,{children:Object(ce.jsx)(Pe.a,{onChange:y,placeholder:"Select Item",style:{width:"100%"},bordered:!1,children:t})})}},{title:"Item Description",dataIndex:"itemDescription",key:"itemDescription",render:e=>Object(ce.jsx)(Y,{children:Object(ce.jsx)(Ze.a,{bordered:!1,value:e,disabled:!0})})},{title:"Quantity on Hand",dataIndex:"previousQuantity",key:"previousQuantity",render:e=>Object(ce.jsx)(Y,{children:Object(ce.jsx)(Ze.a,{bordered:!1,value:e,disabled:!0})})},{title:"Adjusted Quantity",dataIndex:"adjustedQuantity",key:"adjustedQuantity",render:e=>Object(ce.jsxs)(f.a,{display:"flex",alignItems:"center",children:[Object(ce.jsx)(Y,{children:Object(ce.jsx)(Ze.a,{type:"number",onChange:A,value:e,bordered:!1,placeholder:"Eg +10. -10"})}),t.length>1&&Object(ce.jsx)(dt.e,{onClick:O,style:{fontSize:"1.4vw",marginLeft:"20px"}})]})}],I=j.map(((e,t)=>Object(ce.jsx)($n,{value:e.id,children:e.name},t))),C=[...ei].map((e=>"warehouseName"===e.name?Object(ce.jsx)($e.a,{sm:12,children:Sa(e,h,I)}):Object(ce.jsx)($e.a,{sm:10,children:Sa(e,h)})));return Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(Ue,{title:"Add Inventory Adjustments"}),Object(ce.jsx)(J,{p:4,mt:2,children:Object(ce.jsx)(_e.a,{form:d,onFinish:async e=>{try{l(!0),e.warehouseName=n.warehouseName,e.inventoryAdjustedDate=n.inventoryAdjustedDate,e.orgId=p.orgId;const a=t.map((e=>({itemId:e.itemId,itemName:e.itemName,previousQuantity:e.previousQuantity,adjustedQuantity:e.adjustedQuantity,itemDescription:e.itemDescription,orgId:"ORG-1593451692921"})));e.items=a,console.log(e,"values"),await u((r={data:e},e=>At.createAdjustment(r).then((e=>(console.log(e,"create addjustment"),Promise.resolve(e)))).catch((e=>{if(e.response)return Promise.reject(e.response.data)})))),await u(Jn({})),xn("success","Adjustments was successfully created"),l(!1)}catch(s){var a,i;l(!1),xn("error","Failed",(null===s||void 0===s||null===(a=s.response)||void 0===a||null===(i=a.data)||void 0===i?void 0:i.message)||"Please try again later")}var r},...ti,children:Object(ce.jsx)(et.a,{justify:"space-between",children:C})})}),Object(ce.jsx)(J,{mt:2,children:Object(ce.jsx)(Ne,{columns:v,dataSource:t,onRow:(e,t)=>({onClick:e=>{c(t)}}),hidePagination:!0})}),Object(ce.jsxs)(f.a,{p:4,children:[Object(ce.jsx)(We,{onClick:()=>{const e={item:m,previousQuantity:0,adjustedQuantity:"",itemDescription:"",itemId:"",itemName:""};a((t=>[...t,e]))},text:"Add Row"}),Object(ce.jsx)(f.a,{mt:6,pb:5,display:"flex",justifyContent:"flex-start",children:Object(ce.jsx)(We,{loading:o,onClick:e=>{e.preventDefault(),d.submit()},text:"Save & Submit"})})]})]})},ii=[{title:"Date",dataIndex:"inventoryAdjustedDate",key:"inventoryAdjustedDate"},{title:"Warehouse Name",dataIndex:"warehouseName",key:"warehouseName"},{title:"Status",dataIndex:"status",key:"status"},{title:"Reference Number",dataIndex:"referenceNumber",key:"referenceNumber"},{title:"Adjusted by",dataIndex:"addedBy",key:"addedBy"}],ri=e=>{const{paginationProps:t,adjustmentsList:a}=Object(Pt.c)(Zn);console.log(a,"adjustmentsLists");const[n,s]=r.a.useState(2),[c,o]=r.a.useState(10),{url:l,path:d}=Object(le.i)(),u=Object(le.f)(),j=Object(Pt.b)();return Object(i.useEffect)((()=>{(async()=>{await j(Jn({page:0,size:10}))})()}),[]),Object(ce.jsxs)(le.c,{children:[Object(ce.jsxs)(le.a,{exact:!0,path:d,children:[Object(ce.jsx)(Ue,{title:"Inventory Adjustments",showtools:!0,onCreate:()=>{u.push("".concat(l,"/adjust-item"))},createButtonText:"New Adjustment"}),Object(ce.jsx)(J,{mt:2,children:Object(ce.jsx)(Ne,{rowsPerPage:c,page:n,handleChangeRowsPerPage:e=>{o(parseInt(e.target.value,10)),s(0)},handleChangePage:(e,t)=>{s(t)},columns:ii,dataSource:a,onRow:(e,t)=>({onClick:e=>{u.push("".concat(l,"/adjustmentDetails"))}})})})]}),Object(ce.jsx)(le.a,{path:"".concat(d,"/adjust-item"),children:Object(ce.jsx)(ni,{})}),Object(ce.jsx)(le.a,{path:"".concat(d,"/adjustmentDetails"),children:Object(ce.jsx)(Fn,{})})]})},si=Object(mt.b)({name:"transfarOrderSlice",initialState:{transfarOrderList:[],paginationProps:{page:0,totalPages:0,totalItems:0},singleTransfarOrder:{}},reducers:{addtransfarOrderList:(e,t)=>{let{payload:a}=t;e.transfarOrderList=a},addPaginationProps:(e,t)=>{let{payload:a}=t;e.paginationProps=a},singleTransfarOrder:(e,t)=>{let{payload:a}=t;e.singleTransfarOrder=a}}}),{addtransfarOrderList:ci,addPaginationProps:oi,singleTransfarOrder:li}=si.actions,di=e=>t=>At.getAllTransfarOrder(e).then((e=>{const{data:a}=e.data;return t(ci(a.filter((e=>!e.delFlag)))),Promise.resolve(a.filter((e=>!e.delFlag)))})).catch((e=>{if(e.response)return Promise.reject(e.response.data)})),ui=e=>e.transfarOrderReducer;var ji=si.reducer;const{Option:mi}=Pe.a,bi=[{name:"referenceNumber",label:"Reference Number",isRequired:!1,type:"text"},{name:"sourceWarehouseId",label:"Source WarehouseId",isRequired:!1,type:"search"},{name:"destinationWarehouseId",label:"Destination Warehouse",isRequired:!1,type:"search"},{name:"reason",label:"Reason",isRequired:!1,type:"text",defaultValue:""}],pi={labelCol:{span:24},wrapperCol:{span:24}},hi=[{item:[{name:"Rice",sku:20},{name:"Beans",sku:15}],itemSku:"",transferQuantity:0}],gi=e=>{const{warehouseList:t}=Object(Pt.c)(kt),{itemList:a}=Object(Pt.c)(Et),n=Object(Pt.c)($t),r=n.userProfile.workShift;console.log({warehouseList:t,itemList:a,profile:n,userProfile2:r},"selectedItem");const[s,c]=Object(i.useState)(hi),[o,l]=Object(i.useState)(null),[d,u]=Object(i.useState)({}),[j,m]=Object(i.useState)(!1),[b]=_e.a.useForm(),p=(Object(le.f)(),Object(Pt.b)());Object(i.useEffect)((()=>{p(di({page:0,size:10}))}),[]),Object(i.useEffect)((()=>{const e=[...s].map((e=>(e.item=a,e)));c(e)}),[a]);const h=e=>e.find(((e,t)=>t===o)),g=(e,t)=>{e.splice(o,1,t),c(e)},x=e=>t=>{const a={...d};a[e]=t,u(a)},O=e=>{const t=[...s],a=h(t),n=a.item.find((t=>t.id===e));a.itemId=e,a.itemName=n.itemName,a.itemSku=n.sku,g(t,a)},y=e=>{const t=[...s],a=h(t),n=e.target.value;a.transferQuantity=n,g(t,a)},A=()=>{const e=[...s];e.splice(o,1),c(e)},v=[{title:"Item",dataIndex:"item",key:"item",render:e=>{const t=e.map(((e,t)=>Object(ce.jsx)(mi,{value:e.id,children:e.itemName},t)));return Object(ce.jsx)(Y,{children:Object(ce.jsx)(Pe.a,{onChange:O,placeholder:"Select Item",style:{width:"100%"},bordered:!1,children:t})})}},{title:"Item Sku",dataIndex:"itemSku",key:"itemSku",render:e=>Object(ce.jsx)(Y,{children:Object(ce.jsx)(Ze.a,{bordered:!1,value:e,disabled:!0})})},{title:"Transfer Quantity",dataIndex:"transferQuantity",key:"transferQuantity",render:e=>Object(ce.jsx)(Y,{children:Object(ce.jsx)(Ze.a,{type:"number",onChange:y,value:e,bordered:!1,placeholder:"Eg +10. -10"})})},{title:"Delete",dataIndex:"delete",key:"delete",render:e=>s.length>1&&Object(ce.jsx)(dt.e,{onClick:A,style:{fontSize:"1.4vw",marginLeft:"20px",color:"red"}})}],I=t.map(((e,t)=>Object(ce.jsx)(mi,{value:e.id,children:e.name},t))),C=t.map(((e,t)=>Object(ce.jsx)(mi,{value:e.id,children:e.name},t))),w=[...bi].map((e=>"sourceWarehouseId"===e.name?Object(ce.jsx)($e.a,{sm:12,children:Sa(e,x,I)}):"destinationWarehouseId"===e.name?Object(ce.jsx)($e.a,{sm:12,children:Sa(e,x,C)}):Object(ce.jsx)($e.a,{sm:12,children:Sa(e,x)})));return Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(Ue,{title:"New Transfer Order"}),Object(ce.jsx)(J,{mt:2,py:3,px:4,display:"flex",children:Object(ce.jsx)(it.a,{item:!0,xs:12,children:Object(ce.jsx)(f.a,{px:3,mt:2,children:Object(ce.jsx)(_e.a,{form:b,onFinish:async e=>{try{m(!0),e.sourceWarehouseId=d.sourceWarehouseId,e.destinationWarehouseId=d.destinationWarehouseId,e.orgId=r.orgId;const t=s.map((e=>({itemId:e.itemId,itemSku:e.itemSku,transferQuantity:e.transferQuantity})));e.items=t,console.log(e,"values"),await p((n={data:e},e=>At.createTransfarOrder(n).then((e=>(console.log(e,"createTransfar"),Promise.resolve(e)))).catch((e=>{if(e.response)return Promise.reject(e.response.data)})))),await p(di({})),xn("success","transfar order was successfully created"),m(!1)}catch(i){var t,a;m(!1),xn("error","Failed",(null===i||void 0===i||null===(t=i.response)||void 0===t||null===(a=t.data)||void 0===a?void 0:a.message)||"Please try again later")}var n},...pi,children:Object(ce.jsx)(et.a,{gutter:16,children:w})})})})}),Object(ce.jsxs)(J,{mt:2,children:[Object(ce.jsx)(Ne,{dataSource:s,onRow:(e,t)=>({onClick:e=>{l(t)}}),columns:v,hidePagination:!0}),Object(ce.jsxs)(f.a,{p:4,display:"flex",justifyContent:"space-between",children:[Object(ce.jsx)(We,{onClick:()=>{const e={item:a,itemSKU:"",transferQuantity:0};c((t=>[...t,e]))},text:"Add Row"}),Object(ce.jsxs)(f.a,{mt:6,pb:5,display:"flex",justifyContent:"flex-start",children:[Object(ce.jsx)(f.a,{mr:2,children:Object(ce.jsx)(De,{text:"Cancel"})}),Object(ce.jsx)(We,{loading:j,onClick:e=>{e.preventDefault(),b.submit()},text:"Save & Submit"})]})]})]})]})},xi=[{title:"Transfer Date",dataIndex:"transferDate",key:"transferDate",render:e=>Wn()(e).format("dddd, MMMM Do, YYYY")},{title:"transferred Quantity",dataIndex:"transferredQuantity",key:"transferredQuantity"},{title:"Ref No",dataIndex:"referenceNumber",key:"referenceNumber"},{title:"Source Warehouse",dataIndex:"sourceWarehouse",key:"sourceWarehouse"},{title:"Destination Warehouse",dataIndex:"destinationWarehouseUuid",key:"destinationWarehouseUuid"}],Oi=e=>{const t=Object(Pt.b)(),{transfarOrderList:a,paginationProps:n}=Object(Pt.c)(ui);console.log({transfarOrderList:a,paginationProps:n},"transfarorder");const[s,c]=r.a.useState(2),[o,l]=r.a.useState(10),{url:d,path:u}=Object(le.i)(),j=Object(le.f)();Object(i.useEffect)((()=>{(async()=>{await t(di())})()}),[]);return Object(ce.jsxs)(le.c,{children:[Object(ce.jsxs)(le.a,{exact:!0,path:u,children:[Object(ce.jsx)(Ue,{title:"All Transfer Orders",showtools:!0,onCreate:()=>{j.push("".concat(d,"/add-order"))},createButtonText:"Create Transfer Order"}),Object(ce.jsx)(J,{mt:2,children:Object(ce.jsx)(Ne,{rowsPerPage:o,page:s,handleChangeRowsPerPage:e=>{l(parseInt(e.target.value,10)),c(0)},handleChangePage:(e,t)=>{c(t)},columns:xi,dataSource:a,onRow:(e,t)=>({onClick:e=>{j.push("".concat(d,"/item-details"))}})})})]}),Object(ce.jsx)(le.a,{path:"".concat(u,"/add-order"),children:Object(ce.jsx)(gi,{})})]})},{Option:yi}=Pe.a,Ai=[{item:[{name:"Rice",sku:20},{name:"Beans",sku:15}],description:"",quantity:"",price:"",tax:[{name:"Freet(10%)",sku:20},{name:"Freet(20%)",sku:15}]}],vi=[{name:"customer",label:"Customer",isRequired:!1,type:"select"},{name:"salesOrderNumber",label:"Sales Order number",isRequired:!1,type:"text"},{name:"salesOrderDate*",label:"Sales Order Date",isRequired:!1,type:"date"},{name:"dueDate",label:"Due date",isRequired:!1,type:"date"},{name:"warehouse",label:"Warehouse*",isRequired:!1,type:"select"},{name:"salesPerson",label:"Sales person",isRequired:!1,type:"select"},{name:"notes",label:"Notes",isRequired:!1,type:"textarea"}],fi={labelCol:{span:24},wrapperCol:{span:24}},Ii=e=>{const[t,a]=Object(i.useState)(Ai),[n,r]=Object(i.useState)(null),s=()=>{const e=[...t];e.splice(n,1),a(e)},c=[{title:"Item",dataIndex:"item",key:"item",render:e=>{const t=e.map(((e,t)=>Object(ce.jsx)(yi,{value:e.sku,children:e.name},t)));return Object(ce.jsx)(Y,{children:Object(ce.jsx)(Pe.a,{placeholder:"Select Item",style:{width:"100%"},bordered:!1,children:t})})}},{title:"Description",dataIndex:"description",key:"description",render:e=>Object(ce.jsx)(Y,{children:Object(ce.jsx)(Ze.a,{bordered:!1})})},{title:"Quantity",dataIndex:"quantity",key:"quantity",render:e=>Object(ce.jsx)(Y,{children:Object(ce.jsx)(Ze.a,{type:"number",bordered:!1,placeholder:""})})},{title:"Price",dataIndex:"price",key:"price",render:e=>Object(ce.jsx)(Y,{children:Object(ce.jsx)(Ze.a,{type:"number",bordered:!1,placeholder:""})})},{title:"Tax",dataIndex:"tax",key:"tax",render:e=>{const t=e.map(((e,t)=>Object(ce.jsx)(yi,{value:e.sku,children:e.name},t)));return Object(ce.jsx)(Y,{children:Object(ce.jsx)(Pe.a,{placeholder:"Select Item",style:{width:"100%"},bordered:!1,children:t})})}},{title:"Delete",dataIndex:"delete",key:"delete",render:e=>t.length>1&&Object(ce.jsx)(dt.e,{onClick:s,style:{fontSize:"1.4vw",marginLeft:"20px",color:"red"}})}],o=e=>e=>{},l=[...vi].map((e=>Object(ce.jsx)($e.a,{sm:12,children:Sa(e,o)})));return Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(Ue,{title:"New Sales Order"}),Object(ce.jsx)(J,{mt:2,py:3,px:4,display:"flex",children:Object(ce.jsxs)(it.a,{item:!0,xs:12,children:[Object(ce.jsx)(f.a,{px:3,children:Object(ce.jsx)($,{variant:"subtitle1",children:"Warehouse"})}),Object(ce.jsx)(f.a,{px:3,mt:2,children:Object(ce.jsx)(_e.a,{onFinish:e=>{},...fi,children:Object(ce.jsx)(et.a,{gutter:16,children:l})})})]})}),Object(ce.jsxs)(J,{mt:2,children:[Object(ce.jsx)(Ne,{dataSource:t,onRow:(e,t)=>({onClick:e=>{r(t)}}),columns:c,hidePagination:!0}),Object(ce.jsx)(f.a,{p:4,children:Object(ce.jsx)(We,{onClick:()=>{const e={item:[{name:"Rice",sku:20},{name:"Beans",sku:15}],description:"",quantity:"",price:"",tax:[{name:"Freet(10%)",sku:20},{name:"Freet(20%)",sku:15}]};a((t=>[...t,e]))},text:"Add Row"})})]})]})},Ci=[{title:"S/N",dataIndex:"sn",key:"sn"},{title:"Name",dataIndex:"name",key:"name"},{title:"SKU",dataIndex:"barcode",key:"barcode"},{title:"Stock On Hand",dataIndex:"stockOnHand",key:"stockOnHand"},{title:"Action",dataIndex:"action",key:"action",width:"5%",render:(e,t)=>{const a=Object(ce.jsxs)(He.b,{direction:"vertical",size:"small",children:[Object(ce.jsx)("p",{children:"Edit"}),Object(ce.jsx)("p",{style:{color:"red",cursor:"pointer"},children:"Delete"})]});return Object(ce.jsx)(Je.a,{content:a,trigger:"click",children:Object(ce.jsx)(dt.c,{})})}}],wi=[{item:"Building",itemId:"00009",itemClass:"Stock Item",unitCost:"30000",unitPrice:"15000",stockOnHand:23e3},{item:"Building",itemId:"00009",itemClass:"Stock Item",unitCost:"30000",unitPrice:"15000",stockOnHand:23e3},{item:"Building",itemId:"00009",itemClass:"Stock Item",unitCost:"30000",unitPrice:"15000",stockOnHand:23e3},{item:"Building",itemId:"00009",itemClass:"Stock Item",unitCost:"30000",unitPrice:"15000",stockOnHand:23e3},{item:"Building",itemId:"00009",itemClass:"Stock Item",unitCost:"30000",unitPrice:"15000",stockOnHand:23e3}],ki=e=>{const[t,a]=r.a.useState(2),[n,i]=r.a.useState(10),{url:s,path:c}=Object(le.i)(),o=Object(le.f)();return Object(ce.jsxs)(le.c,{children:[Object(ce.jsxs)(le.a,{exact:!0,path:c,children:[Object(ce.jsx)(Ue,{title:"Sales Orders",showtools:!0,onCreate:()=>o.push("".concat(s,"/add-order")),createButtonText:"Create Sales Order"}),Object(ce.jsx)(J,{mt:2,children:Object(ce.jsx)(Ne,{rowsPerPage:n,page:t,handleChangeRowsPerPage:e=>{i(parseInt(e.target.value,10)),a(0)},handleChangePage:(e,t)=>{a(t)},columns:Ci,dataSource:wi})})]}),Object(ce.jsx)(le.a,{path:"".concat(c,"/add-order"),children:Object(ce.jsx)(Ii,{})})]})};var Si=a(466);const{Option:Pi}=Pe.a,Ri=[{name:"first_name",label:"First Name",isRequired:!0,type:"text",id:"firstName",defaultValue:""},{name:"last_name",label:"Last Name",isRequired:!0,type:"text",defaultValue:"",id:"lastName"},{name:"email",label:"Email",isRequired:!0,type:"text",defaultValue:"",id:"email"},{name:"phone_number",label:"Phone Number",isRequired:!0,type:"phone",defaultValue:"",id:"phoneNumber"},{name:"address",label:"Address",isRequired:!0,type:"text",defaultValue:"",id:"address"}],Bi={labelCol:{span:24},wrapperCol:{span:24}},Vi=e=>{const[t]=_e.a.useForm(),[a,n]=Object(i.useState)(0),[r,s]=Object(i.useState)(10),[c,o]=Object(i.useState)([]),{customerList:l,paginationProps:d}=Object(Pt.c)(Mn),{usersByOrg:u,userProfile:j}=Object(Pt.c)($t),[m,b]=Object(i.useState)({}),[p,h]=Object(i.useState)({isVisible:!1,loading:!1}),[g,x]=Object(i.useState)({open:!1,type:"",message:""}),[O,y]=Object(i.useState)({isVisible:!1,selectedItemInput:[],loading:!1,initialValues:{}}),A=Object(Pt.b)();Object(i.useEffect)((()=>{t.resetFields();const e=Object.entries(O.initialValues).map((e=>{let[t,a]=e;return"firstName"===t?(t="first_name",[t,a]):"lastName"===t?(t="last_name",[t,a]):"phoneNumber"===t?(t="phone_number",[t,a]):[t,a]}));t.setFieldsValue(Object.fromEntries(e))}),[O.isVisible]);[...u].map(((e,t)=>Object(ce.jsx)(Pi,{value:e.id,children:" "!==e.fullName?e.fullName:"Adefisayo Adeniji"},t)));const v=[{title:"ID",dataIndex:"customerNumber",key:"customerNumber"},{title:"Name",dataIndex:"name",key:"name",render:(e,t)=>"".concat(t.firstName," ").concat(t.lastName)},{title:"Email",dataIndex:"email",key:"email"},{title:"Phone Number",dataIndex:"phoneNumber",key:"phoneNumber"},{title:"Address",dataIndex:"address",key:"address"},{title:"Action",dataIndex:"action",key:"action",width:"5%",render:(e,t)=>{const a=Object(ce.jsxs)(He.b,{direction:"vertical",size:"small",children:[Object(ce.jsx)("p",{onClick:()=>{const e=Ri.map((e=>(e.defaultValue=t[e.id],Sa(e))));y((a=>({...a,selectedItemInput:e,isVisible:!0,initialValues:t})))},style:{cursor:"pointer"},children:"Edit"}),Object(ce.jsx)("p",{style:{color:"red",cursor:"pointer"},children:"Delete"})]});return Object(ce.jsx)(Je.a,{content:a,trigger:"click",children:Object(ce.jsx)(dt.c,{})})}}],f=Ri.map((e=>Sa(e)));return Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(Ue,{title:"All Customer",showtools:!0,onCreate:()=>h((e=>({...e,isVisible:!0}))),createButtonText:"Add new customer"}),Object(ce.jsx)(J,{mt:2,children:Object(ce.jsx)(Ne,{rowsPerPage:r,page:a,total:d.totalItems,handleChangeRowsPerPage:e=>{(async()=>{s(parseInt(e.target.value,10)),n(0),await A(Qn({page:0,size:parseInt(e.target.value,10)}))})()},handleChangePage:(e,t)=>{(async()=>{n(t),await A(Qn({page:t,size:r}))})()},columns:v,dataSource:l})}),Object(ce.jsx)(qi,{visible:p.isVisible,onCancel:()=>h((e=>({...e,isVisible:!1}))),onFinish:async e=>{try{h((e=>({...e,loading:!0}))),e.headOfWareHouseId=m.headOfWareHouseId,e.orgId=j.orgId,await A(Un({data:e})),await A(Qn({page:a,size:r})),h((e=>({...e,isVisible:!1,loading:!1}))),x({type:"success",open:!0,message:"customer has been added"})}catch(t){h((e=>({...e,loading:!1}))),x({type:"error",open:!0,message:"An error occurred, please try again later"})}},loading:p.loading,warehouseInputs:f}),Object(ce.jsx)(Ya,{title:"Edit Customer",visible:O.isVisible,onCancel:()=>y((e=>({...e,isVisible:!1}))),form:t,loading:O.loading,onFinish:async e=>{try{y((e=>({...e,loading:!0}))),await At.editCustomers({data:e,id:O.initialValues.id}),await A(Qn({page:a,size:r})),y((e=>({...e,loading:!1,isVisible:!1}))),xn("success","Customer updated","".concat(O.initialValues.name," has been updated"))}catch(t){y((e=>({...e,loading:!1}))),t.response?xn("error","Error Occurred",t.response.data.message||"Please try again later"):xn("error","Error Occurred","Please try again later")}},children:O.selectedItemInput}),Object(ce.jsx)(Xt,{open:g.open,message:g.message,type:g.type,onClose:(e,t)=>{"clickaway"!==t&&x((e=>({...e,open:!1})))}})]})},qi=e=>{const[t]=_e.a.useForm();return Object(ce.jsx)(ee,{title:" New Customer",visible:e.visible,okButtonProps:{loading:e.loading,htmlType:"submit",style:{backgroundColor:m,border:"1px solid ".concat(m)}},cancelButtonProps:{type:"danger"},onOk:()=>{t.submit()},okText:"Create",onCancel:e.onCancel,children:Object(ce.jsx)(_e.a,{form:t,...Bi,onFinish:e.onFinish,children:e.warehouseInputs})})},Ni=Object(mt.b)({name:"invoiceSlice",initialState:{invoiceList:[],singleInvoice:{customer:{},charges:[]},paginationProps:{page:0,totalPages:0,totalItems:0}},reducers:{addSingleInvoice:(e,t)=>{let{payload:a}=t;e.singleInvoice=a},addInvoiceList:(e,t)=>{let{payload:a}=t;e.invoiceList=a},addPaginationProps:(e,t)=>{let{payload:a}=t;e.paginationProps=a}}}),{addSingleInvoice:Ei,addInvoiceList:Fi,addPaginationProps:Ti}=Ni.actions,Wi=e=>t=>At.getAllInvoice(e).then((e=>{const{currentPage:a,totalPages:n,totalItems:i,invoices:r}=e.data.data;return t(Ti({page:a,totalPages:n,totalItems:i})),t(Fi(r)),Promise.resolve(e.data.data)})).catch((e=>{if(e.response)return Promise.reject(e.response.data)})),zi=e=>e.invoiceReducer;var Di=Ni.reducer;const{Option:Gi}=Pe.a,Qi=Object(O.a)((e=>({icons:{fontSize:"1.4vw",color:e.grey,marginRight:"15px","&:hover":{color:e.primaryColor,cursor:"pointer"}},historyIcon:{color:e.primaryColor,fontSize:"1.4vw",marginRight:"10px"},arroweft:{width:0,height:0,borderTop:"20px solid transparent",borderBottom:"20px solid transparent",borderRight:"20px solid ".concat(e.foreground)},logo:{width:"15%",height:"auto"},totalBackground:{backgroundColor:e.background}}))),Ui=[{item:[{itemName:"Rice",price:20,id:1},{itemName:"Beans",price:15,id:2}],quantity:0,price:0,amount:0,itemId:"",itemName:""}],Mi=[{name:"customer_id",label:"Customer",isRequired:!1,type:"search"},{name:"due_date",label:"Due date",isRequired:!1,type:"date"},{name:"sales_person",label:"Sales person",isRequired:!1,type:"select"},{name:"notes",label:"Notes",isRequired:!1,type:"textarea"}],Li=[{name:"name",label:"Name",isRequired:!0,type:"text"},{name:"amount",label:"Amount",isRequired:!0,type:"number"}],Yi={labelCol:{span:24},wrapperCol:{span:24}},Ki=e=>{const{usersByOrg:t,userProfile:a}=Object(Pt.c)($t),{customerList:n}=Object(Pt.c)(Mn),{itemList:r}=Object(Pt.c)(Et),[s]=(Qi(),_e.a.useForm()),[c]=_e.a.useForm(),[o,l]=Object(i.useState)(Ui),[d,u]=Object(i.useState)(null),[j,m]=Object(i.useState)([]),[b,p]=Object(i.useState)({}),[h,g]=Object(i.useState)(!1),[x,O]=Object(i.useState)({isVisible:!1,loading:!1}),[y,A]=Object(i.useState)({isVisible:!1,loading:!1}),[v,I]=Object(i.useState)({open:!1,type:"",message:""}),C=Object(le.f)(),w=Object(Pt.b)();Object(i.useEffect)((()=>{const e=[...o].map((e=>(e.item=r,e)));l(e)}),[r]);const k=Ri.map((e=>Sa(e))),S=()=>{const e=[...o];e.splice(d,1),l(e)},P=e=>e.find(((e,t)=>t===d)),R=(e,t)=>{e.splice(d,1,t),l(e)},B=e=>{const t=[...o],a=P(t),n=a.item.find((t=>t.id===e));a.itemId=e,a.itemName=n.itemName,a.price=parseInt(n.sellingPrice),R(t,a)},V=e=>{const t=[...o],a=P(t),n=e.target.value;a.quantity=n,a.amount=parseInt(n||0)*parseInt(a.price),R(t,a)},q=[{title:"Item",dataIndex:"item",key:"item",render:e=>{const t=e.map(((e,t)=>Object(ce.jsx)(Gi,{value:e.id,children:e.itemName},t)));return Object(ce.jsx)(Y,{children:Object(ce.jsx)(Pe.a,{onChange:B,placeholder:"Select Item",style:{width:"100%"},bordered:!1,children:t})})}},{title:"Quantity",dataIndex:"quantity",key:"quantity",render:(e,t)=>Object(ce.jsx)(Y,{children:Object(ce.jsx)(Ze.a,{type:"number",disabled:!Boolean(t.price),bordered:!1,onChange:V,placeholder:""})})},{title:"Price",dataIndex:"price",key:"price",render:e=>Object(ce.jsx)(Y,{children:Object(ce.jsx)(Ze.a,{type:"number",bordered:!1,disabled:!0,value:e,placeholder:""})})},{title:"Amount",dataIndex:"amount",key:"amount",render:(e,t)=>Object(ce.jsx)(Y,{children:Object(ce.jsx)(Ze.a,{type:"number",bordered:!1,value:e,placeholder:"",disabled:!0})})},{title:"Del",dataIndex:"delete",key:"delete",width:"1%",render:e=>o.length>1&&Object(ce.jsx)(dt.e,{onClick:S,style:{fontSize:"1.4vw",marginLeft:"20px",color:"red"}})}],N=e=>(t,a)=>{const n={...b};n[e]="due_date"===e?Wn()(a).toISOString():t,p(n)},E=e=>{"customer_id"===e&&A((e=>({...e,isVisible:!0})))},F=n.map(((e,t)=>Object(ce.jsx)(Gi,{value:e.id,children:"".concat(e.firstName," ").concat(e.lastName)},t))),T=[...t].map(((e,t)=>Object(ce.jsx)(Gi,{value:e.id,children:" "!==e.fullName?e.fullName:"Adefisayo Adeniji"},t))),W=[...Mi].map((e=>"customer_id"===e.name?Object(ce.jsx)($e.a,{sm:12,children:Sa(e,N,F,null,E)}):"sales_person"===e.name?Object(ce.jsx)($e.a,{sm:12,children:Sa(e,N,T)}):Object(ce.jsx)($e.a,{sm:12,children:Sa(e,N)}))),z=[...Li].map((e=>Sa(e))),D=[...j].map(((e,t)=>Object(ce.jsx)(Hi,{data:e},t))),G=()=>j.reduce(((e,t)=>e+parseInt(t.amount)),0),Q=()=>o.reduce(((e,t)=>e+parseInt(t.amount)),0);return Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(Ue,{title:"New Invoice"}),Object(ce.jsx)(J,{mt:2,py:3,px:4,display:"flex",children:Object(ce.jsx)(it.a,{item:!0,xs:12,children:Object(ce.jsx)(f.a,{px:3,mt:2,children:Object(ce.jsx)(_e.a,{form:c,onFinish:async e=>{try{g(!0),e.sales_person=b.sales_person,e.customer_id=b.customer_id,e.due_date=b.due_date;const t=o.map((e=>({id:e.itemId,quantity:e.quantity,price:e.price,itemName:e.itemName})));e.items=t,e.total_amount=Q()+G(),e.charges=j,console.log(e,"values"),await At.createInvoice({data:e,id:e.customer_id}),await w(Wi({page:0,size:10})),xn("success","Invoice Created","Invoice was successfully created"),g(!1),C.push("/invoice")}catch(n){var t,a;g(!1),xn("error","Failed",(null===n||void 0===n||null===(t=n.response)||void 0===t||null===(a=t.data)||void 0===a?void 0:a.message)||"Please try again later")}},...Yi,children:Object(ce.jsx)(et.a,{gutter:16,children:W})})})})}),Object(ce.jsx)(J,{mt:2,children:Object(ce.jsx)(Ne,{dataSource:o,onRow:(e,t)=>({onClick:e=>{u(t)}}),columns:q,hidePagination:!0})}),Object(ce.jsxs)(f.a,{p:4,display:"flex",justifyContent:"space-between",children:[Object(ce.jsx)(We,{onClick:()=>{const e={item:r,quantity:0,price:0,amount:0,itemId:"",itemName:""};l((t=>[...t,e]))},text:"Add Row"}),Object(ce.jsxs)(f.a,{flexBasis:"40%",children:[Object(ce.jsx)(f.a,{px:1,children:D}),Object(ce.jsx)(Si.a,{}),Object(ce.jsx)(Xi,{title:"Sub-total",amount:Q()}),Object(ce.jsx)(Xi,{title:"Total",amount:Q()+G()}),Object(ce.jsx)(De,{onClick:()=>O((e=>({...e,isVisible:!0}))),text:"Add Charges"}),Object(ce.jsxs)(f.a,{mt:6,pb:5,display:"flex",justifyContent:"flex-start",children:[Object(ce.jsx)(f.a,{mr:2,children:Object(ce.jsx)(De,{text:"Cancel"})}),Object(ce.jsx)(We,{loading:h,onClick:e=>{e.preventDefault(),c.submit()},text:"Save & Submit"})]})]})]}),Object(ce.jsx)(Ya,{title:"Add Charges",visible:x.isVisible,onCancel:()=>O((e=>({...e,isVisible:!1}))),form:s,loading:x.loading,onFinish:e=>{m((t=>[...t,e])),O((e=>({...e,isVisible:!1})))},children:z}),Object(ce.jsx)(qi,{visible:y.isVisible,onCancel:()=>A((e=>({...e,isVisible:!1}))),onFinish:async e=>{try{A((e=>({...e,loading:!0}))),e.headOfWareHouseId=b.headOfWareHouseId,e.orgId=a.orgId,await w(Un({data:e})),await w(Qn({})),A((e=>({...e,isVisible:!1,loading:!1}))),I({type:"success",open:!0,message:"customer has been added"})}catch(t){A((e=>({...e,loading:!1}))),I({type:"error",open:!0,message:"An error occurred, please try again later"})}},loading:y.loading,warehouseInputs:k}),Object(ce.jsx)(Xt,{open:v.open,message:v.message,type:v.type,onClose:(e,t)=>{"clickaway"!==t&&I((e=>({...e,open:!1})))}})]})},Xi=e=>{const t=Qi();return Object(ce.jsxs)(J,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,mt:2,p:2,children:[Object(ce.jsx)($,{children:e.title}),Object(ce.jsx)(f.a,{p:1,flexBasis:"80%",className:t.totalBackground,children:Object(ce.jsx)(On.a,{valueStyle:{fontSize:"1.2vw",color:b},value:e.amount,prefix:"\u20a6"})})]})},Hi=e=>Object(ce.jsxs)(f.a,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,children:[Object(ce.jsx)(_,{children:e.data.name}),Object(ce.jsx)(On.a,{valueStyle:{fontSize:"1.2vw",color:b},value:e.data.amount,prefix:"\u20a6"})]});var Ji=a(220),Zi=a(265),_i=a.p+"static/media/companyLogo.38837c7b.jpeg",$i=a(263),er=a(264),tr=a.n(er);var ar;const{Option:nr}=Pe.a,ir=Object(O.a)((e=>({icons:{fontSize:"1.4vw",color:e.grey,marginRight:"15px","&:hover":{color:e.primaryColor,cursor:"pointer"}},historyIcon:{color:e.primaryColor,fontSize:"1.4vw",marginRight:"10px"},arroweft:{width:0,height:0,borderTop:"20px solid transparent",borderBottom:"20px solid transparent",borderRight:"20px solid ".concat(e.foreground)},logo:{width:"15%",height:"auto"},totalBackground:{backgroundColor:e.background}}))),rr=[{name:"from",label:"From",isRequired:!1,type:"text"},{name:"to",label:"To",isRequired:!1,type:"text"},{name:"cc",label:"Cc",isRequired:!1,type:"text"},{name:"subject",label:"Subject",isRequired:!1,type:"text"}],sr=[{name:"customer_name",label:"Customer",isRequired:!1,type:"text",defaultValue:"",disabled:!0},{name:"receipt_number",label:"Receipt Number",isRequired:!1,type:"text",disabled:!0},{name:"amount_received",label:"Amount received(NGN)",isRequired:!0,type:"number"},{name:"bank_changes",label:"Bank Charges",isRequired:!1,type:"number"},{name:"account_to_deposit",label:"Account to Deposit",isRequired:!1,type:"select"},{name:"payment_method",label:"Payment Method",isRequired:!1,type:"select"},{name:"notes",label:"Notes",isRequired:!1,type:"textarea"}],cr=["DEFAULT","CASH","CHECK","BANK_TRANSFER","CREDIT_DEBIT_CARD","INTERNET_BANKING"],or=["Cash on hand","Cash in bank"],lr=e=>{var t;const a=ir(),[n]=_e.a.useForm(),[r,s]=Object(i.useState)({}),[c,o]=Object(i.useState)(sr),[l,d]=Object(i.useState)({isVisible:!1,loading:!1}),[u,m]=Object(i.useState)({isVisible:!1,loading:!1}),[p,h]=Object(i.useState)({}),{singleInvoice:g}=Object(Pt.c)(zi),{id:x}=Object(le.h)(),O=Object(Pt.b)(),{itemList:y}=Object(Pt.c)(Et);Object(i.useEffect)((()=>{(async()=>{try{await O((e={id:x},t=>At.getInvoice(e).then((e=>(t(Ei(e.data.data)),Promise.resolve(e.data.data)))).catch((e=>{if(e.response)return Promise.reject(e.response.data)}))));const{data:{data:t}}=await At.getPaymentInfo({id:x}),a={customer_name:"".concat(t.customer.firstName," ").concat(t.customer.lastName),receipt_number:t.receipt_number},n=[...c].map((e=>(e.defaultValue=a[e.name],e)));o(n),s(t)}catch(t){console.log(t)}var e})()}),[]);const A=[{title:"ID",dataIndex:"id",key:"id"},{title:"Name",dataIndex:"itemName",key:"itemName"},{title:"Quantity",dataIndex:"quantity",key:"quantity"},{title:"Price",dataIndex:"price",key:"price"},{title:"Amount",dataIndex:"amount",key:"amount",render:(e,t)=>parseInt(null===t||void 0===t?void 0:t.quantity)*parseInt(null===t||void 0===t?void 0:t.price)}],v=[...rr].map((e=>Sa(e))),I=cr.map((e=>Object(ce.jsx)(nr,{value:e,children:e},e))),C=or.map((e=>Object(ce.jsx)(nr,{value:e,children:e},e))),w=e=>t=>{const a={...p};a[e]=t,h(a)},k=[...c].map((e=>"payment_method"===e.name?Object(ce.jsx)($e.a,{xs:11,children:Sa(e,w,I)}):"account_to_deposit"===e.name?Object(ce.jsx)($e.a,{xs:12,children:Sa(e,w,C)}):Object(ce.jsx)($e.a,{xs:12,children:Sa(e,w)}))),S=null===g||void 0===g||null===(t=g.charges)||void 0===t?void 0:t.map(((e,t)=>Object(ce.jsx)(Hi,{data:e},t)));return Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(jr,{onClick:e=>{switch(e){case"recordPayment":(async()=>{m((e=>({...e,isVisible:!0})))})();break;case"send":d((e=>({...e,isVisible:!0})));break;default:return}}}),Object(ce.jsx)(ur,{}),Object(ce.jsxs)(J,{mt:2,children:[Object(ce.jsxs)(f.a,{display:"flex",alignItems:"center",style:{backgroundColor:"#A3B1BC",width:"fit-content"},children:[Object(ce.jsx)(f.a,{display:"flex",justifyContent:"center",alignItems:"center",py:1,px:6,children:Object(ce.jsx)($,{style:{color:j},variant:"body2",children:"Unsent"})}),Object(ce.jsx)(f.a,{className:a.arroweft})]}),Object(ce.jsxs)(f.a,{p:3,children:[Object(ce.jsx)("img",{className:a.logo,src:_i,alt:"company logo"}),Object(ce.jsx)(f.a,{mt:5,children:Object(ce.jsx)($,{variant:"h4",children:"Invoice"})}),Object(ce.jsxs)(f.a,{mt:3,pb:2,display:"flex",justifyContent:"space-between",alignItems:"center",children:[Object(ce.jsxs)(f.a,{flexBasis:"30%",children:[Object(ce.jsxs)(f.a,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[Object(ce.jsx)($,{style:{fontWeight:"bold"},variant:"subtitle1",children:"Invoice number:"}),Object(ce.jsx)($,{align:"left",style:{fontWeight:"bold"},variant:"subtitle1",children:null===g||void 0===g?void 0:g.invoice_number})]}),Object(ce.jsxs)(f.a,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[Object(ce.jsx)($,{style:{fontWeight:"bold"},variant:"subtitle1",children:"Invoice Date :"}),Object(ce.jsx)(_,{align:"left",variant:"subtitle1",children:"8th Aug 2019"})]}),Object(ce.jsxs)(f.a,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[Object(ce.jsx)($,{style:{fontWeight:"bold"},variant:"subtitle1",children:"Due Date :"}),Object(ce.jsx)(_,{align:"left",variant:"subtitle1",children:null===g||void 0===g?void 0:g.invoice_date})]})]}),Object(ce.jsxs)(f.a,{children:[Object(ce.jsx)($,{style:{fontWeight:"bold"},variant:"subtitle1",children:"Bill To"}),Object(ce.jsx)(_,{align:"left",variant:"subtitle1",children:"".concat(null===g||void 0===g?void 0:g.customer.firstName," ").concat(null===g||void 0===g?void 0:g.customer.lastName)}),Object(ce.jsx)(_,{align:"left",variant:"subtitle1",children:null===g||void 0===g?void 0:g.customer.address})]})]}),Object(ce.jsx)(Si.a,{}),Object(ce.jsxs)(f.a,{py:2,children:[Object(ce.jsx)($,{children:"Notes"}),Object(ce.jsx)(_,{children:null===g||void 0===g?void 0:g.notes})]}),Object(ce.jsx)(Si.a,{}),Object(ce.jsx)(f.a,{mt:3,children:Object(ce.jsx)(L,{columns:A,dataSource:null===g||void 0===g?void 0:g.items,pagination:!1})}),Object(ce.jsx)(Si.a,{}),Object(ce.jsxs)(f.a,{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center",children:[Object(ce.jsx)(f.a,{children:Object(ce.jsx)(De,{text:"attach a file"})}),Object(ce.jsxs)(f.a,{flexBasis:"40%",children:[S,Object(ce.jsx)(Si.a,{}),Object(ce.jsxs)(f.a,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,mt:2,children:[Object(ce.jsx)($,{children:"Total"}),Object(ce.jsx)(On.a,{valueStyle:{fontSize:"1.2vw",color:b},value:null===g||void 0===g?void 0:g.total_amount,prefix:"\u20a6"})]})]})]})]})]}),Object(ce.jsxs)(Ka,{title:"Send Invoice",visible:l.isVisible,onCancel:()=>d((e=>({...e,isVisible:!1}))),children:[Object(ce.jsx)(_e.a,{colon:!1,labelCol:{span:4},wrapperCol:{span:20},children:v}),Object(ce.jsxs)(f.a,{mt:3,children:[Object(ce.jsx)($,{gutterBottom:!0,variant:"body2",align:"left",children:"Message"}),Object(ce.jsx)($i.CKEditor,{editor:tr.a,data:"<p>Write Message</p>",onReady:e=>{},onChange:(e,t)=>{t.getData()},onBlur:(e,t)=>{},onFocus:(e,t)=>{}})]})]}),Object(ce.jsx)(Ya,{title:g.invoice_number,visible:u.isVisible,form:n,initialValues:{customer:"Adefisayo"},onCancel:()=>{n.resetFields(),m((e=>({...e,isVisible:!1})))},onFinish:async e=>{try{e.payment_method=p.payment_method,e.account_to_deposit=p.account_to_deposit,e.receipt_id=r.receipt_id,e.receipt_number=r.receipt_number,e.customer_name="".concat(r.customer.firstName," ").concat(r.customer.lastName),e.payment_date=Wn()().format("YYYY-MM-DD"),e.org_key="",delete e.bank_changes,m((e=>({...e,loading:!0}))),await At.makePayment({data:e,id:g.id}),await O(Wi({page:0,size:10})),m((e=>({...e,loading:!1,isVisible:!1}))),xn("success","Payment Successful","Payment was made")}catch(t){console.log(t),m((e=>({...e,loading:!1}))),t.response?xn("error","Payment Failed",t.response.data.message||"Please try again"):xn("error","Payment Failed","Please try again")}},children:Object(ce.jsx)(et.a,{gutter:16,children:k})})]})},dr=e=>Object(ce.jsxs)(mr,{pl:4,pr:2,py:2,mb:3,children:[Object(ce.jsx)($,{variant:"body2",children:"Payment of N 300,000.00 using cash received by Essien Joy"}),Object(ce.jsxs)(f.a,{display:"flex",alignItems:"center",children:[Object(ce.jsx)(_,{variant:"overline",children:"3rd Jul 2019"}),Object(ce.jsx)(f.a,{ml:2,children:Object(ce.jsx)(_,{variant:"overline",children:"3:00pm"})})]})]}),ur=e=>{const t=ir(),a=Object(ce.jsxs)(f.a,{px:6,py:2,style:{minWidth:"50vw",maxHeight:"50vh",overflow:"auto"},children:[Object(ce.jsx)(dr,{}),Object(ce.jsx)(dr,{}),Object(ce.jsx)(dr,{}),Object(ce.jsx)(dr,{}),Object(ce.jsx)(dr,{}),Object(ce.jsx)(dr,{}),Object(ce.jsx)(dr,{})]});return Object(ce.jsx)(J,{mt:2,py:3,px:3,children:Object(ce.jsx)(Je.a,{placement:"bottomLeft",content:a,trigger:"click",children:Object(ce.jsxs)(f.a,{style:{cursor:"pointer"},display:"flex",justifyContent:"flex-start",alignItems:"center",children:[Object(ce.jsx)(Ji.a,{className:t.historyIcon}),Object(ce.jsx)($,{style:{color:m,fontWeight:"bold"},variant:"body2",children:"Activity ( Comments and History)"})]})})})},jr=e=>{const t=ir();return Object(ce.jsxs)(J,{display:"flex",justifyContent:"flex-end",alignItems:"center",py:3,px:3,children:[Object(ce.jsx)(Zi.a,{className:t.icons}),Object(ce.jsx)(de.b,{className:t.icons}),Object(ce.jsx)(Ji.b,{className:t.icons}),Object(ce.jsx)(dt.b,{className:t.icons}),Object(ce.jsx)(dt.e,{className:t.icons}),!e.hidePaymentButton&&Object(ce.jsx)(De,{style:{textTransform:"capitalize "},text:"Record a Payment",onClick:()=>e.onClick("recordPayment")})]})},mr=Object(d.c)(f.a)(ar||(ar=Object(o.a)(["\n  border: 1px solid ",";\n  width: 100%;\n  border-radius: 0px 20px 20px 20px;\n"])),p);var br=a(457);const pr=e=>{const[t,a]=Object(i.useState)(0),[n,r]=Object(i.useState)(10),{invoiceList:s,paginationProps:c}=Object(Pt.c)(zi);console.log(s,"invoiceLis");const[o,l]=Object(i.useState)({visible:!1,items:[],invoiceId:null,shipmentStatus:"",loading:!1}),{url:d,path:u}=Object(le.i)(),j=Object(le.f)(),m=Object(Pt.b)();Object(i.useEffect)((()=>{(async()=>{await m(Wi({page:0,size:10}))})()}),[]);const p=[{title:"Invoice Number",dataIndex:"invoice_number",key:"invoice_number"},{title:"Customer",dataIndex:"customer",key:"customer",render:e=>"".concat(e.firstName," ").concat(e.lastName)},{title:"Date",dataIndex:"invoice_date",key:"invoice_date"},{title:"Amount",dataIndex:"total_amount",key:"total_amount",render:e=>Object(ce.jsx)(On.a,{valueStyle:{fontSize:"1.1vw",color:b},value:e,prefix:"\u20a6"})},{title:"Outstanding Balance",dataIndex:"amount_due",key:"amount_due",render:(e,t)=>Object(ce.jsx)(On.a,{valueStyle:{fontSize:"1.1vw",color:b},value:e,prefix:"\u20a6"})},{title:"Payment Status",dataIndex:"status",key:"status"},{title:"Shipment Status",dataIndex:"shipmentStatus",key:"shipmentStatus"},{title:"Action",dataIndex:"action",key:"action",width:"5%",render:(e,t)=>{const a=Object(ce.jsxs)(He.b,{direction:"vertical",size:"small",children:[Object(ce.jsx)("p",{style:{cursor:"pointer"},onClick:()=>j.push("".concat(d,"/").concat(t.id)),children:"View Details"}),Object(ce.jsx)("p",{style:{cursor:"pointer"},onClick:()=>{l((e=>({...e,items:t.items,invoiceId:t.id,visible:!0,shipmentStatus:t.shipmentStatus})))},children:"Issue out items"}),Object(ce.jsx)("p",{style:{color:"red",cursor:"pointer"},children:"Delete"})]});return Object(ce.jsx)(Je.a,{content:a,trigger:"click",children:Object(ce.jsx)(br.a,{children:Object(ce.jsx)(dt.c,{})})})}}];return Object(ce.jsxs)(le.c,{children:[Object(ce.jsxs)(le.a,{exact:!0,path:u,children:[Object(ce.jsx)(Ue,{title:"Invoice",showtools:!0,onCreate:()=>j.push("".concat(d,"/add-invoice")),createButtonText:"Create Invoice"}),Object(ce.jsx)(J,{mt:2,children:Object(ce.jsx)(Ne,{rowsPerPage:n,page:t,total:c.totalItems,handleChangeRowsPerPage:e=>{(async()=>{r(parseInt(e.target.value,10)),a(0),await m(Wi({page:0,size:parseInt(e.target.value,10)}))})()},handleChangePage:(e,t)=>{(async()=>{a(t),await m(Wi({page:t,size:n}))})()},columns:p,dataSource:s})}),Object(ce.jsxs)(Ka,{visible:o.visible,title:"Issue out Items",okText:"Confirm",loading:o.loading,onOk:async()=>{try{if(l((e=>({...e,loading:!0}))),"ISSUED"===o.shipmentStatus)return xn("error","Action denied","Items was previously issued"),void l((e=>({...e,loading:!1,visible:!1})));const e={invoiceId:o.invoiceId,items:o.items.map((e=>({id:e.id,quantity:e.quantity})))};await At.issueItem({data:e});await m(Wi({page:t,size:n})),xn("success","Item Issued","Item has been successfully issued"),l((e=>({...e,loading:!1,visible:!1})))}catch(a){var e;if(l((e=>({...e,loading:!1}))),a.response)xn("error","Failed",null!==(e=a.response.data.message)&&void 0!==e?e:"Please try again later")}},onCancel:()=>l((e=>({...e,visible:!1}))),children:[Object(ce.jsx)($,{children:"Are sure of issuing out the following Items?"}),Object(ce.jsx)(w.a,{columns:[{title:"Item Name",dataIndex:"itemName",key:"itemName"},{title:"Quantity",dataIndex:"quantity",key:"quantity"}],dataSource:o.items,pagination:!1})]})]}),Object(ce.jsx)(le.a,{path:"".concat(u,"/add-invoice"),children:Object(ce.jsx)(Ki,{})}),Object(ce.jsx)(le.a,{path:"".concat(u,"/:id"),children:Object(ce.jsx)(lr,{})})]})},{Option:hr}=Pe.a;var gr=a.p+"static/media/companyLogo2.38837c7b.jpeg";const xr=Object(mt.b)({name:"receiptSlice",initialState:{allReceipts:[],singleReceipt:{},paginationProps:{page:0,totalPages:0,totalItems:0}},reducers:{addAllReceipts:(e,t)=>{let{payload:a}=t;e.allReceipts=a},addSingleReceipt:(e,t)=>{let{payload:a}=t;e.singleReceipt=a},addPaginationProps:(e,t)=>{let{payload:a}=t;e.paginationProps=a}}}),{addAllReceipts:Or,addSingleReceipt:yr,addPaginationProps:Ar}=xr.actions,vr=e=>t=>At.getAllReceipt(e).then((e=>{console.log(e.data,"allReceipt22");const{currentPage:a,totalPages:n,totalItems:i,receipts:r}=e.data;return t(Or(r)),t(Ar({page:a,totalPages:n,totalItems:i})),Promise.resolve(r)}),(e=>{if(e.response)return Promise.reject(e.response.data)})),fr=e=>e.receiptReducer;var Ir,Cr,wr=xr.reducer;const kr=[{title:"bill To",value:""},{title:"Payment Date",value:""},{title:"Payment Method",value:""}],Sr=e=>{const{singleReceipt:t}=Object(Pt.c)(fr),[a,n]=Object(i.useState)(kr),{id:r}=Object(le.h)(),s=Object(Pt.b)();Object(i.useEffect)((()=>{var e;s((e={id:r},t=>At.getSingleReceipt(e).then((e=>(console.log(e,"singleReceipt"),t(yr(e.data)),Promise.resolve(e.data))),(e=>{if(e.response)return Promise.reject(e.response.data)}))))}),[]),Object(i.useEffect)((()=>{const e=[{title:"bill To",value:t.billTo},{title:"Payment Date",value:Wn()(t.created_at).format("Do MMM, YYYY")},{title:"Payment Method",value:t.paymentMethod}];n(e)}),[t]);const c=a.map(((e,t)=>Object(ce.jsx)(Pr,{data:e},t)));return Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(jr,{hidePaymentButton:!0}),Object(ce.jsx)(ur,{}),Object(ce.jsxs)(J,{pb:6,mt:3,px:4,py:2,children:[Object(ce.jsxs)(f.a,{mb:6,display:"flex",alignItems:"flex-end",children:[Object(ce.jsx)(Br,{src:gr,alt:"logo"}),Object(ce.jsx)($,{variant:"h5",children:"First Marine"})]}),Object(ce.jsx)($,{gutterBottom:!0,variant:"h4",children:"Receipt"}),Object(ce.jsxs)(f.a,{display:"flex",children:[Object(ce.jsx)($,{variant:"subtitle2",children:"Receipt Number:"}),Object(ce.jsx)(f.a,{ml:3,children:Object(ce.jsx)($,{variant:"subtitle2",children:t.receiptNumber})})]}),Object(ce.jsxs)(Rr,{children:[Object(ce.jsxs)(f.a,{display:"flex",children:[Object(ce.jsx)(f.a,{px:6,py:4,flexBasis:"50%",style:{backgroundColor:"#F3F6FC"},children:c}),Object(ce.jsxs)(f.a,{px:6,py:4,flexBasis:"50%",style:{backgroundColor:m,color:j},children:[Object(ce.jsx)($,{style:{color:j},gutterBottom:!0,align:"center",variant:"body1",children:"Payment Amount"}),Object(ce.jsx)(On.a,{valueStyle:{color:j,fontSize:"3vw",fontWeight:"bolder",textAlign:"center"},value:t.paymentAmount,prefix:"\u20a6",precision:2})]})]}),Object(ce.jsx)(f.a,{mt:6,py:4,px:6,style:{backgroundColor:"#F3F6FC"},children:Object(ce.jsxs)(f.a,{display:"flex",justifyContent:"space-between",children:[Object(ce.jsx)(Pr,{data:{title:"invoice number",value:t.invoiceNumber}}),Object(ce.jsx)(Pr,{isamount:!0,data:{title:"Invoice Amount",value:t.invoiceAmount}})]})})]})]})]})},Pr=e=>Object(ce.jsxs)(f.a,{mt:2,display:"flex",alignItems:"center",justifyContent:"space-between",children:[Object(ce.jsxs)($,{style:{textTransform:"capitalize"},variant:"subtitle2",children:[e.data.title,":"]}),Object(ce.jsx)(f.a,{ml:4,children:e.isamount?Object(ce.jsx)(On.a,{value:e.data.value,prefix:"\u20a6",precision:2}):Object(ce.jsx)(_,{style:{textTransform:"capitalize"},variant:"body2",align:"left",children:e.data.value})})]}),Rr=Object(d.c)(f.a)(Ir||(Ir=Object(o.a)(["\n  width: 90%;\n  margin: 0 auto;\n  margin-top: 24px;\n"]))),Br=d.c.img(Cr||(Cr=Object(o.a)(["\n  width: 10%;\n"]))),{Option:Vr}=Pe.a,qr=[{bill_to:"",branch_id:"",invoice_amount:0,invoice_date:"2022-03-17T03:20:00.610Z",invoice_number:"",notes:"",org_key:"",payment_amount:0,payment_method:""}],Nr=[{name:"bill_to",label:"Customer Name",isRequired:!0,type:"search"},{name:"invoice_number",label:"Invoice Number",isRequired:!1,type:"search",defaultValue:""},{name:"invoice_amount",label:"Invoice Amount",isRequired:!1,type:"number",defaultValue:""},{name:"invoice_date",label:"Invoice Date",isRequired:!1,type:"text",defaultValue:""},{name:"payment_amount",label:"Payment Amount",isRequired:!1,type:"number",defaultValue:""},{name:"payment_method",label:"Payment Method",isRequired:!1,type:"text",defaultValue:""},{name:"receipt_number"}],Er={labelCol:{span:24},wrapperCol:{span:24}},Fr=e=>{const[t,a]=Object(i.useState)(2),[n,r]=Object(i.useState)(10),[s,c]=Object(i.useState)({}),[o,l]=Object(i.useState)(qr),[d,u]=Object(i.useState)({isVisible:!1,loading:!1}),{url:j,path:m}=Object(le.i)(),b=Object(le.f)(),p=Object(Pt.b)(),{paginationProps:h,allReceipts:g}=Object(Pt.c)(fr),{invoiceList:x}=Object(Pt.c)(zi),{customerList:O}=Object(Pt.c)(Mn);console.log({allReceipts:g,customerList:O,invoiceList:x},"allreceipcts"),Object(i.useEffect)((()=>{p(vr({page:0,size:10}))}),[]);const y=[{title:"Reciept Number",dataIndex:"receiptNumber",key:"receiptNumber"},{title:"Customer",dataIndex:"customer",key:"customer"},{title:"Date",dataIndex:"invoiceDate",key:"invoiceDate",render:e=>Wn()(e).format("Do, MMM YYYY")},{title:"Invoice Number",dataIndex:"invoiceNumber",key:"invoiceNumber"},{title:"Payment Method",dataIndex:"paymentMethod",key:"paymentMethod"},{title:"Amount Paid",dataIndex:"paymentAmount",key:"paymentAmount"},{title:"Total Amount",dataIndex:"invoiceAmount",key:"invoiceAmount"},{title:"Action",dataIndex:"action",key:"action",width:"5%",render:(e,t)=>{const a=Object(ce.jsxs)(He.b,{direction:"vertical",size:"small",children:[Object(ce.jsx)("p",{style:{cursor:"pointer"},onClick:()=>b.push("".concat(j,"/").concat(t.id)),children:"View Details"}),Object(ce.jsx)("p",{style:{color:"red",cursor:"pointer"},children:"Delete"})]});return Object(ce.jsx)(Je.a,{content:a,trigger:"click",children:Object(ce.jsx)(dt.c,{})})}}],A=e=>t=>{const a={...s};a[e]=t,c(a)},v=e=>{const t=[...o],a=t.invoiceList.find((t=>t.id===e));t.invoiceId=a.id,t.bill_to=a.bill_to,t.invoice_number=a.invoice_number,t.invoice_amount=a.amount_due,t.invoice_date=a.invoice_date,t.orgId=a.orgId},f=x.map(((e,t)=>Object(ce.jsx)(Vr,{value:e.id,children:"".concat(e.bill_to)},t))),I=Nr.map((e=>Sa(e,A,f,v)));return Object(ce.jsxs)(le.c,{children:[Object(ce.jsxs)(le.a,{exact:!0,path:m,children:[Object(ce.jsx)(Ue,{title:"Receipt",showtools:!0,onCreate:()=>u((e=>({...e,isVisible:!0}))),createButtonText:"Create Receipt"}),Object(ce.jsx)(J,{mt:2,children:Object(ce.jsx)(Ne,{rowsPerPage:n,page:t,total:h.totalItems,handleChangeRowsPerPage:e=>{r(parseInt(e.target.value,10)),a(0),p(vr({page:0,size:parseInt(e.target.value,10)}))},handleChangePage:(e,t)=>{a(t),p(vr({page:t,size:n}))},columns:y,dataSource:g})}),Object(ce.jsx)(Tr,{visible:d.isVisible,onCancel:()=>u((e=>({...e,isVisible:!1}))),loading:d.loading,receiptInputs:I}),";"]}),Object(ce.jsx)(le.a,{path:"".concat(m,"/:id"),children:Object(ce.jsx)(Sr,{})})]})},Tr=e=>{const[t]=_e.a.useForm();return Object(ce.jsx)(ee,{title:" New Receipt",visible:e.visible,okButtonProps:{loading:e.loading,htmlType:"submit",style:{backgroundColor:m,border:"1px solid ".concat(m)}},cancelButtonProps:{type:"danger"},onOk:()=>{t.submit()},okText:"Create",onCancel:e.onCancel,children:Object(ce.jsx)(_e.a,{form:t,...Er,onFinish:e.onFinish,children:e.receiptInputs})})};var Wr,zr;function Dr(e){const{paginationProps:t,itemGroupList:a}=Object(Pt.c)(Ut),{itemList:n}=Object(Pt.c)(Et),{warehouseList:i}=Object(Pt.c)(kt);return Object(ce.jsx)(ce.Fragment,{children:Object(ce.jsxs)(Qr,{children:[Object(ce.jsx)(Gr,{count:n.length,name:"Total Item"}),Object(ce.jsx)(Gr,{count:t.totalItemGroup,name:"Total Item Group"}),Object(ce.jsx)(Gr,{count:i.length,name:"Total Warehouse"})]})})}const Gr=e=>Object(ce.jsxs)(Ur,{children:[Object(ce.jsx)(On.a,{valueStyle:{color:m,fontWeight:"bold",fontSize:"2.5vw"},value:e.count}),Object(ce.jsx)(_,{variant:"body2",children:e.name})]}),Qr=Object(d.c)(f.a)(Wr||(Wr=Object(o.a)(["\n  display: flex;\n  justify-content: flex-start;\n  align-items: center;\n  flex-wrap: wrap;\n"]))),Ur=Object(d.c)(J)(zr||(zr=Object(o.a)(["\n  flex-basis: 23%;\n  display: grid;\n  place-items: center;\n  padding: 20px;\n  margin-right: 2%;\n  margin-bottom: 15px;\n"]))),{Option:Mr}=Pe.a,Lr=[{name:"first_name",label:"First Name",isRequired:!0,type:"text",id:"firstName",defaultValue:""},{name:"last_name",label:"Last Name",isRequired:!0,type:"text",defaultValue:"",id:"lastName"},{name:"other_name",label:"Other Name",isRequired:!1,type:"text",defaultValue:"",id:"otherName"},{name:"email",label:"Email",isRequired:!0,type:"text",defaultValue:"",id:"email"},{name:"phone_number",label:"Phone Number",isRequired:!0,type:"phone",defaultValue:"",id:"phoneNumber"},{name:"address",label:"Address",isRequired:!0,type:"text",defaultValue:"",id:"address"}],Yr={labelCol:{span:24},wrapperCol:{span:24}},Kr=e=>{const[t]=_e.a.useForm(),[a,n]=Object(i.useState)(0),[r,s]=Object(i.useState)(10),{vendorList:c,paginationProps:o}=Object(Pt.c)(ra),{usersByOrg:l,userProfile:d}=Object(Pt.c)($t),[u,j]=Object(i.useState)({}),[m,b]=Object(i.useState)({isVisible:!1,loading:!1}),[p,h]=Object(i.useState)({open:!1,type:"",message:""}),[g,x]=Object(i.useState)({isVisible:!1,selectedItemInput:[],loading:!1,initialValues:{}});console.log({vendorList:c});const O=Object(Pt.b)();Object(i.useEffect)((()=>{t.resetFields();const e=Object.entries(g.initialValues).map((e=>{let[t,a]=e;return"firstName"===t?(t="first_name",[t,a]):"lastName"===t?(t="last_name",[t,a]):"phoneNumber"===t?(t="phone_number",[t,a]):[t,a]}));t.setFieldsValue(Object.fromEntries(e))}),[g.isVisible]);[...l].map(((e,t)=>Object(ce.jsx)(Mr,{value:e.id,children:" "!==e.fullName?e.fullName:"Adefisayo Adeniji"},t)));const y=[{title:"ID",dataIndex:"id",key:"id"},{title:"Name",dataIndex:"name",key:"name",render:(e,t)=>"".concat(t.firstName," ").concat(t.lastName)},{title:"Email",dataIndex:"email",key:"email"},{title:"Phone Number",dataIndex:"phoneNumber",key:"phoneNumber"},{title:"Address",dataIndex:"address",key:"address"},{title:"Action",dataIndex:"action",key:"action",width:"5%",render:(e,t)=>{const a=Object(ce.jsxs)(He.b,{direction:"vertical",size:"small",children:[Object(ce.jsx)("p",{onClick:()=>{const e=Lr.map((e=>(e.defaultValue=t[e.id],Sa(e))));x((a=>({...a,selectedItemInput:e,isVisible:!0,initialValues:t})))},style:{cursor:"pointer"},children:"Edit"}),Object(ce.jsx)("p",{style:{color:"red",cursor:"pointer"},children:"Delete"})]});return Object(ce.jsx)(Je.a,{content:a,trigger:"click",children:Object(ce.jsx)(dt.c,{})})}}],A=Lr.map((e=>Sa(e)));return console.log({paginationProps:o}),Object(ce.jsxs)(ce.Fragment,{children:[Object(ce.jsx)(Ue,{title:"All Vendor",showtools:!0,onCreate:()=>b((e=>({...e,isVisible:!0}))),createButtonText:"Add new Vendor"}),Object(ce.jsx)(J,{mt:2,children:Object(ce.jsx)(Ne,{rowsPerPage:r,page:a,total:o.totalItems,handleChangeRowsPerPage:e=>{(async()=>{s(parseInt(e.target.value,10)),n(0),await O(ia({page:0,size:parseInt(e.target.value,10)}))})()},handleChangePage:(e,t)=>{(async()=>{n(t),await O(ia({page:t,size:r}))})()},columns:y,dataSource:c})}),Object(ce.jsx)(Xr,{visible:m.isVisible,onCancel:()=>b((e=>({...e,isVisible:!1}))),onFinish:async e=>{const t={vendor_image:"lkwfowefpowefkwpeofk"};try{b((e=>({...e,loading:!0}))),e.headOfWareHouseId=u.headOfWareHouseId,e.orgId=d.orgId,await O((n={data:{...t,...e}},e=>At.createVendors(n).then((e=>Promise.resolve(e))).catch((e=>{if(e.response)return Promise.reject(e.response.data)})))),await O(ia({page:a,size:r})),b((e=>({...e,isVisible:!1,loading:!1}))),h({type:"success",open:!0,message:"customer has been added"})}catch(i){b((e=>({...e,loading:!1}))),h({type:"error",open:!0,message:"An error occurred, please try again later"})}var n},loading:m.loading,warehouseInputs:A}),Object(ce.jsx)(Ya,{title:"Edit Vendor",visible:g.isVisible,onCancel:()=>x((e=>({...e,isVisible:!1}))),form:t,okText:"Submit",loading:g.loading,onFinish:async e=>{console.log(e);try{x((e=>({...e,loading:!0}))),await At.editVendors({data:e,id:g.initialValues.id}),await O(ia({page:a,size:r})),x((e=>({...e,loading:!1,isVisible:!1}))),xn("success","Vendor updated","".concat(g.initialValues.name," has been updated"))}catch(t){x((e=>({...e,loading:!1}))),t.response?xn("error","Error Occurred",t.response.data.message||"Please try again later"):xn("error","Error Occurred","Please try again later")}},children:g.selectedItemInput}),Object(ce.jsx)(Xt,{open:p.open,message:p.message,type:p.type,onClose:(e,t)=>{"clickaway"!==t&&h((e=>({...e,open:!1})))}})]})},Xr=e=>{const[t]=_e.a.useForm();return Object(ce.jsx)(ee,{title:" New Vendor",visible:e.visible,okButtonProps:{loading:e.loading,htmlType:"submit",style:{backgroundColor:m,border:"1px solid ".concat(m)}},cancelButtonProps:{type:"danger"},onOk:()=>{t.submit()},okText:"Create",onCancel:e.onCancel,children:Object(ce.jsx)(_e.a,{form:t,...Yr,onFinish:e.onFinish,children:e.warehouseInputs})})};var Hr,Jr,Zr,_r,$r;const{Option:es}=Pe.a,{SubMenu:ts}=he.a,as=Object(O.a)((e=>({root:{display:"flex","& > *":{margin:e.spacing(1)}},small:{width:e.spacing(3),height:e.spacing(3),fontSize:"1.2vw"},large:{width:e.spacing(7),height:e.spacing(7)}})));const ns=Object(d.c)(f.a)(Hr||(Hr=Object(o.a)(["\n  width: 83%;\n  margin-left: 17%;\n"]))),is=Object(d.c)(f.a)(Jr||(Jr=Object(o.a)(["\n  background-color: ",";\n  width: 100%;\n  border-top-left-radius: 5vw;\n  border-bottom-right-radius: 5vw;\n  height: 10vh;\n  display: flex;\n  justify-content: flex-start;\n"])),(e=>e.theme.primaryColor)),rs=Object(d.c)(f.a)(Zr||(Zr=Object(o.a)(["\n  width: 50%;\n  height: 100%;\n\n  display: flex;\n\n  & > div {\n    width: 50%;\n    transform: skewX(40deg);\n  }\n\n  & > div:first-child {\n    background-color: ",";\n    opacity: 0.4;\n  }\n\n  & > div:nth-child(2) {\n    background-color: ",";\n  }\n"])),(e=>e.theme.primaryColor2),(e=>e.theme.primaryColor3)),ss=Object(d.c)(f.a)(_r||(_r=Object(o.a)(["\n  width: 25%;\n  background-color: #200990;\n  display: relative;\n  z-index: -1;\n"]))),cs=Object(d.c)(f.a)($r||($r=Object(o.a)(["\n  display: flex;\n  width: 25%;\n  align-items: center;\n"])));var os=function(){Object(hn.loadProgressBar)();const[e,t]=r.a.useState(!0),[a,n]=(as(),r.a.useState(!1)),s=r.a.useRef(null),c=Object(Pt.b)(),{userProfile:o}=Object(Pt.c)($t),u=Object(le.g)();Object(i.useEffect)((()=>{const e=new URLSearchParams(u.search).get("token");e&&(localStorage.invToken=e)}),[]),Object(i.useEffect)((()=>{(async()=>{try{void 0!==localStorage.invToken&&null!==localStorage.invToken&&(c(wt({})),c(Gt({})),c(_t({})),c(Nt({page:0,size:10})),c(Qn({page:0,size:10})),c(ia({page:0,size:10})))}catch(e){console.log(e.statusCode)}})()}),[]),Object(i.useEffect)((()=>{Object.entries(o).length>0&&c(Qt({orgId:o.organisation.orgId,page:0,size:10}))}),[o]);const j=e=>yt.split("api").length>2?e.replace(/dev/,"apps"):e.replace(/apps/,"dev"),m=r.a.useRef(a);return r.a.useEffect((()=>{!0===m.current&&!1===a&&s.current.focus(),m.current=a}),[a]),Object(ce.jsx)(y.b,{injectFirst:!0,children:Object(ce.jsx)(A.a,{theme:e?h:g,children:Object(ce.jsxs)(d.a,{theme:e?h:g,children:[Object(ce.jsx)(x,{}),Object(ce.jsx)(l.a,{}),Object(ce.jsxs)(v.a,{disableGutters:!0,maxWidth:!1,children:[Object(ce.jsx)(ue,{}),Object(ce.jsx)(fe,{}),Object(ce.jsxs)(ns,{children:[Object(ce.jsx)(ue,{hidden:!0}),Object(ce.jsxs)(is,{children:[Object(ce.jsx)(ss,{}),Object(ce.jsxs)(rs,{children:[Object(ce.jsx)(f.a,{}),Object(ce.jsx)(f.a,{})]}),Object(ce.jsxs)(cs,{ref:s,px:2,children:[Object(ce.jsx)(Re.a,{overflowCount:10,offset:[5,0],style:{border:"none",boxShadow:"none"},size:"small",count:9,children:Object(ce.jsx)(Se.a,{style:{fontSize:"1.6vw",color:"#CCCCCC"}})}),Object(ce.jsxs)(f.a,{style:{color:"#fff"},ml:4,display:"flex",alignItems:"center",children:[Object(ce.jsx)(f.a,{mr:2,children:Object(ce.jsx)(Be.a,{size:"small",icon:Object(ce.jsx)(Ve.a,{})})}),Object(ce.jsxs)(f.a,{children:[Object(ce.jsx)(I.a,{endIcon:Object(ce.jsx)(de.a,{}),onClick:()=>{n((e=>!e))},style:{color:"#fff"},children:" "===o.fullName?"".concat(o.firstName," ").concat(o.lastName):o.fullName}),Object(ce.jsx)(oe,{items:["My Account","Subscriptions","Help","Logout"],handleListKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),n(!1))},ref:s,open:a,handleClose:(e,t)=>{if(s.current&&s.current.contains(e.target))return"Logout"===t?(async()=>{try{const e=await At.logout();console.log(e),localStorage.removeItem("invToken"),window.location.assign(j("http://apps.ezoneerp.com/login"))}catch(e){}})():"My Account"===t?window.location.assign(j("http://apps.ezoneerp.com/user-profile")):"Subscriptions"===t?window.location.assign(j("http://apps.ezoneerp.com/subscriptions")):"Help"===t&&window.location.assign(j("http://apps.ezoneerp.com/help")),void console.log(t);n(!1)}})]})]})]})]}),Object(ce.jsx)(f.a,{mx:2,my:2,children:Object(ce.jsxs)(le.c,{children:[Object(ce.jsx)(le.a,{exact:!0,path:"/",children:Object(ce.jsx)(Dr,{})}),Object(ce.jsx)(le.a,{path:"/items",children:Object(ce.jsx)(pn,{})}),Object(ce.jsx)(le.a,{path:"/item-groups",children:Object(ce.jsx)(fn,{})}),Object(ce.jsx)(le.a,{path:"/warehouse",children:Object(ce.jsx)(Rn,{})}),Object(ce.jsx)(le.a,{path:"/inventory-adjustment",children:Object(ce.jsx)(ri,{})}),Object(ce.jsx)(le.a,{path:"/transfer-orders",children:Object(ce.jsx)(Oi,{})}),Object(ce.jsx)(le.a,{path:"/sales-orders",children:Object(ce.jsx)(ki,{})}),Object(ce.jsx)(le.a,{path:"/invoice",children:Object(ce.jsx)(pr,{})}),Object(ce.jsx)(le.a,{path:"/receipts",children:Object(ce.jsx)(Fr,{})}),Object(ce.jsx)(le.a,{path:"/customers",children:Object(ce.jsx)(Vi,{})}),Object(ce.jsx)(le.a,{path:"/vendors",children:Object(ce.jsx)(Kr,{})})]})})]})]})]})})})};const ls=Object(mt.a)({reducer:{itemGroupReducer:Mt,itemReducer:Ft,warehouseReducer:St,dashboardReducer:ea,invoiceReducer:Di,customerReducer:Ln,vendorReducer:oa,receiptReducer:wr,adjustmentsReducer:_n,transfarOrderReducer:ji}});Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));a(410),a(411);c.a.render(Object(ce.jsx)(r.a.StrictMode,{children:Object(ce.jsx)(Pt.a,{store:ls,children:Object(ce.jsx)(xe.a,{children:Object(ce.jsx)(os,{})})})}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((e=>{e.unregister()}))}},[[412,1,2]]]);
//# sourceMappingURL=main.335f64e9.chunk.js.map

Zerion Mini Shell 1.0