PageSourceSearch

https://www.inventory.ae/public/build/assets/index-CJRA3lAG.js

js inventory.ae collected 2026-10-07 23:09:44 UTC 10,824 bytes, 1 lines download raw bytes

1import{_ as H,G as ee,d as M,H as I,a1 as te,a2 as W,r as p,o,h as g,w as n,c as a,f as m,t as s,e as l,g as j,F as v,U as K,V as L,l as z,p as G,Y as ae,aF as ne,aM as oe,J as se,Q as re,L as y,i as le,j as ue,k as ie,B as de,ak as _e,al as me,v as pe,T as ce,bi as ye,an as fe,a6 as ve,bj as ge,ap as be}from"./app-B2Y0-4Oe.js";import{c as he}from"./crud-BRxYhdgV.js";import{E as ke,a as we}from"./ExportTable-DxfS7wYi.js";import{U as Ce}from"./UserInfo-CQfsfzfr.js";import{O as Ae}from"./OrderTable-DOM9A3DD.js";import{D as Te}from"./DateRangePicker-Y2_EBI8a.js";import{A as Ue}from"./AdminPageHeader-D4ZmExHN.js";import{U as De}from"./View-BVuxNstC.js";import{A as Oe,a as Pe}from"./ArrowUpOutlined-D7OkhYA2.js";import"./datatable-S-x8bdRa.js";import"./filter-D8gtdSsr.js";import"./FilePdfOutlined-DpbbsFPC.js";import"./PrinterOutlined-CozDeDGc.js";import"./fields-SjscS4Wz.js";import"./FileExcelOutlined-wTFKrpQT.js";import"./fields-DbY6p1IM.js";import"./PaymentStatus-ptCUI0xc.js";import"./OrderDetails--N7PegNf.js";import"./cart-B6RPniZA.js";import"./apiAdmin-D0yFZeTH.js";import"./AddButton-B3cfjTJJ.js";import"./AddEdit-Rio7WQQ5.js";import"./SaveOutlined-q68O2Itt.js";import"./Invoice-DsZaqEh0.js";import"./BarcodeGenerator-HmUKNoLg.js";import"./SendOutlined-DCqepGJ6.js";import"./WalletOutlined-CGTeby8z.js";import"./ShoppingCartOutlined-DAp38IT1.js";import"./DollarCircleOutlined-CGYgCNTn.js";import"./index-D-LizC8X.js";const Se=ee({props:["data","orderType","visible"],components:{OrderTable:Ae,DateRangePicker:Te},setup(t,{emit:u}){const{paymentStatus:T,permsArray:e}=M(),C=I("sales"),b=te({payment_status:"all",user_id:void 0,dates:[]}),c=I(null),d=()=>{b.payment_status="all",u("closed")};return W(()=>t.visible,(h,k)=>{h==!0&&(t.data.user_type=="suppliers"?C.value=t.orderType==""?"purchases":"purchase-returns":C.value=t.orderType==""?"sales":"sales-returns",b.user_id=t.data.xid,b.dates=[],c&&c.value&&c.value.resetPicker())}),{onClose:d,paymentStatus:T,filters:b,activeOrderType:C,drawerWidth:window.innerWidth<=991?"90%":"70%",serachDateRangePicker:c,permsArray:e}}});function Ve(t,u,T,e,C,b){const c=K,d=L,h=z,k=p("DateRangePicker"),O=G,U=p("OrderTable"),f=ae;return o(),g(f,{title:t.data.name,width:t.drawerWidth,open:t.visible,"body-style":{paddingBottom:"80px"},maskClosable:!0,destroyOnClose:!0,onClose:t.onClose},{default:n(()=>[a(O,{gutter:[8,8],class:"mb-20"},{default:n(()=>[a(h,{xs:24,sm:24,md:12,lg:5,xl:5},{default:n(()=>[a(d,{value:t.filters.payment_status,"onUpdate:value":u[0]||(u[0]=_=>t.filters.payment_status=_),placeholder:t.$t("common.select_default_text",[t.$t("payments.payment_status")]),allowClear:!0,style:{width:"100%"},optionFilterProp:"title","show-search":""},{default:n(()=>[a(c,{title:t.$t("common.all"),value:"all"},{default:n(()=>[m(s(t.$t("common.all")),1)]),_:1},8,["title"]),(o(!0),l(v,null,j(t.paymentStatus,_=>(o(),g(c,{key:_.key,title:_.value,value:_.key},{default:n(()=>[m(s(_.value),1)]),_:2},1032,["title","value"]))),128))]),_:1},8,["value","placeholder"])]),_:1}),a(h,{xs:24,sm:24,md:12,lg:6,xl:6},{default:n(()=>[a(k,{ref:"serachDateRangePicker",onDateTimeChanged:u[1]||(u[1]=_=>t.filters.dates=_)},null,512)]),_:1})]),_:1}),a(U,{orderType:t.activeOrderType,filters:t.filters,perPageItems:10},null,8,["orderType","filters"])]),_:1},8,["title","width","open","onClose"])}const Ie=H(Se,[["render",Ve]]),Be={components:{UserInfo:Ce,Details:Ie,AdminPageHeader:Ue,UserBalance:De,ExprotTable:ke,ArrowUpOutlined:Oe,ArrowDownOutlined:Pe},setup(){const{userType:t,columns:u,filterableColumns:T}
1=we(),e=he(),{formatAmountCurrency:C,getOrderTypeFromstring:b,statusColors:c,permsArray:d,convertToPositive:h,selectedWarehouse:k,willSubscriptionModuleVisible:O}=M(),U=I(!1),f=I({}),_=I("sales"),R=ne();oe(()=>{(!(d.value.includes("customers_view")||d.value.includes("suppliers_view")||d.value.includes("admin"))||!O("reports"))&&R.push("admin.dashboard.index"),d.value.includes("customers_view")||d.value.includes("admin")?t.value="customers":(d.value.includes("suppliers_view")||d.value.includes("admin"))&&(t.value="suppliers")}),se(()=>{P()});const P=()=>{e.tableUrl.value={url:`${t.value}?fields=id,xid,user_type,name,email,profile_image,profile_image_url,phone,details{purchase_order_count,purchase_return_count,sales_order_count,sales_return_count,total_amount,paid_amount,due_amount}`,filters:""},e.table.filterableColumns=T,e.exportDetails.value={allowExport:!0,exportType:"user_reports"},e.fetch({page:1})},x=(A,w)=>{f.value=w,_.value=A,U.value=!0};W(k,(A,w)=>{P()});const D=re(()=>{let A=0,w=0,B=0;return e.table.data.forEach(S=>{A+=S.details.total_amount,w+=S.details.due_amount,B+=S.details.paid_amount}),{totalAmount:A,dueAmount:w,paidAmount:B}});return{columns:u,...e,filterableColumns:T,statusColors:c,userType:t,formatAmountCurrency:C,convertToPositive:h,getOrderTypeFromstring:b,setUrlData:P,permsArray:d,detailsVisible:U,openUserReportDrawer:x,selectedUser:f,activeOrderType:_,totals:D}}},Re={class:"table-responsive"},xe=["onClick"],Ee={key:1},Fe=["onClick"],Ne={key:1},He=["onClick"],Me={key:1},We=["onClick"],je={key:1},Ke={key:0};function Le(t,u,T,e,C,b){const c=p("ExprotTable"),d=ue,h=p("router-link"),k=ie,O=de,U=p("AdminPageHeader"),f=z,_=K,R=L,P=_e,x=me,D=G,A=p("admin-page-filters"),w=pe,B=ce,S=p("UserInfo"),J=p("UserBalance"),V=ye,E=fe,Q=p("ArrowUpOutlined"),N=ve,Y=p("ArrowDownOutlined"),q=ge,X=be,Z=p("Details"),$=p("admin-page-table-content");return o(),l(v,null,[a(U,null,{header:n(()=>[a(d,{title:t.$t("menu.users_reports"),class:"p-0"},{extra:n(()=>[a(c,{exportType:"user_reports",tableName:"users-reports-table",title:t.$t("menu.users_reports")},null,8,["title"])]),_:1},8,["title"])]),breadcrumb:n(()=>[a(O,{separator:"-",style:{"font-size":"12px"}},{default:n(()=>[a(k,null,{default:n(()=>[a(h,{to:{name:"admin.dashboard.index"}},{default:n(()=>[m(s(t.$t("menu.dashboard")),1)]),_:1})]),_:1}),a(k,null,{default:n(()=>[m(s(t.$t("menu.reports")),1)]),_:1}),a(k,null,{default:n(()=>[m(s(t.$t("menu.users_reports")),1)]),_:1})]),_:1})]),_:1}),a(A,null,{default:n(()=>[a(D,{gutter:[16,16]},{default:n(()=>[a(f,{xs:24,sm:24,md:12,lg:10,xl:10}),a(f,{xs:24,sm:24,md:12,lg:14,xl:14},{default:n(()=>[a(D,{gutter:[16,16],justify:"end"},{default:n(()=>[a(f,{xs:24,sm:24,md:24,lg:10,xl:10},{default:n(()=>[a(x,{compact:""},{default:n(()=>[a(R,{style:{width:"35%"},value:t.table.searchColumn,"onUpdate:value":u[0]||(u[0]=r=>t.table.searchColumn=r),placeholder:t.$t("common.select_default_text",[""])},{default:n(()=>[(o(!0),l(v,null,j(e.filterableColumns,r=>(o(),g(_,{key:r.key},{default:n(()=>[m(s(r.value),1)]),_:2},1024))),128))]),_:1},8,["value","placeholder"]),a(P,{style:{width:"65%"},value:t.table.searchString,"onUpdate:value":u[1]||(u[1]=r=>t.table.searchString=r),"show-search":"",onChange:t.onTableSearch,onSearch:t.onTableSearch,loading:t.table.filterLoading},null,8,["value","onChange","onSearch","loading"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),a($,null,{default:n(()=>[a(D,null,{default:n(()=>[a(f,{span:24},{default:n(()=>[a(B,{activeKey:e.userType,"onUpdate:activeKey":u[2]||(u[2]=r=>e.userType=r),onChange:e.setUrlData},{default:n(()=>[e.permsArray.includes("customers_view")||e.permsArray.includes("admin")?(o(),g(w,{key:"customers",tab:t.$t("menu.customers")},null,8,["tab"])):y("",!0),e.permsArray.includes("suppliers_view")||e.permsArray.includes("admin")?(o(),g(w,{key:"suppliers",tab:t.$t("menu.suppliers")},null,8,["tab"])):y("",!0)]),_:1},8,["activeKey","onChange"])]),_:1})]),_:1}),a(D,{gutter:[16,16]},{default:n(()=>[a(f,{span:24},{default:n(()=>[le("div",Re,[a(X,{columns:e.columns,"row-key":r=>r.xid,"data-source":t.table.data,pagination:t.table.pagination,loading:t.table.loading,onChange:t.handleTableChange,id:"users-reports-table",bordered:"",size:"middle"},{bodyCell:n(({column:r,text:ze,record:i})=>[r.dataIndex==="name"?(o(),g(S,{key:0,user:i},null,8,["user"])):y("",!0),r.dataIndex==="user_details.purchase_order_count"?(o(),l(v,{key:1},[e.permsArray.includes("purchases_view")||e.permsArray.includes("admin")?(o(),l("a",{key:0,onClick:F=>e.openUserReportDrawer("",i)},s(i.details.purchase_order_count),9,xe)):(o(),l("span",Ee,s(i.details.purchase_order_count),1))],64)):y("",!0),r.dataIndex==="user_details.purchase_return_count"?(o(),l(v,{key:2},[e.permsArray.includes("purchase_returns_view")||e.permsArray.includes("admin")?(o(),l("a",{key:0,onClick:F=>e.openUserReportDrawer("returns",i)},s(i.details.purchase_return_count),9,Fe)):(o(),l("span",Ne,s(i.details.purchase_return_count),1))],64)):y("",!0),r.dataIndex==="user_details.sales_order_count"?(o(),l(v,{key:3},[e.permsArray.includes("sales_view")||e.permsArray.includes("admin")?(o(),l("a",{key:0,onClick:F=>e.openUserReportDrawer("",i)},s(i.details.sales_order_count),9,He)):(o(),l("span",Me,s(i.details.sales_order_count),1))],64)):y("",!0),r.dataIndex==="user_details.sales_return_count"?(o(),l(v,{key:4},[e.permsArray.includes("sales_returns_view")||e.permsArray.includes("admin")?(o(),l("a",{key:0,onClick:F=>e.openUserReportDrawer("returns",i)},s(i.details.sales_return_count),9,We)):(o(),l("span",je,s(i.details.sales_return_count),1))],64)):y("",!0),r.dataIndex==="user_details.total_amount"?(o(),l(v,{key:5}
1,[m(s(e.formatAmountCurrency(e.convertToPositive(i.details.total_amount))),1)],64)):y("",!0),r.dataIndex==="user_details.paid_amount"?(o(),l(v,{key:6},[m(s(e.formatAmountCurrency(e.convertToPositive(i.details.paid_amount))),1)],64)):y("",!0),r.dataIndex==="user_details.due_amount"?(o(),g(J,{key:7,amount:i.details.due_amount},null,8,["amount"])):y("",!0)]),summary:n(()=>[a(q,null,{default:n(()=>[a(V,{"col-span":4}),a(V,{"col-span":1},{default:n(()=>[a(E,{strong:""},{default:n(()=>[m(s(t.$t("common.total")),1)]),_:1})]),_:1}),a(V,{"col-span":1},{default:n(()=>[a(E,{strong:""},{default:n(()=>[m(s(e.formatAmountCurrency(e.totals.totalAmount)),1)]),_:1})]),_:1}),a(V,{"col-span":1},{default:n(()=>[a(E,{strong:""},{default:n(()=>[m(s(e.formatAmountCurrency(e.totals.paidAmount)),1)]),_:1})]),_:1}),a(V,{"col-span":1},{default:n(()=>[e.totals.dueAmount<0?(o(),g(N,{key:0,title:t.$t("payments.you_will_pay")},{default:n(()=>[a(Q,{style:{color:"red"}}),m(" "+s(e.formatAmountCurrency(e.totals.dueAmount)),1)]),_:1},8,["title"])):(o(),g(N,{key:1,title:t.$t("payments.you_will_receive")},{default:n(()=>[e.totals.dueAmount>0?(o(),l("span",Ke,[a(Y,{style:{color:"green"}})])):y("",!0),m(" "+s(e.formatAmountCurrency(e.totals.dueAmount)),1)]),_:1},8,["title"]))]),_:1})]),_:1})]),_:1},8,["columns","row-key","data-source","pagination","loading","onChange"])])]),_:1})]),_:1}),a(Z,{visible:e.detailsVisible,onClosed:u[3]||(u[3]=r=>e.detailsVisible=!1),data:e.selectedUser,orderType:e.activeOrderType,destroyOnClose:!0},null,8,["visible","data","orderType"])]),_:1})],64)}const wt=H(Be,[["render",Le]]);export{wt as default};

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.