PageSourceSearch

https://web.roapp.io/static/dist/js/17902.956157749193522c8afc.js

js roapp.io collected 2026-09-24 12:54:15 UTC 6,731 bytes, 3 lines download raw bytes

1"use strict";(self.webpackChunkorderry=self.webpackChunkorderry||[]).push([[17902],{17902:function(pt,N,t){t.r(N),t.d(N,{default:function(){return Ft}});var a=t(74848),f=t(96540),G=t(75522),K=t(97717),y=t(49785),R=t(62770),F=t(48997),V=t(66940),H=t(891),z=t(91733),$=t(20299),Q=t(63539),I=t(56289),Y=t(34201),Z=t(51653),J=t(7238),X=t(80309),j=t(367),b=t(32773),k=t(63227),w=t(66244),q=t(21210),_=t(75832),tt=t(5955),et=t(28510),rt=t(2078),at=t(79224),st=t(58552),lt=t(90748),U=t(19619);const c={SUPPLIER_ID:"supplierId",STATUSES:"statuses",CATEGORIES:"categoryId"},nt=e=>{const{ExportManager:o}=t(70171);return{filename:o.clientBackorders.filename,url:o.clientBackorders.url,payload:e,method:"GET"}};var O=t(94618);const ot=e=>({preparePayload:o=>{const d=e(),{ID:u}=t(98147),i=(0,O.j1)(d[c.STATUSES]||[]),h=(0,O.S5)(d[c.SUPPLIER_ID]||{}),m=(0,O.S5)(d[c.CATEGORIES]||{});return{...i&&{statuses:i.length?i:0},...h>0&&{supplierId:h},...m!=="-1"&&{categoryId:m},...o&&{q:o},branchId:u}}});var dt=t(97159);const it=e=>({payload:e,url:"/purchase-orders/backorders/print/",method:dt.PRINT_REQUEST_METHOD.GET});function ct(){const{t:e}=(0,R.Bd)(),{ROLE:o}=t(49332),{name:d,fetchTableData:u}=(0,Y.$A)(),i=(0,rt.k)({instances:[w.Hc.ORDER],roleId:o,disableSelectNode:!1,withWaitingForParts:!0}),h=(0,U.d4)(lt.M),{restore:m,isFetchingCategories:s,flatCategories:B}=(0,et.N)(),{fetchDefaultValues:L}=(0,st.w)({persistName:d,configs:C=>({[c.SUPPLIER_ID]:C({defaultValue:{value:-1}}),[c.STATUSES]:C({defaultValue:"all",restore:(0,q.h)(i)}),[c.CATEGORIES]:C({defaultValue:{value:"-1",path:"",hasChildren:!1},restore:m})})}),r=(0,y.mN)({defaultValues:L}),{isLoading:g}=r.formState,{preparePayload:n}=ot(r.getValues),v=(0,tt.P)("q"),{searchQuery:l}=(0,at.o)({initialState:v,onSearchQueryChange:C=>{u(n(C))}}),W=(0,_.D)(()=>u(n(l))),jt=nt(n(l)),Ut=it(n(l));return(0,V.C)(()=>{W()},[h]),(0,a.jsx)(y.Op,{...r,children:(0,a.jsxs)(j.A,{isContainer:!0,gap:8,children:[(0,a.jsxs)(X.A,{isPreFetch:!g,onSubmit:W,children:[(0,a.jsx)(I.A,{name:c.CATEGORIES,children:(0,a.jsx)($.A,{isLoading:s,title:e("Category"),image:(0,a.jsx)(F._,{image:b.A}),data:B})}),(0,a.jsx)(I.A,{name:c.STATUSES,children:(0,a.jsx)(H.A,{title:e("Status"),image:(0,a.jsx)(F._,{image:k.A}),data:i,ItemComponent:Q.A,isVirtualized:!0})}),(0,a.jsx)(I.A,{name:c.SUPPLIER_ID,children:(0,a.jsx)(z.A,{})})]}),(0,a.jsxs)(j.A,{gap:8,alignSelf:"end",children:[(0,a.jsx)(J.A,{exportOptions:jt,printOptions:Ut}),(0,a.jsx)(Z.A,{})]})]})})}var ht=(0,f.memo)(ct),ut=t(90179),mt=t.n(ut),P=t(3618),E=t(88586),gt=t(51880),vt=t(31807),Et=t(36953),St=t(54123),Ct=t(20893),ft=t(88510),Tt=t(18599),At=t(43096),Rt=t(76752),It=t(84408),Ot=t(63612),Pt=t(70881),T=t(48676),A=t(70001),S=t(60016),xt=t(81044),Dt=t(92731),p=t(91804),M=t(49466),x=t(20562),Bt=t(95944);const D=1,Lt=()=>{const{t:e}=(0,R.Bd)(),{CURRENCY_SYMBOL:o}=t(91530),d=(0,U.wA)(),[u]=(0,Ot.wE)(),{[T.A.PERMISSION_ORDERS]:i}=(0,M.S)();return(0,f.useMemo)(()=>{const{productfield_svc:h}=t(89011),m=h.filterNotHeaders(h.getVisFields()).filter(s=>s.custom).map(s=>({field:s.name,title:s.title,cell:(0,P.h)((0,vt.C)(s)),width:100,checked:!1,sortable:!0}));return[{field:"code",title:e("Code"),cell:(0,E.x)("code"),width:100,minWidth:50,checked:!1,sortable:!0},{field:"article",title:e("SKU"),cell:(0,E.x)("article"),width:100,minWidth:50,checked:!1,sortable:!0},{field:"title",title:e("Name"),cell:s=>(0,St.q)({tableName:S.BL.CLIENT_BACKORDER,withWarranty:!1,withSerialNumber:!0,clientId:null})(mt()(s,["article","code"])),width:319,minWidth:50,system:!0,sortable:!0},{field:"orderIdLabel",title:e("Order"),cell:(0,P.h)("orderIdLabel",{...i&&{onClick:s=>{d((0,Bt.to)(Pt.OrderModalName,{preloader:()=>u({params:{id:s.orderId}}),condition:xt.nw}))}}}),width:200,minWidth:50,checked:!0,sortable:!0},{field:"purchaseNeeded",title:e("Purchase needed"),cell:(0,E.x)("purchaseNeeded",{postContent:s=>(0,Dt.wH)(s.uomId),cls:"h-ta-r"}),width:100,minWidth:50,checked:!0,sortable:!0,align:"right",groupId:D,groupTitle:e("Stock")},{field:"stock",title:e("In stock"),cell:(0,Et.i)(),width:130,minWidth:50,checked:!0,sortable:!1,align:"right",groupId:D,groupTitle:e("Stock")},{field:"lastPurchaseCost",title:`${e("Last purchase price")}, ${o}`,cell:(0,E.x)("lastPurchaseCost",{cls:"h-ta-r"}),width:100,minWidth:50,checked:!0,sortable:!0,align:"right"},{field:"purchaseTotal",title:`${e("Total")}, ${o}`,cell:(0,E.x)("purchaseTotal",{cls:"h-ta-r"}),width:100,minWidth:50,checked:!1,sortable:!0,align:"right"},{field:"supplierId",title:e("Default supplier"),cell:(0,P.h)((0,gt.C)()),width:200,minWidth:50,checked:!0,sortable:!0},...m]},[])},Nt=()=>{const{t:e}=(0,R.Bd)(),o=Lt(),d=(0,f.useRef)(),{[T.A.PERMISSION_PURCHASE_ORDERS_CREATE]:u,[T.A.PERMISSION_PURCHASE_ORDERS_EDIT]:i,[T.A.PERMISSION_WAREHOUSE_TRANSFERS_CREATE]:h}=(0,M.S)(),m=(0,x.DA)({origin:A.gv.BACKORDER,tableName:S.BL.CLIENT_BACKORDER}),s=(0,x.ZM)({origin:A.gv.BACKORDER,tableName:S.BL.CLIENT_BACKORDER}),B=(0,x.zi)({origin:A.gv.BACKORDER,tableName:S.BL.CLIENT_BACKORDER}),L=(r,g,n)=>{const{fileExport:v,ExportManager:l}=t(70171);v({url:l.clientBackorders.url,filename:l.clientBackorders.filename,method:"GET"}
1,{...d.current,selected_rows:(0,p.Ww)({data:g,ids:r,origin:A.gv.BACKORDER})}),n()};return{name:S.BL.CLIENT_BACKORDER,requestUrl:"/purchase-orders/backorders/",requestMethod:"GET",alignKey:"title",fields:o,fieldsGroups:[{id:D,title:e("Stock")}],offset:0,perPage:50,initialPage:0,isColumnDraggable:!0,isColumnResizable:!0,zeroHeaderMargin:!0,withCheckboxField:!0,withoutHeader:!0,withColumnDp:!1,isBigTable:!0,noPreFetch:!0,countLabel:e("v2 Total"),checkedLabel:e("v2 Selected"),checkedActionLabel:e("Actions"),transformData:()=>r=>({...r,data:r.data.map((g,n)=>({...g,id:n,entity_id:g.entityId}))}),requestPreHook:r=>(d.current=r,r),whenEmptyTable:{image:Rt.A,imageSize:"large",label:e("Nothing here yet"),secondaryLabel:e("Products will appear here when they are added to client orders without inventory deduction based on status settings.")},whenEmptyTableWithFilters:{image:It.A,imageSize:"large",label:e("Nothing found"),secondaryLabel:e("Try adjusting your filters or search.")},actionsBtnOptions:({data:r})=>{const g=h&&r.length>0&&(0,p.RB)(r).length>0;return[{icon:{image:ft.A},label:e("Export"),enabled:!0,cb:(n,v,l)=>{L(n,r,l)}},{isDivider:!0},{icon:{image:Ct.A},label:e("Create transfer"),enabled:g,cb:(n,v,l)=>{B(r,l)}},{icon:{image:Tt.A},label:e("Create purchase order"),enabled:u,cb:(n,v,l)=>{s(r,l)}},{icon:{image:At.A},label:e("Add to purchase order"),enabled:i,cb:(n,v,l)=>{m(r,l)}}]}}};function yt(){const e=Nt();return(0,a.jsx)(G.Q,{children:(0,a.jsx)(K.A,{...e,children:(0,a.jsx)(ht,{})})})}var Ft=(0,f.memo)(yt)}}]);
2
3//# sourceMappingURL=17902.956157749193522c8afc.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.