marketplacepos 5.43.13 → 5.44.0
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/3rdpartylicenses.txt +41 -41
- package/Marketplace/{chunk-IVHM5DMM.js → chunk-22AHRDNQ.js} +1 -1
- package/Marketplace/{chunk-YSJSAVBS.js → chunk-2ODVHD2K.js} +1 -1
- package/Marketplace/{chunk-DRHWRRQV.js → chunk-35XX6SQT.js} +1 -1
- package/Marketplace/{chunk-5BSS4CVK.js → chunk-3OIE7ARG.js} +1 -1
- package/Marketplace/chunk-3VUDKIND.js +1 -0
- package/Marketplace/{chunk-QQXVBN22.js → chunk-4PDRBB73.js} +1 -1
- package/Marketplace/chunk-4YWSKMFD.js +1 -0
- package/Marketplace/{chunk-AJJSLBE3.js → chunk-55BJO7BI.js} +2 -2
- package/Marketplace/{chunk-WS4A4RPE.js → chunk-5GLSI4QU.js} +1 -1
- package/Marketplace/{chunk-G2YN5S5X.js → chunk-5JQJRPL3.js} +1 -1
- package/Marketplace/{chunk-CUEO37N7.js → chunk-5W7TCSDK.js} +1 -1
- package/Marketplace/{chunk-2GSWEJRP.js → chunk-64JGYG54.js} +1 -1
- package/Marketplace/{chunk-2IDDYNBR.js → chunk-6BIM4KEI.js} +1 -1
- package/Marketplace/{chunk-722SRHLY.js → chunk-6RKA4STM.js} +1 -1
- package/Marketplace/{chunk-QWHPQWPM.js → chunk-77JJJNRM.js} +1 -1
- package/Marketplace/{chunk-SRVGUGY2.js → chunk-AO46RPZ4.js} +1 -1
- package/Marketplace/{chunk-6FY74YFQ.js → chunk-B5V5KFQU.js} +1 -1
- package/Marketplace/{chunk-PXYBLGMN.js → chunk-BO7BG424.js} +1 -1
- package/Marketplace/{chunk-WIAQQWWF.js → chunk-BU5LUO3S.js} +1 -1
- package/Marketplace/chunk-C3VEI2IE.js +1 -0
- package/Marketplace/{chunk-3B2PNJWF.js → chunk-CCWNSX4Y.js} +1 -1
- package/Marketplace/{chunk-6W6DKFRE.js → chunk-CIAZIJGR.js} +3 -3
- package/Marketplace/{chunk-J2KWRDVH.js → chunk-CUB2QFUO.js} +1 -1
- package/Marketplace/{chunk-WPW3D4MQ.js → chunk-D6URDVES.js} +1 -1
- package/Marketplace/{chunk-POR3OF22.js → chunk-DHIDUIOD.js} +1 -1
- package/Marketplace/{chunk-O5LFGGB2.js → chunk-DL66NZ2A.js} +1 -1
- package/Marketplace/chunk-E2SXYIML.js +2 -0
- package/Marketplace/{chunk-L7K5HOBY.js → chunk-E4KNET2R.js} +1 -1
- package/Marketplace/{chunk-7ZXNQAAU.js → chunk-E4Z7OR75.js} +2 -2
- package/Marketplace/{chunk-GH57P6KF.js → chunk-EJWZFRMT.js} +1 -1
- package/Marketplace/{chunk-NEYMDA6P.js → chunk-ELE7BOLL.js} +1 -1
- package/Marketplace/{chunk-AG2REZBE.js → chunk-ENLYKIFW.js} +8 -8
- package/Marketplace/{chunk-B73M3AMU.js → chunk-EQIFZBRG.js} +1 -1
- package/Marketplace/chunk-EVXMYPWP.js +1 -0
- package/Marketplace/{chunk-E6U3KRK7.js → chunk-G3O7MWIB.js} +1 -1
- package/Marketplace/{chunk-624I4PEE.js → chunk-G5DA2OSB.js} +1 -1
- package/Marketplace/{chunk-7UHCDGAA.js → chunk-G7R7LUW4.js} +1 -1
- package/Marketplace/{chunk-2EOAYJGX.js → chunk-GCDQNJQN.js} +1 -1
- package/Marketplace/{chunk-G47XGOST.js → chunk-GIRXMYNI.js} +1 -1
- package/Marketplace/{chunk-5HO2IJ47.js → chunk-GRIUDEPO.js} +1 -1
- package/Marketplace/chunk-H3DIKLA5.js +1 -0
- package/Marketplace/chunk-HWHDJDQN.js +1 -0
- package/Marketplace/chunk-HZHUTC6E.js +1 -0
- package/Marketplace/{chunk-YCH6HHU3.js → chunk-IHNN4Q2N.js} +3 -3
- package/Marketplace/{chunk-H3J5OAIG.js → chunk-IIZDEGGW.js} +2 -2
- package/Marketplace/{chunk-N3P55TG2.js → chunk-IMEGV3MV.js} +1 -1
- package/Marketplace/{chunk-7PN4XLNE.js → chunk-IMK2JGZA.js} +1 -1
- package/Marketplace/{chunk-WHG5PPSE.js → chunk-JF4QOCAZ.js} +1 -1
- package/Marketplace/{chunk-TCS2Y6CC.js → chunk-JHYTM6OD.js} +1 -1
- package/Marketplace/{chunk-ZUEJZI4O.js → chunk-JIOSKHGT.js} +1 -1
- package/Marketplace/{chunk-MHCAI6KP.js → chunk-K5GEJ2GZ.js} +1 -1
- package/Marketplace/{chunk-7SVF5UPT.js → chunk-KALG6D6L.js} +1 -1
- package/Marketplace/{chunk-Z7LBV3BO.js → chunk-KGMQTWMX.js} +1 -1
- package/Marketplace/{chunk-U7TVLBC5.js → chunk-KIPJJIYU.js} +1 -1
- package/Marketplace/{chunk-M5JQ7BGW.js → chunk-L3FX4O3H.js} +6 -6
- package/Marketplace/{chunk-CRUPQQ56.js → chunk-LC6TXSYB.js} +1 -1
- package/Marketplace/{chunk-CROPN4YC.js → chunk-LDHQNVI5.js} +1 -1
- package/Marketplace/chunk-LFAU6HXM.js +1 -0
- package/Marketplace/{chunk-6NHTTVBK.js → chunk-LRCKOJEI.js} +1 -1
- package/Marketplace/{chunk-6G5WVJGA.js → chunk-LYBSI3ZX.js} +1 -1
- package/Marketplace/{chunk-LROLRGKE.js → chunk-LYZVX4EZ.js} +1 -1
- package/Marketplace/{chunk-YD5TUVFF.js → chunk-M6YFSBMG.js} +1 -1
- package/Marketplace/{chunk-6BAZYVHI.js → chunk-MDHPQWC7.js} +2 -2
- package/Marketplace/{chunk-3BT5DR3X.js → chunk-MH4SJTQX.js} +1 -1
- package/Marketplace/{chunk-2TRFYYCP.js → chunk-MKUH4R2N.js} +1 -1
- package/Marketplace/chunk-MRODDSR7.js +1 -0
- package/Marketplace/chunk-MS3ZBCON.js +157 -0
- package/Marketplace/{chunk-XBUZ27V4.js → chunk-NDSJ4AAU.js} +1 -1
- package/Marketplace/{chunk-GMVNN57A.js → chunk-NSS35UR3.js} +1 -1
- package/Marketplace/{chunk-OLCFJJOD.js → chunk-OFD3D5IO.js} +1 -1
- package/Marketplace/{chunk-3TDK2RMH.js → chunk-OFUTQWBX.js} +1 -1
- package/Marketplace/{chunk-RZU7PSKG.js → chunk-OPFENZ3W.js} +1 -1
- package/Marketplace/{chunk-3NMM37H7.js → chunk-P7NATRFC.js} +1 -1
- package/Marketplace/{chunk-IRLIWSK5.js → chunk-PANQ33RQ.js} +1 -1
- package/Marketplace/{chunk-JDIBETL5.js → chunk-PNITO7BE.js} +1 -1
- package/Marketplace/{chunk-EOZ2J2CF.js → chunk-PVPN53WE.js} +1 -1
- package/Marketplace/{chunk-PFB7XEYZ.js → chunk-QJJ2WFVX.js} +1 -1
- package/Marketplace/chunk-QYCOQS7D.js +2 -0
- package/Marketplace/{chunk-2YFZS6SG.js → chunk-RHCH74ZR.js} +1 -1
- package/Marketplace/chunk-RMAEWPJV.js +1 -0
- package/Marketplace/{chunk-VKMFDXJJ.js → chunk-SLI26GUH.js} +1 -1
- package/Marketplace/{chunk-C3HL4S2R.js → chunk-STPUGFHI.js} +1 -1
- package/Marketplace/{chunk-EZY2ATQQ.js → chunk-TPC5KHGH.js} +1 -1
- package/Marketplace/{chunk-LOBNKJGT.js → chunk-TPW56VWM.js} +1 -1
- package/Marketplace/chunk-TZQFN56G.js +1 -0
- package/Marketplace/{chunk-JILE74BG.js → chunk-UBXKO4QI.js} +1 -1
- package/Marketplace/{chunk-J7AN3ZQL.js → chunk-UCQKKX2L.js} +1 -1
- package/Marketplace/{chunk-CLER2MX6.js → chunk-UGVEAL7H.js} +3 -3
- package/Marketplace/{chunk-2OVYEC6Q.js → chunk-UUSBNUEH.js} +1 -1
- package/Marketplace/{chunk-ALSCWTAY.js → chunk-V4D6BB2N.js} +1 -1
- package/Marketplace/chunk-W3L5LPU5.js +1 -0
- package/Marketplace/{chunk-E6XWD6WX.js → chunk-W6FZQ6XT.js} +1 -1
- package/Marketplace/{chunk-OPXWL5G6.js → chunk-W7H6T326.js} +1 -1
- package/Marketplace/{chunk-MMVLDCF6.js → chunk-W7VYUPIP.js} +1 -1
- package/Marketplace/chunk-WKUTDZ7J.js +5 -0
- package/Marketplace/chunk-WY4BY2ID.js +3 -0
- package/Marketplace/chunk-X67M7TFE.js +1 -0
- package/Marketplace/{chunk-G2CMMGM2.js → chunk-X743YBE6.js} +1 -1
- package/Marketplace/chunk-XF4BVLTJ.js +1 -0
- package/Marketplace/chunk-XYEV5RMD.js +1 -0
- package/Marketplace/{chunk-BFU7VKO3.js → chunk-YM4TJJMM.js} +1 -1
- package/Marketplace/{chunk-CIIO2CJ6.js → chunk-YPWHTELF.js} +1 -1
- package/Marketplace/chunk-YRSF6N67.js +1 -0
- package/Marketplace/{chunk-DYWTLXMP.js → chunk-Z5GRNGHJ.js} +1 -1
- package/Marketplace/chunk-ZEYELO7U.js +1 -0
- package/Marketplace/chunk-ZMEMG7ZN.js +1 -0
- package/Marketplace/{chunk-L64EL5OU.js → chunk-ZQ5EGXEB.js} +2 -2
- package/Marketplace/{chunk-4JKDNUTX.js → chunk-ZXNM4AGN.js} +1 -1
- package/Marketplace/index.html +3 -3
- package/Marketplace/{main-2SUNMEPM.js → main-WUG4WUAT.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-4B4NNOKK.js +0 -1
- package/Marketplace/chunk-56IX4GTG.js +0 -1
- package/Marketplace/chunk-67N4UGA5.js +0 -2
- package/Marketplace/chunk-7AQ244V7.js +0 -5
- package/Marketplace/chunk-DRMAONR7.js +0 -1
- package/Marketplace/chunk-GSZJGR7K.js +0 -2
- package/Marketplace/chunk-GVL2YXE5.js +0 -1
- package/Marketplace/chunk-HLOBDI4F.js +0 -2
- package/Marketplace/chunk-I7FTVK26.js +0 -1
- package/Marketplace/chunk-MY5ZX6JG.js +0 -1
- package/Marketplace/chunk-OOCYP2XG.js +0 -1
- package/Marketplace/chunk-Q3MVAL6O.js +0 -1
- package/Marketplace/chunk-QINGXOOA.js +0 -1
- package/Marketplace/chunk-SMUCMLEE.js +0 -1
- package/Marketplace/chunk-UG7VRDLB.js +0 -3
- package/Marketplace/chunk-V2RVHNCX.js +0 -1
- package/Marketplace/chunk-ZWBTWIGY.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ve}from"./chunk-
|
|
1
|
+
import{a as Ve}from"./chunk-6RKA4STM.js";import{a as ke,b as _t}from"./chunk-YZKPQRLO.js";import"./chunk-WW22F76D.js";import"./chunk-B5VBBEEN.js";import{a as G}from"./chunk-2ODVHD2K.js";import"./chunk-MS4AQ6UA.js";import{a as re}from"./chunk-EPVCMYCI.js";import{g as ct}from"./chunk-CIAZIJGR.js";import"./chunk-DL66NZ2A.js";import{d as lt,o as mt}from"./chunk-L3FX4O3H.js";import"./chunk-G7R7LUW4.js";import{a as z}from"./chunk-AJL3CYNX.js";import{c as ot}from"./chunk-K5GEJ2GZ.js";import{b as st}from"./chunk-B5V5KFQU.js";import{b as pt}from"./chunk-E4Z7OR75.js";import{a as ae}from"./chunk-X743YBE6.js";import"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import{b as gt}from"./chunk-YM4TJJMM.js";import{b as dt}from"./chunk-ZQ5EGXEB.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-YPWHTELF.js";import"./chunk-E3ROEHBW.js";import"./chunk-M5XGP4SG.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import{a as Se}from"./chunk-UMP6ZMEJ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as tt,b as it}from"./chunk-IMK2JGZA.js";import{a as ne,b as at}from"./chunk-M7NQID2Z.js";import{a as te,b as ie,c as rt}from"./chunk-E2SXYIML.js";import"./chunk-CMTBBXR5.js";import{e as pe,h as Q}from"./chunk-WY4BY2ID.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-GRIUDEPO.js";import{b as Ke,e as W}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{a as Z,b as $,d as ee,e as Ze}from"./chunk-5JVEEL2T.js";import{b as I,c as D}from"./chunk-PW42BQIY.js";import{d as Le,h as $e,m as B,n as nt}from"./chunk-UGVEAL7H.js";import{A as Je,b as Me,c as Y,h as J,m as K,o as X}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{b as Xe,c as Qe}from"./chunk-SWQXSJ7O.js";import{s as et}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{E as qe,F as Ye,H as q,J as De,f as A,g as F,j as Oe,k as V,m as R,n as ce}from"./chunk-M2FCTYGU.js";import{$c as x,Aa as Be,B as je,Ba as ze,Fc as j,Gb as L,Gc as l,Hb as Ne,Hc as h,Ic as E,Kc as C,Lc as y,Mb as u,Mc as b,Rc as U,Sc as Ge,Tc as le,Yb as d,Z as fe,ad as O,bd as k,cd as H,ea as Ee,ic as i,ja as He,jc as n,ka as Ie,kc as S,lc as w,mc as P,oa as We,oc as N,pb as M,rb as o,tc as v,uc as s,v as de,xa as Ue,xb as T,ya as g,za as _}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var ht=(()=>{class r{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:[Se.DownloadOrder]},{Title:"Log",Url:"/menu/Order/Download_Order_Log",Permissions:[Se.DownloadOrder]}]}ngOnInit(){}static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275cmp=L({type:r,selectors:[["app-orders"]],standalone:!1,decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(a,t){a&1&&(i(0,"nav",0)(1,"div",1)(2,"div"),S(3,"nav-tab",2),n()()(),S(4,"router-outlet")),a&2&&(o(3),d("Tabs",t.ObjectOrderTabs)("usePermissions",!0))},dependencies:[tt,Ye],encapsulation:2})}}return r})();var Ae=(()=>{class r{constructor(e,a){this.http=e,this.toastr=a}acceptTokopediaOrders(e){return this.http.post("/api/Orders/AcceptOrderTokopedia",e).pipe(Ee(a=>{this.tokopediaAcceptOrderHandler(a)}))}tokopediaAcceptOrderHandler(e){let a=e.filter(m=>m.Status==!1),t=e.filter(m=>m.Status==!0);if(a.length==0&&t.length>0){let m=`<ol>${this.generateSuccessMessage(t)}</ol>`;this.toastr.success(m,"Success",{enableHtml:!0})}else if(a.length>0&&t.length>0){let m=`<ol>
|
|
2
2
|
${this.generateSuccessMessage(t)}
|
|
3
3
|
${this.generateErrorMessage(a)}
|
|
4
|
-
</ol>`;this.toastr.warning(m,"Warning",{enableHtml:!0})}else{let m=`<ol>${this.generateErrorMessage(a)}</ol>`;this.toastr.error(m,"Error",{enableHtml:!0})}}generateSuccessMessage(e){let a="";return e.forEach(t=>{a+=`<li><b>${t.OrderNumber}</b> was successfully Accept</li>`}),a}generateErrorMessage(e){let a="";return e.forEach(t=>{a+=`<li><b>${t.OrderNumber}</b> ${t.Message}</li>`}),a}static{this.\u0275fac=function(a){return new(a||r)(We(W),We(Ke))}}static{this.\u0275prov=He({token:r,factory:r.\u0275fac})}}return r})();function Et(r,c){if(r&1){let e=N();w(0),i(1,"button",20),v("click",function(){g(e);let t=s().ngIf,m=s();return _(m.onAcceptOrder(t))}),S(2,"i",21),l(3," Accept "),n(),P()}}function It(r,c){if(r&1&&(w(0),u(1,Et,4,0,"ng-container",3),P()),r&2){let e=s();o(),d("ngIf",e.isTokopediaAvailable&&e.isTokopediaSelected)}}function Nt(r,c){if(r&1&&(i(0,"span",22),S(1,"img",23),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M),o(),E(" ",e.Name," ")}}function Ot(r,c){if(r&1){let e=N();w(0),i(1,"th",35)(2,"input",36),b("ngModelChange",function(t){g(e);let m=s(3);return y(m.isCheckAll,t)||(m.isCheckAll=t),_(t)}),v("ngModelChange",function(){g(e);let t=s(2).ngIf,m=s();return _(m.onSelectAllOrderData(t))}),n()(),P()}if(r&2){let e=s(3);o(2),C("ngModel",e.isCheckAll)}}function Dt(r,c){if(r&1){let e=N();w(0),i(1,"input",36),b("ngModelChange",function(t){g(e);let m=s(2).$implicit;return y(m.selected,t)||(m.selected=t),_(t)}),v("ngModelChange",function(){g(e);let t=s(4).ngIf,m=s();return _(m.onSelectOrderData(t))}),n(),P()}if(r&2){let e=s(2).$implicit;o(),C("ngModel",e.selected)}}function Mt(r,c){if(r&1&&(w(0),i(1,"td"),u(2,Dt,2,1,"ng-container",3),n(),P()),r&2){let e=s().$implicit,a=s(3);o(2),d("ngIf",e.Type==a.tokopediaType)}}function Lt(r,c){if(r&1&&(w(0),i(1,"span"),l(2),n(),P()),r&2){let e=s().$implicit;o(2),h(e.Number)}}function kt(r,c){if(r&1&&(i(0,"a",38),l(1),n()),r&2){let e=s().$implicit,a=s(3);d("href",a.domain+"/menu/Orders/Order/Sales_Order/Info?ID="+e.ID,M),o(),h(e.Number)}}function Vt(r,c){if(r&1&&(i(0,"tr"),u(1,Mt,3,1,"ng-container",3),i(2,"td"),l(3),n(),i(4,"td"),u(5,Lt,3,1,"ng-container",24)(6,kt,2,2,"ng-template",null,1,H),n(),i(8,"td"),l(9),n(),i(10,"td"),l(11),x(12,"date"),n(),i(13,"td"),S(14,"app-channel-logo",37),n()()),r&2){let e=c.$implicit,a=j(7),t=s(3);o(),d("ngIf",t.isTokopediaAvailable),o(2),h(e.Outlet),o(2),d("ngIf",e.ID==t.guidEmpty)("ngIfElse",a),o(4),h(e.Customer),o(2),h(k(12,7,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.Type)}}function At(r,c){if(r&1){let e=N();w(0),i(1,"div",25)(2,"table",26),v("matSortChange",function(t){g(e);let m=s(2);return _(m.onSort(t))}),i(3,"thead",27)(4,"tr",28),u(5,Ot,3,1,"ng-container",3),i(6,"th",29),l(7,"Outlet"),n(),i(8,"th",30),l(9,"Order number"),n(),i(10,"th"),l(11,"Customer"),n(),i(12,"th",31),l(13," Created On "),n(),i(14,"th",32),l(15,"Channel"),n()()(),i(16,"tbody"),u(17,Vt,15,10,"tr",33),n()(),i(18,"app-mat-paginator-no-count",34),x(19,"async"),x(20,"async"),v("total",function(){g(e);let t=s(2);return _(t.getPaginatonTotal())})("next",function(){g(e);let t=s(2);return _(t.onNextPage())})("previous",function(){g(e);let t=s(2);return _(t.onPreviousPage())}),n()(),P()}if(r&2){let e,a=s().ngIf,t=s();o(5),d("ngIf",t.isTokopediaAvailable&&a),o(12),d("ngForOf",a),o(),d("filter",t.filter)("totaldata",(e=O(19,5,t.newOrdersData$))==null?null:e.length)("paginationTotal",O(20,7,t.paginationTotal$))}}function Ft(r,c){if(r&1&&(w(0),u(1,At,21,9,"ng-container",24),P()),r&2){let e=c.ngIf;s();let a=j(36);o(),d("ngIf",(e==null?null:e.length)>0)("ngIfElse",a)}}function Rt(r,c){r&1&&(i(0,"div",39),S(1,"app-empty-state"),n())}var ut=(()=>{class r{constructor(e,a,t,m){this.localDataService=e,this.orderService=a,this.acceptOrderService=t,this.authService=m,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.domain=`https://${this.localDataService.getHostName()}`,this.guidEmpty=D.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(fe()),this.newOrdersData$=this.sourceObs$.pipe(Ee(a=>{a.filter(m=>m.Type==I.Tokopedia).length>0&&(this.isTokopediaAvailable=!0)}))}getPaginatonTotal(){this.paginationTotal$=this.orderService.getTotalNewOrders(this.filter.ListChannelID,this.filter.From,this.filter.To).pipe(fe())}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(t=>t.selected).length>0&&(this.isTokopediaSelected=!0)}onSelectAllOrderData(e){e=e.map(a=>(a.Type==I.Tokopedia&&(a.selected=this.isCheckAll),a)),this.onSelectOrderData(e)}onAcceptOrder(e){let a=this.getSelectedTokopediaOrders(e);this.acceptOrderService.acceptTokopediaOrders(a).subscribe(t=>{this.isTokopediaSelected=!1,location.reload()})}getSelectedTokopediaOrders(e){return e.filter(t=>t.selected).map(t=>t.Number)}onSort(e){if(e.direction==""){this.newOrdersData$=this.sourceObs$;return}if(e.active=="created"){let a=e.direction=="asc";this.newOrdersData$=this.newOrdersData$.pipe(de(t=>(t=t.sort((m,f)=>D.compare(m.Created,f.Created,a)),t)))}}static{this.\u0275fac=function(a){return new(a||r)(T(pe),T(ke),T(Ae),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-new-order"]],standalone:!1,decls:37,vars:15,consts:[["EMPTY_STATE",""],["NOT_EMPTY",""],["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"onSubmit","hideSearchBox"],[4,"ngIf"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-check"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"typeId"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",2),v("onSubmit",function(){return g(m),_(t.getNewOrders())}),i(1,"actions"),u(2,It,2,1,"ng-container",3),x(3,"async"),i(4,"a",4),S(5,"i",5),i(6,"span"),l(7,"Visit our Fulfillment Display System"),n()()(),i(8,"filters")(9,"div")(10,"label",6),l(11,"Channel"),n(),i(12,"ng-select",7),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(13,Nt,3,2,"ng-template",8),n()(),i(14,"div",9)(15,"label",10),l(16,"Page Number"),n(),i(17,"input",11),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(18,"div",9)(19,"label",10),l(20,"Page Size"),n(),i(21,"input",12),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(22,"div",9)(23,"label",13),l(24,"From/To"),n(),i(25,"div",14)(26,"datepicker",15),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(27,"div")(28,"datepicker",16),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(29,"content")(30,"div",17)(31,"div",18)(32,"div",19),u(33,Ft,2,2,"ng-container",3),x(34,"async"),u(35,Rt,2,0,"ng-template",null,0,H),n()()()()()}a&2&&(d("hideSearchBox",!0),o(2),d("ngIf",O(3,11,t.newOrdersData$)),o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",O(34,13,t.newOrdersData$)))},dependencies:[A,F,Y,X,Me,J,K,B,ee,Z,$,z,ne,re,te,ie,G,Oe,V],encapsulation:2})}}return r})();var Wt=()=>["/menu/Order"];function Bt(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),l(4),x(5,"number"),n(),i(6,"td"),l(7),x(8,"number"),n()()),r&2){let e=c.$implicit;o(2),h(e.Code),o(2),h(O(5,3,e.Quantity)),o(3),h(O(8,5,e.Price))}}function zt(r,c){if(r&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),l(5,"Outlet Info"),n()(),i(6,"div",4)(7,"div",9),l(8," Outlet : "),n(),i(9,"div",9),l(10),n()(),i(11,"div",4)(12,"div",9),l(13," Date : "),n(),i(14,"div",9),l(15),x(16,"date"),n()(),i(17,"div",4)(18,"div",9),l(19," Status : "),n(),i(20,"div",9),l(21),n()(),i(22,"div",4)(23,"div",9),l(24," Tax Type : "),n(),i(25,"div",9),l(26),n()(),i(27,"div",4)(28,"div",9),l(29," Due Date : "),n(),i(30,"div",9),l(31),x(32,"date"),n()()(),i(33,"div",6)(34,"div",7)(35,"h3",8),l(36,"Customer Info"),n()(),i(37,"div",4)(38,"div",9),l(39," Name : "),n(),i(40,"div",9),l(41),n()(),i(42,"div",4)(43,"div",9),l(44," Email : "),n(),i(45,"div",9),l(46),n()(),i(47,"div",4)(48,"div",9),l(49," Mobile : "),n(),i(50,"div",9),l(51),n()()()(),i(52,"div",10)(53,"h3",11),l(54,"Products Sold"),n(),i(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),l(60,"Code"),n(),i(61,"th"),l(62,"Quantity"),n(),i(63,"th"),l(64,"Price"),n()()(),i(65,"tbody"),u(66,Bt,9,7,"tr",16),n()()()()()),r&2){let e=s();o(10),E(" ",e.model.Outlet," "),o(5),E(" ",k(16,9,e.model.Date,"dd MMM yyyy")," "),o(6),E(" ",e.model.Delivery," "),o(5),E(" ",e.model.TaxType," "),o(5),E(" ",k(32,12,e.model.DueDate,"dd MMM yyyy")," "),o(10),E(" ",e.model.Customer.Name," "),o(5),E(" ",e.model.Customer.Email," "),o(5),E(" ",e.model.Customer.Mobile," "),o(15),d("ngForOf",e.model.Variants)}}var ft=(()=>{class r{constructor(e,a){this.http=e,this.url=a,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(a=>{this.model=a})}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(qe))}}static{this.\u0275cmp=L({type:r,selectors:[["app-detail-order"]],standalone:!1,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(a,t){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Back"),n()(),i(4,"content")(5,"div",2),u(6,zt,67,15,"div",3),n()()()),a&2&&(d("headerTitle","Order #"+t.number)("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),d("routerLink",U(5,Wt)),o(4),d("ngIf",t.model))},dependencies:[A,F,B,q,R,V],encapsulation:2})}}return r})();var me=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}(me||{});var ue=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}(ue||{});function Gt(r,c){if(r&1&&(w(0),i(1,"div",36)(2,"div",12)(3,"div",37),l(4),n()(),i(5,"div",12)(6,"div",37),l(7),n()()(),P()),r&2){let e=s();o(4),E(" ",e.recipient==null?null:e.recipient.City," "),o(3),E(" ",e.recipient==null?null:e.recipient.District," ")}}function jt(r,c){if(r&1&&(w(0),i(1,"div")(2,"span",15),l(3,"Berat: "),n(),i(4,"span",18),l(5),n()(),P()),r&2){let e=s();o(5),E("",e.shippingLabel==null?null:e.shippingLabel.Weight," gr")}}function Ht(r,c){if(r&1&&(w(0),i(1,"div",38)(2,"span",14),l(3,"Batas Kirim:"),n(),i(4,"span",18),l(5),x(6,"date"),n()(),P()),r&2){let e=s();o(5),h(k(6,1,e.logistic==null?null:e.logistic.Batas_kirim,"dd-MM-yyy"))}}function Ut(r,c){if(r&1&&(w(0),i(1,"div",38)(2,"span",14),l(3,"No.Pesanan:"),n(),i(4,"span",18),l(5),n()(),P()),r&2){let e=s();o(5),h(e.shippingLabel==null?null:e.shippingLabel.OrderNumber)}}function qt(r,c){if(r&1&&(i(0,"tr")(1,"td",39),l(2),n(),i(3,"td"),l(4),n(),i(5,"td"),l(6),n(),i(7,"td"),l(8),x(9,"number"),n()()),r&2){let e=c.$implicit,a=c.index;o(2),h(a+1),o(2),h(e.Product_Name),o(2),h(e.SKU),o(2),h(O(9,4,e.Quantity))}}var Re=(()=>{class r{constructor(){this.minDate=D.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=ue.TOKOPEDIA;break;case I.Shopee:this.marketplaceLogo=ue.SHOPEE;break;case I.Lazada:this.marketplaceLogo=ue.LAZADA;break;case I.Tiktok:this.marketplaceLogo=ue.TIKTOK;break}}getShippingLogo(){let e=this.shippingLabel.Logistic.Logistic_Name;e=e?.toLowerCase(),e.includes("anteraja")?this.shippingLogo=me.ANTERAJA:e.includes("grabexpress")?this.shippingLogo=me.GRAB:e.includes("jne")?this.shippingLogo=me.JNE:e.includes("gosend")?this.shippingLogo=me.GOSEND:e.includes("j&t")||e.includes("jnt")?this.shippingLogo=me.JNT:e.includes("sicepat")?this.shippingLogo=me.SICEPAT:e.includes("spx")?this.shippingLogo=me.SPX:(e.includes("lex")||e.includes("lx")||e.includes("lazada express"))&&(this.shippingLogo=me.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(D.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})}D.IsNotEmpty(this.shippingLabel?.OrderNumber)&&JsBarcode(`#NO${this.id}`,this.shippingLabel?.OrderNumber,{displayValue:!1,width:this.shippingLabel?.OrderNumber.length>15?.5:1,height:40})}static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275cmp=L({type:r,selectors:[["app-shipping-label"]],inputs:{shippingLabel:"shippingLabel",id:"id"},features:[Ue],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(a,t){a&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div"),S(6,"img",5),n(),i(7,"div")(8,"h4"),l(9),n()(),i(10,"div"),S(11,"img",5),n()()()(),i(12,"div",6),S(13,"hr"),n(),i(14,"div",7)(15,"div",3)(16,"div",8)(17,"span",9),l(18),n(),i(19,"span"),l(20),n()()()(),i(21,"div",7)(22,"div",10),Be(),S(23,"svg",11),n()(),ze(),i(24,"div",6),S(25,"hr"),n(),i(26,"div",2)(27,"div",12)(28,"div",13)(29,"div",14),l(30,"Penerima: "),n(),i(31,"div",15),l(32),n()(),i(33,"div",16)(34,"span",15),l(35,"Alamat Pengiriman:"),n(),i(36,"div",17),l(37),n()()(),i(38,"div",12)(39,"div",13)(40,"div",14),l(41,"Pengirim: "),n(),i(42,"div")(43,"div",15),l(44),n(),i(45,"div",18),l(46),n(),i(47,"div",19),l(48),n()()(),S(49,"div"),n()(),u(50,Gt,8,2,"ng-container",20),i(51,"div",21)(52,"div",22)(53,"div",15),l(54,"CASHLESS"),n()(),i(55,"div",23)(56,"small",24),l(57,"Penjual tidak perlu membayar ongkos kirim ke kurir"),n()()(),i(58,"div",25)(59,"div",26)(60,"div",27),u(61,jt,6,1,"ng-container",20),i(62,"div")(63,"span",15),l(64,"COD: "),n(),i(65,"span",18),l(66),x(67,"number"),n()()(),u(68,Ht,7,4,"ng-container",20)(69,Ut,6,1,"ng-container",20),n(),i(70,"div",28),Be(),S(71,"svg",29),n()()(),ze(),i(72,"div",25)(73,"div",3)(74,"table",30)(75,"thead")(76,"tr")(77,"th",31),l(78,"No."),n(),i(79,"th",32),l(80,"Nama Produk"),n(),i(81,"th",33),l(82,"SKU"),n(),i(83,"th",34),l(84,"Qty"),n()()(),i(85,"tbody"),u(86,qt,10,6,"tr",35),n()()()()()),a&2&&(o(6),d("src",t.marketplaceLogo,M),o(3),h(t.logistic==null?null:t.logistic.Service),o(2),d("src",t.shippingLogo,M),o(7),E(" ",(t.shippingLabel==null?null:t.shippingLabel.ChannelType)==(t.channelType==null?null:t.channelType.Tokopedia)?"Kode Booking: ":"No. Resi: "," "),o(2),h(t.logistic==null?null:t.logistic.Resi_Number),o(3),d("id","RESI"+t.id),o(9),h(t.recipient==null?null:t.recipient.Name),o(5),E(" ",t.recipient==null?null:t.recipient.Address," "),o(7),h(t.store==null?null:t.store.Name),o(2),h(t.store==null?null:t.store.Phone),o(2),E(" ",t.store==null?null:t.store.Address," "),o(2),d("ngIf",(t.recipient==null?null:t.recipient.City)&&(t.recipient==null?null:t.recipient.District)),o(11),d("ngIf",t.shippingLabel==null?null:t.shippingLabel.Weight),o(5),E("Rp. ",t.shippingLabel!=null&&t.shippingLabel.IsCOD?O(67,18,t.shippingLabel==null||t.shippingLabel.SummaryPrice==null?null:t.shippingLabel.SummaryPrice.Total):0,""),o(2),d("ngIf",(t.logistic==null?null:t.logistic.Batas_kirim)&&(t.logistic==null?null:t.logistic.Batas_kirim)!==t.minDate),o(),d("ngIf",t.shippingLabel==null?null:t.shippingLabel.OrderNumber),o(2),d("id","NO"+t.id),o(15),d("ngForOf",t.products))},dependencies:[ce,A,F,R,V],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}"]})}}return r})();var St=r=>[r],Kt=()=>["/menu/Order/detail"],Xt=(r,c)=>({Number:r,Outlet:c});function Qt(r,c){if(r&1){let e=N();w(0),i(1,"button",21),v("click",function(){g(e);let t=s();return _(t.onPrintMultipleShippingLabel())}),S(2,"i",22),i(3,"span"),l(4,"Print Shipping Label"),n()(),P()}}function Zt(r,c){if(r&1&&(i(0,"span",23),S(1,"img",24),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function $t(r,c){r&1&&(w(0),S(1,"th",39),P())}function ei(r,c){if(r&1){let e=N();w(0),i(1,"input",31),b("ngModelChange",function(t){g(e);let m=s().$implicit;return y(m.Selected,t)||(m.Selected=t),_(t)}),v("ngModelChange",function(){g(e);let t=s(3).ngIf,m=s();return _(m.onSelectReadyToShip(t))}),n(),P()}if(r&2){let e=s().$implicit;o(),C("ngModel",e.Selected)}}function ti(r,c){if(r&1&&(i(0,"a",43),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,Kt))("queryParams",le(4,Xt,e.Number,e.Outlet)),o(),h(e.Number)}}function ii(r,c){if(r&1&&(i(0,"a",44),l(1),n()),r&2){let e=s().$implicit,a=s(3);d("href",a.domain+e.ID,M),o(),h(e.Number)}}function ni(r,c){if(r&1){let e=N();i(0,"a",47),v("click",function(){g(e);let t=s(2).$implicit,m=s(3);return _(m.onPrintShippingLabel(t.Number,t.ShopID,t.TypeID))}),S(1,"i",48),n()}}function ri(r,c){if(r&1&&(w(0),i(1,"td",45),u(2,ni,2,0,"a",46),n(),P()),r&2){let e=s().$implicit,a=s(3);o(2),d("ngIf",e.TypeID==a.channelType.Shopee||e.TypeID==a.channelType.Tokopedia||e.TypeID==a.channelType.Tiktok||e.TypeID==a.channelType.Lazada)}}function ai(r,c){if(r&1&&(i(0,"tr")(1,"td"),u(2,ei,2,1,"ng-container",4),n(),i(3,"td"),l(4),n(),i(5,"td"),u(6,ti,2,7,"a",40)(7,ii,2,2,"a",41),n(),i(8,"td"),l(9),n(),i(10,"td"),l(11),x(12,"number"),n(),i(13,"td"),l(14),x(15,"date"),n(),i(16,"td"),S(17,"app-channel-logo",42),n(),u(18,ri,3,1,"ng-container",37),n()),r&2){let e=c.$implicit,a=s(3);o(2),d("ngIf",e.TypeID==a.channelType.Shopee||e.TypeID==a.channelType.Tokopedia||e.TypeID==a.channelType.Tiktok),o(2),h(e.Outlet),o(2),d("ngIf",a.guidEmpty==e.ID),o(),d("ngIf",a.guidEmpty!=e.ID),o(2),h(e.Customer),o(2),h(O(12,9,e.Amount)),o(3),h(k(15,11,e.Date,"dd MMM yyyy")),o(3),d("typeId",e.TypeID),o(),d("ngxPermissionsOnly",Ge(14,St,a.fulfillmentRole))}}function oi(r,c){if(r&1){let e=N();w(0),i(1,"div",26)(2,"table",27),v("matSortChange",function(t){g(e);let m=s(2);return _(m.onSort(t))}),i(3,"thead",28)(4,"tr",29)(5,"th",30)(6,"input",31),b("ngModelChange",function(t){g(e);let m=s(2);return y(m.isCheckAll,t)||(m.isCheckAll=t),_(t)}),v("ngModelChange",function(){g(e);let t=s().ngIf,m=s();return _(m.onSelectAllReadyToShip(t))}),n()(),i(7,"th",32),l(8,"Outlet"),n(),i(9,"th",33),l(10,"Order number"),n(),i(11,"th"),l(12,"Customer"),n(),i(13,"th",34),l(14,"Amount"),n(),i(15,"th",35),l(16,"Date"),n(),i(17,"th",36),l(18,"Channel"),n(),u(19,$t,2,0,"ng-container",37),n()(),i(20,"tbody"),u(21,ai,19,16,"tr",20),n()(),i(22,"app-mat-paginator-no-count",38),x(23,"async"),x(24,"async"),v("total",function(){g(e);let t=s(2);return _(t.getRowCount())})("next",function(){g(e);let t=s(2);return _(t.NextPage())})("previous",function(){g(e);let t=s(2);return _(t.PreviousPage())}),n()(),P()}if(r&2){let e,a=s().ngIf,t=s();o(6),C("ngModel",t.isCheckAll),o(13),d("ngxPermissionsOnly",Ge(10,St,t.fulfillmentRole)),o(2),d("ngForOf",a),o(),d("filter",t.filter)("totaldata",(e=O(23,6,t.readyToShip$))==null?null:e.length)("paginationTotal",O(24,8,t.paginationTotal$))}}function li(r,c){if(r&1&&(w(0),u(1,oi,25,12,"ng-container",25),P()),r&2){let e=c.ngIf;s();let a=j(35);o(),d("ngIf",e.length>0)("ngIfElse",a)}}function pi(r,c){r&1&&(i(0,"div",49),S(1,"app-empty-state"),n())}function mi(r,c){r&1&&(w(0),i(1,"div",51),l(2,"\xA0"),n(),P())}function di(r,c){if(r&1&&(w(0),S(1,"app-shipping-label",50),u(2,mi,3,0,"ng-container",4),P()),r&2){let e=c.$implicit,a=c.index,t=s();o(),d("shippingLabel",e)("id",a),o(),d("ngIf",a!==(t.shippingLabels==null?null:t.shippingLabels.length)-1)}}var Ct=(()=>{class r{constructor(e,a,t,m,f,p){this.http=e,this.localDataService=a,this.dialog=t,this.shippingLabelService=m,this.datePipe=f,this.authService=p,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.channelType=I,this.guidEmpty=D.GuidEMpty,this.selectedReadyToShip=[],this.isCheckAll=!1,this.fulfillmentRole=Se.Fulfillment,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 a={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",a).pipe(de(t=>t.Data),fe(1)),this.readyToShip$=this.sourceObs$}onPrintMultipleShippingLabel(){let e=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Tokopedia),a=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Shopee),t=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Tiktok),m=[];e.length>0&&m.push(this.shippingLabelService.getTokopediaShippingLabel(this.shippingLabelPayload(e))),a.length>0&&m.push(this.shippingLabelService.getShopeeShippingLabel(this.shippingLabelPayload(a))),t.length>0&&m.push(this.shippingLabelService.getTiktokShippingLabel(this.shippingLabelPayload(t))),je(m).pipe(de(f=>f.reduce((p,wt)=>p.concat(wt),[]))).subscribe({next:f=>{this.shippingLabels=f,this.printShippingLabel()}})}filterReadyToShipByChannel(e,a){return e.filter(t=>t.TypeID==a)}shippingLabelPayload(e){return e.map(a=>({ShopID:a.ShopID,OrderNumber:a.Number}))}printShippingLabel(){setTimeout(()=>{this.setPdfname(),window.print()},500)}onPrintShippingLabel(e,a,t){switch(t){case I.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e);break;case I.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e,a);break;case I.Shopee:this.shippingLabelService.printShippingLabelShopee(e,a);break;case I.Lazada:this.shippingLabelService.printShippingLabelLazada(e,a);break}}setPdfname(){if(this.selectedReadyToShip.length>1){let e=new Date,a=this.datePipe.transform(e,"dd-MM-yyyy"),t=this.datePipe.transform(e,"HH-mm");document.title=`ShippingLabel_${a}_${t}`}else{let e=this.selectedReadyToShip[0].Number;document.title=`ShippingLabel_${e}`}}getSelectedReadyToShip(e){return e.filter(a=>a.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(de(a=>a?.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 a=e.direction=="asc";this.readyToShip$=this.readyToShip$.pipe(de(t=>t.sort((m,f)=>D.compare(m.Date,f.Date,a))))}}onSelectReadyToShip(e){this.selectedReadyToShip=this.getSelectedReadyToShip(e)}onSelectAllReadyToShip(e){e=e.map(a=>((a.TypeID==I.Tokopedia||a.TypeID==I.Shopee||a.TypeID==I.Lazada)&&(a.Selected=this.isCheckAll),a)),this.selectedReadyToShip=this.getSelectedReadyToShip(e)}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(pe),T(Le),T(Ve),T(V),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-ready-to-ship"]],standalone:!1,decls:38,vars:13,consts:[["EMPTY_STATE",""],["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],[1,"print_containers"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","date",2,"width","130px"],[2,"width","114px"],[4,"ngxPermissionsOnly"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[2,"width","10px"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],["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(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.getReadyToShip(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()(),u(6,Qt,5,0,"ng-container",4),n(),i(7,"filters")(8,"div")(9,"label",5),l(10,"Channel"),n(),i(11,"ng-select",6),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(12,Zt,3,3,"ng-template",7),n()(),i(13,"div",8)(14,"label",9),l(15,"Page Number"),n(),i(16,"input",10),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(17,"div",8)(18,"label",9),l(19,"Page Size"),n(),i(20,"input",11),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(21,"div",8)(22,"label",12),l(23,"From/To"),n(),i(24,"div",13)(25,"datepicker",14),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(26,"div")(27,"datepicker",15),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(28,"content")(29,"div",16)(30,"div",17)(31,"div",18),u(32,li,2,2,"ng-container",4),x(33,"async"),u(34,pi,2,0,"ng-template",null,0,H),n()()()()(),i(36,"div",19),u(37,di,3,3,"ng-container",20),n()}a&2&&(o(6),d("ngIf",t.selectedReadyToShip.length>0),o(5),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",O(33,11,t.readyToShip$)),o(5),d("ngForOf",t.shippingLabels))},dependencies:[A,F,Y,X,Me,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,Re,Xe,Oe,R,V],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}}"]})}}return r})();var si=()=>["/menu/Order/detail"],ci=(r,c)=>({Number:r,Outlet:c});function gi(r,c){if(r&1&&(i(0,"span",19),S(1,"img",20),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function _i(r,c){if(r&1&&(i(0,"a",35),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,si))("queryParams",le(4,ci,e.Number,e.Outlet)),o(),h(e.Number)}}function hi(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,M),o(),h(e.Number)}}function ui(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),u(4,_i,2,7,"a",32)(5,hi,2,2,"a",33),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),x(10,"number"),n(),i(11,"td"),l(12),x(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",34),n()()),r&2){let e=c.$implicit,a=s(2);o(2),h(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),h(e.Customer),o(2),h(O(10,7,e.Amount)),o(3),h(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function fi(r,c){if(r&1){let e=N();w(0),i(1,"div",21)(2,"table",22),v("matSortChange",function(t){g(e);let m=s();return _(m.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),l(6,"Outlet"),n(),i(7,"th",26),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",27),l(12,"Amount"),n(),i(13,"th",28),l(14," Created On "),n(),i(15,"th",29),l(16,"Channel"),n()()(),i(17,"tbody"),u(18,ui,16,12,"tr",30),n()(),i(19,"app-mat-paginator-no-count",31),v("total",function(){g(e);let t=s();return _(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return _(t.NextPage())})("previous",function(){g(e);let t=s();return _(t.PreviousPage())}),n()(),P()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Si(r,c){r&1&&(i(0,"div",37),S(1,"app-empty-state"),n())}var yt=(()=>{class r{constructor(e,a,t){this.http=e,this.localDataService=a,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()}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==D.GuidEMpty}Get(e){var a={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",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.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(a=>{this.paginationTotal=a.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 a=e.direction=="asc";this.data=this.data.sort((t,m)=>D.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(pe),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-shipped"]],standalone:!1,decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(11,gi,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(20,"div",7)(21,"label",11),l(22,"From/To"),n(),i(23,"div",12)(24,"datepicker",13),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(25,"div")(26,"datepicker",14),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,fi,20,4,"ng-container",18)(32,Si,2,0,"ng-template",null,0,H),n()()()()()}if(a&2){let m=j(33);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Y,X,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,R,V],encapsulation:2})}}return r})();var Ci=()=>["/menu/Order/detail"],yi=(r,c)=>({Number:r,Outlet:c});function bi(r,c){if(r&1&&(i(0,"span",19),S(1,"img",20),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function xi(r,c){if(r&1&&(i(0,"a",35),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,Ci))("queryParams",le(4,yi,e.Number,e.Outlet)),o(),h(e.Number)}}function vi(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.customerInfoUrl+e.ID,M),o(),h(e.Number)}}function Ti(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),u(4,xi,2,7,"a",32)(5,vi,2,2,"a",33),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),x(10,"number"),n(),i(11,"td"),l(12),x(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",34),n()()),r&2){let e=c.$implicit,a=s(2);o(2),h(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),h(e.Customer),o(2),h(O(10,7,e.Amount)),o(3),h(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function wi(r,c){if(r&1){let e=N();w(0),i(1,"div",21)(2,"table",22),v("matSortChange",function(t){g(e);let m=s();return _(m.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),l(6,"Outlet"),n(),i(7,"th",26),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",27),l(12,"Amount"),n(),i(13,"th",28),l(14," Created On "),n(),i(15,"th",29),l(16,"Channel"),n()()(),i(17,"tbody"),u(18,Ti,16,12,"tr",30),n()(),i(19,"app-mat-paginator-no-count",31),v("total",function(){g(e);let t=s();return _(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return _(t.NextPage())})("previous",function(){g(e);let t=s();return _(t.PreviousPage())}),n()(),P()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Pi(r,c){r&1&&(i(0,"div",37),S(1,"app-empty-state"),n())}var bt=(()=>{class r{constructor(e,a){this.http=e,this.authService=a,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==D.GuidEMpty}getChannelLogo(e){return D.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 a={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 ",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.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(a=>{this.paginationTotal=a.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 a=e.direction=="asc";this.data=this.data.sort((t,m)=>D.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-delivered"]],standalone:!1,decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(11,bi,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(20,"div",7)(21,"label",11),l(22,"From/To"),n(),i(23,"div",12)(24,"datepicker",13),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(25,"div")(26,"datepicker",14),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,wi,20,4,"ng-container",18)(32,Pi,2,0,"ng-template",null,0,H),n()()()()()}if(a&2){let m=j(33);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Y,X,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,R,V],encapsulation:2})}}return r})();var Ei=()=>["/menu/Order/detail"],Ii=(r,c)=>({Number:r,Outlet:c});function Ni(r,c){if(r&1&&(i(0,"span",21),S(1,"img",22),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function Oi(r,c){if(r&1&&(i(0,"a",38),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,Ei))("queryParams",le(4,Ii,e.Number,e.Outlet)),o(),h(e.Number)}}function Di(r,c){if(r&1&&(i(0,"a",39),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,M),o(),h(e.Number)}}function Mi(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),u(4,Oi,2,7,"a",35)(5,Di,2,2,"a",36),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),x(10,"number"),n(),i(11,"td"),l(12),x(13,"date"),n(),i(14,"td"),l(15),n(),i(16,"td"),S(17,"app-channel-logo",37),n()()),r&2){let e=c.$implicit,a=s(2);o(2),h(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),h(e.Customer),o(2),h(O(10,8,e.Amount)),o(3),h(k(13,10,e.Created,"dd MMM yyyy HH:mm")),o(3),h(e.State),o(2),d("typeId",e.TypeID)}}function Li(r,c){if(r&1){let e=N();w(0),i(1,"div",23)(2,"table",24),v("matSortChange",function(t){g(e);let m=s();return _(m.onSort(t))}),i(3,"thead",25)(4,"tr",26)(5,"th",27),l(6,"Outlet"),n(),i(7,"th",28),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",29),l(12,"Amount"),n(),i(13,"th",30),l(14," Created On "),n(),i(15,"th",31),l(16,"Status"),n(),i(17,"th",32),l(18,"Channel"),n()()(),i(19,"tbody"),u(20,Mi,18,13,"tr",33),n()(),i(21,"app-mat-paginator-no-count",34),v("total",function(){g(e);let t=s();return _(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return _(t.NextPage())})("previous",function(){g(e);let t=s();return _(t.PreviousPage())}),n()(),P()}if(r&2){let e=s();o(20),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function ki(r,c){r&1&&(i(0,"div",40),S(1,"app-empty-state"),n())}var xt=(()=>{class r{constructor(e,a,t,m){this.http=e,this.localDataService=a,this.authService=t,this.dialog=m,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==D.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 a={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",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}openExportDialog(){this.dialog.open(dt,{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(a=>{this.paginationTotal=a.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 a=e.direction=="asc";this.data=this.data.sort((t,m)=>D.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(pe),T(Q),T(Le))}}static{this.\u0275cmp=L({type:r,selectors:[["app-all-order"]],standalone:!1,decls:38,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","135px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()(),i(6,"button",4),v("click",function(){return g(m),_(t.openExportDialog())}),S(7,"i",5),i(8,"span"),l(9,"Export"),n()()(),i(10,"filters")(11,"div")(12,"label",6),l(13,"Channel"),n(),i(14,"ng-select",7),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(15,Ni,3,3,"ng-template",8),n()(),i(16,"div",9)(17,"label",10),l(18,"Page Number"),n(),i(19,"input",11),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(20,"div",9)(21,"label",10),l(22,"Page Size"),n(),i(23,"input",12),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(24,"div",9)(25,"label",13),l(26,"From/To"),n(),i(27,"div",14)(28,"datepicker",15),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(29,"div")(30,"datepicker",16),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(31,"content")(32,"div",17)(33,"div",18)(34,"div",19),u(35,Li,22,4,"ng-container",20)(36,ki,2,0,"ng-template",null,0,H),n()()()()()}if(a&2){let m=j(37);o(14),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Y,X,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,R,V],encapsulation:2})}}return r})();var Vi=()=>["/menu/Order/detail"],Ai=(r,c)=>({Number:r,Outlet:c});function Fi(r,c){if(r&1&&(i(0,"span",20),S(1,"img",21),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function Ri(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,Vi))("queryParams",le(4,Ai,e.Number,e.Outlet)),o(),h(e.Number)}}function Wi(r,c){if(r&1&&(i(0,"a",37),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,M),o(),h(e.Number)}}function Bi(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),u(4,Ri,2,7,"a",33)(5,Wi,2,2,"a",34),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),x(10,"number"),n(),i(11,"td"),l(12),x(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",35),n()()),r&2){let e=c.$implicit,a=s(2);o(2),h(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),h(e.Customer),o(2),h(O(10,7,e.Amount)),o(3),h(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function zi(r,c){if(r&1){let e=N();w(0),i(1,"div",22)(2,"table",23),v("matSortChange",function(t){g(e);let m=s();return _(m.onSort(t))}),i(3,"thead",24)(4,"tr",25)(5,"th",26),l(6,"Outlet"),n(),i(7,"th",27),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",28),l(12,"Amount"),n(),i(13,"th",29),l(14," Created On "),n(),i(15,"th",30),l(16,"Channel"),n()()(),i(17,"tbody"),u(18,Bi,16,12,"tr",31),n()(),i(19,"app-mat-paginator-no-count",32),v("total",function(){g(e);let t=s();return _(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return _(t.NextPage())})("previous",function(){g(e);let t=s();return _(t.PreviousPage())}),n()(),P()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Gi(r,c){r&1&&(i(0,"div",38),S(1,"app-empty-state"),n())}var vt=(()=>{class r{constructor(e,a,t){this.http=e,this.localDataService=a,this.authService=t,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==D.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 a={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 ",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.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(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}getChannelLogo(e){return D.getChannelLogoByTypeId(e)}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>D.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(pe),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-cancelled"]],standalone:!1,decls:38,vars:11,consts:[["EMPTY_STATE",""],["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","Note",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(11,Fi,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(20,"div",7)(21,"label",8),l(22,"Note"),n(),i(23,"input",11),b("ngModelChange",function(p){return g(m),y(t.filter.Note,p)||(t.filter.Note=p),_(p)}),n()(),i(24,"div",7)(25,"label",12),l(26,"From/To"),n(),i(27,"div",13)(28,"datepicker",14),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(29,"div")(30,"datepicker",15),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(31,"content")(32,"div",16)(33,"div",17)(34,"div",18),u(35,zi,20,4,"ng-container",19)(36,Gi,2,0,"ng-template",null,0,H),n()()()()()}if(a&2){let m=j(37);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(4),C("ngModel",t.filter.Note),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Y,X,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,R,V],encapsulation:2})}}return r})();var ji=[{path:"",component:ht,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:ut,canActivate:[ae],data:{title:"New Order"}},{path:"detail",component:ft,canActivate:[ae],data:{title:"Orders detail"}},{path:"ready_to_ship",component:Ct,canActivate:[ae],data:{title:"Ready To Ship"}},{path:"Shipped",component:yt,canActivate:[ae],data:{title:"Shipped"}},{path:"Delivered",component:bt,canActivate:[ae],data:{title:"Delivered"}},{path:"All",component:xt,canActivate:[ae],data:{title:"All Order"}},{path:"Cancelled",component:vt,canActivate:[ae],data:{title:"Cancelled"}},{path:"Download",loadComponent(){return import("./chunk-C3HL4S2R.js").then(r=>r.DownloadV2Component)},canActivate:[ae],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-6G5WVJGA.js").then(r=>r.DownloadOrderLogComponent),canActivate:[ae],data:{title:"Download Order Log"}},{path:"Download_Order_Log/Detail",loadComponent:()=>import("./chunk-JILE74BG.js").then(r=>r.DownloadOrderDetailComponent),canActivate:[ae],data:{title:"Download Order Log Detail"}}]}],Tt=(()=>{class r{static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275mod=Ne({type:r})}static{this.\u0275inj=Ie({imports:[ce,De.forChild(ji)]})}}return r})();var Dr=(()=>{class r{static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275mod=Ne({type:r})}static{this.\u0275inj=Ie({providers:[ke,Ae,Ve],imports:[ce,Je,Tt,it,nt,st,De,Ze,mt,lt,z,ct,$e,at,gt,et,pt,rt,G,Re,_t,ot,Qe]})}}return r})();export{Dr as OrdersModule};
|
|
4
|
+
</ol>`;this.toastr.warning(m,"Warning",{enableHtml:!0})}else{let m=`<ol>${this.generateErrorMessage(a)}</ol>`;this.toastr.error(m,"Error",{enableHtml:!0})}}generateSuccessMessage(e){let a="";return e.forEach(t=>{a+=`<li><b>${t.OrderNumber}</b> was successfully Accept</li>`}),a}generateErrorMessage(e){let a="";return e.forEach(t=>{a+=`<li><b>${t.OrderNumber}</b> ${t.Message}</li>`}),a}static{this.\u0275fac=function(a){return new(a||r)(We(W),We(Ke))}}static{this.\u0275prov=He({token:r,factory:r.\u0275fac})}}return r})();function Et(r,c){if(r&1){let e=N();w(0),i(1,"button",20),v("click",function(){g(e);let t=s().ngIf,m=s();return _(m.onAcceptOrder(t))}),S(2,"i",21),l(3," Accept "),n(),P()}}function It(r,c){if(r&1&&(w(0),u(1,Et,4,0,"ng-container",3),P()),r&2){let e=s();o(),d("ngIf",e.isTokopediaAvailable&&e.isTokopediaSelected)}}function Nt(r,c){if(r&1&&(i(0,"span",22),S(1,"img",23),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M),o(),E(" ",e.Name," ")}}function Ot(r,c){if(r&1){let e=N();w(0),i(1,"th",35)(2,"input",36),b("ngModelChange",function(t){g(e);let m=s(3);return y(m.isCheckAll,t)||(m.isCheckAll=t),_(t)}),v("ngModelChange",function(){g(e);let t=s(2).ngIf,m=s();return _(m.onSelectAllOrderData(t))}),n()(),P()}if(r&2){let e=s(3);o(2),C("ngModel",e.isCheckAll)}}function Dt(r,c){if(r&1){let e=N();w(0),i(1,"input",36),b("ngModelChange",function(t){g(e);let m=s(2).$implicit;return y(m.selected,t)||(m.selected=t),_(t)}),v("ngModelChange",function(){g(e);let t=s(4).ngIf,m=s();return _(m.onSelectOrderData(t))}),n(),P()}if(r&2){let e=s(2).$implicit;o(),C("ngModel",e.selected)}}function Mt(r,c){if(r&1&&(w(0),i(1,"td"),u(2,Dt,2,1,"ng-container",3),n(),P()),r&2){let e=s().$implicit,a=s(3);o(2),d("ngIf",e.Type==a.tokopediaType)}}function Lt(r,c){if(r&1&&(w(0),i(1,"span"),l(2),n(),P()),r&2){let e=s().$implicit;o(2),h(e.Number)}}function kt(r,c){if(r&1&&(i(0,"a",38),l(1),n()),r&2){let e=s().$implicit,a=s(3);d("href",a.domain+"/menu/Orders/Order/Sales_Order/Info?ID="+e.ID,M),o(),h(e.Number)}}function Vt(r,c){if(r&1&&(i(0,"tr"),u(1,Mt,3,1,"ng-container",3),i(2,"td"),l(3),n(),i(4,"td"),u(5,Lt,3,1,"ng-container",24)(6,kt,2,2,"ng-template",null,1,H),n(),i(8,"td"),l(9),n(),i(10,"td"),l(11),x(12,"date"),n(),i(13,"td"),S(14,"app-channel-logo",37),n()()),r&2){let e=c.$implicit,a=j(7),t=s(3);o(),d("ngIf",t.isTokopediaAvailable),o(2),h(e.Outlet),o(2),d("ngIf",e.ID==t.guidEmpty)("ngIfElse",a),o(4),h(e.Customer),o(2),h(k(12,7,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.Type)}}function At(r,c){if(r&1){let e=N();w(0),i(1,"div",25)(2,"table",26),v("matSortChange",function(t){g(e);let m=s(2);return _(m.onSort(t))}),i(3,"thead",27)(4,"tr",28),u(5,Ot,3,1,"ng-container",3),i(6,"th",29),l(7,"Outlet"),n(),i(8,"th",30),l(9,"Order number"),n(),i(10,"th"),l(11,"Customer"),n(),i(12,"th",31),l(13," Created On "),n(),i(14,"th",32),l(15,"Channel"),n()()(),i(16,"tbody"),u(17,Vt,15,10,"tr",33),n()(),i(18,"app-mat-paginator-no-count",34),x(19,"async"),x(20,"async"),v("total",function(){g(e);let t=s(2);return _(t.getPaginatonTotal())})("next",function(){g(e);let t=s(2);return _(t.onNextPage())})("previous",function(){g(e);let t=s(2);return _(t.onPreviousPage())}),n()(),P()}if(r&2){let e,a=s().ngIf,t=s();o(5),d("ngIf",t.isTokopediaAvailable&&a),o(12),d("ngForOf",a),o(),d("filter",t.filter)("totaldata",(e=O(19,5,t.newOrdersData$))==null?null:e.length)("paginationTotal",O(20,7,t.paginationTotal$))}}function Ft(r,c){if(r&1&&(w(0),u(1,At,21,9,"ng-container",24),P()),r&2){let e=c.ngIf;s();let a=j(36);o(),d("ngIf",(e==null?null:e.length)>0)("ngIfElse",a)}}function Rt(r,c){r&1&&(i(0,"div",39),S(1,"app-empty-state"),n())}var ut=(()=>{class r{constructor(e,a,t,m){this.localDataService=e,this.orderService=a,this.acceptOrderService=t,this.authService=m,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.domain=`https://${this.localDataService.getHostName()}`,this.guidEmpty=D.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(fe()),this.newOrdersData$=this.sourceObs$.pipe(Ee(a=>{a.filter(m=>m.Type==I.Tokopedia).length>0&&(this.isTokopediaAvailable=!0)}))}getPaginatonTotal(){this.paginationTotal$=this.orderService.getTotalNewOrders(this.filter.ListChannelID,this.filter.From,this.filter.To).pipe(fe())}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(t=>t.selected).length>0&&(this.isTokopediaSelected=!0)}onSelectAllOrderData(e){e=e.map(a=>(a.Type==I.Tokopedia&&(a.selected=this.isCheckAll),a)),this.onSelectOrderData(e)}onAcceptOrder(e){let a=this.getSelectedTokopediaOrders(e);this.acceptOrderService.acceptTokopediaOrders(a).subscribe(t=>{this.isTokopediaSelected=!1,location.reload()})}getSelectedTokopediaOrders(e){return e.filter(t=>t.selected).map(t=>t.Number)}onSort(e){if(e.direction==""){this.newOrdersData$=this.sourceObs$;return}if(e.active=="created"){let a=e.direction=="asc";this.newOrdersData$=this.newOrdersData$.pipe(de(t=>(t=t.sort((m,f)=>D.compare(m.Created,f.Created,a)),t)))}}static{this.\u0275fac=function(a){return new(a||r)(T(pe),T(ke),T(Ae),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-new-order"]],standalone:!1,decls:37,vars:15,consts:[["EMPTY_STATE",""],["NOT_EMPTY",""],["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"onSubmit","hideSearchBox"],[4,"ngIf"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-check"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"typeId"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",2),v("onSubmit",function(){return g(m),_(t.getNewOrders())}),i(1,"actions"),u(2,It,2,1,"ng-container",3),x(3,"async"),i(4,"a",4),S(5,"i",5),i(6,"span"),l(7,"Visit our Fulfillment Display System"),n()()(),i(8,"filters")(9,"div")(10,"label",6),l(11,"Channel"),n(),i(12,"ng-select",7),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(13,Nt,3,2,"ng-template",8),n()(),i(14,"div",9)(15,"label",10),l(16,"Page Number"),n(),i(17,"input",11),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(18,"div",9)(19,"label",10),l(20,"Page Size"),n(),i(21,"input",12),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(22,"div",9)(23,"label",13),l(24,"From/To"),n(),i(25,"div",14)(26,"datepicker",15),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(27,"div")(28,"datepicker",16),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(29,"content")(30,"div",17)(31,"div",18)(32,"div",19),u(33,Ft,2,2,"ng-container",3),x(34,"async"),u(35,Rt,2,0,"ng-template",null,0,H),n()()()()()}a&2&&(d("hideSearchBox",!0),o(2),d("ngIf",O(3,11,t.newOrdersData$)),o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",O(34,13,t.newOrdersData$)))},dependencies:[A,F,Y,X,Me,J,K,B,ee,Z,$,z,ne,re,te,ie,G,Oe,V],encapsulation:2})}}return r})();var Wt=()=>["/menu/Order"];function Bt(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),l(4),x(5,"number"),n(),i(6,"td"),l(7),x(8,"number"),n()()),r&2){let e=c.$implicit;o(2),h(e.Code),o(2),h(O(5,3,e.Quantity)),o(3),h(O(8,5,e.Price))}}function zt(r,c){if(r&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),l(5,"Outlet Info"),n()(),i(6,"div",4)(7,"div",9),l(8," Outlet : "),n(),i(9,"div",9),l(10),n()(),i(11,"div",4)(12,"div",9),l(13," Date : "),n(),i(14,"div",9),l(15),x(16,"date"),n()(),i(17,"div",4)(18,"div",9),l(19," Status : "),n(),i(20,"div",9),l(21),n()(),i(22,"div",4)(23,"div",9),l(24," Tax Type : "),n(),i(25,"div",9),l(26),n()(),i(27,"div",4)(28,"div",9),l(29," Due Date : "),n(),i(30,"div",9),l(31),x(32,"date"),n()()(),i(33,"div",6)(34,"div",7)(35,"h3",8),l(36,"Customer Info"),n()(),i(37,"div",4)(38,"div",9),l(39," Name : "),n(),i(40,"div",9),l(41),n()(),i(42,"div",4)(43,"div",9),l(44," Email : "),n(),i(45,"div",9),l(46),n()(),i(47,"div",4)(48,"div",9),l(49," Mobile : "),n(),i(50,"div",9),l(51),n()()()(),i(52,"div",10)(53,"h3",11),l(54,"Products Sold"),n(),i(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),l(60,"Code"),n(),i(61,"th"),l(62,"Quantity"),n(),i(63,"th"),l(64,"Price"),n()()(),i(65,"tbody"),u(66,Bt,9,7,"tr",16),n()()()()()),r&2){let e=s();o(10),E(" ",e.model.Outlet," "),o(5),E(" ",k(16,9,e.model.Date,"dd MMM yyyy")," "),o(6),E(" ",e.model.Delivery," "),o(5),E(" ",e.model.TaxType," "),o(5),E(" ",k(32,12,e.model.DueDate,"dd MMM yyyy")," "),o(10),E(" ",e.model.Customer.Name," "),o(5),E(" ",e.model.Customer.Email," "),o(5),E(" ",e.model.Customer.Mobile," "),o(15),d("ngForOf",e.model.Variants)}}var ft=(()=>{class r{constructor(e,a){this.http=e,this.url=a,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(a=>{this.model=a})}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(qe))}}static{this.\u0275cmp=L({type:r,selectors:[["app-detail-order"]],standalone:!1,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(a,t){a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Back"),n()(),i(4,"content")(5,"div",2),u(6,zt,67,15,"div",3),n()()()),a&2&&(d("headerTitle","Order #"+t.number)("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),d("routerLink",U(5,Wt)),o(4),d("ngIf",t.model))},dependencies:[A,F,B,q,R,V],encapsulation:2})}}return r})();var me=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}(me||{});var ue=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}(ue||{});function Gt(r,c){if(r&1&&(w(0),i(1,"div",36)(2,"div",12)(3,"div",37),l(4),n()(),i(5,"div",12)(6,"div",37),l(7),n()()(),P()),r&2){let e=s();o(4),E(" ",e.recipient==null?null:e.recipient.City," "),o(3),E(" ",e.recipient==null?null:e.recipient.District," ")}}function jt(r,c){if(r&1&&(w(0),i(1,"div")(2,"span",15),l(3,"Berat: "),n(),i(4,"span",18),l(5),n()(),P()),r&2){let e=s();o(5),E("",e.shippingLabel==null?null:e.shippingLabel.Weight," gr")}}function Ht(r,c){if(r&1&&(w(0),i(1,"div",38)(2,"span",14),l(3,"Batas Kirim:"),n(),i(4,"span",18),l(5),x(6,"date"),n()(),P()),r&2){let e=s();o(5),h(k(6,1,e.logistic==null?null:e.logistic.Batas_kirim,"dd-MM-yyy"))}}function Ut(r,c){if(r&1&&(w(0),i(1,"div",38)(2,"span",14),l(3,"No.Pesanan:"),n(),i(4,"span",18),l(5),n()(),P()),r&2){let e=s();o(5),h(e.shippingLabel==null?null:e.shippingLabel.OrderNumber)}}function qt(r,c){if(r&1&&(i(0,"tr")(1,"td",39),l(2),n(),i(3,"td"),l(4),n(),i(5,"td"),l(6),n(),i(7,"td"),l(8),x(9,"number"),n()()),r&2){let e=c.$implicit,a=c.index;o(2),h(a+1),o(2),h(e.Product_Name),o(2),h(e.SKU),o(2),h(O(9,4,e.Quantity))}}var Re=(()=>{class r{constructor(){this.minDate=D.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=ue.TOKOPEDIA;break;case I.Shopee:this.marketplaceLogo=ue.SHOPEE;break;case I.Lazada:this.marketplaceLogo=ue.LAZADA;break;case I.Tiktok:this.marketplaceLogo=ue.TIKTOK;break}}getShippingLogo(){let e=this.shippingLabel.Logistic.Logistic_Name;e=e?.toLowerCase(),e.includes("anteraja")?this.shippingLogo=me.ANTERAJA:e.includes("grabexpress")?this.shippingLogo=me.GRAB:e.includes("jne")?this.shippingLogo=me.JNE:e.includes("gosend")?this.shippingLogo=me.GOSEND:e.includes("j&t")||e.includes("jnt")?this.shippingLogo=me.JNT:e.includes("sicepat")?this.shippingLogo=me.SICEPAT:e.includes("spx")?this.shippingLogo=me.SPX:(e.includes("lex")||e.includes("lx")||e.includes("lazada express"))&&(this.shippingLogo=me.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(D.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})}D.IsNotEmpty(this.shippingLabel?.OrderNumber)&&JsBarcode(`#NO${this.id}`,this.shippingLabel?.OrderNumber,{displayValue:!1,width:this.shippingLabel?.OrderNumber.length>15?.5:1,height:40})}static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275cmp=L({type:r,selectors:[["app-shipping-label"]],inputs:{shippingLabel:"shippingLabel",id:"id"},features:[Ue],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(a,t){a&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div"),S(6,"img",5),n(),i(7,"div")(8,"h4"),l(9),n()(),i(10,"div"),S(11,"img",5),n()()()(),i(12,"div",6),S(13,"hr"),n(),i(14,"div",7)(15,"div",3)(16,"div",8)(17,"span",9),l(18),n(),i(19,"span"),l(20),n()()()(),i(21,"div",7)(22,"div",10),Be(),S(23,"svg",11),n()(),ze(),i(24,"div",6),S(25,"hr"),n(),i(26,"div",2)(27,"div",12)(28,"div",13)(29,"div",14),l(30,"Penerima: "),n(),i(31,"div",15),l(32),n()(),i(33,"div",16)(34,"span",15),l(35,"Alamat Pengiriman:"),n(),i(36,"div",17),l(37),n()()(),i(38,"div",12)(39,"div",13)(40,"div",14),l(41,"Pengirim: "),n(),i(42,"div")(43,"div",15),l(44),n(),i(45,"div",18),l(46),n(),i(47,"div",19),l(48),n()()(),S(49,"div"),n()(),u(50,Gt,8,2,"ng-container",20),i(51,"div",21)(52,"div",22)(53,"div",15),l(54,"CASHLESS"),n()(),i(55,"div",23)(56,"small",24),l(57,"Penjual tidak perlu membayar ongkos kirim ke kurir"),n()()(),i(58,"div",25)(59,"div",26)(60,"div",27),u(61,jt,6,1,"ng-container",20),i(62,"div")(63,"span",15),l(64,"COD: "),n(),i(65,"span",18),l(66),x(67,"number"),n()()(),u(68,Ht,7,4,"ng-container",20)(69,Ut,6,1,"ng-container",20),n(),i(70,"div",28),Be(),S(71,"svg",29),n()()(),ze(),i(72,"div",25)(73,"div",3)(74,"table",30)(75,"thead")(76,"tr")(77,"th",31),l(78,"No."),n(),i(79,"th",32),l(80,"Nama Produk"),n(),i(81,"th",33),l(82,"SKU"),n(),i(83,"th",34),l(84,"Qty"),n()()(),i(85,"tbody"),u(86,qt,10,6,"tr",35),n()()()()()),a&2&&(o(6),d("src",t.marketplaceLogo,M),o(3),h(t.logistic==null?null:t.logistic.Service),o(2),d("src",t.shippingLogo,M),o(7),E(" ",(t.shippingLabel==null?null:t.shippingLabel.ChannelType)==(t.channelType==null?null:t.channelType.Tokopedia)?"Kode Booking: ":"No. Resi: "," "),o(2),h(t.logistic==null?null:t.logistic.Resi_Number),o(3),d("id","RESI"+t.id),o(9),h(t.recipient==null?null:t.recipient.Name),o(5),E(" ",t.recipient==null?null:t.recipient.Address," "),o(7),h(t.store==null?null:t.store.Name),o(2),h(t.store==null?null:t.store.Phone),o(2),E(" ",t.store==null?null:t.store.Address," "),o(2),d("ngIf",(t.recipient==null?null:t.recipient.City)&&(t.recipient==null?null:t.recipient.District)),o(11),d("ngIf",t.shippingLabel==null?null:t.shippingLabel.Weight),o(5),E("Rp. ",t.shippingLabel!=null&&t.shippingLabel.IsCOD?O(67,18,t.shippingLabel==null||t.shippingLabel.SummaryPrice==null?null:t.shippingLabel.SummaryPrice.Total):0,""),o(2),d("ngIf",(t.logistic==null?null:t.logistic.Batas_kirim)&&(t.logistic==null?null:t.logistic.Batas_kirim)!==t.minDate),o(),d("ngIf",t.shippingLabel==null?null:t.shippingLabel.OrderNumber),o(2),d("id","NO"+t.id),o(15),d("ngForOf",t.products))},dependencies:[ce,A,F,R,V],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}"]})}}return r})();var St=r=>[r],Kt=()=>["/menu/Order/detail"],Xt=(r,c)=>({Number:r,Outlet:c});function Qt(r,c){if(r&1){let e=N();w(0),i(1,"button",21),v("click",function(){g(e);let t=s();return _(t.onPrintMultipleShippingLabel())}),S(2,"i",22),i(3,"span"),l(4,"Print Shipping Label"),n()(),P()}}function Zt(r,c){if(r&1&&(i(0,"span",23),S(1,"img",24),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function $t(r,c){r&1&&(w(0),S(1,"th",39),P())}function ei(r,c){if(r&1){let e=N();w(0),i(1,"input",31),b("ngModelChange",function(t){g(e);let m=s().$implicit;return y(m.Selected,t)||(m.Selected=t),_(t)}),v("ngModelChange",function(){g(e);let t=s(3).ngIf,m=s();return _(m.onSelectReadyToShip(t))}),n(),P()}if(r&2){let e=s().$implicit;o(),C("ngModel",e.Selected)}}function ti(r,c){if(r&1&&(i(0,"a",43),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,Kt))("queryParams",le(4,Xt,e.Number,e.Outlet)),o(),h(e.Number)}}function ii(r,c){if(r&1&&(i(0,"a",44),l(1),n()),r&2){let e=s().$implicit,a=s(3);d("href",a.domain+e.ID,M),o(),h(e.Number)}}function ni(r,c){if(r&1){let e=N();i(0,"a",47),v("click",function(){g(e);let t=s(2).$implicit,m=s(3);return _(m.onPrintShippingLabel(t.Number,t.ShopID,t.TypeID))}),S(1,"i",48),n()}}function ri(r,c){if(r&1&&(w(0),i(1,"td",45),u(2,ni,2,0,"a",46),n(),P()),r&2){let e=s().$implicit,a=s(3);o(2),d("ngIf",e.TypeID==a.channelType.Shopee||e.TypeID==a.channelType.Tokopedia||e.TypeID==a.channelType.Tiktok||e.TypeID==a.channelType.Lazada)}}function ai(r,c){if(r&1&&(i(0,"tr")(1,"td"),u(2,ei,2,1,"ng-container",4),n(),i(3,"td"),l(4),n(),i(5,"td"),u(6,ti,2,7,"a",40)(7,ii,2,2,"a",41),n(),i(8,"td"),l(9),n(),i(10,"td"),l(11),x(12,"number"),n(),i(13,"td"),l(14),x(15,"date"),n(),i(16,"td"),S(17,"app-channel-logo",42),n(),u(18,ri,3,1,"ng-container",37),n()),r&2){let e=c.$implicit,a=s(3);o(2),d("ngIf",e.TypeID==a.channelType.Shopee||e.TypeID==a.channelType.Tokopedia||e.TypeID==a.channelType.Tiktok),o(2),h(e.Outlet),o(2),d("ngIf",a.guidEmpty==e.ID),o(),d("ngIf",a.guidEmpty!=e.ID),o(2),h(e.Customer),o(2),h(O(12,9,e.Amount)),o(3),h(k(15,11,e.Date,"dd MMM yyyy")),o(3),d("typeId",e.TypeID),o(),d("ngxPermissionsOnly",Ge(14,St,a.fulfillmentRole))}}function oi(r,c){if(r&1){let e=N();w(0),i(1,"div",26)(2,"table",27),v("matSortChange",function(t){g(e);let m=s(2);return _(m.onSort(t))}),i(3,"thead",28)(4,"tr",29)(5,"th",30)(6,"input",31),b("ngModelChange",function(t){g(e);let m=s(2);return y(m.isCheckAll,t)||(m.isCheckAll=t),_(t)}),v("ngModelChange",function(){g(e);let t=s().ngIf,m=s();return _(m.onSelectAllReadyToShip(t))}),n()(),i(7,"th",32),l(8,"Outlet"),n(),i(9,"th",33),l(10,"Order number"),n(),i(11,"th"),l(12,"Customer"),n(),i(13,"th",34),l(14,"Amount"),n(),i(15,"th",35),l(16,"Date"),n(),i(17,"th",36),l(18,"Channel"),n(),u(19,$t,2,0,"ng-container",37),n()(),i(20,"tbody"),u(21,ai,19,16,"tr",20),n()(),i(22,"app-mat-paginator-no-count",38),x(23,"async"),x(24,"async"),v("total",function(){g(e);let t=s(2);return _(t.getRowCount())})("next",function(){g(e);let t=s(2);return _(t.NextPage())})("previous",function(){g(e);let t=s(2);return _(t.PreviousPage())}),n()(),P()}if(r&2){let e,a=s().ngIf,t=s();o(6),C("ngModel",t.isCheckAll),o(13),d("ngxPermissionsOnly",Ge(10,St,t.fulfillmentRole)),o(2),d("ngForOf",a),o(),d("filter",t.filter)("totaldata",(e=O(23,6,t.readyToShip$))==null?null:e.length)("paginationTotal",O(24,8,t.paginationTotal$))}}function li(r,c){if(r&1&&(w(0),u(1,oi,25,12,"ng-container",25),P()),r&2){let e=c.ngIf;s();let a=j(35);o(),d("ngIf",e.length>0)("ngIfElse",a)}}function pi(r,c){r&1&&(i(0,"div",49),S(1,"app-empty-state"),n())}function mi(r,c){r&1&&(w(0),i(1,"div",51),l(2,"\xA0"),n(),P())}function di(r,c){if(r&1&&(w(0),S(1,"app-shipping-label",50),u(2,mi,3,0,"ng-container",4),P()),r&2){let e=c.$implicit,a=c.index,t=s();o(),d("shippingLabel",e)("id",a),o(),d("ngIf",a!==(t.shippingLabels==null?null:t.shippingLabels.length)-1)}}var Ct=(()=>{class r{constructor(e,a,t,m,f,p){this.http=e,this.localDataService=a,this.dialog=t,this.shippingLabelService=m,this.datePipe=f,this.authService=p,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.channelType=I,this.guidEmpty=D.GuidEMpty,this.selectedReadyToShip=[],this.isCheckAll=!1,this.fulfillmentRole=Se.Fulfillment,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 a={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",a).pipe(de(t=>t.Data),fe(1)),this.readyToShip$=this.sourceObs$}onPrintMultipleShippingLabel(){let e=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Tokopedia),a=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Shopee),t=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Tiktok),m=[];e.length>0&&m.push(this.shippingLabelService.getTokopediaShippingLabel(this.shippingLabelPayload(e))),a.length>0&&m.push(this.shippingLabelService.getShopeeShippingLabel(this.shippingLabelPayload(a))),t.length>0&&m.push(this.shippingLabelService.getTiktokShippingLabel(this.shippingLabelPayload(t))),je(m).pipe(de(f=>f.reduce((p,wt)=>p.concat(wt),[]))).subscribe({next:f=>{this.shippingLabels=f,this.printShippingLabel()}})}filterReadyToShipByChannel(e,a){return e.filter(t=>t.TypeID==a)}shippingLabelPayload(e){return e.map(a=>({ShopID:a.ShopID,OrderNumber:a.Number}))}printShippingLabel(){setTimeout(()=>{this.setPdfname(),window.print()},500)}onPrintShippingLabel(e,a,t){switch(t){case I.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e);break;case I.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e,a);break;case I.Shopee:this.shippingLabelService.printShippingLabelShopee(e,a);break;case I.Lazada:this.shippingLabelService.printShippingLabelLazada(e,a);break}}setPdfname(){if(this.selectedReadyToShip.length>1){let e=new Date,a=this.datePipe.transform(e,"dd-MM-yyyy"),t=this.datePipe.transform(e,"HH-mm");document.title=`ShippingLabel_${a}_${t}`}else{let e=this.selectedReadyToShip[0].Number;document.title=`ShippingLabel_${e}`}}getSelectedReadyToShip(e){return e.filter(a=>a.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(de(a=>a?.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 a=e.direction=="asc";this.readyToShip$=this.readyToShip$.pipe(de(t=>t.sort((m,f)=>D.compare(m.Date,f.Date,a))))}}onSelectReadyToShip(e){this.selectedReadyToShip=this.getSelectedReadyToShip(e)}onSelectAllReadyToShip(e){e=e.map(a=>((a.TypeID==I.Tokopedia||a.TypeID==I.Shopee||a.TypeID==I.Lazada)&&(a.Selected=this.isCheckAll),a)),this.selectedReadyToShip=this.getSelectedReadyToShip(e)}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(pe),T(Le),T(Ve),T(V),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-ready-to-ship"]],standalone:!1,decls:38,vars:13,consts:[["EMPTY_STATE",""],["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],[1,"print_containers"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","date",2,"width","130px"],[2,"width","114px"],[4,"ngxPermissionsOnly"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[2,"width","10px"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],["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(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.getReadyToShip(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()(),u(6,Qt,5,0,"ng-container",4),n(),i(7,"filters")(8,"div")(9,"label",5),l(10,"Channel"),n(),i(11,"ng-select",6),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(12,Zt,3,3,"ng-template",7),n()(),i(13,"div",8)(14,"label",9),l(15,"Page Number"),n(),i(16,"input",10),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(17,"div",8)(18,"label",9),l(19,"Page Size"),n(),i(20,"input",11),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(21,"div",8)(22,"label",12),l(23,"From/To"),n(),i(24,"div",13)(25,"datepicker",14),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(26,"div")(27,"datepicker",15),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(28,"content")(29,"div",16)(30,"div",17)(31,"div",18),u(32,li,2,2,"ng-container",4),x(33,"async"),u(34,pi,2,0,"ng-template",null,0,H),n()()()()(),i(36,"div",19),u(37,di,3,3,"ng-container",20),n()}a&2&&(o(6),d("ngIf",t.selectedReadyToShip.length>0),o(5),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",O(33,11,t.readyToShip$)),o(5),d("ngForOf",t.shippingLabels))},dependencies:[A,F,Y,X,Me,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,Re,Xe,Oe,R,V],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}}"]})}}return r})();var si=()=>["/menu/Order/detail"],ci=(r,c)=>({Number:r,Outlet:c});function gi(r,c){if(r&1&&(i(0,"span",19),S(1,"img",20),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function _i(r,c){if(r&1&&(i(0,"a",35),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,si))("queryParams",le(4,ci,e.Number,e.Outlet)),o(),h(e.Number)}}function hi(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,M),o(),h(e.Number)}}function ui(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),u(4,_i,2,7,"a",32)(5,hi,2,2,"a",33),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),x(10,"number"),n(),i(11,"td"),l(12),x(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",34),n()()),r&2){let e=c.$implicit,a=s(2);o(2),h(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),h(e.Customer),o(2),h(O(10,7,e.Amount)),o(3),h(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function fi(r,c){if(r&1){let e=N();w(0),i(1,"div",21)(2,"table",22),v("matSortChange",function(t){g(e);let m=s();return _(m.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),l(6,"Outlet"),n(),i(7,"th",26),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",27),l(12,"Amount"),n(),i(13,"th",28),l(14," Created On "),n(),i(15,"th",29),l(16,"Channel"),n()()(),i(17,"tbody"),u(18,ui,16,12,"tr",30),n()(),i(19,"app-mat-paginator-no-count",31),v("total",function(){g(e);let t=s();return _(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return _(t.NextPage())})("previous",function(){g(e);let t=s();return _(t.PreviousPage())}),n()(),P()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Si(r,c){r&1&&(i(0,"div",37),S(1,"app-empty-state"),n())}var yt=(()=>{class r{constructor(e,a,t){this.http=e,this.localDataService=a,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()}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==D.GuidEMpty}Get(e){var a={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",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.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(a=>{this.paginationTotal=a.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 a=e.direction=="asc";this.data=this.data.sort((t,m)=>D.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(pe),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-shipped"]],standalone:!1,decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(11,gi,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(20,"div",7)(21,"label",11),l(22,"From/To"),n(),i(23,"div",12)(24,"datepicker",13),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(25,"div")(26,"datepicker",14),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,fi,20,4,"ng-container",18)(32,Si,2,0,"ng-template",null,0,H),n()()()()()}if(a&2){let m=j(33);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Y,X,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,R,V],encapsulation:2})}}return r})();var Ci=()=>["/menu/Order/detail"],yi=(r,c)=>({Number:r,Outlet:c});function bi(r,c){if(r&1&&(i(0,"span",19),S(1,"img",20),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function xi(r,c){if(r&1&&(i(0,"a",35),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,Ci))("queryParams",le(4,yi,e.Number,e.Outlet)),o(),h(e.Number)}}function vi(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.customerInfoUrl+e.ID,M),o(),h(e.Number)}}function Ti(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),u(4,xi,2,7,"a",32)(5,vi,2,2,"a",33),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),x(10,"number"),n(),i(11,"td"),l(12),x(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",34),n()()),r&2){let e=c.$implicit,a=s(2);o(2),h(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),h(e.Customer),o(2),h(O(10,7,e.Amount)),o(3),h(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function wi(r,c){if(r&1){let e=N();w(0),i(1,"div",21)(2,"table",22),v("matSortChange",function(t){g(e);let m=s();return _(m.onSort(t))}),i(3,"thead",23)(4,"tr",24)(5,"th",25),l(6,"Outlet"),n(),i(7,"th",26),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",27),l(12,"Amount"),n(),i(13,"th",28),l(14," Created On "),n(),i(15,"th",29),l(16,"Channel"),n()()(),i(17,"tbody"),u(18,Ti,16,12,"tr",30),n()(),i(19,"app-mat-paginator-no-count",31),v("total",function(){g(e);let t=s();return _(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return _(t.NextPage())})("previous",function(){g(e);let t=s();return _(t.PreviousPage())}),n()(),P()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Pi(r,c){r&1&&(i(0,"div",37),S(1,"app-empty-state"),n())}var bt=(()=>{class r{constructor(e,a){this.http=e,this.authService=a,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==D.GuidEMpty}getChannelLogo(e){return D.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 a={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 ",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.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(a=>{this.paginationTotal=a.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 a=e.direction=="asc";this.data=this.data.sort((t,m)=>D.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-delivered"]],standalone:!1,decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(11,bi,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(20,"div",7)(21,"label",11),l(22,"From/To"),n(),i(23,"div",12)(24,"datepicker",13),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(25,"div")(26,"datepicker",14),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,wi,20,4,"ng-container",18)(32,Pi,2,0,"ng-template",null,0,H),n()()()()()}if(a&2){let m=j(33);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Y,X,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,R,V],encapsulation:2})}}return r})();var Ei=()=>["/menu/Order/detail"],Ii=(r,c)=>({Number:r,Outlet:c});function Ni(r,c){if(r&1&&(i(0,"span",21),S(1,"img",22),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function Oi(r,c){if(r&1&&(i(0,"a",38),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,Ei))("queryParams",le(4,Ii,e.Number,e.Outlet)),o(),h(e.Number)}}function Di(r,c){if(r&1&&(i(0,"a",39),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,M),o(),h(e.Number)}}function Mi(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),u(4,Oi,2,7,"a",35)(5,Di,2,2,"a",36),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),x(10,"number"),n(),i(11,"td"),l(12),x(13,"date"),n(),i(14,"td"),l(15),n(),i(16,"td"),S(17,"app-channel-logo",37),n()()),r&2){let e=c.$implicit,a=s(2);o(2),h(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),h(e.Customer),o(2),h(O(10,8,e.Amount)),o(3),h(k(13,10,e.Created,"dd MMM yyyy HH:mm")),o(3),h(e.State),o(2),d("typeId",e.TypeID)}}function Li(r,c){if(r&1){let e=N();w(0),i(1,"div",23)(2,"table",24),v("matSortChange",function(t){g(e);let m=s();return _(m.onSort(t))}),i(3,"thead",25)(4,"tr",26)(5,"th",27),l(6,"Outlet"),n(),i(7,"th",28),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",29),l(12,"Amount"),n(),i(13,"th",30),l(14," Created On "),n(),i(15,"th",31),l(16,"Status"),n(),i(17,"th",32),l(18,"Channel"),n()()(),i(19,"tbody"),u(20,Mi,18,13,"tr",33),n()(),i(21,"app-mat-paginator-no-count",34),v("total",function(){g(e);let t=s();return _(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return _(t.NextPage())})("previous",function(){g(e);let t=s();return _(t.PreviousPage())}),n()(),P()}if(r&2){let e=s();o(20),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function ki(r,c){r&1&&(i(0,"div",40),S(1,"app-empty-state"),n())}var xt=(()=>{class r{constructor(e,a,t,m){this.http=e,this.localDataService=a,this.authService=t,this.dialog=m,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==D.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 a={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",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.Data],this.totaldata=this.data.length})}openExportDialog(){this.dialog.open(dt,{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(a=>{this.paginationTotal=a.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 a=e.direction=="asc";this.data=this.data.sort((t,m)=>D.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(pe),T(Q),T(Le))}}static{this.\u0275cmp=L({type:r,selectors:[["app-all-order"]],standalone:!1,decls:38,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","135px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()(),i(6,"button",4),v("click",function(){return g(m),_(t.openExportDialog())}),S(7,"i",5),i(8,"span"),l(9,"Export"),n()()(),i(10,"filters")(11,"div")(12,"label",6),l(13,"Channel"),n(),i(14,"ng-select",7),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(15,Ni,3,3,"ng-template",8),n()(),i(16,"div",9)(17,"label",10),l(18,"Page Number"),n(),i(19,"input",11),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(20,"div",9)(21,"label",10),l(22,"Page Size"),n(),i(23,"input",12),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(24,"div",9)(25,"label",13),l(26,"From/To"),n(),i(27,"div",14)(28,"datepicker",15),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(29,"div")(30,"datepicker",16),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(31,"content")(32,"div",17)(33,"div",18)(34,"div",19),u(35,Li,22,4,"ng-container",20)(36,ki,2,0,"ng-template",null,0,H),n()()()()()}if(a&2){let m=j(37);o(14),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Y,X,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,R,V],encapsulation:2})}}return r})();var Vi=()=>["/menu/Order/detail"],Ai=(r,c)=>({Number:r,Outlet:c});function Fi(r,c){if(r&1&&(i(0,"span",20),S(1,"img",21),n(),l(2)),r&2){let e=c.item;o(),d("src",e==null?null:e.Img,M)("alt",e.Name),o(),E(" ",e.Name," ")}}function Ri(r,c){if(r&1&&(i(0,"a",36),l(1),n()),r&2){let e=s().$implicit;d("routerLink",U(3,Vi))("queryParams",le(4,Ai,e.Number,e.Outlet)),o(),h(e.Number)}}function Wi(r,c){if(r&1&&(i(0,"a",37),l(1),n()),r&2){let e=s().$implicit,a=s(2);d("href",a.domain+e.ID,M),o(),h(e.Number)}}function Bi(r,c){if(r&1&&(i(0,"tr")(1,"td"),l(2),n(),i(3,"td"),u(4,Ri,2,7,"a",33)(5,Wi,2,2,"a",34),n(),i(6,"td"),l(7),n(),i(8,"td"),l(9),x(10,"number"),n(),i(11,"td"),l(12),x(13,"date"),n(),i(14,"td"),S(15,"app-channel-logo",35),n()()),r&2){let e=c.$implicit,a=s(2);o(2),h(e.Outlet),o(2),d("ngIf",a.hasGuidEmpty(e.ID)),o(),d("ngIf",!a.hasGuidEmpty(e.ID)),o(2),h(e.Customer),o(2),h(O(10,7,e.Amount)),o(3),h(k(13,9,e.Created,"dd MMM yyyy HH:mm")),o(3),d("typeId",e.TypeID)}}function zi(r,c){if(r&1){let e=N();w(0),i(1,"div",22)(2,"table",23),v("matSortChange",function(t){g(e);let m=s();return _(m.onSort(t))}),i(3,"thead",24)(4,"tr",25)(5,"th",26),l(6,"Outlet"),n(),i(7,"th",27),l(8,"Order number"),n(),i(9,"th"),l(10,"Customer"),n(),i(11,"th",28),l(12,"Amount"),n(),i(13,"th",29),l(14," Created On "),n(),i(15,"th",30),l(16,"Channel"),n()()(),i(17,"tbody"),u(18,Bi,16,12,"tr",31),n()(),i(19,"app-mat-paginator-no-count",32),v("total",function(){g(e);let t=s();return _(t.StoreRowsCountAPIResult())})("next",function(){g(e);let t=s();return _(t.NextPage())})("previous",function(){g(e);let t=s();return _(t.PreviousPage())}),n()(),P()}if(r&2){let e=s();o(18),d("ngForOf",e.data),o(),d("filter",e.filter)("totaldata",e.totaldata)("paginationTotal",e.paginationTotal)}}function Gi(r,c){r&1&&(i(0,"div",38),S(1,"app-empty-state"),n())}var vt=(()=>{class r{constructor(e,a,t){this.http=e,this.localDataService=a,this.authService=t,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==D.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 a={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 ",a).subscribe(t=>{this.data=t.Data,this.sourceData=[...t.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(a=>{this.paginationTotal=a.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}getChannelLogo(e){return D.getChannelLogoByTypeId(e)}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let a=e.direction=="asc";this.data=this.data.sort((t,m)=>D.compare(t.Created,m.Created,a))}}static{this.\u0275fac=function(a){return new(a||r)(T(W),T(pe),T(Q))}}static{this.\u0275cmp=L({type:r,selectors:[["app-cancelled"]],standalone:!1,decls:38,vars:11,consts:[["EMPTY_STATE",""],["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["href","https://ods.dealpos.app","target","_blank",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","Note",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,t){if(a&1){let m=N();i(0,"mainpanel",1),v("onSubmit",function(p){return g(m),_(t.Get(p))}),i(1,"actions")(2,"a",2),S(3,"i",3),i(4,"span"),l(5,"Visit our Fulfillment Display System"),n()()(),i(6,"filters")(7,"div")(8,"label",4),l(9,"Channel"),n(),i(10,"ng-select",5),b("ngModelChange",function(p){return g(m),y(t.filter.ListChannelID,p)||(t.filter.ListChannelID=p),_(p)}),u(11,Fi,3,3,"ng-template",6),n()(),i(12,"div",7)(13,"label",8),l(14,"Page Number"),n(),i(15,"input",9),b("ngModelChange",function(p){return g(m),y(t.filter.PageNumber,p)||(t.filter.PageNumber=p),_(p)}),n()(),i(16,"div",7)(17,"label",8),l(18,"Page Size"),n(),i(19,"input",10),b("ngModelChange",function(p){return g(m),y(t.filter.PageSize,p)||(t.filter.PageSize=p),_(p)}),n()(),i(20,"div",7)(21,"label",8),l(22,"Note"),n(),i(23,"input",11),b("ngModelChange",function(p){return g(m),y(t.filter.Note,p)||(t.filter.Note=p),_(p)}),n()(),i(24,"div",7)(25,"label",12),l(26,"From/To"),n(),i(27,"div",13)(28,"datepicker",14),b("dateChange",function(p){return g(m),y(t.filter.From,p)||(t.filter.From=p),_(p)}),n()(),i(29,"div")(30,"datepicker",15),b("dateChange",function(p){return g(m),y(t.filter.To,p)||(t.filter.To=p),_(p)}),n()()()(),i(31,"content")(32,"div",16)(33,"div",17)(34,"div",18),u(35,zi,20,4,"ng-container",19)(36,Gi,2,0,"ng-template",null,0,H),n()()()()()}if(a&2){let m=j(37);o(10),d("clearable",!0)("multiple",!0)("items",t.channelOptions),C("ngModel",t.filter.ListChannelID),o(5),C("ngModel",t.filter.PageNumber),o(4),C("ngModel",t.filter.PageSize),o(4),C("ngModel",t.filter.Note),o(5),C("date",t.filter.From),o(2),C("date",t.filter.To),o(5),d("ngIf",t.data&&t.data.length>0)("ngIfElse",m)}},dependencies:[A,F,Y,X,J,K,B,q,ee,Z,$,z,ne,re,te,ie,G,R,V],encapsulation:2})}}return r})();var ji=[{path:"",component:ht,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:ut,canActivate:[ae],data:{title:"New Order"}},{path:"detail",component:ft,canActivate:[ae],data:{title:"Orders detail"}},{path:"ready_to_ship",component:Ct,canActivate:[ae],data:{title:"Ready To Ship"}},{path:"Shipped",component:yt,canActivate:[ae],data:{title:"Shipped"}},{path:"Delivered",component:bt,canActivate:[ae],data:{title:"Delivered"}},{path:"All",component:xt,canActivate:[ae],data:{title:"All Order"}},{path:"Cancelled",component:vt,canActivate:[ae],data:{title:"Cancelled"}},{path:"Download",loadComponent(){return import("./chunk-STPUGFHI.js").then(r=>r.DownloadV2Component)},canActivate:[ae],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-LYBSI3ZX.js").then(r=>r.DownloadOrderLogComponent),canActivate:[ae],data:{title:"Download Order Log"}},{path:"Download_Order_Log/Detail",loadComponent:()=>import("./chunk-UBXKO4QI.js").then(r=>r.DownloadOrderDetailComponent),canActivate:[ae],data:{title:"Download Order Log Detail"}}]}],Tt=(()=>{class r{static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275mod=Ne({type:r})}static{this.\u0275inj=Ie({imports:[ce,De.forChild(ji)]})}}return r})();var Dr=(()=>{class r{static{this.\u0275fac=function(a){return new(a||r)}}static{this.\u0275mod=Ne({type:r})}static{this.\u0275inj=Ie({providers:[ke,Ae,Ve],imports:[ce,Je,Tt,it,nt,st,De,Ze,mt,lt,z,ct,et,at,gt,$e,pt,rt,G,Re,_t,ot,Qe]})}}return r})();export{Dr as OrdersModule};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as P,b as L,e as U,g as S,h as g,j as f,m as k}from"./chunk-
|
|
1
|
+
import{a as P,b as L,e as U,g as S,h as g,j as f,m as k}from"./chunk-EQIFZBRG.js";import{Ea as O,Gb as N,Ib as F,La as w,Pa as A,Xa as M,_b as C,ma as y,pa as p}from"./chunk-B7KTCPKC.js";import{a}from"./chunk-66YHNWRR.js";var l=function(s){return s[s.FADING_IN=0]="FADING_IN",s[s.VISIBLE=1]="VISIBLE",s[s.FADING_OUT=2]="FADING_OUT",s[s.HIDDEN=3]="HIDDEN",s}(l||{}),v=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=l.HIDDEN;constructor(t,e,i,n=!1){this._renderer=t,this.element=e,this.config=i,this._animationForciblyDisabledThroughCss=n}fadeOut(){this._renderer.fadeOutRipple(this)}},H=g({passive:!0,capture:!0}),E=class{_events=new Map;addHandler(t,e,i,n){let r=this._events.get(e);if(r){let d=r.get(i);d?d.add(n):r.set(i,new Set([n]))}else this._events.set(e,new Map([[i,new Set([n])]])),t.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,H)})}removeHandler(t,e,i){let n=this._events.get(t);if(!n)return;let r=n.get(e);r&&(r.delete(i),r.size===0&&n.delete(e),n.size===0&&(this._events.delete(t),document.removeEventListener(t,this._delegateEventHandler,H)))}_delegateEventHandler=t=>{let e=U(t);e&&this._events.get(t.type)?.forEach((i,n)=>{(n===e||n.contains(e))&&i.forEach(r=>r.handleEvent(t))})}},x={enterDuration:225,exitDuration:150},Y=800,G=g({passive:!0,capture:!0}),B=["mousedown","touchstart"],z=["mouseup","mouseleave","touchend","touchcancel"],j=(()=>{class s{static \u0275fac=function(i){return new(i||s)};static \u0275cmp=N({type:s,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(i,n){},styles:[`.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale3d(0, 0, 0);background-color:var(--mat-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface) 10%, transparent))}@media(forced-colors: active){.mat-ripple-element{display:none}}.cdk-drag-preview .mat-ripple-element,.cdk-drag-placeholder .mat-ripple-element{display:none}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return s})(),T=class s{_target;_ngZone;_platform;_containerElement;_triggerElement;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect;static _eventManager=new E;constructor(t,e,i,n,r){this._target=t,this._ngZone=e,this._platform=n,n.isBrowser&&(this._containerElement=f(i)),r&&r.get(k).load(j)}fadeInRipple(t,e,i={}){let n=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),r=a(a({},x),i.animation);i.centered&&(t=n.left+n.width/2,e=n.top+n.height/2);let d=i.radius||X(t,e,n),Z=t-n.left,V=e-n.top,h=r.enterDuration,o=document.createElement("div");o.classList.add("mat-ripple-element"),o.style.left=`${Z-d}px`,o.style.top=`${V-d}px`,o.style.height=`${d*2}px`,o.style.width=`${d*2}px`,i.color!=null&&(o.style.backgroundColor=i.color),o.style.transitionDuration=`${h}ms`,this._containerElement.appendChild(o);let b=window.getComputedStyle(o),$=b.transitionProperty,D=b.transitionDuration,m=$==="none"||D==="0s"||D==="0s, 0s"||n.width===0&&n.height===0,c=new v(this,o,i,m);o.style.transform="scale3d(1, 1, 1)",c.state=l.FADING_IN,i.persistent||(this._mostRecentTransientRipple=c);let u=null;return!m&&(h||r.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let R=()=>{u&&(u.fallbackTimer=null),clearTimeout(I),this._finishRippleTransition(c)},_=()=>this._destroyRipple(c),I=setTimeout(_,h+100);o.addEventListener("transitionend",R),o.addEventListener("transitioncancel",_),u={onTransitionEnd:R,onTransitionCancel:_,fallbackTimer:I}}),this._activeRipples.set(c,u),(m||!h)&&this._finishRippleTransition(c),c}fadeOutRipple(t){if(t.state===l.FADING_OUT||t.state===l.HIDDEN)return;let e=t.element,i=a(a({},x),t.config.animation);e.style.transitionDuration=`${i.exitDuration}ms`,e.style.opacity="0",t.state=l.FADING_OUT,(t._animationForciblyDisabledThroughCss||!i.exitDuration)&&this._finishRippleTransition(t)}fadeOutAll(){this._getActiveRipples().forEach(t=>t.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(t=>{t.config.persistent||t.fadeOut()})}setupTriggerEvents(t){let e=f(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,B.forEach(i=>{s._eventManager.addHandler(this._ngZone,i,e,this)}))}handleEvent(t){t.type==="mousedown"?this._onMousedown(t):t.type==="touchstart"?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{z.forEach(e=>{this._triggerElement.addEventListener(e,this,G)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(t){t.state===l.FADING_IN?this._startFadeOutTransition(t):t.state===l.FADING_OUT&&this._destroyRipple(t)}_startFadeOutTransition(t){let e=t===this._mostRecentTransientRipple,{persistent:i}=t.config;t.state=l.VISIBLE,!i&&(!e||!this._isPointerDown)&&t.fadeOut()}_destroyRipple(t){let e=this._activeRipples.get(t)??null;this._activeRipples.delete(t),this._activeRipples.size||(this._containerRect=null),t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),t.state=l.HIDDEN,e!==null&&(t.element.removeEventListener("transitionend",e.onTransitionEnd),t.element.removeEventListener("transitioncancel",e.onTransitionCancel),e.fallbackTimer!==null&&clearTimeout(e.fallbackTimer)),t.element.remove()}_onMousedown(t){let e=P(t),i=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+Y;!this._target.rippleDisabled&&!e&&!i&&(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}_onTouchStart(t){if(!this._target.rippleDisabled&&!L(t)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;let e=t.changedTouches;if(e)for(let i=0;i<e.length;i++)this.fadeInRipple(e[i].clientX,e[i].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._getActiveRipples().forEach(t=>{let e=t.state===l.VISIBLE||t.config.terminateOnPointerUp&&t.state===l.FADING_IN;!t.config.persistent&&e&&t.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let t=this._triggerElement;t&&(B.forEach(e=>s._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&(z.forEach(e=>t.removeEventListener(e,this,G)),this._pointerUpEventsRegistered=!1))}};function X(s,t,e){let i=Math.max(Math.abs(s-e.left),Math.abs(s-e.right)),n=Math.max(Math.abs(t-e.top),Math.abs(t-e.bottom));return Math.sqrt(i*i+n*n)}var q=new y("mat-ripple-global-options"),at=(()=>{class s{_elementRef=p(A);_animationMode=p(M,{optional:!0});color;unbounded;centered;radius=0;animation;get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}_disabled=!1;get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}_trigger;_rippleRenderer;_globalOptions;_isInitialized=!1;constructor(){let e=p(w),i=p(S),n=p(q,{optional:!0}),r=p(O);this._globalOptions=n||{},this._rippleRenderer=new T(this,e,this._elementRef,i,r)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:a(a(a({},this._globalOptions.animation),this._animationMode==="NoopAnimations"?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,i=0,n){return typeof e=="number"?this._rippleRenderer.fadeInRipple(e,i,a(a({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,a(a({},this.rippleConfig),e))}static \u0275fac=function(i){return new(i||s)};static \u0275dir=F({type:s,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(i,n){i&2&&C("mat-ripple-unbounded",n.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"]})}return s})();export{x as a,T as b,q as c,at as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as E}from"./chunk-35XX6SQT.js";import{a as T}from"./chunk-TPW56VWM.js";import{h as w}from"./chunk-WY4BY2ID.js";import{a as D}from"./chunk-GRIUDEPO.js";import{b as j,e as s}from"./chunk-JXSBFTQM.js";import{b as i,c as m}from"./chunk-PW42BQIY.js";import{G as C}from"./chunk-M2FCTYGU.js";import{B as A,G as U,J as u,Ra as I,g as k,ja as p,pa as a,q as d,v as b}from"./chunk-B7KTCPKC.js";var F=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/shopee/GetAttributesTree",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/shopee/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){return t.map(e=>({attribute_id:e.attribute_id,attribute_value_list:e.attribute_value_list.map(o=>({value_id:o.value_id,name:o.name}))})),t}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var x=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tiktok/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){let e;return t.map(o=>(o.type=="PRODUCT_PROPERTY"?e={id:o.id,name:o.name,type:o.type,values:o.values}:e={id:o.id,name:o.values[0].id,type:o.type},e))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var H=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/lazada/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/lazada/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var z=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/woo/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/woo/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var g=class{};var v=class{};var R=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tokopedia/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var G=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post("api/product/shopify/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var O=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post(D.UploadPlugoProduct,t).pipe(u(e=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Vt=(()=>{class r{constructor(){this.authService=a(w),this.productService=a(T),this.shoppeUploadService=a(F),this.tiktokUploadService=a(x),this.lazadaUploadService=a(H),this.tokopediaUploadService=a(R),this.wooUploadService=a(z),this.shopifyUploadService=a(G),this.plugoUploadService=a(O),this.toastrHandlingService=a(E),this.toastr=a(j),this.router=a(C),this.httpService=a(s),this._selectedProduct=new k(this.getStoredProducts()),this.selectedProduct$=this._selectedProduct.asObservable().pipe(U(t=>t&&t.length>0))}getStoredProducts(){let t=localStorage.getItem("productsUpload");if(t){let e=JSON.parse(t);return e&&e.length>0?e:[]}else return[]}setSelectedProduct(t){localStorage.setItem("productsUpload",JSON.stringify(t)),this._selectedProduct.next(t)}clearSelectedProduct(){localStorage.removeItem("productsUpload"),this._selectedProduct.next([])}getUnselectedChannels(){let t=this.authService.getChannels(),e=this._selectedProduct.getValue();return this.productService.filterUnselectedChannel(e,t)}getDefaultCategory(){return this.httpService.get("api/v1/Channel/ProductCategory/Default")}get channelProductUpload(){let t=this.getUnselectedChannels();return I(t.map(o=>{let c=new g;return c.id=o.ID,c.name=o.Name,c.type=o.TypeID,c.categoryId=null,c.attributes=[],c.selected=!1,c}))}onUploadProduct(t){let e=t.filter(o=>o.selected&&m.IsNotEmpty(o.categoryId)||o.selected&&(o.type==i.Shopify||o.type==i.Plugo));if(e.length>0){let o=this.generateDataForUpload(e);this.uploadProduct(o)}else this.toastr.warning("Please select a channel and category to upload the product.","Warning!")}uploadProduct(t){let e=this.generateObservableForUpload(t);A(e).pipe(b(o=>{let c=[];return o.forEach(f=>{c=[...c,...f]}),c})).subscribe({next:(o=[])=>{m.IsNotEmpty(o)&&this.toastrHandlingService.showToastrUploadMultiple(o),this.hasSuccessRes(o)&&this.onSuccessUpload()}})}hasSuccessRes(t){let e=!1;return t.forEach(o=>{o?.Response.Success_list?.length>0&&m.IsNotEmpty(o)&&(e=!0)}),e}onSuccessUpload(){this.router.navigate(["/menu/products/status/sold-in-channel"]),this.clearSelectedProduct()}generateObservableForUpload(t){let e=[],o=[],c=[],f=[],S=[],y=[],P=[];t.forEach(l=>{switch(l.ChannelType){case i.Shopee:o.push(l);break;case i.Tiktok:e.push(l);break;case i.Lazada:c.push(l);break;case i.Tokopedia:f.push(l);break;case i.WooCommerce:S.push(l);break;case i.Shopify:y.push(l);break;case i.Plugo:P.push(l);break}});let n=[];return[{type:i.Shopee,data:o},{type:i.Tiktok,data:e},{type:i.Lazada,data:c},{type:i.Tokopedia,data:f},{type:i.WooCommerce,data:S},{type:i.Shopify,data:y},{type:i.Plugo,data:P}].filter(l=>l.data.length>0).forEach(l=>{switch(l.type){case i.Shopee:n.push(this.shoppeUploadService.uploadProduct(o));break;case i.Tiktok:n.push(this.tiktokUploadService.uploadProduct(e));break;case i.Lazada:n.push(this.lazadaUploadService.uploadProduct(c));break;case i.Tokopedia:n.push(this.tokopediaUploadService.uploadProduct(f));break;case i.WooCommerce:n.push(this.wooUploadService.uploadProduct(S));break;case i.Shopify:n.push(this.shopifyUploadService.uploadProduct(y));break;case i.Plugo:n.push(this.plugoUploadService.uploadProduct(P));break}}),n}generateDataForUpload(t){let e=[];return t.forEach(o=>{let c=new v;c.ChannelID=o.id,c.ChannelType=o.type,c.Products=this._selectedProduct.getValue(),o.type==i.Shopify?delete c.CategoryID:c.CategoryID=o.categoryId,o.type==i.WooCommerce||o.type==i.Shopify?c.Attribute=o.attributes[0]:c.Attributes=this.formatAttributes(o.type,o.attributes),e.push(c)}),e}formatAttributes(t,e){let o;switch(t){case i.Shopee:o=this.shoppeUploadService.generateAttribute(e);break;case i.Tiktok:o=this.tiktokUploadService.generateAttribute(e);break;case i.WooCommerce:o=this.tiktokUploadService.generateAttribute(e);break;case i.Tokopedia:o=e;break;case i.Shopify:o=e;break;default:o=[];break}return o}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{F as a,x as b,H as c,z as d,Vt as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as C}from"./chunk-X67M7TFE.js";import{a as X,b as Y,c as Z}from"./chunk-K5GEJ2GZ.js";import"./chunk-3LRWABHB.js";import"./chunk-GIRXMYNI.js";import"./chunk-5OHRA4AS.js";import"./chunk-MH4SJTQX.js";import"./chunk-CMTBBXR5.js";import"./chunk-GRIUDEPO.js";import{b as $}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as Q,n as U}from"./chunk-UGVEAL7H.js";import{A as K,h as G,m as H}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as q,s as J}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{G as W,H as I,J as j,d as D,j as O,n as N}from"./chunk-M2FCTYGU.js";import{$c as P,Gb as _,Gc as m,Ic as T,Kc as A,Lc as R,Mb as M,Mc as L,Nc as E,Oc as V,Pc as u,Qc as k,Sc as z,Yb as l,Z as S,ad as B,dc as y,ec as x,gc as F,hc as b,ic as i,jc as n,oc as f,pa as p,rb as s,tc as w,uc as g,ya as d,za as c}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var ee=t=>({empty:t});function te(t,h){if(t&1&&(i(0,"mat-radio-button",14),m(1),n()),t&2){let e=h.$implicit;l("value",e.Key)("matTooltip",e.Value==="Legacy"?"Authentication and role assignments are inherited from POS":"Authentication and role assignments are managed directly from Omni.dealpos.app"),s(),T(" ",e.Value," ")}}function oe(t,h){if(t&1){let e=f();i(0,"div",10)(1,"label",11),m(2," Authorization Mode "),n(),i(3,"div",12)(4,"mat-radio-group",13),L("ngModelChange",function(r){d(e),g();let a=u(0);return R(a.Form.AuthorizationMode,r)||(a.Form.AuthorizationMode=r),c(r)}),F(5,te,2,3,"mat-radio-button",14,x),n()()()}if(t&2){g();let e=u(0);l("ngClass",z(2,ee,e==null||e.Form==null?null:e.Form.AuthorizationMode)),s(4),A("ngModel",e.Form.AuthorizationMode),s(),b(e.Options.AuthorizationMode)}}var xe=(()=>{class t{constructor(){this.setupService=p(C),this.toastr=p($),this.route=p(W),this.setupData$=this.setupService.getConfig().pipe(S(1))}onSaveConfig(e){this.setupService.saveConfig(e).subscribe({next:o=>{console.log("Configuration saved successfully",o),this.toastr.success("Configuration saved successfully","Success"),this.route.navigate(["/menu/users/setup"])}})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=_({type:t,selectors:[["app-setup-form"]],features:[k([C])],decls:17,vars:6,consts:[["headerTitle","Setup Form",3,"hideSearchBox","hideSearchDropdown"],["routerLink","/menu/users/setup",1,"btn","btn-secondary","me-3"],[1,"btn","btn-success",3,"click"],[1,"container-fluid","py-5"],[1,"row","mt-4"],[1,"col-12"],[1,"card"],[1,"card-body","mt-8"],[1,"row"],[1,"col-6"],[1,"form-label-group","radio",3,"ngClass"],[2,"top","-11px","background","white"],[1,"mt-3"],["name","AuthorizationMode",3,"ngModelChange","ngModel"],["matTooltipPosition","above",1,"me-5",3,"value","matTooltip"]],template:function(o,r){if(o&1){let a=f();E(0),P(1,"async"),i(2,"mainpanel",0)(3,"actions")(4,"a",1),m(5," Cancel "),n(),i(6,"button",2),w("click",function(){d(a);let v=u(0);return c(r.onSaveConfig(v==null?null:v.Form))}),m(7," Save "),n()(),i(8,"content")(9,"div",3)(10,"div",4)(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"div",9),M(16,oe,7,4,"div",10),n()()()()()()()()()}if(o&2){let a=V(B(1,3,r.setupData$));s(2),l("hideSearchBox",!0)("hideSearchDropdown",!0),s(14),y(a?16:-1)}},dependencies:[N,D,O,U,Q,J,q,j,I,Z,X,Y,K,G,H],encapsulation:2})}}return t})();export{xe as SetupFormComponent};
|