marketplacepos 5.30.1 → 5.30.2

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.
Files changed (36) hide show
  1. package/Marketplace/{chunk-QOZFJ6NW.js → chunk-2BQOICNG.js} +1 -1
  2. package/Marketplace/{chunk-KLH4UKSN.js → chunk-2H6ZWOFG.js} +1 -1
  3. package/Marketplace/{chunk-6CZNSZHY.js → chunk-2RI4B7LO.js} +1 -1
  4. package/Marketplace/{chunk-RAU34TVA.js → chunk-4BUKVDBU.js} +1 -1
  5. package/Marketplace/{chunk-GDF2EJQJ.js → chunk-4JOPLIQJ.js} +1 -1
  6. package/Marketplace/{chunk-IOAFNXIL.js → chunk-6CB4LR3W.js} +1 -1
  7. package/Marketplace/{chunk-T3WVEP7H.js → chunk-7UOJBC4V.js} +1 -1
  8. package/Marketplace/{chunk-KV5BTGHC.js → chunk-CIRDMGSF.js} +1 -1
  9. package/Marketplace/{chunk-URW6TGF7.js → chunk-DUUSY6VM.js} +1 -1
  10. package/Marketplace/{chunk-KEEQMGZY.js → chunk-DXYJV443.js} +1 -1
  11. package/Marketplace/{chunk-2QZHXMW7.js → chunk-FOM2CM2O.js} +1 -1
  12. package/Marketplace/{chunk-72DNVSRZ.js → chunk-GBMUF46A.js} +1 -1
  13. package/Marketplace/{chunk-SXY2JDLQ.js → chunk-GJ74CI7M.js} +1 -1
  14. package/Marketplace/{chunk-RO462W6B.js → chunk-HOQSPMPT.js} +1 -1
  15. package/Marketplace/{chunk-LCI6K3VT.js → chunk-HUXTG7WF.js} +1 -1
  16. package/Marketplace/{chunk-XBFHE2UM.js → chunk-I2TLXLNK.js} +1 -1
  17. package/Marketplace/{chunk-QAZOA5GX.js → chunk-IDQSVSAG.js} +1 -1
  18. package/Marketplace/{chunk-YUNZRPV3.js → chunk-J35KGN2V.js} +1 -1
  19. package/Marketplace/{chunk-H55NKEAI.js → chunk-L5FWRRHO.js} +1 -1
  20. package/Marketplace/{chunk-C34UZZ2Z.js → chunk-MYO55CG2.js} +1 -1
  21. package/Marketplace/{chunk-RD7TNSQ6.js → chunk-NLVUCMGP.js} +1 -1
  22. package/Marketplace/{chunk-QJMMLMRF.js → chunk-POBTFM62.js} +1 -1
  23. package/Marketplace/{chunk-YABCFRJB.js → chunk-R6KGFJJ4.js} +1 -1
  24. package/Marketplace/{chunk-NFDUCHYG.js → chunk-TFGY2CZB.js} +1 -1
  25. package/Marketplace/{chunk-KKOQDUQE.js → chunk-U4LZH7TG.js} +1 -1
  26. package/Marketplace/{chunk-GWLKQHCE.js → chunk-UUFP2LR3.js} +1 -1
  27. package/Marketplace/{chunk-XTWEPS73.js → chunk-UWMOSIYY.js} +1 -1
  28. package/Marketplace/{chunk-6HCYY3MB.js → chunk-V7DEJOKT.js} +1 -1
  29. package/Marketplace/{chunk-URIFQ2VU.js → chunk-VAMLKDPP.js} +1 -1
  30. package/Marketplace/{chunk-LVBW3RA4.js → chunk-VEZAEJT2.js} +2 -2
  31. package/Marketplace/{chunk-Q5XEFS4T.js → chunk-VRAUYPKY.js} +1 -1
  32. package/Marketplace/{chunk-ZMWENHWA.js → chunk-WHPQD3IT.js} +1 -1
  33. package/Marketplace/{chunk-CQDJKP6M.js → chunk-YVBVZE4E.js} +1 -1
  34. package/Marketplace/index.html +2 -2
  35. package/Marketplace/{main-4V665DCJ.js → main-LTGHVS57.js} +1 -1
  36. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
- import{a as ve,b as Ie,c as Ge}from"./chunk-O434S2MH.js";import{a as Q}from"./chunk-J5D7PMX5.js";import"./chunk-6U6JR5K6.js";import"./chunk-B2TH5YJH.js";import{a as $e}from"./chunk-BVIRHZTZ.js";import{a as le,b as pe,c as wt}from"./chunk-ILVEM7H5.js";import{a as se}from"./chunk-RENQ3YZH.js";import{b as At}from"./chunk-DDHEMRO7.js";import"./chunk-N6IHFFFZ.js";import"./chunk-PD4CUVAW.js";import{a as Wt,b as Bt,c as zt,d as Gt,e as jt,f as Ht,g as Ut}from"./chunk-TPGBOTD4.js";import"./chunk-4LFFAE2I.js";import{a as Tt,b as Dt}from"./chunk-N3TTJVBG.js";import"./chunk-MY4B7K3R.js";import"./chunk-46AOM3SM.js";import{a as Yt,b as qt}from"./chunk-JXTGH22T.js";import"./chunk-OULUJ2IO.js";import{a as me,b as vt}from"./chunk-LB6JFX4H.js";import{f as Ot,g as kt,h as Lt,i as Vt,j as Ft}from"./chunk-FGPSBTFS.js";import"./chunk-GCKSYCMI.js";import{a as Mt}from"./chunk-N32A3EYJ.js";import"./chunk-ADRVUMMW.js";import{a as X}from"./chunk-5JOW2QWK.js";import{b as Rt}from"./chunk-WT6W7RAQ.js";import{b as Nt}from"./chunk-BQ7NR3ET.js";import{a as Et,b as Pt,c as It}from"./chunk-UMNGKENU.js";import{a as oe}from"./chunk-YABCFRJB.js";import"./chunk-FMV4LYKN.js";import"./chunk-HCDKYABV.js";import{a as ae,b as re,c as ht,d as $,e as _t}from"./chunk-CCXKODFV.js";import{g as de,j as J}from"./chunk-URIFQ2VU.js";import{b as xe,e as B}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{b as St,d as we,e as Ct,f as yt,g as bt,m as H,n as xt}from"./chunk-BO4PPSB5.js";import{t as ut,u as ft}from"./chunk-HUUFOAKH.js";import{P as gt}from"./chunk-E5GGIVK7.js";import{b as ze,c as K,h as G,m as j,o as ne,y as ct}from"./chunk-BSN7ZAXG.js";import{b as I,c as N}from"./chunk-64G3XLI6.js";import{m as We,n as dt,p as q,r as Be}from"./chunk-OVEJFFL6.js";import{$b as w,B as et,Bd as Y,Ca as nt,Cd as be,Da as _,Ea as g,Eb as u,Fa as qe,G as tt,Ga as Ke,Gb as d,Gc as P,Hc as O,Ic as A,Jc as z,Nb as Je,Sb as i,Tb as a,Ub as S,Vb as D,Wb as E,Yb as M,Z as ge,aa as it,bc as c,ea as Ve,ec as rt,fc as ot,gb as L,ja as Fe,jb as l,ka as Ae,kb as T,mc as k,nc as p,oa as ue,oc as f,pc as v,rc as y,sc as b,sd as st,ta as V,tc as x,ua as Re,uc as lt,ud as R,v as U,vc as pt,vd as W,wc as te,xb as at,xc as mt,yc as ie,yd as ye,zd as F}from"./chunk-PQDPS2ID.js";import{a as Qe,b as Ze}from"./chunk-GNOSNGXM.js";var Kt=(()=>{let m=class m{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new",Permissions:[]},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship",Permissions:[]},{Title:"3 - Shipped",Url:"/menu/Order/Shipped",Permissions:[]},{Title:"4 - Completed",Url:"/menu/Order/Delivered",Permissions:[]},{Title:"All",Url:"/menu/Order/All",Permissions:[]},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled",Permissions:[]},{Title:"Download",Url:"/menu/Order/Download",Permissions:[$e.downloadOrder]},{Title:"Log",Url:"/menu/Order/Download_Order_Log",Permissions:[$e.downloadOrder]}]}ngOnInit(){}};m.\u0275fac=function(t){return new(t||m)},m.\u0275cmp=V({type:m,selectors:[["app-orders"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(t,n){t&1&&(i(0,"nav",0)(1,"div",1)(2,"div"),S(3,"nav-tab",2),a()()(),S(4,"router-outlet")),t&2&&(l(3),d("Tabs",n.ObjectOrderTabs)("usePermissions",!0))},dependencies:[Tt,dt]});let r=m;return r})();var je=(()=>{let m=class m{constructor(e,t){this.http=e,this.toastr=t}acceptTokopediaOrders(e){return this.http.post("/api/Orders/AcceptOrderTokopedia",e).pipe(Ve(t=>{this.tokopediaAcceptOrderHandler(t)}))}tokopediaAcceptOrderHandler(e){let t=e.filter(h=>h.Status==!1),n=e.filter(h=>h.Status==!0);if(t.length==0&&n.length>0){let h=`<ol>${this.generateSuccessMessage(n)}</ol>`;this.toastr.success(h,"Success",{enableHtml:!0})}else if(t.length>0&&n.length>0){let h=`<ol>
1
+ import{a as ve,b as Ie,c as Ge}from"./chunk-O434S2MH.js";import{a as Q}from"./chunk-J5D7PMX5.js";import"./chunk-6U6JR5K6.js";import"./chunk-B2TH5YJH.js";import{a as $e}from"./chunk-BVIRHZTZ.js";import{a as le,b as pe,c as wt}from"./chunk-ILVEM7H5.js";import{a as se}from"./chunk-RENQ3YZH.js";import{b as At}from"./chunk-DDHEMRO7.js";import"./chunk-N6IHFFFZ.js";import"./chunk-PD4CUVAW.js";import{a as Wt,b as Bt,c as zt,d as Gt,e as jt,f as Ht,g as Ut}from"./chunk-TPGBOTD4.js";import"./chunk-4LFFAE2I.js";import{a as Tt,b as Dt}from"./chunk-N3TTJVBG.js";import"./chunk-MY4B7K3R.js";import"./chunk-46AOM3SM.js";import{a as Yt,b as qt}from"./chunk-JXTGH22T.js";import"./chunk-OULUJ2IO.js";import{a as me,b as vt}from"./chunk-LB6JFX4H.js";import{f as Ot,g as kt,h as Lt,i as Vt,j as Ft}from"./chunk-FGPSBTFS.js";import"./chunk-GCKSYCMI.js";import{a as Mt}from"./chunk-N32A3EYJ.js";import"./chunk-ADRVUMMW.js";import{a as X}from"./chunk-5JOW2QWK.js";import{b as Rt}from"./chunk-WT6W7RAQ.js";import{b as Nt}from"./chunk-BQ7NR3ET.js";import{a as Et,b as Pt,c as It}from"./chunk-UMNGKENU.js";import{a as oe}from"./chunk-R6KGFJJ4.js";import"./chunk-FMV4LYKN.js";import"./chunk-HCDKYABV.js";import{a as ae,b as re,c as ht,d as $,e as _t}from"./chunk-CCXKODFV.js";import{g as de,j as J}from"./chunk-VAMLKDPP.js";import{b as xe,e as B}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{b as St,d as we,e as Ct,f as yt,g as bt,m as H,n as xt}from"./chunk-BO4PPSB5.js";import{t as ut,u as ft}from"./chunk-HUUFOAKH.js";import{P as gt}from"./chunk-E5GGIVK7.js";import{b as ze,c as K,h as G,m as j,o as ne,y as ct}from"./chunk-BSN7ZAXG.js";import{b as I,c as N}from"./chunk-64G3XLI6.js";import{m as We,n as dt,p as q,r as Be}from"./chunk-OVEJFFL6.js";import{$b as w,B as et,Bd as Y,Ca as nt,Cd as be,Da as _,Ea as g,Eb as u,Fa as qe,G as tt,Ga as Ke,Gb as d,Gc as P,Hc as O,Ic as A,Jc as z,Nb as Je,Sb as i,Tb as a,Ub as S,Vb as D,Wb as E,Yb as M,Z as ge,aa as it,bc as c,ea as Ve,ec as rt,fc as ot,gb as L,ja as Fe,jb as l,ka as Ae,kb as T,mc as k,nc as p,oa as ue,oc as f,pc as v,rc as y,sc as b,sd as st,ta as V,tc as x,ua as Re,uc as lt,ud as R,v as U,vc as pt,vd as W,wc as te,xb as at,xc as mt,yc as ie,yd as ye,zd as F}from"./chunk-PQDPS2ID.js";import{a as Qe,b as Ze}from"./chunk-GNOSNGXM.js";var Kt=(()=>{let m=class m{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new",Permissions:[]},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship",Permissions:[]},{Title:"3 - Shipped",Url:"/menu/Order/Shipped",Permissions:[]},{Title:"4 - Completed",Url:"/menu/Order/Delivered",Permissions:[]},{Title:"All",Url:"/menu/Order/All",Permissions:[]},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled",Permissions:[]},{Title:"Download",Url:"/menu/Order/Download",Permissions:[$e.downloadOrder]},{Title:"Log",Url:"/menu/Order/Download_Order_Log",Permissions:[$e.downloadOrder]}]}ngOnInit(){}};m.\u0275fac=function(t){return new(t||m)},m.\u0275cmp=V({type:m,selectors:[["app-orders"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(t,n){t&1&&(i(0,"nav",0)(1,"div",1)(2,"div"),S(3,"nav-tab",2),a()()(),S(4,"router-outlet")),t&2&&(l(3),d("Tabs",n.ObjectOrderTabs)("usePermissions",!0))},dependencies:[Tt,dt]});let r=m;return r})();var je=(()=>{let m=class m{constructor(e,t){this.http=e,this.toastr=t}acceptTokopediaOrders(e){return this.http.post("/api/Orders/AcceptOrderTokopedia",e).pipe(Ve(t=>{this.tokopediaAcceptOrderHandler(t)}))}tokopediaAcceptOrderHandler(e){let t=e.filter(h=>h.Status==!1),n=e.filter(h=>h.Status==!0);if(t.length==0&&n.length>0){let h=`<ol>${this.generateSuccessMessage(n)}</ol>`;this.toastr.success(h,"Success",{enableHtml:!0})}else if(t.length>0&&n.length>0){let h=`<ol>
2
2
  ${this.generateSuccessMessage(n)}
3
3
  ${this.generateErrorMessage(t)}
4
4
  </ol>`;this.toastr.warning(h,"Warning",{enableHtml:!0})}else{let h=`<ol>${this.generateErrorMessage(t)}</ol>`;this.toastr.error(h,"Error",{enableHtml:!0})}}generateSuccessMessage(e){let t="";return e.forEach(n=>{t+=`<li><b>${n.OrderNumber}</b> was successfully Accept</li>`}),t}generateErrorMessage(e){let t="";return e.forEach(n=>{t+=`<li><b>${n.OrderNumber}</b> ${n.Message}</li>`}),t}};m.\u0275fac=function(t){return new(t||m)(ue(B),ue(xe))},m.\u0275prov=Fe({token:m,factory:m.\u0275fac});let r=m;return r})();function pi(r,m){if(r&1){let o=M();D(0),i(1,"button",20),w("click",function(){_(o);let t=c().ngIf,n=c();return g(n.onAcceptOrder(t))}),S(2,"i",21),p(3," Accept "),a(),E()}}function mi(r,m){if(r&1&&(D(0),u(1,pi,4,0,"ng-container",3),E()),r&2){let o=c();l(),d("ngIf",o.isTokopediaAvailable&&o.isTokopediaSelected)}}function si(r,m){if(r&1&&(i(0,"span",22),S(1,"img",23),a(),p(2)),r&2){let o=m.item;l(),d("src",o==null?null:o.Img,L),l(),v(" ",o.Name," ")}}function di(r,m){if(r&1){let o=M();D(0),i(1,"th",35)(2,"input",36),x("ngModelChange",function(t){_(o);let n=c(3);return b(n.isCheckAll,t)||(n.isCheckAll=t),g(t)}),w("ngModelChange",function(){_(o);let t=c(2).ngIf,n=c();return g(n.onSelectAllOrderData(t))}),a()(),E()}if(r&2){let o=c(3);l(2),y("ngModel",o.isCheckAll)}}function ci(r,m){if(r&1){let o=M();D(0),i(1,"input",36),x("ngModelChange",function(t){_(o);let n=c(2).$implicit;return b(n.selected,t)||(n.selected=t),g(t)}),w("ngModelChange",function(){_(o);let t=c(4).ngIf,n=c();return g(n.onSelectOrderData(t))}),a(),E()}if(r&2){let o=c(2).$implicit;l(),y("ngModel",o.selected)}}function hi(r,m){if(r&1&&(D(0),i(1,"td"),u(2,ci,2,1,"ng-container",3),a(),E()),r&2){let o=c().$implicit,e=c(3);l(2),d("ngIf",o.Type==e.tokopediaType)}}function _i(r,m){if(r&1&&(D(0),i(1,"span"),p(2),a(),E()),r&2){let o=c().$implicit;l(2),f(o.Number)}}function gi(r,m){if(r&1&&(i(0,"a",38),p(1),a()),r&2){let o=c().$implicit,e=c(3);d("href",e.domain+"/menu/Orders/Order/Sales_Order/Info?ID="+o.ID,L),l(),f(o.Number)}}function ui(r,m){if(r&1&&(i(0,"tr"),u(1,hi,3,1,"ng-container",3),i(2,"td"),p(3),a(),i(4,"td"),u(5,_i,3,1,"ng-container",24)(6,gi,2,2,"ng-template",null,1,z),a(),i(8,"td"),p(9),a(),i(10,"td"),p(11),P(12,"date"),a(),i(13,"td"),S(14,"app-channel-logo",37),a()()),r&2){let o=m.$implicit,e=k(7),t=c(3);l(),d("ngIf",t.isTokopediaAvailable),l(2),f(o.Outlet),l(2),d("ngIf",o.ID==t.guidEmpty)("ngIfElse",e),l(4),f(o.Customer),l(2),f(A(12,7,o.Created,"dd MMM yyyy HH:mm")),l(3),d("typeId",o.Type)}}function fi(r,m){if(r&1){let o=M();D(0),i(1,"div",25)(2,"table",26),w("matSortChange",function(t){_(o);let n=c(2);return g(n.onSort(t))}),i(3,"thead",27)(4,"tr",28),u(5,di,3,1,"ng-container",3),i(6,"th",29),p(7,"Outlet"),a(),i(8,"th",30),p(9,"Order number"),a(),i(10,"th"),p(11,"Customer"),a(),i(12,"th",31),p(13," Created On "),a(),i(14,"th",32),p(15,"Channel"),a()()(),i(16,"tbody"),u(17,ui,15,10,"tr",33),a()(),i(18,"app-mat-paginator-no-count",34),P(19,"async"),P(20,"async"),w("total",function(){_(o);let t=c(2);return g(t.getPaginatonTotal())})("next",function(){_(o);let t=c(2);return g(t.onNextPage())})("previous",function(){_(o);let t=c(2);return g(t.onPreviousPage())}),a()(),E()}if(r&2){let o,e=c().ngIf,t=c();l(5),d("ngIf",t.isTokopediaAvailable&&e),l(12),d("ngForOf",e),l(),d("filter",t.filter)("totaldata",(o=O(19,5,t.newOrdersData$))==null?null:o.length)("paginationTotal",O(20,7,t.paginationTotal$))}}function Si(r,m){if(r&1&&(D(0),u(1,fi,21,9,"ng-container",24),E()),r&2){let o=m.ngIf;c();let e=k(36);l(),d("ngIf",(o==null?null:o.length)>0)("ngIfElse",e)}}function Ci(r,m){r&1&&(i(0,"div",39),S(1,"app-empty-state"),a())}var $t=(()=>{let m=class m{constructor(e,t,n,h){this.localDataService=e,this.orderService=t,this.acceptOrderService=n,this.authService=h,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.domain=`https://${this.localDataService.getHostName()}`,this.guidEmpty=N.GuidEMpty,this.tokopediaType=I.Tokopedia,this.isTokopediaSelected=!1,this.isTokopediaAvailable=!1,this.isCheckAll=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initLoadPage()}initLoadPage(){this.orderService.loadInitialPage().subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.getNewOrders()})}getNewOrders(){let e={PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.sourceObs$=this.orderService.getNewOrders(e).pipe(ge()),this.newOrdersData$=this.sourceObs$.pipe(Ve(t=>{t.filter(h=>h.Type==I.Tokopedia).length>0&&(this.isTokopediaAvailable=!0)}))}getPaginatonTotal(){this.paginationTotal$=this.orderService.getTotalNewOrders(this.filter.ListChannelID,this.filter.From,this.filter.To).pipe(ge())}onNextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getNewOrders()}onPreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getNewOrders()}onSelectOrderData(e){this.isTokopediaSelected=!1,e.filter(n=>n.selected).length>0&&(this.isTokopediaSelected=!0)}onSelectAllOrderData(e){e=e.map(t=>(t.Type==I.Tokopedia&&(t.selected=this.isCheckAll),t)),this.onSelectOrderData(e)}onAcceptOrder(e){let t=this.getSelectedTokopediaOrders(e);this.acceptOrderService.acceptTokopediaOrders(t).subscribe(n=>{this.isTokopediaSelected=!1,location.reload()})}getSelectedTokopediaOrders(e){return e.filter(n=>n.selected).map(n=>n.Number)}onSort(e){if(e.direction==""){this.newOrdersData$=this.sourceObs$;return}if(e.active=="created"){let t=e.direction=="asc";this.newOrdersData$=this.newOrdersData$.pipe(U(n=>(n=n.sort((h,C)=>N.compare(h.Created,C.Created,t)),n)))}}};m.\u0275fac=function(t){return new(t||m)(T(de),T(ve),T(je),T(J))},m.\u0275cmp=V({type:m,selectors:[["app-new-order"]],decls:37,vars:15,consts:[["EMPTY_STATE",""],["NOT_EMPTY",""],["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"onSubmit","hideSearchBox"],[4,"ngIf"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-check"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"typeId"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(t,n){if(t&1){let h=M();i(0,"mainpanel",2),w("onSubmit",function(){return _(h),g(n.getNewOrders())}),i(1,"actions"),u(2,mi,2,1,"ng-container",3),P(3,"async"),i(4,"a",4),S(5,"i",5),i(6,"span"),p(7,"Visit our Fulfillment Display System"),a()()(),i(8,"filters")(9,"div")(10,"label",6),p(11,"Channel"),a(),i(12,"ng-select",7),x("ngModelChange",function(s){return _(h),b(n.filter.ListChannelID,s)||(n.filter.ListChannelID=s),g(s)}),u(13,si,3,2,"ng-template",8),a()(),i(14,"div",9)(15,"label",10),p(16,"Page Number"),a(),i(17,"input",11),x("ngModelChange",function(s){return _(h),b(n.filter.PageNumber,s)||(n.filter.PageNumber=s),g(s)}),a()(),i(18,"div",9)(19,"label",10),p(20,"Page Size"),a(),i(21,"input",12),x("ngModelChange",function(s){return _(h),b(n.filter.PageSize,s)||(n.filter.PageSize=s),g(s)}),a()(),i(22,"div",9)(23,"label",13),p(24,"From/To"),a(),i(25,"div",14)(26,"datepicker",15),x("dateChange",function(s){return _(h),b(n.filter.From,s)||(n.filter.From=s),g(s)}),a()(),i(27,"div")(28,"datepicker",16),x("dateChange",function(s){return _(h),b(n.filter.To,s)||(n.filter.To=s),g(s)}),a()()()(),i(29,"content")(30,"div",17)(31,"div",18)(32,"div",19),u(33,Si,2,2,"ng-container",3),P(34,"async"),u(35,Ci,2,0,"ng-template",null,0,z),a()()()()()}t&2&&(d("hideSearchBox",!0),l(2),d("ngIf",O(3,11,n.newOrdersData$)),l(10),d("clearable",!0)("multiple",!0)("items",n.channelOptions),y("ngModel",n.filter.ListChannelID),l(5),y("ngModel",n.filter.PageNumber),l(4),y("ngModel",n.filter.PageSize),l(5),y("date",n.filter.From),l(2),y("date",n.filter.To),l(5),d("ngIf",O(34,13,n.newOrdersData$)))},dependencies:[R,W,K,ne,ze,G,j,H,$,ae,re,X,me,se,le,pe,Q,ye,F]});let r=m;return r})();var yi=()=>["/menu/Order"];function bi(r,m){if(r&1&&(i(0,"tr")(1,"td"),p(2),a(),i(3,"td"),p(4),P(5,"number"),a(),i(6,"td"),p(7),P(8,"number"),a()()),r&2){let o=m.$implicit;l(2),f(o.Code),l(2),f(O(5,3,o.Quantity)),l(3),f(O(8,5,o.Price))}}function xi(r,m){if(r&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),p(5,"Outlet Info"),a()(),i(6,"div",4)(7,"div",9),p(8," Outlet : "),a(),i(9,"div",9),p(10),a()(),i(11,"div",4)(12,"div",9),p(13," Date : "),a(),i(14,"div",9),p(15),P(16,"date"),a()(),i(17,"div",4)(18,"div",9),p(19," Status : "),a(),i(20,"div",9),p(21),a()(),i(22,"div",4)(23,"div",9),p(24," Tax Type : "),a(),i(25,"div",9),p(26),a()(),i(27,"div",4)(28,"div",9),p(29," Due Date : "),a(),i(30,"div",9),p(31),P(32,"date"),a()()(),i(33,"div",6)(34,"div",7)(35,"h3",8),p(36,"Customer Info"),a()(),i(37,"div",4)(38,"div",9),p(39," Name : "),a(),i(40,"div",9),p(41),a()(),i(42,"div",4)(43,"div",9),p(44," Email : "),a(),i(45,"div",9),p(46),a()(),i(47,"div",4)(48,"div",9),p(49," Mobile : "),a(),i(50,"div",9),p(51),a()()()(),i(52,"div",10)(53,"h3",11),p(54,"Products Sold"),a(),i(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),p(60,"Code"),a(),i(61,"th"),p(62,"Quantity"),a(),i(63,"th"),p(64,"Price"),a()()(),i(65,"tbody"),u(66,bi,9,7,"tr",16),a()()()()()),r&2){let o=c();l(10),v(" ",o.model.Outlet," "),l(5),v(" ",A(16,9,o.model.Date,"dd MMM yyyy")," "),l(6),v(" ",o.model.Delivery," "),l(5),v(" ",o.model.TaxType," "),l(5),v(" ",A(32,12,o.model.DueDate,"dd MMM yyyy")," "),l(10),v(" ",o.model.Customer.Name," "),l(5),v(" ",o.model.Customer.Email," "),l(5),v(" ",o.model.Customer.Mobile," "),l(15),d("ngForOf",o.model.Variants)}}var Xt=(()=>{let m=class m{constructor(e,t){this.http=e,this.url=t,this.number=this.url.snapshot.queryParams.Number,this.outlet=this.url.snapshot.queryParams.Outlet}ngOnInit(){this.Load()}Load(){var e={Number:this.number,Outlet:this.outlet};this.http.post("/api/orders/GetInvoiceDetail",e).subscribe(t=>{this.model=t})}};m.\u0275fac=function(t){return new(t||m)(T(B),T(We))},m.\u0275cmp=V({type:m,selectors:[["app-detail-order"]],decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-secondary","btn-fill","btn-lg","me-3",3,"routerLink"],[1,"container"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"border","my-3","py-3","col-12"],[1,"row","m-2"],[1,"text-center"],[1,"col"],[1,"col-8"],[1,"text-center","my-3","py-3"],[1,"table-responsive"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"]],template:function(t,n){t&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),p(3,"Back"),a()(),i(4,"content")(5,"div",2),u(6,xi,67,15,"div",3),a()()()),t&2&&(d("headerTitle","Order #"+n.number)("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),d("routerLink",te(5,yi)),l(4),d("ngIf",n.model))},dependencies:[R,W,H,q,Y,F]});let r=m;return r})();var Qt=(()=>{let m=class m{constructor(e){this.dialogRef=e,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}};m.\u0275fac=function(t){return new(t||m)(T(St))},m.\u0275cmp=V({type:m,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,n){t&1&&(i(0,"div",0)(1,"h2",1),p(2,"Cetak label pesanan"),a(),i(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),p(7,"Kamu akan mencetak label yang berisi detail pesanan"),a(),i(8,"div",5)(9,"mat-checkbox",6),x("ngModelChange",function(C){return b(n.tandaiSudahDicetak,C)||(n.tandaiSudahDicetak=C),C}),a(),i(10,"span",7),p(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),a()()()()(),i(12,"mat-dialog-actions",8)(13,"button",9),w("click",function(){return n.onCancel()}),p(14,"Cancel"),a(),i(15,"button",10),w("click",function(){return n.onPrint()}),p(16,"Cetak Pesanan"),a()()()),t&2&&(l(9),y("ngModel",n.tandaiSudahDicetak))},dependencies:[G,j,Yt,yt,Ct]});let r=m;return r})();var Ue=(()=>{let m=class m{constructor(e,t,n){this.http=e,this.toastr=t,this.dialog=n}getTokopediaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/Tokopedia/Multiple",{Orders:e}).pipe(U(t=>(t=t.map(n=>(n.ChannelType=I.Tokopedia,n)),t)))}getTiktokShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/TIktok/Multiple",{Orders:e}).pipe(U(t=>(t=t.map(n=>(n.ChannelType=I.Tiktok,n)),t)))}getShopeeShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/shopee/Multiple",{Orders:e}).pipe(U(t=>(t=t.map(n=>(n.ChannelType=I.Shopee,n)),t)))}getLazadaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/lazada/Multiple",{Orders:e}).pipe(U(t=>(t=t.map(n=>(n.ChannelType=I.Lazada,n)),t)))}printShippingLabelTokopedia(e){let t={OrderNumber:e,Printed:!0};this.dialog.open(Qt).afterClosed().pipe(tt(n=>n!==void 0),it(n=>(t.Printed=n,this.http.post("api/v1/Shippinglabel/Tokopedia",t)))).subscribe(n=>{let h=window.open("about:blank","_blank");h.document.write(n.File),h.document.close()})}printShippingLabelTiktok(e,t){let n={ShopID:t,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Tiktok",n).subscribe(h=>{h.data!=null?window.open(h.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print")})}printShippingLabelShopee(e,t){let n={ShopID:t,OrderNumber:e};this.http.post("api/v1/Shippinglabel/shopee/DownloadShipping",n).subscribe(h=>{var C=Uint8Array.from(atob(h.File),Pe=>Pe.charCodeAt(0)),s=new Blob([C],{type:"octet/stream"});N.openDownloadFile(s,`${e}.pdf`)})}printShippingLabelLazada(e,t){let n={ShopID:t,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Lazada/DownloadShipping",n).subscribe(h=>{h.result.data!=null?window.open(h.result.data.pdf_url,"_blank"):this.toastr.error(h.message,"Cannot Print")})}};m.\u0275fac=function(t){return new(t||m)(ue(B),ue(xe),ue(we))},m.\u0275prov=Fe({token:m,factory:m.\u0275fac,providedIn:"root"});let r=m;return r})();var ce=function(r){return r.SPX="https://res.cloudinary.com/pos/image/upload/v1698216798/APP/Print%20Shipping%20Label/SPX_Logo.png",r.SICEPAT="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/SiCepat_Logo.png",r.JNT="https://res.cloudinary.com/pos/image/upload/v1698216792/APP/Print%20Shipping%20Label/J_T_Logo.png",r.ANTERAJA="https://res.cloudinary.com/pos/image/upload/v1698218271/APP/Print%20Shipping%20Label/anteraja_Logo.png",r.JNE="https://res.cloudinary.com/pos/image/upload/v1698216791/APP/Print%20Shipping%20Label/JNE_Logo.png",r.GRAB="https://res.cloudinary.com/pos/image/upload/v1698216794/APP/Print%20Shipping%20Label/GrabExpress_Logo.png",r.GOSEND="https://res.cloudinary.com/pos/image/upload/v1698218375/APP/Print%20Shipping%20Label/Gosend_Logo.png",r.LAZADA_EXPRESS="https://res.cloudinary.com/pos/image/upload/v1698914677/icons/Marketplace%20logo/lazada-Logistics.png",r}(ce||{});var Ee=function(r){return r.TOKOPEDIA="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/Tokopedia_Logo.png",r.SHOPEE="https://res.cloudinary.com/pos/image/upload/v1698219243/APP/Print%20Shipping%20Label/shopee-logo.png",r.LAZADA="https://res.cloudinary.com/pos/image/upload/v1698912333/icons/Marketplace%20logo/Lazada_icon.png",r.TIKTOK="https://res.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",r}(Ee||{});function vi(r,m){if(r&1&&(D(0),i(1,"div",36)(2,"div",12)(3,"div",37),p(4),a()(),i(5,"div",12)(6,"div",37),p(7),a()()(),E()),r&2){let o=c();l(4),v(" ",o.recipient==null?null:o.recipient.City," "),l(3),v(" ",o.recipient==null?null:o.recipient.District," ")}}function Ti(r,m){if(r&1&&(D(0),i(1,"div")(2,"span",15),p(3,"Berat: "),a(),i(4,"span",18),p(5),a()(),E()),r&2){let o=c();l(5),v("",o.shippingLabel==null?null:o.shippingLabel.Weight," gr")}}function Di(r,m){if(r&1&&(D(0),i(1,"div",38)(2,"span",14),p(3,"Batas Kirim:"),a(),i(4,"span",18),p(5),P(6,"date"),a()(),E()),r&2){let o=c();l(5),f(A(6,1,o.logistic==null?null:o.logistic.Batas_kirim,"dd-MM-yyy"))}}function Ei(r,m){if(r&1&&(D(0),i(1,"div",38)(2,"span",14),p(3,"No.Pesanan:"),a(),i(4,"span",18),p(5),a()(),E()),r&2){let o=c();l(5),f(o.shippingLabel==null?null:o.shippingLabel.OrderNumber)}}function Pi(r,m){if(r&1&&(i(0,"tr")(1,"td",39),p(2),a(),i(3,"td"),p(4),a(),i(5,"td"),p(6),a(),i(7,"td"),p(8),P(9,"number"),a()()),r&2){let o=m.$implicit,e=m.index;l(2),f(e+1),l(2),f(o.Product_Name),l(2),f(o.SKU),l(2),f(O(9,4,o.Quantity))}}var Ye=(()=>{let m=class m{constructor(){this.minDate=N.MinDate,this.channelType=I}ngOnChanges(e){e.shippingLabel&&e.shippingLabel.currentValue&&(this.initShippingLabel(),this.getShippingLogo(),this.getChannelLogo())}ngAfterViewInit(){this.initBarcodeConfig()}getChannelLogo(){switch(this.shippingLabel.ChannelType){case I.Tokopedia:this.marketplaceLogo=Ee.TOKOPEDIA;break;case I.Shopee:this.marketplaceLogo=Ee.SHOPEE;break;case I.Lazada:this.marketplaceLogo=Ee.LAZADA;break;case I.Tiktok:this.marketplaceLogo=Ee.TIKTOK;break}}getShippingLogo(){let e=this.shippingLabel.Logistic.Logistic_Name;e=e?.toLowerCase(),e.includes("anteraja")?this.shippingLogo=ce.ANTERAJA:e.includes("grabexpress")?this.shippingLogo=ce.GRAB:e.includes("jne")?this.shippingLogo=ce.JNE:e.includes("gosend")?this.shippingLogo=ce.GOSEND:e.includes("j&t")?this.shippingLogo=ce.JNT:e.includes("sicepat")?this.shippingLogo=ce.SICEPAT:e.includes("spx")?this.shippingLogo=ce.SPX:e.includes("lex")&&(this.shippingLogo=ce.LAZADA_EXPRESS)}initShippingLabel(){this.recipient=this.shippingLabel.Recipient,this.store=this.shippingLabel.Store,this.products=this.shippingLabel.Products,this.logistic=this.shippingLabel.Logistic}initBarcodeConfig(){if(N.IsNotEmpty(this.logistic?.Resi_Number)){let e=this.logistic?.Resi_Number;JsBarcode(`#RESI${this.id}`,this.logistic?.Resi_Number,{displayValue:!1,width:e.length>15?1:1.5,height:40})}N.IsNotEmpty(this.shippingLabel?.OrderNumber)&&JsBarcode(`#NO${this.id}`,this.shippingLabel?.OrderNumber,{displayValue:!1,width:this.shippingLabel?.OrderNumber.length>15?.5:1,height:40})}};m.\u0275fac=function(t){return new(t||m)},m.\u0275cmp=V({type:m,selectors:[["app-shipping-label"]],inputs:{shippingLabel:"shippingLabel",id:"id"},standalone:!0,features:[nt,pt],decls:87,vars:20,consts:[[1,"label-container"],[2,"border","1px solid","padding","12px"],[1,"row","mb-2"],[1,"col-12"],[1,"d-flex","align-items-center","justify-content-between"],["width","105px",1,"border-0",3,"src"],[1,"mb-4"],[1,"row","mb-1"],[1,"text-center","fw-bold","border","p-2","fs-5","border-dark"],[1,"me-2"],[1,"col-12","text-center"],[3,"id"],[1,"col-6"],[1,"d-flex"],[1,"fw-bold","fs-6","me-1"],[1,"fw-bold","fs-6"],[1,"mt-2"],[1,"mb-0","fs-6",2,"max-width","200px","word-wrap","break-word"],[1,"fs-6"],[1,"fs-6",2,"word-wrap","break-word","max-width","160px"],[4,"ngIf"],[1,"row","px-6"],[1,"col-5","border","border-dark","border-end-0","text-center","p-2"],[1,"col-7","border","border-dark","p-2","text-center","fs-6"],[1,"fst-italic"],[1,"row"],[1,"col-5","pt-4",2,"padding-right","0px"],[1,"d-flex","justify-content-between"],[1,"col-7","text-center"],[1,"mt-1",3,"id"],[1,"table","table-sm","fs-6"],[1,"text-center",2,"width","5px"],[2,"width","150px"],[2,"width","50px"],[2,"width","25px"],[4,"ngFor","ngForOf"],[1,"row","mb-4"],[1,"text-center","fw-bold","border","p-2","fs-6","border-dark","text-uppercase"],[1,"mt-4"],[1,"text-center"]],template:function(t,n){t&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div"),S(6,"img",5),a(),i(7,"div")(8,"h4"),p(9),a()(),i(10,"div"),S(11,"img",5),a()()()(),i(12,"div",6),S(13,"hr"),a(),i(14,"div",7)(15,"div",3)(16,"div",8)(17,"span",9),p(18),a(),i(19,"span"),p(20),a()()()(),i(21,"div",7)(22,"div",10),qe(),S(23,"svg",11),a()(),Ke(),i(24,"div",6),S(25,"hr"),a(),i(26,"div",2)(27,"div",12)(28,"div",13)(29,"div",14),p(30,"Penerima: "),a(),i(31,"div",15),p(32),a()(),i(33,"div",16)(34,"span",15),p(35,"Alamat Pengiriman:"),a(),i(36,"div",17),p(37),a()()(),i(38,"div",12)(39,"div",13)(40,"div",14),p(41,"Pengirim: "),a(),i(42,"div")(43,"div",15),p(44),a(),i(45,"div",18),p(46),a(),i(47,"div",19),p(48),a()()(),S(49,"div"),a()(),u(50,vi,8,2,"ng-container",20),i(51,"div",21)(52,"div",22)(53,"div",15),p(54,"CASHLESS"),a()(),i(55,"div",23)(56,"small",24),p(57,"Penjual tidak perlu membayar ongkos kirim ke kurir"),a()()(),i(58,"div",25)(59,"div",26)(60,"div",27),u(61,Ti,6,1,"ng-container",20),i(62,"div")(63,"span",15),p(64,"COD: "),a(),i(65,"span",18),p(66),P(67,"number"),a()()(),u(68,Di,7,4,"ng-container",20)(69,Ei,6,1,"ng-container",20),a(),i(70,"div",28),qe(),S(71,"svg",29),a()()(),Ke(),i(72,"div",25)(73,"div",3)(74,"table",30)(75,"thead")(76,"tr")(77,"th",31),p(78,"No."),a(),i(79,"th",32),p(80,"Nama Produk"),a(),i(81,"th",33),p(82,"SKU"),a(),i(83,"th",34),p(84,"Qty"),a()()(),i(85,"tbody"),u(86,Pi,10,6,"tr",35),a()()()()()),t&2&&(l(6),d("src",n.marketplaceLogo,L),l(3),f(n.logistic==null?null:n.logistic.Service),l(2),d("src",n.shippingLogo,L),l(7),v(" ",(n.shippingLabel==null?null:n.shippingLabel.ChannelType)==(n.channelType==null?null:n.channelType.Tokopedia)?"Kode Booking: ":"No. Resi: "," "),l(2),f(n.logistic==null?null:n.logistic.Resi_Number),l(3),d("id","RESI"+n.id),l(9),f(n.recipient==null?null:n.recipient.Name),l(5),v(" ",n.recipient==null?null:n.recipient.Address," "),l(7),f(n.store==null?null:n.store.Name),l(2),f(n.store==null?null:n.store.Phone),l(2),v(" ",n.store==null?null:n.store.Address," "),l(2),d("ngIf",(n.recipient==null?null:n.recipient.City)&&(n.recipient==null?null:n.recipient.District)),l(11),d("ngIf",n.shippingLabel==null?null:n.shippingLabel.Weight),l(5),v("Rp. ",n.shippingLabel!=null&&n.shippingLabel.IsCOD?O(67,18,n.shippingLabel==null||n.shippingLabel.SummaryPrice==null?null:n.shippingLabel.SummaryPrice.Total):0,""),l(2),d("ngIf",(n.logistic==null?null:n.logistic.Batas_kirim)&&(n.logistic==null?null:n.logistic.Batas_kirim)!==n.minDate),l(),d("ngIf",n.shippingLabel==null?null:n.shippingLabel.OrderNumber),l(2),d("id","NO"+n.id),l(15),d("ngForOf",n.products))},dependencies:[be,R,W,Y,F],styles:[".table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border:none!important}.table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-transform:capitalize;padding:4px!important}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:none!important;padding:2px 2px 2px 5px!important;font-size:10px}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.4509803922)}.label-container[_ngcontent-%COMP%]{width:465px;float:left}hr[_ngcontent-%COMP%]{opacity:.8;margin:0}"]});let r=m;return r})();var Ni=()=>["/menu/Order/detail"],Mi=(r,m)=>({Number:r,Outlet:m});function Oi(r,m){if(r&1){let o=M();D(0),i(1,"button",21),w("click",function(){_(o);let t=c();return g(t.onPrintMultipleShippingLabel())}),S(2,"i",22),i(3,"span"),p(4,"Print Shipping Label"),a()(),E()}}function ki(r,m){if(r&1&&(i(0,"span",23),S(1,"img",24),a(),p(2)),r&2){let o=m.item;l(),d("src",o==null?null:o.Img,L)("alt",o.Name),l(),v(" ",o.Name," ")}}function Li(r,m){if(r&1){let o=M();D(0),i(1,"input",31),x("ngModelChange",function(t){_(o);let n=c().$implicit;return b(n.Selected,t)||(n.Selected=t),g(t)}),w("ngModelChange",function(){_(o);let t=c(3).ngIf,n=c();return g(n.onSelectReadyToShip(t))}),a(),E()}if(r&2){let o=c().$implicit;l(),y("ngModel",o.Selected)}}function Vi(r,m){if(r&1&&(i(0,"a",44),p(1),a()),r&2){let o=c().$implicit;d("routerLink",te(3,Ni))("queryParams",ie(4,Mi,o.Number,o.Outlet)),l(),f(o.Number)}}function Fi(r,m){if(r&1&&(i(0,"a",45),p(1),a()),r&2){let o=c().$implicit,e=c(3);d("href",e.domain+o.ID,L),l(),f(o.Number)}}function Ai(r,m){if(r&1){let o=M();i(0,"a",46),w("click",function(){_(o);let t=c().$implicit,n=c(3);return g(n.onPrintShippingLabel(t.Number,t.ShopID,t.TypeID))}),S(1,"i",47),a()}}function Ri(r,m){if(r&1&&(i(0,"tr")(1,"td"),u(2,Li,2,1,"ng-container",4),a(),i(3,"td"),p(4),a(),i(5,"td"),u(6,Vi,2,7,"a",39)(7,Fi,2,2,"a",40),a(),i(8,"td"),p(9),a(),i(10,"td"),p(11),P(12,"number"),a(),i(13,"td"),p(14),P(15,"date"),a(),i(16,"td"),S(17,"app-channel-logo",41),a(),i(18,"td",42),u(19,Ai,2,0,"a",43),a()()),r&2){let o=m.$implicit,e=c(3);l(2),d("ngIf",o.TypeID==e.channelType.Shopee||o.TypeID==e.channelType.Tokopedia||o.TypeID==e.channelType.Tiktok),l(2),f(o.Outlet),l(2),d("ngIf",e.guidEmpty==o.ID),l(),d("ngIf",e.guidEmpty!=o.ID),l(2),f(o.Customer),l(2),f(O(12,9,o.Amount)),l(3),f(A(15,11,o.Date,"dd MMM yyyy")),l(3),d("typeId",o.TypeID),l(2),d("ngIf",o.TypeID==e.channelType.Shopee||o.TypeID==e.channelType.Tokopedia||o.TypeID==e.channelType.Tiktok||o.TypeID==e.channelType.Lazada)}}function Wi(r,m){if(r&1){let o=M();D(0),i(1,"div",26)(2,"table",27),w("matSortChange",function(t){_(o);let n=c(2);return g(n.onSort(t))}),i(3,"thead",28)(4,"tr",29)(5,"th",30)(6,"input",31),x("ngModelChange",function(t){_(o);let n=c(2);return b(n.isCheckAll,t)||(n.isCheckAll=t),g(t)}),w("ngModelChange",function(){_(o);let t=c().ngIf,n=c();return g(n.onSelectAllReadyToShip(t))}),a()(),i(7,"th",32),p(8,"Outlet"),a(),i(9,"th",33),p(10,"Order number"),a(),i(11,"th"),p(12,"Customer"),a(),i(13,"th",34),p(14,"Amount"),a(),i(15,"th",35),p(16,"Date"),a(),i(17,"th",36),p(18,"Channel"),a(),S(19,"th",37),a()(),i(20,"tbody"),u(21,Ri,20,14,"tr",20),a()(),i(22,"app-mat-paginator-no-count",38),P(23,"async"),P(24,"async"),w("total",function(){_(o);let t=c(2);return g(t.getRowCount())})("next",function(){_(o);let t=c(2);return g(t.NextPage())})("previous",function(){_(o);let t=c(2);return g(t.PreviousPage())}),a()(),E()}if(r&2){let o,e=c().ngIf,t=c();l(6),y("ngModel",t.isCheckAll),l(15),d("ngForOf",e),l(),d("filter",t.filter)("totaldata",(o=O(23,5,t.readyToShip$))==null?null:o.length)("paginationTotal",O(24,7,t.paginationTotal$))}}function Bi(r,m){if(r&1&&(D(0),u(1,Wi,25,9,"ng-container",25),E()),r&2){let o=m.ngIf;c();let e=k(35);l(),d("ngIf",o.length>0)("ngIfElse",e)}}function zi(r,m){r&1&&(i(0,"div",48),S(1,"app-empty-state"),a())}function Gi(r,m){r&1&&(D(0),i(1,"div",50),p(2,"\xA0"),a(),E())}function ji(r,m){if(r&1&&(D(0),S(1,"app-shipping-label",49),u(2,Gi,3,0,"ng-container",4),E()),r&2){let o=m.$implicit,e=m.index,t=c();l(),d("shippingLabel",o)("id",e),l(),d("ngIf",e!==(t.shippingLabels==null?null:t.shippingLabels.length)-1)}}var Zt=(()=>{let m=class m{constructor(e,t,n,h,C,s){this.http=e,this.localDataService=t,this.dialog=n,this.shippingLabelService=h,this.datePipe=C,this.authService=s,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.channelType=I,this.guidEmpty=N.GuidEMpty,this.selectedReadyToShip=[],this.isCheckAll=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.getReadyToShip()})}getReadyToShip(e){var t={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.sourceObs$=this.http.post("api/orders/GetReadyToShip",t).pipe(U(n=>n.Data),ge(1)),this.readyToShip$=this.sourceObs$}onPrintMultipleShippingLabel(){let e=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Tokopedia),t=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Shopee),n=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Tiktok),h=[];e.length>0&&h.push(this.shippingLabelService.getTokopediaShippingLabel(this.shippingLabelPayload(e))),t.length>0&&h.push(this.shippingLabelService.getShopeeShippingLabel(this.shippingLabelPayload(t))),n.length>0&&h.push(this.shippingLabelService.getTiktokShippingLabel(this.shippingLabelPayload(n))),et(h).pipe(U(C=>C.reduce((s,Pe)=>s.concat(Pe),[]))).subscribe({next:C=>{this.shippingLabels=C,this.printShippingLabel()}})}filterReadyToShipByChannel(e,t){return e.filter(n=>n.TypeID==t)}shippingLabelPayload(e){return e.map(t=>({ShopID:t.ShopID,OrderNumber:t.Number}))}printShippingLabel(){setTimeout(()=>{this.setPdfname(),window.print()},500)}onPrintShippingLabel(e,t,n){switch(n){case I.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e);break;case I.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e,t);break;case I.Shopee:this.shippingLabelService.printShippingLabelShopee(e,t);break;case I.Lazada:this.shippingLabelService.printShippingLabelLazada(e,t);break}}setPdfname(){if(this.selectedReadyToShip.length>1){let e=new Date,t=this.datePipe.transform(e,"dd-MM-yyyy"),n=this.datePipe.transform(e,"HH-mm");document.title=`ShippingLabel_${t}_${n}`}else{let e=this.selectedReadyToShip[0].Number;document.title=`ShippingLabel_${e}`}}getSelectedReadyToShip(e){return e.filter(t=>t.Selected)}getRowCount(){var e={PaymentState:"Unpaid",DeliveryState:"Unsent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.paginationTotal$=this.http.post("api/orders/GetRowCount",e).pipe(U(t=>t?.Total))}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getReadyToShip()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getReadyToShip()}onSort(e){if(e.direction==""){this.readyToShip$=this.sourceObs$;return}if(e.active=="date"){let t=e.direction=="asc";this.readyToShip$=this.readyToShip$.pipe(U(n=>n.sort((h,C)=>N.compare(h.Date,C.Date,t))))}}onSelectReadyToShip(e){this.selectedReadyToShip=this.getSelectedReadyToShip(e)}onSelectAllReadyToShip(e){e=e.map(t=>((t.TypeID==I.Tokopedia||t.TypeID==I.Shopee||t.TypeID==I.Lazada)&&(t.Selected=this.isCheckAll),t)),this.selectedReadyToShip=this.getSelectedReadyToShip(e)}};m.\u0275fac=function(t){return new(t||m)(T(B),T(de),T(we),T(Ue),T(F),T(J))},m.\u0275cmp=V({type:m,selectors:[["app-ready-to-ship"]],decls:38,vars:13,consts:[["EMPTY_STATE",""],["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],[1,"print_containers"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","date",2,"width","130px"],[2,"width","114px"],[2,"width","10px"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],["title","Print shipping label",3,"click"],[1,"fa-solid","fa-print","fs-3","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"shippingLabel","id"],[1,"page-break"]],template:function(t,n){if(t&1){let h=M();i(0,"mainpanel",1),w("onSubmit",function(s){return _(h),g(n.getReadyToShip(s))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),p(5,"Visit our Fulfillment Display System"),a()(),u(6,Oi,5,0,"ng-container",4),a(),i(7,"filters")(8,"div")(9,"label",5),p(10,"Channel"),a(),i(11,"ng-select",6),x("ngModelChange",function(s){return _(h),b(n.filter.ListChannelID,s)||(n.filter.ListChannelID=s),g(s)}),u(12,ki,3,3,"ng-template",7),a()(),i(13,"div",8)(14,"label",9),p(15,"Page Number"),a(),i(16,"input",10),x("ngModelChange",function(s){return _(h),b(n.filter.PageNumber,s)||(n.filter.PageNumber=s),g(s)}),a()(),i(17,"div",8)(18,"label",9),p(19,"Page Size"),a(),i(20,"input",11),x("ngModelChange",function(s){return _(h),b(n.filter.PageSize,s)||(n.filter.PageSize=s),g(s)}),a()(),i(21,"div",8)(22,"label",12),p(23,"From/To"),a(),i(24,"div",13)(25,"datepicker",14),x("dateChange",function(s){return _(h),b(n.filter.From,s)||(n.filter.From=s),g(s)}),a()(),i(26,"div")(27,"datepicker",15),x("dateChange",function(s){return _(h),b(n.filter.To,s)||(n.filter.To=s),g(s)}),a()()()(),i(28,"content")(29,"div",16)(30,"div",17)(31,"div",18),u(32,Bi,2,2,"ng-container",4),P(33,"async"),u(34,zi,2,0,"ng-template",null,0,z),a()()()()(),i(36,"div",19),u(37,ji,3,3,"ng-container",20),a()}t&2&&(l(6),d("ngIf",n.selectedReadyToShip.length>0),l(5),d("clearable",!0)("multiple",!0)("items",n.channelOptions),y("ngModel",n.filter.ListChannelID),l(5),y("ngModel",n.filter.PageNumber),l(4),y("ngModel",n.filter.PageSize),l(5),y("date",n.filter.From),l(2),y("date",n.filter.To),l(5),d("ngIf",O(33,11,n.readyToShip$)),l(5),d("ngForOf",n.shippingLabels))},dependencies:[R,W,K,ne,ze,G,j,H,q,$,ae,re,X,me,se,le,pe,Q,Ye,ye,Y,F],styles:[".print_containers[_ngcontent-%COMP%]{display:none}@media print{.print_containers[_ngcontent-%COMP%]{display:block}}@media print{.page-break[_ngcontent-%COMP%]{page-break-after:always}}"]});let r=m;return r})();var Hi=()=>["/menu/Order/detail"],Ui=(r,m)=>({Number:r,Outlet:m});function Yi(r,m){if(r&1&&(i(0,"span",19),S(1,"img",20),a(),p(2)),r&2){let o=m.item;l(),d("src",o==null?null:o.Img,L)("alt",o.Name),l(),v(" ",o.Name," ")}}function qi(r,m){if(r&1&&(i(0,"a",35),p(1),a()),r&2){let o=c().$implicit;d("routerLink",te(3,Hi))("queryParams",ie(4,Ui,o.Number,o.Outlet)),l(),f(o.Number)}}function Ki(r,m){if(r&1&&(i(0,"a",36),p(1),a()),r&2){let o=c().$implicit,e=c(2);d("href",e.domain+o.ID,L),l(),f(o.Number)}}function Ji(r,m){if(r&1&&(i(0,"tr")(1,"td"),p(2),a(),i(3,"td"),u(4,qi,2,7,"a",32)(5,Ki,2,2,"a",33),a(),i(6,"td"),p(7),a(),i(8,"td"),p(9),P(10,"number"),a(),i(11,"td"),p(12),P(13,"date"),a(),i(14,"td"),S(15,"app-channel-logo",34),a()()),r&2){let o=m.$implicit,e=c(2);l(2),f(o.Outlet),l(2),d("ngIf",e.hasGuidEmpty(o.ID)),l(),d("ngIf",!e.hasGuidEmpty(o.ID)),l(2),f(o.Customer),l(2),f(O(10,7,o.Amount)),l(3),f(A(13,9,o.Created,"dd MMM yyyy HH:mm")),l(3),d("typeId",o.TypeID)}}function $i(r,m){if(r&1){let o=M();D(0),i(1,"div",21)(2,"table",22),w("matSortChange",function(t){_(o);let n=c();return g(n.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),p(6,"Outlet"),a(),i(7,"th",26),p(8,"Order number"),a(),i(9,"th"),p(10,"Customer"),a(),i(11,"th",27),p(12,"Amount"),a(),i(13,"th",28),p(14," Created On "),a(),i(15,"th",29),p(16,"Channel"),a()()(),i(17,"tbody"),u(18,Ji,16,12,"tr",30),a()(),i(19,"app-mat-paginator-no-count",31),w("total",function(){_(o);let t=c();return g(t.StoreRowsCountAPIResult())})("next",function(){_(o);let t=c();return g(t.NextPage())})("previous",function(){_(o);let t=c();return g(t.PreviousPage())}),a()(),E()}if(r&2){let o=c();l(18),d("ngForOf",o.data),l(),d("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function Xi(r,m){r&1&&(i(0,"div",37),S(1,"app-empty-state"),a())}var ei=(()=>{let m=class m{constructor(e,t,n){this.http=e,this.localDataService=t,this.authService=n,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=I,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}hasGuidEmpty(e){return e==N.GuidEMpty}Get(e){var t={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetShipped",t).subscribe(n=>{this.data=n.Data,this.sourceData=[...n.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"Unpaid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let t=e.direction=="asc";this.data=this.data.sort((n,h)=>N.compare(n.Created,h.Created,t))}}};m.\u0275fac=function(t){return new(t||m)(T(B),T(de),T(J))},m.\u0275cmp=V({type:m,selectors:[["app-shipped"]],decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(t,n){if(t&1){let h=M();i(0,"mainpanel",1),w("onSubmit",function(s){return _(h),g(n.Get(s))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),p(5,"Visit our Fulfillment Display System"),a()()(),i(6,"filters")(7,"div")(8,"label",4),p(9,"Channel"),a(),i(10,"ng-select",5),x("ngModelChange",function(s){return _(h),b(n.filter.ListChannelID,s)||(n.filter.ListChannelID=s),g(s)}),u(11,Yi,3,3,"ng-template",6),a()(),i(12,"div",7)(13,"label",8),p(14,"Page Number"),a(),i(15,"input",9),x("ngModelChange",function(s){return _(h),b(n.filter.PageNumber,s)||(n.filter.PageNumber=s),g(s)}),a()(),i(16,"div",7)(17,"label",8),p(18,"Page Size"),a(),i(19,"input",10),x("ngModelChange",function(s){return _(h),b(n.filter.PageSize,s)||(n.filter.PageSize=s),g(s)}),a()(),i(20,"div",7)(21,"label",11),p(22,"From/To"),a(),i(23,"div",12)(24,"datepicker",13),x("dateChange",function(s){return _(h),b(n.filter.From,s)||(n.filter.From=s),g(s)}),a()(),i(25,"div")(26,"datepicker",14),x("dateChange",function(s){return _(h),b(n.filter.To,s)||(n.filter.To=s),g(s)}),a()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,$i,20,4,"ng-container",18)(32,Xi,2,0,"ng-template",null,0,z),a()()()()()}if(t&2){let h=k(33);l(10),d("clearable",!0)("multiple",!0)("items",n.channelOptions),y("ngModel",n.filter.ListChannelID),l(5),y("ngModel",n.filter.PageNumber),l(4),y("ngModel",n.filter.PageSize),l(5),y("date",n.filter.From),l(2),y("date",n.filter.To),l(5),d("ngIf",n.data&&n.data.length>0)("ngIfElse",h)}},dependencies:[R,W,K,ne,G,j,H,q,$,ae,re,X,me,se,le,pe,Q,Y,F]});let r=m;return r})();var Qi=()=>["/menu/Order/detail"],Zi=(r,m)=>({Number:r,Outlet:m});function en(r,m){if(r&1&&(i(0,"span",19),S(1,"img",20),a(),p(2)),r&2){let o=m.item;l(),d("src",o==null?null:o.Img,L)("alt",o.Name),l(),v(" ",o.Name," ")}}function tn(r,m){if(r&1&&(i(0,"a",35),p(1),a()),r&2){let o=c().$implicit;d("routerLink",te(3,Qi))("queryParams",ie(4,Zi,o.Number,o.Outlet)),l(),f(o.Number)}}function nn(r,m){if(r&1&&(i(0,"a",36),p(1),a()),r&2){let o=c().$implicit,e=c(2);d("href",e.customerInfoUrl+o.ID,L),l(),f(o.Number)}}function an(r,m){if(r&1&&(i(0,"tr")(1,"td"),p(2),a(),i(3,"td"),u(4,tn,2,7,"a",32)(5,nn,2,2,"a",33),a(),i(6,"td"),p(7),a(),i(8,"td"),p(9),P(10,"number"),a(),i(11,"td"),p(12),P(13,"date"),a(),i(14,"td"),S(15,"app-channel-logo",34),a()()),r&2){let o=m.$implicit,e=c(2);l(2),f(o.Outlet),l(2),d("ngIf",e.hasGuidEmpty(o.ID)),l(),d("ngIf",!e.hasGuidEmpty(o.ID)),l(2),f(o.Customer),l(2),f(O(10,7,o.Amount)),l(3),f(A(13,9,o.Created,"dd MMM yyyy HH:mm")),l(3),d("typeId",o.TypeID)}}function rn(r,m){if(r&1){let o=M();D(0),i(1,"div",21)(2,"table",22),w("matSortChange",function(t){_(o);let n=c();return g(n.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),p(6,"Outlet"),a(),i(7,"th",26),p(8,"Order number"),a(),i(9,"th"),p(10,"Customer"),a(),i(11,"th",27),p(12,"Amount"),a(),i(13,"th",28),p(14," Created On "),a(),i(15,"th",29),p(16,"Channel"),a()()(),i(17,"tbody"),u(18,an,16,12,"tr",30),a()(),i(19,"app-mat-paginator-no-count",31),w("total",function(){_(o);let t=c();return g(t.StoreRowsCountAPIResult())})("next",function(){_(o);let t=c();return g(t.NextPage())})("previous",function(){_(o);let t=c();return g(t.PreviousPage())}),a()(),E()}if(r&2){let o=c();l(18),d("ngForOf",o.data),l(),d("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function on(r,m){r&1&&(i(0,"div",37),S(1,"app-empty-state"),a())}var ti=(()=>{let m=class m{constructor(e,t){this.http=e,this.authService=t,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=I,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}getChannelLogo(e){return N.getChannelLogoByTypeId(e)}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.customerInfoUrl=`${this.authService.getDomain()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var t={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetDelivered ",t).subscribe(n=>{this.data=n.Data,this.sourceData=[...n.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"Paid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let t=e.direction=="asc";this.data=this.data.sort((n,h)=>N.compare(n.Created,h.Created,t))}}};m.\u0275fac=function(t){return new(t||m)(T(B),T(J))},m.\u0275cmp=V({type:m,selectors:[["app-delivered"]],decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(t,n){if(t&1){let h=M();i(0,"mainpanel",1),w("onSubmit",function(s){return _(h),g(n.Get(s))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),p(5,"Visit our Fulfillment Display System"),a()()(),i(6,"filters")(7,"div")(8,"label",4),p(9,"Channel"),a(),i(10,"ng-select",5),x("ngModelChange",function(s){return _(h),b(n.filter.ListChannelID,s)||(n.filter.ListChannelID=s),g(s)}),u(11,en,3,3,"ng-template",6),a()(),i(12,"div",7)(13,"label",8),p(14,"Page Number"),a(),i(15,"input",9),x("ngModelChange",function(s){return _(h),b(n.filter.PageNumber,s)||(n.filter.PageNumber=s),g(s)}),a()(),i(16,"div",7)(17,"label",8),p(18,"Page Size"),a(),i(19,"input",10),x("ngModelChange",function(s){return _(h),b(n.filter.PageSize,s)||(n.filter.PageSize=s),g(s)}),a()(),i(20,"div",7)(21,"label",11),p(22,"From/To"),a(),i(23,"div",12)(24,"datepicker",13),x("dateChange",function(s){return _(h),b(n.filter.From,s)||(n.filter.From=s),g(s)}),a()(),i(25,"div")(26,"datepicker",14),x("dateChange",function(s){return _(h),b(n.filter.To,s)||(n.filter.To=s),g(s)}),a()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,rn,20,4,"ng-container",18)(32,on,2,0,"ng-template",null,0,z),a()()()()()}if(t&2){let h=k(33);l(10),d("clearable",!0)("multiple",!0)("items",n.channelOptions),y("ngModel",n.filter.ListChannelID),l(5),y("ngModel",n.filter.PageNumber),l(4),y("ngModel",n.filter.PageSize),l(5),y("date",n.filter.From),l(2),y("date",n.filter.To),l(5),d("ngIf",n.data&&n.data.length>0)("ngIfElse",h)}},dependencies:[R,W,K,ne,G,j,H,q,$,ae,re,X,me,se,le,pe,Q,Y,F]});let r=m;return r})();var ln=()=>["/menu/Order/detail"],pn=(r,m)=>({Number:r,Outlet:m});function mn(r,m){if(r&1&&(i(0,"span",21),S(1,"img",22),a(),p(2)),r&2){let o=m.item;l(),d("src",o==null?null:o.Img,L)("alt",o.Name),l(),v(" ",o.Name," ")}}function sn(r,m){if(r&1&&(i(0,"a",38),p(1),a()),r&2){let o=c().$implicit;d("routerLink",te(3,ln))("queryParams",ie(4,pn,o.Number,o.Outlet)),l(),f(o.Number)}}function dn(r,m){if(r&1&&(i(0,"a",39),p(1),a()),r&2){let o=c().$implicit,e=c(2);d("href",e.domain+o.ID,L),l(),f(o.Number)}}function cn(r,m){if(r&1&&(i(0,"tr")(1,"td"),p(2),a(),i(3,"td"),u(4,sn,2,7,"a",35)(5,dn,2,2,"a",36),a(),i(6,"td"),p(7),a(),i(8,"td"),p(9),P(10,"number"),a(),i(11,"td"),p(12),P(13,"date"),a(),i(14,"td"),p(15),a(),i(16,"td"),S(17,"app-channel-logo",37),a()()),r&2){let o=m.$implicit,e=c(2);l(2),f(o.Outlet),l(2),d("ngIf",e.hasGuidEmpty(o.ID)),l(),d("ngIf",!e.hasGuidEmpty(o.ID)),l(2),f(o.Customer),l(2),f(O(10,8,o.Amount)),l(3),f(A(13,10,o.Created,"dd MMM yyyy HH:mm")),l(3),f(o.State),l(2),d("typeId",o.TypeID)}}function hn(r,m){if(r&1){let o=M();D(0),i(1,"div",23)(2,"table",24),w("matSortChange",function(t){_(o);let n=c();return g(n.onSort(t))}),i(3,"thead",25)(4,"tr",26)(5,"th",27),p(6,"Outlet"),a(),i(7,"th",28),p(8,"Order number"),a(),i(9,"th"),p(10,"Customer"),a(),i(11,"th",29),p(12,"Amount"),a(),i(13,"th",30),p(14," Created On "),a(),i(15,"th",31),p(16,"Status"),a(),i(17,"th",32),p(18,"Channel"),a()()(),i(19,"tbody"),u(20,cn,18,13,"tr",33),a()(),i(21,"app-mat-paginator-no-count",34),w("total",function(){_(o);let t=c();return g(t.StoreRowsCountAPIResult())})("next",function(){_(o);let t=c();return g(t.NextPage())})("previous",function(){_(o);let t=c();return g(t.PreviousPage())}),a()(),E()}if(r&2){let o=c();l(20),d("ngForOf",o.data),l(),d("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function _n(r,m){r&1&&(i(0,"div",40),S(1,"app-empty-state"),a())}var ii=(()=>{let m=class m{constructor(e,t,n,h){this.http=e,this.localDataService=t,this.authService=n,this.dialog=h,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var t={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetAll",t).subscribe(n=>{this.data=n.Data,this.sourceData=[...n.Data],this.totaldata=this.data.length})}openExportDialog(){this.dialog.open(At,{data:{title:"Export Order All",pageNumber:this.filter.PageNumber,rowCount:this.filter.PageSize,filterExport:this.filter,getRowCountApi:"orders/GetRowCount",exportApi:"orders/GetExportAll"}}).afterClosed().subscribe()}changePage(e){this.filter=e,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"",DeliveryState:"",Bin:!1,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let t=e.direction=="asc";this.data=this.data.sort((n,h)=>N.compare(n.Created,h.Created,t))}}};m.\u0275fac=function(t){return new(t||m)(T(B),T(de),T(J),T(we))},m.\u0275cmp=V({type:m,selectors:[["app-all-order"]],decls:38,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","135px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(t,n){if(t&1){let h=M();i(0,"mainpanel",1),w("onSubmit",function(s){return _(h),g(n.Get(s))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),p(5,"Visit our Fulfillment Display System"),a()(),i(6,"button",4),w("click",function(){return _(h),g(n.openExportDialog())}),S(7,"i",5),i(8,"span"),p(9,"Export"),a()()(),i(10,"filters")(11,"div")(12,"label",6),p(13,"Channel"),a(),i(14,"ng-select",7),x("ngModelChange",function(s){return _(h),b(n.filter.ListChannelID,s)||(n.filter.ListChannelID=s),g(s)}),u(15,mn,3,3,"ng-template",8),a()(),i(16,"div",9)(17,"label",10),p(18,"Page Number"),a(),i(19,"input",11),x("ngModelChange",function(s){return _(h),b(n.filter.PageNumber,s)||(n.filter.PageNumber=s),g(s)}),a()(),i(20,"div",9)(21,"label",10),p(22,"Page Size"),a(),i(23,"input",12),x("ngModelChange",function(s){return _(h),b(n.filter.PageSize,s)||(n.filter.PageSize=s),g(s)}),a()(),i(24,"div",9)(25,"label",13),p(26,"From/To"),a(),i(27,"div",14)(28,"datepicker",15),x("dateChange",function(s){return _(h),b(n.filter.From,s)||(n.filter.From=s),g(s)}),a()(),i(29,"div")(30,"datepicker",16),x("dateChange",function(s){return _(h),b(n.filter.To,s)||(n.filter.To=s),g(s)}),a()()()(),i(31,"content")(32,"div",17)(33,"div",18)(34,"div",19),u(35,hn,22,4,"ng-container",20)(36,_n,2,0,"ng-template",null,0,z),a()()()()()}if(t&2){let h=k(37);l(14),d("clearable",!0)("multiple",!0)("items",n.channelOptions),y("ngModel",n.filter.ListChannelID),l(5),y("ngModel",n.filter.PageNumber),l(4),y("ngModel",n.filter.PageSize),l(5),y("date",n.filter.From),l(2),y("date",n.filter.To),l(5),d("ngIf",n.data&&n.data.length>0)("ngIfElse",h)}},dependencies:[R,W,K,ne,G,j,H,q,$,ae,re,X,me,se,le,pe,Q,Y,F]});let r=m;return r})();var gn=()=>["/menu/Order/detail"],un=(r,m)=>({Number:r,Outlet:m});function fn(r,m){if(r&1&&(i(0,"span",20),S(1,"img",21),a(),p(2)),r&2){let o=m.item;l(),d("src",o==null?null:o.Img,L)("alt",o.Name),l(),v(" ",o.Name," ")}}function Sn(r,m){if(r&1&&(i(0,"a",36),p(1),a()),r&2){let o=c().$implicit;d("routerLink",te(3,gn))("queryParams",ie(4,un,o.Number,o.Outlet)),l(),f(o.Number)}}function Cn(r,m){if(r&1&&(i(0,"a",37),p(1),a()),r&2){let o=c().$implicit,e=c(2);d("href",e.domain+o.ID,L),l(),f(o.Number)}}function yn(r,m){if(r&1&&(i(0,"tr")(1,"td"),p(2),a(),i(3,"td"),u(4,Sn,2,7,"a",33)(5,Cn,2,2,"a",34),a(),i(6,"td"),p(7),a(),i(8,"td"),p(9),P(10,"number"),a(),i(11,"td"),p(12),P(13,"date"),a(),i(14,"td"),S(15,"app-channel-logo",35),a()()),r&2){let o=m.$implicit,e=c(2);l(2),f(o.Outlet),l(2),d("ngIf",e.hasGuidEmpty(o.ID)),l(),d("ngIf",!e.hasGuidEmpty(o.ID)),l(2),f(o.Customer),l(2),f(O(10,7,o.Amount)),l(3),f(A(13,9,o.Created,"dd MMM yyyy HH:mm")),l(3),d("typeId",o.TypeID)}}function bn(r,m){if(r&1){let o=M();D(0),i(1,"div",22)(2,"table",23),w("matSortChange",function(t){_(o);let n=c();return g(n.onSort(t))}),i(3,"thead",24)(4,"tr",25)(5,"th",26),p(6,"Outlet"),a(),i(7,"th",27),p(8,"Order number"),a(),i(9,"th"),p(10,"Customer"),a(),i(11,"th",28),p(12,"Amount"),a(),i(13,"th",29),p(14," Created On "),a(),i(15,"th",30),p(16,"Channel"),a()()(),i(17,"tbody"),u(18,yn,16,12,"tr",31),a()(),i(19,"app-mat-paginator-no-count",32),w("total",function(){_(o);let t=c();return g(t.StoreRowsCountAPIResult())})("next",function(){_(o);let t=c();return g(t.NextPage())})("previous",function(){_(o);let t=c();return g(t.PreviousPage())}),a()(),E()}if(r&2){let o=c();l(18),d("ngForOf",o.data),l(),d("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function xn(r,m){r&1&&(i(0,"div",38),S(1,"app-empty-state"),a())}var ni=(()=>{let m=class m{constructor(e,t,n){this.http=e,this.localDataService=t,this.authService=n,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],Note:"",From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var t={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,Note:this.filter.Note,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetCancelled ",t).subscribe(n=>{this.data=n.Data,this.sourceData=[...n.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"",DeliveryState:"",Bin:!0,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}getChannelLogo(e){return N.getChannelLogoByTypeId(e)}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let t=e.direction=="asc";this.data=this.data.sort((n,h)=>N.compare(n.Created,h.Created,t))}}};m.\u0275fac=function(t){return new(t||m)(T(B),T(de),T(J))},m.\u0275cmp=V({type:m,selectors:[["app-cancelled"]],decls:38,vars:11,consts:[["EMPTY_STATE",""],["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","Note",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(t,n){if(t&1){let h=M();i(0,"mainpanel",1),w("onSubmit",function(s){return _(h),g(n.Get(s))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),p(5,"Visit our Fulfillment Display System"),a()()(),i(6,"filters")(7,"div")(8,"label",4),p(9,"Channel"),a(),i(10,"ng-select",5),x("ngModelChange",function(s){return _(h),b(n.filter.ListChannelID,s)||(n.filter.ListChannelID=s),g(s)}),u(11,fn,3,3,"ng-template",6),a()(),i(12,"div",7)(13,"label",8),p(14,"Page Number"),a(),i(15,"input",9),x("ngModelChange",function(s){return _(h),b(n.filter.PageNumber,s)||(n.filter.PageNumber=s),g(s)}),a()(),i(16,"div",7)(17,"label",8),p(18,"Page Size"),a(),i(19,"input",10),x("ngModelChange",function(s){return _(h),b(n.filter.PageSize,s)||(n.filter.PageSize=s),g(s)}),a()(),i(20,"div",7)(21,"label",8),p(22,"Note"),a(),i(23,"input",11),x("ngModelChange",function(s){return _(h),b(n.filter.Note,s)||(n.filter.Note=s),g(s)}),a()(),i(24,"div",7)(25,"label",12),p(26,"From/To"),a(),i(27,"div",13)(28,"datepicker",14),x("dateChange",function(s){return _(h),b(n.filter.From,s)||(n.filter.From=s),g(s)}),a()(),i(29,"div")(30,"datepicker",15),x("dateChange",function(s){return _(h),b(n.filter.To,s)||(n.filter.To=s),g(s)}),a()()()(),i(31,"content")(32,"div",16)(33,"div",17)(34,"div",18),u(35,bn,20,4,"ng-container",19)(36,xn,2,0,"ng-template",null,0,z),a()()()()()}if(t&2){let h=k(37);l(10),d("clearable",!0)("multiple",!0)("items",n.channelOptions),y("ngModel",n.filter.ListChannelID),l(5),y("ngModel",n.filter.PageNumber),l(4),y("ngModel",n.filter.PageSize),l(4),y("ngModel",n.filter.Note),l(5),y("date",n.filter.From),l(2),y("date",n.filter.To),l(5),d("ngIf",n.data&&n.data.length>0)("ngIfElse",h)}},dependencies:[R,W,K,ne,G,j,H,q,$,ae,re,X,me,se,le,pe,Q,Y,F]});let r=m;return r})();var wn=(r,m)=>({"over-due-today":r,"over-due":m}),vn=r=>({"over-due":r});function Tn(r,m){r&1&&(D(0),i(1,"a",19),p(2," Download V2 "),a(),E())}function Dn(r,m){if(r&1){let o=M();D(0),i(1,"div",20)(2,"button",21),w("click",function(){_(o),c();let t=k(12);return g(t.previous())}),p(3," Back "),a(),i(4,"button",22),w("click",function(){_(o);let t=c(),n=k(12);return g(t.onNext(n))}),p(5," Next "),a()(),E()}if(r&2){let o=c();l(4),d("disabled",o.checkDisabledNextFilter())}}function En(r,m){if(r&1){let o=M();D(0),i(1,"button",23),w("click",function(){_(o);let t=c(),n=k(12);return g(t.onNext(n))}),p(2," Next "),a(),E()}if(r&2){let o=c();l(),d("disabled",o.checkDisabledNextFilter())}}function Pn(r,m){if(r&1){let o=M();D(0),i(1,"button",24),w("click",function(){_(o);let t=c(),n=k(12);return g(t.onNew(n))}),S(2,"i",25),p(3," New "),a(),E()}}function In(r,m){r&1&&(S(0,"i",26),i(1,"span"),p(2,"Filter"),a())}function Nn(r,m){if(r&1&&(i(0,"ng-option",36),S(1,"img",37),p(2),a()),r&2){let o=m.$implicit;d("value",o.ID),l(),d("src",o==null?null:o.Img,L),l(),v("",o.Name," ")}}function Mn(r,m){if(r&1){let o=M();i(0,"div",32)(1,"div",28)(2,"h5"),p(3,"Type"),a(),i(4,"p",29),p(5," Select Type want to download "),a()(),i(6,"div",28)(7,"div",38)(8,"div")(9,"mat-radio-group",39),x("ngModelChange",function(t){_(o);let n=c(2);return b(n.downloadType,t)||(n.downloadType=t),g(t)}),i(10,"mat-radio-button",40),p(11," Orders "),a(),i(12,"mat-radio-button",41),p(13," Disbursement "),a()()()(),i(14,"div",42)(15,"div",43),S(16,"i",44),a(),i(17,"p",45),p(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(r&2){let o=c(2);l(9),y("ngModel",o.downloadType),l(),d("value",!1),l(2),d("value",!0)}}function On(r,m){r&1&&(i(0,"p",29),p(1," Select Disbursement date "),i(2,"span",46),p(3,"(payment date / order complete date)"),a(),p(4," of the channel you want to download (Max 1 Week). "),a())}function kn(r,m){r&1&&(i(0,"p",29),p(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function Ln(r,m){if(r&1){let o=M();D(0),i(1,"div",47)(2,"app-timepicker",48),x("timeChange",function(t){_(o);let n=c(2);return b(n.timeFrom,t)||(n.timeFrom=t),g(t)}),a(),i(3,"span",49),p(4,"-"),a(),i(5,"app-timepicker",48),x("timeChange",function(t){_(o);let n=c(2);return b(n.timeTo,t)||(n.timeTo=t),g(t)}),a()(),E()}if(r&2){let o=c(2);l(2),y("time",o.timeFrom),l(3),y("time",o.timeTo)}}function Vn(r,m){if(r&1){let o=M();i(0,"div",27)(1,"div",8)(2,"div",7)(3,"div",28)(4,"h5"),p(5,"Select a Channel"),a(),i(6,"p",29),p(7," Select Channel want to download order "),a()(),i(8,"div",28)(9,"ng-select",30),x("ngModelChange",function(t){_(o);let n=c();return b(n.channelID,t)||(n.channelID=t),g(t)}),w("ngModelChange",function(){_(o);let t=c();return g(t.onSelectChannel())}),u(10,Nn,3,3,"ng-option",31),a()()(),u(11,Mn,19,3,"div",32),P(12,"async"),i(13,"div",32)(14,"div",28)(15,"h5"),p(16,"Date Range"),a(),u(17,On,5,0,"p",29)(18,kn,2,0,"p",29),a(),i(19,"div",28)(20,"div",8)(21,"mat-date-range-input",33)(22,"input",34),x("ngModelChange",function(t){_(o);let n=c();return b(n.startDate,t)||(n.startDate=t),g(t)}),w("click",function(){_(o);let t=k(25);return g(t.open())}),a(),i(23,"input",35),x("ngModelChange",function(t){_(o);let n=c();return b(n.endDate,t)||(n.endDate=t),g(t)}),w("click",function(){_(o);let t=k(25);return g(t.open())})("ngModelChange",function(){_(o);let t=c();return g(t.onFilterDateChange())}),a()(),S(24,"mat-date-range-picker",null,1),a(),u(26,Ln,6,2,"ng-container",5),a()()()()}if(r&2){let o,e=k(25),t=c();l(9),d("clearable",!1),y("ngModel",t.channelID),l(),d("ngForOf",t.channelOptions),l(),Je((o=O(12,9,t.channelDetail$))!=null&&o.ServiceFeeWriteOff?11:-1),l(6),Je(t.downloadType()&&(t.currentChannel==null?null:t.currentChannel.TypeID)==t.channelType.Tokopedia?17:18),l(4),d("rangePicker",e),l(),y("ngModel",t.startDate),l(),y("ngModel",t.endDate),l(3),d("ngIf",t.showTimePicker)}}function Fn(r,m){r&1&&(S(0,"i",50),i(1,"span"),p(2,"Preview"),a())}function An(r,m){if(r&1&&(i(0,"th",72),p(1),a()),r&2){let o=c(3);l(),v(" ",o.currentChannel?"Created Date":"Last Status Update"," ")}}function Rn(r,m){if(r&1&&(i(0,"td"),p(1),P(2,"date"),a()),r&2){let o=c().$implicit;l(),v(" ",A(2,1,o.Date,"dd MMM yyyy HH:mm:ss")," ")}}function Wn(r,m){if(r&1&&(i(0,"span"),p(1),a()),r&2){let o=c().$implicit;l(),v(" ",o.ActionString," ")}}function Bn(r,m){if(r&1&&(i(0,"li"),p(1),a()),r&2){let o=m.$implicit;l(),v(" ",o," ")}}function zn(r,m){if(r&1&&(i(0,"ul",77),u(1,Bn,2,1,"li",73),a()),r&2){let o=c().$implicit;l(),d("ngForOf",o.ActionString)}}function Gn(r,m){if(r&1&&(i(0,"span",78),S(1,"i",79),a()),r&2){let o=c().$implicit;ot("title","Delivery : ",o.DeliveryState,`
5
5
  Payment : `,o.PaymentState,"")}}function jn(r,m){if(r&1&&(i(0,"tr")(1,"td"),p(2),a(),i(3,"td"),p(4),a(),u(5,Rn,3,4,"td",5),i(6,"td")(7,"span"),p(8),a(),p(9),a(),i(10,"td",74)(11,"span"),p(12),a(),p(13),a(),i(14,"td"),u(15,Wn,2,1,"span",5)(16,zn,2,1,"ul",75),a(),i(17,"td"),u(18,Gn,2,3,"span",76),a()()),r&2){let o=m.$implicit,e=m.index,t=c(4);l(2),f(e+1),l(2),f(o.Number),l(),d("ngIf",(t.currentChannel==null?null:t.currentChannel.TypeID)!=t.channelType.Shopee&&(t.currentChannel==null?null:t.currentChannel.TypeID)!==t.channelType.Tiktok),l(3),v("",o.ChannelStatus," - "),l(),v("",o.ChannelStatusDescription," "),l(),d("ngClass",ie(12,wn,(o==null?null:o.Action)==t.actionPreviewOrder.Update,(o==null?null:o.Action)==t.actionPreviewOrder.New))("matTooltip",o.POSStatus==91||o.POSStatusDescription=="Conflict"?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),l(2),v("",o.POSStatus," - "),l(),v("",o.POSStatusDescription," "),l(2),d("ngIf",o.ActionString.length==1),l(),d("ngIf",o.ActionString.length>1),l(2),d("ngIf",o.ChannelStatus!=99&&o.POSStatus!=99)}}function Hn(r,m){if(r&1&&(D(0),u(1,jn,19,15,"tr",73),E()),r&2){let o=c(3);l(),d("ngForOf",o.displayedPreviewData)}}function Un(r,m){r&1&&(i(0,"tr",80)(1,"td",81)(2,"div",82),S(3,"i",83),a(),i(4,"h4",84),p(5," There is no order to processed "),a()()())}function Yn(r,m){if(r&1){let o=M();i(0,"div",52)(1,"div",53)(2,"div",54)(3,"div",55)(4,"div")(5,"ul",56)(6,"li",57)(7,"button",58),w("click",function(){_(o);let t=c(2);return g(t.filterPreviewData(t.previewStatus.ALL))}),p(8),a()(),i(9,"li",59)(10,"button",60),w("click",function(){_(o);let t=c(2);return g(t.filterPreviewData(t.previewStatus.SYNC))}),p(11),a()(),i(12,"li",59)(13,"button",61),w("click",function(){_(o);let t=c(2);return g(t.filterPreviewData(t.previewStatus.WRONG))}),p(14),a()(),i(15,"li",59)(16,"button",62),w("click",function(){_(o);let t=c(2);return g(t.filterPreviewData(t.previewStatus.UNSYNC))}),p(17),a()()()(),i(18,"div")(19,"button",63),w("click",function(){_(o);let t=c(2);return g(t.exportOrders())}),S(20,"i",64),i(21,"span"),p(22,"Export"),a()()()()(),i(23,"table",65)(24,"thead",66)(25,"tr"),S(26,"th",67),i(27,"th",68),p(28,"Number"),a(),u(29,An,2,1,"th",69),i(30,"th",70),p(31,"Channel Status"),a(),i(32,"th",70),p(33,"POS Status"),a(),i(34,"th"),p(35,"Action"),a(),S(36,"th",67),a()(),i(37,"tbody"),u(38,Hn,2,1,"ng-container",71)(39,Un,6,0,"ng-template",null,2,z),a()()()()}if(r&2){let o=k(40),e=c(2);l(7),d("ngClass",e.pillStatus=="all"?"btn-secondary text-white":"btn-outline-dark"),l(),v(" All (",e.allData,") "),l(2),d("ngClass",e.pillStatus=="sync"?"btn-success":"btn-outline-success"),l(),v(" Existing (",e.syncData,") "),l(2),d("ngClass",e.pillStatus=="wrong"?"btn-warning text-white":"btn-outline-warning"),l(),v(" Wrong Status (",e.wrongData,") "),l(2),d("ngClass",e.pillStatus=="unsync"?"btn-danger":"btn-outline-danger"),l(),v(" Missing (",e.unsyncData,") "),l(12),d("ngIf",(e.currentChannel==null?null:e.currentChannel.TypeID)!=e.channelType.Shopee&&(e.currentChannel==null?null:e.currentChannel.TypeID)!==e.channelType.Tiktok),l(9),d("ngIf",e.displayedPreviewData.length>0)("ngIfElse",o)}}function qn(r,m){if(r&1&&u(0,Yn,41,11,"div",51),r&2){let o=c();d("ngIf",o.currentState=="preview")}}function Kn(r,m){r&1&&(S(0,"i",85),i(1,"span"),p(2,"Finish"),a())}function Jn(r,m){if(r&1&&(i(0,"tr",87)(1,"td"),p(2),a(),i(3,"td"),p(4),a(),i(5,"td"),p(6),a(),i(7,"td"),p(8),a()()),r&2){let o=m.$implicit,e=m.index;d("ngClass",mt(5,vn,o.Exception)),l(2),f(e+1),l(2),f(o.Number),l(2),f(o.Status),l(2),f(o.Exception)}}function $n(r,m){if(r&1&&(D(0),u(1,Jn,9,7,"tr",86),E()),r&2){let o=c(3);l(),d("ngForOf",o.downloadData)}}function Xn(r,m){r&1&&(i(0,"tr",80)(1,"td",81)(2,"div",82),S(3,"i",83),a(),i(4,"h4",84),p(5," There is no order to processed "),a()()())}function Qn(r,m){if(r&1&&(i(0,"div",52)(1,"div",53)(2,"table",65)(3,"thead",66)(4,"tr"),S(5,"th",67),i(6,"th"),p(7,"Order Number"),a(),i(8,"th"),p(9,"Status"),a(),i(10,"th"),p(11,"Exception"),a()()(),i(12,"tbody"),u(13,$n,2,1,"ng-container",71)(14,Xn,6,0,"ng-template",null,3,z),a()()()()),r&2){let o=k(15),e=c(2);l(13),d("ngIf",(e.downloadData==null?null:e.downloadData.length)>0)("ngIfElse",o)}}function Zn(r,m){if(r&1&&u(0,Qn,16,2,"div",51),r&2){let o=c();d("ngIf",o.currentState=="finish")}}function ea(r,m){r&1&&(i(0,"h6"),p(1,"1"),a())}function ta(r,m){r&1&&(i(0,"h6"),p(1,"2"),a())}function ia(r,m){r&1&&(i(0,"h6"),p(1,"3"),a())}var ee=function(r){return r.ALL="all",r.SYNC="sync",r.WRONG="wrong",r.UNSYNC="unsync",r}(ee||{}),ai=(()=>{let m=class m{constructor(e,t,n,h,C,s,Pe){this.http=e,this.toastr=t,this.datePipe=n,this.url=h,this.productService=C,this.orderService=s,this.authService=Pe,this.pageTitle="Download to POS",this.pillStatus="all",this.displayedPreviewData=[],this.previewData=[],this.channelType=I,this.previewStatus=ee,this.currentState="filter",this.wrongData=0,this.unsyncData=0,this.syncData=0,this.allData=0,this.actionPreviewOrder=Ie,this.cacheKey="",this.showTimePicker=!1,this.downloadType=at(!1),this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initTimeFilter(),this.url.queryParams.subscribe(e=>{this.channelID=e.ChannelID,this.startDate=new Date(e.Date),this.endDate=new Date(e.Date)})}initTimeFilter(){this.timeFrom="00:00",this.timeTo="23:59"}onDownload(e){let t={ID:this.channelID,From:this.startDate,To:this.endDate,ListPreview:this.downloadedPreviewData,IsDisbursement:this.downloadType(),cacheKey:this.cacheKey};this.http.post("/api/Orders/Download",t).subscribe(n=>{this.downloadData=n.Body,this.onStepperNext(e)})}onPreview(e){if(!this.validateDatePreview())return;let t={ID:this.channelID,From:this.startDate,To:this.endDate,IsDisbursement:this.downloadType()};this.showTimePicker&&(t=Ze(Qe({},t),{TimeFrom:this.timeFrom+":00",TimeTo:this.timeTo+":00"})),this.http.post("/api/Orders/Preview",t).subscribe(n=>{if(n.Data.length==0){this.toastrEmptyPreview();return}this.cacheKey=n.cacheKey,this.previewData=n.Data,this.groupingPreviewData(),this.filterPreviewData(ee.ALL),this.initLengthStatusData(),this.onStepperNext(e)})}toastrEmptyPreview(){let e=this.datePipe.transform(this.startDate,"dd MMM yyyy"),t=this.datePipe.transform(this.endDate,"dd MMM yyyy"),n=this.showTimePicker?this.timeFrom+":00":"",h=this.showTimePicker?this.timeTo+":00":"";this.toastr.info(`There is no orders from ${e} ${n} to ${t} ${h}!`,"No Orders!")}validateDatePreview(){let e=!0;return this.downloadType()==!0?N.getDaysDiff(this.startDate,this.endDate)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Failed"),e=!1):N.getDaysDiff(this.startDate,this.endDate)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Failed"),e=!1),e}onSelectChannel(){this.currentChannel=this.channelOptions.find(e=>e.ID==this.channelID),this.initGetChannelDetail()}initGetChannelDetail(){this.currentChannel.TypeID==I.Tokopedia?this.channelDetail$=this.http.post("/api/ChannelLoader/GetChannelView",{ID:this.currentChannel.ID}).pipe(U(e=>e?.Model),ge(1)):this.channelDetail$=null}setPageTitle(e){this.pageTitle=`
6
6
  ${e} (${this.getDateTitle()})
7
7
  `}getDateTitle(){let e=N.formatTitleFromDate(new Date(this.startDate),new Date(this.endDate)),t=this.datePipe.transform(this.startDate,e),n=this.datePipe.transform(this.endDate,"dd MMM yyyy");return`${e==null?"":t+"-"} ${n}`}onNew(e){this.channelID=null,this.startDate=null,this.endDate=null,this.pageTitle="Download to POS",this.channelDetail$=null,e.reset()}groupingPreviewData(){let e=this.filterDataByStatus(ee.UNSYNC),t=this.filterDataByStatus(ee.WRONG),n=[];this.currentChannel.TypeID==I.Tokopedia&&(n=this.filterDataByStatus(ee.SYNC)),this.downloadedPreviewData=[...n,...e,...t]}filterDataByStatus(e){let t=[];switch(e){case ee.ALL:t=this.previewData;break;case ee.SYNC:t=this.previewData.filter(n=>n.Action==Ie.DoNothing);break;case ee.WRONG:t=this.previewData.filter(n=>n.Action==Ie.Update);break;case ee.UNSYNC:t=this.previewData.filter(n=>n.Action==Ie.New);break}return t}filterPreviewData(e){this.pillStatus=e,this.displayedPreviewData=this.filterDataByStatus(e)}initLengthStatusData(){this.wrongData=this.filterDataByStatus(ee.WRONG).length,this.allData=this.previewData.length,this.syncData=this.filterDataByStatus(ee.SYNC).length,this.unsyncData=this.filterDataByStatus(ee.UNSYNC).length}getTypeID(){var e=this.channelOptions.find(t=>t.ID==this.channelID)?.TypeID;return e??0}onStepperChange(e){this.currentState=e.selectedStep.state}onStepperNext(e){e.selected.completed=!0,e.next()}onNext(e){switch(this.currentState){case"filter":this.onPreview(e);break;case"preview":this.onDownload(e);break}}stepChange(e){switch(e?.selectedStep?.state){case"filter":this.pageTitle="Download To POS",this.resetPreviewData();break;case"preview":let t=this.productService.findChannelById(this.channelID,this.channelOptions);this.setPageTitle(`Preview ${t?.Name}`);break;case"finish":this.setPageTitle("Download");break}}resetPreviewData(){this.displayedPreviewData=[],this.previewData=[],this.initLengthStatusData()}checkDisabledNextFilter(){let e=!N.isValidDate(this.startDate)||!N.isValidDate(this.endDate),t=N.IsEmpty(this.channelID);return e||t}exportOrders(){let e={ID:this.channelID,From:this.startDate,To:this.endDate},t=`Orders ${this.getDateTitle()}`;this.orderService.exportOrders(e,t).subscribe()}onFilterDateChange(){let e=1;this.startDate&&this.endDate&&(e=N.getDaysDiff(this.startDate,this.endDate)),this.showTimePicker=e==0}};m.\u0275fac=function(t){return new(t||m)(T(B),T(xe),T(F),T(We),T(Mt),T(ve),T(J))},m.\u0275cmp=V({type:m,selectors:[["app-download"]],features:[lt([{provide:Wt,useValue:{displayDefaultIndicatorType:!1}}])],decls:25,vars:13,consts:[["stepper",""],["picker",""],["EMPTY",""],["EMPTY_DOWNLOAD",""],[3,"headerTitle","description","hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["linear","",1,"w-100","stepper-download",3,"selectionChange","ngClass"],["state","filter",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","preview",3,"editable","completed"],["state","finish"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],["routerLink","/menu/Order/Download",1,"btn","btn-outline-secondary","btn-fill","me-3"],[1,"btn-group","me-3"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","bg-success","text-white",3,"click","disabled"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"click","disabled"],[1,"btn","btn-outline-secondary","btn-fill",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],[1,"fa-solid","fa-filter","me-3"],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-6"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[1,"mt-8"],[3,"timeChange","time"],[1,"mx-4"],[1,"fa-solid","fa-file","me-3"],["class","row pt-2",4,"ngIf"],[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"col-12","d-flex","justify-content-between","align-items-end",2,"padding-left","0px","padding-right","0px"],[1,"nav","nav-pills"],[1,"nav-item","me-3"],[1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],[1,"nav-item","mx-3"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%",4,"ngIf"],["width","10%"],[4,"ngIf","ngIfElse"],["width","15%"],[4,"ngFor","ngForOf"],["matTooltipClass","custom-width-tooltip",3,"ngClass","matTooltip"],["class","ps-5",4,"ngIf"],[3,"title",4,"ngIf"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"]],template:function(t,n){if(t&1){let h=M();i(0,"mainpanel",4)(1,"actions"),u(2,Tn,3,0,"ng-container",5)(3,Dn,6,1,"ng-container",5)(4,En,3,1,"ng-container",5)(5,Pn,4,0,"ng-container",5),a(),i(6,"content")(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"mat-stepper",10,0),w("selectionChange",function(s){return _(h),g(n.stepChange(s))})("selectionChange",function(s){return _(h),g(n.onStepperChange(s))}),i(13,"mat-step",11),u(14,In,3,0,"ng-template",12)(15,Vn,27,11,"ng-template",13),a(),i(16,"mat-step",14),u(17,Fn,3,0,"ng-template",12)(18,qn,1,1,"ng-template",13),a(),i(19,"mat-step",15),u(20,Kn,3,0,"ng-template",12)(21,Zn,1,1,"ng-template",13),a(),u(22,ea,2,0,"ng-template",16)(23,ta,2,0,"ng-template",17)(24,ia,2,0,"ng-template",18),a()()()()()()()}if(t&2){let h=k(12);d("headerTitle",n.pageTitle)("description",n.pageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),d("ngIf",n.currentState=="filter"),l(),d("ngIf",n.currentState=="preview"),l(),d("ngIf",n.currentState=="filter"),l(),d("ngIf",n.currentState=="finish"),l(6),rt("ngClass","last-edited-step-"+h.selectedIndex),l(2),d("editable",n.currentState!="finish")("completed",!1),l(3),d("editable",n.currentState!="finish")("completed",!1)}},dependencies:[st,R,W,K,G,j,H,q,$,ht,Lt,Ot,kt,Vt,jt,Bt,Ht,zt,Gt,ut,Ge,Et,Pt,ye,F],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.vertical-radio{display:flex;flex-direction:column;margin:15px 0}.mt-1rem{margin-top:1rem}.dateRange{padding-top:.8rem;padding-bottom:.8rem}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}.form-label-group.radio.download-type{height:45.5938px!important;border-radius:.375rem!important}
8
- `],encapsulation:2});let r=m;return r})();var na=[{path:"",component:Kt,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:$t,canActivate:[oe],data:{title:"New Order"}},{path:"detail",component:Xt,canActivate:[oe],data:{title:"Orders detail"}},{path:"ready_to_ship",component:Zt,canActivate:[oe],data:{title:"Ready To Ship"}},{path:"Shipped",component:ei,canActivate:[oe],data:{title:"Shipped"}},{path:"Delivered",component:ti,canActivate:[oe],data:{title:"Delivered"}},{path:"All",component:ii,canActivate:[oe],data:{title:"All Order"}},{path:"Cancelled",component:ni,canActivate:[oe],data:{title:"Cancelled"}},{path:"Download/V1",component:ai,canActivate:[oe],data:{title:"Download V1"}},{path:"Download",loadComponent(){return import("./chunk-KLH4UKSN.js").then(r=>r.DownloadV2Component)},canActivate:[oe],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-KEEQMGZY.js").then(r=>r.DownloadOrderLogComponent),canActivate:[oe],data:{title:"Download Order Log"}},{path:"Download_Order_Log/Detail",loadComponent:()=>import("./chunk-O4ZSBRQO.js").then(r=>r.DownloadOrderDetailComponent),canActivate:[oe],data:{title:"Download Order Log Detail"}}]}],ri=(()=>{let m=class m{};m.\u0275fac=function(t){return new(t||m)},m.\u0275mod=Re({type:m}),m.\u0275inj=Ae({imports:[be,Be.forChild(na)]});let r=m;return r})();var mo=(()=>{let m=class m{};m.\u0275fac=function(t){return new(t||m)},m.\u0275mod=Re({type:m}),m.\u0275inj=Ae({providers:[ve,je,Ue],imports:[be,ct,ri,Dt,xt,Rt,Be,_t,Ft,gt,X,Ut,ft,vt,qt,bt,Nt,wt,Q,Ye,Ge,It]});let r=m;return r})();export{mo as OrdersModule};
8
+ `],encapsulation:2});let r=m;return r})();var na=[{path:"",component:Kt,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:$t,canActivate:[oe],data:{title:"New Order"}},{path:"detail",component:Xt,canActivate:[oe],data:{title:"Orders detail"}},{path:"ready_to_ship",component:Zt,canActivate:[oe],data:{title:"Ready To Ship"}},{path:"Shipped",component:ei,canActivate:[oe],data:{title:"Shipped"}},{path:"Delivered",component:ti,canActivate:[oe],data:{title:"Delivered"}},{path:"All",component:ii,canActivate:[oe],data:{title:"All Order"}},{path:"Cancelled",component:ni,canActivate:[oe],data:{title:"Cancelled"}},{path:"Download/V1",component:ai,canActivate:[oe],data:{title:"Download V1"}},{path:"Download",loadComponent(){return import("./chunk-2H6ZWOFG.js").then(r=>r.DownloadV2Component)},canActivate:[oe],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-DXYJV443.js").then(r=>r.DownloadOrderLogComponent),canActivate:[oe],data:{title:"Download Order Log"}},{path:"Download_Order_Log/Detail",loadComponent:()=>import("./chunk-O4ZSBRQO.js").then(r=>r.DownloadOrderDetailComponent),canActivate:[oe],data:{title:"Download Order Log Detail"}}]}],ri=(()=>{let m=class m{};m.\u0275fac=function(t){return new(t||m)},m.\u0275mod=Re({type:m}),m.\u0275inj=Ae({imports:[be,Be.forChild(na)]});let r=m;return r})();var mo=(()=>{let m=class m{};m.\u0275fac=function(t){return new(t||m)},m.\u0275mod=Re({type:m}),m.\u0275inj=Ae({providers:[ve,je,Ue],imports:[be,ct,ri,Dt,xt,Rt,Be,_t,Ft,gt,X,Ut,ft,vt,qt,bt,Nt,wt,Q,Ye,Ge,It]});let r=m;return r})();export{mo as OrdersModule};
@@ -1 +1 @@
1
- import{a as N}from"./chunk-6CZNSZHY.js";import{a as M}from"./chunk-XHAXYWZ7.js";import{a as Ne,b as ke,c as U}from"./chunk-DLNXH2FE.js";import{a as _e}from"./chunk-BVIRHZTZ.js";import{a as Ee,b as Me}from"./chunk-DDHEMRO7.js";import{a as De}from"./chunk-N6IHFFFZ.js";import{a as Ve,b as Te}from"./chunk-PD4CUVAW.js";import"./chunk-GCKSYCMI.js";import{a as be}from"./chunk-N32A3EYJ.js";import"./chunk-ADRVUMMW.js";import{a as Fe}from"./chunk-XFTUE2ST.js";import"./chunk-HCDKYABV.js";import{a as fe,b as xe,d as Se,e as Pe}from"./chunk-CCXKODFV.js";import{j as ue}from"./chunk-URIFQ2VU.js";import{b as de,e as ge}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{d as Ie,l as we,m as ye,n as ve}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{b as oe,c as re,h as le,m as ce,o as se,y as pe}from"./chunk-BSN7ZAXG.js";import{c as me,e as he,f as Ce}from"./chunk-64G3XLI6.js";import"./chunk-OVEJFFL6.js";import{$b as u,Bd as E,Cd as ie,Da as _,Ea as m,Eb as h,G as A,Gb as p,Gc as v,Hc as T,Ic as X,Id as ae,Jc as Y,Nb as S,Ob as k,Qb as L,Rb as R,Sb as o,Tb as c,Ub as P,Vb as q,Wb as K,Yb as x,Z as $,bc as r,ea as j,ec as H,gb as D,jb as l,kb as f,mc as J,nc as d,oc as B,pa as z,pc as F,rc as I,sc as w,sd as ee,ta as G,tc as y,uc as Z,vc as Q,vd as te,xc as V,yd as ne}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var O=i=>[i],Ue=i=>({"text-decoration-line-through":i}),Oe=i=>({"bg-gradient-warning":i}),We=i=>({"ms-10":i});function Ae(i,s){if(i&1&&(o(0,"span",10),P(1,"img",11),c(),d(2)),i&2){let t=s.item;l(),p("src",t==null?null:t.Img,D),l(),F(" ",t.Name," ")}}function $e(i,s){if(i&1){let t=x();o(0,"button",16),u("click",function(){_(t);let n=r().ngIf,a=r(2);return m(a.updateStock(n))}),P(1,"i",17),d(2," Update "),c()}}function je(i,s){if(i&1){let t=x();o(0,"actions")(1,"div",12),h(2,$e,3,0,"button",13),o(3,"button",14),u("click",function(){_(t);let n=r(2);return m(n.openExportDialog())}),P(4,"i",15),o(5,"span"),d(6,"Export"),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(2),p("ngIf",e.productService.hasSelectionVariant(t))}}function ze(i,s){if(i&1){let t=x();o(0,"th")(1,"input",32),u("change",function(n){_(t);let a=r().ngIf,g=r(2);return m(g.onSelectAllSKU(n.target.checked,a))}),c()()}}function Ge(i,s){if(i&1){let t=x();o(0,"input",51),y("ngModelChange",function(n){_(t);let a=r(4).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),u("ngModelChange",function(){_(t);let n=r(4).$implicit,a=r(3);return m(a.onCheckboxStateProduct(n))}),c()}if(i&2){let t=r(4).$implicit;I("ngModel",t.selected)}}function qe(i,s){if(i&1&&h(0,Ge,1,1,"ng-template",26),i&2){let t=r(6);p("ngxPermissionsOnly",V(1,O,t.rolePriceEdit))}}function Ke(i,s){if(i&1){let t=x();q(0),o(1,"img",52),u("click",function(n){_(t);let a=r(3).$implicit,g=r(3);return m(g.onZoomImage(n,a==null?null:a.ImageUrl))}),c(),K()}if(i&2){let t=r(3).$implicit;l(),H("src",t.ThumbnailUrl,D)}}function He(i,s){i&1&&P(0,"img",53)}function Je(i,s){if(i&1&&(o(0,"small",50),d(1),c()),i&2){let t=r(3).$implicit;l(),F("(",t.Category,")")}}function Ze(i,s){if(i&1&&(o(0,"td",44)(1,"div",45),h(2,qe,1,3,null,26),o(3,"div",46),h(4,Ke,2,1,"ng-container",47)(5,He,1,0,"ng-template",null,0,Y),c()()(),o(7,"td",48)(8,"span",49),d(9),c(),h(10,Je,2,1,"small",50),c()),i&2){let t=J(6),e=r(2).$implicit;p("rowSpan",e.Variants.length),l(2),S((e.Variants==null?null:e.Variants.length)>1?2:-1),l(),p("ngClass",V(8,We,(e.Variants==null?null:e.Variants.length)<=1)),l(),p("ngIf",e.ThumbnailUrl)("ngIfElse",t),l(3),p("rowSpan",e.Variants.length),l(2),B(e.Name),l(),S(e.Category?10:-1)}}function Qe(i,s){if(i&1){let t=x();o(0,"input",56),y("ngModelChange",function(n){_(t);let a=r(2).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),c()}if(i&2){let t=r(2).$implicit;I("ngModel",t.selected)}}function Xe(i,s){if(i&1&&(o(0,"td",54),h(1,Qe,1,1,"input",55),c()),i&2){let t=r().$implicit;l(),S(t.UnitPrice>=0?1:-1)}}function Ye(i,s){i&1&&(o(0,"div",36),d(1," Not Found "),c())}function et(i,s){if(i&1&&(o(0,"div"),d(1),v(2,"number"),c()),i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.UnitPrice)," ")}}function tt(i,s){if(i&1&&(o(0,"div",37)(1,"a",40),P(2,"i",57),c()()),i&2){let t=r().$implicit,e=r(4);l(),p("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),D)}}function nt(i,s){if(i&1){let t=x();o(0,"div",58),u("click",function(){_(t);let n=r().$implicit,a=r().$implicit,g=r(2).ngIf,C=r();return m(C.openTableDialog(n,a,g))}),d(1),v(2,"number"),c()}if(i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.Channel[0]==null?null:t.Channel[0].Price)," ")}}function it(i,s){if(i&1){let t=x();o(0,"tr",33),h(1,Ze,11,10),o(2,"td",24),d(3),c(),o(4,"td",27)(5,"span",34),d(6),c()(),h(7,Xe,2,1,"ng-template",26),o(8,"td",27)(9,"div",35),h(10,Ye,2,0,"div",36)(11,et,3,3,"div")(12,tt,3,1,"div",37),c()(),o(13,"td",38)(14,"div",35),h(15,nt,3,3,"div",39),o(16,"div",37)(17,"a",40),P(18,"i",41),c()(),o(19,"div",37)(20,"div",42),u("click",function(){let n=_(t).$implicit,a=r(4);return m(a.refreshPrice(n))}),P(21,"i",43),c()()()()()}if(i&2){let t=s.$implicit,e=s.$index,n=r(4);l(),S(e==0?1:-1),l(2),B(t.Model),l(2),p("matTooltip",t.Discontinued?n.discontinuedVariantMsg:"")("ngClass",V(12,Ue,t.Discontinued)),l(),F(" ",t.Code," "),l(),p("ngxPermissionsOnly",V(14,O,n.rolePriceEdit)),l(3),S((t.Channel[0]==null?null:t.Channel[0].Description)!=null?10:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?11:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?12:-1),l(),p("ngClass",V(16,Oe,t.UnitPrice!=(t.Channel[0]==null?null:t.Channel[0].Price))),l(2),S(t.Channel.length>0?15:-1),l(2),p("href",t.Channel[0]==null?null:t.Channel[0].Url,D)}}function at(i,s){if(i&1&&L(0,it,22,18,"tr",33,k),i&2){let t=s.$implicit;R(t.Variants)}}function ot(i,s){if(i&1){let t=x();o(0,"content")(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr")(6,"th",22),d(7," Product "),o(8,"div")(9,"mat-slide-toggle",23),y("ngModelChange",function(n){_(t);let a=r(2);return w(a.toggleDifferentInventory,n)||(a.toggleDifferentInventory=n),m(n)}),u("toggleChange",function(){_(t);let n=r(2);return m(n.onToggleDifferentInventory())}),o(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),o(12,"th",24),d(13,"Variant"),c(),o(14,"th",25),d(15,"SKU"),c(),h(16,ze,2,0,"ng-template",26),o(17,"th",27),d(18,"POS"),c(),o(19,"th",27)(20,"div",28),u("click",function(){_(t);let n=r(2);return m(n.openModalFilter())}),P(21,"img",29),o(22,"span",30),d(23),v(24,"stringLimit"),c()()()()(),o(25,"tbody"),L(26,at,2,0,null,null,k),c()(),o(28,"infinite-paginator",31),v(29,"async"),u("onNextPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onNextPage(n.searchFilter))})("onLastPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onLastPage(n.searchFilter))})("onGetRowCount",function(){_(t);let n=r(2);return m(n.infinitePagination.getRowCount(n.searchFilter))}),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(9),I("ngModel",e.toggleDifferentInventory),l(7),p("ngxPermissionsOnly",V(16,O,e.rolePriceEdit)),l(4),p("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),l(),p("src",e.selectedChannel==null?null:e.selectedChannel.Img,D),l(2),F(" ",X(24,11,e.selectedChannel==null?null:e.selectedChannel.Name,20)," "),l(3),R(t),l(2),p("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",T(29,14,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}function rt(i,s){if(i&1){let t=x();o(0,"mainpanel",2),y("textChange",function(n){_(t);let a=r();return w(a.searchFilter.text,n)||(a.searchFilter.text=n),m(n)}),u("onSubmit",function(){_(t);let n=r();return m(n.onSearch())}),o(1,"filters")(2,"div")(3,"label",3),d(4,"Channel"),c(),o(5,"ng-select",4),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.ChannelID,n)||(a.searchFilter.ChannelID=n),m(n)}),h(6,Ae,3,2,"ng-template",5),c()(),o(7,"div",6)(8,"label",7),d(9,"Page Number"),c(),o(10,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.PageNumber,n)||(a.searchFilter.PageNumber=n),m(n)}),c()(),o(11,"div",6)(12,"label",7),d(13,"Page Size"),c(),o(14,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.RowCount,n)||(a.searchFilter.RowCount=n),m(n)}),c()()(),h(15,je,7,1,"actions",9),v(16,"async"),h(17,ot,30,18,"content",9),v(18,"async"),c()}if(i&2){let t=r();p("headerTitle",t.pageTitle),I("text",t.searchFilter.text),l(5),p("clearable",!1)("items",t.channelOptions),I("ngModel",t.searchFilter.ChannelID),l(5),I("ngModel",t.searchFilter.PageNumber),l(4),I("ngModel",t.searchFilter.RowCount),l(),p("ngIf",T(16,9,t.data$)),l(2),p("ngIf",T(18,11,t.data$))}}var zt=(()=>{let s=class s{constructor(e,n,a,g,C,b,W,Le,Re,Be){this.http=e,this.toastr=n,this.dialog=a,this.productService=g,this.biggerPictureService=C,this.inventoryService=b,this.authService=W,this.mainPanelService=Le,this.exportService=Re,this.decimalPipe=Be,this.infinitePagination=z(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=_e.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe($(1)),this.channelOptions=W.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(j(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=M.ALL,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=M.ALL:this.searchFilter.filterModel=M.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let a=this.productService.selectedVariantProduct(e).map(C=>({ID:C.ID,ChannelID:C.Channel[0].ChannelID,Code:C.Code,Price:C.UnitPrice})),g={ListChannelID:[this.searchFilter.ChannelID],ListPrice:a};this.http.post("/api/Price/UpdateChannel",g).subscribe(C=>{this.onSearch(),this.handlingUpdateStock(C.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let n=e.failure_list,a=e.success_list;this.inventoryService.showToastrUpdateInventory("Price",a,n)}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(a=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openTableDialog(e,n,a){let g=JSON.parse(JSON.stringify(e));this.dialog.open(Ne,{data:{Name:n.Name,Variant:g,ChannelID:g?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:g?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(A(b=>me.IsNotEmpty(b))).subscribe(b=>{this.updateItemAfterDialog(b,e)})}updateItemAfterDialog(e,n){let a={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",a).subscribe(g=>{let C=this.productService.findChannelById(a.ID,this.channelOptions),b=a.Price?this.decimalPipe.transform(a.Price):a.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${C.Name} to ${b}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=a.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(a=>(a.Variants=a.Variants.map(g=>(g.selected=e,g)),a))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}openExportDialog(){this.dialog.open(Me,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}};s.\u0275fac=function(n){return new(n||s)(f(ge),f(de),f(Ie),f(be),f(Fe),f(N),f(ue),f(we),f(Ee),f(E))},s.\u0275cmp=G({type:s,selectors:[["app-price-single-channel"]],standalone:!0,features:[Z([U,N,ae("https://res.cloudinary.com/"),E]),Q],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],[3,"ngClass"],[4,"ngIf","ngIfElse"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(n,a){n&1&&(h(0,rt,19,13,"mainpanel",1),v(1,"async")),n&2&&p("ngIf",T(1,1,a.loader$))},dependencies:[ie,ee,te,ne,E,ve,ye,Pe,Se,fe,xe,pe,re,se,oe,le,ce,De,ke,Ce,he,Te,Ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0});let i=s;return i})();export{zt as PriceSingleChannelComponent};
1
+ import{a as N}from"./chunk-2RI4B7LO.js";import{a as M}from"./chunk-XHAXYWZ7.js";import{a as Ne,b as ke,c as U}from"./chunk-DLNXH2FE.js";import{a as _e}from"./chunk-BVIRHZTZ.js";import{a as Ee,b as Me}from"./chunk-DDHEMRO7.js";import{a as De}from"./chunk-N6IHFFFZ.js";import{a as Ve,b as Te}from"./chunk-PD4CUVAW.js";import"./chunk-GCKSYCMI.js";import{a as be}from"./chunk-N32A3EYJ.js";import"./chunk-ADRVUMMW.js";import{a as Fe}from"./chunk-XFTUE2ST.js";import"./chunk-HCDKYABV.js";import{a as fe,b as xe,d as Se,e as Pe}from"./chunk-CCXKODFV.js";import{j as ue}from"./chunk-VAMLKDPP.js";import{b as de,e as ge}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{d as Ie,l as we,m as ye,n as ve}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{b as oe,c as re,h as le,m as ce,o as se,y as pe}from"./chunk-BSN7ZAXG.js";import{c as me,e as he,f as Ce}from"./chunk-64G3XLI6.js";import"./chunk-OVEJFFL6.js";import{$b as u,Bd as E,Cd as ie,Da as _,Ea as m,Eb as h,G as A,Gb as p,Gc as v,Hc as T,Ic as X,Id as ae,Jc as Y,Nb as S,Ob as k,Qb as L,Rb as R,Sb as o,Tb as c,Ub as P,Vb as q,Wb as K,Yb as x,Z as $,bc as r,ea as j,ec as H,gb as D,jb as l,kb as f,mc as J,nc as d,oc as B,pa as z,pc as F,rc as I,sc as w,sd as ee,ta as G,tc as y,uc as Z,vc as Q,vd as te,xc as V,yd as ne}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var O=i=>[i],Ue=i=>({"text-decoration-line-through":i}),Oe=i=>({"bg-gradient-warning":i}),We=i=>({"ms-10":i});function Ae(i,s){if(i&1&&(o(0,"span",10),P(1,"img",11),c(),d(2)),i&2){let t=s.item;l(),p("src",t==null?null:t.Img,D),l(),F(" ",t.Name," ")}}function $e(i,s){if(i&1){let t=x();o(0,"button",16),u("click",function(){_(t);let n=r().ngIf,a=r(2);return m(a.updateStock(n))}),P(1,"i",17),d(2," Update "),c()}}function je(i,s){if(i&1){let t=x();o(0,"actions")(1,"div",12),h(2,$e,3,0,"button",13),o(3,"button",14),u("click",function(){_(t);let n=r(2);return m(n.openExportDialog())}),P(4,"i",15),o(5,"span"),d(6,"Export"),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(2),p("ngIf",e.productService.hasSelectionVariant(t))}}function ze(i,s){if(i&1){let t=x();o(0,"th")(1,"input",32),u("change",function(n){_(t);let a=r().ngIf,g=r(2);return m(g.onSelectAllSKU(n.target.checked,a))}),c()()}}function Ge(i,s){if(i&1){let t=x();o(0,"input",51),y("ngModelChange",function(n){_(t);let a=r(4).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),u("ngModelChange",function(){_(t);let n=r(4).$implicit,a=r(3);return m(a.onCheckboxStateProduct(n))}),c()}if(i&2){let t=r(4).$implicit;I("ngModel",t.selected)}}function qe(i,s){if(i&1&&h(0,Ge,1,1,"ng-template",26),i&2){let t=r(6);p("ngxPermissionsOnly",V(1,O,t.rolePriceEdit))}}function Ke(i,s){if(i&1){let t=x();q(0),o(1,"img",52),u("click",function(n){_(t);let a=r(3).$implicit,g=r(3);return m(g.onZoomImage(n,a==null?null:a.ImageUrl))}),c(),K()}if(i&2){let t=r(3).$implicit;l(),H("src",t.ThumbnailUrl,D)}}function He(i,s){i&1&&P(0,"img",53)}function Je(i,s){if(i&1&&(o(0,"small",50),d(1),c()),i&2){let t=r(3).$implicit;l(),F("(",t.Category,")")}}function Ze(i,s){if(i&1&&(o(0,"td",44)(1,"div",45),h(2,qe,1,3,null,26),o(3,"div",46),h(4,Ke,2,1,"ng-container",47)(5,He,1,0,"ng-template",null,0,Y),c()()(),o(7,"td",48)(8,"span",49),d(9),c(),h(10,Je,2,1,"small",50),c()),i&2){let t=J(6),e=r(2).$implicit;p("rowSpan",e.Variants.length),l(2),S((e.Variants==null?null:e.Variants.length)>1?2:-1),l(),p("ngClass",V(8,We,(e.Variants==null?null:e.Variants.length)<=1)),l(),p("ngIf",e.ThumbnailUrl)("ngIfElse",t),l(3),p("rowSpan",e.Variants.length),l(2),B(e.Name),l(),S(e.Category?10:-1)}}function Qe(i,s){if(i&1){let t=x();o(0,"input",56),y("ngModelChange",function(n){_(t);let a=r(2).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),c()}if(i&2){let t=r(2).$implicit;I("ngModel",t.selected)}}function Xe(i,s){if(i&1&&(o(0,"td",54),h(1,Qe,1,1,"input",55),c()),i&2){let t=r().$implicit;l(),S(t.UnitPrice>=0?1:-1)}}function Ye(i,s){i&1&&(o(0,"div",36),d(1," Not Found "),c())}function et(i,s){if(i&1&&(o(0,"div"),d(1),v(2,"number"),c()),i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.UnitPrice)," ")}}function tt(i,s){if(i&1&&(o(0,"div",37)(1,"a",40),P(2,"i",57),c()()),i&2){let t=r().$implicit,e=r(4);l(),p("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),D)}}function nt(i,s){if(i&1){let t=x();o(0,"div",58),u("click",function(){_(t);let n=r().$implicit,a=r().$implicit,g=r(2).ngIf,C=r();return m(C.openTableDialog(n,a,g))}),d(1),v(2,"number"),c()}if(i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.Channel[0]==null?null:t.Channel[0].Price)," ")}}function it(i,s){if(i&1){let t=x();o(0,"tr",33),h(1,Ze,11,10),o(2,"td",24),d(3),c(),o(4,"td",27)(5,"span",34),d(6),c()(),h(7,Xe,2,1,"ng-template",26),o(8,"td",27)(9,"div",35),h(10,Ye,2,0,"div",36)(11,et,3,3,"div")(12,tt,3,1,"div",37),c()(),o(13,"td",38)(14,"div",35),h(15,nt,3,3,"div",39),o(16,"div",37)(17,"a",40),P(18,"i",41),c()(),o(19,"div",37)(20,"div",42),u("click",function(){let n=_(t).$implicit,a=r(4);return m(a.refreshPrice(n))}),P(21,"i",43),c()()()()()}if(i&2){let t=s.$implicit,e=s.$index,n=r(4);l(),S(e==0?1:-1),l(2),B(t.Model),l(2),p("matTooltip",t.Discontinued?n.discontinuedVariantMsg:"")("ngClass",V(12,Ue,t.Discontinued)),l(),F(" ",t.Code," "),l(),p("ngxPermissionsOnly",V(14,O,n.rolePriceEdit)),l(3),S((t.Channel[0]==null?null:t.Channel[0].Description)!=null?10:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?11:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?12:-1),l(),p("ngClass",V(16,Oe,t.UnitPrice!=(t.Channel[0]==null?null:t.Channel[0].Price))),l(2),S(t.Channel.length>0?15:-1),l(2),p("href",t.Channel[0]==null?null:t.Channel[0].Url,D)}}function at(i,s){if(i&1&&L(0,it,22,18,"tr",33,k),i&2){let t=s.$implicit;R(t.Variants)}}function ot(i,s){if(i&1){let t=x();o(0,"content")(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr")(6,"th",22),d(7," Product "),o(8,"div")(9,"mat-slide-toggle",23),y("ngModelChange",function(n){_(t);let a=r(2);return w(a.toggleDifferentInventory,n)||(a.toggleDifferentInventory=n),m(n)}),u("toggleChange",function(){_(t);let n=r(2);return m(n.onToggleDifferentInventory())}),o(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),o(12,"th",24),d(13,"Variant"),c(),o(14,"th",25),d(15,"SKU"),c(),h(16,ze,2,0,"ng-template",26),o(17,"th",27),d(18,"POS"),c(),o(19,"th",27)(20,"div",28),u("click",function(){_(t);let n=r(2);return m(n.openModalFilter())}),P(21,"img",29),o(22,"span",30),d(23),v(24,"stringLimit"),c()()()()(),o(25,"tbody"),L(26,at,2,0,null,null,k),c()(),o(28,"infinite-paginator",31),v(29,"async"),u("onNextPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onNextPage(n.searchFilter))})("onLastPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onLastPage(n.searchFilter))})("onGetRowCount",function(){_(t);let n=r(2);return m(n.infinitePagination.getRowCount(n.searchFilter))}),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(9),I("ngModel",e.toggleDifferentInventory),l(7),p("ngxPermissionsOnly",V(16,O,e.rolePriceEdit)),l(4),p("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),l(),p("src",e.selectedChannel==null?null:e.selectedChannel.Img,D),l(2),F(" ",X(24,11,e.selectedChannel==null?null:e.selectedChannel.Name,20)," "),l(3),R(t),l(2),p("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",T(29,14,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}function rt(i,s){if(i&1){let t=x();o(0,"mainpanel",2),y("textChange",function(n){_(t);let a=r();return w(a.searchFilter.text,n)||(a.searchFilter.text=n),m(n)}),u("onSubmit",function(){_(t);let n=r();return m(n.onSearch())}),o(1,"filters")(2,"div")(3,"label",3),d(4,"Channel"),c(),o(5,"ng-select",4),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.ChannelID,n)||(a.searchFilter.ChannelID=n),m(n)}),h(6,Ae,3,2,"ng-template",5),c()(),o(7,"div",6)(8,"label",7),d(9,"Page Number"),c(),o(10,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.PageNumber,n)||(a.searchFilter.PageNumber=n),m(n)}),c()(),o(11,"div",6)(12,"label",7),d(13,"Page Size"),c(),o(14,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.RowCount,n)||(a.searchFilter.RowCount=n),m(n)}),c()()(),h(15,je,7,1,"actions",9),v(16,"async"),h(17,ot,30,18,"content",9),v(18,"async"),c()}if(i&2){let t=r();p("headerTitle",t.pageTitle),I("text",t.searchFilter.text),l(5),p("clearable",!1)("items",t.channelOptions),I("ngModel",t.searchFilter.ChannelID),l(5),I("ngModel",t.searchFilter.PageNumber),l(4),I("ngModel",t.searchFilter.RowCount),l(),p("ngIf",T(16,9,t.data$)),l(2),p("ngIf",T(18,11,t.data$))}}var zt=(()=>{let s=class s{constructor(e,n,a,g,C,b,W,Le,Re,Be){this.http=e,this.toastr=n,this.dialog=a,this.productService=g,this.biggerPictureService=C,this.inventoryService=b,this.authService=W,this.mainPanelService=Le,this.exportService=Re,this.decimalPipe=Be,this.infinitePagination=z(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=_e.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe($(1)),this.channelOptions=W.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(j(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=M.ALL,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=M.ALL:this.searchFilter.filterModel=M.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let a=this.productService.selectedVariantProduct(e).map(C=>({ID:C.ID,ChannelID:C.Channel[0].ChannelID,Code:C.Code,Price:C.UnitPrice})),g={ListChannelID:[this.searchFilter.ChannelID],ListPrice:a};this.http.post("/api/Price/UpdateChannel",g).subscribe(C=>{this.onSearch(),this.handlingUpdateStock(C.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let n=e.failure_list,a=e.success_list;this.inventoryService.showToastrUpdateInventory("Price",a,n)}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(a=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openTableDialog(e,n,a){let g=JSON.parse(JSON.stringify(e));this.dialog.open(Ne,{data:{Name:n.Name,Variant:g,ChannelID:g?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:g?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(A(b=>me.IsNotEmpty(b))).subscribe(b=>{this.updateItemAfterDialog(b,e)})}updateItemAfterDialog(e,n){let a={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",a).subscribe(g=>{let C=this.productService.findChannelById(a.ID,this.channelOptions),b=a.Price?this.decimalPipe.transform(a.Price):a.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${C.Name} to ${b}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=a.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(a=>(a.Variants=a.Variants.map(g=>(g.selected=e,g)),a))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}openExportDialog(){this.dialog.open(Me,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}};s.\u0275fac=function(n){return new(n||s)(f(ge),f(de),f(Ie),f(be),f(Fe),f(N),f(ue),f(we),f(Ee),f(E))},s.\u0275cmp=G({type:s,selectors:[["app-price-single-channel"]],standalone:!0,features:[Z([U,N,ae("https://res.cloudinary.com/"),E]),Q],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],[3,"ngClass"],[4,"ngIf","ngIfElse"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(n,a){n&1&&(h(0,rt,19,13,"mainpanel",1),v(1,"async")),n&2&&p("ngIf",T(1,1,a.loader$))},dependencies:[ie,ee,te,ne,E,ve,ye,Pe,Se,fe,xe,pe,re,se,oe,le,ce,De,ke,Ce,he,Te,Ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0});let i=s;return i})();export{zt as PriceSingleChannelComponent};