marketplacepos 3.22.6 → 3.22.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-TKX5EECA.js → chunk-2RZIS7SO.js} +2 -2
- package/Marketplace/{chunk-WDZHKT23.js → chunk-34TFHXOV.js} +1 -1
- package/Marketplace/{chunk-YNS23F33.js → chunk-3ATLH2O5.js} +1 -1
- package/Marketplace/{chunk-ZT6LL6XR.js → chunk-3T6NZ5WH.js} +1 -1
- package/Marketplace/{chunk-SW4MFZHR.js → chunk-4MEDGUR4.js} +1 -1
- package/Marketplace/{chunk-RL4DLGYC.js → chunk-4WRJ4UNZ.js} +1 -1
- package/Marketplace/{chunk-TIZFCLBP.js → chunk-5N4FTVPO.js} +1 -1
- package/Marketplace/{chunk-KRCKXDH4.js → chunk-5UKUFSGI.js} +1 -1
- package/Marketplace/{chunk-ERQSA4CI.js → chunk-7IV6AOHI.js} +1 -1
- package/Marketplace/{chunk-5RFIBP63.js → chunk-DIGP4L5I.js} +2 -2
- package/Marketplace/{chunk-FW2WWSWS.js → chunk-DLCEDZGK.js} +1 -1
- package/Marketplace/{chunk-ZK2ACEWJ.js → chunk-FK647DV3.js} +1 -1
- package/Marketplace/{chunk-U5DTVOAU.js → chunk-HDQ264E7.js} +1 -1
- package/Marketplace/{chunk-NK3KLE4Z.js → chunk-I7SRUSWR.js} +1 -1
- package/Marketplace/{chunk-TB7F3ZCR.js → chunk-IOHEOTV2.js} +1 -1
- package/Marketplace/{chunk-E3RBGXPO.js → chunk-J3APYGWI.js} +1 -1
- package/Marketplace/{chunk-5SVULLWJ.js → chunk-LT5ZCJRA.js} +1 -1
- package/Marketplace/{chunk-YEYUZNK7.js → chunk-MC7L2DZA.js} +1 -1
- package/Marketplace/{chunk-OHREVJW7.js → chunk-N6NC5NSE.js} +1 -1
- package/Marketplace/{chunk-POJ574F2.js → chunk-OKZBCK7E.js} +1 -1
- package/Marketplace/chunk-ONBGY7D4.js +1 -0
- package/Marketplace/{chunk-7FMG3H7T.js → chunk-Q653MB6W.js} +1 -1
- package/Marketplace/{chunk-UPGYF4XT.js → chunk-RXU6CAOP.js} +1 -1
- package/Marketplace/{chunk-SHUDM2FU.js → chunk-S4LDJFZS.js} +1 -1
- package/Marketplace/{chunk-W7EFOXDZ.js → chunk-VJUN2VLY.js} +1 -1
- package/Marketplace/{chunk-B37WXGPN.js → chunk-VL6PS3RX.js} +1 -1
- package/Marketplace/{chunk-ZZWRH7Y5.js → chunk-VRAOGJWM.js} +1 -1
- package/Marketplace/{chunk-DFZNHBOD.js → chunk-WUTL4JBG.js} +1 -1
- package/Marketplace/{chunk-EQYCYZMO.js → chunk-WZVZOQN3.js} +1 -1
- package/Marketplace/{chunk-CS5RLQNE.js → chunk-XEJDB2R3.js} +1 -1
- package/Marketplace/{chunk-ORCZERUP.js → chunk-XIQS2GJ5.js} +1 -1
- package/Marketplace/{chunk-FK2V7B6I.js → chunk-Y6ID7JCT.js} +1 -1
- package/Marketplace/{chunk-SIELKIYA.js → chunk-YPE5AC3X.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-7AJHPHM7.js → main-A5PH6KD3.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-RGOGXUFL.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-
|
|
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-Q653MB6W.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-S4LDJFZS.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-
|
|
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-MC7L2DZA.js").then(r=>r.DownloadV2Component)},canActivate:[oe],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-VL6PS3RX.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,2 +1,2 @@
|
|
|
1
|
-
import{a as Ve}from"./chunk-5OHPBQ35.js";import"./chunk-LRU7GIXZ.js";import{a as L}from"./chunk-WTR5UFZI.js";import{a as H}from"./chunk-XHAXYWZ7.js";import{a as Pe,b as De,c as G}from"./chunk-B5PFUQJP.js";import"./chunk-BVIRHZTZ.js";import{b as Me}from"./chunk-AMSVLO4N.js";import{a as Ee}from"./chunk-N6IHFFFZ.js";import{a as Te,b as Fe}from"./chunk-PD4CUVAW.js";import"./chunk-IJYSJN63.js";import"./chunk-X5Q6FPWS.js";import"./chunk-46AOM3SM.js";import"./chunk-OULUJ2IO.js";import"./chunk-GCKSYCMI.js";import{a as we}from"./chunk-ZFQW5CVZ.js";import"./chunk-ADRVUMMW.js";import{a as be}from"./chunk-XFTUE2ST.js";import"./chunk-HCDKYABV.js";import{e as ge}from"./chunk-CCXKODFV.js";import{i as Ce}from"./chunk-SHUDM2FU.js";import{b as de,e as ue}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{d as Se,l as ye,m as ve,n as Ie}from"./chunk-BO4PPSB5.js";import{t as fe,u as xe}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{b as re,c as se,h as pe,m as ce,o as me,y as _e}from"./chunk-BSN7ZAXG.js";import{c as v,f as he}from"./chunk-64G3XLI6.js";import"./chunk-OVEJFFL6.js";import{$b as f,Bd as ae,Cd as le,Da as _,Ea as d,Eb as u,G as Y,Gb as m,Gc as h,Hc as x,Ic as N,Jc as z,Nb as I,Ob as U,Qb as $,Rb as j,Sb as a,Tb as r,Ub as S,Vb as D,Wb as V,Yb as y,Z as A,bc as l,ea as W,ec as q,gb as P,jb as s,kb as w,mc as Q,nc as c,oc as k,pa as K,pc as M,rc as b,sc as T,sd as ee,ta as Z,tc as F,uc as X,ud as te,vc as J,vd as ne,xb as O,xc as R,yd as ie,zd as oe}from"./chunk-PQDPS2ID.js";import{a as B}from"./chunk-GNOSNGXM.js";var Ne=o=>({"text-decoration-line-through":o}),Le=o=>({"ms-10":o}),Be=o=>({"bg-gradient-warning":o});function Ae(o,p){if(o&1){let e=y();a(0,"button",38),f("click",function(){_(e);let t=l().ngIf,i=l(2);return d(i.updateStock(t))}),S(1,"i",39),c(2," Update "),r()}}function We(o,p){if(o&1){let e=y();a(0,"div"),u(1,Ae,3,0,"button",35),a(2,"button",36),f("click",function(){_(e);let t=l(2);return d(t.openExportDialog())}),S(3,"i",37),a(4,"span"),c(5,"Export"),r()()()}if(o&2){let e=p.ngIf,n=l(2);s(),m("ngIf",n.productService.hasSelectionVariant(e))}}function Oe(o,p){o&1&&(a(0,"div",40)(1,"span"),c(2," showing only different stock, please press next to populate more data "),r()())}function Ue(o,p){if(o&1){let e=y();a(0,"th")(1,"input",41),F("ngModelChange",function(t){_(e);let i=l(2);return T(i.checkboxState,t)||(i.checkboxState=t),d(t)}),f("ngModelChange",function(){let t=_(e).ngIf,i=l(2);return d(i.onCheckboxStateChange(t))}),r()()}if(o&2){let e=l(2);s(),b("ngModel",e.checkboxState)}}function $e(o,p){o&1&&(a(0,"th",32),c(1," Reserved "),r())}function je(o,p){}function Qe(o,p){if(o&1){let e=y();a(0,"input",60),F("ngModelChange",function(t){_(e);let i=l(3).$implicit;return T(i.selected,t)||(i.selected=t),d(t)}),f("ngModelChange",function(){_(e);let t=l(3).$implicit,i=l(2);return d(i.onCheckboxStateProduct(t))}),r()}if(o&2){let e=l(3).$implicit;b("ngModel",e.selected)}}function ze(o,p){if(o&1){let e=y();a(0,"img",61),f("click",function(t){_(e);let i=l(3).$implicit,C=l(2);return d(C.onZoomImage(t,i==null?null:i.ImageUrl))}),r()}if(o&2){let e=l(3).$implicit;q("src",e==null?null:e.ThumbnailUrl,P)}}function Ge(o,p){o&1&&S(0,"img",57)}function He(o,p){if(o&1&&(S(0,"br"),a(1,"div",62),S(2,"i",63),a(3,"small"),c(4),r()()),o&2){let e=l(3).$implicit;s(4),M("(",e==null?null:e.Category,")")}}function Ye(o,p){if(o&1&&(a(0,"td",53)(1,"div",14),u(2,Qe,1,1,"input",54),a(3,"div",55),u(4,ze,1,1,"img",56)(5,Ge,1,0,"img",57),r()()(),a(6,"td",58)(7,"span",59),c(8),r(),u(9,He,5,1),r()),o&2){let e=l(2).$implicit,n=l(2);m("rowSpan",e==null?null:e.Variants.length),s(2),I(e.Variants.length>1?2:-1),s(),m("ngClass",R(7,Le,e.Variants.length<=1)),s(),I(e!=null&&e.ThumbnailUrl?4:5),s(2),m("rowSpan",e==null?null:e.Variants.length),s(2),k(e==null?null:e.Name),s(),I(e.CategoryID!==null&&e.CategoryID!=n.guidEmpty?9:-1)}}function Ke(o,p){if(o&1){let e=y();a(0,"input",41),F("ngModelChange",function(t){_(e);let i=l(2).$implicit;return T(i.selected,t)||(i.selected=t),d(t)}),r()}if(o&2){let e=l(2).$implicit;b("ngModel",e.selected)}}function Ze(o,p){if(o&1&&u(0,Ke,1,1,"input",47),o&2){let e=l().$implicit;I((e==null?null:e.Inventory)<=1e5?0:-1)}}function qe(o,p){if(o&1){let e=y();a(0,"input",41),F("ngModelChange",function(t){_(e);let i=l().$implicit;return T(i.selected,t)||(i.selected=t),d(t)}),r()}if(o&2){let e=l().$implicit;b("ngModel",e.selected)}}function Xe(o,p){o&1&&(a(0,"div",64),c(1," Not Found "),r())}function Je(o,p){if(o&1&&(a(0,"div")(1,"span",65),c(2),h(3,"number"),r(),c(4," => "),a(5,"span",66),c(6),h(7,"number"),r()()),o&2){let e=l().$implicit;s(2),M(" ",x(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),k(x(7,4,e==null?null:e.Inventory))}}function et(o,p){if(o&1&&(c(0),h(1,"number")),o&2){let e=l().$implicit;M(" ",x(1,1,e==null?null:e.Inventory)," ")}}function tt(o,p){if(o&1&&(D(0),a(1,"div",67)(2,"a",68),S(3,"i",69),r()(),V()),o&2){let e=l().$implicit,n=l(3);s(2),m("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),P)}}function nt(o,p){if(o&1){let e=y();a(0,"span",74),f("click",function(){let t=_(e).ngIf,i=l(2).$implicit,C=l().$implicit,g=l(2);return d(g.openTableDialog(C,i,t))}),c(1),h(2,"number"),r()}if(o&2){let e=l(2).$implicit;s(),M(" ",x(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function it(o,p){if(o&1){let e=y();a(0,"td",70)(1,"div",48)(2,"div"),u(3,nt,3,3,"span",71),h(4,"async"),r(),a(5,"div",67)(6,"a",68),S(7,"i",69),r()(),a(8,"div",67)(9,"span",72),f("click",function(){_(e);let t=l().$implicit,i=l(3);return d(i.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),S(10,"i",73),r()()()()}if(o&2){let e=l().$implicit,n=l(3);m("ngClass",R(5,Be,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),m("ngIf",x(4,3,n.products$)),s(3),m("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,P)}}function ot(o,p){if(o&1&&(D(0),a(1,"span",75),c(2),h(3,"number"),r(),V()),o&2){let e=l(2).$implicit;s(2),M(" (",x(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function at(o,p){o&1&&c(0," - ")}function lt(o,p){if(o&1&&(D(0),a(1,"td",44),u(2,ot,4,3,"ng-container",52)(3,at,1,0,"ng-template",null,1,z),r(),V()),o&2){let e=Q(4),n=l().$implicit;s(2),m("ngIf",n==null||n.Channel[0]==null?null:n.Channel[0].InventoryReserved)("ngIfElse",e)}}function rt(o,p){o&1&&(D(0),c(1," - "),V())}function st(o,p){if(o&1&&(a(0,"span",76),h(1,"date"),c(2),h(3,"date"),r()),o&2){let e=l().$implicit;m("matTooltip",N(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),M(" ",N(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function pt(o,p){if(o&1&&(a(0,"tr"),u(1,Ye,10,9),a(2,"td",43),c(3),r(),a(4,"td",44)(5,"span",45),c(6),r()(),a(7,"td",46),u(8,Ze,1,1)(9,qe,1,1,"input",47),r(),a(10,"td")(11,"div",48),u(12,Xe,2,0,"div",49)(13,Je,8,6,"div")(14,et,2,3)(15,tt,4,1,"ng-container",5),r()(),u(16,it,11,7,"td",50)(17,lt,5,2,"ng-container",5),a(18,"td",51),u(19,rt,2,0,"ng-container",52)(20,st,4,8,"ng-template",null,0,z),r()()),o&2){let e=p.$implicit,n=p.index,t=Q(21),i=l(3);s(),I(n==0?1:-1),s(2),k(e==null?null:e.Model),s(2),m("matTooltip",e.Discontinued?i.discontinuedVariantMsg:"")("ngClass",R(14,Ne,e.Discontinued)),s(),k(e==null?null:e.Code),s(2),I((e==null?null:e.Channel[0].TypeID)==1?8:(e==null?null:e.Inventory)>=0?9:-1),s(4),m("ngIf",(e==null?null:e.I)==null),s(),I((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?13:-1),s(),I((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?14:-1),s(),m("ngIf",(e==null?null:e.I)!=null),s(),m("ngIf",e==null?null:e.Channel),s(),m("ngIf",i.isShowReservedColumn),s(2),m("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==i.minDate)("ngIfElse",t)}}function ct(o,p){if(o&1&&(a(0,"tbody"),$(1,je,0,0,null,null,U),u(3,pt,22,16,"tr",42),r()),o&2){let e=p.$implicit;s(),j(e.Variants),s(2),m("ngForOf",e.Variants)}}function mt(o,p){if(o&1){let e=y();a(0,"mainpanel",3),f("onSubmit",function(t){_(e);let i=l();return d(i.onSearch(t))}),a(1,"actions")(2,"div",4),u(3,We,6,1,"div",5),h(4,"async"),r()(),a(5,"filters")(6,"div")(7,"label",6),c(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",7),f("onChannelChange",function(t){_(e);let i=l();return d(i.onChannelChange(t))}),r()(),a(10,"div",8)(11,"label",9),c(12,"PageNumber"),r(),a(13,"input",10),F("ngModelChange",function(t){_(e);let i=l();return T(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),d(t)}),r()(),a(14,"div",8)(15,"label",11),c(16,"Page Size"),r(),a(17,"input",12),F("ngModelChange",function(t){_(e);let i=l();return T(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),d(t)}),r()(),a(18,"div",8)(19,"label",13),c(20,"Quantity From - To"),r(),a(21,"div",14)(22,"input",15),F("ngModelChange",function(t){_(e);let i=l();return T(i.searchFilter.QuantityFrom,t)||(i.searchFilter.QuantityFrom=t),d(t)}),r(),c(23," - "),a(24,"input",16),F("ngModelChange",function(t){_(e);let i=l();return T(i.searchFilter.QuantityTo,t)||(i.searchFilter.QuantityTo=t),d(t)}),r()()()(),a(25,"content")(26,"div",17)(27,"div",18)(28,"div",19),u(29,Oe,3,0,"div",20),a(30,"table",21)(31,"thead",22)(32,"tr")(33,"th",23),c(34," Product "),S(35,"br"),a(36,"mat-slide-toggle",24),f("toggleChange",function(){_(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,d(t.onShowDifferenceStock())}),a(37,"small",13),c(38,"FILTER DIFFERENT INVENTORY"),r()()(),a(39,"th",25),c(40,"Variant"),r(),a(41,"th",26),c(42,"SKU"),r(),u(43,Ue,2,1,"th",5),h(44,"async"),a(45,"th",27),c(46,"POS"),r(),a(47,"th",28)(48,"div",29),f("click",function(){_(e);let t=l();return d(t.openModalFilter())}),S(49,"img",30),a(50,"span",31),c(51),h(52,"stringLimit"),r()()(),u(53,$e,2,0,"th",32),a(54,"th",33),c(55,"Last Sync"),r()()(),$(56,ct,4,1,"tbody",null,U),h(58,"async"),r(),a(59,"infinite-paginator",34),h(60,"async"),f("onNextPage",function(){_(e);let t=l();return d(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=l();return d(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=l();return d(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(o&2){let e,n,t,i=l();m("headerTitle","Inventory Comparison")("pageData",i.pageData)("hideSearchBox",!1),s(3),m("ngIf",x(4,21,i.products$)),s(6),m("ngModel",(i.searchFilter==null?null:i.searchFilter.LocationID)||(i.searchFilter==null?null:i.searchFilter.ChannelID)),s(4),b("ngModel",i.searchFilter.PageNumber),s(4),b("ngModel",i.searchFilter.RowCount),s(5),b("ngModel",i.searchFilter.QuantityFrom),s(2),b("ngModel",i.searchFilter.QuantityTo),s(5),m("ngIf",(i.searchFilter==null?null:i.searchFilter.filterModel)==3),s(14),m("ngIf",x(44,23,i.products$)),s(5),m("matTooltip",((e=i.channelIdentity())==null||e.label==null?null:e.label.length)>13?(e=i.channelIdentity())==null?null:e.label:""),s(),m("src",(n=i.channelIdentity())==null?null:n.img,P),s(2),M(" ",N(52,25,(t=i.channelIdentity())==null?null:t.label,13)," "),s(2),I(i.isShowReservedColumn?53:-1),s(3),j(x(58,28,i.products$)),s(3),m("totalData",i.infinitePagination.totalData())("hideCount",i.infinitePagination.hideCount())("rowCount",x(60,30,i.infinitePagination.totalRowCount$))("pageNumber",i.infinitePagination.pageNumber())("disableNextButton",i.infinitePagination.disableNextButton())("goToLastPage",i.infinitePagination.isLastPage())}}var Kt=(()=>{let p=class p{constructor(n,t,i,C,g,E,ke,Re){this.http=n,this.toastr=t,this.dialog=i,this.productService=C,this.authService=g,this.biggerPictureService=E,this.inventoryService=ke,this.mainPanelService=Re,this.infinitePagination=K(G),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=v.MinDate,this.isShowReservedColumn=!0,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.guidEmpty=v.GuidEMpty,this.selectedChannel=O(null),this.channelIdentity=O({img:null,label:null}),this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.hostName=this.authService.getDomain(),this.initPageLoader(),this.products$=this.infinitePagination.data$.pipe(W(n=>{this.checkShowReservedColumn(n)}),A())}checkShowReservedColumn(n){let t=0,i;n.forEach(C=>{i=C.Variants.find(g=>v.IsNotEmpty(g?.Channel[0]?.InventoryReserved)),i&&(t+=1)}),this.isShowReservedColumn=t>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(A(1),W(n=>{this.searchFilter={RowCount:n.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:n.Filter.ChannelID,LocationID:n.Filter.LocationID},this.initReloadData(),this.showToastrMarketplaceInactive(!n.Filter.IsMarketplaceAppActive)}))}onChannelChange(n){let t=Object.assign({},n);this.selectedChannel.set(t),v.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let n=Object.assign({},this.selectedChannel());v.IsNotEmpty(n.parent)?(this.searchFilter.LocationID=n.id,this.searchFilter.ChannelID=n?.parent?.id,n.label=n?.parent?.label+" - "+n?.label,n.img=v.getChannelLogoByTypeId(n?.parent?.typeid)):(this.searchFilter.LocationID=null,n.img=v.getChannelLogoByTypeId(n?.typeid),this.searchFilter.ChannelID=n?.id,this.selectedChannel.set(n)),this.channelIdentity.update(()=>({img:n.img,label:n.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(n){n&&this.toastr.warning(`Automatic inventory sync disabled.
|
|
1
|
+
import{a as Ve}from"./chunk-5OHPBQ35.js";import"./chunk-LRU7GIXZ.js";import{a as L}from"./chunk-WTR5UFZI.js";import{a as H}from"./chunk-XHAXYWZ7.js";import{a as Pe,b as De,c as G}from"./chunk-B5PFUQJP.js";import"./chunk-BVIRHZTZ.js";import{b as Me}from"./chunk-AMSVLO4N.js";import{a as Ee}from"./chunk-N6IHFFFZ.js";import{a as Te,b as Fe}from"./chunk-PD4CUVAW.js";import"./chunk-IJYSJN63.js";import"./chunk-X5Q6FPWS.js";import"./chunk-46AOM3SM.js";import"./chunk-OULUJ2IO.js";import"./chunk-GCKSYCMI.js";import{a as we}from"./chunk-ZFQW5CVZ.js";import"./chunk-ADRVUMMW.js";import{a as be}from"./chunk-XFTUE2ST.js";import"./chunk-HCDKYABV.js";import{e as ge}from"./chunk-CCXKODFV.js";import{i as Ce}from"./chunk-S4LDJFZS.js";import{b as de,e as ue}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{d as Se,l as ye,m as ve,n as Ie}from"./chunk-BO4PPSB5.js";import{t as fe,u as xe}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{b as re,c as se,h as pe,m as ce,o as me,y as _e}from"./chunk-BSN7ZAXG.js";import{c as v,f as he}from"./chunk-64G3XLI6.js";import"./chunk-OVEJFFL6.js";import{$b as f,Bd as ae,Cd as le,Da as _,Ea as d,Eb as u,G as Y,Gb as m,Gc as h,Hc as x,Ic as N,Jc as z,Nb as I,Ob as U,Qb as $,Rb as j,Sb as a,Tb as r,Ub as S,Vb as D,Wb as V,Yb as y,Z as A,bc as l,ea as W,ec as q,gb as P,jb as s,kb as w,mc as Q,nc as c,oc as k,pa as K,pc as M,rc as b,sc as T,sd as ee,ta as Z,tc as F,uc as X,ud as te,vc as J,vd as ne,xb as O,xc as R,yd as ie,zd as oe}from"./chunk-PQDPS2ID.js";import{a as B}from"./chunk-GNOSNGXM.js";var Ne=o=>({"text-decoration-line-through":o}),Le=o=>({"ms-10":o}),Be=o=>({"bg-gradient-warning":o});function Ae(o,p){if(o&1){let e=y();a(0,"button",38),f("click",function(){_(e);let t=l().ngIf,i=l(2);return d(i.updateStock(t))}),S(1,"i",39),c(2," Update "),r()}}function We(o,p){if(o&1){let e=y();a(0,"div"),u(1,Ae,3,0,"button",35),a(2,"button",36),f("click",function(){_(e);let t=l(2);return d(t.openExportDialog())}),S(3,"i",37),a(4,"span"),c(5,"Export"),r()()()}if(o&2){let e=p.ngIf,n=l(2);s(),m("ngIf",n.productService.hasSelectionVariant(e))}}function Oe(o,p){o&1&&(a(0,"div",40)(1,"span"),c(2," showing only different stock, please press next to populate more data "),r()())}function Ue(o,p){if(o&1){let e=y();a(0,"th")(1,"input",41),F("ngModelChange",function(t){_(e);let i=l(2);return T(i.checkboxState,t)||(i.checkboxState=t),d(t)}),f("ngModelChange",function(){let t=_(e).ngIf,i=l(2);return d(i.onCheckboxStateChange(t))}),r()()}if(o&2){let e=l(2);s(),b("ngModel",e.checkboxState)}}function $e(o,p){o&1&&(a(0,"th",32),c(1," Reserved "),r())}function je(o,p){}function Qe(o,p){if(o&1){let e=y();a(0,"input",60),F("ngModelChange",function(t){_(e);let i=l(3).$implicit;return T(i.selected,t)||(i.selected=t),d(t)}),f("ngModelChange",function(){_(e);let t=l(3).$implicit,i=l(2);return d(i.onCheckboxStateProduct(t))}),r()}if(o&2){let e=l(3).$implicit;b("ngModel",e.selected)}}function ze(o,p){if(o&1){let e=y();a(0,"img",61),f("click",function(t){_(e);let i=l(3).$implicit,C=l(2);return d(C.onZoomImage(t,i==null?null:i.ImageUrl))}),r()}if(o&2){let e=l(3).$implicit;q("src",e==null?null:e.ThumbnailUrl,P)}}function Ge(o,p){o&1&&S(0,"img",57)}function He(o,p){if(o&1&&(S(0,"br"),a(1,"div",62),S(2,"i",63),a(3,"small"),c(4),r()()),o&2){let e=l(3).$implicit;s(4),M("(",e==null?null:e.Category,")")}}function Ye(o,p){if(o&1&&(a(0,"td",53)(1,"div",14),u(2,Qe,1,1,"input",54),a(3,"div",55),u(4,ze,1,1,"img",56)(5,Ge,1,0,"img",57),r()()(),a(6,"td",58)(7,"span",59),c(8),r(),u(9,He,5,1),r()),o&2){let e=l(2).$implicit,n=l(2);m("rowSpan",e==null?null:e.Variants.length),s(2),I(e.Variants.length>1?2:-1),s(),m("ngClass",R(7,Le,e.Variants.length<=1)),s(),I(e!=null&&e.ThumbnailUrl?4:5),s(2),m("rowSpan",e==null?null:e.Variants.length),s(2),k(e==null?null:e.Name),s(),I(e.CategoryID!==null&&e.CategoryID!=n.guidEmpty?9:-1)}}function Ke(o,p){if(o&1){let e=y();a(0,"input",41),F("ngModelChange",function(t){_(e);let i=l(2).$implicit;return T(i.selected,t)||(i.selected=t),d(t)}),r()}if(o&2){let e=l(2).$implicit;b("ngModel",e.selected)}}function Ze(o,p){if(o&1&&u(0,Ke,1,1,"input",47),o&2){let e=l().$implicit;I((e==null?null:e.Inventory)<=1e5?0:-1)}}function qe(o,p){if(o&1){let e=y();a(0,"input",41),F("ngModelChange",function(t){_(e);let i=l().$implicit;return T(i.selected,t)||(i.selected=t),d(t)}),r()}if(o&2){let e=l().$implicit;b("ngModel",e.selected)}}function Xe(o,p){o&1&&(a(0,"div",64),c(1," Not Found "),r())}function Je(o,p){if(o&1&&(a(0,"div")(1,"span",65),c(2),h(3,"number"),r(),c(4," => "),a(5,"span",66),c(6),h(7,"number"),r()()),o&2){let e=l().$implicit;s(2),M(" ",x(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),k(x(7,4,e==null?null:e.Inventory))}}function et(o,p){if(o&1&&(c(0),h(1,"number")),o&2){let e=l().$implicit;M(" ",x(1,1,e==null?null:e.Inventory)," ")}}function tt(o,p){if(o&1&&(D(0),a(1,"div",67)(2,"a",68),S(3,"i",69),r()(),V()),o&2){let e=l().$implicit,n=l(3);s(2),m("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),P)}}function nt(o,p){if(o&1){let e=y();a(0,"span",74),f("click",function(){let t=_(e).ngIf,i=l(2).$implicit,C=l().$implicit,g=l(2);return d(g.openTableDialog(C,i,t))}),c(1),h(2,"number"),r()}if(o&2){let e=l(2).$implicit;s(),M(" ",x(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function it(o,p){if(o&1){let e=y();a(0,"td",70)(1,"div",48)(2,"div"),u(3,nt,3,3,"span",71),h(4,"async"),r(),a(5,"div",67)(6,"a",68),S(7,"i",69),r()(),a(8,"div",67)(9,"span",72),f("click",function(){_(e);let t=l().$implicit,i=l(3);return d(i.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),S(10,"i",73),r()()()()}if(o&2){let e=l().$implicit,n=l(3);m("ngClass",R(5,Be,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),m("ngIf",x(4,3,n.products$)),s(3),m("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,P)}}function ot(o,p){if(o&1&&(D(0),a(1,"span",75),c(2),h(3,"number"),r(),V()),o&2){let e=l(2).$implicit;s(2),M(" (",x(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function at(o,p){o&1&&c(0," - ")}function lt(o,p){if(o&1&&(D(0),a(1,"td",44),u(2,ot,4,3,"ng-container",52)(3,at,1,0,"ng-template",null,1,z),r(),V()),o&2){let e=Q(4),n=l().$implicit;s(2),m("ngIf",n==null||n.Channel[0]==null?null:n.Channel[0].InventoryReserved)("ngIfElse",e)}}function rt(o,p){o&1&&(D(0),c(1," - "),V())}function st(o,p){if(o&1&&(a(0,"span",76),h(1,"date"),c(2),h(3,"date"),r()),o&2){let e=l().$implicit;m("matTooltip",N(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),M(" ",N(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function pt(o,p){if(o&1&&(a(0,"tr"),u(1,Ye,10,9),a(2,"td",43),c(3),r(),a(4,"td",44)(5,"span",45),c(6),r()(),a(7,"td",46),u(8,Ze,1,1)(9,qe,1,1,"input",47),r(),a(10,"td")(11,"div",48),u(12,Xe,2,0,"div",49)(13,Je,8,6,"div")(14,et,2,3)(15,tt,4,1,"ng-container",5),r()(),u(16,it,11,7,"td",50)(17,lt,5,2,"ng-container",5),a(18,"td",51),u(19,rt,2,0,"ng-container",52)(20,st,4,8,"ng-template",null,0,z),r()()),o&2){let e=p.$implicit,n=p.index,t=Q(21),i=l(3);s(),I(n==0?1:-1),s(2),k(e==null?null:e.Model),s(2),m("matTooltip",e.Discontinued?i.discontinuedVariantMsg:"")("ngClass",R(14,Ne,e.Discontinued)),s(),k(e==null?null:e.Code),s(2),I((e==null?null:e.Channel[0].TypeID)==1?8:(e==null?null:e.Inventory)>=0?9:-1),s(4),m("ngIf",(e==null?null:e.I)==null),s(),I((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?13:-1),s(),I((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?14:-1),s(),m("ngIf",(e==null?null:e.I)!=null),s(),m("ngIf",e==null?null:e.Channel),s(),m("ngIf",i.isShowReservedColumn),s(2),m("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==i.minDate)("ngIfElse",t)}}function ct(o,p){if(o&1&&(a(0,"tbody"),$(1,je,0,0,null,null,U),u(3,pt,22,16,"tr",42),r()),o&2){let e=p.$implicit;s(),j(e.Variants),s(2),m("ngForOf",e.Variants)}}function mt(o,p){if(o&1){let e=y();a(0,"mainpanel",3),f("onSubmit",function(t){_(e);let i=l();return d(i.onSearch(t))}),a(1,"actions")(2,"div",4),u(3,We,6,1,"div",5),h(4,"async"),r()(),a(5,"filters")(6,"div")(7,"label",6),c(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",7),f("onChannelChange",function(t){_(e);let i=l();return d(i.onChannelChange(t))}),r()(),a(10,"div",8)(11,"label",9),c(12,"PageNumber"),r(),a(13,"input",10),F("ngModelChange",function(t){_(e);let i=l();return T(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),d(t)}),r()(),a(14,"div",8)(15,"label",11),c(16,"Page Size"),r(),a(17,"input",12),F("ngModelChange",function(t){_(e);let i=l();return T(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),d(t)}),r()(),a(18,"div",8)(19,"label",13),c(20,"Quantity From - To"),r(),a(21,"div",14)(22,"input",15),F("ngModelChange",function(t){_(e);let i=l();return T(i.searchFilter.QuantityFrom,t)||(i.searchFilter.QuantityFrom=t),d(t)}),r(),c(23," - "),a(24,"input",16),F("ngModelChange",function(t){_(e);let i=l();return T(i.searchFilter.QuantityTo,t)||(i.searchFilter.QuantityTo=t),d(t)}),r()()()(),a(25,"content")(26,"div",17)(27,"div",18)(28,"div",19),u(29,Oe,3,0,"div",20),a(30,"table",21)(31,"thead",22)(32,"tr")(33,"th",23),c(34," Product "),S(35,"br"),a(36,"mat-slide-toggle",24),f("toggleChange",function(){_(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,d(t.onShowDifferenceStock())}),a(37,"small",13),c(38,"FILTER DIFFERENT INVENTORY"),r()()(),a(39,"th",25),c(40,"Variant"),r(),a(41,"th",26),c(42,"SKU"),r(),u(43,Ue,2,1,"th",5),h(44,"async"),a(45,"th",27),c(46,"POS"),r(),a(47,"th",28)(48,"div",29),f("click",function(){_(e);let t=l();return d(t.openModalFilter())}),S(49,"img",30),a(50,"span",31),c(51),h(52,"stringLimit"),r()()(),u(53,$e,2,0,"th",32),a(54,"th",33),c(55,"Last Sync"),r()()(),$(56,ct,4,1,"tbody",null,U),h(58,"async"),r(),a(59,"infinite-paginator",34),h(60,"async"),f("onNextPage",function(){_(e);let t=l();return d(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=l();return d(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=l();return d(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(o&2){let e,n,t,i=l();m("headerTitle","Inventory Comparison")("pageData",i.pageData)("hideSearchBox",!1),s(3),m("ngIf",x(4,21,i.products$)),s(6),m("ngModel",(i.searchFilter==null?null:i.searchFilter.LocationID)||(i.searchFilter==null?null:i.searchFilter.ChannelID)),s(4),b("ngModel",i.searchFilter.PageNumber),s(4),b("ngModel",i.searchFilter.RowCount),s(5),b("ngModel",i.searchFilter.QuantityFrom),s(2),b("ngModel",i.searchFilter.QuantityTo),s(5),m("ngIf",(i.searchFilter==null?null:i.searchFilter.filterModel)==3),s(14),m("ngIf",x(44,23,i.products$)),s(5),m("matTooltip",((e=i.channelIdentity())==null||e.label==null?null:e.label.length)>13?(e=i.channelIdentity())==null?null:e.label:""),s(),m("src",(n=i.channelIdentity())==null?null:n.img,P),s(2),M(" ",N(52,25,(t=i.channelIdentity())==null?null:t.label,13)," "),s(2),I(i.isShowReservedColumn?53:-1),s(3),j(x(58,28,i.products$)),s(3),m("totalData",i.infinitePagination.totalData())("hideCount",i.infinitePagination.hideCount())("rowCount",x(60,30,i.infinitePagination.totalRowCount$))("pageNumber",i.infinitePagination.pageNumber())("disableNextButton",i.infinitePagination.disableNextButton())("goToLastPage",i.infinitePagination.isLastPage())}}var Kt=(()=>{let p=class p{constructor(n,t,i,C,g,E,ke,Re){this.http=n,this.toastr=t,this.dialog=i,this.productService=C,this.authService=g,this.biggerPictureService=E,this.inventoryService=ke,this.mainPanelService=Re,this.infinitePagination=K(G),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=v.MinDate,this.isShowReservedColumn=!0,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.guidEmpty=v.GuidEMpty,this.selectedChannel=O(null),this.channelIdentity=O({img:null,label:null}),this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.hostName=this.authService.getDomain(),this.initPageLoader(),this.products$=this.infinitePagination.data$.pipe(W(n=>{this.checkShowReservedColumn(n)}),A())}checkShowReservedColumn(n){let t=0,i;n.forEach(C=>{i=C.Variants.find(g=>v.IsNotEmpty(g?.Channel[0]?.InventoryReserved)),i&&(t+=1)}),this.isShowReservedColumn=t>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(A(1),W(n=>{this.searchFilter={RowCount:n.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:n.Filter.ChannelID,LocationID:n.Filter.LocationID},this.initReloadData(),this.showToastrMarketplaceInactive(!n.Filter.IsMarketplaceAppActive)}))}onChannelChange(n){let t=Object.assign({},n);this.selectedChannel.set(t),v.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let n=Object.assign({},this.selectedChannel());v.IsNotEmpty(n.parent)?(this.searchFilter.LocationID=n.id,this.searchFilter.ChannelID=n?.parent?.id,n.label=n?.parent?.label+" - "+n?.label,n.img=v.getChannelLogoByTypeId(n?.parent?.typeid)):(this.searchFilter.LocationID=null,n.img=v.getChannelLogoByTypeId(n?.typeid),this.searchFilter.ChannelID=n?.id,this.selectedChannel.set(n)),this.channelIdentity.update(()=>({img:n.img,label:n.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(n){n&&this.toastr.warning(`Automatic inventory sync disabled.
|
|
2
2
|
Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}onSearch(n){this.searchFilter.text=n,this.setChannelFilter(),this.initReloadData()}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(n){let t=this.productService.selectedVariantProduct(n);if(t.length>0){let i=this.searchFilter.LocationID,C=t.map(E=>B({ID:E.ID,Code:E.Code,Inventory:E.Inventory},v.IsNotEmpty(i)&&{LocationID:i})),g={ListChannelID:[this.searchFilter.ChannelID],List:C};this.http.post("/api/Inventory/UpdateChannel",g).subscribe(E=>{this.initReloadData(),this.checkboxState=!1,this.handlingUpdateStock(E)})}}handlingUpdateStock(n){if(n[0]?.Response){let t=n[0]?.Response?.Fail_list,i=n[0]?.Response?.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",i,t)}else this.toastr.error(n[0]?.Exception,"Error")}refreshInventory(n,t,i,C){let g={ChannelItemID:n,ChannelVariationID:t,ChannelID:i,VariantID:C};this.http.post("/api/Inventory/RefreshInventoryChannel",g).subscribe(E=>{this.toastr.success("Successfully updated","Success"),this.initReloadData()})}onCheckboxStateProduct(n){n.Variants=n.Variants.map(t=>(t.Inventory>=0&&(t.selected=n.selected),t))}onCheckboxStateChange(n){n=n.map(t=>(t.Variants=t.Variants.map(i=>(i.selected=this.checkboxState,i)),t))}openTableDialog(n,t,i){this.dialog.open(Pe,{data:{Name:n.Name,Variant:t,ChannelID:t?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:n.ChannelItemID}}).afterClosed().pipe(Y(g=>v.IsNotEmpty(g))).subscribe(g=>{this.updateItemAfterDialog(g)})}updateItemAfterDialog(n){let t=this.searchFilter.LocationID,i=B({ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:parseFloat(n.Inventory),VariantID:n.ID,SKU:n.Sku},v.IsNotEmpty(t)&&{LocationID:t});this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(C=>{this.searchFilter.PageNumber=1,this.initReloadData(),this.handlingUpdateStock([C])})}openExportDialog(){this.dialog.open(Me,{data:{title:"Export Inventory Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,QuantityFrom:this.searchFilter.QuantityFrom,QuantityTo:this.searchFilter.QuantityTo,exportApi:"Inventory/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=H.DIFFERENCE:this.searchFilter.filterModel=H.ALL,this.initReloadData()}onZoomImage(n,t){this.biggerPictureService.openBiggerPicture(n,t)}};p.\u0275fac=function(t){return new(t||p)(w(ue),w(de),w(Se),w(we),w(Ce),w(be),w(L),w(ye))},p.\u0275cmp=Z({type:p,selectors:[["app-single-channel-comparison"]],standalone:!0,features:[X([G,L]),J],decls:2,vars:3,consts:[["SYNCDATE",""],["EMPTY_RESERVED",""],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"onSubmit","headerTitle","pageData","hideSearchBox"],[1,"d-flex"],[4,"ngIf"],["for","channelOptions",1,"fw-bold","mb-2"],["id","channelOptions",3,"onChannelChange","ngModel"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],["scope","col",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-center",2,"width","145px"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModelChange","ngModel"],[4,"ngFor","ngForOf"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"align-middle"],["type","checkbox",3,"ngModel"],[1,"d-flex","align-items-center","justify-content-end"],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"text-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"width","0%",3,"rowSpan"],["type","checkbox",1,"me-3",3,"ngModel"],[3,"ngClass"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],["title","Stock Available"],["title","Inventory below minimum inventory"],[1,"ms-3"],["target","_blank",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"text-end",3,"ngClass"],["class","cursor",3,"click",4,"ngIf"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom","pt-1"],[1,"cursor",3,"click"],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"]],template:function(t,i){t&1&&(u(0,mt,61,32,"mainpanel",2),h(1,"async")),t&2&&m("ngIf",x(1,1,i.loader$))},dependencies:[le,ee,te,ne,ie,ae,oe,Ie,ve,ge,_e,se,me,re,pe,ce,Ee,De,he,Fe,Te,xe,fe,Ve],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]});let o=p;return o})();export{Kt as SingleChannelComparisonComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as r}from"./chunk-
|
|
1
|
+
import{g as r}from"./chunk-S4LDJFZS.js";import{b as l,e as C}from"./chunk-4SAJUEHO.js";import{b as o,c}from"./chunk-64G3XLI6.js";import{ea as s,ja as u,oa as h,v as p}from"./chunk-PQDPS2ID.js";var y=(()=>{let n=class n{constructor(t,e){this.httpService=t,this.toastr=e}saveChannel(t){return this.httpService.post("/api/Channel/SubmitChannel",t)}getLastSync(t){return this.httpService.get(`${r.ChannelGetLastSyncByID}/?ID=${t}`)}getChannel(t){return this.httpService.post(r.GetChannel,t)}getChannelLoader(){return this.httpService.get(r.GetChannelLoader)}testShopID(t){return this.httpService.post(r.TestShopID,t).pipe(s(e=>{this.showTostrSuccessTestShopID(e)}))}updateChannelIndex(t){return this.httpService.post(r.UpdateChannelIndex,t)}deleteChannel(t){return this.httpService.post(r.DeleteChannel,t)}mapChannelImage(t){return t.map(e=>(e.img=c.getChannelLogoByTypeId(e.TypeID),e))}showTostrSuccessTestShopID(t){let e="";for(var i in t)e+=i+" : "+t[i]+"<br/>";this.toastr.success(e,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}getRegisterByOutletName(t){return this.httpService.post(r.GetRegisterByOutletName,{Outlet:t})}getChannelRowCount(t){return this.httpService.post(r.GetChannelRowCount,t).pipe(p(e=>e.Count))}getChannelWarehouse(t){return this.httpService.get(`${r.GetChannelWarehouse}/?ChannelID=${t}`)}unSynchronizedWarehouse(t){return this.httpService.delete(`${r.UnSynchronizedWarehouse}?ID=${t}`)}authorizedChannel(t){let e=this.getApiAuthorize(t);return this.httpService.post(`/api/${e}`,null).pipe(s(i=>{window.open(i.Url,"_blank")}))}getApiAuthorize(t){let e;switch(t){case o.Shopee:e="ChannelAuthorization/ShopeeV2_URL";break;case o.Tiktok:e="ChannelAuthorization/Tiktok_URL";break;case o.Lazada:e="ChannelAuthorization/Lazada_URL";break}return e}};n.\u0275fac=function(e){return new(e||n)(h(C),h(l))},n.\u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"});let a=n;return a})();export{y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as N}from"./chunk-WTR5UFZI.js";import{a as M}from"./chunk-XHAXYWZ7.js";import{a as Ne,b as ke,c as U}from"./chunk-B5PFUQJP.js";import{a as _e}from"./chunk-BVIRHZTZ.js";import{a as Ee,b as Me}from"./chunk-AMSVLO4N.js";import{a as De}from"./chunk-N6IHFFFZ.js";import{a as Ve,b as Te}from"./chunk-PD4CUVAW.js";import"./chunk-GCKSYCMI.js";import{a as be}from"./chunk-ZFQW5CVZ.js";import"./chunk-ADRVUMMW.js";import{a as Fe}from"./chunk-XFTUE2ST.js";import"./chunk-HCDKYABV.js";import{a as fe,b as xe,d as Se,e as Pe}from"./chunk-CCXKODFV.js";import{i as ue}from"./chunk-SHUDM2FU.js";import{b as de,e as ge}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{d as Ie,l as we,m as ye,n as ve}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{b as oe,c as re,h as le,m as ce,o as se,y as pe}from"./chunk-BSN7ZAXG.js";import{c as me,e as he,f as Ce}from"./chunk-64G3XLI6.js";import"./chunk-OVEJFFL6.js";import{$b as u,Bd as E,Cd as ie,Da as _,Ea as m,Eb as h,G as A,Gb as p,Gc as v,Hc as T,Ic as X,Id as ae,Jc as Y,Nb as S,Ob as k,Qb as L,Rb as R,Sb as o,Tb as c,Ub as P,Vb as q,Wb as K,Yb as x,Z as $,bc as r,ea as j,ec as H,gb as D,jb as l,kb as f,mc as J,nc as d,oc as B,pa as z,pc as F,rc as I,sc as w,sd as ee,ta as G,tc as y,uc as Z,vc as Q,vd as te,xc as V,yd as ne}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var O=i=>[i],Ue=i=>({"text-decoration-line-through":i}),Oe=i=>({"bg-gradient-warning":i}),We=i=>({"ms-10":i});function Ae(i,s){if(i&1&&(o(0,"span",10),P(1,"img",11),c(),d(2)),i&2){let t=s.item;l(),p("src",t==null?null:t.Img,D),l(),F(" ",t.Name," ")}}function $e(i,s){if(i&1){let t=x();o(0,"button",16),u("click",function(){_(t);let n=r().ngIf,a=r(2);return m(a.updateStock(n))}),P(1,"i",17),d(2," Update "),c()}}function je(i,s){if(i&1){let t=x();o(0,"actions")(1,"div",12),h(2,$e,3,0,"button",13),o(3,"button",14),u("click",function(){_(t);let n=r(2);return m(n.openExportDialog())}),P(4,"i",15),o(5,"span"),d(6,"Export"),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(2),p("ngIf",e.productService.hasSelectionVariant(t))}}function ze(i,s){if(i&1){let t=x();o(0,"th")(1,"input",32),u("change",function(n){_(t);let a=r().ngIf,g=r(2);return m(g.onSelectAllSKU(n.target.checked,a))}),c()()}}function Ge(i,s){if(i&1){let t=x();o(0,"input",51),y("ngModelChange",function(n){_(t);let a=r(4).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),u("ngModelChange",function(){_(t);let n=r(4).$implicit,a=r(3);return m(a.onCheckboxStateProduct(n))}),c()}if(i&2){let t=r(4).$implicit;I("ngModel",t.selected)}}function qe(i,s){if(i&1&&h(0,Ge,1,1,"ng-template",26),i&2){let t=r(6);p("ngxPermissionsOnly",V(1,O,t.rolePriceEdit))}}function Ke(i,s){if(i&1){let t=x();q(0),o(1,"img",52),u("click",function(n){_(t);let a=r(3).$implicit,g=r(3);return m(g.onZoomImage(n,a==null?null:a.ImageUrl))}),c(),K()}if(i&2){let t=r(3).$implicit;l(),H("src",t.ThumbnailUrl,D)}}function He(i,s){i&1&&P(0,"img",53)}function Je(i,s){if(i&1&&(o(0,"small",50),d(1),c()),i&2){let t=r(3).$implicit;l(),F("(",t.Category,")")}}function Ze(i,s){if(i&1&&(o(0,"td",44)(1,"div",45),h(2,qe,1,3,null,26),o(3,"div",46),h(4,Ke,2,1,"ng-container",47)(5,He,1,0,"ng-template",null,0,Y),c()()(),o(7,"td",48)(8,"span",49),d(9),c(),h(10,Je,2,1,"small",50),c()),i&2){let t=J(6),e=r(2).$implicit;p("rowSpan",e.Variants.length),l(2),S((e.Variants==null?null:e.Variants.length)>1?2:-1),l(),p("ngClass",V(8,We,(e.Variants==null?null:e.Variants.length)<=1)),l(),p("ngIf",e.ThumbnailUrl)("ngIfElse",t),l(3),p("rowSpan",e.Variants.length),l(2),B(e.Name),l(),S(e.Category?10:-1)}}function Qe(i,s){if(i&1){let t=x();o(0,"input",56),y("ngModelChange",function(n){_(t);let a=r(2).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),c()}if(i&2){let t=r(2).$implicit;I("ngModel",t.selected)}}function Xe(i,s){if(i&1&&(o(0,"td",54),h(1,Qe,1,1,"input",55),c()),i&2){let t=r().$implicit;l(),S(t.UnitPrice>=0?1:-1)}}function Ye(i,s){i&1&&(o(0,"div",36),d(1," Not Found "),c())}function et(i,s){if(i&1&&(o(0,"div"),d(1),v(2,"number"),c()),i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.UnitPrice)," ")}}function tt(i,s){if(i&1&&(o(0,"div",37)(1,"a",40),P(2,"i",57),c()()),i&2){let t=r().$implicit,e=r(4);l(),p("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),D)}}function nt(i,s){if(i&1){let t=x();o(0,"div",58),u("click",function(){_(t);let n=r().$implicit,a=r().$implicit,g=r(2).ngIf,C=r();return m(C.openTableDialog(n,a,g))}),d(1),v(2,"number"),c()}if(i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.Channel[0]==null?null:t.Channel[0].Price)," ")}}function it(i,s){if(i&1){let t=x();o(0,"tr",33),h(1,Ze,11,10),o(2,"td",24),d(3),c(),o(4,"td",27)(5,"span",34),d(6),c()(),h(7,Xe,2,1,"ng-template",26),o(8,"td",27)(9,"div",35),h(10,Ye,2,0,"div",36)(11,et,3,3,"div")(12,tt,3,1,"div",37),c()(),o(13,"td",38)(14,"div",35),h(15,nt,3,3,"div",39),o(16,"div",37)(17,"a",40),P(18,"i",41),c()(),o(19,"div",37)(20,"div",42),u("click",function(){let n=_(t).$implicit,a=r(4);return m(a.refreshPrice(n))}),P(21,"i",43),c()()()()()}if(i&2){let t=s.$implicit,e=s.$index,n=r(4);l(),S(e==0?1:-1),l(2),B(t.Model),l(2),p("matTooltip",t.Discontinued?n.discontinuedVariantMsg:"")("ngClass",V(12,Ue,t.Discontinued)),l(),F(" ",t.Code," "),l(),p("ngxPermissionsOnly",V(14,O,n.rolePriceEdit)),l(3),S((t.Channel[0]==null?null:t.Channel[0].Description)!=null?10:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?11:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?12:-1),l(),p("ngClass",V(16,Oe,t.UnitPrice!=(t.Channel[0]==null?null:t.Channel[0].Price))),l(2),S(t.Channel.length>0?15:-1),l(2),p("href",t.Channel[0]==null?null:t.Channel[0].Url,D)}}function at(i,s){if(i&1&&L(0,it,22,18,"tr",33,k),i&2){let t=s.$implicit;R(t.Variants)}}function ot(i,s){if(i&1){let t=x();o(0,"content")(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr")(6,"th",22),d(7," Product "),o(8,"div")(9,"mat-slide-toggle",23),y("ngModelChange",function(n){_(t);let a=r(2);return w(a.toggleDifferentInventory,n)||(a.toggleDifferentInventory=n),m(n)}),u("toggleChange",function(){_(t);let n=r(2);return m(n.onToggleDifferentInventory())}),o(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),o(12,"th",24),d(13,"Variant"),c(),o(14,"th",25),d(15,"SKU"),c(),h(16,ze,2,0,"ng-template",26),o(17,"th",27),d(18,"POS"),c(),o(19,"th",27)(20,"div",28),u("click",function(){_(t);let n=r(2);return m(n.openModalFilter())}),P(21,"img",29),o(22,"span",30),d(23),v(24,"stringLimit"),c()()()()(),o(25,"tbody"),L(26,at,2,0,null,null,k),c()(),o(28,"infinite-paginator",31),v(29,"async"),u("onNextPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onNextPage(n.searchFilter))})("onLastPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onLastPage(n.searchFilter))})("onGetRowCount",function(){_(t);let n=r(2);return m(n.infinitePagination.getRowCount(n.searchFilter))}),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(9),I("ngModel",e.toggleDifferentInventory),l(7),p("ngxPermissionsOnly",V(16,O,e.rolePriceEdit)),l(4),p("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),l(),p("src",e.selectedChannel==null?null:e.selectedChannel.Img,D),l(2),F(" ",X(24,11,e.selectedChannel==null?null:e.selectedChannel.Name,20)," "),l(3),R(t),l(2),p("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",T(29,14,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}function rt(i,s){if(i&1){let t=x();o(0,"mainpanel",2),y("textChange",function(n){_(t);let a=r();return w(a.searchFilter.text,n)||(a.searchFilter.text=n),m(n)}),u("onSubmit",function(){_(t);let n=r();return m(n.onSearch())}),o(1,"filters")(2,"div")(3,"label",3),d(4,"Channel"),c(),o(5,"ng-select",4),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.ChannelID,n)||(a.searchFilter.ChannelID=n),m(n)}),h(6,Ae,3,2,"ng-template",5),c()(),o(7,"div",6)(8,"label",7),d(9,"Page Number"),c(),o(10,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.PageNumber,n)||(a.searchFilter.PageNumber=n),m(n)}),c()(),o(11,"div",6)(12,"label",7),d(13,"Page Size"),c(),o(14,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.RowCount,n)||(a.searchFilter.RowCount=n),m(n)}),c()()(),h(15,je,7,1,"actions",9),v(16,"async"),h(17,ot,30,18,"content",9),v(18,"async"),c()}if(i&2){let t=r();p("headerTitle",t.pageTitle),I("text",t.searchFilter.text),l(5),p("clearable",!1)("items",t.channelOptions),I("ngModel",t.searchFilter.ChannelID),l(5),I("ngModel",t.searchFilter.PageNumber),l(4),I("ngModel",t.searchFilter.RowCount),l(),p("ngIf",T(16,9,t.data$)),l(2),p("ngIf",T(18,11,t.data$))}}var zt=(()=>{let s=class s{constructor(e,n,a,g,C,b,W,Le,Re,Be){this.http=e,this.toastr=n,this.dialog=a,this.productService=g,this.biggerPictureService=C,this.inventoryService=b,this.authService=W,this.mainPanelService=Le,this.exportService=Re,this.decimalPipe=Be,this.infinitePagination=z(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=_e.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe($(1)),this.channelOptions=W.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(j(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=M.ALL,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=M.ALL:this.searchFilter.filterModel=M.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let a=this.productService.selectedVariantProduct(e).map(C=>({ID:C.ID,ChannelID:C.Channel[0].ChannelID,Code:C.Code,Price:C.UnitPrice})),g={ListChannelID:[this.searchFilter.ChannelID],ListPrice:a};this.http.post("/api/Price/UpdateChannel",g).subscribe(C=>{this.onSearch(),this.handlingUpdateStock(C.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let n=e.failure_list,a=e.success_list;this.inventoryService.showToastrUpdateInventory("Price",a,n)}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(a=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openTableDialog(e,n,a){let g=JSON.parse(JSON.stringify(e));this.dialog.open(Ne,{data:{Name:n.Name,Variant:g,ChannelID:g?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:g?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(A(b=>me.IsNotEmpty(b))).subscribe(b=>{this.updateItemAfterDialog(b,e)})}updateItemAfterDialog(e,n){let a={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",a).subscribe(g=>{let C=this.productService.findChannelById(a.ID,this.channelOptions),b=a.Price?this.decimalPipe.transform(a.Price):a.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${C.Name} to ${b}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=a.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(a=>(a.Variants=a.Variants.map(g=>(g.selected=e,g)),a))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}openExportDialog(){this.dialog.open(Me,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}};s.\u0275fac=function(n){return new(n||s)(f(ge),f(de),f(Ie),f(be),f(Fe),f(N),f(ue),f(we),f(Ee),f(E))},s.\u0275cmp=G({type:s,selectors:[["app-price-single-channel"]],standalone:!0,features:[Z([U,N,ae("https://res.cloudinary.com/"),E]),Q],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],[3,"ngClass"],[4,"ngIf","ngIfElse"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(n,a){n&1&&(h(0,rt,19,13,"mainpanel",1),v(1,"async")),n&2&&p("ngIf",T(1,1,a.loader$))},dependencies:[ie,ee,te,ne,E,ve,ye,Pe,Se,fe,xe,pe,re,se,oe,le,ce,De,ke,Ce,he,Te,Ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0});let i=s;return i})();export{zt as PriceSingleChannelComponent};
|
|
1
|
+
import{a as N}from"./chunk-WTR5UFZI.js";import{a as M}from"./chunk-XHAXYWZ7.js";import{a as Ne,b as ke,c as U}from"./chunk-B5PFUQJP.js";import{a as _e}from"./chunk-BVIRHZTZ.js";import{a as Ee,b as Me}from"./chunk-AMSVLO4N.js";import{a as De}from"./chunk-N6IHFFFZ.js";import{a as Ve,b as Te}from"./chunk-PD4CUVAW.js";import"./chunk-GCKSYCMI.js";import{a as be}from"./chunk-ZFQW5CVZ.js";import"./chunk-ADRVUMMW.js";import{a as Fe}from"./chunk-XFTUE2ST.js";import"./chunk-HCDKYABV.js";import{a as fe,b as xe,d as Se,e as Pe}from"./chunk-CCXKODFV.js";import{i as ue}from"./chunk-S4LDJFZS.js";import{b as de,e as ge}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{d as Ie,l as we,m as ye,n as ve}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{b as oe,c as re,h as le,m as ce,o as se,y as pe}from"./chunk-BSN7ZAXG.js";import{c as me,e as he,f as Ce}from"./chunk-64G3XLI6.js";import"./chunk-OVEJFFL6.js";import{$b as u,Bd as E,Cd as ie,Da as _,Ea as m,Eb as h,G as A,Gb as p,Gc as v,Hc as T,Ic as X,Id as ae,Jc as Y,Nb as S,Ob as k,Qb as L,Rb as R,Sb as o,Tb as c,Ub as P,Vb as q,Wb as K,Yb as x,Z as $,bc as r,ea as j,ec as H,gb as D,jb as l,kb as f,mc as J,nc as d,oc as B,pa as z,pc as F,rc as I,sc as w,sd as ee,ta as G,tc as y,uc as Z,vc as Q,vd as te,xc as V,yd as ne}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var O=i=>[i],Ue=i=>({"text-decoration-line-through":i}),Oe=i=>({"bg-gradient-warning":i}),We=i=>({"ms-10":i});function Ae(i,s){if(i&1&&(o(0,"span",10),P(1,"img",11),c(),d(2)),i&2){let t=s.item;l(),p("src",t==null?null:t.Img,D),l(),F(" ",t.Name," ")}}function $e(i,s){if(i&1){let t=x();o(0,"button",16),u("click",function(){_(t);let n=r().ngIf,a=r(2);return m(a.updateStock(n))}),P(1,"i",17),d(2," Update "),c()}}function je(i,s){if(i&1){let t=x();o(0,"actions")(1,"div",12),h(2,$e,3,0,"button",13),o(3,"button",14),u("click",function(){_(t);let n=r(2);return m(n.openExportDialog())}),P(4,"i",15),o(5,"span"),d(6,"Export"),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(2),p("ngIf",e.productService.hasSelectionVariant(t))}}function ze(i,s){if(i&1){let t=x();o(0,"th")(1,"input",32),u("change",function(n){_(t);let a=r().ngIf,g=r(2);return m(g.onSelectAllSKU(n.target.checked,a))}),c()()}}function Ge(i,s){if(i&1){let t=x();o(0,"input",51),y("ngModelChange",function(n){_(t);let a=r(4).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),u("ngModelChange",function(){_(t);let n=r(4).$implicit,a=r(3);return m(a.onCheckboxStateProduct(n))}),c()}if(i&2){let t=r(4).$implicit;I("ngModel",t.selected)}}function qe(i,s){if(i&1&&h(0,Ge,1,1,"ng-template",26),i&2){let t=r(6);p("ngxPermissionsOnly",V(1,O,t.rolePriceEdit))}}function Ke(i,s){if(i&1){let t=x();q(0),o(1,"img",52),u("click",function(n){_(t);let a=r(3).$implicit,g=r(3);return m(g.onZoomImage(n,a==null?null:a.ImageUrl))}),c(),K()}if(i&2){let t=r(3).$implicit;l(),H("src",t.ThumbnailUrl,D)}}function He(i,s){i&1&&P(0,"img",53)}function Je(i,s){if(i&1&&(o(0,"small",50),d(1),c()),i&2){let t=r(3).$implicit;l(),F("(",t.Category,")")}}function Ze(i,s){if(i&1&&(o(0,"td",44)(1,"div",45),h(2,qe,1,3,null,26),o(3,"div",46),h(4,Ke,2,1,"ng-container",47)(5,He,1,0,"ng-template",null,0,Y),c()()(),o(7,"td",48)(8,"span",49),d(9),c(),h(10,Je,2,1,"small",50),c()),i&2){let t=J(6),e=r(2).$implicit;p("rowSpan",e.Variants.length),l(2),S((e.Variants==null?null:e.Variants.length)>1?2:-1),l(),p("ngClass",V(8,We,(e.Variants==null?null:e.Variants.length)<=1)),l(),p("ngIf",e.ThumbnailUrl)("ngIfElse",t),l(3),p("rowSpan",e.Variants.length),l(2),B(e.Name),l(),S(e.Category?10:-1)}}function Qe(i,s){if(i&1){let t=x();o(0,"input",56),y("ngModelChange",function(n){_(t);let a=r(2).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),c()}if(i&2){let t=r(2).$implicit;I("ngModel",t.selected)}}function Xe(i,s){if(i&1&&(o(0,"td",54),h(1,Qe,1,1,"input",55),c()),i&2){let t=r().$implicit;l(),S(t.UnitPrice>=0?1:-1)}}function Ye(i,s){i&1&&(o(0,"div",36),d(1," Not Found "),c())}function et(i,s){if(i&1&&(o(0,"div"),d(1),v(2,"number"),c()),i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.UnitPrice)," ")}}function tt(i,s){if(i&1&&(o(0,"div",37)(1,"a",40),P(2,"i",57),c()()),i&2){let t=r().$implicit,e=r(4);l(),p("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),D)}}function nt(i,s){if(i&1){let t=x();o(0,"div",58),u("click",function(){_(t);let n=r().$implicit,a=r().$implicit,g=r(2).ngIf,C=r();return m(C.openTableDialog(n,a,g))}),d(1),v(2,"number"),c()}if(i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.Channel[0]==null?null:t.Channel[0].Price)," ")}}function it(i,s){if(i&1){let t=x();o(0,"tr",33),h(1,Ze,11,10),o(2,"td",24),d(3),c(),o(4,"td",27)(5,"span",34),d(6),c()(),h(7,Xe,2,1,"ng-template",26),o(8,"td",27)(9,"div",35),h(10,Ye,2,0,"div",36)(11,et,3,3,"div")(12,tt,3,1,"div",37),c()(),o(13,"td",38)(14,"div",35),h(15,nt,3,3,"div",39),o(16,"div",37)(17,"a",40),P(18,"i",41),c()(),o(19,"div",37)(20,"div",42),u("click",function(){let n=_(t).$implicit,a=r(4);return m(a.refreshPrice(n))}),P(21,"i",43),c()()()()()}if(i&2){let t=s.$implicit,e=s.$index,n=r(4);l(),S(e==0?1:-1),l(2),B(t.Model),l(2),p("matTooltip",t.Discontinued?n.discontinuedVariantMsg:"")("ngClass",V(12,Ue,t.Discontinued)),l(),F(" ",t.Code," "),l(),p("ngxPermissionsOnly",V(14,O,n.rolePriceEdit)),l(3),S((t.Channel[0]==null?null:t.Channel[0].Description)!=null?10:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?11:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?12:-1),l(),p("ngClass",V(16,Oe,t.UnitPrice!=(t.Channel[0]==null?null:t.Channel[0].Price))),l(2),S(t.Channel.length>0?15:-1),l(2),p("href",t.Channel[0]==null?null:t.Channel[0].Url,D)}}function at(i,s){if(i&1&&L(0,it,22,18,"tr",33,k),i&2){let t=s.$implicit;R(t.Variants)}}function ot(i,s){if(i&1){let t=x();o(0,"content")(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr")(6,"th",22),d(7," Product "),o(8,"div")(9,"mat-slide-toggle",23),y("ngModelChange",function(n){_(t);let a=r(2);return w(a.toggleDifferentInventory,n)||(a.toggleDifferentInventory=n),m(n)}),u("toggleChange",function(){_(t);let n=r(2);return m(n.onToggleDifferentInventory())}),o(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),o(12,"th",24),d(13,"Variant"),c(),o(14,"th",25),d(15,"SKU"),c(),h(16,ze,2,0,"ng-template",26),o(17,"th",27),d(18,"POS"),c(),o(19,"th",27)(20,"div",28),u("click",function(){_(t);let n=r(2);return m(n.openModalFilter())}),P(21,"img",29),o(22,"span",30),d(23),v(24,"stringLimit"),c()()()()(),o(25,"tbody"),L(26,at,2,0,null,null,k),c()(),o(28,"infinite-paginator",31),v(29,"async"),u("onNextPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onNextPage(n.searchFilter))})("onLastPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onLastPage(n.searchFilter))})("onGetRowCount",function(){_(t);let n=r(2);return m(n.infinitePagination.getRowCount(n.searchFilter))}),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(9),I("ngModel",e.toggleDifferentInventory),l(7),p("ngxPermissionsOnly",V(16,O,e.rolePriceEdit)),l(4),p("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),l(),p("src",e.selectedChannel==null?null:e.selectedChannel.Img,D),l(2),F(" ",X(24,11,e.selectedChannel==null?null:e.selectedChannel.Name,20)," "),l(3),R(t),l(2),p("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",T(29,14,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}function rt(i,s){if(i&1){let t=x();o(0,"mainpanel",2),y("textChange",function(n){_(t);let a=r();return w(a.searchFilter.text,n)||(a.searchFilter.text=n),m(n)}),u("onSubmit",function(){_(t);let n=r();return m(n.onSearch())}),o(1,"filters")(2,"div")(3,"label",3),d(4,"Channel"),c(),o(5,"ng-select",4),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.ChannelID,n)||(a.searchFilter.ChannelID=n),m(n)}),h(6,Ae,3,2,"ng-template",5),c()(),o(7,"div",6)(8,"label",7),d(9,"Page Number"),c(),o(10,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.PageNumber,n)||(a.searchFilter.PageNumber=n),m(n)}),c()(),o(11,"div",6)(12,"label",7),d(13,"Page Size"),c(),o(14,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.RowCount,n)||(a.searchFilter.RowCount=n),m(n)}),c()()(),h(15,je,7,1,"actions",9),v(16,"async"),h(17,ot,30,18,"content",9),v(18,"async"),c()}if(i&2){let t=r();p("headerTitle",t.pageTitle),I("text",t.searchFilter.text),l(5),p("clearable",!1)("items",t.channelOptions),I("ngModel",t.searchFilter.ChannelID),l(5),I("ngModel",t.searchFilter.PageNumber),l(4),I("ngModel",t.searchFilter.RowCount),l(),p("ngIf",T(16,9,t.data$)),l(2),p("ngIf",T(18,11,t.data$))}}var zt=(()=>{let s=class s{constructor(e,n,a,g,C,b,W,Le,Re,Be){this.http=e,this.toastr=n,this.dialog=a,this.productService=g,this.biggerPictureService=C,this.inventoryService=b,this.authService=W,this.mainPanelService=Le,this.exportService=Re,this.decimalPipe=Be,this.infinitePagination=z(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=_e.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe($(1)),this.channelOptions=W.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(j(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=M.ALL,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=M.ALL:this.searchFilter.filterModel=M.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let a=this.productService.selectedVariantProduct(e).map(C=>({ID:C.ID,ChannelID:C.Channel[0].ChannelID,Code:C.Code,Price:C.UnitPrice})),g={ListChannelID:[this.searchFilter.ChannelID],ListPrice:a};this.http.post("/api/Price/UpdateChannel",g).subscribe(C=>{this.onSearch(),this.handlingUpdateStock(C.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let n=e.failure_list,a=e.success_list;this.inventoryService.showToastrUpdateInventory("Price",a,n)}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(a=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openTableDialog(e,n,a){let g=JSON.parse(JSON.stringify(e));this.dialog.open(Ne,{data:{Name:n.Name,Variant:g,ChannelID:g?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:g?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(A(b=>me.IsNotEmpty(b))).subscribe(b=>{this.updateItemAfterDialog(b,e)})}updateItemAfterDialog(e,n){let a={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",a).subscribe(g=>{let C=this.productService.findChannelById(a.ID,this.channelOptions),b=a.Price?this.decimalPipe.transform(a.Price):a.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${C.Name} to ${b}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=a.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(a=>(a.Variants=a.Variants.map(g=>(g.selected=e,g)),a))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}openExportDialog(){this.dialog.open(Me,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}};s.\u0275fac=function(n){return new(n||s)(f(ge),f(de),f(Ie),f(be),f(Fe),f(N),f(ue),f(we),f(Ee),f(E))},s.\u0275cmp=G({type:s,selectors:[["app-price-single-channel"]],standalone:!0,features:[Z([U,N,ae("https://res.cloudinary.com/"),E]),Q],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],[3,"ngClass"],[4,"ngIf","ngIfElse"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(n,a){n&1&&(h(0,rt,19,13,"mainpanel",1),v(1,"async")),n&2&&p("ngIf",T(1,1,a.loader$))},dependencies:[ie,ee,te,ne,E,ve,ye,Pe,Se,fe,xe,pe,re,se,oe,le,ce,De,ke,Ce,he,Te,Ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0});let i=s;return i})();export{zt as PriceSingleChannelComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as u}from"./chunk-N3TTJVBG.js";import{a as f}from"./chunk-
|
|
1
|
+
import{b as u}from"./chunk-N3TTJVBG.js";import{a as f}from"./chunk-Q653MB6W.js";import"./chunk-S4LDJFZS.js";import"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{n as l}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{y as d}from"./chunk-BSN7ZAXG.js";import"./chunk-64G3XLI6.js";import{n as c,r as m}from"./chunk-OVEJFFL6.js";import{Cd as n,Ub as a,ka as r,ta as s,ua as i}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var M=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s({type:t,selectors:[["app-report"]],decls:1,vars:0,template:function(e,O){e&1&&a(0,"router-outlet")},dependencies:[c],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]});let o=t;return o})();var y=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-3ATLH2O5.js").then(o=>o.OrderModule),canActivate:[f]}]}],C=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,m.forChild(y)]});let o=t;return o})();var b=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,u,C,d,l,m]});let o=t;return o})();export{b as ReportModule};
|