import{L as u,bS as d,bT as l,ar as n}from"./index-ktJf6c6X.js";const i=u.injectEndpoints({endpoints:r=>({searchSalesOrdersByCriteria:r.mutation({query:({page:e,size:t,searchValue:a,roleName:s})=>({url:`sale-order/search-by-criteria?page=${e}&size=${t}${s?`&roleName=${encodeURIComponent(s)}`:""}`,method:"POST",body:{searchValue:a||""}})}),createSalesOrder:r.mutation({query:e=>({url:"sale-order",method:"POST",body:e})}),updateSalesOrder:r.mutation({query:e=>({url:"sale-order",method:"PUT",body:e})}),getSalesOrderById:r.query({query:e=>`sale-order/${e}`,keepUnusedDataFor:0}),getAllSalesOrders:r.query({query:()=>"sale-order"}),deleteSalesOrder:r.mutation({query:e=>({url:`sale-order/${e}`,method:"DELETE"})}),createFromQuotation:r.mutation({query:e=>({url:`sale-order/from-quotation/${e}`,method:"POST",body:{}})}),reviseSalesOrder:r.mutation({query:e=>({url:`sale-order/root/${e}/revise`,method:"POST"})}),cloneToNewSalesOrder:r.mutation({query:e=>({url:`sale-order/root/${e}/clone-to-new`,method:"POST"})}),getSalesOrderVersionHistory:r.query({query:e=>`sale-order/root/${e}/versions`,keepUnusedDataFor:0,transformResponse:e=>e??[]}),addSOItem:r.mutation({query:({id:e,body:t})=>({url:`sale-order/${e}/items`,method:"POST",body:t})}),updateSOItem:r.mutation({query:({id:e,itemId:t,body:a})=>({url:`sale-order/${e}/items/${t}`,method:"PUT",body:a})}),deleteSOItem:r.mutation({query:({id:e,itemId:t})=>({url:`sale-order/${e}/items/${t}`,method:"DELETE"})}),addSOService:r.mutation({query:({id:e,body:t})=>({url:`sale-order/${e}/services`,method:"POST",body:t})}),updateSOService:r.mutation({query:({id:e,serviceId:t,body:a})=>({url:`sale-order/${e}/services/${t}`,method:"PUT",body:a})}),deleteSOService:r.mutation({query:({id:e,serviceId:t})=>({url:`sale-order/${e}/services/${t}`,method:"DELETE"})}),addSOCharge:r.mutation({query:({id:e,body:t})=>({url:`sale-order/${e}/charges`,method:"POST",body:t})}),updateSOCharge:r.mutation({query:({id:e,chargeId:t,body:a})=>({url:`sale-order/${e}/charges/${t}`,method:"PUT",body:a})}),deleteSOCharge:r.mutation({query:({id:e,chargeId:t})=>({url:`sale-order/${e}/charges/${t}`,method:"DELETE"})}),addSOTerm:r.mutation({query:({id:e,body:t})=>({url:`sale-order/${e}/terms`,method:"POST",body:t})}),updateSOTerm:r.mutation({query:({id:e,termId:t,body:a})=>({url:`sale-order/${e}/terms/${t}`,method:"PUT",body:a})}),deleteSOTerm:r.mutation({query:({id:e,termId:t})=>({url:`sale-order/${e}/terms/${t}`,method:"DELETE"})}),submitSOForApproval:r.mutation({query:e=>({url:`sale-order/${e}/submit-approval`,method:"POST"})}),approveSalesOrder:r.mutation({query:e=>({url:`sale-order/${e}/approve`,method:"POST"})}),confirmSalesOrder:r.mutation({query:e=>({url:`sale-order/${e}/confirm`,method:"POST"})}),cancelSalesOrder:r.mutation({query:({id:e,reason:t})=>({url:`sale-order/${e}/cancel`,method:"POST",body:{reason:t}})}),closeSalesOrder:r.mutation({query:e=>({url:`sale-order/${e}/close`,method:"POST"})}),validateSOPricing:r.mutation({query:e=>({url:`sale-order/${e}/validate-pricing`,method:"POST"})}),validateSOStock:r.mutation({query:e=>({url:`sale-order/${e}/validate-stock`,method:"POST"})}),getSalesOrderByDisplayNumber:r.query({query:({series:e,number:t})=>`sale-order/by-display-number?series=${encodeURIComponent(e)}&number=${t}`,keepUnusedDataFor:0})})}),{useSearchSalesOrdersByCriteriaMutation:p,useCreateSalesOrderMutation:h,useUpdateSalesOrderMutation:$,useGetSalesOrderByIdQuery:q,useLazyGetSalesOrderByIdQuery:T,useGetAllSalesOrdersQuery:v,useDeleteSalesOrderMutation:M,useCreateFromQuotationMutation:P,useReviseSalesOrderMutation:g,useCloneToNewSalesOrderMutation:E,useGetSalesOrderVersionHistoryQuery:C,useAddSOItemMutation:D,useUpdateSOItemMutation:f,useDeleteSOItemMutation:U,useAddSOServiceMutation:I,useUpdateSOServiceMutation:A,useDeleteSOServiceMutation:L,useAddSOChargeMutation:k,useUpdateSOChargeMutation:R,useDeleteSOChargeMutation:B,useAddSOTermMutation:F,useUpdateSOTermMutation:Q,useDeleteSOTermMutation:V,useSubmitSOForApprovalMutation:j,useApproveSalesOrderMutation:x,useConfirmSalesOrderMutation:_,useCancelSalesOrderMutation:z,useCloseSalesOrderMutation:G,useValidateSOPricingMutation:w,useValidateSOStockMutation:N,useLazyGetSalesOrderByDisplayNumberQuery:H}=i;var o={},m=d;Object.defineProperty(o,"__esModule",{value:!0});var S=o.default=void 0,O=m(l()),y=n;S=o.default=(0,O.default)((0,y.jsx)("path",{d:"m23 12-2.44-2.79.34-3.69-3.61-.82-1.89-3.2L12 2.96 8.6 1.5 6.71 4.69 3.1 5.5l.34 3.7L1 12l2.44 2.79-.34 3.7 3.61.82L8.6 22.5l3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69zm-12.91 4.72-3.8-3.81 1.48-1.48 2.32 2.33 5.85-5.87 1.48 1.48z"}),"Verified");export{T as a,p as b,h as c,S as d,$ as e,j as f,x as g,_ as h,z as i,G as j,q as k,g as l,E as m,M as n,C as o,P as p,v as u};
