dealpos 25.50.0 → 25.50.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-4YZVDERU.js → chunk-2EP6XDTW.js} +1 -1
- package/browser/chunk-33OKCUGA.js +1 -0
- package/browser/{chunk-KUF3JPB2.js → chunk-34U6PVY5.js} +1 -1
- package/browser/{chunk-QWB3USYP.js → chunk-3FAXTVQI.js} +2 -2
- package/browser/{chunk-X2GHGFH2.js → chunk-42EJHS3A.js} +1 -1
- package/browser/{chunk-TTCSYFRX.js → chunk-467KNI4M.js} +1 -1
- package/browser/{chunk-3CUT73ZP.js → chunk-4I3C6CNY.js} +1 -1
- package/browser/{chunk-FMKY4THI.js → chunk-5Y24QJWR.js} +1 -1
- package/browser/{chunk-2FJNMKCN.js → chunk-6ACGUR3D.js} +1 -1
- package/browser/{chunk-F765TCAS.js → chunk-6DMG2LMI.js} +1 -1
- package/browser/{chunk-BFNGPKGX.js → chunk-7HOW5QOQ.js} +1 -1
- package/browser/{chunk-LIXEWT4U.js → chunk-7IKZACPQ.js} +1 -1
- package/browser/{chunk-4KYROBKJ.js → chunk-7MCT2FSH.js} +1 -1
- package/browser/{chunk-O3ENARQZ.js → chunk-7NFGGAUY.js} +1 -1
- package/browser/{chunk-BZ3GMUQ7.js → chunk-7WB7XD5V.js} +2 -2
- package/browser/chunk-A72QOXN4.js +4 -0
- package/browser/{chunk-BQ7QT5RB.js → chunk-B534JAF4.js} +1 -1
- package/browser/{chunk-GESNWWTD.js → chunk-BEXFUC6A.js} +1 -1
- package/browser/{chunk-2ENLMKGR.js → chunk-BFTWW3SB.js} +1 -1
- package/browser/{chunk-FSOHJLXB.js → chunk-BKZYMEVP.js} +1 -1
- package/browser/{chunk-G3DZI5XK.js → chunk-BNX6XXDZ.js} +1 -1
- package/browser/{chunk-PIAQ4TBN.js → chunk-BOQBXDOK.js} +1 -1
- package/browser/{chunk-BLEJLNEO.js → chunk-C4M7VQFI.js} +1 -1
- package/browser/{chunk-2ITJBRJU.js → chunk-CCWIK546.js} +1 -1
- package/browser/{chunk-OZ3MKU4C.js → chunk-CI4ULOBO.js} +1 -1
- package/browser/{chunk-3AZAILT2.js → chunk-CMKONRKZ.js} +1 -1
- package/browser/{chunk-JCLYKROE.js → chunk-CUDCXMJN.js} +1 -1
- package/browser/{chunk-CCJ6SHBL.js → chunk-DIFPP2ZV.js} +1 -1
- package/browser/{chunk-DYBRYTEM.js → chunk-DMWJZNTI.js} +1 -1
- package/browser/{chunk-7L5VMLEF.js → chunk-DU2VBWSN.js} +1 -1
- package/browser/{chunk-MFJH22SW.js → chunk-E2NGOMCD.js} +1 -1
- package/browser/{chunk-T7PBUS2H.js → chunk-E4L4PN2C.js} +1 -1
- package/browser/{chunk-CXWICNFP.js → chunk-EUSVY4UJ.js} +1 -1
- package/browser/{chunk-5SIEW7SH.js → chunk-FIHBOJV4.js} +1 -1
- package/browser/{chunk-3ZWJMFYL.js → chunk-HGD6HRSU.js} +1 -1
- package/browser/{chunk-S65MPEJS.js → chunk-HNTY7S25.js} +1 -1
- package/browser/{chunk-GBSRXCWH.js → chunk-HRM7HE6Z.js} +1 -1
- package/browser/{chunk-FV4MYFQI.js → chunk-I3SVXKZW.js} +1 -1
- package/browser/{chunk-M2HEFQUY.js → chunk-IGDDA2RG.js} +1 -1
- package/browser/{chunk-A5CTHLE4.js → chunk-J36LAI7P.js} +1 -1
- package/browser/{chunk-COL56R4A.js → chunk-JAUNAK7P.js} +1 -1
- package/browser/{chunk-PXIMA665.js → chunk-JIE2RXLX.js} +2 -2
- package/browser/{chunk-LIX7XJ55.js → chunk-JL4CFBF2.js} +1 -1
- package/browser/{chunk-Y7KCHRMM.js → chunk-JVNUQR5F.js} +1 -1
- package/browser/{chunk-RE6SQEP6.js → chunk-JZTKA4ST.js} +1 -1
- package/browser/{chunk-PLR55YR2.js → chunk-KAPQ56CY.js} +1 -1
- package/browser/{chunk-ISQHQTAS.js → chunk-L5UAK2LQ.js} +1 -1
- package/browser/{chunk-MZSJCSUV.js → chunk-NEP77MPC.js} +2 -2
- package/browser/{chunk-YUILNWDI.js → chunk-NYZIEOHQ.js} +1 -1
- package/browser/chunk-NZLZ6H6Q.js +1 -0
- package/browser/{chunk-HFOJZ3B5.js → chunk-OEUCWGFD.js} +1 -1
- package/browser/{chunk-SOW7VMSU.js → chunk-OQI4P5JW.js} +1 -1
- package/browser/{chunk-XSZJISVJ.js → chunk-OWS3IW26.js} +1 -1
- package/browser/{chunk-KZBVWICA.js → chunk-OZTSXG5Y.js} +1 -1
- package/browser/{chunk-CB6QEEJX.js → chunk-PASO7BB6.js} +1 -1
- package/browser/{chunk-HFZ437GH.js → chunk-PFIN2VSA.js} +1 -1
- package/browser/{chunk-G5JGQBAG.js → chunk-PYSTCFF2.js} +1 -1
- package/browser/{chunk-2SZZVWQD.js → chunk-R4NTCBWJ.js} +2 -2
- package/browser/{chunk-PV4YHZX5.js → chunk-R7KECBQD.js} +1 -1
- package/browser/{chunk-4MQZXTMM.js → chunk-REZUKRTR.js} +1 -1
- package/browser/{chunk-WXYXGYFH.js → chunk-RRIGLMUN.js} +1 -1
- package/browser/{chunk-T3ZHKT2K.js → chunk-RSDLXHSH.js} +1 -1
- package/browser/{chunk-Y5DX5U5Q.js → chunk-RTYMNLFW.js} +1 -1
- package/browser/{chunk-7MJWZXSK.js → chunk-S3IZOS7R.js} +2 -2
- package/browser/{chunk-YLEKN2EU.js → chunk-SLTQIIWW.js} +1 -1
- package/browser/{chunk-2KI73XNT.js → chunk-TNHTSFQM.js} +1 -1
- package/browser/{chunk-QZRMHLML.js → chunk-TRCRCGLM.js} +1 -1
- package/browser/{chunk-CZHWPDAM.js → chunk-TWS5PR4T.js} +1 -1
- package/browser/{chunk-GRLVYPPM.js → chunk-TY24TZEK.js} +1 -1
- package/browser/{chunk-PVBS6SYW.js → chunk-ULNAGOA3.js} +1 -1
- package/browser/{chunk-SBTTKQ4L.js → chunk-UU4IU25V.js} +1 -1
- package/browser/{chunk-UZN4OKOJ.js → chunk-VIZOMY6L.js} +2 -2
- package/browser/{chunk-SK6Y77W4.js → chunk-VOTRMLKO.js} +1 -1
- package/browser/{chunk-HFDJ5XSI.js → chunk-VXTQ5VEM.js} +1 -1
- package/browser/{chunk-GDQGP7DV.js → chunk-W26SBQKL.js} +1 -1
- package/browser/{chunk-S4D5UGSM.js → chunk-WC6DBADN.js} +1 -1
- package/browser/{chunk-IPPIH4F4.js → chunk-WK7YCGTV.js} +1 -1
- package/browser/{chunk-Q3DS2RLM.js → chunk-WOLF2DPX.js} +1 -1
- package/browser/{chunk-B7BVEOOI.js → chunk-XAT2P7QI.js} +1 -1
- package/browser/{chunk-ISN5K6K2.js → chunk-XLKF6N3S.js} +1 -1
- package/browser/{chunk-XFAV2VZL.js → chunk-XPR2GPHE.js} +1 -1
- package/browser/{chunk-YBUERVXV.js → chunk-XSNUFD7O.js} +1 -1
- package/browser/{chunk-A6Z5ZHVO.js → chunk-ZT57H2NK.js} +1 -1
- package/browser/index.html +2 -2
- package/browser/{main-4PHVOJ3C.js → main-EWD2LJE4.js} +2 -2
- package/package.json +1 -1
- package/browser/chunk-EAEOJMTA.js +0 -4
- package/browser/chunk-PHYDJ3P5.js +0 -1
- package/browser/chunk-PMDFKXZY.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Z}from"./chunk-J6M7UWVR.js";import{e as R,f as ie}from"./chunk-BFNGPKGX.js";import"./chunk-OZ3MKU4C.js";import{a as B,b as j}from"./chunk-JCLYKROE.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{D as Q}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{F as ee,N as te}from"./chunk-TEGIL5RZ.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import"./chunk-DWZ5JTI2.js";import"./chunk-KZBVWICA.js";import"./chunk-SBTTKQ4L.js";import"./chunk-36GWLMZX.js";import{b as Y}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-EAEOJMTA.js";import{p as X,s as L}from"./chunk-LGOSIAUC.js";import{Ab as m,Cb as x,Db as v,Eb as C,Fb as k,Fc as u,Gb as n,Gc as b,Hb as i,Hc as T,Ib as O,Ic as J,Pb as D,Sb as y,Sd as z,Ub as c,Xa as o,d as F,da as _,eb as f,hc as r,ib as w,ic as S,jb as M,jc as p,kc as q,ma as P,mb as $,qd as V,sd as N,ta as g,ua as E,vd as K,yb as s}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function ue(t,a){if(t&1){let e=D();n(0,"a",18),y("click",function(){g(e);let l=c();return E(l.convertToCsv())}),O(1,"i",19),r(2," Export Fail"),i()}}function _e(t,a){if(t&1){let e=D();n(0,"a",20),y("click",function(){g(e);let l=c();return E(l.uploadOrders())}),O(1,"i",21),r(2," Send Transaction"),i()}}function fe(t,a){t&1&&(n(0,"th",13)(1,"i"),r(2,"Actions"),i()())}function xe(t,a){if(t&1&&(n(0,"span"),r(1),i()),t&2){let e=c().$implicit;o(),S(e==null||e.Variant==null?null:e.Variant.Name)}}function ve(t,a){if(t&1&&(n(0,"div",22),s(1,xe,2,1,"span"),i()),t&2){let e=a.$implicit;o(),m(e!=null?1:-1)}}function Ce(t,a){if(t&1&&(n(0,"span"),r(1),i()),t&2){let e=c().$implicit;o(),p(" ",e==null?null:e.Quantity," ")}}function Se(t,a){if(t&1&&(n(0,"div",23),s(1,Ce,2,1,"span"),i()),t&2){let e=a.$implicit;o(),m(e!=null?1:-1)}}function he(t,a){if(t&1&&(n(0,"span"),r(1),u(2,"number"),i()),t&2){let e=c().$implicit;o(),p(" ",b(2,1,e.Price)," ")}}function Oe(t,a){if(t&1&&(n(0,"div",23),s(1,he,3,3,"span"),i()),t&2){let e=a.$implicit;o(),m(e!=null?1:-1)}}function ye(t,a){if(t&1&&(n(0,"span"),r(1),u(2,"number"),i()),t&2){let e=c().$implicit;o(),p(" ",b(2,1,e.Quantity*e.UnitQuantity*e.Price*(1-e.Discount/100)-e.DiscountAmount)," ")}}function be(t,a){if(t&1&&(n(0,"div",23),s(1,ye,3,3,"span"),i()),t&2){let e=a.$implicit;o(),m(e!=null?1:-1)}}function ge(t,a){if(t&1){let e=D();n(0,"td",24)(1,"i",25),y("click",function(){g(e);let l=c().$implicit,h=c(2);return E(h.removeOrder(l))}),i()()}}function Ee(t,a){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),u(5,"date"),i(),n(6,"td"),v(7,ve,2,1,"div",22,x),i(),n(9,"td"),v(10,Se,2,1,"div",23,x),i(),n(12,"td"),v(13,Oe,2,1,"div",23,x),i(),n(15,"td"),v(16,be,2,1,"div",23,x),i(),s(18,ge,2,0,"td",24),i()),t&2){let e=a.$implicit,d=c(2);o(2),S(e.Order.Number),o(2),S(T(5,3,e.Order.Date,"dd MMM yyyy")),o(3),C(e.CartItems),o(3),C(e.CartItems),o(3),C(e.CartItems),o(3),C(e.CartItems),o(2),m(d.roleService.sell.Delete?18:-1)}}function De(t,a){if(t&1&&v(0,Ee,19,6,"tr",null,x),t&2){let e=c();C(e.offlineOrders)}}function Te(t,a){t&1&&(n(0,"td",14)(1,"h4",26),r(2,"There is no Offline Order"),i()())}function Ie(t,a){if(t&1&&(n(0,"span"),r(1),n(2,"strong"),r(3),i(),n(4,"strong"),r(5),u(6,"number"),i(),n(7,"strong"),r(8),u(9,"number"),i()()),t&2){let e=c().$implicit;o(),p("",e==null||e.Variant==null?null:e.Variant.Name," "),o(2),p(" ",e.Quantity+" x"," "),o(2),p(" ",b(6,4,e.Price)+" ="," "),o(3),p(" ",b(9,6,e.Quantity*e.UnitQuantity*e.Price*(1-e.Discount/100)-e.DiscountAmount)," ")}}function Fe(t,a){if(t&1&&(n(0,"div",27),s(1,Ie,10,8,"span"),i()),t&2){let e=a.$implicit;o(),m(e!=null?1:-1)}}function Pe(t,a){if(t&1&&(n(0,"div",28),r(1),i()),t&2){let e=c().$implicit;o(),p(" ",e.Message," ")}}function we(t,a){if(t&1){let e=D();n(0,"a",33),y("click",function(){g(e);let l=c().$implicit,h=c(2);return E(h.removeFailedOrder(l))}),O(1,"i",34),i()}}function Me(t,a){if(t&1){let e=D();n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),u(5,"date"),i(),n(6,"td"),v(7,Fe,2,1,"div",27,x),i(),n(9,"td"),s(10,Pe,2,1,"div",28),i(),n(11,"td",29)(12,"a",30),y("click",function(){let l=g(e).$implicit,h=c(2);return E(h.uploadFailedOrder(l))}),O(13,"i",31),i(),s(14,we,2,0,"a",32),i()()}if(t&2){let e=a.$implicit,d=c(2);o(2),S(e.Order.Number),o(2),S(T(5,4,e.Order.Date,"dd MMM yyyy")),o(3),C(e.CartItems),o(3),m(e.Message?10:-1),o(4),m(d.roleService.sell.Delete?14:-1)}}function $e(t,a){if(t&1&&v(0,Me,15,7,"tr",null,x),t&2){let e=c();C(e.failedOrders)}}function ke(t,a){t&1&&(n(0,"td",17)(1,"h4",26),r(2,"There is no Failed Order"),i()())}var H=class t extends B{constructor(e,d,l,h,I,W){super(e);this.httpService=d;this.localData=l;this.csvConverter=h;this.toastr=I;this.roleService=W;this.destroy$=new F,this.pageData={Header:"Offline Orders"}}pageData;offlineOrders=[];failedOrders=[];destroy$;ngOnInit(){this.menuData$.pipe(_(this.destroy$)).subscribe(()=>{this.getOfflineOrders(),this.getFailedOrders()})}removeOrder(e){this.localData.removeOrder(e.id).subscribe({next:()=>{this.toastr.success("Successfully removed order "+e.Order.Number,"Offline Order Deleted!"),this.getOfflineOrders()},error:d=>{this.toastr.warning("Failed to remove order "+e.Order.Number,"Failed to delete order!")}})}getOfflineOrders(){this.localData.findAllOrders().pipe(_(this.destroy$)).subscribe({next:e=>{this.offlineOrders=e},error:e=>{this.toastr.error(e.message,"Error!")}})}getFailedOrders(){this.localData.getFailedOrders().pipe(_(this.destroy$)).subscribe({next:e=>{this.failedOrders=e},error:e=>{this.toastr.error(e.message,"Error!")}})}uploadFailedOrder(e){this.localData.uploadFailedOrder(e).pipe(_(this.destroy$)).subscribe({next:()=>{this.toastr.success("Successfully uploaded order "+e.Order.Number,"Sync Successful!"),this.getFailedOrders()},error:()=>{this.toastr.error("Failed to sync failed order "+e.Order.Number,"Error!")}})}removeFailedOrder(e){this.localData.removeFailedOrder(e.id).pipe(_(this.destroy$)).subscribe({next:d=>{this.toastr.success("Success to remove failed offline order","Error!"),this.getFailedOrders()},error:d=>{this.toastr.error("Failed to remove failed offline order","Error!")}})}uploadOrders(){this.localData.uploadOrders().pipe(_(this.destroy$)).subscribe({next:e=>{e?this.getOfflineOrders():(this.getOfflineOrders(),this.getFailedOrders())},error:e=>{this.getOfflineOrders(),this.getFailedOrders()}})}convertToCsv(){this.csvConverter.convertToCSV(this.getExportData(),"Fail_Transaction.csv")}getExportData(){let e=[["Number","Date","Item","Qty","Price","Total"]];return this.failedOrders.forEach(d=>{d.Items.forEach(l=>{let h=d.Order.Number.toString(),I=d.Order.Date.toLocaleString(),W=l.Quantity.toString(),re=l.Price.toString(),oe=(l.Quantity*l.UnitQuantity*(l.Price*(1-l.Discount/100))-l.DiscountAmount).toString(),ae=[h,I,l.Variant.Name,W,re,oe];e.push(ae)})}),e}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(d){return new(d||t)(f(j),f(L),f(Q),f(Z),f(X),f(Y))};static \u0275cmp=w({type:t,selectors:[["pos-orders"]],standalone:!1,features:[$],decls:52,vars:8,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],["matTooltipPosition","above","matTooltip","Export",1,"btn","btn-outline-secondary","me-6"],["value","Send Transaction","matTooltipPosition","above","matTooltip","Send Transaction",1,"btn","btn-outline-secondary"],[1,"container-fluid"],[1,"row","mt-10","mb-12"],[1,"col-md"],[1,"table","mt-5"],[1,"thead-light","sticky-top-thead"],[1,"border-end",2,"width","130px"],[1,"border-end",2,"width","90px"],[1,"border-end"],[1,"border-end","text-end",2,"width","103px"],[1,"border-end","text-end",2,"width","200px"],[1,"text-center",2,"width","90px"],["colspan","7"],[1,"row","mt-12"],[1,"border-end",2,"width","102px"],["colSpan","5"],["matTooltipPosition","above","matTooltip","Export",1,"btn","btn-outline-secondary","me-6",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["value","Send Transaction","matTooltipPosition","above","matTooltip","Send Transaction",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-paper-plane"],[1,"list-unstyled","text-start"],[1,"list-unstyled","text-end"],[1,"text-center","text-danger"],[1,"fa-solid","fa-xmark","fa-2x","cursor-pointer",3,"click"],[1,"text-center","mt-2"],[1,"list-inline","text-start"],[1,"text-danger"],[1,"d-flex","justify-content-center"],["matTooltipPosition","above","matTooltip","Sync",1,"ms-2","me-2","cursor-pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-cloud-arrow-up","text-primary","fa-2x"],["matTooltipPosition","above","matTooltip","Remove",1,"ms-5","cursor-pointer"],["matTooltipPosition","above","matTooltip","Remove",1,"ms-5","cursor-pointer",3,"click"],["aria-hidden","true",1,"fa-regular","fa-xmark-circle","text-primary","fa-2x"]],template:function(d,l){d&1&&(n(0,"mainpanel-cmp",0)(1,"actions"),s(2,ue,3,0,"a",1),s(3,_e,3,0,"a",2),i(),n(4,"content")(5,"div",3)(6,"div",4)(7,"div",5)(8,"h5"),r(9,"Offline Orders"),i(),n(10,"i"),r(11,"Waiting to be uploaded to the server!"),i(),n(12,"table",6)(13,"thead",7)(14,"tr")(15,"th",8),r(16,"Number"),i(),n(17,"th",9),r(18,"Date"),i(),n(19,"th",10),r(20,"item"),i(),n(21,"th",11),r(22,"Qty"),i(),n(23,"th",12),r(24,"Price"),i(),n(25,"th",12),r(26,"Total"),i(),s(27,fe,3,0,"th",13),i()(),n(28,"tbody"),s(29,De,2,0)(30,Te,3,0,"td",14),i()()()(),n(31,"div",15)(32,"div",5)(33,"h5"),r(34,"Synchronization Errors"),i(),n(35,"i"),r(36,"Exception occured when trying to upload these orders"),i(),n(37,"table",6)(38,"thead",7)(39,"tr")(40,"th",9),r(41,"Number"),i(),n(42,"th",9),r(43,"Date"),i(),n(44,"th",10),r(45,"item"),i(),n(46,"th",10),r(47,"Sync exception"),i(),O(48,"th",16),i()(),n(49,"tbody"),s(50,$e,2,0)(51,ke,3,0,"td",17),i()()()()()()()),d&2&&(k("pageData",l.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),o(2),m((l.failedOrders==null?null:l.failedOrders.length)>0?2:-1),o(),m(l.offlineOrders.length>0?3:-1),o(24),m(l.roleService.sell.Delete?27:-1),o(2),m(l.offlineOrders.length>0?29:30),o(21),m(l.failedOrders.length>0?50:51))},dependencies:[R,N,V],styles:[".cursor-pointer[_ngcontent-%COMP%]{cursor:pointer}"]})};function Ve(t,a){if(t&1&&(n(0,"div",1),O(1,"i",5),r(2),u(3,"date"),i()),t&2){let e=c();o(2),p(" ",T(3,1,e.LastSync,"dd MMM yyyy HH:mm:ss")," ")}}function Ne(t,a){if(t&1&&(n(0,"tr")(1,"td",12),r(2),i(),n(3,"td",13),r(4),i(),n(5,"td"),r(6),i(),n(7,"td",9),r(8),u(9,"number"),i()()),t&2){let e=a.$implicit,d=c(2);o(2),S(e.ID),o(2),S(e.Name),o(2),S(e.Code),o(2),q(" ",d.currency," ",T(9,5,e.UnitPrice,"1.0-4")," ")}}function Le(t,a){if(t&1&&(n(0,"table",3)(1,"thead",6)(2,"tr",7)(3,"th",8),r(4,"ID"),i(),n(5,"th",8),r(6,"Name"),i(),n(7,"th",8),r(8,"Code"),i(),n(9,"th",9),r(10,"Unit Price"),i()()(),n(11,"tbody"),v(12,Ne,10,8,"tr",null,x),u(14,"sortBy"),i(),n(15,"tfoot")(16,"tr",10)(17,"td",11)(18,"strong"),r(19),u(20,"number"),i()()()()()),t&2){let e=c();o(12),C(J(14,1,e.variantList,"asc","Name")),o(7),p("",b(20,5,e.variantList.length)," Product ")}}function Be(t,a){t&1&&(n(0,"h3",4),r(1,"Product has not been synced yet!"),i())}var A=class t extends B{constructor(e,d,l){super(e);this.httpService=d;this._localDataService=l;this.destroy$=new F}variantList=[];OriginalList=[];LastSync;currency;destroy$;ngOnInit(){this.menuData$.subscribe(e=>{this.getVariants(),this.getSyncDate(),this.getCurrency()})}getVariants(){this._localDataService.findAllVariant().pipe(_(this.destroy$)).subscribe({next:e=>{this.OriginalList=e,this.variantList=this.OriginalList},error:e=>{console.error(e)}})}getSyncDate(){this._localDataService.getSyncTime().pipe(_(this.destroy$)).subscribe(e=>{this.LastSync=new Date(e.time)})}getCurrency(){this._localDataService.getPOSStorage().pipe(_(this.destroy$)).subscribe(e=>{e&&(this.currency=e.Currencies[0].Symbol)})}filterList(e){this.variantList=this.OriginalList.filter(d=>d.Name.includes(e))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(d){return new(d||t)(f(j),f(L),f(Q))};static \u0275cmp=w({type:t,selectors:[["pos-products"]],standalone:!1,features:[$],decls:7,vars:4,consts:[[3,"textChange","pageData","hideSearchDropdown"],[1,"h5"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"text-center","mt-4"],[1,"fa-solid","fa-sync-alt"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"text-start"],[1,"text-end"],[1,"table-footer"],["colspan","4",1,"text-start","empty-column"],[2,"max-width","100px"],[2,"max-width","300px"]],template:function(d,l){d&1&&(n(0,"mainpanel-cmp",0),y("textChange",function(I){return l.filterList(I)}),n(1,"actions"),s(2,Ve,4,4,"div",1),i(),n(3,"content")(4,"div",2),s(5,Le,21,7,"table",3)(6,Be,2,0,"h3",4),i()()()),d&2&&(k("pageData",l.menuData)("hideSearchDropdown",!0),o(2),m(l.LastSync?2:-1),o(3),m(l.variantList.length>0?5:6))},dependencies:[R,N,V,ee],encapsulation:2})};var je=[{path:"Products",component:A},{path:"Orders",component:H},{path:"**",redirectTo:"Products",pathMatch:"full"}],U=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=M({type:t});static \u0275inj=P({imports:[z.forChild(je),z]})};var ne=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=M({type:t});static \u0275inj=P({imports:[K,U,ie,te]})};export{ne as OfflineModule};
|
|
1
|
+
import{a as Z}from"./chunk-J6M7UWVR.js";import{e as R,f as ie}from"./chunk-7HOW5QOQ.js";import"./chunk-CI4ULOBO.js";import{a as B,b as j}from"./chunk-CUDCXMJN.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import{D as Q}from"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import{F as ee,N as te}from"./chunk-TEGIL5RZ.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import"./chunk-DWZ5JTI2.js";import"./chunk-OZTSXG5Y.js";import"./chunk-UU4IU25V.js";import"./chunk-36GWLMZX.js";import{b as Y}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-A72QOXN4.js";import{p as X,s as L}from"./chunk-LGOSIAUC.js";import{Ab as m,Cb as x,Db as v,Eb as C,Fb as k,Fc as u,Gb as n,Gc as b,Hb as i,Hc as T,Ib as O,Ic as J,Pb as D,Sb as y,Sd as z,Ub as c,Xa as o,d as F,da as _,eb as f,hc as r,ib as w,ic as S,jb as M,jc as p,kc as q,ma as P,mb as $,qd as V,sd as N,ta as g,ua as E,vd as K,yb as s}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function ue(t,a){if(t&1){let e=D();n(0,"a",18),y("click",function(){g(e);let l=c();return E(l.convertToCsv())}),O(1,"i",19),r(2," Export Fail"),i()}}function _e(t,a){if(t&1){let e=D();n(0,"a",20),y("click",function(){g(e);let l=c();return E(l.uploadOrders())}),O(1,"i",21),r(2," Send Transaction"),i()}}function fe(t,a){t&1&&(n(0,"th",13)(1,"i"),r(2,"Actions"),i()())}function xe(t,a){if(t&1&&(n(0,"span"),r(1),i()),t&2){let e=c().$implicit;o(),S(e==null||e.Variant==null?null:e.Variant.Name)}}function ve(t,a){if(t&1&&(n(0,"div",22),s(1,xe,2,1,"span"),i()),t&2){let e=a.$implicit;o(),m(e!=null?1:-1)}}function Ce(t,a){if(t&1&&(n(0,"span"),r(1),i()),t&2){let e=c().$implicit;o(),p(" ",e==null?null:e.Quantity," ")}}function Se(t,a){if(t&1&&(n(0,"div",23),s(1,Ce,2,1,"span"),i()),t&2){let e=a.$implicit;o(),m(e!=null?1:-1)}}function he(t,a){if(t&1&&(n(0,"span"),r(1),u(2,"number"),i()),t&2){let e=c().$implicit;o(),p(" ",b(2,1,e.Price)," ")}}function Oe(t,a){if(t&1&&(n(0,"div",23),s(1,he,3,3,"span"),i()),t&2){let e=a.$implicit;o(),m(e!=null?1:-1)}}function ye(t,a){if(t&1&&(n(0,"span"),r(1),u(2,"number"),i()),t&2){let e=c().$implicit;o(),p(" ",b(2,1,e.Quantity*e.UnitQuantity*e.Price*(1-e.Discount/100)-e.DiscountAmount)," ")}}function be(t,a){if(t&1&&(n(0,"div",23),s(1,ye,3,3,"span"),i()),t&2){let e=a.$implicit;o(),m(e!=null?1:-1)}}function ge(t,a){if(t&1){let e=D();n(0,"td",24)(1,"i",25),y("click",function(){g(e);let l=c().$implicit,h=c(2);return E(h.removeOrder(l))}),i()()}}function Ee(t,a){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),u(5,"date"),i(),n(6,"td"),v(7,ve,2,1,"div",22,x),i(),n(9,"td"),v(10,Se,2,1,"div",23,x),i(),n(12,"td"),v(13,Oe,2,1,"div",23,x),i(),n(15,"td"),v(16,be,2,1,"div",23,x),i(),s(18,ge,2,0,"td",24),i()),t&2){let e=a.$implicit,d=c(2);o(2),S(e.Order.Number),o(2),S(T(5,3,e.Order.Date,"dd MMM yyyy")),o(3),C(e.CartItems),o(3),C(e.CartItems),o(3),C(e.CartItems),o(3),C(e.CartItems),o(2),m(d.roleService.sell.Delete?18:-1)}}function De(t,a){if(t&1&&v(0,Ee,19,6,"tr",null,x),t&2){let e=c();C(e.offlineOrders)}}function Te(t,a){t&1&&(n(0,"td",14)(1,"h4",26),r(2,"There is no Offline Order"),i()())}function Ie(t,a){if(t&1&&(n(0,"span"),r(1),n(2,"strong"),r(3),i(),n(4,"strong"),r(5),u(6,"number"),i(),n(7,"strong"),r(8),u(9,"number"),i()()),t&2){let e=c().$implicit;o(),p("",e==null||e.Variant==null?null:e.Variant.Name," "),o(2),p(" ",e.Quantity+" x"," "),o(2),p(" ",b(6,4,e.Price)+" ="," "),o(3),p(" ",b(9,6,e.Quantity*e.UnitQuantity*e.Price*(1-e.Discount/100)-e.DiscountAmount)," ")}}function Fe(t,a){if(t&1&&(n(0,"div",27),s(1,Ie,10,8,"span"),i()),t&2){let e=a.$implicit;o(),m(e!=null?1:-1)}}function Pe(t,a){if(t&1&&(n(0,"div",28),r(1),i()),t&2){let e=c().$implicit;o(),p(" ",e.Message," ")}}function we(t,a){if(t&1){let e=D();n(0,"a",33),y("click",function(){g(e);let l=c().$implicit,h=c(2);return E(h.removeFailedOrder(l))}),O(1,"i",34),i()}}function Me(t,a){if(t&1){let e=D();n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),u(5,"date"),i(),n(6,"td"),v(7,Fe,2,1,"div",27,x),i(),n(9,"td"),s(10,Pe,2,1,"div",28),i(),n(11,"td",29)(12,"a",30),y("click",function(){let l=g(e).$implicit,h=c(2);return E(h.uploadFailedOrder(l))}),O(13,"i",31),i(),s(14,we,2,0,"a",32),i()()}if(t&2){let e=a.$implicit,d=c(2);o(2),S(e.Order.Number),o(2),S(T(5,4,e.Order.Date,"dd MMM yyyy")),o(3),C(e.CartItems),o(3),m(e.Message?10:-1),o(4),m(d.roleService.sell.Delete?14:-1)}}function $e(t,a){if(t&1&&v(0,Me,15,7,"tr",null,x),t&2){let e=c();C(e.failedOrders)}}function ke(t,a){t&1&&(n(0,"td",17)(1,"h4",26),r(2,"There is no Failed Order"),i()())}var H=class t extends B{constructor(e,d,l,h,I,W){super(e);this.httpService=d;this.localData=l;this.csvConverter=h;this.toastr=I;this.roleService=W;this.destroy$=new F,this.pageData={Header:"Offline Orders"}}pageData;offlineOrders=[];failedOrders=[];destroy$;ngOnInit(){this.menuData$.pipe(_(this.destroy$)).subscribe(()=>{this.getOfflineOrders(),this.getFailedOrders()})}removeOrder(e){this.localData.removeOrder(e.id).subscribe({next:()=>{this.toastr.success("Successfully removed order "+e.Order.Number,"Offline Order Deleted!"),this.getOfflineOrders()},error:d=>{this.toastr.warning("Failed to remove order "+e.Order.Number,"Failed to delete order!")}})}getOfflineOrders(){this.localData.findAllOrders().pipe(_(this.destroy$)).subscribe({next:e=>{this.offlineOrders=e},error:e=>{this.toastr.error(e.message,"Error!")}})}getFailedOrders(){this.localData.getFailedOrders().pipe(_(this.destroy$)).subscribe({next:e=>{this.failedOrders=e},error:e=>{this.toastr.error(e.message,"Error!")}})}uploadFailedOrder(e){this.localData.uploadFailedOrder(e).pipe(_(this.destroy$)).subscribe({next:()=>{this.toastr.success("Successfully uploaded order "+e.Order.Number,"Sync Successful!"),this.getFailedOrders()},error:()=>{this.toastr.error("Failed to sync failed order "+e.Order.Number,"Error!")}})}removeFailedOrder(e){this.localData.removeFailedOrder(e.id).pipe(_(this.destroy$)).subscribe({next:d=>{this.toastr.success("Success to remove failed offline order","Error!"),this.getFailedOrders()},error:d=>{this.toastr.error("Failed to remove failed offline order","Error!")}})}uploadOrders(){this.localData.uploadOrders().pipe(_(this.destroy$)).subscribe({next:e=>{e?this.getOfflineOrders():(this.getOfflineOrders(),this.getFailedOrders())},error:e=>{this.getOfflineOrders(),this.getFailedOrders()}})}convertToCsv(){this.csvConverter.convertToCSV(this.getExportData(),"Fail_Transaction.csv")}getExportData(){let e=[["Number","Date","Item","Qty","Price","Total"]];return this.failedOrders.forEach(d=>{d.Items.forEach(l=>{let h=d.Order.Number.toString(),I=d.Order.Date.toLocaleString(),W=l.Quantity.toString(),re=l.Price.toString(),oe=(l.Quantity*l.UnitQuantity*(l.Price*(1-l.Discount/100))-l.DiscountAmount).toString(),ae=[h,I,l.Variant.Name,W,re,oe];e.push(ae)})}),e}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(d){return new(d||t)(f(j),f(L),f(Q),f(Z),f(X),f(Y))};static \u0275cmp=w({type:t,selectors:[["pos-orders"]],standalone:!1,features:[$],decls:52,vars:8,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],["matTooltipPosition","above","matTooltip","Export",1,"btn","btn-outline-secondary","me-6"],["value","Send Transaction","matTooltipPosition","above","matTooltip","Send Transaction",1,"btn","btn-outline-secondary"],[1,"container-fluid"],[1,"row","mt-10","mb-12"],[1,"col-md"],[1,"table","mt-5"],[1,"thead-light","sticky-top-thead"],[1,"border-end",2,"width","130px"],[1,"border-end",2,"width","90px"],[1,"border-end"],[1,"border-end","text-end",2,"width","103px"],[1,"border-end","text-end",2,"width","200px"],[1,"text-center",2,"width","90px"],["colspan","7"],[1,"row","mt-12"],[1,"border-end",2,"width","102px"],["colSpan","5"],["matTooltipPosition","above","matTooltip","Export",1,"btn","btn-outline-secondary","me-6",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["value","Send Transaction","matTooltipPosition","above","matTooltip","Send Transaction",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-paper-plane"],[1,"list-unstyled","text-start"],[1,"list-unstyled","text-end"],[1,"text-center","text-danger"],[1,"fa-solid","fa-xmark","fa-2x","cursor-pointer",3,"click"],[1,"text-center","mt-2"],[1,"list-inline","text-start"],[1,"text-danger"],[1,"d-flex","justify-content-center"],["matTooltipPosition","above","matTooltip","Sync",1,"ms-2","me-2","cursor-pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-cloud-arrow-up","text-primary","fa-2x"],["matTooltipPosition","above","matTooltip","Remove",1,"ms-5","cursor-pointer"],["matTooltipPosition","above","matTooltip","Remove",1,"ms-5","cursor-pointer",3,"click"],["aria-hidden","true",1,"fa-regular","fa-xmark-circle","text-primary","fa-2x"]],template:function(d,l){d&1&&(n(0,"mainpanel-cmp",0)(1,"actions"),s(2,ue,3,0,"a",1),s(3,_e,3,0,"a",2),i(),n(4,"content")(5,"div",3)(6,"div",4)(7,"div",5)(8,"h5"),r(9,"Offline Orders"),i(),n(10,"i"),r(11,"Waiting to be uploaded to the server!"),i(),n(12,"table",6)(13,"thead",7)(14,"tr")(15,"th",8),r(16,"Number"),i(),n(17,"th",9),r(18,"Date"),i(),n(19,"th",10),r(20,"item"),i(),n(21,"th",11),r(22,"Qty"),i(),n(23,"th",12),r(24,"Price"),i(),n(25,"th",12),r(26,"Total"),i(),s(27,fe,3,0,"th",13),i()(),n(28,"tbody"),s(29,De,2,0)(30,Te,3,0,"td",14),i()()()(),n(31,"div",15)(32,"div",5)(33,"h5"),r(34,"Synchronization Errors"),i(),n(35,"i"),r(36,"Exception occured when trying to upload these orders"),i(),n(37,"table",6)(38,"thead",7)(39,"tr")(40,"th",9),r(41,"Number"),i(),n(42,"th",9),r(43,"Date"),i(),n(44,"th",10),r(45,"item"),i(),n(46,"th",10),r(47,"Sync exception"),i(),O(48,"th",16),i()(),n(49,"tbody"),s(50,$e,2,0)(51,ke,3,0,"td",17),i()()()()()()()),d&2&&(k("pageData",l.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),o(2),m((l.failedOrders==null?null:l.failedOrders.length)>0?2:-1),o(),m(l.offlineOrders.length>0?3:-1),o(24),m(l.roleService.sell.Delete?27:-1),o(2),m(l.offlineOrders.length>0?29:30),o(21),m(l.failedOrders.length>0?50:51))},dependencies:[R,N,V],styles:[".cursor-pointer[_ngcontent-%COMP%]{cursor:pointer}"]})};function Ve(t,a){if(t&1&&(n(0,"div",1),O(1,"i",5),r(2),u(3,"date"),i()),t&2){let e=c();o(2),p(" ",T(3,1,e.LastSync,"dd MMM yyyy HH:mm:ss")," ")}}function Ne(t,a){if(t&1&&(n(0,"tr")(1,"td",12),r(2),i(),n(3,"td",13),r(4),i(),n(5,"td"),r(6),i(),n(7,"td",9),r(8),u(9,"number"),i()()),t&2){let e=a.$implicit,d=c(2);o(2),S(e.ID),o(2),S(e.Name),o(2),S(e.Code),o(2),q(" ",d.currency," ",T(9,5,e.UnitPrice,"1.0-4")," ")}}function Le(t,a){if(t&1&&(n(0,"table",3)(1,"thead",6)(2,"tr",7)(3,"th",8),r(4,"ID"),i(),n(5,"th",8),r(6,"Name"),i(),n(7,"th",8),r(8,"Code"),i(),n(9,"th",9),r(10,"Unit Price"),i()()(),n(11,"tbody"),v(12,Ne,10,8,"tr",null,x),u(14,"sortBy"),i(),n(15,"tfoot")(16,"tr",10)(17,"td",11)(18,"strong"),r(19),u(20,"number"),i()()()()()),t&2){let e=c();o(12),C(J(14,1,e.variantList,"asc","Name")),o(7),p("",b(20,5,e.variantList.length)," Product ")}}function Be(t,a){t&1&&(n(0,"h3",4),r(1,"Product has not been synced yet!"),i())}var A=class t extends B{constructor(e,d,l){super(e);this.httpService=d;this._localDataService=l;this.destroy$=new F}variantList=[];OriginalList=[];LastSync;currency;destroy$;ngOnInit(){this.menuData$.subscribe(e=>{this.getVariants(),this.getSyncDate(),this.getCurrency()})}getVariants(){this._localDataService.findAllVariant().pipe(_(this.destroy$)).subscribe({next:e=>{this.OriginalList=e,this.variantList=this.OriginalList},error:e=>{console.error(e)}})}getSyncDate(){this._localDataService.getSyncTime().pipe(_(this.destroy$)).subscribe(e=>{this.LastSync=new Date(e.time)})}getCurrency(){this._localDataService.getPOSStorage().pipe(_(this.destroy$)).subscribe(e=>{e&&(this.currency=e.Currencies[0].Symbol)})}filterList(e){this.variantList=this.OriginalList.filter(d=>d.Name.includes(e))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(d){return new(d||t)(f(j),f(L),f(Q))};static \u0275cmp=w({type:t,selectors:[["pos-products"]],standalone:!1,features:[$],decls:7,vars:4,consts:[[3,"textChange","pageData","hideSearchDropdown"],[1,"h5"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"text-center","mt-4"],[1,"fa-solid","fa-sync-alt"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"text-start"],[1,"text-end"],[1,"table-footer"],["colspan","4",1,"text-start","empty-column"],[2,"max-width","100px"],[2,"max-width","300px"]],template:function(d,l){d&1&&(n(0,"mainpanel-cmp",0),y("textChange",function(I){return l.filterList(I)}),n(1,"actions"),s(2,Ve,4,4,"div",1),i(),n(3,"content")(4,"div",2),s(5,Le,21,7,"table",3)(6,Be,2,0,"h3",4),i()()()),d&2&&(k("pageData",l.menuData)("hideSearchDropdown",!0),o(2),m(l.LastSync?2:-1),o(3),m(l.variantList.length>0?5:6))},dependencies:[R,N,V,ee],encapsulation:2})};var je=[{path:"Products",component:A},{path:"Orders",component:H},{path:"**",redirectTo:"Products",pathMatch:"full"}],U=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=M({type:t});static \u0275inj=P({imports:[z.forChild(je),z]})};var ne=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=M({type:t});static \u0275inj=P({imports:[K,U,ie,te]})};export{ne as OfflineModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Re,b as Pe,c as Oe,d as He,e as Ke}from"./chunk-PHH2AA3W.js";import{b as Tt,c as wt}from"./chunk-Y7KCHRMM.js";import{a as _t,b as yt}from"./chunk-FAED643P.js";import{e as Ae}from"./chunk-7YUPYNWQ.js";import{a as Ve}from"./chunk-LGINK7BD.js";import{a as Be,b as Qe}from"./chunk-QPAUI5EG.js";import{a as bt}from"./chunk-SIDUUVNA.js";import{b as ft,c as mt}from"./chunk-OZ3MKU4C.js";import{c as ut,d as U,e as Ne,k as L,l as gt}from"./chunk-FU2ZGMX4.js";import{C as at,D as st,E as re,G as ne,S as De,V as dt,W as M,X as Le,a as Ie,b as ke,d as Ee,ha as ct,ka as pt,oa as fe,pa as Fe,q as rt,r as ze,s as nt,v as ie,w as x,x as ge,xa as ht,y as Me}from"./chunk-SLX34TWD.js";import{F as lt}from"./chunk-DWZ5JTI2.js";import{$c as y,Bc as et,Fb as n,Gb as w,Hb as S,Ia as ye,Ib as I,Ja as Xe,Lc as he,Mb as K,Nb as Q,Ob as _,Pb as pe,Qb as we,Sb as q,Ub as h,Xa as s,Xb as m,Ya as C,Yb as k,Za as oe,Zb as u,Zc as tt,_b as g,ad as A,cc as ve,d as X,dc as Y,eb as N,fc as Ce,gc as f,gd as Se,ib as Z,id as it,jb as Ze,jd as ee,kb as Te,la as _e,ma as $e,mb as H,md as xe,na as Je,nb as le,nd as te,ob as c,pa as z,ta as de,ua as ce,va as O,vd as ot,wb as G,wc as W,wd as ue,xc as Ye,yc as D,zc as j}from"./chunk-IEVGW2RT.js";import{a as J,b as je}from"./chunk-SNAKHGZS.js";var xt=["colgroup"],It=["caption"],kt=["header"],Et=["body"],zt=["footer"],Mt=["summary"],Dt=["emptymessage"],Lt=["paginatorleft"],Ft=["paginatorright"],Nt=["paginatordropdownitem"],Rt=["frozenheader"],Pt=["frozenbody"],Bt=["frozenfooter"],Vt=["frozencolgroup"],Ot=["loadingicon"],Ht=["reorderindicatorupicon"],Kt=["reorderindicatordownicon"],Qt=["sorticon"],At=["checkboxicon"],Ut=["headercheckboxicon"],Gt=["togglericon"],qt=["paginatorfirstpagelinkicon"],Wt=["paginatorlastpagelinkicon"],jt=["paginatorpreviouspagelinkicon"],$t=["paginatornextpagelinkicon"],Jt=["loader"],Xt=["resizeHelper"],Zt=["reorderIndicatorUp"],Yt=["reorderIndicatorDown"],ei=["table"],ti=["scrollableView"],ii=["scrollableFrozenView"],V=t=>({$implicit:t}),oi=(t,a)=>({left:t,width:a}),li=(t,a)=>[t,a],ri=t=>({width:t});function ni(t,a){if(t&1&&I(0,"i"),t&2){let e=h(2);f(e.cn(e.cx("loadingIcon"),"pi-spin"+e.loadingIcon))}}function ai(t,a){if(t&1&&(O(),I(0,"svg",13)),t&2){let e=h(3);f(e.cx("loadingIcon")),n("spin",!0)}}function si(t,a){}function di(t,a){t&1&&c(0,si,0,0,"ng-template")}function ci(t,a){if(t&1&&(w(0,"span"),c(1,di,1,0,null,14),S()),t&2){let e=h(3);f(e.cx("loadingIcon")),s(),n("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function pi(t,a){if(t&1&&(K(0),c(1,ai,1,3,"svg",12)(2,ci,2,3,"span",10),Q()),t&2){let e=h(2);s(),n("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),s(),n("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function hi(t,a){if(t&1&&(w(0,"div",9)(1,"div",9),c(2,ni,1,2,"i",10)(3,pi,3,2,"ng-container",11),S()()),t&2){let e=h();f(e.cx("loading")),n("pBind",e.ptm("loading")),s(),f(e.cx("mask")),n("pBind",e.ptm("mask")),s(),n("ngIf",e.loadingIcon),s(),n("ngIf",!e.loadingIcon)}}function ui(t,a){t&1&&_(0)}function gi(t,a){if(t&1&&(w(0,"div",9),c(1,ui,1,0,"ng-container",14),S()),t&2){let e=h();f(e.cx("header")),n("pBind",e.ptm("header")),s(),n("ngTemplateOutlet",e.captionTemplate||e._captionTemplate)}}function fi(t,a){t&1&&_(0)}function mi(t,a){if(t&1&&c(0,fi,1,0,"ng-container",14),t&2){let e=h(3);n("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function bi(t,a){t&1&&c(0,mi,1,1,"ng-template",16)}function _i(t,a){t&1&&_(0)}function yi(t,a){if(t&1&&c(0,_i,1,0,"ng-container",14),t&2){let e=h(3);n("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function Ti(t,a){t&1&&c(0,yi,1,1,"ng-template",17)}function wi(t,a){t&1&&_(0)}function vi(t,a){if(t&1&&c(0,wi,1,0,"ng-container",14),t&2){let e=h(3);n("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function Ci(t,a){t&1&&c(0,vi,1,1,"ng-template",18)}function Si(t,a){t&1&&_(0)}function xi(t,a){if(t&1&&c(0,Si,1,0,"ng-container",14),t&2){let e=h(3);n("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Ii(t,a){t&1&&c(0,xi,1,1,"ng-template",19)}function ki(t,a){if(t&1){let e=pe();w(0,"p-paginator",15),q("onPageChange",function(i){de(e);let l=h();return ce(l.onPageChange(i))}),c(1,bi,1,0,null,11)(2,Ti,1,0,null,11)(3,Ci,1,0,null,11)(4,Ii,1,0,null,11),S()}if(t&2){let e=h();n("pt",e.ptm("pcPaginator"))("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("styleClass",e.cx("pcPaginator"))("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate??e._paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate??e._paginatorRightTemplate)("appendTo",e.paginatorDropdownAppendTo)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate??e._paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showPageLinks",e.showPageLinks)("locale",e.paginatorLocale),s(),n("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),s(),n("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),s(),n("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),s(),n("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Ei(t,a){t&1&&_(0)}function zi(t,a){t&1&&_(0)}function Mi(t,a){t&1&&_(0)}function Di(t,a){if(t&1&&(w(0,"div",9)(1,"table",20,0),c(3,Ei,1,0,"ng-container",21),w(4,"thead",22),c(5,zi,1,0,"ng-container",21),S(),I(6,"tbody",23),w(7,"tfoot",22),c(8,Mi,1,0,"ng-container",21),S()()()),t&2){let e=h();f(e.cx("wrapper")),n("pBind",e.ptm("wrapper")),s(),n("pBind",e.ptm("table"))("ngClass",e.tableStyleClass)("ngStyle",e.tableStyle),s(2),n("ngTemplateOutlet",e.colGroupTemplate||e._colGroupTemplate)("ngTemplateOutletContext",D(23,V,e.columns)),s(),f(e.cx("thead")),n("pBind",e.ptm("thead")),s(),n("ngTemplateOutlet",e.headerTemplate||e._headerTemplate)("ngTemplateOutletContext",D(25,V,e.columns)),s(),f(e.cx("tbody")),n("pBind",e.ptm("tbody"))("pTreeTableBody",e.columns)("pTreeTableBodyTemplate",e.bodyTemplate??e._bodyTemplate),s(),f(e.cx("tfoot")),n("pBind",e.ptm("tfoot")),s(),n("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)("ngTemplateOutletContext",D(27,V,e.columns))}}function Li(t,a){if(t&1&&I(0,"div",26,2),t&2){let e=h(2);n("ngClass",j(6,li,e.cx("scrollableView"),e.cx("frozenView")))("ttScrollableView",e.frozenColumns)("frozen",!0)("ngStyle",D(9,ri,e.frozenWidth))("scrollHeight",e.scrollHeight)("pBind",e.ptm("scrollableView"))}}function Fi(t,a){if(t&1&&(w(0,"div",9),c(1,Li,2,11,"div",24),I(2,"div",25,1),S()),t&2){let e=h();f(e.cx("scrollableWrapper")),n("pBind",e.ptm("scrollableWrapper")),s(),n("ngIf",e.frozenColumns||e.frozenBodyTemplate||e._frozenBodyTemplate),s(),f(e.cx("scrollableView")),n("pBind",e.ptm("scrollableView"))("ttScrollableView",e.columns)("frozen",!1)("scrollHeight",e.scrollHeight)("ngStyle",j(11,oi,e.frozenWidth,"calc(100% - "+e.frozenWidth+")"))}}function Ni(t,a){t&1&&_(0)}function Ri(t,a){if(t&1&&c(0,Ni,1,0,"ng-container",14),t&2){let e=h(3);n("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function Pi(t,a){t&1&&c(0,Ri,1,1,"ng-template",16)}function Bi(t,a){t&1&&_(0)}function Vi(t,a){if(t&1&&c(0,Bi,1,0,"ng-container",14),t&2){let e=h(3);n("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function Oi(t,a){t&1&&c(0,Vi,1,1,"ng-template",17)}function Hi(t,a){t&1&&_(0)}function Ki(t,a){if(t&1&&c(0,Hi,1,0,"ng-container",14),t&2){let e=h(3);n("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function Qi(t,a){t&1&&c(0,Ki,1,1,"ng-template",18)}function Ai(t,a){t&1&&_(0)}function Ui(t,a){if(t&1&&c(0,Ai,1,0,"ng-container",14),t&2){let e=h(3);n("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Gi(t,a){t&1&&c(0,Ui,1,1,"ng-template",19)}function qi(t,a){if(t&1){let e=pe();w(0,"p-paginator",15),q("onPageChange",function(i){de(e);let l=h();return ce(l.onPageChange(i))}),c(1,Pi,1,0,null,11)(2,Oi,1,0,null,11)(3,Qi,1,0,null,11)(4,Gi,1,0,null,11),S()}if(t&2){let e=h();n("pt",e.ptm("pcPaginator"))("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("styleClass",e.cx("pcPaginator"))("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate??e._paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate??e._paginatorRightTemplate)("appendTo",e.paginatorDropdownAppendTo)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate??e._paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showPageLinks",e.showPageLinks)("locale",e.paginatorLocale),s(),n("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),s(),n("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),s(),n("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),s(),n("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Wi(t,a){t&1&&_(0)}function ji(t,a){if(t&1&&(w(0,"div",9),c(1,Wi,1,0,"ng-container",14),S()),t&2){let e=h();f(e.cx("footer")),n("pBind",e.ptm("footer")),s(),n("ngTemplateOutlet",e.summaryTemplate||e._summaryTemplate)}}function $i(t,a){if(t&1&&I(0,"div",9,3),t&2){let e=h();f(e.cx("columnResizerHelper")),Y("display","none"),n("pBind",e.ptm("columnResizerHelper"))}}function Ji(t,a){t&1&&(O(),I(0,"svg",28))}function Xi(t,a){}function Zi(t,a){t&1&&c(0,Xi,0,0,"ng-template")}function Yi(t,a){if(t&1&&(w(0,"span",9,4),c(2,Ji,1,0,"svg",27)(3,Zi,1,0,null,14),S()),t&2){let e=h();f(e.cx("reorderIndicatorUp")),Y("display","none"),n("pBind",e.ptm("reorderIndicatorUp")),s(2),n("ngIf",!e.reorderIndicatorUpIconTemplate&&!e._reorderIndicatorUpIconTemplate),s(),n("ngTemplateOutlet",e.reorderIndicatorUpIconTemplate||e._reorderIndicatorUpIconTemplate)}}function eo(t,a){t&1&&(O(),I(0,"svg",30))}function to(t,a){}function io(t,a){t&1&&c(0,to,0,0,"ng-template")}function oo(t,a){if(t&1&&(w(0,"span",9,5),c(2,eo,1,0,"svg",29)(3,io,1,0,null,14),S()),t&2){let e=h();f(e.cx("reorderIndicatorDown")),Y("display","none"),n("pBind",e.ptm("reorderIndicatorDown")),s(2),n("ngIf",!e.reorderIndicatorDownIconTemplate&&!e._reorderIndicatorDownIconTemplate),s(),n("ngTemplateOutlet",e.reorderIndicatorDownIconTemplate||e._reorderIndicatorDownIconTemplate)}}var lo=["pTreeTableBody",""],ro=(t,a,e,o)=>({$implicit:t,node:a,rowData:e,columns:o}),no=(t,a)=>({$implicit:t,frozen:a});function ao(t,a){t&1&&_(0)}function so(t,a){if(t&1&&(K(0),c(1,ao,1,0,"ng-container",2),Q()),t&2){let e=h().$implicit,o=h();s(),n("ngTemplateOutlet",o.template)("ngTemplateOutletContext",et(2,ro,e,e.node,e.node.data,o.columns))}}function co(t,a){if(t&1&&c(0,so,2,7,"ng-container",1),t&2){let e=a.$implicit;n("ngIf",e.visible)}}function po(t,a){t&1&&_(0)}function ho(t,a){if(t&1&&(K(0),c(1,po,1,0,"ng-container",2),Q()),t&2){let e=h();s(),n("ngTemplateOutlet",e.tt.emptyMessageTemplate)("ngTemplateOutletContext",j(2,no,e.columns,e.frozen))}}var uo=["scrollHeader"],go=["scrollHeaderBox"],fo=["scrollBody"],mo=["scrollTable"],bo=["loadingTable"],_o=["scrollFooter"],yo=["scrollFooterBox"],To=["scrollableAligner"],wo=["scroller"],vo=["ttScrollableView",""],Co=t=>({height:t}),vt=(t,a)=>({$implicit:t,options:a}),So=t=>({options:t}),xo=(t,a)=>({"max-height":t,"overflow-y":a}),Io=()=>({});function ko(t,a){t&1&&_(0)}function Eo(t,a){t&1&&_(0)}function zo(t,a){t&1&&_(0)}function Mo(t,a){if(t&1&&c(0,zo,1,0,"ng-container",13),t&2){let e=a.$implicit,o=a.options;h(2);let i=ve(11);n("ngTemplateOutlet",i)("ngTemplateOutletContext",j(2,vt,e,o))}}function Do(t,a){t&1&&_(0)}function Lo(t,a){if(t&1&&c(0,Do,1,0,"ng-container",13),t&2){let e=a.options,o=h(3);n("ngTemplateOutlet",o.tt.loaderTemplate||o.tt._loaderTemplate)("ngTemplateOutletContext",D(2,So,e))}}function Fo(t,a){t&1&&(K(0),c(1,Lo,1,4,"ng-template",null,5,he),Q())}function No(t,a){if(t&1){let e=pe();w(0,"p-scroller",18,3),q("onLazyLoad",function(i){de(e);let l=h();return ce(l.tt.onLazyItemLoad(i))}),c(2,Mo,1,5,"ng-template",null,4,he)(4,Fo,3,0,"ng-container",16),S()}if(t&2){let e=h();Ce(D(10,Co,e.tt.scrollHeight!=="flex"?e.tt.scrollHeight:void 0)),n("items",e.tt.serializedValue)("styleClass",e.cx("scrollableBody"))("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.tt.virtualScrollItemSize||e.tt._virtualRowHeight)("lazy",e.tt.lazy)("options",e.tt.virtualScrollOptions)("pt",e.ptm("virtualScroller")),s(4),n("ngIf",e.tt.loaderTemplate||e.tt._loaderTemplate)}}function Ro(t,a){t&1&&_(0)}function Po(t,a){if(t&1&&(K(0),w(1,"div",12,6),c(3,Ro,1,0,"ng-container",13),S(),Q()),t&2){let e=h(),o=ve(11);s(),f(e.cx("scrollableBody")),n("pBind",e.ptm("scrollableBody"))("ngStyle",j(6,xo,e.tt.scrollHeight!=="flex"?e.scrollHeight:void 0,!e.frozen&&e.tt.scrollHeight?"scroll":void 0)),s(2),n("ngTemplateOutlet",o)("ngTemplateOutletContext",j(10,vt,e.serializedValue,Ye(9,Io)))}}function Bo(t,a){t&1&&_(0)}function Vo(t,a){t&1&&I(0,"div",null,8),t&2&&Y("background-color","transparent")}function Oo(t,a){if(t&1&&(w(0,"table",19,7),c(2,Bo,1,0,"ng-container",13),I(3,"tbody",20),S(),c(4,Vo,2,2,"div",21)),t&2){let e=a.$implicit,o=a.options,i=h();Ce(o.contentStyle),f(i.tt.tableStyleClass),n("pBind",i.ptm("table"))("ngClass",o.contentStyleClass)("ngStyle",i.tt.tableStyle),s(2),n("ngTemplateOutlet",i.frozen?i.tt.frozenColGroupTemplate||i.tt._frozenColGroupTemplate||i.tt.colGroupTemplate||i.tt._colGroupTemplate:i.tt.colGroupTemplate||i.tt._colGroupTemplate)("ngTemplateOutletContext",D(18,V,i.columns)),s(),f(i.cx("tbody")),n("pBind",i.ptm("tbody"))("pBind",i.ptm("tbody"))("pTreeTableBody",i.columns)("pTreeTableBodyTemplate",i.frozen?i.tt.frozenBodyTemplate||i.tt._frozenBodyTemplate||i.tt.bodyTemplate||i.tt._bodyTemplate:i.tt.bodyTemplate||i.tt._bodyTemplate)("serializedNodes",e)("frozen",i.frozen),s(),n("ngIf",i.frozen)}}function Ho(t,a){t&1&&_(0)}function Ko(t,a){t&1&&_(0)}function Qo(t,a){if(t&1&&(w(0,"div",11,9)(2,"div",11,10)(4,"table",22),c(5,Ho,1,0,"ng-container",13),w(6,"tfoot",14),c(7,Ko,1,0,"ng-container",13),S()()()()),t&2){let e=h();f(e.cx("scrollableFooter")),n("pBind",e.ptm("scrollableFooter")),s(2),f(e.cx("scrollableFooterBox")),n("pBind",e.ptm("scrollableFooterBox")),s(2),f(e.cx("scrollableFooterTable")),n("ngClass",e.tt.tableStyleClass)("ngStyle",e.tt.tableStyle)("pBind",e.ptm("scrollableFooterTable")),s(),n("ngTemplateOutlet",e.frozen?e.tt.frozenColGroupTemplate||e.tt._frozenColGroupTemplate||e.tt.colGroupTemplate||e.tt._colGroupTemplate:e.tt.colGroupTemplate||e.tt._colGroupTemplate)("ngTemplateOutletContext",D(18,V,e.columns)),s(),f(e.cx("tfoot")),n("pBind",e.ptm("tfoot")),s(),n("ngTemplateOutlet",e.frozen?e.tt.frozenFooterTemplate||e.tt._frozenFooterTemplate||e.tt.footerTemplate||e.tt._footerTemplate:e.tt.footerTemplate||e.tt._footerTemplate)("ngTemplateOutletContext",D(20,V,e.columns))}}function Ao(t,a){if(t&1&&(O(),I(0,"svg",6)),t&2){let e=h(2);f(e.cx("sortableColumnIcon")),n("pBind",e.ptm("sortableColumnIcon"))}}function Uo(t,a){if(t&1&&(O(),I(0,"svg",7)),t&2){let e=h(2);f(e.cx("sortableColumnIcon")),n("pBind",e.ptm("sortableColumnIcon"))}}function Go(t,a){if(t&1&&(O(),I(0,"svg",8)),t&2){let e=h(2);f(e.cx("sortableColumnIcon")),n("pBind",e.ptm("sortableColumnIcon"))}}function qo(t,a){if(t&1&&(K(0),c(1,Ao,1,3,"svg",3)(2,Uo,1,3,"svg",4)(3,Go,1,3,"svg",5),Q()),t&2){let e=h();s(),n("ngIf",e.sortOrder===0),s(),n("ngIf",e.sortOrder===1),s(),n("ngIf",e.sortOrder===-1)}}function Wo(t,a){}function jo(t,a){t&1&&c(0,Wo,0,0,"ng-template")}function $o(t,a){if(t&1&&(w(0,"span",9),c(1,jo,1,0,null,10),S()),t&2){let e=h();f(e.cx("sortableColumnIcon")),n("pBind",e.ptm("sortableColumnIcon")),s(),n("ngTemplateOutlet",e.tt.sortIconTemplate||e.tt._sortIconTemplate)("ngTemplateOutletContext",D(5,V,e.sortOrder))}}function Jo(t,a){if(t&1&&I(0,"p-badge",11),t&2){let e=h();f(e.cx("sortableColumnBadge")),n("value",e.getBadgeValue())("pt",e.ptm("pcSortableColumnBadge"))}}function Xo(t,a){if(t&1&&(O(),I(0,"svg",5)),t&2){let e=h(2);n("pBind",e.ptm("nodetoggleicon")),G("aria-hidden",!0)}}function Zo(t,a){if(t&1&&(O(),I(0,"svg",6)),t&2){let e=h(2);n("pBind",e.ptm("nodetoggleicon")),G("aria-hidden",!0)}}function Yo(t,a){if(t&1&&(K(0),c(1,Xo,1,2,"svg",3)(2,Zo,1,2,"svg",4),Q()),t&2){let e=h();s(),n("ngIf",e.rowNode.node.expanded),s(),n("ngIf",!e.rowNode.node.expanded)}}function el(t,a){}function tl(t,a){t&1&&c(0,el,0,0,"ng-template")}var il=`
|
|
1
|
+
import{a as Re,b as Pe,c as Oe,d as He,e as Ke}from"./chunk-PHH2AA3W.js";import{b as Tt,c as wt}from"./chunk-JVNUQR5F.js";import{a as _t,b as yt}from"./chunk-FAED643P.js";import{e as Ae}from"./chunk-7YUPYNWQ.js";import{a as Ve}from"./chunk-LGINK7BD.js";import{a as Be,b as Qe}from"./chunk-QPAUI5EG.js";import{a as bt}from"./chunk-SIDUUVNA.js";import{b as ft,c as mt}from"./chunk-CI4ULOBO.js";import{c as ut,d as U,e as Ne,k as L,l as gt}from"./chunk-FU2ZGMX4.js";import{C as at,D as st,E as re,G as ne,S as De,V as dt,W as M,X as Le,a as Ie,b as ke,d as Ee,ha as ct,ka as pt,oa as fe,pa as Fe,q as rt,r as ze,s as nt,v as ie,w as x,x as ge,xa as ht,y as Me}from"./chunk-SLX34TWD.js";import{F as lt}from"./chunk-DWZ5JTI2.js";import{$c as y,Bc as et,Fb as n,Gb as w,Hb as S,Ia as ye,Ib as I,Ja as Xe,Lc as he,Mb as K,Nb as Q,Ob as _,Pb as pe,Qb as we,Sb as q,Ub as h,Xa as s,Xb as m,Ya as C,Yb as k,Za as oe,Zb as u,Zc as tt,_b as g,ad as A,cc as ve,d as X,dc as Y,eb as N,fc as Ce,gc as f,gd as Se,ib as Z,id as it,jb as Ze,jd as ee,kb as Te,la as _e,ma as $e,mb as H,md as xe,na as Je,nb as le,nd as te,ob as c,pa as z,ta as de,ua as ce,va as O,vd as ot,wb as G,wc as W,wd as ue,xc as Ye,yc as D,zc as j}from"./chunk-IEVGW2RT.js";import{a as J,b as je}from"./chunk-SNAKHGZS.js";var xt=["colgroup"],It=["caption"],kt=["header"],Et=["body"],zt=["footer"],Mt=["summary"],Dt=["emptymessage"],Lt=["paginatorleft"],Ft=["paginatorright"],Nt=["paginatordropdownitem"],Rt=["frozenheader"],Pt=["frozenbody"],Bt=["frozenfooter"],Vt=["frozencolgroup"],Ot=["loadingicon"],Ht=["reorderindicatorupicon"],Kt=["reorderindicatordownicon"],Qt=["sorticon"],At=["checkboxicon"],Ut=["headercheckboxicon"],Gt=["togglericon"],qt=["paginatorfirstpagelinkicon"],Wt=["paginatorlastpagelinkicon"],jt=["paginatorpreviouspagelinkicon"],$t=["paginatornextpagelinkicon"],Jt=["loader"],Xt=["resizeHelper"],Zt=["reorderIndicatorUp"],Yt=["reorderIndicatorDown"],ei=["table"],ti=["scrollableView"],ii=["scrollableFrozenView"],V=t=>({$implicit:t}),oi=(t,a)=>({left:t,width:a}),li=(t,a)=>[t,a],ri=t=>({width:t});function ni(t,a){if(t&1&&I(0,"i"),t&2){let e=h(2);f(e.cn(e.cx("loadingIcon"),"pi-spin"+e.loadingIcon))}}function ai(t,a){if(t&1&&(O(),I(0,"svg",13)),t&2){let e=h(3);f(e.cx("loadingIcon")),n("spin",!0)}}function si(t,a){}function di(t,a){t&1&&c(0,si,0,0,"ng-template")}function ci(t,a){if(t&1&&(w(0,"span"),c(1,di,1,0,null,14),S()),t&2){let e=h(3);f(e.cx("loadingIcon")),s(),n("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function pi(t,a){if(t&1&&(K(0),c(1,ai,1,3,"svg",12)(2,ci,2,3,"span",10),Q()),t&2){let e=h(2);s(),n("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),s(),n("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function hi(t,a){if(t&1&&(w(0,"div",9)(1,"div",9),c(2,ni,1,2,"i",10)(3,pi,3,2,"ng-container",11),S()()),t&2){let e=h();f(e.cx("loading")),n("pBind",e.ptm("loading")),s(),f(e.cx("mask")),n("pBind",e.ptm("mask")),s(),n("ngIf",e.loadingIcon),s(),n("ngIf",!e.loadingIcon)}}function ui(t,a){t&1&&_(0)}function gi(t,a){if(t&1&&(w(0,"div",9),c(1,ui,1,0,"ng-container",14),S()),t&2){let e=h();f(e.cx("header")),n("pBind",e.ptm("header")),s(),n("ngTemplateOutlet",e.captionTemplate||e._captionTemplate)}}function fi(t,a){t&1&&_(0)}function mi(t,a){if(t&1&&c(0,fi,1,0,"ng-container",14),t&2){let e=h(3);n("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function bi(t,a){t&1&&c(0,mi,1,1,"ng-template",16)}function _i(t,a){t&1&&_(0)}function yi(t,a){if(t&1&&c(0,_i,1,0,"ng-container",14),t&2){let e=h(3);n("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function Ti(t,a){t&1&&c(0,yi,1,1,"ng-template",17)}function wi(t,a){t&1&&_(0)}function vi(t,a){if(t&1&&c(0,wi,1,0,"ng-container",14),t&2){let e=h(3);n("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function Ci(t,a){t&1&&c(0,vi,1,1,"ng-template",18)}function Si(t,a){t&1&&_(0)}function xi(t,a){if(t&1&&c(0,Si,1,0,"ng-container",14),t&2){let e=h(3);n("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Ii(t,a){t&1&&c(0,xi,1,1,"ng-template",19)}function ki(t,a){if(t&1){let e=pe();w(0,"p-paginator",15),q("onPageChange",function(i){de(e);let l=h();return ce(l.onPageChange(i))}),c(1,bi,1,0,null,11)(2,Ti,1,0,null,11)(3,Ci,1,0,null,11)(4,Ii,1,0,null,11),S()}if(t&2){let e=h();n("pt",e.ptm("pcPaginator"))("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("styleClass",e.cx("pcPaginator"))("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate??e._paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate??e._paginatorRightTemplate)("appendTo",e.paginatorDropdownAppendTo)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate??e._paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showPageLinks",e.showPageLinks)("locale",e.paginatorLocale),s(),n("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),s(),n("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),s(),n("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),s(),n("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Ei(t,a){t&1&&_(0)}function zi(t,a){t&1&&_(0)}function Mi(t,a){t&1&&_(0)}function Di(t,a){if(t&1&&(w(0,"div",9)(1,"table",20,0),c(3,Ei,1,0,"ng-container",21),w(4,"thead",22),c(5,zi,1,0,"ng-container",21),S(),I(6,"tbody",23),w(7,"tfoot",22),c(8,Mi,1,0,"ng-container",21),S()()()),t&2){let e=h();f(e.cx("wrapper")),n("pBind",e.ptm("wrapper")),s(),n("pBind",e.ptm("table"))("ngClass",e.tableStyleClass)("ngStyle",e.tableStyle),s(2),n("ngTemplateOutlet",e.colGroupTemplate||e._colGroupTemplate)("ngTemplateOutletContext",D(23,V,e.columns)),s(),f(e.cx("thead")),n("pBind",e.ptm("thead")),s(),n("ngTemplateOutlet",e.headerTemplate||e._headerTemplate)("ngTemplateOutletContext",D(25,V,e.columns)),s(),f(e.cx("tbody")),n("pBind",e.ptm("tbody"))("pTreeTableBody",e.columns)("pTreeTableBodyTemplate",e.bodyTemplate??e._bodyTemplate),s(),f(e.cx("tfoot")),n("pBind",e.ptm("tfoot")),s(),n("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)("ngTemplateOutletContext",D(27,V,e.columns))}}function Li(t,a){if(t&1&&I(0,"div",26,2),t&2){let e=h(2);n("ngClass",j(6,li,e.cx("scrollableView"),e.cx("frozenView")))("ttScrollableView",e.frozenColumns)("frozen",!0)("ngStyle",D(9,ri,e.frozenWidth))("scrollHeight",e.scrollHeight)("pBind",e.ptm("scrollableView"))}}function Fi(t,a){if(t&1&&(w(0,"div",9),c(1,Li,2,11,"div",24),I(2,"div",25,1),S()),t&2){let e=h();f(e.cx("scrollableWrapper")),n("pBind",e.ptm("scrollableWrapper")),s(),n("ngIf",e.frozenColumns||e.frozenBodyTemplate||e._frozenBodyTemplate),s(),f(e.cx("scrollableView")),n("pBind",e.ptm("scrollableView"))("ttScrollableView",e.columns)("frozen",!1)("scrollHeight",e.scrollHeight)("ngStyle",j(11,oi,e.frozenWidth,"calc(100% - "+e.frozenWidth+")"))}}function Ni(t,a){t&1&&_(0)}function Ri(t,a){if(t&1&&c(0,Ni,1,0,"ng-container",14),t&2){let e=h(3);n("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function Pi(t,a){t&1&&c(0,Ri,1,1,"ng-template",16)}function Bi(t,a){t&1&&_(0)}function Vi(t,a){if(t&1&&c(0,Bi,1,0,"ng-container",14),t&2){let e=h(3);n("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function Oi(t,a){t&1&&c(0,Vi,1,1,"ng-template",17)}function Hi(t,a){t&1&&_(0)}function Ki(t,a){if(t&1&&c(0,Hi,1,0,"ng-container",14),t&2){let e=h(3);n("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function Qi(t,a){t&1&&c(0,Ki,1,1,"ng-template",18)}function Ai(t,a){t&1&&_(0)}function Ui(t,a){if(t&1&&c(0,Ai,1,0,"ng-container",14),t&2){let e=h(3);n("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Gi(t,a){t&1&&c(0,Ui,1,1,"ng-template",19)}function qi(t,a){if(t&1){let e=pe();w(0,"p-paginator",15),q("onPageChange",function(i){de(e);let l=h();return ce(l.onPageChange(i))}),c(1,Pi,1,0,null,11)(2,Oi,1,0,null,11)(3,Qi,1,0,null,11)(4,Gi,1,0,null,11),S()}if(t&2){let e=h();n("pt",e.ptm("pcPaginator"))("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("styleClass",e.cx("pcPaginator"))("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate??e._paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate??e._paginatorRightTemplate)("appendTo",e.paginatorDropdownAppendTo)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate??e._paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showPageLinks",e.showPageLinks)("locale",e.paginatorLocale),s(),n("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),s(),n("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),s(),n("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),s(),n("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Wi(t,a){t&1&&_(0)}function ji(t,a){if(t&1&&(w(0,"div",9),c(1,Wi,1,0,"ng-container",14),S()),t&2){let e=h();f(e.cx("footer")),n("pBind",e.ptm("footer")),s(),n("ngTemplateOutlet",e.summaryTemplate||e._summaryTemplate)}}function $i(t,a){if(t&1&&I(0,"div",9,3),t&2){let e=h();f(e.cx("columnResizerHelper")),Y("display","none"),n("pBind",e.ptm("columnResizerHelper"))}}function Ji(t,a){t&1&&(O(),I(0,"svg",28))}function Xi(t,a){}function Zi(t,a){t&1&&c(0,Xi,0,0,"ng-template")}function Yi(t,a){if(t&1&&(w(0,"span",9,4),c(2,Ji,1,0,"svg",27)(3,Zi,1,0,null,14),S()),t&2){let e=h();f(e.cx("reorderIndicatorUp")),Y("display","none"),n("pBind",e.ptm("reorderIndicatorUp")),s(2),n("ngIf",!e.reorderIndicatorUpIconTemplate&&!e._reorderIndicatorUpIconTemplate),s(),n("ngTemplateOutlet",e.reorderIndicatorUpIconTemplate||e._reorderIndicatorUpIconTemplate)}}function eo(t,a){t&1&&(O(),I(0,"svg",30))}function to(t,a){}function io(t,a){t&1&&c(0,to,0,0,"ng-template")}function oo(t,a){if(t&1&&(w(0,"span",9,5),c(2,eo,1,0,"svg",29)(3,io,1,0,null,14),S()),t&2){let e=h();f(e.cx("reorderIndicatorDown")),Y("display","none"),n("pBind",e.ptm("reorderIndicatorDown")),s(2),n("ngIf",!e.reorderIndicatorDownIconTemplate&&!e._reorderIndicatorDownIconTemplate),s(),n("ngTemplateOutlet",e.reorderIndicatorDownIconTemplate||e._reorderIndicatorDownIconTemplate)}}var lo=["pTreeTableBody",""],ro=(t,a,e,o)=>({$implicit:t,node:a,rowData:e,columns:o}),no=(t,a)=>({$implicit:t,frozen:a});function ao(t,a){t&1&&_(0)}function so(t,a){if(t&1&&(K(0),c(1,ao,1,0,"ng-container",2),Q()),t&2){let e=h().$implicit,o=h();s(),n("ngTemplateOutlet",o.template)("ngTemplateOutletContext",et(2,ro,e,e.node,e.node.data,o.columns))}}function co(t,a){if(t&1&&c(0,so,2,7,"ng-container",1),t&2){let e=a.$implicit;n("ngIf",e.visible)}}function po(t,a){t&1&&_(0)}function ho(t,a){if(t&1&&(K(0),c(1,po,1,0,"ng-container",2),Q()),t&2){let e=h();s(),n("ngTemplateOutlet",e.tt.emptyMessageTemplate)("ngTemplateOutletContext",j(2,no,e.columns,e.frozen))}}var uo=["scrollHeader"],go=["scrollHeaderBox"],fo=["scrollBody"],mo=["scrollTable"],bo=["loadingTable"],_o=["scrollFooter"],yo=["scrollFooterBox"],To=["scrollableAligner"],wo=["scroller"],vo=["ttScrollableView",""],Co=t=>({height:t}),vt=(t,a)=>({$implicit:t,options:a}),So=t=>({options:t}),xo=(t,a)=>({"max-height":t,"overflow-y":a}),Io=()=>({});function ko(t,a){t&1&&_(0)}function Eo(t,a){t&1&&_(0)}function zo(t,a){t&1&&_(0)}function Mo(t,a){if(t&1&&c(0,zo,1,0,"ng-container",13),t&2){let e=a.$implicit,o=a.options;h(2);let i=ve(11);n("ngTemplateOutlet",i)("ngTemplateOutletContext",j(2,vt,e,o))}}function Do(t,a){t&1&&_(0)}function Lo(t,a){if(t&1&&c(0,Do,1,0,"ng-container",13),t&2){let e=a.options,o=h(3);n("ngTemplateOutlet",o.tt.loaderTemplate||o.tt._loaderTemplate)("ngTemplateOutletContext",D(2,So,e))}}function Fo(t,a){t&1&&(K(0),c(1,Lo,1,4,"ng-template",null,5,he),Q())}function No(t,a){if(t&1){let e=pe();w(0,"p-scroller",18,3),q("onLazyLoad",function(i){de(e);let l=h();return ce(l.tt.onLazyItemLoad(i))}),c(2,Mo,1,5,"ng-template",null,4,he)(4,Fo,3,0,"ng-container",16),S()}if(t&2){let e=h();Ce(D(10,Co,e.tt.scrollHeight!=="flex"?e.tt.scrollHeight:void 0)),n("items",e.tt.serializedValue)("styleClass",e.cx("scrollableBody"))("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.tt.virtualScrollItemSize||e.tt._virtualRowHeight)("lazy",e.tt.lazy)("options",e.tt.virtualScrollOptions)("pt",e.ptm("virtualScroller")),s(4),n("ngIf",e.tt.loaderTemplate||e.tt._loaderTemplate)}}function Ro(t,a){t&1&&_(0)}function Po(t,a){if(t&1&&(K(0),w(1,"div",12,6),c(3,Ro,1,0,"ng-container",13),S(),Q()),t&2){let e=h(),o=ve(11);s(),f(e.cx("scrollableBody")),n("pBind",e.ptm("scrollableBody"))("ngStyle",j(6,xo,e.tt.scrollHeight!=="flex"?e.scrollHeight:void 0,!e.frozen&&e.tt.scrollHeight?"scroll":void 0)),s(2),n("ngTemplateOutlet",o)("ngTemplateOutletContext",j(10,vt,e.serializedValue,Ye(9,Io)))}}function Bo(t,a){t&1&&_(0)}function Vo(t,a){t&1&&I(0,"div",null,8),t&2&&Y("background-color","transparent")}function Oo(t,a){if(t&1&&(w(0,"table",19,7),c(2,Bo,1,0,"ng-container",13),I(3,"tbody",20),S(),c(4,Vo,2,2,"div",21)),t&2){let e=a.$implicit,o=a.options,i=h();Ce(o.contentStyle),f(i.tt.tableStyleClass),n("pBind",i.ptm("table"))("ngClass",o.contentStyleClass)("ngStyle",i.tt.tableStyle),s(2),n("ngTemplateOutlet",i.frozen?i.tt.frozenColGroupTemplate||i.tt._frozenColGroupTemplate||i.tt.colGroupTemplate||i.tt._colGroupTemplate:i.tt.colGroupTemplate||i.tt._colGroupTemplate)("ngTemplateOutletContext",D(18,V,i.columns)),s(),f(i.cx("tbody")),n("pBind",i.ptm("tbody"))("pBind",i.ptm("tbody"))("pTreeTableBody",i.columns)("pTreeTableBodyTemplate",i.frozen?i.tt.frozenBodyTemplate||i.tt._frozenBodyTemplate||i.tt.bodyTemplate||i.tt._bodyTemplate:i.tt.bodyTemplate||i.tt._bodyTemplate)("serializedNodes",e)("frozen",i.frozen),s(),n("ngIf",i.frozen)}}function Ho(t,a){t&1&&_(0)}function Ko(t,a){t&1&&_(0)}function Qo(t,a){if(t&1&&(w(0,"div",11,9)(2,"div",11,10)(4,"table",22),c(5,Ho,1,0,"ng-container",13),w(6,"tfoot",14),c(7,Ko,1,0,"ng-container",13),S()()()()),t&2){let e=h();f(e.cx("scrollableFooter")),n("pBind",e.ptm("scrollableFooter")),s(2),f(e.cx("scrollableFooterBox")),n("pBind",e.ptm("scrollableFooterBox")),s(2),f(e.cx("scrollableFooterTable")),n("ngClass",e.tt.tableStyleClass)("ngStyle",e.tt.tableStyle)("pBind",e.ptm("scrollableFooterTable")),s(),n("ngTemplateOutlet",e.frozen?e.tt.frozenColGroupTemplate||e.tt._frozenColGroupTemplate||e.tt.colGroupTemplate||e.tt._colGroupTemplate:e.tt.colGroupTemplate||e.tt._colGroupTemplate)("ngTemplateOutletContext",D(18,V,e.columns)),s(),f(e.cx("tfoot")),n("pBind",e.ptm("tfoot")),s(),n("ngTemplateOutlet",e.frozen?e.tt.frozenFooterTemplate||e.tt._frozenFooterTemplate||e.tt.footerTemplate||e.tt._footerTemplate:e.tt.footerTemplate||e.tt._footerTemplate)("ngTemplateOutletContext",D(20,V,e.columns))}}function Ao(t,a){if(t&1&&(O(),I(0,"svg",6)),t&2){let e=h(2);f(e.cx("sortableColumnIcon")),n("pBind",e.ptm("sortableColumnIcon"))}}function Uo(t,a){if(t&1&&(O(),I(0,"svg",7)),t&2){let e=h(2);f(e.cx("sortableColumnIcon")),n("pBind",e.ptm("sortableColumnIcon"))}}function Go(t,a){if(t&1&&(O(),I(0,"svg",8)),t&2){let e=h(2);f(e.cx("sortableColumnIcon")),n("pBind",e.ptm("sortableColumnIcon"))}}function qo(t,a){if(t&1&&(K(0),c(1,Ao,1,3,"svg",3)(2,Uo,1,3,"svg",4)(3,Go,1,3,"svg",5),Q()),t&2){let e=h();s(),n("ngIf",e.sortOrder===0),s(),n("ngIf",e.sortOrder===1),s(),n("ngIf",e.sortOrder===-1)}}function Wo(t,a){}function jo(t,a){t&1&&c(0,Wo,0,0,"ng-template")}function $o(t,a){if(t&1&&(w(0,"span",9),c(1,jo,1,0,null,10),S()),t&2){let e=h();f(e.cx("sortableColumnIcon")),n("pBind",e.ptm("sortableColumnIcon")),s(),n("ngTemplateOutlet",e.tt.sortIconTemplate||e.tt._sortIconTemplate)("ngTemplateOutletContext",D(5,V,e.sortOrder))}}function Jo(t,a){if(t&1&&I(0,"p-badge",11),t&2){let e=h();f(e.cx("sortableColumnBadge")),n("value",e.getBadgeValue())("pt",e.ptm("pcSortableColumnBadge"))}}function Xo(t,a){if(t&1&&(O(),I(0,"svg",5)),t&2){let e=h(2);n("pBind",e.ptm("nodetoggleicon")),G("aria-hidden",!0)}}function Zo(t,a){if(t&1&&(O(),I(0,"svg",6)),t&2){let e=h(2);n("pBind",e.ptm("nodetoggleicon")),G("aria-hidden",!0)}}function Yo(t,a){if(t&1&&(K(0),c(1,Xo,1,2,"svg",3)(2,Zo,1,2,"svg",4),Q()),t&2){let e=h();s(),n("ngIf",e.rowNode.node.expanded),s(),n("ngIf",!e.rowNode.node.expanded)}}function el(t,a){}function tl(t,a){t&1&&c(0,el,0,0,"ng-template")}var il=`
|
|
2
2
|
/* For PrimeNG */
|
|
3
3
|
.p-treetable {
|
|
4
4
|
position: relative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f}from"./chunk-
|
|
1
|
+
import{c as f}from"./chunk-OZTSXG5Y.js";import{a as m}from"./chunk-A72QOXN4.js";import{p as v,s as u}from"./chunk-LGOSIAUC.js";import{Cd as h,Gd as l,I as c,k as n,la as s,oa as e}from"./chunk-IEVGW2RT.js";var d=class o{constructor(t,r,p,i){this.httpService=t;this.authService=r;this.httpClientService=p;this.toastr=i}port=window.location.href.split("localhost:")[1]?.split("/")[0];hostURL=t=>m.production?t:`https://localhost:${this.port}${t}`;configure2FA(t){return this.httpService.post("/api/Authentication/Setup_2FA",t)}validateCode(t,r){let p=this.authService.loginResponse?.Token,i=new h({"Content-Type":"application/json","Cache-Control":"no-cache"});i=i.append("Authorization","Bearer "+p);let S={ValidationCode:t,UserID:r};return this.httpClientService.post(this.hostURL("/api/Login/Validate_2FA "),S,{headers:i}).pipe(c(a=>(this.toastr.error(a?.error?.Message,"Error - "+a.status),n)))}disableTwoFactorAuthentication(){let t={enabled:!1};return this.httpService.post("/api/Authentication/Setup_2FA",t)}static \u0275fac=function(r){return new(r||o)(e(u),e(f),e(l),e(v))};static \u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"})};export{d as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-NYZIEOHQ.js";import"./chunk-COA4UL2V.js";import"./chunk-32QBWLTN.js";import"./chunk-WMZLH4YK.js";import"./chunk-72RZBOHX.js";import"./chunk-3RK6DDJD.js";import"./chunk-M3DKYPGC.js";import"./chunk-6WATOQG3.js";import"./chunk-VM4K4MNV.js";import"./chunk-XTCEZONP.js";import"./chunk-LNDHYAFW.js";import"./chunk-ZZBF7AOW.js";import"./chunk-RSDLXHSH.js";import"./chunk-OEUCWGFD.js";import"./chunk-7HOW5QOQ.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-6P2ASCNY.js";import"./chunk-CI4ULOBO.js";import"./chunk-CUDCXMJN.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import"./chunk-JBS5UYZC.js";import"./chunk-TEGIL5RZ.js";import"./chunk-THT6CY5E.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import"./chunk-DWZ5JTI2.js";import"./chunk-OZTSXG5Y.js";import"./chunk-UU4IU25V.js";import"./chunk-36GWLMZX.js";import"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-A72QOXN4.js";import"./chunk-LGOSIAUC.js";import"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";export{a as WebhookJobLogsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as O,b as Ve}from"./chunk-PS7477UG.js";import"./chunk-GDRHD33K.js";import{c as Fe}from"./chunk-NSNUUKNK.js";import{c as Ee}from"./chunk-B7BVEOOI.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{e as Oe,f as Pe}from"./chunk-BFNGPKGX.js";import"./chunk-G3DZI5XK.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-OZ3MKU4C.js";import{a as Te,b as ve}from"./chunk-JCLYKROE.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import{b as ye,c as Se}from"./chunk-JBS5UYZC.js";import{N as we}from"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as xe,h as De,o as be}from"./chunk-DWZ5JTI2.js";import"./chunk-KZBVWICA.js";import"./chunk-SBTTKQ4L.js";import"./chunk-36GWLMZX.js";import{b as Z}from"./chunk-WFQIMZGL.js";import{a as fe}from"./chunk-WUV22SZ4.js";import"./chunk-EAEOJMTA.js";import"./chunk-LGOSIAUC.js";import{$ as Y,Ab as u,Ac as he,Cb as de,Db as pe,Eb as ce,Fb as p,Fc as c,Gb as o,Gc as v,Ha as re,Hb as r,Hc as _,Ib as y,Lc as w,Ob as B,Pb as T,Qd as Ce,Sb as V,Sd as ge,Tc as ue,Ub as d,Xa as l,Y as P,Ya as le,aa as E,cc as g,eb as F,gd as j,hc as s,ib as A,ic as W,jc as C,kc as me,mb as se,mc as Q,nc as X,nd as L,ob as S,oc as ee,od as M,pb as k,qd as _e,sd as G,t as D,ta as b,tb as R,ua as x,ub as N,vd as $,wc as U,xc as f,yb as h,yc as I,zc as te}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import{a as ne,b as oe}from"./chunk-SNAKHGZS.js";var H=class{Cost;Profit;Sales;SalesWithTax;Tax;Count;TopOutlet};var ae=t=>({"border-bottom":t}),ie=()=>["/menu/Reports/Sales_Report/Standard/Summary"],Be=(t,a,e)=>({From:t,To:a,ListIDs:e}),Le=t=>({today:t}),We=(t,a)=>({From:t,To:a});function $e(t,a){if(t&1){let e=T();o(0,"div",6)(1,"a",15),s(2),r(),o(3,"ul",16)(4,"li")(5,"a",17),V("click",function(){b(e);let n=d();return n.isTodayFilter=!n.isTodayFilter,x(n.onChangeFilterPeriod())}),s(6),r()()()()}if(t&2){let e=d();l(2),C(" ",e.isTodayFilter?"Today":"Last 7 Days"," "),l(),p("ngClass",I(3,Le,!e.isTodayFilter)),l(3),C(" ",e.isTodayFilter?"Last 7 Days":"Today"," ")}}function He(t,a){t&1&&(o(0,"span",7),s(1,"Today"),r())}function Ye(t,a){if(t&1&&(o(0,"div",18)(1,"a",9),c(2,"date"),c(3,"date"),o(4,"div",10),s(5,"Tax"),r(),o(6,"div",19)(7,"small",20),s(8),r(),o(9,"h2",11),s(10),c(11,"number"),r()()()(),o(12,"div",8)(13,"a",9),c(14,"date"),c(15,"date"),o(16,"div",10),s(17,"Sales + Tax"),r(),o(18,"div",19)(19,"small",20),s(20),r(),o(21,"h2",11),s(22),c(23,"number"),r()()()()),t&2){let e=d();l(),p("routerLink",f(27,ie))("queryParams",te(28,We,_(2,9,e.isTodayFilter?e.today:e.chartData==null?null:e.chartData.From,"yyyy-MM-dd"),_(3,12,e.isTodayFilter?e.today:e.dateTo,"yyyy-MM-dd"))),l(7),C(" ",e.dashboardConfig==null?null:e.dashboardConfig.CurrencySymbol," "),l(2),C(" ",_(11,15,e.salesData==null?null:e.salesData.Tax,"1.0-0")," "),l(2),p("ngClass",I(31,ae,e.role.product.Cost)),l(),p("routerLink",f(33,ie))("queryParams",te(34,We,_(14,18,e.isTodayFilter?e.today:e.chartData==null?null:e.chartData.From,"yyyy-MM-dd"),_(15,21,e.isTodayFilter?e.today:e.dateTo,"yyyy-MM-dd"))),l(7),C(" ",e.dashboardConfig==null?null:e.dashboardConfig.CurrencySymbol," "),l(2),C(" ",_(23,24,e.salesData==null?null:e.salesData.SalesWithTax,"1.0-0")," ")}}function Ue(t,a){if(t&1&&(o(0,"div",8)(1,"div")(2,"div",21),s(3,"Cost"),r(),o(4,"div",19)(5,"small",20),s(6),r(),o(7,"h2",11),s(8),c(9,"number"),r()()()()),t&2){let e=d();p("ngClass",I(6,ae,e.role.report.Profit)),l(6),C(" ",e.dashboardConfig==null?null:e.dashboardConfig.CurrencySymbol," "),l(2),C(" ",_(9,3,e.salesData==null?null:e.salesData.Cost,"1.0-0")," ")}}function je(t,a){if(t&1&&(o(0,"div",12)(1,"div")(2,"div",22),s(3),r(),o(4,"div",23)(5,"small",20),s(6),r(),o(7,"h2",11),s(8),c(9,"number"),r()()()()),t&2){let e=d();l(3),C(" ",e.includeTax?"Gross Profit":"Profit"," "),l(3),C(" ",e.dashboardConfig==null?null:e.dashboardConfig.CurrencySymbol," "),l(2),C(" ",_(9,3,e.salesData==null?null:e.salesData.Profit,"1.0-0")," ")}}var K=class t{constructor(a,e){this.dashboardService=a;this.role=e;this.chartConfig=this.dashboardService.getLineChartConfig()}chartData;salesData;dashboardConfig;filterSalesWidget=new le;chartConfig;todaySalesData;weeklySalesData;isTodayFilter=!0;showPeriodFilter;includeTax;today=new Date;dateTo;filterByOutletIds=ue([]);ngOnChanges(a){if(a.chartData&&a.chartData.currentValue){this.initSalesData();let e=a?.chartData?.currentValue?.Series;e=this.setChartLineColor(e),e=this.setSalesTaxLegend(e),this.chartConfig=oe(ne({},this.chartConfig),{series:e}),this.chartConfig=this.dashboardService.setSeriesPointStart(this.chartData.From,this.chartConfig),this.initPeriodFilter(e),this.getDateTo()}}initPeriodFilter(a){this.showPeriodFilter=a[0]?.data?.length>=7}initSalesData(){this.salesData=new H,this.includeTax=this.isIncludeTax(),this.salesData.Sales=this.dashboardService.getTotalData("Sales",this.chartData.Series,1),this.salesData.SalesWithTax=this.dashboardService.getTotalData("Sales + Tax",this.chartData.Series,1),this.salesData.Cost=this.dashboardService.getTotalData("Cost",this.chartData.Series,1),this.salesData.Tax=this.salesData.SalesWithTax-this.salesData.Sales,this.salesData.Profit=(this.includeTax?this.salesData.SalesWithTax:this.salesData.Sales)-this.salesData.Cost,this.salesData.Count=this.dashboardService.getTotalData("Count",this.chartData.Series,1),this.todaySalesData=Fe(H,this.salesData)}setChartLineColor(a=[]){return a?.map(e=>(e.name=="Sales"&&(e.color="rgb(44, 175, 254)",e.fillColor=this.dashboardService.getLinierGradient("rgb(44, 175, 254)")),e.name=="Cost"&&(e.color="#fb404b",e.fillColor=this.dashboardService.getLinierGradient("#fb404b")),e.name=="Sales + Tax"&&(e.color="#2ECC71",e.fillColor=this.dashboardService.getLinierGradient("#2ECC71")),e))}onChangeFilterPeriod(){this.isTodayFilter?this.salesData=this.todaySalesData:(this.generateWeeklySalesData(),this.salesData=this.weeklySalesData),this.filterSalesWidget.emit({period:this.isTodayFilter?"TODAY":"WEEKLY"})}getDateTo(){let a=new Date,e=new Date(this.chartData.From);a.setDate(e.getDate()+7),this.dateTo=a}generateWeeklySalesData(){if(fe.IsEmpty(this.weeklySalesData)){let a=this.dashboardService.getTotalData("Sales",this.chartData.Series,7),e=this.dashboardService.getTotalData("Sales + Tax",this.chartData.Series,7),i=this.dashboardService.getTotalData("Cost",this.chartData.Series,7),n=this.dashboardService.getTotalData("Count",this.chartData.Series,7),m=e-a,z=(this.includeTax?e:a)-i;this.weeklySalesData=this.weeklySalesData?this.weeklySalesData:new H,this.weeklySalesData.Sales=a,this.weeklySalesData.SalesWithTax=e,this.weeklySalesData.Cost=i,this.weeklySalesData.Profit=z,this.weeklySalesData.Tax=m,this.weeklySalesData.Count=n}}isIncludeTax(){let a=this.chartData.Series;return this.dashboardService.filterSeriesByName("Sales + Tax",a).visible}setSalesTaxLegend(a){return a=a.map(e=>(e.name=="Sales + Tax"&&(e.showInLegend=this.salesData.Tax>0),e)),a}static \u0275fac=function(e){return new(e||t)(F(O),F(Z))};static \u0275cmp=A({type:t,selectors:[["app-sales-widget"]],inputs:{chartData:"chartData",dashboardConfig:"dashboardConfig",filterByOutletIds:[1,"filterByOutletIds"]},outputs:{filterSalesWidget:"onFilter"},features:[U([O]),re],decls:25,vars:30,consts:[[1,"d-flex","flex-row","flex-wrap","mt-8","justify-content-between"],[1,"chart-widget"],["containerId","salesChart",3,"config"],[1,"sales-card-widget"],[1,"border","rounded","rounded-bottom-0","px-8","py-4","w-100","h-auto"],[1,"border-bottom","d-flex","align-items-center","justify-content-end",2,"height","42px"],[1,"btn-group"],[1,"link-dark","fs-2","headings-font-family"],[1,"text-end","card-row","d-flex","align-items-center","justify-content-end",3,"ngClass"],["target","_blank",1,"link-dark",3,"routerLink","queryParams"],[1,"fs-5"],[1,"fw-normal"],[1,"text-end","d-flex","align-items-center","justify-content-end","card-row"],[1,"card-footer","border","rounded-bottom","border-top-0","text-end","p-3"],["routerLink","/menu/Setup/Configuration/Application"],["type","button","data-bs-toggle","dropdown","aria-expanded","false",1,"dropdown-toggle","link-dark","fs-2","headings-font-family"],[1,"dropdown-menu","p-0",2,"position","absolute","right","20px !important",3,"ngClass"],["role","button",1,"dropdown-item","fs-4",3,"click"],[1,"text-end","border-bottom","card-row","d-flex","align-items-center","justify-content-end"],[1,"d-flex","align-items-center","justify-content-end"],[1,"me-2"],[1,"fs-5","text-danger"],[1,"fs-5","text-success"],[1,"d-flex","align-items-center"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"div",1),y(2,"app-chart-container",2),r(),o(3,"div",3)(4,"div",4)(5,"div",5),h(6,$e,7,5,"div",6)(7,He,2,0,"span",7),r(),o(8,"div",8)(9,"a",9),c(10,"date"),c(11,"date"),o(12,"div",10),s(13,"Order"),r(),o(14,"h2",11),s(15),c(16,"number"),r()()(),h(17,Ye,24,37),h(18,Ue,10,8,"div",8),h(19,je,10,6,"div",12),r(),o(20,"div",13)(21,"a",14)(22,"small"),s(23),c(24,"date"),r()()()()()),e&2&&(l(2),p("config",i.chartConfig),l(4),u(!(i.role==null||i.role.dashboard==null)&&i.role.dashboard.View&&i.showPeriodFilter?6:7),l(2),p("ngClass",I(23,ae,(i.salesData==null?null:i.salesData.Tax)||i.role.product.Cost)),l(),p("routerLink",f(25,ie))("queryParams",he(26,Be,_(10,11,i.isTodayFilter?i.today:i.chartData==null?null:i.chartData.From,"yyyy-MM-dd"),_(11,14,i.isTodayFilter?i.today:i.dateTo,"yyyy-MM-dd"),i.filterByOutletIds())),l(6),W(_(16,17,i.salesData==null?null:i.salesData.Count,"1.0-0")),l(2),u((i.salesData==null?null:i.salesData.Tax)>0?17:-1),l(),u(i.role.product.Cost?18:-1),l(),u(i.role.report.Profit&&i.role.product.Cost?19:-1),l(4),me("",_(24,20,i.dashboardConfig==null?null:i.dashboardConfig.SpanConfigTime,"dd MMM HH:mm")," ",i.dashboardConfig==null?null:i.dashboardConfig.SmallTimeZone))},dependencies:[$,j,Ve,ge,Ce,we,G,_e],styles:[".chart-widget[_ngcontent-%COMP%]{width:80%}.link-dark[_ngcontent-%COMP%]{color:#333!important}.dropdown-menu.show.today[_ngcontent-%COMP%]{inset:0 auto auto -34px!important}.sales-card-widget[_ngcontent-%COMP%]{width:19%}.sales-card-widget[_ngcontent-%COMP%] .card-row[_ngcontent-%COMP%]{height:64px}@media only screen and (max-width: 767px){.chart-widget[_ngcontent-%COMP%]{width:100%}.sales-card-widget[_ngcontent-%COMP%]{width:100%;margin-top:12px}}@media only screen and (min-width: 768px) and (max-width: 991px){.chart-widget[_ngcontent-%COMP%]{width:100%}.sales-card-widget[_ngcontent-%COMP%]{width:100%;margin-top:12px}}"]})};var Ge=t=>({active:t});function Ze(t,a){if(t&1&&(o(0,"div",1),s(1),r(),o(2,"div",2)(3,"small",3),s(4),r(),o(5,"h2",4),s(6),r()()),t&2){let e=d();l(),W(e.title),l(3),W(e.currencySymbol),l(2),W(e.value)}}function Ke(t,a){if(t&1&&(o(0,"div",1),s(1),r(),o(2,"h2",4),s(3,"-"),r()),t&2){let e=d();l(),W(e.title)}}var q=class t{title;isActive;currencySymbol;value;showValue;constructor(){}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=A({type:t,selectors:[["app-card-widget"]],inputs:{title:"title",isActive:"isActive",currencySymbol:"currencySymbol",value:"value",showValue:"showValue"},decls:3,vars:4,consts:[[1,"card-widget","pe-0",3,"ngClass"],[1,"fs-4","headings-font-family"],[1,"d-flex","justify-content-start","align-items-center"],[1,"fw-normal","me-2"],[1,"fw-normal"]],template:function(e,i){e&1&&(o(0,"div",0),h(1,Ze,7,3)(2,Ke,4,1),r()),e&2&&(p("ngClass",I(2,Ge,i.isActive)),l(),u(i.showValue?1:2))},dependencies:[$,j],styles:[".card-widget[_ngcontent-%COMP%]{padding:20px;border-radius:6px;min-height:95px;border:.5px solid #e4e4e4;width:100%}.active[_ngcontent-%COMP%]{background-color:#f0f0f0}@media only screen and (max-width: 767px){.card-widget[_ngcontent-%COMP%]{width:200px}}@media only screen and (min-width: 768px) and (max-width: 991px){.card-widget[_ngcontent-%COMP%]{width:200px}}"]})};var qe=()=>[L,import("./chunk-VZUPDSBH.js").then(t=>t.PaymentWidgetComponent),M],ze=()=>[L,import("./chunk-3CSCTT6I.js").then(t=>t.PurchaseWidgetComponent),M],Je=()=>[L,import("./chunk-PQ6W7KXC.js").then(t=>t.DebtWidgetComponent),M],Qe=()=>[L,import("./chunk-2MPRVJXH.js").then(t=>t.ProductWidgetComponent),M],Xe=()=>[L,import("./chunk-WM2DGNWH.js").then(t=>t.InventoryWidgetComponent),M],et=()=>({role:"Payment View Role"}),tt=()=>({role:"Buy Report Role"}),it=()=>({role:"Debt View Role"}),at=()=>({role:"Report View Role"}),nt=()=>({role:"Inventory View Role"});function ot(t,a){if(t&1){let e=T();o(0,"div",13)(1,"h6"),s(2,"Outlet"),r(),o(3,"outlet-selector",14),ee("ngModelChange",function(n){b(e);let m=d();return X(m.dashboardFilter.Outlets,n)||(m.dashboardFilter.Outlets=n),x(n)}),r()()}if(t&2){let e=d();l(3),p("multiple",!0)("accessType",e.outletAccess),Q("ngModel",e.dashboardFilter.Outlets)}}function rt(t,a){if(t&1){let e=T();o(0,"div",19),V("click",function(){let n=b(e).$implicit,m=d(2);return x(m.onClickCardWidget(n))}),y(1,"app-card-widget",20),c(2,"number"),r()}if(t&2){let e=a.$implicit,i=d(),n=d();l(),p("title",e.title)("matTooltip",e.tooltip)("currencySymbol",i==null||i.ConfigData==null?null:i.ConfigData.CurrencySymbol)("value",e.value==null?"-":_(2,6,e.value,"1.0-0"))("showValue",e.showValue)("isActive",e.id==n.activeTab)}}function lt(t,a){if(t&1){let e=T();o(0,"app-sales-widget",21),V("onFilter",function(n){b(e);let m=d(2);return x(m.onFilterSalesWidget(n))}),r()}if(t&2){let e=d(),i=d();p("dashboardConfig",e==null?null:e.ConfigData)("chartData",e==null?null:e.HighChartData)("filterByOutletIds",i.dashboardFilter.Outlets)}}function st(t,a){t&1&&B(0)}function dt(t,a){if(t&1){let e=T();o(0,"app-payment-widget",23),c(1,"async"),V("onFilter",function(n){b(e);let m=d(4);return x(m.onFilterPaymentWidget(n))}),r()}if(t&2){let e,i=d(3),n=d();p("dashboardConfig",i==null?null:i.ConfigData)("chartData",(e=v(1,2,n.paymentData$))==null?null:e.Data)}}function pt(t,a){if(t&1&&S(0,st,1,0,"ng-container",22)(1,dt,2,4,"ng-template",null,2,w),t&2){let e=g(2),i=d(3),n=g(12);p("ngTemplateOutlet",i.role.payment.View?e:n)("ngTemplateOutletContext",f(2,et))}}function ct(t,a){t&1&&(o(0,"div",24),s(1," LOADING... "),r())}function mt(t,a){t&1&&(k(0,pt,3,3)(1,ct,2,0),R(2,0,qe,null,1),N(0,-1))}function ht(t,a){t&1&&B(0)}function ut(t,a){if(t&1&&(y(0,"app-purchase-widget",18),c(1,"async")),t&2){let e,i=d(3),n=d();p("dashboardConfig",i==null?null:i.ConfigData)("chartData",(e=v(1,3,n.purchaseData$))==null?null:e.HighChartData)("filterByOutletIds",n.dashboardFilter.Outlets)}}function _t(t,a){if(t&1&&S(0,ht,1,0,"ng-container",22)(1,ut,2,5,"ng-template",null,3,w),t&2){let e=g(2),i=d(3),n=g(12);p("ngTemplateOutlet",i.role.buy.Report?e:n)("ngTemplateOutletContext",f(2,tt))}}function Ct(t,a){t&1&&(o(0,"div",24),s(1," LOADING... "),r())}function gt(t,a){t&1&&(k(0,_t,3,3)(1,Ct,2,0),R(2,0,ze,null,1),N(0,-1))}function ft(t,a){t&1&&B(0)}function Dt(t,a){if(t&1&&(y(0,"app-debt-widget",25),c(1,"async")),t&2){let e,i=d(3),n=d();p("dashboardConfig",i==null?null:i.ConfigData)("debtData",(e=v(1,2,n.debtData$))==null?null:e.PageData)}}function bt(t,a){if(t&1&&S(0,ft,1,0,"ng-container",22)(1,Dt,2,4,"ng-template",null,4,w),t&2){let e=g(2),i=d(3),n=g(12);p("ngTemplateOutlet",i.role.debt.View?e:n)("ngTemplateOutletContext",f(2,it))}}function xt(t,a){t&1&&(o(0,"div",24),s(1," LOADING... "),r())}function yt(t,a){t&1&&(k(0,bt,3,3)(1,xt,2,0),R(2,0,Je,null,1),N(0,-1))}function St(t,a){t&1&&B(0)}function Tt(t,a){if(t&1&&(y(0,"app-product-widget",26),c(1,"async")),t&2){let e,i=d(3),n=d();p("dashboardConfig",i==null?null:i.ConfigData)("productData",(e=v(1,2,n.productData$))==null?null:e.PageData)}}function vt(t,a){if(t&1&&S(0,St,1,0,"ng-container",22)(1,Tt,2,4,"ng-template",null,5,w),t&2){let e=g(2),i=d(3),n=g(12);p("ngTemplateOutlet",i.role.report.View?e:n)("ngTemplateOutletContext",f(2,at))}}function wt(t,a){t&1&&(o(0,"div",24),s(1," LOADING... "),r())}function Ot(t,a){t&1&&(k(0,vt,3,3)(1,wt,2,0),R(2,0,Qe,null,1),N(0,-1))}function Pt(t,a){t&1&&B(0)}function Et(t,a){if(t&1&&(y(0,"app-inventory-widget",27),c(1,"async")),t&2){let e,i=d(3),n=d();p("dashboardConfig",i==null?null:i.ConfigData)("inventoryData",(e=v(1,2,n.inventoryData$))==null?null:e.PageData)}}function Ft(t,a){if(t&1&&S(0,Pt,1,0,"ng-container",22)(1,Et,2,4,"ng-template",null,6,w),t&2){let e=g(2),i=d(3),n=g(12);p("ngTemplateOutlet",i.role.inventory.View?e:n)("ngTemplateOutletContext",f(2,nt))}}function Vt(t,a){t&1&&(o(0,"div",24),s(1," LOADING... "),r())}function Wt(t,a){t&1&&(k(0,Ft,3,3)(1,Vt,2,0),R(2,0,Xe,null,1),N(0,-1))}function It(t,a){if(t&1&&(o(0,"div",12)(1,"div",15)(2,"div",16),pe(3,rt,3,9,"div",17,de),c(5,"async"),r(),h(6,lt,1,3,"app-sales-widget",18),h(7,mt,4,0),h(8,gt,4,0),h(9,yt,4,0),h(10,Ot,4,0),h(11,Wt,4,0),r()()),t&2){let e=d();l(3),ce(v(5,6,e.cardWidget$)),l(3),u(e.activeTab=="SALES"?6:-1),l(),u(e.activeTab=="PAYMENT"?7:-1),l(),u(e.activeTab=="PURCHASE"?8:-1),l(),u(e.activeTab=="DEBT"?9:-1),l(),u(e.activeTab=="PRODUCT"?10:-1),l(),u(e.activeTab=="INVENTORY"?11:-1)}}function Mt(t,a){if(t&1&&(o(0,"div",24)(1,"div",28)(2,"div"),y(3,"img",29),r(),o(4,"h1",30),s(5,"You are not authorized"),r(),o(6,"p"),s(7," This page requires role "),o(8,"span",31),s(9),r(),s(10," to be accessed. Please contact your Administrator to gain access! "),r()()()),t&2){let e=a.role;l(9),C("[",e,"]")}}var ke=class t extends Te{constructor(e,i,n){super(e);this.dashboardService=i;this.role=n;this.menuData$.subscribe(),this.initSalesData(),this.initCardWidget(),this.initPaymentData(),this.initPurchaseData(),this.initInventoryData(),this.initDebtData(),this.initProductData()}cardWidget$;outletAccess=2;dashboardFilter={Outlets:[]};salesData$;paymentData$;purchaseData$;debtData$;productData$;inventoryData$;activeTab="SALES";initSalesData(){this.salesData$=this.dashboardService.getDashboardSales(this.dashboardFilter).pipe(P(1))}initPaymentData(){this.paymentData$=this.dashboardService.getDashboardPayment(this.dashboardFilter).pipe(P(1))}initPurchaseData(){this.purchaseData$=this.dashboardService.getDashboardPurchase(this.dashboardFilter).pipe(P(1))}initDebtData(){this.debtData$=this.dashboardService.getDashboardDebt(this.dashboardFilter).pipe(P(1))}initProductData(){this.productData$=this.dashboardService.getDashboardProduct(this.dashboardFilter).pipe(P(1))}initInventoryData(){this.inventoryData$=this.dashboardService.getDashboardInventory(this.dashboardFilter).pipe(P(1))}initCardWidget(){switch(this.activeTab){case"SALES":this.cardWidget$=this.salesData$.pipe(D(e=>this.dashboardService.getTotalData("Sales",e.HighChartData.Series,1)),Y(0),E(e=>this.dashboardService.setWidgetData(e,this.activeTab)));break;case"PAYMENT":this.cardWidget$=this.paymentData$.pipe(D(e=>this.dashboardService.getTotalData("All",e.Data.Series,1)),Y(0),E(e=>this.dashboardService.setWidgetData(e,this.activeTab)));break;case"PURCHASE":this.cardWidget$=this.purchaseData$.pipe(D(e=>this.dashboardService.getTotalData("Purchase",e.HighChartData.Series,1)),Y(0),E(e=>this.dashboardService.setWidgetData(e,this.activeTab)));break;case"DEBT":this.cardWidget$=this.debtData$.pipe(D(e=>e.PageData.Receivable),Y(0),E(e=>this.dashboardService.setWidgetData(e,this.activeTab)));break}}onFilterByOutlet(){switch(this.activeTab){case"SALES":this.initSalesData(),this.initCardWidget();break;case"PURCHASE":this.initPurchaseData(),this.initCardWidget();break;case"DEBT":this.initDebtData(),this.initCardWidget();break;case"PRODUCT":this.initProductData();break;case"INVENTORY":this.initInventoryData();break;case"PAYMENT":this.initPaymentData();break}}onClickCardWidget(e){this.activeTab=e.id,this.initCardWidget()}onFilterSalesWidget(e){this.cardWidget$=this.salesData$.pipe(D(i=>e.period=="WEEKLY"?this.dashboardService.getTotalData("Sales",i.HighChartData.Series,7):this.dashboardService.getTotalData("Sales",i.HighChartData.Series,1)),E(i=>(this.dashboardService.setWidgetData(i,"SALES"),this.dashboardService.widgets$)),D(i=>i.map(n=>(n.id=="SALES"&&(n.tooltip=e.period=="TODAY"?"Total Sales Today":"Total Sales last 7 days"),n))))}onFilterPaymentWidget(e){this.cardWidget$=this.paymentData$.pipe(D(i=>e.period=="WEEKLY"?this.dashboardService.getTotalData("All",i.Data.Series,7):this.dashboardService.getTotalData("All",i.Data.Series,1)),E(i=>(this.dashboardService.setWidgetData(i,"PAYMENT"),this.dashboardService.widgets$)),D(i=>i.map(n=>(n.id=="PAYMENT"&&(n.tooltip=e.period=="TODAY"?"Total Payment Today":"Total Payment last 7 days"),n))))}static \u0275fac=function(i){return new(i||t)(F(ve),F(O),F(Z))};static \u0275cmp=A({type:t,selectors:[["POS-dashboard-v2"]],features:[U([O]),se],decls:13,vars:7,consts:[["pageFilterTemplate",""],["NOT_AUTHORIZED",""],["PAYMENT",""],["BUY",""],["DEBT",""],["PRODUCT",""],["INVENTORY",""],[3,"onSubmit","filterChange","hideSearchBox","pageData","isFilterOnDropdown","filter"],[1,"content"],[1,"container-fluid","bg-light-gray","p-8"],[1,"row"],[1,"col-12"],[1,"card","mb-0"],[1,"dialog-filter"],["appendTo","body","placeholder","Select Outlets",3,"ngModelChange","multiple","accessType","ngModel"],[1,"card-body"],[1,"d-flex","flex-row","flex-nowrap","justify-content-between","align-items-center","overflow-auto",2,"column-gap","18px"],[1,"cursor-pointer","card-widget-tab"],[3,"dashboardConfig","chartData","filterByOutletIds"],[1,"cursor-pointer","card-widget-tab",3,"click"],["matTooltipPosition","above",3,"title","matTooltip","currencySymbol","value","showValue","isActive"],[3,"onFilter","dashboardConfig","chartData","filterByOutletIds"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"onFilter","dashboardConfig","chartData"],[1,"d-flex","align-items-center","justify-content-center","mt-8",2,"height","350px"],[3,"dashboardConfig","debtData"],[3,"dashboardConfig","productData"],[3,"dashboardConfig","inventoryData"],[1,"text-center"],["src","https://cdn.dealpos.xyz/web-image/locked.svg",2,"width","160px"],[1,"mt-2","mb-6"],[1,"fw-bold"]],template:function(i,n){if(i&1){let m=T();o(0,"mainpanel-cmp",7),V("onSubmit",function(){return b(m),x(n.onFilterByOutlet())}),ee("filterChange",function(J){return b(m),X(n.dashboardFilter,J)||(n.dashboardFilter=J),x(J)}),o(1,"filters"),S(2,ot,4,3,"ng-template",null,0,w),r(),o(4,"content")(5,"div",8)(6,"div",9)(7,"div",10)(8,"div",11),h(9,It,12,8,"div",12),c(10,"async"),r()()()()()(),S(11,Mt,11,1,"ng-template",null,1,w)}if(i&2){let m;p("hideSearchBox",!0)("pageData",n.menuData)("isFilterOnDropdown",!1),Q("filter",n.dashboardFilter),l(9),u((m=v(10,5,n.salesData$))?9:-1,m)}},dependencies:[$,Pe,Oe,xe,De,be,K,q,Ee,Se,ye,M,G],styles:[".card-widget-tab[_ngcontent-%COMP%]{flex:1 1 0px}@media only screen and (max-width: 767px){.card-widget-tab[_ngcontent-%COMP%]{margin-right:1rem;margin-top:.5rem;width:auto}}@media only screen and (min-width: 768px) and (max-width: 991px){.card-widget-tab[_ngcontent-%COMP%]{margin-right:1rem;margin-top:.5rem;width:auto}}"]})};export{ke as DashboardV2Component};
|
|
1
|
+
import{a as O,b as Ve}from"./chunk-PS7477UG.js";import"./chunk-GDRHD33K.js";import{c as Fe}from"./chunk-NSNUUKNK.js";import{c as Ee}from"./chunk-XAT2P7QI.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{e as Oe,f as Pe}from"./chunk-7HOW5QOQ.js";import"./chunk-BNX6XXDZ.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-CI4ULOBO.js";import{a as Te,b as ve}from"./chunk-CUDCXMJN.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import{b as ye,c as Se}from"./chunk-JBS5UYZC.js";import{N as we}from"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as xe,h as De,o as be}from"./chunk-DWZ5JTI2.js";import"./chunk-OZTSXG5Y.js";import"./chunk-UU4IU25V.js";import"./chunk-36GWLMZX.js";import{b as Z}from"./chunk-WFQIMZGL.js";import{a as fe}from"./chunk-WUV22SZ4.js";import"./chunk-A72QOXN4.js";import"./chunk-LGOSIAUC.js";import{$ as Y,Ab as u,Ac as he,Cb as de,Db as pe,Eb as ce,Fb as p,Fc as c,Gb as o,Gc as v,Ha as re,Hb as r,Hc as _,Ib as y,Lc as w,Ob as B,Pb as T,Qd as Ce,Sb as V,Sd as ge,Tc as ue,Ub as d,Xa as l,Y as P,Ya as le,aa as E,cc as g,eb as F,gd as j,hc as s,ib as A,ic as W,jc as C,kc as me,mb as se,mc as Q,nc as X,nd as L,ob as S,oc as ee,od as M,pb as k,qd as _e,sd as G,t as D,ta as b,tb as R,ua as x,ub as N,vd as $,wc as U,xc as f,yb as h,yc as I,zc as te}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import{a as ne,b as oe}from"./chunk-SNAKHGZS.js";var H=class{Cost;Profit;Sales;SalesWithTax;Tax;Count;TopOutlet};var ae=t=>({"border-bottom":t}),ie=()=>["/menu/Reports/Sales_Report/Standard/Summary"],Be=(t,a,e)=>({From:t,To:a,ListIDs:e}),Le=t=>({today:t}),We=(t,a)=>({From:t,To:a});function $e(t,a){if(t&1){let e=T();o(0,"div",6)(1,"a",15),s(2),r(),o(3,"ul",16)(4,"li")(5,"a",17),V("click",function(){b(e);let n=d();return n.isTodayFilter=!n.isTodayFilter,x(n.onChangeFilterPeriod())}),s(6),r()()()()}if(t&2){let e=d();l(2),C(" ",e.isTodayFilter?"Today":"Last 7 Days"," "),l(),p("ngClass",I(3,Le,!e.isTodayFilter)),l(3),C(" ",e.isTodayFilter?"Last 7 Days":"Today"," ")}}function He(t,a){t&1&&(o(0,"span",7),s(1,"Today"),r())}function Ye(t,a){if(t&1&&(o(0,"div",18)(1,"a",9),c(2,"date"),c(3,"date"),o(4,"div",10),s(5,"Tax"),r(),o(6,"div",19)(7,"small",20),s(8),r(),o(9,"h2",11),s(10),c(11,"number"),r()()()(),o(12,"div",8)(13,"a",9),c(14,"date"),c(15,"date"),o(16,"div",10),s(17,"Sales + Tax"),r(),o(18,"div",19)(19,"small",20),s(20),r(),o(21,"h2",11),s(22),c(23,"number"),r()()()()),t&2){let e=d();l(),p("routerLink",f(27,ie))("queryParams",te(28,We,_(2,9,e.isTodayFilter?e.today:e.chartData==null?null:e.chartData.From,"yyyy-MM-dd"),_(3,12,e.isTodayFilter?e.today:e.dateTo,"yyyy-MM-dd"))),l(7),C(" ",e.dashboardConfig==null?null:e.dashboardConfig.CurrencySymbol," "),l(2),C(" ",_(11,15,e.salesData==null?null:e.salesData.Tax,"1.0-0")," "),l(2),p("ngClass",I(31,ae,e.role.product.Cost)),l(),p("routerLink",f(33,ie))("queryParams",te(34,We,_(14,18,e.isTodayFilter?e.today:e.chartData==null?null:e.chartData.From,"yyyy-MM-dd"),_(15,21,e.isTodayFilter?e.today:e.dateTo,"yyyy-MM-dd"))),l(7),C(" ",e.dashboardConfig==null?null:e.dashboardConfig.CurrencySymbol," "),l(2),C(" ",_(23,24,e.salesData==null?null:e.salesData.SalesWithTax,"1.0-0")," ")}}function Ue(t,a){if(t&1&&(o(0,"div",8)(1,"div")(2,"div",21),s(3,"Cost"),r(),o(4,"div",19)(5,"small",20),s(6),r(),o(7,"h2",11),s(8),c(9,"number"),r()()()()),t&2){let e=d();p("ngClass",I(6,ae,e.role.report.Profit)),l(6),C(" ",e.dashboardConfig==null?null:e.dashboardConfig.CurrencySymbol," "),l(2),C(" ",_(9,3,e.salesData==null?null:e.salesData.Cost,"1.0-0")," ")}}function je(t,a){if(t&1&&(o(0,"div",12)(1,"div")(2,"div",22),s(3),r(),o(4,"div",23)(5,"small",20),s(6),r(),o(7,"h2",11),s(8),c(9,"number"),r()()()()),t&2){let e=d();l(3),C(" ",e.includeTax?"Gross Profit":"Profit"," "),l(3),C(" ",e.dashboardConfig==null?null:e.dashboardConfig.CurrencySymbol," "),l(2),C(" ",_(9,3,e.salesData==null?null:e.salesData.Profit,"1.0-0")," ")}}var K=class t{constructor(a,e){this.dashboardService=a;this.role=e;this.chartConfig=this.dashboardService.getLineChartConfig()}chartData;salesData;dashboardConfig;filterSalesWidget=new le;chartConfig;todaySalesData;weeklySalesData;isTodayFilter=!0;showPeriodFilter;includeTax;today=new Date;dateTo;filterByOutletIds=ue([]);ngOnChanges(a){if(a.chartData&&a.chartData.currentValue){this.initSalesData();let e=a?.chartData?.currentValue?.Series;e=this.setChartLineColor(e),e=this.setSalesTaxLegend(e),this.chartConfig=oe(ne({},this.chartConfig),{series:e}),this.chartConfig=this.dashboardService.setSeriesPointStart(this.chartData.From,this.chartConfig),this.initPeriodFilter(e),this.getDateTo()}}initPeriodFilter(a){this.showPeriodFilter=a[0]?.data?.length>=7}initSalesData(){this.salesData=new H,this.includeTax=this.isIncludeTax(),this.salesData.Sales=this.dashboardService.getTotalData("Sales",this.chartData.Series,1),this.salesData.SalesWithTax=this.dashboardService.getTotalData("Sales + Tax",this.chartData.Series,1),this.salesData.Cost=this.dashboardService.getTotalData("Cost",this.chartData.Series,1),this.salesData.Tax=this.salesData.SalesWithTax-this.salesData.Sales,this.salesData.Profit=(this.includeTax?this.salesData.SalesWithTax:this.salesData.Sales)-this.salesData.Cost,this.salesData.Count=this.dashboardService.getTotalData("Count",this.chartData.Series,1),this.todaySalesData=Fe(H,this.salesData)}setChartLineColor(a=[]){return a?.map(e=>(e.name=="Sales"&&(e.color="rgb(44, 175, 254)",e.fillColor=this.dashboardService.getLinierGradient("rgb(44, 175, 254)")),e.name=="Cost"&&(e.color="#fb404b",e.fillColor=this.dashboardService.getLinierGradient("#fb404b")),e.name=="Sales + Tax"&&(e.color="#2ECC71",e.fillColor=this.dashboardService.getLinierGradient("#2ECC71")),e))}onChangeFilterPeriod(){this.isTodayFilter?this.salesData=this.todaySalesData:(this.generateWeeklySalesData(),this.salesData=this.weeklySalesData),this.filterSalesWidget.emit({period:this.isTodayFilter?"TODAY":"WEEKLY"})}getDateTo(){let a=new Date,e=new Date(this.chartData.From);a.setDate(e.getDate()+7),this.dateTo=a}generateWeeklySalesData(){if(fe.IsEmpty(this.weeklySalesData)){let a=this.dashboardService.getTotalData("Sales",this.chartData.Series,7),e=this.dashboardService.getTotalData("Sales + Tax",this.chartData.Series,7),i=this.dashboardService.getTotalData("Cost",this.chartData.Series,7),n=this.dashboardService.getTotalData("Count",this.chartData.Series,7),m=e-a,z=(this.includeTax?e:a)-i;this.weeklySalesData=this.weeklySalesData?this.weeklySalesData:new H,this.weeklySalesData.Sales=a,this.weeklySalesData.SalesWithTax=e,this.weeklySalesData.Cost=i,this.weeklySalesData.Profit=z,this.weeklySalesData.Tax=m,this.weeklySalesData.Count=n}}isIncludeTax(){let a=this.chartData.Series;return this.dashboardService.filterSeriesByName("Sales + Tax",a).visible}setSalesTaxLegend(a){return a=a.map(e=>(e.name=="Sales + Tax"&&(e.showInLegend=this.salesData.Tax>0),e)),a}static \u0275fac=function(e){return new(e||t)(F(O),F(Z))};static \u0275cmp=A({type:t,selectors:[["app-sales-widget"]],inputs:{chartData:"chartData",dashboardConfig:"dashboardConfig",filterByOutletIds:[1,"filterByOutletIds"]},outputs:{filterSalesWidget:"onFilter"},features:[U([O]),re],decls:25,vars:30,consts:[[1,"d-flex","flex-row","flex-wrap","mt-8","justify-content-between"],[1,"chart-widget"],["containerId","salesChart",3,"config"],[1,"sales-card-widget"],[1,"border","rounded","rounded-bottom-0","px-8","py-4","w-100","h-auto"],[1,"border-bottom","d-flex","align-items-center","justify-content-end",2,"height","42px"],[1,"btn-group"],[1,"link-dark","fs-2","headings-font-family"],[1,"text-end","card-row","d-flex","align-items-center","justify-content-end",3,"ngClass"],["target","_blank",1,"link-dark",3,"routerLink","queryParams"],[1,"fs-5"],[1,"fw-normal"],[1,"text-end","d-flex","align-items-center","justify-content-end","card-row"],[1,"card-footer","border","rounded-bottom","border-top-0","text-end","p-3"],["routerLink","/menu/Setup/Configuration/Application"],["type","button","data-bs-toggle","dropdown","aria-expanded","false",1,"dropdown-toggle","link-dark","fs-2","headings-font-family"],[1,"dropdown-menu","p-0",2,"position","absolute","right","20px !important",3,"ngClass"],["role","button",1,"dropdown-item","fs-4",3,"click"],[1,"text-end","border-bottom","card-row","d-flex","align-items-center","justify-content-end"],[1,"d-flex","align-items-center","justify-content-end"],[1,"me-2"],[1,"fs-5","text-danger"],[1,"fs-5","text-success"],[1,"d-flex","align-items-center"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"div",1),y(2,"app-chart-container",2),r(),o(3,"div",3)(4,"div",4)(5,"div",5),h(6,$e,7,5,"div",6)(7,He,2,0,"span",7),r(),o(8,"div",8)(9,"a",9),c(10,"date"),c(11,"date"),o(12,"div",10),s(13,"Order"),r(),o(14,"h2",11),s(15),c(16,"number"),r()()(),h(17,Ye,24,37),h(18,Ue,10,8,"div",8),h(19,je,10,6,"div",12),r(),o(20,"div",13)(21,"a",14)(22,"small"),s(23),c(24,"date"),r()()()()()),e&2&&(l(2),p("config",i.chartConfig),l(4),u(!(i.role==null||i.role.dashboard==null)&&i.role.dashboard.View&&i.showPeriodFilter?6:7),l(2),p("ngClass",I(23,ae,(i.salesData==null?null:i.salesData.Tax)||i.role.product.Cost)),l(),p("routerLink",f(25,ie))("queryParams",he(26,Be,_(10,11,i.isTodayFilter?i.today:i.chartData==null?null:i.chartData.From,"yyyy-MM-dd"),_(11,14,i.isTodayFilter?i.today:i.dateTo,"yyyy-MM-dd"),i.filterByOutletIds())),l(6),W(_(16,17,i.salesData==null?null:i.salesData.Count,"1.0-0")),l(2),u((i.salesData==null?null:i.salesData.Tax)>0?17:-1),l(),u(i.role.product.Cost?18:-1),l(),u(i.role.report.Profit&&i.role.product.Cost?19:-1),l(4),me("",_(24,20,i.dashboardConfig==null?null:i.dashboardConfig.SpanConfigTime,"dd MMM HH:mm")," ",i.dashboardConfig==null?null:i.dashboardConfig.SmallTimeZone))},dependencies:[$,j,Ve,ge,Ce,we,G,_e],styles:[".chart-widget[_ngcontent-%COMP%]{width:80%}.link-dark[_ngcontent-%COMP%]{color:#333!important}.dropdown-menu.show.today[_ngcontent-%COMP%]{inset:0 auto auto -34px!important}.sales-card-widget[_ngcontent-%COMP%]{width:19%}.sales-card-widget[_ngcontent-%COMP%] .card-row[_ngcontent-%COMP%]{height:64px}@media only screen and (max-width: 767px){.chart-widget[_ngcontent-%COMP%]{width:100%}.sales-card-widget[_ngcontent-%COMP%]{width:100%;margin-top:12px}}@media only screen and (min-width: 768px) and (max-width: 991px){.chart-widget[_ngcontent-%COMP%]{width:100%}.sales-card-widget[_ngcontent-%COMP%]{width:100%;margin-top:12px}}"]})};var Ge=t=>({active:t});function Ze(t,a){if(t&1&&(o(0,"div",1),s(1),r(),o(2,"div",2)(3,"small",3),s(4),r(),o(5,"h2",4),s(6),r()()),t&2){let e=d();l(),W(e.title),l(3),W(e.currencySymbol),l(2),W(e.value)}}function Ke(t,a){if(t&1&&(o(0,"div",1),s(1),r(),o(2,"h2",4),s(3,"-"),r()),t&2){let e=d();l(),W(e.title)}}var q=class t{title;isActive;currencySymbol;value;showValue;constructor(){}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=A({type:t,selectors:[["app-card-widget"]],inputs:{title:"title",isActive:"isActive",currencySymbol:"currencySymbol",value:"value",showValue:"showValue"},decls:3,vars:4,consts:[[1,"card-widget","pe-0",3,"ngClass"],[1,"fs-4","headings-font-family"],[1,"d-flex","justify-content-start","align-items-center"],[1,"fw-normal","me-2"],[1,"fw-normal"]],template:function(e,i){e&1&&(o(0,"div",0),h(1,Ze,7,3)(2,Ke,4,1),r()),e&2&&(p("ngClass",I(2,Ge,i.isActive)),l(),u(i.showValue?1:2))},dependencies:[$,j],styles:[".card-widget[_ngcontent-%COMP%]{padding:20px;border-radius:6px;min-height:95px;border:.5px solid #e4e4e4;width:100%}.active[_ngcontent-%COMP%]{background-color:#f0f0f0}@media only screen and (max-width: 767px){.card-widget[_ngcontent-%COMP%]{width:200px}}@media only screen and (min-width: 768px) and (max-width: 991px){.card-widget[_ngcontent-%COMP%]{width:200px}}"]})};var qe=()=>[L,import("./chunk-VZUPDSBH.js").then(t=>t.PaymentWidgetComponent),M],ze=()=>[L,import("./chunk-3CSCTT6I.js").then(t=>t.PurchaseWidgetComponent),M],Je=()=>[L,import("./chunk-PQ6W7KXC.js").then(t=>t.DebtWidgetComponent),M],Qe=()=>[L,import("./chunk-2MPRVJXH.js").then(t=>t.ProductWidgetComponent),M],Xe=()=>[L,import("./chunk-WM2DGNWH.js").then(t=>t.InventoryWidgetComponent),M],et=()=>({role:"Payment View Role"}),tt=()=>({role:"Buy Report Role"}),it=()=>({role:"Debt View Role"}),at=()=>({role:"Report View Role"}),nt=()=>({role:"Inventory View Role"});function ot(t,a){if(t&1){let e=T();o(0,"div",13)(1,"h6"),s(2,"Outlet"),r(),o(3,"outlet-selector",14),ee("ngModelChange",function(n){b(e);let m=d();return X(m.dashboardFilter.Outlets,n)||(m.dashboardFilter.Outlets=n),x(n)}),r()()}if(t&2){let e=d();l(3),p("multiple",!0)("accessType",e.outletAccess),Q("ngModel",e.dashboardFilter.Outlets)}}function rt(t,a){if(t&1){let e=T();o(0,"div",19),V("click",function(){let n=b(e).$implicit,m=d(2);return x(m.onClickCardWidget(n))}),y(1,"app-card-widget",20),c(2,"number"),r()}if(t&2){let e=a.$implicit,i=d(),n=d();l(),p("title",e.title)("matTooltip",e.tooltip)("currencySymbol",i==null||i.ConfigData==null?null:i.ConfigData.CurrencySymbol)("value",e.value==null?"-":_(2,6,e.value,"1.0-0"))("showValue",e.showValue)("isActive",e.id==n.activeTab)}}function lt(t,a){if(t&1){let e=T();o(0,"app-sales-widget",21),V("onFilter",function(n){b(e);let m=d(2);return x(m.onFilterSalesWidget(n))}),r()}if(t&2){let e=d(),i=d();p("dashboardConfig",e==null?null:e.ConfigData)("chartData",e==null?null:e.HighChartData)("filterByOutletIds",i.dashboardFilter.Outlets)}}function st(t,a){t&1&&B(0)}function dt(t,a){if(t&1){let e=T();o(0,"app-payment-widget",23),c(1,"async"),V("onFilter",function(n){b(e);let m=d(4);return x(m.onFilterPaymentWidget(n))}),r()}if(t&2){let e,i=d(3),n=d();p("dashboardConfig",i==null?null:i.ConfigData)("chartData",(e=v(1,2,n.paymentData$))==null?null:e.Data)}}function pt(t,a){if(t&1&&S(0,st,1,0,"ng-container",22)(1,dt,2,4,"ng-template",null,2,w),t&2){let e=g(2),i=d(3),n=g(12);p("ngTemplateOutlet",i.role.payment.View?e:n)("ngTemplateOutletContext",f(2,et))}}function ct(t,a){t&1&&(o(0,"div",24),s(1," LOADING... "),r())}function mt(t,a){t&1&&(k(0,pt,3,3)(1,ct,2,0),R(2,0,qe,null,1),N(0,-1))}function ht(t,a){t&1&&B(0)}function ut(t,a){if(t&1&&(y(0,"app-purchase-widget",18),c(1,"async")),t&2){let e,i=d(3),n=d();p("dashboardConfig",i==null?null:i.ConfigData)("chartData",(e=v(1,3,n.purchaseData$))==null?null:e.HighChartData)("filterByOutletIds",n.dashboardFilter.Outlets)}}function _t(t,a){if(t&1&&S(0,ht,1,0,"ng-container",22)(1,ut,2,5,"ng-template",null,3,w),t&2){let e=g(2),i=d(3),n=g(12);p("ngTemplateOutlet",i.role.buy.Report?e:n)("ngTemplateOutletContext",f(2,tt))}}function Ct(t,a){t&1&&(o(0,"div",24),s(1," LOADING... "),r())}function gt(t,a){t&1&&(k(0,_t,3,3)(1,Ct,2,0),R(2,0,ze,null,1),N(0,-1))}function ft(t,a){t&1&&B(0)}function Dt(t,a){if(t&1&&(y(0,"app-debt-widget",25),c(1,"async")),t&2){let e,i=d(3),n=d();p("dashboardConfig",i==null?null:i.ConfigData)("debtData",(e=v(1,2,n.debtData$))==null?null:e.PageData)}}function bt(t,a){if(t&1&&S(0,ft,1,0,"ng-container",22)(1,Dt,2,4,"ng-template",null,4,w),t&2){let e=g(2),i=d(3),n=g(12);p("ngTemplateOutlet",i.role.debt.View?e:n)("ngTemplateOutletContext",f(2,it))}}function xt(t,a){t&1&&(o(0,"div",24),s(1," LOADING... "),r())}function yt(t,a){t&1&&(k(0,bt,3,3)(1,xt,2,0),R(2,0,Je,null,1),N(0,-1))}function St(t,a){t&1&&B(0)}function Tt(t,a){if(t&1&&(y(0,"app-product-widget",26),c(1,"async")),t&2){let e,i=d(3),n=d();p("dashboardConfig",i==null?null:i.ConfigData)("productData",(e=v(1,2,n.productData$))==null?null:e.PageData)}}function vt(t,a){if(t&1&&S(0,St,1,0,"ng-container",22)(1,Tt,2,4,"ng-template",null,5,w),t&2){let e=g(2),i=d(3),n=g(12);p("ngTemplateOutlet",i.role.report.View?e:n)("ngTemplateOutletContext",f(2,at))}}function wt(t,a){t&1&&(o(0,"div",24),s(1," LOADING... "),r())}function Ot(t,a){t&1&&(k(0,vt,3,3)(1,wt,2,0),R(2,0,Qe,null,1),N(0,-1))}function Pt(t,a){t&1&&B(0)}function Et(t,a){if(t&1&&(y(0,"app-inventory-widget",27),c(1,"async")),t&2){let e,i=d(3),n=d();p("dashboardConfig",i==null?null:i.ConfigData)("inventoryData",(e=v(1,2,n.inventoryData$))==null?null:e.PageData)}}function Ft(t,a){if(t&1&&S(0,Pt,1,0,"ng-container",22)(1,Et,2,4,"ng-template",null,6,w),t&2){let e=g(2),i=d(3),n=g(12);p("ngTemplateOutlet",i.role.inventory.View?e:n)("ngTemplateOutletContext",f(2,nt))}}function Vt(t,a){t&1&&(o(0,"div",24),s(1," LOADING... "),r())}function Wt(t,a){t&1&&(k(0,Ft,3,3)(1,Vt,2,0),R(2,0,Xe,null,1),N(0,-1))}function It(t,a){if(t&1&&(o(0,"div",12)(1,"div",15)(2,"div",16),pe(3,rt,3,9,"div",17,de),c(5,"async"),r(),h(6,lt,1,3,"app-sales-widget",18),h(7,mt,4,0),h(8,gt,4,0),h(9,yt,4,0),h(10,Ot,4,0),h(11,Wt,4,0),r()()),t&2){let e=d();l(3),ce(v(5,6,e.cardWidget$)),l(3),u(e.activeTab=="SALES"?6:-1),l(),u(e.activeTab=="PAYMENT"?7:-1),l(),u(e.activeTab=="PURCHASE"?8:-1),l(),u(e.activeTab=="DEBT"?9:-1),l(),u(e.activeTab=="PRODUCT"?10:-1),l(),u(e.activeTab=="INVENTORY"?11:-1)}}function Mt(t,a){if(t&1&&(o(0,"div",24)(1,"div",28)(2,"div"),y(3,"img",29),r(),o(4,"h1",30),s(5,"You are not authorized"),r(),o(6,"p"),s(7," This page requires role "),o(8,"span",31),s(9),r(),s(10," to be accessed. Please contact your Administrator to gain access! "),r()()()),t&2){let e=a.role;l(9),C("[",e,"]")}}var ke=class t extends Te{constructor(e,i,n){super(e);this.dashboardService=i;this.role=n;this.menuData$.subscribe(),this.initSalesData(),this.initCardWidget(),this.initPaymentData(),this.initPurchaseData(),this.initInventoryData(),this.initDebtData(),this.initProductData()}cardWidget$;outletAccess=2;dashboardFilter={Outlets:[]};salesData$;paymentData$;purchaseData$;debtData$;productData$;inventoryData$;activeTab="SALES";initSalesData(){this.salesData$=this.dashboardService.getDashboardSales(this.dashboardFilter).pipe(P(1))}initPaymentData(){this.paymentData$=this.dashboardService.getDashboardPayment(this.dashboardFilter).pipe(P(1))}initPurchaseData(){this.purchaseData$=this.dashboardService.getDashboardPurchase(this.dashboardFilter).pipe(P(1))}initDebtData(){this.debtData$=this.dashboardService.getDashboardDebt(this.dashboardFilter).pipe(P(1))}initProductData(){this.productData$=this.dashboardService.getDashboardProduct(this.dashboardFilter).pipe(P(1))}initInventoryData(){this.inventoryData$=this.dashboardService.getDashboardInventory(this.dashboardFilter).pipe(P(1))}initCardWidget(){switch(this.activeTab){case"SALES":this.cardWidget$=this.salesData$.pipe(D(e=>this.dashboardService.getTotalData("Sales",e.HighChartData.Series,1)),Y(0),E(e=>this.dashboardService.setWidgetData(e,this.activeTab)));break;case"PAYMENT":this.cardWidget$=this.paymentData$.pipe(D(e=>this.dashboardService.getTotalData("All",e.Data.Series,1)),Y(0),E(e=>this.dashboardService.setWidgetData(e,this.activeTab)));break;case"PURCHASE":this.cardWidget$=this.purchaseData$.pipe(D(e=>this.dashboardService.getTotalData("Purchase",e.HighChartData.Series,1)),Y(0),E(e=>this.dashboardService.setWidgetData(e,this.activeTab)));break;case"DEBT":this.cardWidget$=this.debtData$.pipe(D(e=>e.PageData.Receivable),Y(0),E(e=>this.dashboardService.setWidgetData(e,this.activeTab)));break}}onFilterByOutlet(){switch(this.activeTab){case"SALES":this.initSalesData(),this.initCardWidget();break;case"PURCHASE":this.initPurchaseData(),this.initCardWidget();break;case"DEBT":this.initDebtData(),this.initCardWidget();break;case"PRODUCT":this.initProductData();break;case"INVENTORY":this.initInventoryData();break;case"PAYMENT":this.initPaymentData();break}}onClickCardWidget(e){this.activeTab=e.id,this.initCardWidget()}onFilterSalesWidget(e){this.cardWidget$=this.salesData$.pipe(D(i=>e.period=="WEEKLY"?this.dashboardService.getTotalData("Sales",i.HighChartData.Series,7):this.dashboardService.getTotalData("Sales",i.HighChartData.Series,1)),E(i=>(this.dashboardService.setWidgetData(i,"SALES"),this.dashboardService.widgets$)),D(i=>i.map(n=>(n.id=="SALES"&&(n.tooltip=e.period=="TODAY"?"Total Sales Today":"Total Sales last 7 days"),n))))}onFilterPaymentWidget(e){this.cardWidget$=this.paymentData$.pipe(D(i=>e.period=="WEEKLY"?this.dashboardService.getTotalData("All",i.Data.Series,7):this.dashboardService.getTotalData("All",i.Data.Series,1)),E(i=>(this.dashboardService.setWidgetData(i,"PAYMENT"),this.dashboardService.widgets$)),D(i=>i.map(n=>(n.id=="PAYMENT"&&(n.tooltip=e.period=="TODAY"?"Total Payment Today":"Total Payment last 7 days"),n))))}static \u0275fac=function(i){return new(i||t)(F(ve),F(O),F(Z))};static \u0275cmp=A({type:t,selectors:[["POS-dashboard-v2"]],features:[U([O]),se],decls:13,vars:7,consts:[["pageFilterTemplate",""],["NOT_AUTHORIZED",""],["PAYMENT",""],["BUY",""],["DEBT",""],["PRODUCT",""],["INVENTORY",""],[3,"onSubmit","filterChange","hideSearchBox","pageData","isFilterOnDropdown","filter"],[1,"content"],[1,"container-fluid","bg-light-gray","p-8"],[1,"row"],[1,"col-12"],[1,"card","mb-0"],[1,"dialog-filter"],["appendTo","body","placeholder","Select Outlets",3,"ngModelChange","multiple","accessType","ngModel"],[1,"card-body"],[1,"d-flex","flex-row","flex-nowrap","justify-content-between","align-items-center","overflow-auto",2,"column-gap","18px"],[1,"cursor-pointer","card-widget-tab"],[3,"dashboardConfig","chartData","filterByOutletIds"],[1,"cursor-pointer","card-widget-tab",3,"click"],["matTooltipPosition","above",3,"title","matTooltip","currencySymbol","value","showValue","isActive"],[3,"onFilter","dashboardConfig","chartData","filterByOutletIds"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"onFilter","dashboardConfig","chartData"],[1,"d-flex","align-items-center","justify-content-center","mt-8",2,"height","350px"],[3,"dashboardConfig","debtData"],[3,"dashboardConfig","productData"],[3,"dashboardConfig","inventoryData"],[1,"text-center"],["src","https://cdn.dealpos.xyz/web-image/locked.svg",2,"width","160px"],[1,"mt-2","mb-6"],[1,"fw-bold"]],template:function(i,n){if(i&1){let m=T();o(0,"mainpanel-cmp",7),V("onSubmit",function(){return b(m),x(n.onFilterByOutlet())}),ee("filterChange",function(J){return b(m),X(n.dashboardFilter,J)||(n.dashboardFilter=J),x(J)}),o(1,"filters"),S(2,ot,4,3,"ng-template",null,0,w),r(),o(4,"content")(5,"div",8)(6,"div",9)(7,"div",10)(8,"div",11),h(9,It,12,8,"div",12),c(10,"async"),r()()()()()(),S(11,Mt,11,1,"ng-template",null,1,w)}if(i&2){let m;p("hideSearchBox",!0)("pageData",n.menuData)("isFilterOnDropdown",!1),Q("filter",n.dashboardFilter),l(9),u((m=v(10,5,n.salesData$))?9:-1,m)}},dependencies:[$,Pe,Oe,xe,De,be,K,q,Ee,Se,ye,M,G],styles:[".card-widget-tab[_ngcontent-%COMP%]{flex:1 1 0px}@media only screen and (max-width: 767px){.card-widget-tab[_ngcontent-%COMP%]{margin-right:1rem;margin-top:.5rem;width:auto}}@media only screen and (min-width: 768px) and (max-width: 991px){.card-widget-tab[_ngcontent-%COMP%]{margin-right:1rem;margin-top:.5rem;width:auto}}"]})};export{ke as DashboardV2Component};
|