marketplacepos 3.22.4 → 3.22.6

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 (40) hide show
  1. package/Marketplace/{chunk-TYLX7BTE.js → chunk-5RFIBP63.js} +2 -2
  2. package/Marketplace/{chunk-TTGQR67T.js → chunk-5SVULLWJ.js} +1 -1
  3. package/Marketplace/{chunk-XUFJJS2J.js → chunk-7FMG3H7T.js} +1 -1
  4. package/Marketplace/chunk-7LZ5ZSXM.js +1 -0
  5. package/Marketplace/{chunk-4IZSVUMG.js → chunk-B37WXGPN.js} +1 -1
  6. package/Marketplace/chunk-B63CUEEJ.js +1 -0
  7. package/Marketplace/{chunk-VNQI4F33.js → chunk-CS5RLQNE.js} +1 -1
  8. package/Marketplace/{chunk-23DZ4D5R.js → chunk-DFZNHBOD.js} +1 -1
  9. package/Marketplace/{chunk-H7UMM2O4.js → chunk-E3RBGXPO.js} +1 -1
  10. package/Marketplace/{chunk-FCZQ67RZ.js → chunk-EQYCYZMO.js} +1 -1
  11. package/Marketplace/{chunk-UD5A25ZM.js → chunk-ERQSA4CI.js} +1 -1
  12. package/Marketplace/{chunk-X6ORQE6B.js → chunk-FK2V7B6I.js} +1 -1
  13. package/Marketplace/{chunk-LP3WPRWN.js → chunk-FW2WWSWS.js} +1 -1
  14. package/Marketplace/{chunk-FMAKAW5D.js → chunk-KRCKXDH4.js} +1 -1
  15. package/Marketplace/{chunk-ZMWPJJ7H.js → chunk-NK3KLE4Z.js} +1 -1
  16. package/Marketplace/{chunk-HLOCAC46.js → chunk-OHREVJW7.js} +1 -1
  17. package/Marketplace/{chunk-GBB35ISE.js → chunk-ORCZERUP.js} +1 -1
  18. package/Marketplace/{chunk-R6PZUP7Z.js → chunk-POJ574F2.js} +1 -1
  19. package/Marketplace/{chunk-QTPWTEMM.js → chunk-RL4DLGYC.js} +1 -1
  20. package/Marketplace/{chunk-57TBVBTT.js → chunk-SHUDM2FU.js} +1 -1
  21. package/Marketplace/{chunk-BIZ6HSE5.js → chunk-SIELKIYA.js} +1 -1
  22. package/Marketplace/{chunk-CXOIUHEZ.js → chunk-SW4MFZHR.js} +1 -1
  23. package/Marketplace/{chunk-7X5MUFGG.js → chunk-TB7F3ZCR.js} +2 -2
  24. package/Marketplace/{chunk-R3IQKDSD.js → chunk-TIZFCLBP.js} +1 -1
  25. package/Marketplace/chunk-TKX5EECA.js +2 -0
  26. package/Marketplace/{chunk-KSEYLV2D.js → chunk-U5DTVOAU.js} +1 -1
  27. package/Marketplace/{chunk-HZ4UR7XC.js → chunk-UPGYF4XT.js} +1 -1
  28. package/Marketplace/{chunk-AVSLEEZE.js → chunk-W7EFOXDZ.js} +1 -1
  29. package/Marketplace/{chunk-CY54GOJZ.js → chunk-WDZHKT23.js} +1 -1
  30. package/Marketplace/{chunk-PLOBHIRC.js → chunk-YEYUZNK7.js} +1 -1
  31. package/Marketplace/{chunk-VNFHNRPE.js → chunk-YNS23F33.js} +1 -1
  32. package/Marketplace/{chunk-YPZ26CMR.js → chunk-ZK2ACEWJ.js} +1 -1
  33. package/Marketplace/{chunk-6AHW2YH7.js → chunk-ZT6LL6XR.js} +1 -1
  34. package/Marketplace/{chunk-HGJVKKOG.js → chunk-ZZWRH7Y5.js} +1 -1
  35. package/Marketplace/index.html +2 -2
  36. package/Marketplace/{main-QV5SZYMB.js → main-7AJHPHM7.js} +1 -1
  37. package/package.json +1 -1
  38. package/Marketplace/chunk-44YUSAMN.js +0 -1
  39. package/Marketplace/chunk-CKPIIVST.js +0 -8
  40. package/Marketplace/chunk-HBUGFW2P.js +0 -1
@@ -1,8 +1,8 @@
1
- import{a as ve,b as Ie,c as Ge}from"./chunk-YC44HHHF.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 bt}from"./chunk-ILVEM7H5.js";import{a as de}from"./chunk-RENQ3YZH.js";import{b as At}from"./chunk-AMSVLO4N.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 Lt,h as kt,i as Vt,j as Ft}from"./chunk-FGPSBTFS.js";import"./chunk-GCKSYCMI.js";import{a as Mt}from"./chunk-ZFQW5CVZ.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-XUFJJS2J.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{f as se,i as J}from"./chunk-57TBVBTT.js";import{b as we,e as B}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{b as St,d as be,e as Ct,f as yt,g as xt,m as H,n as wt}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 st,p as q,r as Be}from"./chunk-OVEJFFL6.js";import{$b as b,B as et,Bd as Y,Ca as nt,Cd as xe,Da as _,Ea as g,Eb as u,Fa as qe,G as tt,Ga as Ke,Gb as s,Gc as P,Hc as O,Ic as A,Jc as z,Nb as Je,Sb as n,Tb as a,Ub as C,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 k,ja as Fe,jb as l,ka as Ae,kb as T,mc as L,nc as m,oa as ue,oc as f,pc as v,rc as y,sc as x,sd as dt,ta as V,tc as w,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 p=class p{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(){}};p.\u0275fac=function(t){return new(t||p)},p.\u0275cmp=V({type:p,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,i){t&1&&(n(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),a()()(),C(4,"router-outlet")),t&2&&(l(3),s("Tabs",i.ObjectOrderTabs)("usePermissions",!0))},dependencies:[Tt,st]});let r=p;return r})();var je=(()=>{let p=class p{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),i=e.filter(h=>h.Status==!0);if(t.length==0&&i.length>0){let h=`<ol>${this.generateSuccessMessage(i)}</ol>`;this.toastr.success(h,"Success",{enableHtml:!0})}else if(t.length>0&&i.length>0){let h=`<ol>
1
+ import{a as ve,b as Ie,c as Ge}from"./chunk-YC44HHHF.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 bt}from"./chunk-ILVEM7H5.js";import{a as de}from"./chunk-RENQ3YZH.js";import{b as At}from"./chunk-AMSVLO4N.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 Lt,h as kt,i as Vt,j as Ft}from"./chunk-FGPSBTFS.js";import"./chunk-GCKSYCMI.js";import{a as Mt}from"./chunk-ZFQW5CVZ.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-7FMG3H7T.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{f as se,i as J}from"./chunk-SHUDM2FU.js";import{b as we,e as B}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{b as St,d as be,e as Ct,f as yt,g as xt,m as H,n as wt}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 st,p as q,r as Be}from"./chunk-OVEJFFL6.js";import{$b as b,B as et,Bd as Y,Ca as nt,Cd as xe,Da as _,Ea as g,Eb as u,Fa as qe,G as tt,Ga as Ke,Gb as s,Gc as P,Hc as O,Ic as A,Jc as z,Nb as Je,Sb as n,Tb as a,Ub as C,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 k,ja as Fe,jb as l,ka as Ae,kb as T,mc as L,nc as m,oa as ue,oc as f,pc as v,rc as y,sc as x,sd as dt,ta as V,tc as w,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 p=class p{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(){}};p.\u0275fac=function(t){return new(t||p)},p.\u0275cmp=V({type:p,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,i){t&1&&(n(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),a()()(),C(4,"router-outlet")),t&2&&(l(3),s("Tabs",i.ObjectOrderTabs)("usePermissions",!0))},dependencies:[Tt,st]});let r=p;return r})();var je=(()=>{let p=class p{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),i=e.filter(h=>h.Status==!0);if(t.length==0&&i.length>0){let h=`<ol>${this.generateSuccessMessage(i)}</ol>`;this.toastr.success(h,"Success",{enableHtml:!0})}else if(t.length>0&&i.length>0){let h=`<ol>
2
2
  ${this.generateSuccessMessage(i)}
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(i=>{t+=`<li><b>${i.OrderNumber}</b> was successfully Accept</li>`}),t}generateErrorMessage(e){let t="";return e.forEach(i=>{t+=`<li><b>${i.OrderNumber}</b> ${i.Message}</li>`}),t}};p.\u0275fac=function(t){return new(t||p)(ue(B),ue(we))},p.\u0275prov=Fe({token:p,factory:p.\u0275fac});let r=p;return r})();function pi(r,p){if(r&1){let o=M();D(0),n(1,"button",18),b("click",function(){_(o);let t=c().ngIf,i=c();return g(i.onAcceptOrder(t))}),C(2,"i",19),m(3," Accept "),a(),E()}}function mi(r,p){if(r&1&&(D(0),u(1,pi,4,0,"ng-container",3),E()),r&2){let o=c();l(),s("ngIf",o.isTokopediaAvailable&&o.isTokopediaSelected)}}function di(r,p){if(r&1&&(n(0,"span",20),C(1,"img",21),a(),m(2)),r&2){let o=p.item;l(),s("src",o==null?null:o.Img,k),l(),v(" ",o.Name," ")}}function si(r,p){if(r&1){let o=M();D(0),n(1,"th",33)(2,"input",34),w("ngModelChange",function(t){_(o);let i=c(3);return x(i.isCheckAll,t)||(i.isCheckAll=t),g(t)}),b("ngModelChange",function(){_(o);let t=c(2).ngIf,i=c();return g(i.onSelectAllOrderData(t))}),a()(),E()}if(r&2){let o=c(3);l(2),y("ngModel",o.isCheckAll)}}function ci(r,p){if(r&1){let o=M();D(0),n(1,"input",34),w("ngModelChange",function(t){_(o);let i=c(2).$implicit;return x(i.selected,t)||(i.selected=t),g(t)}),b("ngModelChange",function(){_(o);let t=c(4).ngIf,i=c();return g(i.onSelectOrderData(t))}),a(),E()}if(r&2){let o=c(2).$implicit;l(),y("ngModel",o.selected)}}function hi(r,p){if(r&1&&(D(0),n(1,"td"),u(2,ci,2,1,"ng-container",3),a(),E()),r&2){let o=c().$implicit,e=c(3);l(2),s("ngIf",o.Type==e.tokopediaType)}}function _i(r,p){if(r&1&&(D(0),n(1,"span"),m(2),a(),E()),r&2){let o=c().$implicit;l(2),f(o.Number)}}function gi(r,p){if(r&1&&(n(0,"a",36),m(1),a()),r&2){let o=c().$implicit,e=c(3);s("href",e.domain+"/menu/Orders/Order/Sales_Order/Info?ID="+o.ID,k),l(),f(o.Number)}}function ui(r,p){if(r&1&&(n(0,"tr"),u(1,hi,3,1,"ng-container",3),n(2,"td"),m(3),a(),n(4,"td"),u(5,_i,3,1,"ng-container",22)(6,gi,2,2,"ng-template",null,1,z),a(),n(8,"td"),m(9),a(),n(10,"td"),m(11),P(12,"date"),a(),n(13,"td"),C(14,"app-channel-logo",35),a()()),r&2){let o=p.$implicit,e=L(7),t=c(3);l(),s("ngIf",t.isTokopediaAvailable),l(2),f(o.Outlet),l(2),s("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),s("typeId",o.Type)}}function fi(r,p){if(r&1){let o=M();D(0),n(1,"div",23)(2,"table",24),b("matSortChange",function(t){_(o);let i=c(2);return g(i.onSort(t))}),n(3,"thead",25)(4,"tr",26),u(5,si,3,1,"ng-container",3),n(6,"th",27),m(7,"Outlet"),a(),n(8,"th",28),m(9,"Order number"),a(),n(10,"th"),m(11,"Customer"),a(),n(12,"th",29),m(13,"Created On"),a(),n(14,"th",30),m(15,"Channel"),a()()(),n(16,"tbody"),u(17,ui,15,10,"tr",31),a()(),n(18,"app-mat-paginator-no-count",32),P(19,"async"),P(20,"async"),b("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),s("ngIf",t.isTokopediaAvailable&&e),l(12),s("ngForOf",e),l(),s("filter",t.filter)("totaldata",(o=O(19,5,t.newOrdersData$))==null?null:o.length)("paginationTotal",O(20,7,t.paginationTotal$))}}function Si(r,p){if(r&1&&(D(0),u(1,fi,21,9,"ng-container",22),E()),r&2){let o=p.ngIf;c();let e=L(32);l(),s("ngIf",(o==null?null:o.length)>0)("ngIfElse",e)}}function Ci(r,p){r&1&&(n(0,"div",37),C(1,"app-empty-state"),a())}var $t=(()=>{let p=class p{constructor(e,t,i,h){this.localDataService=e,this.orderService=t,this.acceptOrderService=i,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(i=>i.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(i=>{this.isTokopediaSelected=!1,location.reload()})}getSelectedTokopediaOrders(e){return e.filter(i=>i.selected).map(i=>i.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(i=>(i=i.sort((h,S)=>N.compare(h.Created,S.Created,t)),i)))}}};p.\u0275fac=function(t){return new(t||p)(T(se),T(ve),T(je),T(J))},p.\u0275cmp=V({type:p,selectors:[["app-new-order"]],decls:33,vars:15,consts:[["EMPTY_STATE",""],["NOT_EMPTY",""],["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"onSubmit","hideSearchBox"],[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"],["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,i){if(t&1){let h=M();n(0,"mainpanel",2),b("onSubmit",function(){return _(h),g(i.getNewOrders())}),n(1,"actions"),u(2,mi,2,1,"ng-container",3),P(3,"async"),a(),n(4,"filters")(5,"div")(6,"label",4),m(7,"Channel"),a(),n(8,"ng-select",5),w("ngModelChange",function(d){return _(h),x(i.filter.ListChannelID,d)||(i.filter.ListChannelID=d),g(d)}),u(9,di,3,2,"ng-template",6),a()(),n(10,"div",7)(11,"label",8),m(12,"Page Number"),a(),n(13,"input",9),w("ngModelChange",function(d){return _(h),x(i.filter.PageNumber,d)||(i.filter.PageNumber=d),g(d)}),a()(),n(14,"div",7)(15,"label",8),m(16,"Page Size"),a(),n(17,"input",10),w("ngModelChange",function(d){return _(h),x(i.filter.PageSize,d)||(i.filter.PageSize=d),g(d)}),a()(),n(18,"div",7)(19,"label",11),m(20,"From/To"),a(),n(21,"div",12)(22,"datepicker",13),w("dateChange",function(d){return _(h),x(i.filter.From,d)||(i.filter.From=d),g(d)}),a()(),n(23,"div")(24,"datepicker",14),w("dateChange",function(d){return _(h),x(i.filter.To,d)||(i.filter.To=d),g(d)}),a()()()(),n(25,"content")(26,"div",15)(27,"div",16)(28,"div",17),u(29,Si,2,2,"ng-container",3),P(30,"async"),u(31,Ci,2,0,"ng-template",null,0,z),a()()()()()}t&2&&(s("hideSearchBox",!0),l(2),s("ngIf",O(3,11,i.newOrdersData$)),l(6),s("clearable",!0)("multiple",!0)("items",i.channelOptions),y("ngModel",i.filter.ListChannelID),l(5),y("ngModel",i.filter.PageNumber),l(4),y("ngModel",i.filter.PageSize),l(5),y("date",i.filter.From),l(2),y("date",i.filter.To),l(5),s("ngIf",O(30,13,i.newOrdersData$)))},dependencies:[R,W,K,ne,ze,G,j,H,$,ae,re,X,me,de,le,pe,Q,ye,F]});let r=p;return r})();var yi=()=>["/menu/Order"];function xi(r,p){if(r&1&&(n(0,"tr")(1,"td"),m(2),a(),n(3,"td"),m(4),P(5,"number"),a(),n(6,"td"),m(7),P(8,"number"),a()()),r&2){let o=p.$implicit;l(2),f(o.Code),l(2),f(O(5,3,o.Quantity)),l(3),f(O(8,5,o.Price))}}function wi(r,p){if(r&1&&(n(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),m(5,"Outlet Info"),a()(),n(6,"div",4)(7,"div",9),m(8," Outlet : "),a(),n(9,"div",9),m(10),a()(),n(11,"div",4)(12,"div",9),m(13," Date : "),a(),n(14,"div",9),m(15),P(16,"date"),a()(),n(17,"div",4)(18,"div",9),m(19," Status : "),a(),n(20,"div",9),m(21),a()(),n(22,"div",4)(23,"div",9),m(24," Tax Type : "),a(),n(25,"div",9),m(26),a()(),n(27,"div",4)(28,"div",9),m(29," Due Date : "),a(),n(30,"div",9),m(31),P(32,"date"),a()()(),n(33,"div",6)(34,"div",7)(35,"h3",8),m(36,"Customer Info"),a()(),n(37,"div",4)(38,"div",9),m(39," Name : "),a(),n(40,"div",9),m(41),a()(),n(42,"div",4)(43,"div",9),m(44," Email : "),a(),n(45,"div",9),m(46),a()(),n(47,"div",4)(48,"div",9),m(49," Mobile : "),a(),n(50,"div",9),m(51),a()()()(),n(52,"div",10)(53,"h3",11),m(54,"Products Sold"),a(),n(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),m(60,"Code"),a(),n(61,"th"),m(62,"Quantity"),a(),n(63,"th"),m(64,"Price"),a()()(),n(65,"tbody"),u(66,xi,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),s("ngForOf",o.model.Variants)}}var Xt=(()=>{let p=class p{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})}};p.\u0275fac=function(t){return new(t||p)(T(B),T(We))},p.\u0275cmp=V({type:p,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,i){t&1&&(n(0,"mainpanel",0)(1,"actions")(2,"a",1),m(3,"Back"),a()(),n(4,"content")(5,"div",2),u(6,wi,67,15,"div",3),a()()()),t&2&&(s("headerTitle","Order #"+i.number)("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),s("routerLink",te(5,yi)),l(4),s("ngIf",i.model))},dependencies:[R,W,H,q,Y,F]});let r=p;return r})();var Qt=(()=>{let p=class p{constructor(e){this.dialogRef=e,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}};p.\u0275fac=function(t){return new(t||p)(T(St))},p.\u0275cmp=V({type:p,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,i){t&1&&(n(0,"div",0)(1,"h2",1),m(2,"Cetak label pesanan"),a(),n(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),m(7,"Kamu akan mencetak label yang berisi detail pesanan"),a(),n(8,"div",5)(9,"mat-checkbox",6),w("ngModelChange",function(S){return x(i.tandaiSudahDicetak,S)||(i.tandaiSudahDicetak=S),S}),a(),n(10,"span",7),m(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),a()()()()(),n(12,"mat-dialog-actions",8)(13,"button",9),b("click",function(){return i.onCancel()}),m(14,"Cancel"),a(),n(15,"button",10),b("click",function(){return i.onPrint()}),m(16,"Cetak Pesanan"),a()()()),t&2&&(l(9),y("ngModel",i.tandaiSudahDicetak))},dependencies:[G,j,Yt,yt,Ct]});let r=p;return r})();var Ue=(()=>{let p=class p{constructor(e,t,i){this.http=e,this.toastr=t,this.dialog=i}getTokopediaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/Tokopedia/Multiple",{Orders:e}).pipe(U(t=>(t=t.map(i=>(i.ChannelType=I.Tokopedia,i)),t)))}getTiktokShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/TIktok/Multiple",{Orders:e}).pipe(U(t=>(t=t.map(i=>(i.ChannelType=I.Tiktok,i)),t)))}getShopeeShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/shopee/Multiple",{Orders:e}).pipe(U(t=>(t=t.map(i=>(i.ChannelType=I.Shopee,i)),t)))}getLazadaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/lazada/Multiple",{Orders:e}).pipe(U(t=>(t=t.map(i=>(i.ChannelType=I.Lazada,i)),t)))}printShippingLabelTokopedia(e){let t={OrderNumber:e,Printed:!0};this.dialog.open(Qt).afterClosed().pipe(tt(i=>i!==void 0),it(i=>(t.Printed=i,this.http.post("api/v1/Shippinglabel/Tokopedia",t)))).subscribe(i=>{let h=window.open("about:blank","_blank");h.document.write(i.File),h.document.close()})}printShippingLabelTiktok(e,t){let i={ShopID:t,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Tiktok",i).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 i={ShopID:t,OrderNumber:e};this.http.post("api/v1/Shippinglabel/shopee/DownloadShipping",i).subscribe(h=>{var S=Uint8Array.from(atob(h.File),Pe=>Pe.charCodeAt(0)),d=new Blob([S],{type:"octet/stream"});N.openDownloadFile(d,`${e}.pdf`)})}printShippingLabelLazada(e,t){let i={ShopID:t,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Lazada/DownloadShipping",i).subscribe(h=>{h.result.data!=null?window.open(h.result.data.pdf_url,"_blank"):this.toastr.error(h.message,"Cannot Print")})}};p.\u0275fac=function(t){return new(t||p)(ue(B),ue(we),ue(be))},p.\u0275prov=Fe({token:p,factory:p.\u0275fac,providedIn:"root"});let r=p;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,p){if(r&1&&(D(0),n(1,"div",36)(2,"div",12)(3,"div",37),m(4),a()(),n(5,"div",12)(6,"div",37),m(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,p){if(r&1&&(D(0),n(1,"div")(2,"span",15),m(3,"Berat: "),a(),n(4,"span",18),m(5),a()(),E()),r&2){let o=c();l(5),v("",o.shippingLabel==null?null:o.shippingLabel.Weight," gr")}}function Di(r,p){if(r&1&&(D(0),n(1,"div",38)(2,"span",14),m(3,"Batas Kirim:"),a(),n(4,"span",18),m(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,p){if(r&1&&(D(0),n(1,"div",38)(2,"span",14),m(3,"No.Pesanan:"),a(),n(4,"span",18),m(5),a()(),E()),r&2){let o=c();l(5),f(o.shippingLabel==null?null:o.shippingLabel.OrderNumber)}}function Pi(r,p){if(r&1&&(n(0,"tr")(1,"td",39),m(2),a(),n(3,"td"),m(4),a(),n(5,"td"),m(6),a(),n(7,"td"),m(8),P(9,"number"),a()()),r&2){let o=p.$implicit,e=p.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 p=class p{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})}};p.\u0275fac=function(t){return new(t||p)},p.\u0275cmp=V({type:p,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,i){t&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div"),C(6,"img",5),a(),n(7,"div")(8,"h4"),m(9),a()(),n(10,"div"),C(11,"img",5),a()()()(),n(12,"div",6),C(13,"hr"),a(),n(14,"div",7)(15,"div",3)(16,"div",8)(17,"span",9),m(18),a(),n(19,"span"),m(20),a()()()(),n(21,"div",7)(22,"div",10),qe(),C(23,"svg",11),a()(),Ke(),n(24,"div",6),C(25,"hr"),a(),n(26,"div",2)(27,"div",12)(28,"div",13)(29,"div",14),m(30,"Penerima: "),a(),n(31,"div",15),m(32),a()(),n(33,"div",16)(34,"span",15),m(35,"Alamat Pengiriman:"),a(),n(36,"div",17),m(37),a()()(),n(38,"div",12)(39,"div",13)(40,"div",14),m(41,"Pengirim: "),a(),n(42,"div")(43,"div",15),m(44),a(),n(45,"div",18),m(46),a(),n(47,"div",19),m(48),a()()(),C(49,"div"),a()(),u(50,vi,8,2,"ng-container",20),n(51,"div",21)(52,"div",22)(53,"div",15),m(54,"CASHLESS"),a()(),n(55,"div",23)(56,"small",24),m(57,"Penjual tidak perlu membayar ongkos kirim ke kurir"),a()()(),n(58,"div",25)(59,"div",26)(60,"div",27),u(61,Ti,6,1,"ng-container",20),n(62,"div")(63,"span",15),m(64,"COD: "),a(),n(65,"span",18),m(66),P(67,"number"),a()()(),u(68,Di,7,4,"ng-container",20)(69,Ei,6,1,"ng-container",20),a(),n(70,"div",28),qe(),C(71,"svg",29),a()()(),Ke(),n(72,"div",25)(73,"div",3)(74,"table",30)(75,"thead")(76,"tr")(77,"th",31),m(78,"No."),a(),n(79,"th",32),m(80,"Nama Produk"),a(),n(81,"th",33),m(82,"SKU"),a(),n(83,"th",34),m(84,"Qty"),a()()(),n(85,"tbody"),u(86,Pi,10,6,"tr",35),a()()()()()),t&2&&(l(6),s("src",i.marketplaceLogo,k),l(3),f(i.logistic==null?null:i.logistic.Service),l(2),s("src",i.shippingLogo,k),l(7),v(" ",(i.shippingLabel==null?null:i.shippingLabel.ChannelType)==(i.channelType==null?null:i.channelType.Tokopedia)?"Kode Booking: ":"No. Resi: "," "),l(2),f(i.logistic==null?null:i.logistic.Resi_Number),l(3),s("id","RESI"+i.id),l(9),f(i.recipient==null?null:i.recipient.Name),l(5),v(" ",i.recipient==null?null:i.recipient.Address," "),l(7),f(i.store==null?null:i.store.Name),l(2),f(i.store==null?null:i.store.Phone),l(2),v(" ",i.store==null?null:i.store.Address," "),l(2),s("ngIf",(i.recipient==null?null:i.recipient.City)&&(i.recipient==null?null:i.recipient.District)),l(11),s("ngIf",i.shippingLabel==null?null:i.shippingLabel.Weight),l(5),v("Rp. ",i.shippingLabel!=null&&i.shippingLabel.IsCOD?O(67,18,i.shippingLabel==null||i.shippingLabel.SummaryPrice==null?null:i.shippingLabel.SummaryPrice.Total):0,""),l(2),s("ngIf",(i.logistic==null?null:i.logistic.Batas_kirim)&&(i.logistic==null?null:i.logistic.Batas_kirim)!==i.minDate),l(),s("ngIf",i.shippingLabel==null?null:i.shippingLabel.OrderNumber),l(2),s("id","NO"+i.id),l(15),s("ngForOf",i.products))},dependencies:[xe,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=p;return r})();var Ni=()=>["/menu/Order/detail"],Mi=(r,p)=>({Number:r,Outlet:p});function Oi(r,p){if(r&1){let o=M();D(0),n(1,"button",19),b("click",function(){_(o);let t=c();return g(t.onPrintMultipleShippingLabel())}),C(2,"i",20),n(3,"span"),m(4,"Print Shipping Label"),a()(),E()}}function Li(r,p){if(r&1&&(n(0,"span",21),C(1,"img",22),a(),m(2)),r&2){let o=p.item;l(),s("src",o==null?null:o.Img,k)("alt",o.Name),l(),v(" ",o.Name," ")}}function ki(r,p){if(r&1){let o=M();D(0),n(1,"input",29),w("ngModelChange",function(t){_(o);let i=c().$implicit;return x(i.Selected,t)||(i.Selected=t),g(t)}),b("ngModelChange",function(){_(o);let t=c(3).ngIf,i=c();return g(i.onSelectReadyToShip(t))}),a(),E()}if(r&2){let o=c().$implicit;l(),y("ngModel",o.Selected)}}function Vi(r,p){if(r&1&&(n(0,"a",42),m(1),a()),r&2){let o=c().$implicit;s("routerLink",te(3,Ni))("queryParams",ie(4,Mi,o.Number,o.Outlet)),l(),f(o.Number)}}function Fi(r,p){if(r&1&&(n(0,"a",43),m(1),a()),r&2){let o=c().$implicit,e=c(3);s("href",e.domain+o.ID,k),l(),f(o.Number)}}function Ai(r,p){if(r&1){let o=M();n(0,"a",44),b("click",function(){_(o);let t=c().$implicit,i=c(3);return g(i.onPrintShippingLabel(t.Number,t.ShopID,t.TypeID))}),C(1,"i",45),a()}}function Ri(r,p){if(r&1&&(n(0,"tr")(1,"td"),u(2,ki,2,1,"ng-container",2),a(),n(3,"td"),m(4),a(),n(5,"td"),u(6,Vi,2,7,"a",37)(7,Fi,2,2,"a",38),a(),n(8,"td"),m(9),a(),n(10,"td"),m(11),P(12,"number"),a(),n(13,"td"),m(14),P(15,"date"),a(),n(16,"td"),C(17,"app-channel-logo",39),a(),n(18,"td",40),u(19,Ai,2,0,"a",41),a()()),r&2){let o=p.$implicit,e=c(3);l(2),s("ngIf",o.TypeID==e.channelType.Shopee||o.TypeID==e.channelType.Tokopedia||o.TypeID==e.channelType.Tiktok),l(2),f(o.Outlet),l(2),s("ngIf",e.guidEmpty==o.ID),l(),s("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),s("typeId",o.TypeID),l(2),s("ngIf",o.TypeID==e.channelType.Shopee||o.TypeID==e.channelType.Tokopedia||o.TypeID==e.channelType.Tiktok||o.TypeID==e.channelType.Lazada)}}function Wi(r,p){if(r&1){let o=M();D(0),n(1,"div",24)(2,"table",25),b("matSortChange",function(t){_(o);let i=c(2);return g(i.onSort(t))}),n(3,"thead",26)(4,"tr",27)(5,"th",28)(6,"input",29),w("ngModelChange",function(t){_(o);let i=c(2);return x(i.isCheckAll,t)||(i.isCheckAll=t),g(t)}),b("ngModelChange",function(){_(o);let t=c().ngIf,i=c();return g(i.onSelectAllReadyToShip(t))}),a()(),n(7,"th",30),m(8,"Outlet"),a(),n(9,"th",31),m(10,"Order number"),a(),n(11,"th"),m(12,"Customer"),a(),n(13,"th",32),m(14,"Amount"),a(),n(15,"th",33),m(16,"Date"),a(),n(17,"th",34),m(18,"Channel"),a(),C(19,"th",35),a()(),n(20,"tbody"),u(21,Ri,20,14,"tr",18),a()(),n(22,"app-mat-paginator-no-count",36),P(23,"async"),P(24,"async"),b("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),s("ngForOf",e),l(),s("filter",t.filter)("totaldata",(o=O(23,5,t.readyToShip$))==null?null:o.length)("paginationTotal",O(24,7,t.paginationTotal$))}}function Bi(r,p){if(r&1&&(D(0),u(1,Wi,25,9,"ng-container",23),E()),r&2){let o=p.ngIf;c();let e=L(31);l(),s("ngIf",o.length>0)("ngIfElse",e)}}function zi(r,p){r&1&&(n(0,"div",46),C(1,"app-empty-state"),a())}function Gi(r,p){r&1&&(D(0),n(1,"div",48),m(2,"\xA0"),a(),E())}function ji(r,p){if(r&1&&(D(0),C(1,"app-shipping-label",47),u(2,Gi,3,0,"ng-container",2),E()),r&2){let o=p.$implicit,e=p.index,t=c();l(),s("shippingLabel",o)("id",e),l(),s("ngIf",e!==(t.shippingLabels==null?null:t.shippingLabels.length)-1)}}var Zt=(()=>{let p=class p{constructor(e,t,i,h,S,d){this.http=e,this.localDataService=t,this.dialog=i,this.shippingLabelService=h,this.datePipe=S,this.authService=d,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(i=>i.Data),ge(1)),this.readyToShip$=this.sourceObs$}onPrintMultipleShippingLabel(){let e=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Tokopedia),t=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Shopee),i=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))),i.length>0&&h.push(this.shippingLabelService.getTiktokShippingLabel(this.shippingLabelPayload(i))),et(h).pipe(U(S=>S.reduce((d,Pe)=>d.concat(Pe),[]))).subscribe({next:S=>{this.shippingLabels=S,this.printShippingLabel()}})}filterReadyToShipByChannel(e,t){return e.filter(i=>i.TypeID==t)}shippingLabelPayload(e){return e.map(t=>({ShopID:t.ShopID,OrderNumber:t.Number}))}printShippingLabel(){setTimeout(()=>{this.setPdfname(),window.print()},500)}onPrintShippingLabel(e,t,i){switch(i){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"),i=this.datePipe.transform(e,"HH-mm");document.title=`ShippingLabel_${t}_${i}`}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(i=>i.sort((h,S)=>N.compare(h.Date,S.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)}};p.\u0275fac=function(t){return new(t||p)(T(B),T(se),T(be),T(Ue),T(F),T(J))},p.\u0275cmp=V({type:p,selectors:[["app-ready-to-ship"]],decls:34,vars:13,consts:[["EMPTY_STATE",""],["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[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,i){if(t&1){let h=M();n(0,"mainpanel",1),b("onSubmit",function(d){return _(h),g(i.getReadyToShip(d))}),n(1,"actions"),u(2,Oi,5,0,"ng-container",2),a(),n(3,"filters")(4,"div")(5,"label",3),m(6,"Channel"),a(),n(7,"ng-select",4),w("ngModelChange",function(d){return _(h),x(i.filter.ListChannelID,d)||(i.filter.ListChannelID=d),g(d)}),u(8,Li,3,3,"ng-template",5),a()(),n(9,"div",6)(10,"label",7),m(11,"Page Number"),a(),n(12,"input",8),w("ngModelChange",function(d){return _(h),x(i.filter.PageNumber,d)||(i.filter.PageNumber=d),g(d)}),a()(),n(13,"div",6)(14,"label",7),m(15,"Page Size"),a(),n(16,"input",9),w("ngModelChange",function(d){return _(h),x(i.filter.PageSize,d)||(i.filter.PageSize=d),g(d)}),a()(),n(17,"div",6)(18,"label",10),m(19,"From/To"),a(),n(20,"div",11)(21,"datepicker",12),w("dateChange",function(d){return _(h),x(i.filter.From,d)||(i.filter.From=d),g(d)}),a()(),n(22,"div")(23,"datepicker",13),w("dateChange",function(d){return _(h),x(i.filter.To,d)||(i.filter.To=d),g(d)}),a()()()(),n(24,"content")(25,"div",14)(26,"div",15)(27,"div",16),u(28,Bi,2,2,"ng-container",2),P(29,"async"),u(30,zi,2,0,"ng-template",null,0,z),a()()()()(),n(32,"div",17),u(33,ji,3,3,"ng-container",18),a()}t&2&&(l(2),s("ngIf",i.selectedReadyToShip.length>0),l(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions),y("ngModel",i.filter.ListChannelID),l(5),y("ngModel",i.filter.PageNumber),l(4),y("ngModel",i.filter.PageSize),l(5),y("date",i.filter.From),l(2),y("date",i.filter.To),l(5),s("ngIf",O(29,11,i.readyToShip$)),l(5),s("ngForOf",i.shippingLabels))},dependencies:[R,W,K,ne,ze,G,j,H,q,$,ae,re,X,me,de,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=p;return r})();var Hi=()=>["/menu/Order/detail"],Ui=(r,p)=>({Number:r,Outlet:p});function Yi(r,p){if(r&1&&(n(0,"span",17),C(1,"img",18),a(),m(2)),r&2){let o=p.item;l(),s("src",o==null?null:o.Img,k)("alt",o.Name),l(),v(" ",o.Name," ")}}function qi(r,p){if(r&1&&(n(0,"a",33),m(1),a()),r&2){let o=c().$implicit;s("routerLink",te(3,Hi))("queryParams",ie(4,Ui,o.Number,o.Outlet)),l(),f(o.Number)}}function Ki(r,p){if(r&1&&(n(0,"a",34),m(1),a()),r&2){let o=c().$implicit,e=c(2);s("href",e.domain+o.ID,k),l(),f(o.Number)}}function Ji(r,p){if(r&1&&(n(0,"tr")(1,"td"),m(2),a(),n(3,"td"),u(4,qi,2,7,"a",30)(5,Ki,2,2,"a",31),a(),n(6,"td"),m(7),a(),n(8,"td"),m(9),P(10,"number"),a(),n(11,"td"),m(12),P(13,"date"),a(),n(14,"td"),C(15,"app-channel-logo",32),a()()),r&2){let o=p.$implicit,e=c(2);l(2),f(o.Outlet),l(2),s("ngIf",e.hasGuidEmpty(o.ID)),l(),s("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),s("typeId",o.TypeID)}}function $i(r,p){if(r&1){let o=M();D(0),n(1,"div",19)(2,"table",20),b("matSortChange",function(t){_(o);let i=c();return g(i.onSort(t))}),n(3,"thead",21)(4,"tr",22)(5,"th",23),m(6,"Outlet"),a(),n(7,"th",24),m(8,"Order number"),a(),n(9,"th"),m(10,"Customer"),a(),n(11,"th",25),m(12,"Amount"),a(),n(13,"th",26),m(14," Created On "),a(),n(15,"th",27),m(16,"Channel"),a()()(),n(17,"tbody"),u(18,Ji,16,12,"tr",28),a()(),n(19,"app-mat-paginator-no-count",29),b("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),s("ngForOf",o.data),l(),s("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function Xi(r,p){r&1&&(n(0,"div",35),C(1,"app-empty-state"),a())}var ei=(()=>{let p=class p{constructor(e,t,i){this.http=e,this.localDataService=t,this.authService=i,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(i=>{this.data=i.Data,this.sourceData=[...i.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((i,h)=>N.compare(i.Created,h.Created,t))}}};p.\u0275fac=function(t){return new(t||p)(T(B),T(se),T(J))},p.\u0275cmp=V({type:p,selectors:[["app-shipped"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[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,i){if(t&1){let h=M();n(0,"mainpanel",1),b("onSubmit",function(d){return _(h),g(i.Get(d))}),n(1,"filters")(2,"div")(3,"label",2),m(4,"Channel"),a(),n(5,"ng-select",3),w("ngModelChange",function(d){return _(h),x(i.filter.ListChannelID,d)||(i.filter.ListChannelID=d),g(d)}),u(6,Yi,3,3,"ng-template",4),a()(),n(7,"div",5)(8,"label",6),m(9,"Page Number"),a(),n(10,"input",7),w("ngModelChange",function(d){return _(h),x(i.filter.PageNumber,d)||(i.filter.PageNumber=d),g(d)}),a()(),n(11,"div",5)(12,"label",6),m(13,"Page Size"),a(),n(14,"input",8),w("ngModelChange",function(d){return _(h),x(i.filter.PageSize,d)||(i.filter.PageSize=d),g(d)}),a()(),n(15,"div",5)(16,"label",9),m(17,"From/To"),a(),n(18,"div",10)(19,"datepicker",11),w("dateChange",function(d){return _(h),x(i.filter.From,d)||(i.filter.From=d),g(d)}),a()(),n(20,"div")(21,"datepicker",12),w("dateChange",function(d){return _(h),x(i.filter.To,d)||(i.filter.To=d),g(d)}),a()()()(),n(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),u(26,$i,20,4,"ng-container",16)(27,Xi,2,0,"ng-template",null,0,z),a()()()()()}if(t&2){let h=L(28);l(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions),y("ngModel",i.filter.ListChannelID),l(5),y("ngModel",i.filter.PageNumber),l(4),y("ngModel",i.filter.PageSize),l(5),y("date",i.filter.From),l(2),y("date",i.filter.To),l(5),s("ngIf",i.data&&i.data.length>0)("ngIfElse",h)}},dependencies:[R,W,K,ne,G,j,H,q,$,ae,re,X,me,de,le,pe,Q,Y,F]});let r=p;return r})();var Qi=()=>["/menu/Order/detail"],Zi=(r,p)=>({Number:r,Outlet:p});function en(r,p){if(r&1&&(n(0,"span",17),C(1,"img",18),a(),m(2)),r&2){let o=p.item;l(),s("src",o==null?null:o.Img,k)("alt",o.Name),l(),v(" ",o.Name," ")}}function tn(r,p){if(r&1&&(n(0,"a",33),m(1),a()),r&2){let o=c().$implicit;s("routerLink",te(3,Qi))("queryParams",ie(4,Zi,o.Number,o.Outlet)),l(),f(o.Number)}}function nn(r,p){if(r&1&&(n(0,"a",34),m(1),a()),r&2){let o=c().$implicit,e=c(2);s("href",e.customerInfoUrl+o.ID,k),l(),f(o.Number)}}function an(r,p){if(r&1&&(n(0,"tr")(1,"td"),m(2),a(),n(3,"td"),u(4,tn,2,7,"a",30)(5,nn,2,2,"a",31),a(),n(6,"td"),m(7),a(),n(8,"td"),m(9),P(10,"number"),a(),n(11,"td"),m(12),P(13,"date"),a(),n(14,"td"),C(15,"app-channel-logo",32),a()()),r&2){let o=p.$implicit,e=c(2);l(2),f(o.Outlet),l(2),s("ngIf",e.hasGuidEmpty(o.ID)),l(),s("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),s("typeId",o.TypeID)}}function rn(r,p){if(r&1){let o=M();D(0),n(1,"div",19)(2,"table",20),b("matSortChange",function(t){_(o);let i=c();return g(i.onSort(t))}),n(3,"thead",21)(4,"tr",22)(5,"th",23),m(6,"Outlet"),a(),n(7,"th",24),m(8,"Order number"),a(),n(9,"th"),m(10,"Customer"),a(),n(11,"th",25),m(12,"Amount"),a(),n(13,"th",26),m(14," Created On "),a(),n(15,"th",27),m(16,"Channel"),a()()(),n(17,"tbody"),u(18,an,16,12,"tr",28),a()(),n(19,"app-mat-paginator-no-count",29),b("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),s("ngForOf",o.data),l(),s("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function on(r,p){r&1&&(n(0,"div",35),C(1,"app-empty-state"),a())}var ti=(()=>{let p=class p{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(i=>{this.data=i.Data,this.sourceData=[...i.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((i,h)=>N.compare(i.Created,h.Created,t))}}};p.\u0275fac=function(t){return new(t||p)(T(B),T(J))},p.\u0275cmp=V({type:p,selectors:[["app-delivered"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[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,i){if(t&1){let h=M();n(0,"mainpanel",1),b("onSubmit",function(d){return _(h),g(i.Get(d))}),n(1,"filters")(2,"div")(3,"label",2),m(4,"Channel"),a(),n(5,"ng-select",3),w("ngModelChange",function(d){return _(h),x(i.filter.ListChannelID,d)||(i.filter.ListChannelID=d),g(d)}),u(6,en,3,3,"ng-template",4),a()(),n(7,"div",5)(8,"label",6),m(9,"Page Number"),a(),n(10,"input",7),w("ngModelChange",function(d){return _(h),x(i.filter.PageNumber,d)||(i.filter.PageNumber=d),g(d)}),a()(),n(11,"div",5)(12,"label",6),m(13,"Page Size"),a(),n(14,"input",8),w("ngModelChange",function(d){return _(h),x(i.filter.PageSize,d)||(i.filter.PageSize=d),g(d)}),a()(),n(15,"div",5)(16,"label",9),m(17,"From/To"),a(),n(18,"div",10)(19,"datepicker",11),w("dateChange",function(d){return _(h),x(i.filter.From,d)||(i.filter.From=d),g(d)}),a()(),n(20,"div")(21,"datepicker",12),w("dateChange",function(d){return _(h),x(i.filter.To,d)||(i.filter.To=d),g(d)}),a()()()(),n(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),u(26,rn,20,4,"ng-container",16)(27,on,2,0,"ng-template",null,0,z),a()()()()()}if(t&2){let h=L(28);l(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions),y("ngModel",i.filter.ListChannelID),l(5),y("ngModel",i.filter.PageNumber),l(4),y("ngModel",i.filter.PageSize),l(5),y("date",i.filter.From),l(2),y("date",i.filter.To),l(5),s("ngIf",i.data&&i.data.length>0)("ngIfElse",h)}},dependencies:[R,W,K,ne,G,j,H,q,$,ae,re,X,me,de,le,pe,Q,Y,F]});let r=p;return r})();var ln=()=>["/menu/Order/detail"],pn=(r,p)=>({Number:r,Outlet:p});function mn(r,p){if(r&1&&(n(0,"span",19),C(1,"img",20),a(),m(2)),r&2){let o=p.item;l(),s("src",o==null?null:o.Img,k)("alt",o.Name),l(),v(" ",o.Name," ")}}function dn(r,p){if(r&1&&(n(0,"a",36),m(1),a()),r&2){let o=c().$implicit;s("routerLink",te(3,ln))("queryParams",ie(4,pn,o.Number,o.Outlet)),l(),f(o.Number)}}function sn(r,p){if(r&1&&(n(0,"a",37),m(1),a()),r&2){let o=c().$implicit,e=c(2);s("href",e.domain+o.ID,k),l(),f(o.Number)}}function cn(r,p){if(r&1&&(n(0,"tr")(1,"td"),m(2),a(),n(3,"td"),u(4,dn,2,7,"a",33)(5,sn,2,2,"a",34),a(),n(6,"td"),m(7),a(),n(8,"td"),m(9),P(10,"number"),a(),n(11,"td"),m(12),P(13,"date"),a(),n(14,"td"),m(15),a(),n(16,"td"),C(17,"app-channel-logo",35),a()()),r&2){let o=p.$implicit,e=c(2);l(2),f(o.Outlet),l(2),s("ngIf",e.hasGuidEmpty(o.ID)),l(),s("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),s("typeId",o.TypeID)}}function hn(r,p){if(r&1){let o=M();D(0),n(1,"div",21)(2,"table",22),b("matSortChange",function(t){_(o);let i=c();return g(i.onSort(t))}),n(3,"thead",23)(4,"tr",24)(5,"th",25),m(6,"Outlet"),a(),n(7,"th",26),m(8,"Order number"),a(),n(9,"th"),m(10,"Customer"),a(),n(11,"th",27),m(12,"Amount"),a(),n(13,"th",28),m(14," Created On "),a(),n(15,"th",29),m(16,"Status"),a(),n(17,"th",30),m(18,"Channel"),a()()(),n(19,"tbody"),u(20,cn,18,13,"tr",31),a()(),n(21,"app-mat-paginator-no-count",32),b("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),s("ngForOf",o.data),l(),s("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function _n(r,p){r&1&&(n(0,"div",38),C(1,"app-empty-state"),a())}var ii=(()=>{let p=class p{constructor(e,t,i,h){this.http=e,this.localDataService=t,this.authService=i,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(i=>{this.data=i.Data,this.sourceData=[...i.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((i,h)=>N.compare(i.Created,h.Created,t))}}};p.\u0275fac=function(t){return new(t||p)(T(B),T(se),T(J),T(be))},p.\u0275cmp=V({type:p,selectors:[["app-all-order"]],decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[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,i){if(t&1){let h=M();n(0,"mainpanel",1),b("onSubmit",function(d){return _(h),g(i.Get(d))}),n(1,"actions")(2,"button",2),b("click",function(){return _(h),g(i.openExportDialog())}),C(3,"i",3),n(4,"span"),m(5,"Export"),a()()(),n(6,"filters")(7,"div")(8,"label",4),m(9,"Channel"),a(),n(10,"ng-select",5),w("ngModelChange",function(d){return _(h),x(i.filter.ListChannelID,d)||(i.filter.ListChannelID=d),g(d)}),u(11,mn,3,3,"ng-template",6),a()(),n(12,"div",7)(13,"label",8),m(14,"Page Number"),a(),n(15,"input",9),w("ngModelChange",function(d){return _(h),x(i.filter.PageNumber,d)||(i.filter.PageNumber=d),g(d)}),a()(),n(16,"div",7)(17,"label",8),m(18,"Page Size"),a(),n(19,"input",10),w("ngModelChange",function(d){return _(h),x(i.filter.PageSize,d)||(i.filter.PageSize=d),g(d)}),a()(),n(20,"div",7)(21,"label",11),m(22,"From/To"),a(),n(23,"div",12)(24,"datepicker",13),w("dateChange",function(d){return _(h),x(i.filter.From,d)||(i.filter.From=d),g(d)}),a()(),n(25,"div")(26,"datepicker",14),w("dateChange",function(d){return _(h),x(i.filter.To,d)||(i.filter.To=d),g(d)}),a()()()(),n(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,hn,22,4,"ng-container",18)(32,_n,2,0,"ng-template",null,0,z),a()()()()()}if(t&2){let h=L(33);l(10),s("clearable",!0)("multiple",!0)("items",i.channelOptions),y("ngModel",i.filter.ListChannelID),l(5),y("ngModel",i.filter.PageNumber),l(4),y("ngModel",i.filter.PageSize),l(5),y("date",i.filter.From),l(2),y("date",i.filter.To),l(5),s("ngIf",i.data&&i.data.length>0)("ngIfElse",h)}},dependencies:[R,W,K,ne,G,j,H,q,$,ae,re,X,me,de,le,pe,Q,Y,F]});let r=p;return r})();var gn=()=>["/menu/Order/detail"],un=(r,p)=>({Number:r,Outlet:p});function fn(r,p){if(r&1&&(n(0,"span",18),C(1,"img",19),a(),m(2)),r&2){let o=p.item;l(),s("src",o==null?null:o.Img,k)("alt",o.Name),l(),v(" ",o.Name," ")}}function Sn(r,p){if(r&1&&(n(0,"a",34),m(1),a()),r&2){let o=c().$implicit;s("routerLink",te(3,gn))("queryParams",ie(4,un,o.Number,o.Outlet)),l(),f(o.Number)}}function Cn(r,p){if(r&1&&(n(0,"a",35),m(1),a()),r&2){let o=c().$implicit,e=c(2);s("href",e.domain+o.ID,k),l(),f(o.Number)}}function yn(r,p){if(r&1&&(n(0,"tr")(1,"td"),m(2),a(),n(3,"td"),u(4,Sn,2,7,"a",31)(5,Cn,2,2,"a",32),a(),n(6,"td"),m(7),a(),n(8,"td"),m(9),P(10,"number"),a(),n(11,"td"),m(12),P(13,"date"),a(),n(14,"td"),C(15,"app-channel-logo",33),a()()),r&2){let o=p.$implicit,e=c(2);l(2),f(o.Outlet),l(2),s("ngIf",e.hasGuidEmpty(o.ID)),l(),s("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),s("typeId",o.TypeID)}}function xn(r,p){if(r&1){let o=M();D(0),n(1,"div",20)(2,"table",21),b("matSortChange",function(t){_(o);let i=c();return g(i.onSort(t))}),n(3,"thead",22)(4,"tr",23)(5,"th",24),m(6,"Outlet"),a(),n(7,"th",25),m(8,"Order number"),a(),n(9,"th"),m(10,"Customer"),a(),n(11,"th",26),m(12,"Amount"),a(),n(13,"th",27),m(14," Created On "),a(),n(15,"th",28),m(16,"Channel"),a()()(),n(17,"tbody"),u(18,yn,16,12,"tr",29),a()(),n(19,"app-mat-paginator-no-count",30),b("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),s("ngForOf",o.data),l(),s("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function wn(r,p){r&1&&(n(0,"div",36),C(1,"app-empty-state"),a())}var ni=(()=>{let p=class p{constructor(e,t,i){this.http=e,this.localDataService=t,this.authService=i,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(i=>{this.data=i.Data,this.sourceData=[...i.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((i,h)=>N.compare(i.Created,h.Created,t))}}};p.\u0275fac=function(t){return new(t||p)(T(B),T(se),T(J))},p.\u0275cmp=V({type:p,selectors:[["app-cancelled"]],decls:33,vars:11,consts:[["EMPTY_STATE",""],["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[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,i){if(t&1){let h=M();n(0,"mainpanel",1),b("onSubmit",function(d){return _(h),g(i.Get(d))}),n(1,"filters")(2,"div")(3,"label",2),m(4,"Channel"),a(),n(5,"ng-select",3),w("ngModelChange",function(d){return _(h),x(i.filter.ListChannelID,d)||(i.filter.ListChannelID=d),g(d)}),u(6,fn,3,3,"ng-template",4),a()(),n(7,"div",5)(8,"label",6),m(9,"Page Number"),a(),n(10,"input",7),w("ngModelChange",function(d){return _(h),x(i.filter.PageNumber,d)||(i.filter.PageNumber=d),g(d)}),a()(),n(11,"div",5)(12,"label",6),m(13,"Page Size"),a(),n(14,"input",8),w("ngModelChange",function(d){return _(h),x(i.filter.PageSize,d)||(i.filter.PageSize=d),g(d)}),a()(),n(15,"div",5)(16,"label",6),m(17,"Note"),a(),n(18,"input",9),w("ngModelChange",function(d){return _(h),x(i.filter.Note,d)||(i.filter.Note=d),g(d)}),a()(),n(19,"div",5)(20,"label",10),m(21,"From/To"),a(),n(22,"div",11)(23,"datepicker",12),w("dateChange",function(d){return _(h),x(i.filter.From,d)||(i.filter.From=d),g(d)}),a()(),n(24,"div")(25,"datepicker",13),w("dateChange",function(d){return _(h),x(i.filter.To,d)||(i.filter.To=d),g(d)}),a()()()(),n(26,"content")(27,"div",14)(28,"div",15)(29,"div",16),u(30,xn,20,4,"ng-container",17)(31,wn,2,0,"ng-template",null,0,z),a()()()()()}if(t&2){let h=L(32);l(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions),y("ngModel",i.filter.ListChannelID),l(5),y("ngModel",i.filter.PageNumber),l(4),y("ngModel",i.filter.PageSize),l(4),y("ngModel",i.filter.Note),l(5),y("date",i.filter.From),l(2),y("date",i.filter.To),l(5),s("ngIf",i.data&&i.data.length>0)("ngIfElse",h)}},dependencies:[R,W,K,ne,G,j,H,q,$,ae,re,X,me,de,le,pe,Q,Y,F]});let r=p;return r})();var bn=(r,p)=>({"over-due-today":r,"over-due":p}),vn=r=>({"over-due":r});function Tn(r,p){r&1&&(D(0),n(1,"a",19),m(2," Download V2 "),a(),E())}function Dn(r,p){if(r&1){let o=M();D(0),n(1,"div",20)(2,"button",21),b("click",function(){_(o),c();let t=L(12);return g(t.previous())}),m(3," Back "),a(),n(4,"button",22),b("click",function(){_(o);let t=c(),i=L(12);return g(t.onNext(i))}),m(5," Next "),a()(),E()}if(r&2){let o=c();l(4),s("disabled",o.checkDisabledNextFilter())}}function En(r,p){if(r&1){let o=M();D(0),n(1,"button",23),b("click",function(){_(o);let t=c(),i=L(12);return g(t.onNext(i))}),m(2," Next "),a(),E()}if(r&2){let o=c();l(),s("disabled",o.checkDisabledNextFilter())}}function Pn(r,p){if(r&1){let o=M();D(0),n(1,"button",24),b("click",function(){_(o);let t=c(),i=L(12);return g(t.onNew(i))}),C(2,"i",25),m(3," New "),a(),E()}}function In(r,p){r&1&&(C(0,"i",26),n(1,"span"),m(2,"Filter"),a())}function Nn(r,p){if(r&1&&(n(0,"ng-option",36),C(1,"img",37),m(2),a()),r&2){let o=p.$implicit;s("value",o.ID),l(),s("src",o==null?null:o.Img,k),l(),v("",o.Name," ")}}function Mn(r,p){if(r&1){let o=M();n(0,"div",32)(1,"div",28)(2,"h5"),m(3,"Type"),a(),n(4,"p",29),m(5," Select Type want to download "),a()(),n(6,"div",28)(7,"div",38)(8,"div")(9,"mat-radio-group",39),w("ngModelChange",function(t){_(o);let i=c(2);return x(i.downloadType,t)||(i.downloadType=t),g(t)}),n(10,"mat-radio-button",40),m(11," Orders "),a(),n(12,"mat-radio-button",41),m(13," Disbursement "),a()()()(),n(14,"div",42)(15,"div",43),C(16,"i",44),a(),n(17,"p",45),m(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(),s("value",!1),l(2),s("value",!0)}}function On(r,p){r&1&&(n(0,"p",29),m(1," Select Disbursement date "),n(2,"span",46),m(3,"(payment date / order complete date)"),a(),m(4," of the channel you want to download (Max 1 Week). "),a())}function Ln(r,p){r&1&&(n(0,"p",29),m(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function kn(r,p){if(r&1){let o=M();D(0),n(1,"div",47)(2,"app-timepicker",48),w("timeChange",function(t){_(o);let i=c(2);return x(i.timeFrom,t)||(i.timeFrom=t),g(t)}),a(),n(3,"span",49),m(4,"-"),a(),n(5,"app-timepicker",48),w("timeChange",function(t){_(o);let i=c(2);return x(i.timeTo,t)||(i.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,p){if(r&1){let o=M();n(0,"div",27)(1,"div",8)(2,"div",7)(3,"div",28)(4,"h5"),m(5,"Select a Channel"),a(),n(6,"p",29),m(7," Select Channel want to download order "),a()(),n(8,"div",28)(9,"ng-select",30),w("ngModelChange",function(t){_(o);let i=c();return x(i.channelID,t)||(i.channelID=t),g(t)}),b("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"),n(13,"div",32)(14,"div",28)(15,"h5"),m(16,"Date Range"),a(),u(17,On,5,0,"p",29)(18,Ln,2,0,"p",29),a(),n(19,"div",28)(20,"div",8)(21,"mat-date-range-input",33)(22,"input",34),w("ngModelChange",function(t){_(o);let i=c();return x(i.startDate,t)||(i.startDate=t),g(t)}),b("click",function(){_(o);let t=L(25);return g(t.open())}),a(),n(23,"input",35),w("ngModelChange",function(t){_(o);let i=c();return x(i.endDate,t)||(i.endDate=t),g(t)}),b("click",function(){_(o);let t=L(25);return g(t.open())})("ngModelChange",function(){_(o);let t=c();return g(t.onFilterDateChange())}),a()(),C(24,"mat-date-range-picker",null,1),a(),u(26,kn,6,2,"ng-container",5),a()()()()}if(r&2){let o,e=L(25),t=c();l(9),s("clearable",!1),y("ngModel",t.channelID),l(),s("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),s("rangePicker",e),l(),y("ngModel",t.startDate),l(),y("ngModel",t.endDate),l(3),s("ngIf",t.showTimePicker)}}function Fn(r,p){r&1&&(C(0,"i",50),n(1,"span"),m(2,"Preview"),a())}function An(r,p){if(r&1&&(n(0,"th",72),m(1),a()),r&2){let o=c(3);l(),v(" ",o.currentChannel?"Created Date":"Last Status Update"," ")}}function Rn(r,p){if(r&1&&(n(0,"td"),m(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,p){if(r&1&&(n(0,"span"),m(1),a()),r&2){let o=c().$implicit;l(),v(" ",o.ActionString," ")}}function Bn(r,p){if(r&1&&(n(0,"li"),m(1),a()),r&2){let o=p.$implicit;l(),v(" ",o," ")}}function zn(r,p){if(r&1&&(n(0,"ul",77),u(1,Bn,2,1,"li",73),a()),r&2){let o=c().$implicit;l(),s("ngForOf",o.ActionString)}}function Gn(r,p){if(r&1&&(n(0,"span",78),C(1,"i",79),a()),r&2){let o=c().$implicit;ot("title","Delivery : ",o.DeliveryState,`
5
5
  Payment : `,o.PaymentState,"")}}function jn(r,p){if(r&1&&(n(0,"tr")(1,"td"),m(2),a(),n(3,"td"),m(4),a(),u(5,Rn,3,4,"td",5),n(6,"td")(7,"span"),m(8),a(),m(9),a(),n(10,"td",74)(11,"span"),m(12),a(),m(13),a(),n(14,"td"),u(15,Wn,2,1,"span",5)(16,zn,2,1,"ul",75),a(),n(17,"td"),u(18,Gn,2,3,"span",76),a()()),r&2){let o=p.$implicit,e=p.index,t=c(4);l(2),f(e+1),l(2),f(o.Number),l(),s("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(),s("ngClass",ie(12,bn,(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),s("ngIf",o.ActionString.length==1),l(),s("ngIf",o.ActionString.length>1),l(2),s("ngIf",o.ChannelStatus!=99&&o.POSStatus!=99)}}function Hn(r,p){if(r&1&&(D(0),u(1,jn,19,15,"tr",73),E()),r&2){let o=c(3);l(),s("ngForOf",o.displayedPreviewData)}}function Un(r,p){r&1&&(n(0,"tr",80)(1,"td",81)(2,"div",82),C(3,"i",83),a(),n(4,"h4",84),m(5," There is no order to processed "),a()()())}function Yn(r,p){if(r&1){let o=M();n(0,"div",52)(1,"div",53)(2,"div",54)(3,"div",55)(4,"div")(5,"ul",56)(6,"li",57)(7,"button",58),b("click",function(){_(o);let t=c(2);return g(t.filterPreviewData(t.previewStatus.ALL))}),m(8),a()(),n(9,"li",59)(10,"button",60),b("click",function(){_(o);let t=c(2);return g(t.filterPreviewData(t.previewStatus.SYNC))}),m(11),a()(),n(12,"li",59)(13,"button",61),b("click",function(){_(o);let t=c(2);return g(t.filterPreviewData(t.previewStatus.WRONG))}),m(14),a()(),n(15,"li",59)(16,"button",62),b("click",function(){_(o);let t=c(2);return g(t.filterPreviewData(t.previewStatus.UNSYNC))}),m(17),a()()()(),n(18,"div")(19,"button",63),b("click",function(){_(o);let t=c(2);return g(t.exportOrders())}),C(20,"i",64),n(21,"span"),m(22,"Export"),a()()()()(),n(23,"table",65)(24,"thead",66)(25,"tr"),C(26,"th",67),n(27,"th",68),m(28,"Number"),a(),u(29,An,2,1,"th",69),n(30,"th",70),m(31,"Channel Status"),a(),n(32,"th",70),m(33,"POS Status"),a(),n(34,"th"),m(35,"Action"),a(),C(36,"th",67),a()(),n(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=L(40),e=c(2);l(7),s("ngClass",e.pillStatus=="all"?"btn-secondary text-white":"btn-outline-dark"),l(),v(" All (",e.allData,") "),l(2),s("ngClass",e.pillStatus=="sync"?"btn-success":"btn-outline-success"),l(),v(" Existing (",e.syncData,") "),l(2),s("ngClass",e.pillStatus=="wrong"?"btn-warning text-white":"btn-outline-warning"),l(),v(" Wrong Status (",e.wrongData,") "),l(2),s("ngClass",e.pillStatus=="unsync"?"btn-danger":"btn-outline-danger"),l(),v(" Missing (",e.unsyncData,") "),l(12),s("ngIf",(e.currentChannel==null?null:e.currentChannel.TypeID)!=e.channelType.Shopee&&(e.currentChannel==null?null:e.currentChannel.TypeID)!==e.channelType.Tiktok),l(9),s("ngIf",e.displayedPreviewData.length>0)("ngIfElse",o)}}function qn(r,p){if(r&1&&u(0,Yn,41,11,"div",51),r&2){let o=c();s("ngIf",o.currentState=="preview")}}function Kn(r,p){r&1&&(C(0,"i",85),n(1,"span"),m(2,"Finish"),a())}function Jn(r,p){if(r&1&&(n(0,"tr",87)(1,"td"),m(2),a(),n(3,"td"),m(4),a(),n(5,"td"),m(6),a(),n(7,"td"),m(8),a()()),r&2){let o=p.$implicit,e=p.index;s("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,p){if(r&1&&(D(0),u(1,Jn,9,7,"tr",86),E()),r&2){let o=c(3);l(),s("ngForOf",o.downloadData)}}function Xn(r,p){r&1&&(n(0,"tr",80)(1,"td",81)(2,"div",82),C(3,"i",83),a(),n(4,"h4",84),m(5," There is no order to processed "),a()()())}function Qn(r,p){if(r&1&&(n(0,"div",52)(1,"div",53)(2,"table",65)(3,"thead",66)(4,"tr"),C(5,"th",67),n(6,"th"),m(7,"Order Number"),a(),n(8,"th"),m(9,"Status"),a(),n(10,"th"),m(11,"Exception"),a()()(),n(12,"tbody"),u(13,$n,2,1,"ng-container",71)(14,Xn,6,0,"ng-template",null,3,z),a()()()()),r&2){let o=L(15),e=c(2);l(13),s("ngIf",(e.downloadData==null?null:e.downloadData.length)>0)("ngIfElse",o)}}function Zn(r,p){if(r&1&&u(0,Qn,16,2,"div",51),r&2){let o=c();s("ngIf",o.currentState=="finish")}}function ea(r,p){r&1&&(n(0,"h6"),m(1,"1"),a())}function ta(r,p){r&1&&(n(0,"h6"),m(1,"2"),a())}function ia(r,p){r&1&&(n(0,"h6"),m(1,"3"),a())}var ee=function(r){return r.ALL="all",r.SYNC="sync",r.WRONG="wrong",r.UNSYNC="unsync",r}(ee||{}),ai=(()=>{let p=class p{constructor(e,t,i,h,S,d,Pe){this.http=e,this.toastr=t,this.datePipe=i,this.url=h,this.productService=S,this.orderService=d,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(i=>{this.downloadData=i.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(i=>{if(i.Data.length==0){this.toastrEmptyPreview();return}this.cacheKey=i.cacheKey,this.previewData=i.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"),i=this.showTimePicker?this.timeFrom+":00":"",h=this.showTimePicker?this.timeTo+":00":"";this.toastr.info(`There is no orders from ${e} ${i} 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),i=this.datePipe.transform(this.endDate,"dd MMM yyyy");return`${e==null?"":t+"-"} ${i}`}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),i=[];this.currentChannel.TypeID==I.Tokopedia&&(i=this.filterDataByStatus(ee.SYNC)),this.downloadedPreviewData=[...i,...e,...t]}filterDataByStatus(e){let t=[];switch(e){case ee.ALL:t=this.previewData;break;case ee.SYNC:t=this.previewData.filter(i=>i.Action==Ie.DoNothing);break;case ee.WRONG:t=this.previewData.filter(i=>i.Action==Ie.Update);break;case ee.UNSYNC:t=this.previewData.filter(i=>i.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}};p.\u0275fac=function(t){return new(t||p)(T(B),T(we),T(F),T(We),T(Mt),T(ve),T(J))},p.\u0275cmp=V({type:p,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,i){if(t&1){let h=M();n(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(),n(6,"content")(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"mat-stepper",10,0),b("selectionChange",function(d){return _(h),g(i.stepChange(d))})("selectionChange",function(d){return _(h),g(i.onStepperChange(d))}),n(13,"mat-step",11),u(14,In,3,0,"ng-template",12)(15,Vn,27,11,"ng-template",13),a(),n(16,"mat-step",14),u(17,Fn,3,0,"ng-template",12)(18,qn,1,1,"ng-template",13),a(),n(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=L(12);s("headerTitle",i.pageTitle)("description",i.pageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),s("ngIf",i.currentState=="filter"),l(),s("ngIf",i.currentState=="preview"),l(),s("ngIf",i.currentState=="filter"),l(),s("ngIf",i.currentState=="finish"),l(6),rt("ngClass","last-edited-step-"+h.selectedIndex),l(2),s("editable",i.currentState!="finish")("completed",!1),l(3),s("editable",i.currentState!="finish")("completed",!1)}},dependencies:[dt,R,W,K,G,j,H,q,$,ht,kt,Ot,Lt,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=p;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-PLOBHIRC.js").then(r=>r.DownloadV2Component)},canActivate:[oe],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-4IZSVUMG.js").then(r=>r.DownloadOrderLogComponent),canActivate:[oe],data:{title:"Download Order Log"}},{path:"Download_Order_Log/Detail",loadComponent:()=>import("./chunk-OKR5PVTL.js").then(r=>r.DownloadOrderDetailComponent),canActivate:[oe],data:{title:"Download Order Log Detail"}}]}],ri=(()=>{let p=class p{};p.\u0275fac=function(t){return new(t||p)},p.\u0275mod=Re({type:p}),p.\u0275inj=Ae({imports:[xe,Be.forChild(na)]});let r=p;return r})();var mo=(()=>{let p=class p{};p.\u0275fac=function(t){return new(t||p)},p.\u0275mod=Re({type:p}),p.\u0275inj=Ae({providers:[ve,je,Ue],imports:[xe,ct,ri,Dt,wt,Rt,Be,_t,Ft,gt,X,Ut,ft,vt,qt,xt,Nt,bt,Q,Ye,Ge,It]});let r=p;return r})();export{mo as OrdersModule};
8
+ `],encapsulation:2});let r=p;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-YEYUZNK7.js").then(r=>r.DownloadV2Component)},canActivate:[oe],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-B37WXGPN.js").then(r=>r.DownloadOrderLogComponent),canActivate:[oe],data:{title:"Download Order Log"}},{path:"Download_Order_Log/Detail",loadComponent:()=>import("./chunk-OKR5PVTL.js").then(r=>r.DownloadOrderDetailComponent),canActivate:[oe],data:{title:"Download Order Log Detail"}}]}],ri=(()=>{let p=class p{};p.\u0275fac=function(t){return new(t||p)},p.\u0275mod=Re({type:p}),p.\u0275inj=Ae({imports:[xe,Be.forChild(na)]});let r=p;return r})();var mo=(()=>{let p=class p{};p.\u0275fac=function(t){return new(t||p)},p.\u0275mod=Re({type:p}),p.\u0275inj=Ae({providers:[ve,je,Ue],imports:[xe,ct,ri,Dt,wt,Rt,Be,_t,Ft,gt,X,Ut,ft,vt,qt,xt,Nt,bt,Q,Ye,Ge,It]});let r=p;return r})();export{mo as OrdersModule};
@@ -1 +1 @@
1
- import"./chunk-VNQI4F33.js";import{a as Ue}from"./chunk-44YUSAMN.js";import{a as X}from"./chunk-XHAXYWZ7.js";import{a as Ae,b as We,c as te}from"./chunk-B5PFUQJP.js";import{a as xe}from"./chunk-BVIRHZTZ.js";import{a as $e}from"./chunk-6UBPPQKL.js";import{a as Ne}from"./chunk-7KG3DC5J.js";import{b as Re}from"./chunk-AMSVLO4N.js";import{a as Le}from"./chunk-N6IHFFFZ.js";import"./chunk-PD4CUVAW.js";import"./chunk-JXTGH22T.js";import"./chunk-GCKSYCMI.js";import{a as ke}from"./chunk-ZFQW5CVZ.js";import"./chunk-ADRVUMMW.js";import{a as De,b as Oe,c as Ve}from"./chunk-UMNGKENU.js";import{a as Be}from"./chunk-XFTUE2ST.js";import"./chunk-HCDKYABV.js";import{a as ye,b as Ie,d as we,e as Fe}from"./chunk-CCXKODFV.js";import{i as K}from"./chunk-57TBVBTT.js";import{b as Pe,e as be}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{d as Me,m as Ee,n as Te}from"./chunk-BO4PPSB5.js";import{t as H,u as J}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{a as Ce,b as fe,h as k,m as B,y as L}from"./chunk-BSN7ZAXG.js";import{c as G,e as Se,f as ve}from"./chunk-64G3XLI6.js";import"./chunk-OVEJFFL6.js";import{$b as g,Bd as he,Cd as N,Da as C,Ea as f,Eb as u,G as Z,Gb as s,Gc as y,Hc as T,Ic as de,Jb as ce,Jc as ee,Ma as Y,Nb as W,Ob as R,Pa as re,Qb as $,Rb as U,Sb as r,Tb as l,Ub as P,Vb as I,Wb as w,Yb as b,Z as q,bc as m,ea as ae,ec as se,gb as S,jb as c,kb as v,mc as Q,nc as p,oc as me,pa as A,pc as x,rc as F,sc as M,sd as _e,ta as D,tc as E,uc as j,ud as z,v as oe,vc as O,vd as ue,xb as le,xc as V,yc as pe,yd as ge}from"./chunk-PQDPS2ID.js";import{a as ne,b as ie}from"./chunk-GNOSNGXM.js";var qe=(n,a)=>({color:n,"font-weight":a});function Ye(n,a){if(n&1&&(r(0,"mat-radio-button",2),p(1),l()),n&2){let i=a.$implicit,o=a.index,e=m();ce(pe(7,qe,e.model==i.Key&&e.activeBold?"#0976b4":"",e.model==i.Key&&e.activeBold?"700":"")),s("disabled",e.exception==i.Value)("matTooltip",e.title.length>0?e.title[o]:"")("value",i.Key)("name",e.name),c(),x("",i.Value," ")}}var Ge=(()=>{let a=class a{constructor(){this.disabled=!1,this.modelChange=new re,this.options=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"}],this.border=!1,this.name="",this.title=[],this.exception="",this.activeBold=""}change(o){this.modelChange.emit(o)}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=D({type:a,selectors:[["lib-radio-options"]],inputs:{model:"model",disabled:"disabled",options:"options",border:"border",name:"name",title:"title",exception:"exception",activeBold:"activeBold"},outputs:{modelChange:"modelChange"},standalone:!0,features:[O],decls:2,vars:3,consts:[["color","primary",3,"ngModelChange","disabled","ngModel"],["matTooltipPosition","above","class","me-4 mt-1",3,"style","disabled","matTooltip","value","name",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"me-4","mt-1",3,"disabled","matTooltip","value","name"]],template:function(e,t){e&1&&(r(0,"mat-radio-group",0),g("ngModelChange",function(_){return t.change(_)}),u(1,Ye,2,10,"mat-radio-button",1),l()),e&2&&(s("disabled",t.disabled)("ngModel",t.model),c(),s("ngForOf",t.options))},dependencies:[N,z,Ve,De,Oe,L,k,B,J,H],styles:["html[_ngcontent-%COMP%]{--mdc-radio-state-layer-size: 36px;--mat-radio-touch-target-display: block}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled:checked + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__outer-circle[_ngcontent-%COMP%]{border-color:#0976b4!important}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__inner-circle[_ngcontent-%COMP%]{background-color:#0976b4!important;border-color:#0976b4!important}"]});let n=a;return n})();function Qe(n,a){if(n&1&&(r(0,"span",3),P(1,"img",4),l(),r(2,"span"),p(3),l()),n&2){let i=a.item;c(),s("src",i==null?null:i.Img,S),c(2),x(" ",i.Name," ")}}function et(n,a){if(n&1){let i=b();r(0,"span",6),g("click",function(){C(i);let e=m(),t=e.item,d=e.clear;return f(d(t))}),p(1,"x"),l()}}function tt(n,a){if(n&1&&(r(0,"span",3),P(1,"img",4),l(),r(2,"span"),p(3),l(),u(4,et,2,0,"span",5)),n&2){let i=a.item,o=m();c(),s("src",i==null?null:i.Img,S),c(2),x(" ",i.Name," "),c(),W(o.clearable()?4:-1)}}var Ke=(()=>{let a=class a{constructor(){this.authService=A(K),this.multiple=Y(!1),this.clearable=Y(!0),this.options=this.authService.getChannels(),this.onChange=o=>{}}onChannelChange(o){this.onChange(o)}writeValue(o){this.selectedChannels=o}registerOnChange(o){this.onChange=o}registerOnTouched(o){}setDisabledState(o){}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=D({type:a,selectors:[["channel-select-options"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"]},standalone:!0,features:[j([{provide:Ce,multi:!0,useExisting:a}]),O],decls:3,vars:4,consts:[["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel","multiple"],["ng-option-tmp",""],["ng-label-tmp",""],[1,"me-2"],[2,"width","18px",3,"src"],["aria-hidden","true",1,"ng-value-icon","right"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"]],template:function(e,t){e&1&&(r(0,"ng-select",0),E("ngModelChange",function(_){return M(t.selectedChannels,_)||(t.selectedChannels=_),_}),g("ngModelChange",function(_){return t.onChannelChange(_)}),u(1,Qe,4,2,"ng-template",1)(2,tt,5,3,"ng-template",2),l()),e&2&&(s("clearable",t.clearable())("items",t.options),F("ngModel",t.selectedChannels),s("multiple",t.multiple()))},dependencies:[N,Fe,we,ye,Ie,L,k,B]});let n=a;return n})();var He=n=>[n],nt=n=>({"text-decoration-line-through":n}),it=n=>({"border-bottom":n}),ot=n=>({"bg-gradient-warning":n});function at(n,a){if(n&1){let i=b();I(0),r(1,"div")(2,"label",21),p(3,"Channel"),l(),r(4,"channel-select-options",22),E("ngModelChange",function(e){C(i);let t=m();return M(t.searchFilter.ListChannelID,e)||(t.searchFilter.ListChannelID=e),f(e)}),l()(),r(5,"div",23)(6,"label",24),p(7,"Filter by"),l(),r(8,"lib-radio-options",25),E("modelChange",function(e){C(i);let t=m();return M(t.searchFilter.filterModel,e)||(t.searchFilter.filterModel=e),f(e)}),l()(),w()}if(n&2){let i=m();c(4),s("multiple",!0),F("ngModel",i.searchFilter.ListChannelID),c(4),F("model",i.searchFilter.filterModel),s("options",i.filterTypeOptions)}}function rt(n,a){if(n&1){let i=b();r(0,"button",27),g("click",function(){C(i);let e=m().ngIf,t=m();return f(t.onUpdateItems(e))}),P(1,"i",28),p(2," Update "),l()}}function lt(n,a){if(n&1&&(I(0),r(1,"div",4),u(2,rt,3,0,"button",26),l(),w()),n&2){let i=a.ngIf,o=m();c(2),s("ngIf",o.productService.hasSelectionVariant(i))}}function ct(n,a){if(n&1&&(r(0,"th",15)(1,"div",29),P(2,"img",30),r(3,"div",31),p(4),y(5,"stringLimit"),l()()()),n&2){let i=a.$implicit;c(),s("matTooltip",(i.Name==null?null:i.Name.length)>20?i.Name:""),c(),s("src",i==null?null:i.Img,S),c(2),x(" ",de(5,3,i.Name,20)," ")}}function st(n,a){if(n&1){let i=b();r(0,"th")(1,"input",32),E("ngModelChange",function(e){C(i);let t=m();return M(t.checkboxState,e)||(t.checkboxState=e),f(e)}),g("ngModelChange",function(){C(i);let e=m();return f(e.onSelectAllData())}),l()()}if(n&2){let i=m();c(),F("ngModel",i.checkboxState)}}function mt(n,a){n&1&&(r(0,"th",33)(1,"span"),p(2,"Expected"),l(),r(3,"span",34),p(4,"(POS)"),l()(),r(5,"th",33),p(6,"Channel"),l())}function pt(n,a){if(n&1){let i=b();r(0,"img",47),g("click",function(e){C(i);let t=m(3).$implicit,d=m(2);return f(d.onZoomImage(e,t==null?null:t.ImageUrl))}),l()}if(n&2){let i=m(3).$implicit;se("src",i==null?null:i.ImageUrl,S)}}function dt(n,a){n&1&&P(0,"img",48)}function _t(n,a){if(n&1&&(r(0,"small",46),p(1),l()),n&2){let i=m(3).$implicit;c(),x("(",i==null?null:i.Category,")")}}function ut(n,a){if(n&1&&(I(0),r(1,"td",42),u(2,pt,1,1,"img",43)(3,dt,1,0,"ng-template",null,0,ee),l(),r(5,"td",44)(6,"h5",45),p(7),l(),u(8,_t,2,1,"small",46),l(),w()),n&2){let i=Q(4),o=m().$index,e=m().$implicit,t=m().ngIf;c(),s("rowSpan",e==null?null:e.Variants.length)("ngClass",V(7,it,o+1==t.length)),c(),s("ngIf",e==null?null:e.ImageUrl)("ngIfElse",i),c(3),s("rowSpan",e==null?null:e.Variants.length),c(2),me(e==null?null:e.Name),c(),W(e!=null&&e.Category?8:-1)}}function gt(n,a){if(n&1){let i=b();r(0,"td",49)(1,"input",32),E("ngModelChange",function(e){C(i);let t=m().$implicit;return M(t.selected,e)||(t.selected=e),f(e)}),l()()}if(n&2){let i=m().$implicit;c(),F("ngModel",i.selected)}}function ht(n,a){if(n&1){let i=b();I(0),r(1,"td",51),p(2),y(3,"number"),l(),r(4,"td",52),g("click",function(){let e=C(i).$implicit,t=m(2).$implicit,d=m().$implicit,_=m(2);return f(_.openTableDialog(t,d,e))}),r(5,"div",53)(6,"div",54),p(7),y(8,"number"),l(),r(9,"a",55),g("click",function(e){return C(i),f(e==null?null:e.stopPropagation())}),P(10,"i",40),l()()(),w()}if(n&2){let i=a.$implicit;c(2),x(" ",T(3,4,i.PriceExpected)," "),c(2),s("ngClass",V(8,ot,i.Price!=i.PriceExpected)),c(3),x(" ",T(8,6,i.Price)," "),c(2),s("href",i.Url,S)}}function Ct(n,a){n&1&&(r(0,"td",56),p(1," X "),l(),r(2,"td",56),p(3," X "),l())}function ft(n,a){if(n&1&&(I(0),u(1,ht,11,10,"ng-container",50)(2,Ct,4,0,"ng-template",null,1,ee),w()),n&2){let i=a.$implicit,o=Q(3),e=m().$implicit,t=m(3);c(),s("ngIf",t.getItemFromChannel(e,i.ID))("ngIfElse",o)}}function xt(n,a){if(n&1&&(r(0,"tr"),u(1,ut,9,9,"ng-container",3),r(2,"td",35),p(3),l(),r(4,"td",36)(5,"div",37)(6,"div",38),p(7),l(),r(8,"div",31)(9,"a",39),P(10,"i",40),l()()()(),u(11,gt,2,1,"ng-template",19)(12,ft,4,2,"ng-container",41),l()),n&2){let i=a.$implicit,o=a.$index,e=m(3);c(),s("ngIf",o==0),c(2),x(" ",i==null?null:i.Model," "),c(),s("matTooltip",i.Discontinued?e.discontinuedVariantMsg:""),c(2),s("ngClass",V(8,nt,i.Discontinued)),c(),x(" ",i==null?null:i.Code," "),c(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(i==null?null:i.ID),S),c(2),s("ngxPermissionsOnly",V(10,He,e.rolePriceEdit)),c(),s("ngForOf",e.channels())}}function Pt(n,a){if(n&1&&(r(0,"tbody"),$(1,xt,13,12,"tr",null,R),l()),n&2){let i=a.$implicit;c(),U(i.Variants)}}function bt(n,a){if(n&1&&(I(0),$(1,Pt,3,0,"tbody",null,R),w()),n&2){let i=a.ngIf;c(),U(i)}}var xn=(()=>{let a=class a{constructor(o,e,t,d,_,h,Je){this.http=o,this.toastr=e,this.dialog=t,this.productService=d,this.authService=_,this.biggerPictureService=h,this.paginationService=Je,this.infinitePagination=A(te),this.searchFilter=new Ne,this.checkboxState=!1,this.rolePriceEdit=xe.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.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.channels=le([]),this.filterTypeOptions=[{Key:X.ALL,Value:"All"},{Key:X.DIFFERENCE,Value:"Difference"}],this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPagination(),this.initChannelTable()}initChannelTable(){let o=this.searchFilter.ListChannelID,e=[];G.IsEmpty(o)||o?.length==0?e=this.channelOptions:e=this.channelOptions.filter(t=>o.findIndex(d=>d==t.ID)>-1),this.channels.update(()=>e)}initPagination(){this.infinitePagination.fetchDataEndpoint="Price/GetOutletPrice",this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.infinitePagination.data$.pipe(q(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe(ae(o=>{this.searchFilter=o.Filter,this.searchFilter.filterModel=X.ALL,this.infinitePagination.reloadPagination(this.searchFilter)}),q(1))}onSelectAllData(){this.data$=this.data$.pipe(oe(o=>(o.map(e=>(e.Variants&&(e.Variants=e.Variants.map(t=>(t.selected=this.checkboxState,t))),e)),o)))}onFilter(o){this.searchFilter.text=o;let e=ie(ne({},this.searchFilter),{text:o,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount});this.initChannelTable(),this.infinitePagination.reloadPagination(e)}updatePrice(o){let e=this.productService.selectedVariantProduct(o);if(e.length>0){let t=e.map(h=>h.ID),_={ListChannelID:this.channelOptions.filter(h=>h.selected).map(h=>h.ID),ListID:t};this.http.post("/api/Price/UpdateChannelOutletPrice",_).subscribe({next:h=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+_.ListID.length+" items in "+_.ListChannelID.length+" channels","Success")},error:h=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(o=>(o.selected=!1,o))}getItemFromChannel(o,e){return o.Channel.find(t=>t.ChannelID==e)}onUpdateItems(o){let e=this.productService.selectedVariantProduct(o);this.dialog.open(Ue,{data:{selectedItems:e,channels:this.channelOptions},width:"600px"}).afterClosed().pipe(Z(t=>G.IsNotEmpty(t))).subscribe(t=>{this.channelOptions=t,this.updatePrice(o)})}openTableDialog(o,e,t){let d=JSON.parse(JSON.stringify(o));this.dialog.open(Ae,{data:{Name:e.Name,Variant:d,ChannelID:t?.ChannelID,Table:"price",ChannelItemID:t?.ChannelItemID}}).afterClosed().pipe(Z(h=>G.IsNotEmpty(h))).subscribe(h=>{this.updateProductPrice(h,t)})}updateProductPrice(o,e){let t={ID:o.ChannelID,ChannelItemID:o.ChannelItemID,ChannelVariantID:o.ChannelVariationID,Price:parseFloat(o.Price),VariantID:o.ID,SKU:o.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(d=>{e.Price=t.Price;let _=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success(`Successfully updated ${o.ItemName} (${o.VarName}) inventory in ${_.Name} to ${t.Price}`,"Success")})}openExportDialog(){this.dialog.open(Re,{data:{title:"Export Custom Channel Price",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportOutletPrice"}}).afterClosed().subscribe()}onZoomImage(o,e){this.biggerPictureService.openBiggerPicture(o,e)}};a.\u0275fac=function(e){return new(e||a)(v(be),v(Pe),v(Me),v(ke),v(K),v(Be),v($e))},a.\u0275cmp=D({type:a,selectors:[["app-custom-channel-price"]],standalone:!0,features:[j([te]),O],decls:38,vars:23,consts:[["elsePic",""],["elseCol",""],["headerTitle","Price Comparison",3,"onSubmit","hideSearchBox","hideSearchDropdown","textButton"],[4,"ngIf"],[1,"d-flex"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"channel-column"],["colspan","5"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","text-uppercase"],["scope","col","colspan","2",1,"text-center","w-25"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5",2,"height","46px"],[1,"fw-bold","mb-2","d-block"],["name","filterModel",3,"modelChange","model","options"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-end","border-bottom",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[4,"ngFor","ngForOf"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],[1,"text-start","border-bottom",2,"padding-left","0px",3,"rowSpan"],[1,"mb-0","item-name"],[1,"mt-1"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],[4,"ngIf","ngIfElse"],[1,"text-end","border"],[1,"text-center","border","pointer","cell-hover",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2"],["target","_blank",3,"click","href"],[1,"table-white","border","text-end",2,"color","red"]],template:function(e,t){e&1&&(r(0,"mainpanel",2),g("onSubmit",function(_){return t.onFilter(_)}),r(1,"filters"),u(2,at,9,4,"ng-container",3),y(3,"async"),l(),r(4,"actions")(5,"div",4),u(6,lt,3,1,"ng-container",3),y(7,"async"),r(8,"button",5),g("click",function(){return t.openExportDialog()}),P(9,"i",6),r(10,"span"),p(11,"Export"),l()()()(),r(12,"content")(13,"div",7)(14,"div",8)(15,"div",9)(16,"div",10)(17,"table",11)(18,"thead",12)(19,"tr",13),P(20,"th",14),$(21,ct,6,6,"th",15,R),l(),r(23,"tr")(24,"th",16)(25,"span"),p(26," Product "),l()(),r(27,"th",17),p(28,"Variant"),l(),r(29,"th",18),p(30,"SKU"),l(),u(31,st,2,1,"ng-template",19),$(32,mt,7,0,null,null,R),l()(),u(34,bt,3,0,"ng-container",3),y(35,"async"),l(),r(36,"infinite-paginator",20),y(37,"async"),g("onNextPage",function(){return t.infinitePagination.onNextPage(t.searchFilter)})("onLastPage",function(){return t.infinitePagination.onLastPage(t.searchFilter)})("onGetRowCount",function(){return t.infinitePagination.getRowCount(t.searchFilter)}),l()()()()()()()),e&2&&(s("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),c(2),s("ngIf",T(3,13,t.loader$)),c(4),s("ngIf",T(7,15,t.data$)),c(15),U(t.channels()),c(10),s("ngxPermissionsOnly",V(21,He,t.rolePriceEdit)),c(),U(t.channels()),c(2),s("ngIf",T(35,17,t.data$)),c(2),s("totalData",t.infinitePagination.totalData())("hideCount",t.infinitePagination.hideCount())("rowCount",T(37,19,t.infinitePagination.totalRowCount$))("pageNumber",t.infinitePagination.pageNumber())("disableNextButton",t.infinitePagination.disableNextButton())("goToLastPage",t.infinitePagination.isLastPage()))},dependencies:[N,_e,z,ue,ge,he,Te,Ee,L,fe,k,B,We,Ge,J,H,Le,ve,Se,Ke],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]});let n=a;return n})();export{xn as CustomChannelPriceComponent};
1
+ import"./chunk-CS5RLQNE.js";import{a as Ue}from"./chunk-7LZ5ZSXM.js";import{a as X}from"./chunk-XHAXYWZ7.js";import{a as Ae,b as We,c as te}from"./chunk-B5PFUQJP.js";import{a as xe}from"./chunk-BVIRHZTZ.js";import{a as $e}from"./chunk-6UBPPQKL.js";import{a as Ne}from"./chunk-7KG3DC5J.js";import{b as Re}from"./chunk-AMSVLO4N.js";import{a as Le}from"./chunk-N6IHFFFZ.js";import"./chunk-PD4CUVAW.js";import"./chunk-JXTGH22T.js";import"./chunk-GCKSYCMI.js";import{a as ke}from"./chunk-ZFQW5CVZ.js";import"./chunk-ADRVUMMW.js";import{a as De,b as Oe,c as Ve}from"./chunk-UMNGKENU.js";import{a as Be}from"./chunk-XFTUE2ST.js";import"./chunk-HCDKYABV.js";import{a as ye,b as Ie,d as we,e as Fe}from"./chunk-CCXKODFV.js";import{i as K}from"./chunk-SHUDM2FU.js";import{b as Pe,e as be}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{d as Me,m as Ee,n as Te}from"./chunk-BO4PPSB5.js";import{t as H,u as J}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{a as Ce,b as fe,h as k,m as B,y as L}from"./chunk-BSN7ZAXG.js";import{c as G,e as Se,f as ve}from"./chunk-64G3XLI6.js";import"./chunk-OVEJFFL6.js";import{$b as g,Bd as he,Cd as N,Da as C,Ea as f,Eb as u,G as Z,Gb as s,Gc as y,Hc as T,Ic as de,Jb as ce,Jc as ee,Ma as Y,Nb as W,Ob as R,Pa as re,Qb as $,Rb as U,Sb as r,Tb as l,Ub as P,Vb as I,Wb as w,Yb as b,Z as q,bc as m,ea as ae,ec as se,gb as S,jb as c,kb as v,mc as Q,nc as p,oc as me,pa as A,pc as x,rc as F,sc as M,sd as _e,ta as D,tc as E,uc as j,ud as z,v as oe,vc as O,vd as ue,xb as le,xc as V,yc as pe,yd as ge}from"./chunk-PQDPS2ID.js";import{a as ne,b as ie}from"./chunk-GNOSNGXM.js";var qe=(n,a)=>({color:n,"font-weight":a});function Ye(n,a){if(n&1&&(r(0,"mat-radio-button",2),p(1),l()),n&2){let i=a.$implicit,o=a.index,e=m();ce(pe(7,qe,e.model==i.Key&&e.activeBold?"#0976b4":"",e.model==i.Key&&e.activeBold?"700":"")),s("disabled",e.exception==i.Value)("matTooltip",e.title.length>0?e.title[o]:"")("value",i.Key)("name",e.name),c(),x("",i.Value," ")}}var Ge=(()=>{let a=class a{constructor(){this.disabled=!1,this.modelChange=new re,this.options=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"}],this.border=!1,this.name="",this.title=[],this.exception="",this.activeBold=""}change(o){this.modelChange.emit(o)}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=D({type:a,selectors:[["lib-radio-options"]],inputs:{model:"model",disabled:"disabled",options:"options",border:"border",name:"name",title:"title",exception:"exception",activeBold:"activeBold"},outputs:{modelChange:"modelChange"},standalone:!0,features:[O],decls:2,vars:3,consts:[["color","primary",3,"ngModelChange","disabled","ngModel"],["matTooltipPosition","above","class","me-4 mt-1",3,"style","disabled","matTooltip","value","name",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"me-4","mt-1",3,"disabled","matTooltip","value","name"]],template:function(e,t){e&1&&(r(0,"mat-radio-group",0),g("ngModelChange",function(_){return t.change(_)}),u(1,Ye,2,10,"mat-radio-button",1),l()),e&2&&(s("disabled",t.disabled)("ngModel",t.model),c(),s("ngForOf",t.options))},dependencies:[N,z,Ve,De,Oe,L,k,B,J,H],styles:["html[_ngcontent-%COMP%]{--mdc-radio-state-layer-size: 36px;--mat-radio-touch-target-display: block}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled:checked + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__outer-circle[_ngcontent-%COMP%]{border-color:#0976b4!important}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__inner-circle[_ngcontent-%COMP%]{background-color:#0976b4!important;border-color:#0976b4!important}"]});let n=a;return n})();function Qe(n,a){if(n&1&&(r(0,"span",3),P(1,"img",4),l(),r(2,"span"),p(3),l()),n&2){let i=a.item;c(),s("src",i==null?null:i.Img,S),c(2),x(" ",i.Name," ")}}function et(n,a){if(n&1){let i=b();r(0,"span",6),g("click",function(){C(i);let e=m(),t=e.item,d=e.clear;return f(d(t))}),p(1,"x"),l()}}function tt(n,a){if(n&1&&(r(0,"span",3),P(1,"img",4),l(),r(2,"span"),p(3),l(),u(4,et,2,0,"span",5)),n&2){let i=a.item,o=m();c(),s("src",i==null?null:i.Img,S),c(2),x(" ",i.Name," "),c(),W(o.clearable()?4:-1)}}var Ke=(()=>{let a=class a{constructor(){this.authService=A(K),this.multiple=Y(!1),this.clearable=Y(!0),this.options=this.authService.getChannels(),this.onChange=o=>{}}onChannelChange(o){this.onChange(o)}writeValue(o){this.selectedChannels=o}registerOnChange(o){this.onChange=o}registerOnTouched(o){}setDisabledState(o){}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=D({type:a,selectors:[["channel-select-options"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"]},standalone:!0,features:[j([{provide:Ce,multi:!0,useExisting:a}]),O],decls:3,vars:4,consts:[["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel","multiple"],["ng-option-tmp",""],["ng-label-tmp",""],[1,"me-2"],[2,"width","18px",3,"src"],["aria-hidden","true",1,"ng-value-icon","right"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"]],template:function(e,t){e&1&&(r(0,"ng-select",0),E("ngModelChange",function(_){return M(t.selectedChannels,_)||(t.selectedChannels=_),_}),g("ngModelChange",function(_){return t.onChannelChange(_)}),u(1,Qe,4,2,"ng-template",1)(2,tt,5,3,"ng-template",2),l()),e&2&&(s("clearable",t.clearable())("items",t.options),F("ngModel",t.selectedChannels),s("multiple",t.multiple()))},dependencies:[N,Fe,we,ye,Ie,L,k,B]});let n=a;return n})();var He=n=>[n],nt=n=>({"text-decoration-line-through":n}),it=n=>({"border-bottom":n}),ot=n=>({"bg-gradient-warning":n});function at(n,a){if(n&1){let i=b();I(0),r(1,"div")(2,"label",21),p(3,"Channel"),l(),r(4,"channel-select-options",22),E("ngModelChange",function(e){C(i);let t=m();return M(t.searchFilter.ListChannelID,e)||(t.searchFilter.ListChannelID=e),f(e)}),l()(),r(5,"div",23)(6,"label",24),p(7,"Filter by"),l(),r(8,"lib-radio-options",25),E("modelChange",function(e){C(i);let t=m();return M(t.searchFilter.filterModel,e)||(t.searchFilter.filterModel=e),f(e)}),l()(),w()}if(n&2){let i=m();c(4),s("multiple",!0),F("ngModel",i.searchFilter.ListChannelID),c(4),F("model",i.searchFilter.filterModel),s("options",i.filterTypeOptions)}}function rt(n,a){if(n&1){let i=b();r(0,"button",27),g("click",function(){C(i);let e=m().ngIf,t=m();return f(t.onUpdateItems(e))}),P(1,"i",28),p(2," Update "),l()}}function lt(n,a){if(n&1&&(I(0),r(1,"div",4),u(2,rt,3,0,"button",26),l(),w()),n&2){let i=a.ngIf,o=m();c(2),s("ngIf",o.productService.hasSelectionVariant(i))}}function ct(n,a){if(n&1&&(r(0,"th",15)(1,"div",29),P(2,"img",30),r(3,"div",31),p(4),y(5,"stringLimit"),l()()()),n&2){let i=a.$implicit;c(),s("matTooltip",(i.Name==null?null:i.Name.length)>20?i.Name:""),c(),s("src",i==null?null:i.Img,S),c(2),x(" ",de(5,3,i.Name,20)," ")}}function st(n,a){if(n&1){let i=b();r(0,"th")(1,"input",32),E("ngModelChange",function(e){C(i);let t=m();return M(t.checkboxState,e)||(t.checkboxState=e),f(e)}),g("ngModelChange",function(){C(i);let e=m();return f(e.onSelectAllData())}),l()()}if(n&2){let i=m();c(),F("ngModel",i.checkboxState)}}function mt(n,a){n&1&&(r(0,"th",33)(1,"span"),p(2,"Expected"),l(),r(3,"span",34),p(4,"(POS)"),l()(),r(5,"th",33),p(6,"Channel"),l())}function pt(n,a){if(n&1){let i=b();r(0,"img",47),g("click",function(e){C(i);let t=m(3).$implicit,d=m(2);return f(d.onZoomImage(e,t==null?null:t.ImageUrl))}),l()}if(n&2){let i=m(3).$implicit;se("src",i==null?null:i.ImageUrl,S)}}function dt(n,a){n&1&&P(0,"img",48)}function _t(n,a){if(n&1&&(r(0,"small",46),p(1),l()),n&2){let i=m(3).$implicit;c(),x("(",i==null?null:i.Category,")")}}function ut(n,a){if(n&1&&(I(0),r(1,"td",42),u(2,pt,1,1,"img",43)(3,dt,1,0,"ng-template",null,0,ee),l(),r(5,"td",44)(6,"h5",45),p(7),l(),u(8,_t,2,1,"small",46),l(),w()),n&2){let i=Q(4),o=m().$index,e=m().$implicit,t=m().ngIf;c(),s("rowSpan",e==null?null:e.Variants.length)("ngClass",V(7,it,o+1==t.length)),c(),s("ngIf",e==null?null:e.ImageUrl)("ngIfElse",i),c(3),s("rowSpan",e==null?null:e.Variants.length),c(2),me(e==null?null:e.Name),c(),W(e!=null&&e.Category?8:-1)}}function gt(n,a){if(n&1){let i=b();r(0,"td",49)(1,"input",32),E("ngModelChange",function(e){C(i);let t=m().$implicit;return M(t.selected,e)||(t.selected=e),f(e)}),l()()}if(n&2){let i=m().$implicit;c(),F("ngModel",i.selected)}}function ht(n,a){if(n&1){let i=b();I(0),r(1,"td",51),p(2),y(3,"number"),l(),r(4,"td",52),g("click",function(){let e=C(i).$implicit,t=m(2).$implicit,d=m().$implicit,_=m(2);return f(_.openTableDialog(t,d,e))}),r(5,"div",53)(6,"div",54),p(7),y(8,"number"),l(),r(9,"a",55),g("click",function(e){return C(i),f(e==null?null:e.stopPropagation())}),P(10,"i",40),l()()(),w()}if(n&2){let i=a.$implicit;c(2),x(" ",T(3,4,i.PriceExpected)," "),c(2),s("ngClass",V(8,ot,i.Price!=i.PriceExpected)),c(3),x(" ",T(8,6,i.Price)," "),c(2),s("href",i.Url,S)}}function Ct(n,a){n&1&&(r(0,"td",56),p(1," X "),l(),r(2,"td",56),p(3," X "),l())}function ft(n,a){if(n&1&&(I(0),u(1,ht,11,10,"ng-container",50)(2,Ct,4,0,"ng-template",null,1,ee),w()),n&2){let i=a.$implicit,o=Q(3),e=m().$implicit,t=m(3);c(),s("ngIf",t.getItemFromChannel(e,i.ID))("ngIfElse",o)}}function xt(n,a){if(n&1&&(r(0,"tr"),u(1,ut,9,9,"ng-container",3),r(2,"td",35),p(3),l(),r(4,"td",36)(5,"div",37)(6,"div",38),p(7),l(),r(8,"div",31)(9,"a",39),P(10,"i",40),l()()()(),u(11,gt,2,1,"ng-template",19)(12,ft,4,2,"ng-container",41),l()),n&2){let i=a.$implicit,o=a.$index,e=m(3);c(),s("ngIf",o==0),c(2),x(" ",i==null?null:i.Model," "),c(),s("matTooltip",i.Discontinued?e.discontinuedVariantMsg:""),c(2),s("ngClass",V(8,nt,i.Discontinued)),c(),x(" ",i==null?null:i.Code," "),c(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(i==null?null:i.ID),S),c(2),s("ngxPermissionsOnly",V(10,He,e.rolePriceEdit)),c(),s("ngForOf",e.channels())}}function Pt(n,a){if(n&1&&(r(0,"tbody"),$(1,xt,13,12,"tr",null,R),l()),n&2){let i=a.$implicit;c(),U(i.Variants)}}function bt(n,a){if(n&1&&(I(0),$(1,Pt,3,0,"tbody",null,R),w()),n&2){let i=a.ngIf;c(),U(i)}}var xn=(()=>{let a=class a{constructor(o,e,t,d,_,h,Je){this.http=o,this.toastr=e,this.dialog=t,this.productService=d,this.authService=_,this.biggerPictureService=h,this.paginationService=Je,this.infinitePagination=A(te),this.searchFilter=new Ne,this.checkboxState=!1,this.rolePriceEdit=xe.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.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.channels=le([]),this.filterTypeOptions=[{Key:X.ALL,Value:"All"},{Key:X.DIFFERENCE,Value:"Difference"}],this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPagination(),this.initChannelTable()}initChannelTable(){let o=this.searchFilter.ListChannelID,e=[];G.IsEmpty(o)||o?.length==0?e=this.channelOptions:e=this.channelOptions.filter(t=>o.findIndex(d=>d==t.ID)>-1),this.channels.update(()=>e)}initPagination(){this.infinitePagination.fetchDataEndpoint="Price/GetOutletPrice",this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.infinitePagination.data$.pipe(q(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe(ae(o=>{this.searchFilter=o.Filter,this.searchFilter.filterModel=X.ALL,this.infinitePagination.reloadPagination(this.searchFilter)}),q(1))}onSelectAllData(){this.data$=this.data$.pipe(oe(o=>(o.map(e=>(e.Variants&&(e.Variants=e.Variants.map(t=>(t.selected=this.checkboxState,t))),e)),o)))}onFilter(o){this.searchFilter.text=o;let e=ie(ne({},this.searchFilter),{text:o,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount});this.initChannelTable(),this.infinitePagination.reloadPagination(e)}updatePrice(o){let e=this.productService.selectedVariantProduct(o);if(e.length>0){let t=e.map(h=>h.ID),_={ListChannelID:this.channelOptions.filter(h=>h.selected).map(h=>h.ID),ListID:t};this.http.post("/api/Price/UpdateChannelOutletPrice",_).subscribe({next:h=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+_.ListID.length+" items in "+_.ListChannelID.length+" channels","Success")},error:h=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(o=>(o.selected=!1,o))}getItemFromChannel(o,e){return o.Channel.find(t=>t.ChannelID==e)}onUpdateItems(o){let e=this.productService.selectedVariantProduct(o);this.dialog.open(Ue,{data:{title:"Updating Price",selectedItems:e,channels:this.channelOptions},width:"400px"}).afterClosed().pipe(Z(t=>G.IsNotEmpty(t))).subscribe(t=>{this.channelOptions=t,this.updatePrice(o)})}openTableDialog(o,e,t){let d=JSON.parse(JSON.stringify(o));this.dialog.open(Ae,{data:{Name:e.Name,Variant:d,ChannelID:t?.ChannelID,Table:"price",ChannelItemID:t?.ChannelItemID}}).afterClosed().pipe(Z(h=>G.IsNotEmpty(h))).subscribe(h=>{this.updateProductPrice(h,t)})}updateProductPrice(o,e){let t={ID:o.ChannelID,ChannelItemID:o.ChannelItemID,ChannelVariantID:o.ChannelVariationID,Price:parseFloat(o.Price),VariantID:o.ID,SKU:o.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(d=>{e.Price=t.Price;let _=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success(`Successfully updated ${o.ItemName} (${o.VarName}) inventory in ${_.Name} to ${t.Price}`,"Success")})}openExportDialog(){this.dialog.open(Re,{data:{title:"Export Custom Channel Price",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportOutletPrice"}}).afterClosed().subscribe()}onZoomImage(o,e){this.biggerPictureService.openBiggerPicture(o,e)}};a.\u0275fac=function(e){return new(e||a)(v(be),v(Pe),v(Me),v(ke),v(K),v(Be),v($e))},a.\u0275cmp=D({type:a,selectors:[["app-custom-channel-price"]],standalone:!0,features:[j([te]),O],decls:38,vars:23,consts:[["elsePic",""],["elseCol",""],["headerTitle","Price Comparison",3,"onSubmit","hideSearchBox","hideSearchDropdown","textButton"],[4,"ngIf"],[1,"d-flex"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"channel-column"],["colspan","5"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","text-uppercase"],["scope","col","colspan","2",1,"text-center","w-25"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5",2,"height","46px"],[1,"fw-bold","mb-2","d-block"],["name","filterModel",3,"modelChange","model","options"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-end","border-bottom",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[4,"ngFor","ngForOf"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],[1,"text-start","border-bottom",2,"padding-left","0px",3,"rowSpan"],[1,"mb-0","item-name"],[1,"mt-1"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],[4,"ngIf","ngIfElse"],[1,"text-end","border"],[1,"text-center","border","pointer","cell-hover",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2"],["target","_blank",3,"click","href"],[1,"table-white","border","text-end",2,"color","red"]],template:function(e,t){e&1&&(r(0,"mainpanel",2),g("onSubmit",function(_){return t.onFilter(_)}),r(1,"filters"),u(2,at,9,4,"ng-container",3),y(3,"async"),l(),r(4,"actions")(5,"div",4),u(6,lt,3,1,"ng-container",3),y(7,"async"),r(8,"button",5),g("click",function(){return t.openExportDialog()}),P(9,"i",6),r(10,"span"),p(11,"Export"),l()()()(),r(12,"content")(13,"div",7)(14,"div",8)(15,"div",9)(16,"div",10)(17,"table",11)(18,"thead",12)(19,"tr",13),P(20,"th",14),$(21,ct,6,6,"th",15,R),l(),r(23,"tr")(24,"th",16)(25,"span"),p(26," Product "),l()(),r(27,"th",17),p(28,"Variant"),l(),r(29,"th",18),p(30,"SKU"),l(),u(31,st,2,1,"ng-template",19),$(32,mt,7,0,null,null,R),l()(),u(34,bt,3,0,"ng-container",3),y(35,"async"),l(),r(36,"infinite-paginator",20),y(37,"async"),g("onNextPage",function(){return t.infinitePagination.onNextPage(t.searchFilter)})("onLastPage",function(){return t.infinitePagination.onLastPage(t.searchFilter)})("onGetRowCount",function(){return t.infinitePagination.getRowCount(t.searchFilter)}),l()()()()()()()),e&2&&(s("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),c(2),s("ngIf",T(3,13,t.loader$)),c(4),s("ngIf",T(7,15,t.data$)),c(15),U(t.channels()),c(10),s("ngxPermissionsOnly",V(21,He,t.rolePriceEdit)),c(),U(t.channels()),c(2),s("ngIf",T(35,17,t.data$)),c(2),s("totalData",t.infinitePagination.totalData())("hideCount",t.infinitePagination.hideCount())("rowCount",T(37,19,t.infinitePagination.totalRowCount$))("pageNumber",t.infinitePagination.pageNumber())("disableNextButton",t.infinitePagination.disableNextButton())("goToLastPage",t.infinitePagination.isLastPage()))},dependencies:[N,_e,z,ue,ge,he,Te,Ee,L,fe,k,B,We,Ge,J,H,Le,ve,Se,Ke],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]});let n=a;return n})();export{xn as CustomChannelPriceComponent};
@@ -1 +1 @@
1
- import{i as c}from"./chunk-57TBVBTT.js";import{b as a}from"./chunk-4SAJUEHO.js";import{ja as s,oa as o}from"./chunk-PQDPS2ID.js";var d=(()=>{let e=class e{constructor(i,t){this.toastr=i,this.authService=t}canActivate(i,t){let n=JSON.parse(window.localStorage.getItem("user")),l=new Date;if(n!=null){let p=new Date(n.Token.expiredAt);return l<p?!0:(this.onTokenExpired(),!1)}else return this.onTokenExpired(),!1}onTokenExpired(){this.toastr.error("Your session has expired. Please login again.","Session Expired").onShown.subscribe(()=>this.authService.logout())}};e.\u0275fac=function(t){return new(t||e)(o(a),o(c))},e.\u0275prov=s({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();export{d as a};
1
+ import{i as c}from"./chunk-SHUDM2FU.js";import{b as a}from"./chunk-4SAJUEHO.js";import{ja as s,oa as o}from"./chunk-PQDPS2ID.js";var d=(()=>{let e=class e{constructor(i,t){this.toastr=i,this.authService=t}canActivate(i,t){let n=JSON.parse(window.localStorage.getItem("user")),l=new Date;if(n!=null){let p=new Date(n.Token.expiredAt);return l<p?!0:(this.onTokenExpired(),!1)}else return this.onTokenExpired(),!1}onTokenExpired(){this.toastr.error("Your session has expired. Please login again.","Session Expired").onShown.subscribe(()=>this.authService.logout())}};e.\u0275fac=function(t){return new(t||e)(o(a),o(c))},e.\u0275prov=s({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();export{d as a};
@@ -0,0 +1 @@
1
+ import{a as j}from"./chunk-JXTGH22T.js";import{b as A,c as D,i as P,j as R}from"./chunk-BO4PPSB5.js";import{h as U,m as V}from"./chunk-BSN7ZAXG.js";import{$b as _,Da as m,Ea as d,Eb as M,Gb as h,Nb as y,Ob as w,Qb as v,Rb as S,Sb as o,Tb as c,Ub as x,Yb as g,bc as k,gb as u,jb as r,kb as p,nc as C,oc as I,rc as O,sc as T,ta as f,tc as b}from"./chunk-PQDPS2ID.js";function E(l,i){if(l&1){let a=g();o(0,"span")(1,"mat-checkbox",4),_("change",function(e){m(a);let t=k();return d(t.onSelectAll(e==null?null:e.checked))}),o(2,"h5",5),C(3,"Select All"),c()()()}}function F(l,i){if(l&1){let a=g();o(0,"li")(1,"mat-checkbox",6),b("ngModelChange",function(e){let t=m(a).$implicit;return T(t.selected,e)||(t.selected=e),d(e)}),o(2,"div",7),x(3,"img",8),o(4,"h5",9),C(5),c()()()()}if(l&2){let a=i.$implicit;r(),O("ngModel",a.selected),r(2),h("src",a.Img,u),r(2),I(a.Name)}}var H=(()=>{let i=class i{constructor(n,e){this.data=n,this.dialogRef=e,this.selectedItems=this.data.selectedItems,this.channels=this.data.channels}ngOnInit(){this.initModalConfig()}initModalConfig(){let n=this.data.title?this.data.title:"Updating Inventory";this.modalConfig=new P,this.modalConfig.title=n}onSelectAll(n){this.channels=this.channels.map(e=>(e.selected=n,e))}onOk(){this.dialogRef.close(this.channels)}onClose(){this.dialogRef.close()}getSelectedChannel(){return this.channels.filter(n=>n.selected)}};i.\u0275fac=function(e){return new(e||i)(p(D),p(A))},i.\u0275cmp=f({type:i,selectors:[["app-modal-update-channels"]],decls:7,vars:3,consts:[[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[2,"overflow-y","auto","max-height","28rem"],[1,"no-bullet",2,"margin-bottom","0px !important","overflow","hidden"],["color","primary",1,"me-6",3,"change"],[1,"fw-light"],["color","primary",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center"],[1,"channelLogo-md",3,"src"],[1,"fw-light","ms-2","my-auto"]],template:function(e,t){if(e&1&&(o(0,"modal-material",0),_("onOk",function(){return t.onOk()})("onClose",function(){return t.onClose()})("onCancel",function(){return t.onClose()}),o(1,"div",1)(2,"div",2),M(3,E,4,0,"span"),o(4,"ul",3),v(5,F,6,3,"li",null,w),c()()()()),e&2){let s;h("dynamicValidated",((s=t.getSelectedChannel())==null?null:s.length)>0)("config",t.modalConfig),r(3),y((t.channels==null?null:t.channels.length)>1?3:-1),r(2),S(t.channels)}},dependencies:[U,V,j,R],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let l=i;return l})();export{H as a};
@@ -1 +1 @@
1
- import{a as re}from"./chunk-RENQ3YZH.js";import{a as de,b as me}from"./chunk-LJHZMQZD.js";import"./chunk-MY4B7K3R.js";import"./chunk-FGPSBTFS.js";import"./chunk-ADRVUMMW.js";import{a as ae,b as le}from"./chunk-WT6W7RAQ.js";import"./chunk-BQ7NR3ET.js";import"./chunk-FMV4LYKN.js";import"./chunk-HCDKYABV.js";import{a as $,b as ee,d as te,e as ie}from"./chunk-CCXKODFV.js";import{i as Z}from"./chunk-57TBVBTT.js";import{e as X}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{m as ne,n as oe}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as G,h as H,m as Y,o as J,y as K}from"./chunk-BSN7ZAXG.js";import{c as Q}from"./chunk-64G3XLI6.js";import{p as j,r as q}from"./chunk-OVEJFFL6.js";import{$b as v,Bd as A,Cd as U,Da as c,Ea as u,Eb as C,Gb as p,Gc as T,Hc as F,Ic as R,Jc as W,Sb as e,Tb as t,Ub as S,Vb as x,Wb as P,Yb as O,bc as M,gb as D,jb as r,kb as E,mc as I,nc as a,oc as y,pc as b,rc as h,sc as f,ta as L,tc as _,ud as B,vc as N,vd as k,xc as V,zd as z}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var pe=l=>({ID:l});function se(l,m){if(l&1&&(e(0,"span",17),S(1,"img",18),t(),a(2)),l&2){let i=m.item;r(),p("src",i.Img,D)("alt",i.Name),r(),b(" ",i.Name," ")}}function ge(l,m){if(l&1&&(e(0,"tr")(1,"td"),a(2),t(),e(3,"td"),S(4,"img",28),t(),e(5,"td"),a(6),t(),e(7,"td",29)(8,"a",30),a(9),T(10,"number"),t()(),e(11,"td"),a(12),t(),e(13,"td"),a(14),T(15,"date"),t()()),l&2){let i=m.$implicit;r(2),y(i._source.ChannelName),r(2),p("src",i.logo,D),r(2),y(i._source.DateRange),r(2),p("queryParams",V(12,pe,i._source.ID)),r(),b(" ",F(10,7,i._source.CountOrder)," "),r(3),y(i._source.UserLogin),r(2),b(" ",R(15,9,i._source["@timestamp_received"],"dd MMM yyyy hh:mm")," ")}}function ce(l,m){if(l&1){let i=O();x(0),e(1,"div",19)(2,"table",20)(3,"thead")(4,"tr",21)(5,"th",22),a(6,"Channel"),t(),e(7,"th",23),a(8,"Type"),t(),e(9,"th",24),a(10,"Download Date Range"),t(),e(11,"th",25),a(12,"Count"),t(),e(13,"th"),a(14,"User Login"),t(),e(15,"th"),a(16,"Created"),t()()(),e(17,"tbody"),C(18,ge,16,14,"tr",26),t()(),e(19,"mat-paginator",27),v("page",function(s){c(i);let n=M();return u(n.onPaginationChange(s))}),t()(),P()}if(l&2){let i=M();r(18),p("ngForOf",i.downloadOrders),r(),p("length",i.paginationTotal)("pageSize",i.paginationPageSize)("pageIndex",(i.filter==null?null:i.filter.PageNumber)==0?0:(i.filter==null?null:i.filter.PageNumber)-1)}}function ue(l,m){l&1&&(e(0,"div",31),S(1,"app-empty-state"),t())}var Ve=(()=>{let m=class m{constructor(d,s){this.http=d,this.authService=s,this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(d=>{this.filter=d.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(d=>{this.downloadOrders=d.hits,this.setChannelLogo(),this.paginationTotal=d.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(d=>(d.logo=Q.getChannelLogoByTypeId(d._source.TypeID),d))}onPaginationChange(d){this.filter.PageNumber=d.pageIndex+1,this.getDownloadOrders()}};m.\u0275fac=function(s){return new(s||m)(E(X),E(Z))},m.\u0275cmp=L({type:m,selectors:[["app-download-order-log"]],standalone:!0,features:[N],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[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","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[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"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/Order/Download_Order_Log/Detail",3,"queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(s,n){if(s&1){let g=O();e(0,"mainpanel",1),v("onSubmit",function(){return c(g),u(n.getDownloadOrders())}),e(1,"filters")(2,"div")(3,"label",2),a(4,"Channel"),t(),e(5,"ng-select",3),_("ngModelChange",function(o){return c(g),f(n.filter.ChannelID,o)||(n.filter.ChannelID=o),u(o)}),C(6,se,3,3,"ng-template",4),t()(),e(7,"div",5)(8,"label",6),a(9,"From/To"),t(),e(10,"div",7)(11,"datepicker",8),_("dateChange",function(o){return c(g),f(n.filter.From,o)||(n.filter.From=o),u(o)}),t()(),e(12,"div")(13,"datepicker",9),_("dateChange",function(o){return c(g),f(n.filter.To,o)||(n.filter.To=o),u(o)}),t()()(),e(14,"div",5)(15,"label",10),a(16,"Page Number"),t(),e(17,"input",11),_("ngModelChange",function(o){return c(g),f(n.filter.PageNumber,o)||(n.filter.PageNumber=o),u(o)}),t()(),e(18,"div",5)(19,"label",10),a(20,"Page Size"),t(),e(21,"input",12),_("ngModelChange",function(o){return c(g),f(n.filter.RowCount,o)||(n.filter.RowCount=o),u(o)}),t()()(),e(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),C(26,ce,20,4,"ng-container",16)(27,ue,2,0,"ng-template",null,0,W),t()()()()()}if(s&2){let g=I(28);p("hideSearchBox",!0),r(5),p("clearable",!0)("items",n.channelOptions),h("ngModel",n.filter.ChannelID),r(6),h("date",n.filter.From),r(2),h("date",n.filter.To),r(4),h("ngModel",n.filter.PageNumber),r(4),h("ngModel",n.filter.RowCount),r(5),p("ngIf",(n.downloadOrders==null?null:n.downloadOrders.length)>0)("ngIfElse",g)}},dependencies:[U,B,k,A,z,le,ae,oe,ne,ie,te,$,ee,K,G,J,H,Y,me,de,q,j,re]});let l=m;return l})();export{Ve as DownloadOrderLogComponent};
1
+ import{a as re}from"./chunk-RENQ3YZH.js";import{a as de,b as me}from"./chunk-LJHZMQZD.js";import"./chunk-MY4B7K3R.js";import"./chunk-FGPSBTFS.js";import"./chunk-ADRVUMMW.js";import{a as ae,b as le}from"./chunk-WT6W7RAQ.js";import"./chunk-BQ7NR3ET.js";import"./chunk-FMV4LYKN.js";import"./chunk-HCDKYABV.js";import{a as $,b as ee,d as te,e as ie}from"./chunk-CCXKODFV.js";import{i as Z}from"./chunk-SHUDM2FU.js";import{e as X}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{m as ne,n as oe}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as G,h as H,m as Y,o as J,y as K}from"./chunk-BSN7ZAXG.js";import{c as Q}from"./chunk-64G3XLI6.js";import{p as j,r as q}from"./chunk-OVEJFFL6.js";import{$b as v,Bd as A,Cd as U,Da as c,Ea as u,Eb as C,Gb as p,Gc as T,Hc as F,Ic as R,Jc as W,Sb as e,Tb as t,Ub as S,Vb as x,Wb as P,Yb as O,bc as M,gb as D,jb as r,kb as E,mc as I,nc as a,oc as y,pc as b,rc as h,sc as f,ta as L,tc as _,ud as B,vc as N,vd as k,xc as V,zd as z}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var pe=l=>({ID:l});function se(l,m){if(l&1&&(e(0,"span",17),S(1,"img",18),t(),a(2)),l&2){let i=m.item;r(),p("src",i.Img,D)("alt",i.Name),r(),b(" ",i.Name," ")}}function ge(l,m){if(l&1&&(e(0,"tr")(1,"td"),a(2),t(),e(3,"td"),S(4,"img",28),t(),e(5,"td"),a(6),t(),e(7,"td",29)(8,"a",30),a(9),T(10,"number"),t()(),e(11,"td"),a(12),t(),e(13,"td"),a(14),T(15,"date"),t()()),l&2){let i=m.$implicit;r(2),y(i._source.ChannelName),r(2),p("src",i.logo,D),r(2),y(i._source.DateRange),r(2),p("queryParams",V(12,pe,i._source.ID)),r(),b(" ",F(10,7,i._source.CountOrder)," "),r(3),y(i._source.UserLogin),r(2),b(" ",R(15,9,i._source["@timestamp_received"],"dd MMM yyyy hh:mm")," ")}}function ce(l,m){if(l&1){let i=O();x(0),e(1,"div",19)(2,"table",20)(3,"thead")(4,"tr",21)(5,"th",22),a(6,"Channel"),t(),e(7,"th",23),a(8,"Type"),t(),e(9,"th",24),a(10,"Download Date Range"),t(),e(11,"th",25),a(12,"Count"),t(),e(13,"th"),a(14,"User Login"),t(),e(15,"th"),a(16,"Created"),t()()(),e(17,"tbody"),C(18,ge,16,14,"tr",26),t()(),e(19,"mat-paginator",27),v("page",function(s){c(i);let n=M();return u(n.onPaginationChange(s))}),t()(),P()}if(l&2){let i=M();r(18),p("ngForOf",i.downloadOrders),r(),p("length",i.paginationTotal)("pageSize",i.paginationPageSize)("pageIndex",(i.filter==null?null:i.filter.PageNumber)==0?0:(i.filter==null?null:i.filter.PageNumber)-1)}}function ue(l,m){l&1&&(e(0,"div",31),S(1,"app-empty-state"),t())}var Ve=(()=>{let m=class m{constructor(d,s){this.http=d,this.authService=s,this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(d=>{this.filter=d.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(d=>{this.downloadOrders=d.hits,this.setChannelLogo(),this.paginationTotal=d.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(d=>(d.logo=Q.getChannelLogoByTypeId(d._source.TypeID),d))}onPaginationChange(d){this.filter.PageNumber=d.pageIndex+1,this.getDownloadOrders()}};m.\u0275fac=function(s){return new(s||m)(E(X),E(Z))},m.\u0275cmp=L({type:m,selectors:[["app-download-order-log"]],standalone:!0,features:[N],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[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","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[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"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/Order/Download_Order_Log/Detail",3,"queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(s,n){if(s&1){let g=O();e(0,"mainpanel",1),v("onSubmit",function(){return c(g),u(n.getDownloadOrders())}),e(1,"filters")(2,"div")(3,"label",2),a(4,"Channel"),t(),e(5,"ng-select",3),_("ngModelChange",function(o){return c(g),f(n.filter.ChannelID,o)||(n.filter.ChannelID=o),u(o)}),C(6,se,3,3,"ng-template",4),t()(),e(7,"div",5)(8,"label",6),a(9,"From/To"),t(),e(10,"div",7)(11,"datepicker",8),_("dateChange",function(o){return c(g),f(n.filter.From,o)||(n.filter.From=o),u(o)}),t()(),e(12,"div")(13,"datepicker",9),_("dateChange",function(o){return c(g),f(n.filter.To,o)||(n.filter.To=o),u(o)}),t()()(),e(14,"div",5)(15,"label",10),a(16,"Page Number"),t(),e(17,"input",11),_("ngModelChange",function(o){return c(g),f(n.filter.PageNumber,o)||(n.filter.PageNumber=o),u(o)}),t()(),e(18,"div",5)(19,"label",10),a(20,"Page Size"),t(),e(21,"input",12),_("ngModelChange",function(o){return c(g),f(n.filter.RowCount,o)||(n.filter.RowCount=o),u(o)}),t()()(),e(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),C(26,ce,20,4,"ng-container",16)(27,ue,2,0,"ng-template",null,0,W),t()()()()()}if(s&2){let g=I(28);p("hideSearchBox",!0),r(5),p("clearable",!0)("items",n.channelOptions),h("ngModel",n.filter.ChannelID),r(6),h("date",n.filter.From),r(2),h("date",n.filter.To),r(4),h("ngModel",n.filter.PageNumber),r(4),h("ngModel",n.filter.RowCount),r(5),p("ngIf",(n.downloadOrders==null?null:n.downloadOrders.length)>0)("ngIfElse",g)}},dependencies:[U,B,k,A,z,le,ae,oe,ne,ie,te,$,ee,K,G,J,H,Y,me,de,q,j,re]});let l=m;return l})();export{Ve as DownloadOrderLogComponent};
@@ -0,0 +1 @@
1
+ import{b as re,e as me}from"./chunk-4SAJUEHO.js";import{b as M,c as N,h as de,i as y,j as T}from"./chunk-BO4PPSB5.js";import{c as b,e as q,h as w,i as x,j as $,l as W,m as A,n as ee,p as te,r as ne,v as oe,w as ie}from"./chunk-BSN7ZAXG.js";import{b as le,c as ae}from"./chunk-64G3XLI6.js";import{$b as S,Da as g,Ea as C,Eb as f,Gb as u,Nb as _,Sb as o,Tb as i,Ub as I,Yb as L,bc as U,gb as H,jb as a,kb as h,mc as P,nc as r,oc as F,pc as J,rc as R,sc as E,sd as K,ta as v,tc as D,ud as X,vd as Z,xc as k,yc as Q}from"./chunk-PQDPS2ID.js";function ue(t,n){if(t&1&&(o(0,"tr")(1,"td")(2,"a",11),I(3,"img",12),o(4,"span"),r(5),i()()(),o(6,"td"),r(7),i(),o(8,"td"),r(9),i()()),t&2){let c=n.$implicit;a(2),u("href","/menu/channel/marketplace/view?ID="+c.Key.ID,H),a(),u("src",c.Logo,H),a(2),F(c.Key.Name),a(2),F(c.Value.Out),a(2),F(c.Value.Tg)}}var Ne=(()=>{let n=class n{constructor(m,l){this.dialogRef=m,this.data=l,this.generateChannelName(),this.channels=this.setChannelLogo(l.channels)}ngOnInit(){this.modalConfig=new y,this.modalConfig.title="Channel - New Order Configuration is not Unique!",this.modalConfig.headerType=de.Warning,this.modalConfig.hideOk=!0,this.modalConfig.cancelText="Close",this.modalConfig.customWidth="500px",this.modalConfig.bodyScrollable=!0,this.modalConfig.hideClose=!0}setChannelLogo(m){return m.map(l=>(l.Logo=ae.getChannelLogoByTypeId(l.Key.TypeID),l))}generateChannelName(){this.channelNames="";let m=this.data.channels;m.forEach((l,e)=>{this.channelNames+=`${l.Key} ${e!=m.length-1?" + ":""}`})}onClose(){this.dialogRef.close()}};n.\u0275fac=function(l){return new(l||n)(h(M),h(N))},n.\u0275cmp=v({type:n,selectors:[["app-modal-channel-warning"]],decls:24,vars:2,consts:[[3,"onCancel","onClose","config"],["content","",1,"pt-2","px-4"],[1,"row"],[1,"col-12"],[1,"lh-base","fs-5"],[1,"mb-4"],[1,"table","table-bordered"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"fs-5","mt-4"],["href","https://support.dealpos.com/en/articles/8281096-setup-multiple-channel-marketplace-to-one-warehouse-outlet","target","_blank"],["target","_blank",3,"href"],[1,"me-3",2,"width","24px",3,"src"]],template:function(l,e){l&1&&(o(0,"modal-material",0),S("onCancel",function(){return e.onClose()})("onClose",function(){return e.onClose()}),o(1,"div",1)(2,"div",2)(3,"div",3)(4,"p",4),r(5,"When your order configuration is not unique, your Dashboard Sales Report will be invalid. You can use either Outlet or Order Tag to differentiate Channel Order. "),i(),o(6,"h5",5),r(7,"Your duplicate Channels are"),i(),o(8,"table",6)(9,"thead")(10,"tr",7)(11,"th"),r(12,"Channel"),i(),o(13,"th"),r(14,"Outlet"),i(),o(15,"th"),r(16,"Tag"),i()()(),o(17,"tbody"),f(18,ue,10,5,"tr",8),i()(),o(19,"p",9),r(20," Please refer to this "),o(21,"a",10),r(22,"article"),i(),r(23," for more information "),i()()()()()),l&2&&(u("config",e.modalConfig),a(18),u("ngForOf",e.channels))},dependencies:[X,T]});let t=n;return t})();var qe=(()=>{let n=class n{constructor(m,l,e){this.dialogRef=m,this.httpService=l,this.toastr=e,this.modalConfig=new y,this.modalConfig.title="Write Off Reason"}onSubmit(){let m={Name:this.reason};this.subscription=this.httpService.post("/api/channel/AddWriteoffOption",m).subscribe(l=>{this.toastr.success(l.Message,"Success"),this.dialogRef.close(m)})}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.subscription.unsubscribe()}};n.\u0275fac=function(l){return new(l||n)(h(M),h(me),h(re))},n.\u0275cmp=v({type:n,selectors:[["app-dialog-writeOff-reason"]],decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","writeOffReason","placeholder","Write Off Reason","name","writeOffReason",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(l,e){if(l&1){let d=L();o(0,"modal-material",1),S("onClose",function(){return g(d),C(e.onClose())})("onCancel",function(){return g(d),C(e.onClose())})("onOk",function(){return g(d),C(e.onSubmit())}),o(1,"div",2)(2,"div",3)(3,"input",4,0),D("ngModelChange",function(p){return g(d),E(e.reason,p)||(e.reason=p),C(p)}),i(),o(5,"label",5),r(6,"Reason"),i()()()()}l&2&&(u("dynamicValidated",e.reason)("config",e.modalConfig),a(3),R("ngModel",e.reason))},dependencies:[b,w,A,T],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]});let t=n;return t})();var fe=t=>({invalid:t});function ce(t,n){t&1&&(o(0,"small"),r(1," URL is required "),i())}function ge(t,n){if(t&1&&(o(0,"div",13),f(1,ce,2,0,"small",14),i()),t&2){U();let c=P(10);a(),u("ngIf",c.errors.required)}}function Ce(t,n){t&1&&(o(0,"small"),r(1," Email is required "),i())}function he(t,n){t&1&&(o(0,"small"),r(1," Email is not valid "),i())}function _e(t,n){if(t&1&&(o(0,"div",13),f(1,Ce,2,0,"small",14)(2,he,2,0,"small",14),i()),t&2){U();let c=P(16);a(),u("ngIf",c.errors.required),a(),u("ngIf",c.errors.pattern)}}var ze=(()=>{let n=class n{constructor(m){this.dialogRef=m}ngOnInit(){this.formData={URL:"",Email:""},this.initModalConfig()}initModalConfig(){this.modalConfig=new y,this.modalConfig.title="Fill data for Customer Support"}onSubmit(m){m!="Enter"&&this.dialogRef.close(this.formData)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(l){return new(l||n)(h(M))},n.\u0275cmp=v({type:n,selectors:[["app-contact-support"]],decls:18,vars:9,consts:[["url","ngModel"],["email","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-2"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px",3,"ngClass"],["required","","type","text","id","customerURL","name","customerURL","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModelChange","ngModel"],["class","text-danger",4,"ngIf"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModelChange","ngModel"],[1,"text-danger"],[4,"ngIf"]],template:function(l,e){if(l&1){let d=L();o(0,"modal-material",2),S("onClose",function(){return g(d),C(e.onClose())})("onCancel",function(){return g(d),C(e.onClose())})("onOk",function(p){return g(d),C(e.onSubmit(p))}),o(1,"div",3)(2,"div",4)(3,"label",5),r(4,"Tokopedia URL"),i(),o(5,"div",6)(6,"div",7)(7,"span",8),r(8,"https://tokopedia.com/"),i()(),o(9,"input",9,0),D("ngModelChange",function(p){return g(d),E(e.formData.URL,p)||(e.formData.URL=p),C(p)}),i()(),f(11,ge,2,1,"div",10),o(12,"label",11),r(13,"Requester's Email"),i(),o(14,"div",6)(15,"input",12,1),D("ngModelChange",function(p){return g(d),E(e.formData.Email,p)||(e.formData.Email=p),C(p)}),i()(),f(17,_e,3,2,"div",10),i()()()}if(l&2){let d=P(10),s=P(16);u("dynamicValidated",!d.invalid&&!s.invalid)("config",e.modalConfig),a(7),u("ngClass",k(7,fe,d.invalid&&(d.dirty||d.touched))),a(2),R("ngModel",e.formData.URL),a(2),u("ngIf",d.invalid&&(d.dirty||d.touched)),a(4),R("ngModel",e.formData.Email),a(2),u("ngIf",s.invalid&&(s.dirty||s.touched))}},dependencies:[K,Z,b,w,oe,ie,A,T],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"]});let t=n;return t})();var Qe=(()=>{let n=class n{constructor(m,l){this.dialogRef=m,this.data=l}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new y,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.shopID)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(l){return new(l||n)(h(M),h(N))},n.\u0275cmp=v({type:n,selectors:[["app-modal-dialog-tokopedia"]],decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(l,e){if(l&1){let d=L();o(0,"modal-material",1),S("onClose",function(){return g(d),C(e.onClose())})("onCancel",function(){return g(d),C(e.onClose())})("onOk",function(){return g(d),C(e.onSubmit())}),o(1,"div",2)(2,"div",3)(3,"input",4,0),D("ngModelChange",function(p){return g(d),E(e.shopID,p)||(e.shopID=p),C(p)}),i(),o(5,"label",5),r(6,"Shop ID"),i()()()()}l&2&&(u("dynamicValidated",e.shopID)("config",e.modalConfig),a(3),R("ngModel",e.shopID))},dependencies:[b,w,A,T],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let t=n;return t})();var ye=t=>({"input-group":t}),ve=(t,n)=>({"is-invalid":t,"input-shopify rounded-start":n}),pe=t=>({"is-invalid":t});function Se(t,n){t&1&&(o(0,"label",3),r(1,"Shopify URL"),i())}function Me(t,n){t&1&&(o(0,"label",3),r(1,"URL"),i())}function Te(t,n){t&1&&(o(0,"span",6),r(1,"myshopify.com"),i())}function be(t,n){if(t&1&&(o(0,"div"),r(1),i()),t&2){let c=U(2);a(),J("",c.data==null?null:c.data.title," url is required")}}function we(t,n){if(t&1&&(o(0,"div",7),f(1,be,2,1,"div"),i()),t&2){let c,m=U();a(),_(!(m.formGroup==null||(c=m.formGroup.get("URL"))==null)&&c.getError("required")?1:-1)}}function Re(t,n){t&1&&r(0," API Key ")}function Ee(t,n){t&1&&r(0," Consumer Key ")}function De(t,n){t&1&&(r(0," ("),o(1,"a",11),r(2,"help center article"),i(),r(3,") "))}function Ge(t,n){t&1&&(o(0,"div",7),r(1,"API Key is required"),i())}function Oe(t,n){t&1&&r(0," Admin API Access Token ")}function Ve(t,n){t&1&&r(0," Consumer Secret ")}function Ie(t,n){t&1&&(o(0,"div",7),r(1,"Consumer Secret is required"),i())}var tt=(()=>{let n=class n{constructor(m,l){this.dialogRef=m,this.data=l,this.modalConfig=new y,this.urlCtrl=new W(null),this.channelType=le}ngOnInit(){this.initModalConfig(),this.initFormGroup()}initFormGroup(){let m=[q.required];this.formGroup=new $({URL:new W(null,m),ConsumerKey:new W(null,[q.required]),ConsumerSecret:new W(null,[q.required])})}initModalConfig(){this.modalConfig=new y,this.modalConfig.title=this.data.title,this.modalConfig.okText="SAVE"}onClose(){this.dialogRef.close()}onSubmit(){this.formGroup.markAllAsTouched();let m=this.formGroup?.get("URL")?.getError("pattern"),l=this.formGroup?.get("ConsumerKey")?.valid,e=this.formGroup?.get("ConsumerSecret")?.valid;if(this.formGroup?.valid||m&&l&&e){let s=this.formGroup.value;this.data?.channelType==this.channelType.Shopify&&(s.URL=`${s.URL}.myshopify.com`),this.dialogRef.close(s)}}};n.\u0275fac=function(l){return new(l||n)(h(M),h(N))},n.\u0275cmp=v({type:n,selectors:[["app-modal-register-channel"]],decls:23,vars:27,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],["for","shopid",1,"form-label","fw-bold","mb-2"],[1,"mb-8","has-validation",3,"ngClass"],["type","text","id","shopid","name","URL","title","URL","formControlName","URL",1,"form-control","form-input","rounded",3,"placeholder","ngClass"],["id","basic-addon2",1,"input-group-text","rounded-end","form-input","text-secondary"],[1,"invalid-feedback"],[1,"mb-8","has-validation"],["type","text","id","ConsumerKey","name","ConsumerKey","title","ConsumerKey","formControlName","ConsumerKey",1,"form-control","rounded","form-input",3,"placeholder","ngClass"],["type","text","id","ConsumerSecret","name","ConsumerSecret","title","ConsumerSecret","formControlName","ConsumerSecret",1,"form-control","rounded","form-input",3,"placeholder","ngClass"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"]],template:function(l,e){if(l&1&&(o(0,"modal-material",0),S("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),o(1,"div",1)(2,"form",2),f(3,Se,2,0,"label",3),o(4,"div",4),f(5,Me,2,0,"label",3),I(6,"input",5),f(7,Te,2,0,"span",6)(8,we,2,1,"div",7),i(),o(9,"div",8)(10,"label",3)(11,"span"),f(12,Re,1,0)(13,Ee,1,0),i(),f(14,De,4,0),i(),I(15,"input",9),f(16,Ge,2,0,"div",7),i(),o(17,"div",8)(18,"label",3),f(19,Oe,1,0)(20,Ve,1,0),i(),I(21,"input",10),f(22,Ie,2,0,"div",7),i()()()()),l&2){let d,s,p,G,O,V;u("config",e.modalConfig),a(2),u("formGroup",e.formGroup),a(),_((e.data==null?null:e.data.channelType)==e.channelType.Shopify?3:-1),a(),u("ngClass",k(18,ye,(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),a(),_((e.data==null?null:e.data.channelType)!=e.channelType.Shopify?5:-1),a(),u("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[ex: brand.myshopify.com]":"Url")("ngClass",Q(20,ve,(e.formGroup==null||(d=e.formGroup.get("URL"))==null?null:d.invalid)&&((e.formGroup==null||(d=e.formGroup.get("URL"))==null?null:d.dirty)||(e.formGroup==null||(d=e.formGroup.get("URL"))==null?null:d.touched)),(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),a(),_((e.data==null?null:e.data.channelType)==e.channelType.Shopify?7:-1),a(),_(!(e.formGroup==null||(s=e.formGroup.get("URL"))==null)&&s.invalid&&(!(e.formGroup==null||(s=e.formGroup.get("URL"))==null)&&s.dirty||!(e.formGroup==null||(s=e.formGroup.get("URL"))==null)&&s.touched)?8:-1),a(4),_((e.data==null?null:e.data.channelType)==e.channelType.Shopify?12:13),a(2),_((e.data==null?null:e.data.channelType)==e.channelType.Shopify?14:-1),a(),u("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[Create an app and copy the API Key]":"[Create an app and copy the Consumer Key]")("ngClass",k(23,pe,(e.formGroup==null||(p=e.formGroup.get("ConsumerKey"))==null?null:p.invalid)&&((e.formGroup==null||(p=e.formGroup.get("ConsumerKey"))==null?null:p.dirty)||(e.formGroup==null||(p=e.formGroup.get("ConsumerKey"))==null?null:p.touched)))),a(),_(!(e.formGroup==null||(G=e.formGroup.get("ConsumerKey"))==null)&&G.getError("required")&&(!(e.formGroup==null||(G=e.formGroup.get("ConsumerKey"))==null)&&G.dirty||!(e.formGroup==null||(G=e.formGroup.get("ConsumerKey"))==null)&&G.touched)?16:-1),a(3),_((e.data==null?null:e.data.channelType)==e.channelType.Shopify?19:20),a(2),u("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[shpat***************************]":"cs_***************")("ngClass",k(25,pe,(e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null?null:O.invalid)&&((e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null?null:O.dirty)||(e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null?null:O.touched)))),a(),_(!(e.formGroup==null||(V=e.formGroup.get("ConsumerSecret"))==null)&&V.getError("required")&&(!(e.formGroup==null||(V=e.formGroup.get("ConsumerSecret"))==null)&&V.dirty||!(e.formGroup==null||(V=e.formGroup.get("ConsumerSecret"))==null)&&V.touched)?22:-1)}},dependencies:[K,ee,b,w,x,T,te,ne],styles:[".input-shopify[_ngcontent-%COMP%]{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.form-input[_ngcontent-%COMP%]{min-height:3.625rem}"]});let t=n;return t})();export{Ne as a,qe as b,ze as c,Qe as d,tt as e};