marketplacepos 26.22.1 → 26.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-RJUIY3OK.js → chunk-23HWD4JE.js} +1 -1
- package/Marketplace/{chunk-M3CHYGT3.js → chunk-5QZ2S4KG.js} +1 -1
- package/Marketplace/{chunk-TLUQ2PZZ.js → chunk-6KYFNR5Q.js} +1 -1
- package/Marketplace/{chunk-G2OFO4CK.js → chunk-6XR4ABWU.js} +1 -1
- package/Marketplace/{chunk-TSRBKKHH.js → chunk-7PDIPKGZ.js} +1 -1
- package/Marketplace/{chunk-XQJASAXB.js → chunk-7RHXH7N6.js} +1 -1
- package/Marketplace/{chunk-7BKOVVHP.js → chunk-AYZA4YXT.js} +1 -1
- package/Marketplace/{chunk-NS3MK77F.js → chunk-B5LFTMZP.js} +1 -1
- package/Marketplace/{chunk-SQ2CHM4O.js → chunk-B72J742I.js} +1 -1
- package/Marketplace/{chunk-5JH3WWNT.js → chunk-BGNYU4YD.js} +1 -1
- package/Marketplace/{chunk-B4YMOSMT.js → chunk-C35CVP56.js} +1 -1
- package/Marketplace/{chunk-NF2YVEGJ.js → chunk-CAEGYKR3.js} +1 -1
- package/Marketplace/{chunk-PLA2PFMH.js → chunk-CBRWXNNC.js} +1 -1
- package/Marketplace/{chunk-BNO4ABZV.js → chunk-D3DNUDW5.js} +1 -1
- package/Marketplace/{chunk-LFUTTBNY.js → chunk-D42XSNML.js} +1 -1
- package/Marketplace/{chunk-EA5Y3EBM.js → chunk-DEOUMTGT.js} +1 -1
- package/Marketplace/{chunk-AMXOODMD.js → chunk-EEQS7NYO.js} +1 -1
- package/Marketplace/{chunk-NM5EUAHO.js → chunk-F2BWTKMG.js} +1 -1
- package/Marketplace/{chunk-HXSKWZXB.js → chunk-FWOQR2PC.js} +1 -1
- package/Marketplace/{chunk-GTIJRYKH.js → chunk-GXX5DMWY.js} +1 -1
- package/Marketplace/{chunk-POY7HZKL.js → chunk-HT44Y6CW.js} +1 -1
- package/Marketplace/{chunk-RCBBQWSM.js → chunk-I7YLXAUU.js} +1 -1
- package/Marketplace/{chunk-3GSVXRBG.js → chunk-IHYU4MYG.js} +1 -1
- package/Marketplace/{chunk-RQFUQIZC.js → chunk-IZTJXF4A.js} +1 -1
- package/Marketplace/{chunk-P44G63CM.js → chunk-J24BC42H.js} +1 -1
- package/Marketplace/{chunk-QWEHZMCI.js → chunk-JNJAWXGM.js} +1 -1
- package/Marketplace/{chunk-3KUW43ZX.js → chunk-K37MPW7V.js} +1 -1
- package/Marketplace/{chunk-I37SU7ES.js → chunk-L7G6YLH5.js} +1 -1
- package/Marketplace/{chunk-VGQHO3VI.js → chunk-LLQUSFIS.js} +1 -1
- package/Marketplace/{chunk-3J7JIJUQ.js → chunk-LOUVI6SK.js} +1 -1
- package/Marketplace/{chunk-T4QOCA2D.js → chunk-LPXYN5WE.js} +1 -1
- package/Marketplace/{chunk-5CL57SA6.js → chunk-MBDMLATW.js} +1 -1
- package/Marketplace/{chunk-PMN633XT.js → chunk-PCYBIBY2.js} +1 -1
- package/Marketplace/{chunk-BXHOHRRA.js → chunk-PE33HSHT.js} +1 -1
- package/Marketplace/{chunk-QNPKVPDG.js → chunk-PVCLADY2.js} +1 -1
- package/Marketplace/{chunk-7T332QJG.js → chunk-QCYVPHJM.js} +1 -1
- package/Marketplace/{chunk-BL3IBVPU.js → chunk-QFPDAQEF.js} +1 -1
- package/Marketplace/{chunk-3BREDCKV.js → chunk-R3JA6PGW.js} +1 -1
- package/Marketplace/{chunk-55QWQP5X.js → chunk-RTT2DSFI.js} +1 -1
- package/Marketplace/{chunk-N4CCGL4X.js → chunk-RVBKC5OL.js} +1 -1
- package/Marketplace/{chunk-ZL7W57ZN.js → chunk-SCITEEZO.js} +1 -1
- package/Marketplace/{chunk-UP43N4BA.js → chunk-SIXBTRFW.js} +1 -1
- package/Marketplace/{chunk-CM6TTBXY.js → chunk-SS25UDWI.js} +1 -1
- package/Marketplace/{chunk-QCDMADBI.js → chunk-T6CJ6PPU.js} +1 -1
- package/Marketplace/{chunk-NBY7NPTT.js → chunk-TB75CUCY.js} +1 -1
- package/Marketplace/{chunk-LVR4OS4B.js → chunk-TIEUYSXG.js} +1 -1
- package/Marketplace/{chunk-JCEQO5MQ.js → chunk-TSU25RH4.js} +1 -1
- package/Marketplace/{chunk-YORF6A5L.js → chunk-TWTCFWHB.js} +1 -1
- package/Marketplace/{chunk-FFQMVXOJ.js → chunk-VBGWPF63.js} +1 -1
- package/Marketplace/{chunk-IK4YSHRZ.js → chunk-VBIOPCEU.js} +1 -1
- package/Marketplace/{chunk-GQRBV5VY.js → chunk-VX4XXFQ3.js} +1 -1
- package/Marketplace/{chunk-ZTWCZPYL.js → chunk-VZMV27MV.js} +1 -1
- package/Marketplace/{chunk-XHR66HQG.js → chunk-VZN4OY5Z.js} +1 -1
- package/Marketplace/{chunk-AMTZAWOB.js → chunk-WHR2OWNK.js} +2 -2
- package/Marketplace/{chunk-VYT5DCV2.js → chunk-XDJI2WX5.js} +1 -1
- package/Marketplace/{chunk-PA6SG4LZ.js → chunk-YDFYFUR3.js} +1 -1
- package/Marketplace/{chunk-NCKMPECJ.js → chunk-YE6Y3WRI.js} +1 -1
- package/Marketplace/{chunk-Q2XY5N3O.js → chunk-YN2RMQNA.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-64N5H5LM.js → main-6DORO3HC.js} +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ne,b as Fe}from"./chunk-NDOVDHNA.js";import{a as Pe,b as De,c as Ae}from"./chunk-CKU644YK.js";import{a as Ve}from"./chunk-Q2XY5N3O.js";import{a as B}from"./chunk-URNP457I.js";import{a as Ee}from"./chunk-4MYXPN55.js";import{a as Me,b as Le}from"./chunk-ES53NVZX.js";import"./chunk-LCIOJHJ4.js";import"./chunk-FDYHLFQ3.js";import{a as Te}from"./chunk-7T332QJG.js";import"./chunk-GK6WYUPQ.js";import"./chunk-WXZ5XRM6.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import{a as ke}from"./chunk-ZA4X34GE.js";import"./chunk-IFFI5CMD.js";import{a as ye}from"./chunk-OJ4GCASY.js";import"./chunk-RVHJIVQ5.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import"./chunk-TRTDBHQI.js";import{b as xe}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import{a as _e,c as be,e as Se,f as we,g as ve}from"./chunk-M65GNQVQ.js";import{a as Ce}from"./chunk-MWUZF6ZW.js";import"./chunk-GF2RVIIT.js";import"./chunk-ITKXL7DT.js";import"./chunk-4AL6NJY5.js";import"./chunk-YOYMZEPB.js";import"./chunk-56UGSRXX.js";import"./chunk-UB22GZAR.js";import"./chunk-F7RHG53H.js";import"./chunk-X22WXNSF.js";import"./chunk-P6EDV7BS.js";import"./chunk-TVKTNDDY.js";import"./chunk-DGB7L5EQ.js";import"./chunk-7YP3O2JY.js";import"./chunk-BKB3Y5UC.js";import"./chunk-TPJEJZPT.js";import"./chunk-ISRTMJUH.js";import"./chunk-2VWSIT3Y.js";import"./chunk-2PONPJQD.js";import{b as fe}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import"./chunk-GQRBV5VY.js";import"./chunk-CXGF2BT5.js";import"./chunk-QXRG5XYP.js";import{a as S}from"./chunk-FDTKJPLI.js";import"./chunk-I4MUFYEG.js";import{b as c,c as E}from"./chunk-NNVT5X6O.js";import{A as z,b as ue,c as he,h as W,m as R,o as ge}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{b as M,e as O}from"./chunk-M5YUVUTR.js";import"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{B as me,D as de,z as ce}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{$c as ae,Dc as ee,E as K,Eb as N,Ec as te,Fc as ie,Ga as L,Nc as ne,Oc as s,Pc as P,Qc as D,Sc as w,Tc as v,Uc as x,V as G,Vc as oe,Wc as re,Xc as F,Y as J,bc as y,bd as le,dc as k,ec as Y,gc as Z,hc as $,ia as V,ic as _,jc as n,kb as X,kc as r,kd as A,lc as f,ld as I,mb as p,md as pe,na as g,sc as T,sd as se,t as q,ua as d,va as u,xc as C,zc as h}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{a as U,b as Q}from"./chunk-66YHNWRR.js";var Ie=(()=>{class o{constructor(){this.http=g(O),this.toastr=g(M)}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(S.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(S.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(S.ShopeePrintShippingLabel,i).pipe(q(a=>(a&&(a.Number=e),a)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(S.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case c.Tokopedia:let m=window.open("about:blank","_blank");m.document.write(e.File),m.document.close();break;case c.Tiktok:e.data!=null?window.open(e.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print");break;case c.Shopee:var i=Uint8Array.from(atob(e.File),l=>l.charCodeAt(0)),a=new Blob([i],{type:"octet/stream"});E.openDownloadFile(a,`${e?.Number}.pdf`);break;case c.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=V({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var Oe=(()=>{class o{constructor(){this.dialogRef=g(_e),this.tandaiSudahDicetak=L(!1)}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak()?1:0)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=N({type:o,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(n(0,"div",0)(1,"h2",1),s(2,"Cetak label pesanan"),r(),n(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),s(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),n(8,"div",5)(9,"mat-checkbox",6),C("ngModelChange",function(m){return i.tandaiSudahDicetak.set(m)}),r(),n(10,"span",7),s(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),n(12,"mat-dialog-actions",8)(13,"button",9),C("click",function(){return i.onCancel()}),s(14,"Cancel"),r(),n(15,"button",10),C("click",function(){return i.onPrint()}),s(16,"Cetak Pesanan"),r()()()),t&2&&(p(9),_("ngModel",i.tandaiSudahDicetak()))},dependencies:[z,W,R,ve,we,Se,Le,Me],encapsulation:2,changeDetection:0})}}return o})();var H=(()=>{class o{constructor(){this.httpService=g(O),this.shippingLabelService=g(Ie),this.toastrService=g(M),this.dialog=g(be)}printShippingLabel(e){switch(e?.MarketType){case c.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Shopee));break;case c.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Tiktok));break;case c.Tokopedia:this.dialog.open(Oe).afterClosed().pipe(K(t=>E.IsNotEmpty(t)),J(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Tokopedia));break;case c.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Lazada));break;case c.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(a=>({OrderNumber:a.Number,ShopID:a.ShopID})),i="";switch(e[0]?.MarketType){case c.Shopee:i=S.ShopeePrintMultipleShippingLabel;break;case c.Tiktok:i=S.TiktokPrintMultipleShippingLabel;break;case c.Lazada:i=S.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(a=>{var m=Uint8Array.from(atob(a.File),We=>We.charCodeAt(0)),l=new Blob([m],{type:"octet/stream"});E.openDownloadFile(l,`${a?.Name}.pdf`)})}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=V({token:o,factory:o.\u0275fac})}}return o})();var ze=["contextMenu"],Be=o=>({"td-cell-hover":o});function je(o,b){if(o&1){let e=T();n(0,"button",20),C("click",function(){d(e);let i=h(),a=F(0);return u(i.onDowloadShippingLabel(a))}),f(1,"i",21),n(2,"span"),s(3,"Download Shipping Label"),r()()}}function He(o,b){if(o&1){let e=T();n(0,"input",47),x("ngModelChange",function(i){d(e);let a=h().$implicit;return v(a.selected,i)||(a.selected=i),u(i)}),C("ngModelChange",function(){d(e);let i=h(3),a=F(0);return u(i.onSelectOrders(a))}),r()}if(o&2){let e=h().$implicit,t=h(2);w("ngModel",e.selected),_("disabled",t.selectedChannelType()!=null&&t.selectedChannelType()!=e.MarketType)}}function Ue(o,b){if(o&1&&f(0,"variants-dropdown",39),o&2){let e=h().$implicit;_("variants",e==null?null:e.Variants)}}function Qe(o,b){if(o&1&&f(0,"variant-with-image",40),o&2){let e=h().$implicit;_("variant",e==null?null:e.Variants[0])}}function qe(o,b){if(o&1&&(n(0,"span"),s(1),r()),o&2){let e=h().$implicit;p(),D("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Ke(o,b){if(o&1){let e=T();n(0,"button",48),C("click",function(){d(e);let i=h().$implicit,a=h(2);return u(a.onPrintShippingLabel(i))}),f(1,"i",49),r()}}function Ge(o,b){if(o&1){let e=T();n(0,"tr")(1,"td"),y(2,He,1,2,"input",31),r(),n(3,"td")(4,"div",32),f(5,"img",33),A(6,"channelImage"),n(7,"div",34)(8,"div"),s(9),r(),n(10,"small",35)(11,"span"),s(12),r()()()()(),n(13,"td")(14,"div",36)(15,"div"),f(16,"order-link",37),r(),n(17,"small"),s(18),A(19,"date"),r(),f(20,"br"),n(21,"small"),f(22,"i",38),s(23),r()()(),n(24,"td"),y(25,Ue,1,1,"variants-dropdown",39)(26,Qe,1,1,"variant-with-image",40),r(),n(27,"td",41),s(28),A(29,"number"),r(),n(30,"td",42),C("mouseenter",function(i){let a=d(e).$implicit,m=h(2);return u(m.onMouseEnter(i,a))}),n(31,"div",43)(32,"div",36)(33,"div",44)(34,"span"),s(35),r(),y(36,qe,2,1,"span"),r(),n(37,"small"),s(38),r()()()(),n(39,"td",45),y(40,Ke,2,0,"button",46),r()()}if(o&2){let e=b.$implicit,t=h(2);p(2),k((e==null?null:e.MarketType)!=t.channelType.WooCommerce?2:-1),p(3),_("src",I(6,16,e==null?null:e.MarketType),X)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),p(4),P(e.Outlet),p(3),P(e.ChannelName),p(4),_("order",e),p(2),D(" ",pe(19,18,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),p(5),D(" ",e.Customer," "),p(),ne(le(23,Be,(e.Variants==null?null:e.Variants.length)>1)),p(),k((e.Variants==null?null:e.Variants.length)>1?25:26),p(3),P(I(29,21,e.Amount)),p(7),P(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),p(),k(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?36:-1),p(2),D(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),p(2),k((e==null?null:e.MarketType)!=t.channelType.WooCommerce?40:-1)}}function Je(o,b){if(o&1){let e=T();n(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),f(4,"th",25),n(5,"th",26),s(6,"Outlet"),r(),n(7,"th",26),s(8,"Number"),r(),n(9,"th"),s(10,"Items"),r(),n(11,"th",27),s(12,"Amount"),r(),n(13,"th",28),s(14,"Shipping"),r(),f(15,"th",29),r()(),n(16,"tbody"),Z(17,Ge,41,25,"tr",null,Y),r()(),n(19,"app-custom-paginator",30),C("next",function(){d(e);let i=h();return u(i.initAwaitingCollection())})("previous",function(){d(e);let i=h();return u(i.initAwaitingCollection())}),r()()}if(o&2){let e=h(),t=F(0);p(17),$(t),p(2),_("filter",e.filter())("totaldata",t==null?null:t.length)}}function Xe(o,b){o&1&&(n(0,"div",18),f(1,"app-empty-state"),r())}var Zt=(()=>{class o{constructor(){this.printShippingService=g(H),this.orderService=g(B),this.toastr=g(M),this.fulfillmentService=g(Ne),this.channelType=c,this.selectedOrders=L([]),this.selectedChannelType=se(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=L({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"},{id:"fulfillment",label:"Set Fulfillment",icon:"fa-solid fa-truck"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(t=>Q(U({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(G(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=N({type:o,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&ee(ze,5),t&2){let a;te(a=ie())&&(i.contextMenuEl=a.first)}},features:[ae([B,H])],decls:37,vars:13,consts:[["contextMenu",""],["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-3"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line","me-3"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","150px"],[2,"width","50px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[3,"mouseenter"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(t,i){if(t&1){let a=T();oe(0),A(1,"async"),n(2,"mainpanel",1),C("onSubmit",function(){return d(a),u(i.initAwaitingCollection())}),x("textChange",function(l){return d(a),v(i.filter().Number,l)||(i.filter().Number=l),u(l)}),n(3,"actions"),y(4,je,4,0,"button",2),n(5,"a",3),f(6,"i",4),n(7,"span"),s(8,"Order Fulfillment Display"),r()()(),n(9,"filters")(10,"div")(11,"label",5),s(12,"Channel"),r(),n(13,"app-channel-options-v2",6),x("ngModelChange",function(l){return d(a),v(i.filter().ListChannelID,l)||(i.filter().ListChannelID=l),u(l)}),r()(),n(14,"div",7)(15,"label",5),s(16,"From/To"),r(),n(17,"div",8)(18,"datepicker",9),x("dateChange",function(l){return d(a),v(i.filter().From,l)||(i.filter().From=l),u(l)}),r()(),n(19,"div")(20,"datepicker",10),x("dateChange",function(l){return d(a),v(i.filter().To,l)||(i.filter().To=l),u(l)}),r()()(),n(21,"div",7)(22,"label",11),s(23,"Page Number"),r(),n(24,"input",12),x("ngModelChange",function(l){return d(a),v(i.filter().PageNumber,l)||(i.filter().PageNumber=l),u(l)}),r()(),n(25,"div",7)(26,"label",11),s(27,"Page Size"),r(),n(28,"input",13),x("ngModelChange",function(l){return d(a),v(i.filter().PageSize,l)||(i.filter().PageSize=l),u(l)}),r()()(),n(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),y(33,Je,20,2,"div",17)(34,Xe,2,0,"div",18),r()()()()(),n(35,"app-context-menu",19,0),C("onSelectItem",function(l){return d(a),u(i.onSelectContextItem(l))}),r()}if(t&2){let a=re(I(1,10,i.awaitingCollections$));p(2),w("text",i.filter().Number),p(2),k(i.selectedOrders().length>0?4:-1),p(9),_("multiple",!0),w("ngModel",i.filter().ListChannelID),p(5),w("date",i.filter().From),p(2),w("date",i.filter().To),p(4),w("ngModel",i.filter().PageNumber),p(4),w("ngModel",i.filter().PageSize),p(5),k((a==null?null:a.length)>0?33:34),p(2),_("items",i.contextMenuItems)}},dependencies:[xe,ye,ke,z,he,ge,ue,W,R,De,Ae,Ee,Ce,fe,Ve,Fe,Te,Pe,ce,me,de],encapsulation:2,changeDetection:0})}}return o})();export{Zt as AwaitingCollectionComponent};
|
|
1
|
+
import{a as Ne,b as Fe}from"./chunk-NDOVDHNA.js";import{a as Pe,b as De,c as Ae}from"./chunk-CKU644YK.js";import{a as Ve}from"./chunk-YN2RMQNA.js";import{a as B}from"./chunk-URNP457I.js";import{a as Ee}from"./chunk-4MYXPN55.js";import{a as Me,b as Le}from"./chunk-ES53NVZX.js";import"./chunk-LCIOJHJ4.js";import"./chunk-FDYHLFQ3.js";import{a as Te}from"./chunk-QCYVPHJM.js";import"./chunk-GK6WYUPQ.js";import"./chunk-WXZ5XRM6.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import{a as ke}from"./chunk-ZA4X34GE.js";import"./chunk-IFFI5CMD.js";import{a as ye}from"./chunk-OJ4GCASY.js";import"./chunk-RVHJIVQ5.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import"./chunk-TRTDBHQI.js";import{b as xe}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import{a as _e,c as be,e as Se,f as we,g as ve}from"./chunk-M65GNQVQ.js";import{a as Ce}from"./chunk-MWUZF6ZW.js";import"./chunk-GF2RVIIT.js";import"./chunk-ITKXL7DT.js";import"./chunk-4AL6NJY5.js";import"./chunk-YOYMZEPB.js";import"./chunk-56UGSRXX.js";import"./chunk-UB22GZAR.js";import"./chunk-F7RHG53H.js";import"./chunk-X22WXNSF.js";import"./chunk-P6EDV7BS.js";import"./chunk-TVKTNDDY.js";import"./chunk-DGB7L5EQ.js";import"./chunk-7YP3O2JY.js";import"./chunk-BKB3Y5UC.js";import"./chunk-TPJEJZPT.js";import"./chunk-ISRTMJUH.js";import"./chunk-2VWSIT3Y.js";import"./chunk-2PONPJQD.js";import{b as fe}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import"./chunk-VX4XXFQ3.js";import"./chunk-CXGF2BT5.js";import"./chunk-QXRG5XYP.js";import{a as S}from"./chunk-FDTKJPLI.js";import"./chunk-I4MUFYEG.js";import{b as c,c as E}from"./chunk-NNVT5X6O.js";import{A as z,b as ue,c as he,h as W,m as R,o as ge}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{b as M,e as O}from"./chunk-M5YUVUTR.js";import"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{B as me,D as de,z as ce}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{$c as ae,Dc as ee,E as K,Eb as N,Ec as te,Fc as ie,Ga as L,Nc as ne,Oc as s,Pc as P,Qc as D,Sc as w,Tc as v,Uc as x,V as G,Vc as oe,Wc as re,Xc as F,Y as J,bc as y,bd as le,dc as k,ec as Y,gc as Z,hc as $,ia as V,ic as _,jc as n,kb as X,kc as r,kd as A,lc as f,ld as I,mb as p,md as pe,na as g,sc as T,sd as se,t as q,ua as d,va as u,xc as C,zc as h}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{a as U,b as Q}from"./chunk-66YHNWRR.js";var Ie=(()=>{class o{constructor(){this.http=g(O),this.toastr=g(M)}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(S.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(S.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(S.ShopeePrintShippingLabel,i).pipe(q(a=>(a&&(a.Number=e),a)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(S.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case c.Tokopedia:let m=window.open("about:blank","_blank");m.document.write(e.File),m.document.close();break;case c.Tiktok:e.data!=null?window.open(e.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print");break;case c.Shopee:var i=Uint8Array.from(atob(e.File),l=>l.charCodeAt(0)),a=new Blob([i],{type:"octet/stream"});E.openDownloadFile(a,`${e?.Number}.pdf`);break;case c.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=V({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var Oe=(()=>{class o{constructor(){this.dialogRef=g(_e),this.tandaiSudahDicetak=L(!1)}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak()?1:0)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=N({type:o,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(n(0,"div",0)(1,"h2",1),s(2,"Cetak label pesanan"),r(),n(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),s(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),n(8,"div",5)(9,"mat-checkbox",6),C("ngModelChange",function(m){return i.tandaiSudahDicetak.set(m)}),r(),n(10,"span",7),s(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),n(12,"mat-dialog-actions",8)(13,"button",9),C("click",function(){return i.onCancel()}),s(14,"Cancel"),r(),n(15,"button",10),C("click",function(){return i.onPrint()}),s(16,"Cetak Pesanan"),r()()()),t&2&&(p(9),_("ngModel",i.tandaiSudahDicetak()))},dependencies:[z,W,R,ve,we,Se,Le,Me],encapsulation:2,changeDetection:0})}}return o})();var H=(()=>{class o{constructor(){this.httpService=g(O),this.shippingLabelService=g(Ie),this.toastrService=g(M),this.dialog=g(be)}printShippingLabel(e){switch(e?.MarketType){case c.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Shopee));break;case c.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Tiktok));break;case c.Tokopedia:this.dialog.open(Oe).afterClosed().pipe(K(t=>E.IsNotEmpty(t)),J(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Tokopedia));break;case c.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Lazada));break;case c.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(a=>({OrderNumber:a.Number,ShopID:a.ShopID})),i="";switch(e[0]?.MarketType){case c.Shopee:i=S.ShopeePrintMultipleShippingLabel;break;case c.Tiktok:i=S.TiktokPrintMultipleShippingLabel;break;case c.Lazada:i=S.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(a=>{var m=Uint8Array.from(atob(a.File),We=>We.charCodeAt(0)),l=new Blob([m],{type:"octet/stream"});E.openDownloadFile(l,`${a?.Name}.pdf`)})}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=V({token:o,factory:o.\u0275fac})}}return o})();var ze=["contextMenu"],Be=o=>({"td-cell-hover":o});function je(o,b){if(o&1){let e=T();n(0,"button",20),C("click",function(){d(e);let i=h(),a=F(0);return u(i.onDowloadShippingLabel(a))}),f(1,"i",21),n(2,"span"),s(3,"Download Shipping Label"),r()()}}function He(o,b){if(o&1){let e=T();n(0,"input",47),x("ngModelChange",function(i){d(e);let a=h().$implicit;return v(a.selected,i)||(a.selected=i),u(i)}),C("ngModelChange",function(){d(e);let i=h(3),a=F(0);return u(i.onSelectOrders(a))}),r()}if(o&2){let e=h().$implicit,t=h(2);w("ngModel",e.selected),_("disabled",t.selectedChannelType()!=null&&t.selectedChannelType()!=e.MarketType)}}function Ue(o,b){if(o&1&&f(0,"variants-dropdown",39),o&2){let e=h().$implicit;_("variants",e==null?null:e.Variants)}}function Qe(o,b){if(o&1&&f(0,"variant-with-image",40),o&2){let e=h().$implicit;_("variant",e==null?null:e.Variants[0])}}function qe(o,b){if(o&1&&(n(0,"span"),s(1),r()),o&2){let e=h().$implicit;p(),D("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Ke(o,b){if(o&1){let e=T();n(0,"button",48),C("click",function(){d(e);let i=h().$implicit,a=h(2);return u(a.onPrintShippingLabel(i))}),f(1,"i",49),r()}}function Ge(o,b){if(o&1){let e=T();n(0,"tr")(1,"td"),y(2,He,1,2,"input",31),r(),n(3,"td")(4,"div",32),f(5,"img",33),A(6,"channelImage"),n(7,"div",34)(8,"div"),s(9),r(),n(10,"small",35)(11,"span"),s(12),r()()()()(),n(13,"td")(14,"div",36)(15,"div"),f(16,"order-link",37),r(),n(17,"small"),s(18),A(19,"date"),r(),f(20,"br"),n(21,"small"),f(22,"i",38),s(23),r()()(),n(24,"td"),y(25,Ue,1,1,"variants-dropdown",39)(26,Qe,1,1,"variant-with-image",40),r(),n(27,"td",41),s(28),A(29,"number"),r(),n(30,"td",42),C("mouseenter",function(i){let a=d(e).$implicit,m=h(2);return u(m.onMouseEnter(i,a))}),n(31,"div",43)(32,"div",36)(33,"div",44)(34,"span"),s(35),r(),y(36,qe,2,1,"span"),r(),n(37,"small"),s(38),r()()()(),n(39,"td",45),y(40,Ke,2,0,"button",46),r()()}if(o&2){let e=b.$implicit,t=h(2);p(2),k((e==null?null:e.MarketType)!=t.channelType.WooCommerce?2:-1),p(3),_("src",I(6,16,e==null?null:e.MarketType),X)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),p(4),P(e.Outlet),p(3),P(e.ChannelName),p(4),_("order",e),p(2),D(" ",pe(19,18,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),p(5),D(" ",e.Customer," "),p(),ne(le(23,Be,(e.Variants==null?null:e.Variants.length)>1)),p(),k((e.Variants==null?null:e.Variants.length)>1?25:26),p(3),P(I(29,21,e.Amount)),p(7),P(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),p(),k(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?36:-1),p(2),D(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),p(2),k((e==null?null:e.MarketType)!=t.channelType.WooCommerce?40:-1)}}function Je(o,b){if(o&1){let e=T();n(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),f(4,"th",25),n(5,"th",26),s(6,"Outlet"),r(),n(7,"th",26),s(8,"Number"),r(),n(9,"th"),s(10,"Items"),r(),n(11,"th",27),s(12,"Amount"),r(),n(13,"th",28),s(14,"Shipping"),r(),f(15,"th",29),r()(),n(16,"tbody"),Z(17,Ge,41,25,"tr",null,Y),r()(),n(19,"app-custom-paginator",30),C("next",function(){d(e);let i=h();return u(i.initAwaitingCollection())})("previous",function(){d(e);let i=h();return u(i.initAwaitingCollection())}),r()()}if(o&2){let e=h(),t=F(0);p(17),$(t),p(2),_("filter",e.filter())("totaldata",t==null?null:t.length)}}function Xe(o,b){o&1&&(n(0,"div",18),f(1,"app-empty-state"),r())}var Zt=(()=>{class o{constructor(){this.printShippingService=g(H),this.orderService=g(B),this.toastr=g(M),this.fulfillmentService=g(Ne),this.channelType=c,this.selectedOrders=L([]),this.selectedChannelType=se(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=L({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"},{id:"fulfillment",label:"Set Fulfillment",icon:"fa-solid fa-truck"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(t=>Q(U({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(G(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=N({type:o,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&ee(ze,5),t&2){let a;te(a=ie())&&(i.contextMenuEl=a.first)}},features:[ae([B,H])],decls:37,vars:13,consts:[["contextMenu",""],["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-3"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line","me-3"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","150px"],[2,"width","50px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[3,"mouseenter"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(t,i){if(t&1){let a=T();oe(0),A(1,"async"),n(2,"mainpanel",1),C("onSubmit",function(){return d(a),u(i.initAwaitingCollection())}),x("textChange",function(l){return d(a),v(i.filter().Number,l)||(i.filter().Number=l),u(l)}),n(3,"actions"),y(4,je,4,0,"button",2),n(5,"a",3),f(6,"i",4),n(7,"span"),s(8,"Order Fulfillment Display"),r()()(),n(9,"filters")(10,"div")(11,"label",5),s(12,"Channel"),r(),n(13,"app-channel-options-v2",6),x("ngModelChange",function(l){return d(a),v(i.filter().ListChannelID,l)||(i.filter().ListChannelID=l),u(l)}),r()(),n(14,"div",7)(15,"label",5),s(16,"From/To"),r(),n(17,"div",8)(18,"datepicker",9),x("dateChange",function(l){return d(a),v(i.filter().From,l)||(i.filter().From=l),u(l)}),r()(),n(19,"div")(20,"datepicker",10),x("dateChange",function(l){return d(a),v(i.filter().To,l)||(i.filter().To=l),u(l)}),r()()(),n(21,"div",7)(22,"label",11),s(23,"Page Number"),r(),n(24,"input",12),x("ngModelChange",function(l){return d(a),v(i.filter().PageNumber,l)||(i.filter().PageNumber=l),u(l)}),r()(),n(25,"div",7)(26,"label",11),s(27,"Page Size"),r(),n(28,"input",13),x("ngModelChange",function(l){return d(a),v(i.filter().PageSize,l)||(i.filter().PageSize=l),u(l)}),r()()(),n(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),y(33,Je,20,2,"div",17)(34,Xe,2,0,"div",18),r()()()()(),n(35,"app-context-menu",19,0),C("onSelectItem",function(l){return d(a),u(i.onSelectContextItem(l))}),r()}if(t&2){let a=re(I(1,10,i.awaitingCollections$));p(2),w("text",i.filter().Number),p(2),k(i.selectedOrders().length>0?4:-1),p(9),_("multiple",!0),w("ngModel",i.filter().ListChannelID),p(5),w("date",i.filter().From),p(2),w("date",i.filter().To),p(4),w("ngModel",i.filter().PageNumber),p(4),w("ngModel",i.filter().PageSize),p(5),k((a==null?null:a.length)>0?33:34),p(2),_("items",i.contextMenuItems)}},dependencies:[xe,ye,ke,z,he,ge,ue,W,R,De,Ae,Ee,Ce,fe,Ve,Fe,Te,Pe,ce,me,de],encapsulation:2,changeDetection:0})}}return o})();export{Zt as AwaitingCollectionComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as oe}from"./chunk-ODLKDM5E.js";import{a as ie}from"./chunk-7OQSPY2H.js";import{a as ne}from"./chunk-4MYXPN55.js";import"./chunk-HH4B5NMB.js";import"./chunk-DBO3A6IW.js";import{a as te}from"./chunk-OJ4GCASY.js";import"./chunk-ACIMXBIC.js";import{a as Y,b as Z,d as ee}from"./chunk-TRTDBHQI.js";import{b as X}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import"./chunk-M65GNQVQ.js";import"./chunk-MWUZF6ZW.js";import"./chunk-GF2RVIIT.js";import"./chunk-ITKXL7DT.js";import"./chunk-4AL6NJY5.js";import"./chunk-YOYMZEPB.js";import"./chunk-56UGSRXX.js";import"./chunk-UB22GZAR.js";import"./chunk-F7RHG53H.js";import"./chunk-X22WXNSF.js";import"./chunk-P6EDV7BS.js";import"./chunk-TVKTNDDY.js";import"./chunk-DGB7L5EQ.js";import"./chunk-7YP3O2JY.js";import"./chunk-BKB3Y5UC.js";import"./chunk-TPJEJZPT.js";import"./chunk-ISRTMJUH.js";import"./chunk-2PONPJQD.js";import{b as Q}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import{h as G}from"./chunk-
|
|
1
|
+
import{a as oe}from"./chunk-ODLKDM5E.js";import{a as ie}from"./chunk-7OQSPY2H.js";import{a as ne}from"./chunk-4MYXPN55.js";import"./chunk-HH4B5NMB.js";import"./chunk-DBO3A6IW.js";import{a as te}from"./chunk-OJ4GCASY.js";import"./chunk-ACIMXBIC.js";import{a as Y,b as Z,d as ee}from"./chunk-TRTDBHQI.js";import{b as X}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import"./chunk-M65GNQVQ.js";import"./chunk-MWUZF6ZW.js";import"./chunk-GF2RVIIT.js";import"./chunk-ITKXL7DT.js";import"./chunk-4AL6NJY5.js";import"./chunk-YOYMZEPB.js";import"./chunk-56UGSRXX.js";import"./chunk-UB22GZAR.js";import"./chunk-F7RHG53H.js";import"./chunk-X22WXNSF.js";import"./chunk-P6EDV7BS.js";import"./chunk-TVKTNDDY.js";import"./chunk-DGB7L5EQ.js";import"./chunk-7YP3O2JY.js";import"./chunk-BKB3Y5UC.js";import"./chunk-TPJEJZPT.js";import"./chunk-ISRTMJUH.js";import"./chunk-2PONPJQD.js";import{b as Q}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import{h as G}from"./chunk-VX4XXFQ3.js";import"./chunk-CXGF2BT5.js";import"./chunk-QXRG5XYP.js";import"./chunk-FDTKJPLI.js";import"./chunk-I4MUFYEG.js";import"./chunk-NNVT5X6O.js";import{A as J,c as H,h as q,m as $,o as j,u as K,v as U}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{e as V}from"./chunk-M5YUVUTR.js";import{b as k,e as z}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{B as L}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{Eb as N,Ga as c,Kb as E,Lc as I,Nc as B,Oc as l,Pc as b,Qc as v,ad as P,bc as _,bd as W,dc as h,fc as O,gc as R,hc as w,ic as s,jc as n,kb as x,kc as t,kd as F,lc as S,mb as o,md as A,na as f,sc as D,ua as M,va as T,xc as m,zc as C}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{a as u,b as y}from"./chunk-66YHNWRR.js";var re=()=>["/menu/log/order/detail-user"],le=a=>({ID:a});function de(a,g){if(a&1&&(n(0,"span",22),S(1,"img",23),t(),l(2)),a&2){let e=g.item;o(),s("src",e.Img,x)("alt",e.Name),o(),v(" ",e.Name," ")}}function pe(a,g){a&1&&(n(0,"th")(1,"span",29),l(2," Response Body Warning "),t()())}function se(a,g){a&1&&(n(0,"th")(1,"span",29),l(2," Number Override "),t()())}function me(a,g){if(a&1&&(n(0,"td",26)(1,"span",31),l(2),t()()),a&2){let e=C().$implicit;o(),I("bg-warning",e.responseBodyWarning!=null),o(),b(e.responseBodyWarning)}}function ge(a,g){if(a&1&&(n(0,"td"),l(1),t()),a&2){let e=C().$implicit;o(),v(" ",e.ResponseBodyWarningReference," ")}}function ce(a,g){if(a&1&&(n(0,"tr")(1,"td")(2,"a",30),l(3),F(4,"date"),t()(),n(5,"td"),l(6),t(),n(7,"td"),l(8),t(),n(9,"td"),l(10),t(),n(11,"td",26)(12,"span",31),l(13),t()(),_(14,me,3,3,"td",26),_(15,ge,2,1,"td"),t()),a&2){let e=g.$implicit,d=C(2);o(2),s("routerLink",P(14,re))("queryParams",W(15,le,e.ID)),o(),v(" ",A(4,11,e.Created,"dd MMM yyyy HH:mm:ss")," "),o(3),b(e.ChannelName),o(2),b(e.POSActionTypeString),o(2),b(e.Number),o(2),B(e.ResponseCode===200||e.ResponseCode===202?"bg-success":"bg-warning"),o(),v(" ",e.ResponseCode," "),o(),h(d.responseBodyWarningVisible()?14:-1),o(),h(d.responseBodyWarningVisible()?15:-1)}}function ue(a,g){if(a&1){let e=D();n(0,"div",20)(1,"table",24)(2,"thead")(3,"tr",25)(4,"th"),l(5,"Date"),t(),n(6,"th"),l(7,"Channel"),t(),n(8,"th"),l(9,"Actions"),t(),n(10,"th"),l(11,"Number"),t(),n(12,"th",26)(13,"span",27),l(14," Response Code "),t()(),_(15,pe,3,0,"th"),_(16,se,3,0,"th"),t()(),n(17,"tbody"),R(18,ce,16,17,"tr",null,O),t()(),n(20,"mat-paginator",28),m("page",function(i){M(e);let r=C();return T(r.changePage(i))}),t()()}if(a&2){let e=C();o(15),h(e.responseBodyWarningVisible()?15:-1),o(),h(e.responseBodyWarningVisible()?16:-1),o(2),w(e.Result()),o(2),s("length",e.paginationTotal())("pageSize",e.paginationPageSize())("pageIndex",e.filter().PageNumber==0?0:e.filter().PageNumber-1)}}function _e(a,g){a&1&&(n(0,"div",21),S(1,"app-empty-state"),t())}var Pe=(()=>{class a{constructor(){this.http=f(V),this._RawLogService=f(oe),this.route=f(k),this.authService=f(G),this.Result=c([]),this.filter=c({RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""}),this.paginationTotal=c(0),this.paginationPageSize=c(0),this.Number=c(null),this.channelOptions=c(this.authService.getChannels()),this.ActionTypeList=c(null),this.responseBodyWarningVisible=c(!1)}ngOnInit(){this.route.queryParams.subscribe(e=>{this.responseCode=e.responseCode,this.responseCode!=null?this.Load(e):this.Load()})}Load(e={}){this.http.post("/api/OrdersLoader/Get",e).subscribe(d=>{this.filter.update(i=>u(u({},i),d.Filter)),this.ActionTypeList.set(d.Options.ActionTypeList),this.Get()})}Get(e){this.filter.update(d=>y(u({},d),{Number:e})),this.http.post("/api/Orders/Get",this.filter()).subscribe(d=>{this._RawLogService.Data=d.hits;let i=[];for(let r of d.hits){r._source.log.responseBodyWarning!=null&&this.responseBodyWarningVisible.set(!0);let p={ID:r._id,Created:r._source["@timestamp_received"],shopId:r._source.shopId,MarketTypeString:r._source.log.type,ChannelName:r._source?.channelId!=null?this.channelOptions().find(ae=>ae.ID===r._source?.channelId)?.Name:"",POSActionTypeString:r._source.message,Number:r._source.log.number,ResponseCode:r._source.log.responseCode,responseBodyWarning:r._source.log.responseBodyWarning,ResponseBodyWarningReference:r._source.log.ResponseBodyWarningReference};i.push(p)}this.Result.set(i),this.paginationTotal.set(d.total.value),this.paginationPageSize.set(this.filter().RowCount>this.paginationTotal()?this.paginationTotal():this.filter().RowCount)})}changePage(e){this.filter.update(d=>y(u({},d),{PageNumber:e.pageIndex+1})),this.Get()}updateFilter(e,d){this.filter.update(i=>y(u({},i),{[e]:d}))}static{this.\u0275fac=function(d){return new(d||a)}}static{this.\u0275cmp=N({type:a,selectors:[["app-order"]],decls:42,vars:14,consts:[["headerTitle","Order Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["id","listresponseBodyWarning"],["value","number-override"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],[3,"page","length","pageSize","pageIndex"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"]],template:function(d,i){if(d&1&&(n(0,"mainpanel",0),m("textChange",function(p){return i.Number.set(p)})("onSubmit",function(p){return i.Get(p)}),n(1,"filters")(2,"div")(3,"label",1),l(4,"Channel"),t(),n(5,"ng-select",2),m("ngModelChange",function(p){return i.updateFilter("ChannelID",p)}),E(6,de,3,3,"ng-template",3),t()(),n(7,"div",4)(8,"label",1),l(9,"Action"),t(),n(10,"ng-select",5),m("ngModelChange",function(p){return i.updateFilter("ActionType",p)}),t()(),n(11,"div",4)(12,"label",6),l(13,"From/To"),t(),n(14,"div",7)(15,"datepicker",8),m("dateChange",function(p){return i.updateFilter("From",p)}),t()(),n(16,"div")(17,"datepicker",9),m("dateChange",function(p){return i.updateFilter("To",p)}),t()()(),n(18,"div",4)(19,"label",10),l(20,"Response Code"),t(),n(21,"input",11),m("ngModelChange",function(p){return i.updateFilter("StatusCode",p)}),t()(),n(22,"div",4)(23,"label",10),l(24,"Response Body Warning"),t(),n(25,"input",12),m("ngModelChange",function(p){return i.updateFilter("responseBodyWarning",p)}),t(),n(26,"datalist",13),S(27,"option",14),t()(),n(28,"div",4)(29,"label",10),l(30,"Page Number"),t(),n(31,"input",15),m("ngModelChange",function(p){return i.updateFilter("PageNumber",p)}),t()(),n(32,"div",4)(33,"label",10),l(34,"Page Size"),t(),n(35,"input",16),m("ngModelChange",function(p){return i.updateFilter("RowCount",p)}),t()()(),n(36,"content")(37,"div",17)(38,"div",18)(39,"div",19),_(40,ue,21,5,"div",20)(41,_e,2,0,"div",21),t()()()()()),d&2){let r;s("text",i.Number()),o(5),s("clearable",!0)("items",i.channelOptions())("ngModel",i.filter().ChannelID),o(5),s("clearable",!0)("items",i.ActionTypeList())("ngModel",i.filter().ActionType),o(5),s("date",i.filter().From),o(2),s("date",i.filter().To),o(4),s("ngModel",i.filter().StatusCode),o(4),s("ngModel",i.filter().responseBodyWarning),o(6),s("ngModel",i.filter().PageNumber),o(4),s("ngModel",i.filter().RowCount),o(5),h(((r=i.Result())==null?null:r.length)>0?40:41)}},dependencies:[X,ee,J,K,U,H,j,q,$,Y,Z,ne,Q,z,ie,te,L],encapsulation:2,changeDetection:0})}}return a})();export{Pe as OrderComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ae}from"./chunk-URNP457I.js";import{a as Xe,b as et,c as tt,e as nt,f as it,g as ot}from"./chunk-DR6WXVOU.js";import{g as at,i as rt,j as lt}from"./chunk-XPMYA22A.js";import"./chunk-LCIOJHJ4.js";import{a as Ze,b as qe,c as Je}from"./chunk-BBTUZTLI.js";import"./chunk-NQE35LLP.js";import"./chunk-FDYHLFQ3.js";import"./chunk-ZPW7UOIC.js";import{a as Ke,b as Qe}from"./chunk-GK6WYUPQ.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import{a as Ae,b as $e,c as We}from"./chunk-K6KO37S2.js";import"./chunk-DBO3A6IW.js";import{a as ze}from"./chunk-BL3IBVPU.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-NS3MK77F.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import{c as Oe,d as Re,e as Be}from"./chunk-TRTDBHQI.js";import{b as Fe}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import"./chunk-M65GNQVQ.js";import{a as ne}from"./chunk-MWUZF6ZW.js";import"./chunk-SHS3ZU2J.js";import{f as je,g as Ge,h as Ue,i as Ye,j as He}from"./chunk-ITKXL7DT.js";import"./chunk-4AL6NJY5.js";import{e as Le}from"./chunk-YOYMZEPB.js";import"./chunk-56UGSRXX.js";import"./chunk-UB22GZAR.js";import"./chunk-P6EDV7BS.js";import"./chunk-TVKTNDDY.js";import"./chunk-DGB7L5EQ.js";import"./chunk-7YP3O2JY.js";import"./chunk-BKB3Y5UC.js";import"./chunk-TPJEJZPT.js";import"./chunk-ISRTMJUH.js";import{qa as Pe}from"./chunk-2VWSIT3Y.js";import"./chunk-2PONPJQD.js";import{b as Ie}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import{h as te}from"./chunk-GQRBV5VY.js";import{a as Ee}from"./chunk-CXGF2BT5.js";import"./chunk-QXRG5XYP.js";import{a as ee}from"./chunk-FDTKJPLI.js";import"./chunk-I4MUFYEG.js";import{b as X,c as y}from"./chunk-NNVT5X6O.js";import{A as z,b as Ve,c as ke,h as W,m as L,x as Ne}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{b as be,e as Te}from"./chunk-M5YUVUTR.js";import{g as Me}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{B as $,z as xe}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{$c as q,Ca as I,Dc as he,Eb as P,Ec as fe,Fc as ge,Ga as u,Ja as Q,Jc as N,Kb as k,Lc as Z,Nc as B,Oc as d,Pc as b,Qc as E,Sc as _e,Tc as we,Uc as Ce,V as pe,Yc as ve,_c as Se,aa as me,ad as U,bc as w,cd as A,dc as C,fc as F,gc as O,hc as R,ia as ce,ic as p,jc as o,k as de,kb as ue,kc as a,kd as Y,lc as v,ld as De,mb as l,mc as x,md as oe,na as S,nc as M,oc as ie,od as H,sc as D,sd as J,t as se,ua as m,va as c,vd as ye,wd as V,xc as g,zc as _}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{a as re,b as le}from"./chunk-66YHNWRR.js";function ut(t,s){if(t&1&&(x(0,"tr")(1,"td"),d(2),M(),x(3,"td"),d(4),M(),x(5,"td"),d(6),M(),x(7,"td"),d(8),M()()),t&2){let e=s.$implicit,i=s.$index;Z("over-due",e.Exception),l(2),b(i+1),l(2),b(e.Number),l(2),b(e.Status),l(2),b(e.Exception)}}function ht(t,s){if(t&1&&O(0,ut,9,6,"tr",6,F),t&2){let e,i=_();R((e=i.downloadResult())==null?null:e.Body)}}function ft(t,s){t&1&&(x(0,"tr",5)(1,"td",7)(2,"div",8),ie(3,"i",9),M(),x(4,"h4",10),d(5," There is no order to processed "),M()()())}var dt=(()=>{class t{constructor(){this.downloadResult=V()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},decls:15,vars:1,consts:[[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[1,"text-center"],[3,"over-due"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(i,n){if(i&1&&(x(0,"div",0)(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr"),ie(5,"th",4),x(6,"th"),d(7,"Order Number"),M(),x(8,"th"),d(9,"Status"),M(),x(10,"th"),d(11,"Exception"),M()()(),x(12,"tbody"),w(13,ht,2,0)(14,ft,6,0,"tr",5),M()()()()),i&2){let r;l(13),C(((r=n.downloadResult())==null||r.Body==null?null:r.Body.length)>0?13:14)}},encapsulation:2,changeDetection:0})}}return t})();var gt=()=>({standalone:!0}),pt=(()=>{class t{constructor(){this.datePipe=S($),this.fullWidth=V(!1),this.placeholder=V(""),this.timeChange=new I}ngOnInit(){}onTimeChange(e){let i=null;e&&(i=this.datePipe.transform(e,"HH:mm")),this.timeChange.emit(i),this.onTimePickerChange()}onShowCalendar(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="inside")}}onTimePickerChange(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="outside")}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:[1,"fullWidth"],placeholder:[1,"placeholder"]},outputs:{timeChange:"timeChange"},decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","baseZIndex","ngModel","timeOnly","ngModelOptions","placeholder"],["size","small","label","Close",3,"click"]],template:function(i,n){if(i&1){let r=D();o(0,"p-datepicker",1,0),Ce("ngModelChange",function(h){return m(r),we(n.time,h)||(n.time=h),c(h)}),g("ngModelChange",function(h){return m(r),c(n.onTimeChange(h))})("onSelect",function(){return m(r),c(n.onShowCalendar())}),o(2,"p-footer")(3,"p-button",2),g("click",function(){return m(r),N(1).hideOverlay(),c(n.onShowCalendar())}),a()()()}i&2&&(Z("full-width",n.fullWidth()),p("baseZIndex",1100),_e("ngModel",n.time),p("timeOnly",!0)("ngModelOptions",U(7,gt))("placeholder",n.placeholder()))},dependencies:[z,W,L,Je,qe,Ze,Pe],styles:["p-datepicker span.p-datepicker.custom-height{height:44px;width:70px} p-datepicker.full-width span.p-datepicker.custom-height{height:44px;width:100%!important}"],changeDetection:0})}}return t})();var j=(()=>{class t{constructor(){this.httpService=S(Te),this.toastr=S(be),this.datePipe=S($)}gerChannelDetailById(e){return this.httpService.post(ee.GetChannelDetail,{ID:e})}getOrderPreview(e){return this.httpService.post(ee.GetOrderPreviewV2,e)}getDownloadOrder(e){return this.httpService.post(ee.GetDownloadOrderV2,e)}onPreviewOrder(e){return this.validateDatePreview(e)?this.getOrderPreview(e).pipe(me(i=>{i.Data?.length===0&&this.toastrEmptyPreview(e)})):de}toastrEmptyPreview(e){let i=this.datePipe.transform(e.From,"dd MMM yyyy"),n=this.datePipe.transform(e.To,"dd MMM yyyy"),r=e.TimeFrom?e.TimeFrom:"",f=e.TimeTo?e.TimeTo:"";this.toastr.info(`There is no orders from ${i} ${r} to ${n} ${f}!`,"No Orders!")}validateDatePreview(e){let i=!0;return e.downloadType==!0?y.getDaysDiff(e?.From,e?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),i=!1):y.getDaysDiff(e?.From,e?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),i=!1),i}getDateTitle(e,i){let n=y.formatTitleFromDate(new Date(e),new Date(i)),r=this.datePipe.transform(e,n),f=this.datePipe.transform(i,"dd MMM yyyy");return`${n==null?"":r+"-"} ${f}`}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ce({token:t,factory:t.\u0275fac})}}return t})();function _t(t,s){if(t&1&&(o(0,"ng-option",7),v(1,"img",17),d(2),a()),t&2){let e=s.$implicit;p("value",e.ID),l(),p("src",e==null?null:e.Img,ue),l(),E("",e.Name," ")}}function wt(t,s){if(t&1){let e=D();o(0,"div",8)(1,"div",4)(2,"h5"),d(3,"Type"),a(),o(4,"p",5),d(5,"Select Type want to download"),a()(),o(6,"div",4)(7,"div",18)(8,"div")(9,"mat-radio-group",19),g("ngModelChange",function(n){m(e);let r=_();return r.downloadType.set(n),c(r.onDownloadTypeChange())}),o(10,"mat-radio-button",20),d(11," Orders "),a(),o(12,"mat-radio-button",21),d(13," Disbursement "),a()()()(),o(14,"div",22)(15,"div",23),v(16,"i",24),a(),o(17,"p",25),d(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(t&2){let e=_();l(9),p("ngModel",e.downloadType()),l(),p("value",!1),l(2),p("value",!0)}}function Ct(t,s){t&1&&(o(0,"p",5),d(1," Select Disbursement date "),o(2,"span",26),d(3,"(payment date / order complete date)"),a(),d(4," of the channel you want to download (Max 1 Week). "),a())}function vt(t,s){t&1&&(o(0,"p",5),d(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function St(t,s){if(t&1){let e=D();o(0,"div",16)(1,"app-timepicker",27),g("timeChange",function(n){m(e);let r=_();return r.startTime.set(n),c(r.onStartTimeChange())}),a(),o(2,"span",28),d(3,"-"),a(),o(4,"app-timepicker",27),g("timeChange",function(n){m(e);let r=_();return r.endTime.set(n),c(r.onEndTimeChange())}),a()()}if(t&2){let e=_();l(),p("time",e.startTime()),l(3),p("time",e.endTime())}}var mt=(()=>{class t{constructor(){this.reset=V(!1),this.authService=S(te),this.tokenService=S(Ee),this.downloadService=S(j),this.downloadType=u(!1),this.selectedChannelId=u(null),this.channelOptions=u(this.authService.getChannels()),this.channelType=X,this.selectedChannel=u(null),this.showTimePicker=u(!1),this.startDate=u(null),this.endDate=u(null),this.startTime=u("00:00"),this.endTime=u("23:59"),this.minDate=u(new Date),this.maxDate=u(new Date),this.filterData=new I,this._onRememberMeChange=ye({alias:"onRememberMeChange"}),this.rememberMe=u(!1),Q(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0}),this.initDateValidation()}initDateValidation(){let e=this.tokenService?.getTokenValue(),i=e?.DownloadRange?JSON.parse(e?.DownloadRange):0;if(i<=0)this.minDate.set(null),this.maxDate.set(null);else{let n=new Date,r=y.addDays(n,i-1);this.minDate.set(r)}}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(e=>e.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(se(e=>e?.Model),pe(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let e=1;this.startDate()&&this.endDate()&&(e=y.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>e==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}onChangeRememberMe(e){this._onRememberMeChange.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange",_onRememberMeChange:"onRememberMeChange"},features:[q([j,Le()])],decls:32,vars:13,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"row","mt-6"],[1,"col-12","d-flex","align-items-center"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker","min","max"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel","maxlength"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"col-6","d-flex","align-items-center","gap-2","mt-10"],["type","checkbox",2,"width","16px","height","16px",3,"ngModelChange","ngModel"],[1,"ms-2"],[1,"mt-8","d-flex","align-items-center"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(i,n){if(i&1){let r=D();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),d(5,"Select a Channel"),a(),o(6,"p",5),d(7,"Select Channel want to download order"),a()(),o(8,"div",4)(9,"ng-select",6),g("ngModelChange",function(h){return m(r),n.selectedChannelId.set(h),c(n.onSelectChannel())}),O(10,_t,3,3,"ng-option",7,F),a()()(),w(12,wt,19,3,"div",8),Y(13,"async"),o(14,"div",8)(15,"div",4)(16,"h5"),d(17,"Date Range"),a(),w(18,Ct,5,0,"p",5)(19,vt,2,0,"p",5),a(),o(20,"div",4)(21,"div",9)(22,"mat-date-range-input",10)(23,"input",11),g("ngModelChange",function(h){return m(r),c(n.startDate.set(h))})("click",function(){m(r);let h=N(26);return c(h.open())}),a(),o(24,"input",12),g("ngModelChange",function(h){return m(r),n.endDate.set(h),c(n.onFilterDateChange())})("click",function(){m(r);let h=N(26);return c(h.open())}),a()(),v(25,"mat-date-range-picker",null,0),a(),o(27,"div",13)(28,"input",14),g("ngModelChange",function(h){return m(r),n.rememberMe.set(h),c(n.onChangeRememberMe(h))}),a(),o(29,"h5",15),d(30,"Save Date"),a()(),w(31,St,5,2,"div",16),a()()()()}if(i&2){let r,f,h=N(26);l(9),p("clearable",!1)("ngModel",n.selectedChannelId()),l(),R(n.channelOptions()),l(2),C((r=De(13,11,n.channelDetail$))!=null&&r.ServiceFeeWriteOff&&((r=n.selectedChannel())==null?null:r.TypeID)==n.channelType.Tokopedia?12:-1),l(6),C(n.downloadType()&&((f=n.selectedChannel())==null?null:f.TypeID)==n.channelType.Tokopedia?18:19),l(4),p("rangePicker",h)("min",n.minDate())("max",n.maxDate()),l(),p("ngModel",n.startDate()),l(),p("ngModel",n.endDate()),l(4),p("ngModel",n.rememberMe()),l(3),C(n.showTimePicker()?31:-1)}},dependencies:[Be,Re,Oe,We,Ae,$e,z,ke,Ve,W,Ne,L,pt,Ye,je,He,Ge,Ue,xe],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"],changeDetection:0})}}return t})();var T=(function(t){return t.ALL="all",t.SYNC="sync",t.WRONG="wrong",t.UNSYNC="unsync",t})(T||{});var G=(function(t){return t[t.DoNothing=0]="DoNothing",t[t.New=1]="New",t[t.Update=2]="Update",t})(G||{});var Dt=(t,s)=>({"btn-secondary text-white":t,"btn-outline-dark":s}),yt=(t,s)=>({"btn-success":t,"btn-outline-success":s}),xt=(t,s)=>({"btn-warning text-white":t,"btn-outline-warning":s}),bt=(t,s)=>({"btn-danger":t,"btn-outline-danger":s}),Tt=()=>({"min-width":"100%"}),Mt=()=>({minWidth:"14rem"}),Et=(t,s)=>({"over-due-today":t,"over-due":s});function Pt(t,s){t&1&&d(0," Created Date ")}function Vt(t,s){t&1&&d(0," Modified Date ")}function kt(t,s){if(t&1){let e=D();o(0,"p-multiselect",24),g("onChange",function(n){let r=m(e).filterCallback;return c(r(n.value))}),a()}if(t&2){let e=s.$implicit,i=_(2);p("ngModel",e)("options",i.channelStatusOptions())("panelStyle",U(3,Mt))}}function Nt(t,s){if(t&1&&(o(0,"tr"),v(1,"th",18),o(2,"th",19),d(3,"Number"),a(),o(4,"th",20),w(5,Pt,1,0)(6,Vt,1,0),a(),o(7,"th",21)(8,"div",22),d(9," Channel "),o(10,"p-columnFilter",23),k(11,kt,1,4,"ng-template",null,3,H),a()()(),o(13,"th",21),d(14,"POS Status"),a(),o(15,"th"),d(16,"Action"),a(),v(17,"th",18),a()),t&2){let e,i=_();l(5),C(((e=i.selectedChannel())==null?null:e.TypeID)===i.channelType.WooCommerce?5:6),l(5),p("showMatchModes",!1)("showOperator",!1)("showAddButton",!1)}}function It(t,s){if(t&1&&(o(0,"td"),d(1),Y(2,"date"),a()),t&2){let e=_().$implicit;l(),b(oe(2,1,e.Date,"dd MMM yyyy HH:mm:ss"))}}function Ft(t,s){if(t&1&&(o(0,"td"),d(1),Y(2,"date"),a()),t&2){let e=_().$implicit;l(),b(oe(2,1,e.Modified,"dd MMM yyyy HH:mm:ss"))}}function Ot(t,s){if(t&1&&(o(0,"span"),d(1),a()),t&2){let e=_().$implicit;l(),b(e.ActionString)}}function Rt(t,s){if(t&1&&(o(0,"li"),d(1),a()),t&2){let e=s.$implicit;l(),b(e)}}function Bt(t,s){if(t&1&&(o(0,"ul",26),O(1,Rt,2,1,"li",null,F),a()),t&2){let e=_().$implicit;l(),R(e.ActionString)}}function At(t,s){if(t&1&&(o(0,"span",27),v(1,"i",28),a()),t&2){let e=_().$implicit;p("title",Se("Delivery : ",e.DeliveryState,`
|
|
1
|
+
import{a as ae}from"./chunk-URNP457I.js";import{a as Xe,b as et,c as tt,e as nt,f as it,g as ot}from"./chunk-DR6WXVOU.js";import{g as at,i as rt,j as lt}from"./chunk-XPMYA22A.js";import"./chunk-LCIOJHJ4.js";import{a as Ze,b as qe,c as Je}from"./chunk-BBTUZTLI.js";import"./chunk-NQE35LLP.js";import"./chunk-FDYHLFQ3.js";import"./chunk-ZPW7UOIC.js";import{a as Ke,b as Qe}from"./chunk-GK6WYUPQ.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import{a as Ae,b as $e,c as We}from"./chunk-K6KO37S2.js";import"./chunk-DBO3A6IW.js";import{a as ze}from"./chunk-QFPDAQEF.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-B5LFTMZP.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import{c as Oe,d as Re,e as Be}from"./chunk-TRTDBHQI.js";import{b as Fe}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import"./chunk-M65GNQVQ.js";import{a as ne}from"./chunk-MWUZF6ZW.js";import"./chunk-SHS3ZU2J.js";import{f as je,g as Ge,h as Ue,i as Ye,j as He}from"./chunk-ITKXL7DT.js";import"./chunk-4AL6NJY5.js";import{e as Le}from"./chunk-YOYMZEPB.js";import"./chunk-56UGSRXX.js";import"./chunk-UB22GZAR.js";import"./chunk-P6EDV7BS.js";import"./chunk-TVKTNDDY.js";import"./chunk-DGB7L5EQ.js";import"./chunk-7YP3O2JY.js";import"./chunk-BKB3Y5UC.js";import"./chunk-TPJEJZPT.js";import"./chunk-ISRTMJUH.js";import{qa as Pe}from"./chunk-2VWSIT3Y.js";import"./chunk-2PONPJQD.js";import{b as Ie}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import{h as te}from"./chunk-VX4XXFQ3.js";import{a as Ee}from"./chunk-CXGF2BT5.js";import"./chunk-QXRG5XYP.js";import{a as ee}from"./chunk-FDTKJPLI.js";import"./chunk-I4MUFYEG.js";import{b as X,c as y}from"./chunk-NNVT5X6O.js";import{A as z,b as Ve,c as ke,h as W,m as L,x as Ne}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{b as be,e as Te}from"./chunk-M5YUVUTR.js";import{g as Me}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{B as $,z as xe}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{$c as q,Ca as I,Dc as he,Eb as P,Ec as fe,Fc as ge,Ga as u,Ja as Q,Jc as N,Kb as k,Lc as Z,Nc as B,Oc as d,Pc as b,Qc as E,Sc as _e,Tc as we,Uc as Ce,V as pe,Yc as ve,_c as Se,aa as me,ad as U,bc as w,cd as A,dc as C,fc as F,gc as O,hc as R,ia as ce,ic as p,jc as o,k as de,kb as ue,kc as a,kd as Y,lc as v,ld as De,mb as l,mc as x,md as oe,na as S,nc as M,oc as ie,od as H,sc as D,sd as J,t as se,ua as m,va as c,vd as ye,wd as V,xc as g,zc as _}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{a as re,b as le}from"./chunk-66YHNWRR.js";function ut(t,s){if(t&1&&(x(0,"tr")(1,"td"),d(2),M(),x(3,"td"),d(4),M(),x(5,"td"),d(6),M(),x(7,"td"),d(8),M()()),t&2){let e=s.$implicit,i=s.$index;Z("over-due",e.Exception),l(2),b(i+1),l(2),b(e.Number),l(2),b(e.Status),l(2),b(e.Exception)}}function ht(t,s){if(t&1&&O(0,ut,9,6,"tr",6,F),t&2){let e,i=_();R((e=i.downloadResult())==null?null:e.Body)}}function ft(t,s){t&1&&(x(0,"tr",5)(1,"td",7)(2,"div",8),ie(3,"i",9),M(),x(4,"h4",10),d(5," There is no order to processed "),M()()())}var dt=(()=>{class t{constructor(){this.downloadResult=V()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},decls:15,vars:1,consts:[[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[1,"text-center"],[3,"over-due"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(i,n){if(i&1&&(x(0,"div",0)(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr"),ie(5,"th",4),x(6,"th"),d(7,"Order Number"),M(),x(8,"th"),d(9,"Status"),M(),x(10,"th"),d(11,"Exception"),M()()(),x(12,"tbody"),w(13,ht,2,0)(14,ft,6,0,"tr",5),M()()()()),i&2){let r;l(13),C(((r=n.downloadResult())==null||r.Body==null?null:r.Body.length)>0?13:14)}},encapsulation:2,changeDetection:0})}}return t})();var gt=()=>({standalone:!0}),pt=(()=>{class t{constructor(){this.datePipe=S($),this.fullWidth=V(!1),this.placeholder=V(""),this.timeChange=new I}ngOnInit(){}onTimeChange(e){let i=null;e&&(i=this.datePipe.transform(e,"HH:mm")),this.timeChange.emit(i),this.onTimePickerChange()}onShowCalendar(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="inside")}}onTimePickerChange(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="outside")}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:[1,"fullWidth"],placeholder:[1,"placeholder"]},outputs:{timeChange:"timeChange"},decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","baseZIndex","ngModel","timeOnly","ngModelOptions","placeholder"],["size","small","label","Close",3,"click"]],template:function(i,n){if(i&1){let r=D();o(0,"p-datepicker",1,0),Ce("ngModelChange",function(h){return m(r),we(n.time,h)||(n.time=h),c(h)}),g("ngModelChange",function(h){return m(r),c(n.onTimeChange(h))})("onSelect",function(){return m(r),c(n.onShowCalendar())}),o(2,"p-footer")(3,"p-button",2),g("click",function(){return m(r),N(1).hideOverlay(),c(n.onShowCalendar())}),a()()()}i&2&&(Z("full-width",n.fullWidth()),p("baseZIndex",1100),_e("ngModel",n.time),p("timeOnly",!0)("ngModelOptions",U(7,gt))("placeholder",n.placeholder()))},dependencies:[z,W,L,Je,qe,Ze,Pe],styles:["p-datepicker span.p-datepicker.custom-height{height:44px;width:70px} p-datepicker.full-width span.p-datepicker.custom-height{height:44px;width:100%!important}"],changeDetection:0})}}return t})();var j=(()=>{class t{constructor(){this.httpService=S(Te),this.toastr=S(be),this.datePipe=S($)}gerChannelDetailById(e){return this.httpService.post(ee.GetChannelDetail,{ID:e})}getOrderPreview(e){return this.httpService.post(ee.GetOrderPreviewV2,e)}getDownloadOrder(e){return this.httpService.post(ee.GetDownloadOrderV2,e)}onPreviewOrder(e){return this.validateDatePreview(e)?this.getOrderPreview(e).pipe(me(i=>{i.Data?.length===0&&this.toastrEmptyPreview(e)})):de}toastrEmptyPreview(e){let i=this.datePipe.transform(e.From,"dd MMM yyyy"),n=this.datePipe.transform(e.To,"dd MMM yyyy"),r=e.TimeFrom?e.TimeFrom:"",f=e.TimeTo?e.TimeTo:"";this.toastr.info(`There is no orders from ${i} ${r} to ${n} ${f}!`,"No Orders!")}validateDatePreview(e){let i=!0;return e.downloadType==!0?y.getDaysDiff(e?.From,e?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),i=!1):y.getDaysDiff(e?.From,e?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),i=!1),i}getDateTitle(e,i){let n=y.formatTitleFromDate(new Date(e),new Date(i)),r=this.datePipe.transform(e,n),f=this.datePipe.transform(i,"dd MMM yyyy");return`${n==null?"":r+"-"} ${f}`}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ce({token:t,factory:t.\u0275fac})}}return t})();function _t(t,s){if(t&1&&(o(0,"ng-option",7),v(1,"img",17),d(2),a()),t&2){let e=s.$implicit;p("value",e.ID),l(),p("src",e==null?null:e.Img,ue),l(),E("",e.Name," ")}}function wt(t,s){if(t&1){let e=D();o(0,"div",8)(1,"div",4)(2,"h5"),d(3,"Type"),a(),o(4,"p",5),d(5,"Select Type want to download"),a()(),o(6,"div",4)(7,"div",18)(8,"div")(9,"mat-radio-group",19),g("ngModelChange",function(n){m(e);let r=_();return r.downloadType.set(n),c(r.onDownloadTypeChange())}),o(10,"mat-radio-button",20),d(11," Orders "),a(),o(12,"mat-radio-button",21),d(13," Disbursement "),a()()()(),o(14,"div",22)(15,"div",23),v(16,"i",24),a(),o(17,"p",25),d(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(t&2){let e=_();l(9),p("ngModel",e.downloadType()),l(),p("value",!1),l(2),p("value",!0)}}function Ct(t,s){t&1&&(o(0,"p",5),d(1," Select Disbursement date "),o(2,"span",26),d(3,"(payment date / order complete date)"),a(),d(4," of the channel you want to download (Max 1 Week). "),a())}function vt(t,s){t&1&&(o(0,"p",5),d(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function St(t,s){if(t&1){let e=D();o(0,"div",16)(1,"app-timepicker",27),g("timeChange",function(n){m(e);let r=_();return r.startTime.set(n),c(r.onStartTimeChange())}),a(),o(2,"span",28),d(3,"-"),a(),o(4,"app-timepicker",27),g("timeChange",function(n){m(e);let r=_();return r.endTime.set(n),c(r.onEndTimeChange())}),a()()}if(t&2){let e=_();l(),p("time",e.startTime()),l(3),p("time",e.endTime())}}var mt=(()=>{class t{constructor(){this.reset=V(!1),this.authService=S(te),this.tokenService=S(Ee),this.downloadService=S(j),this.downloadType=u(!1),this.selectedChannelId=u(null),this.channelOptions=u(this.authService.getChannels()),this.channelType=X,this.selectedChannel=u(null),this.showTimePicker=u(!1),this.startDate=u(null),this.endDate=u(null),this.startTime=u("00:00"),this.endTime=u("23:59"),this.minDate=u(new Date),this.maxDate=u(new Date),this.filterData=new I,this._onRememberMeChange=ye({alias:"onRememberMeChange"}),this.rememberMe=u(!1),Q(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0}),this.initDateValidation()}initDateValidation(){let e=this.tokenService?.getTokenValue(),i=e?.DownloadRange?JSON.parse(e?.DownloadRange):0;if(i<=0)this.minDate.set(null),this.maxDate.set(null);else{let n=new Date,r=y.addDays(n,i-1);this.minDate.set(r)}}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(e=>e.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(se(e=>e?.Model),pe(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let e=1;this.startDate()&&this.endDate()&&(e=y.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>e==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}onChangeRememberMe(e){this._onRememberMeChange.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange",_onRememberMeChange:"onRememberMeChange"},features:[q([j,Le()])],decls:32,vars:13,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"row","mt-6"],[1,"col-12","d-flex","align-items-center"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker","min","max"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel","maxlength"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"col-6","d-flex","align-items-center","gap-2","mt-10"],["type","checkbox",2,"width","16px","height","16px",3,"ngModelChange","ngModel"],[1,"ms-2"],[1,"mt-8","d-flex","align-items-center"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(i,n){if(i&1){let r=D();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),d(5,"Select a Channel"),a(),o(6,"p",5),d(7,"Select Channel want to download order"),a()(),o(8,"div",4)(9,"ng-select",6),g("ngModelChange",function(h){return m(r),n.selectedChannelId.set(h),c(n.onSelectChannel())}),O(10,_t,3,3,"ng-option",7,F),a()()(),w(12,wt,19,3,"div",8),Y(13,"async"),o(14,"div",8)(15,"div",4)(16,"h5"),d(17,"Date Range"),a(),w(18,Ct,5,0,"p",5)(19,vt,2,0,"p",5),a(),o(20,"div",4)(21,"div",9)(22,"mat-date-range-input",10)(23,"input",11),g("ngModelChange",function(h){return m(r),c(n.startDate.set(h))})("click",function(){m(r);let h=N(26);return c(h.open())}),a(),o(24,"input",12),g("ngModelChange",function(h){return m(r),n.endDate.set(h),c(n.onFilterDateChange())})("click",function(){m(r);let h=N(26);return c(h.open())}),a()(),v(25,"mat-date-range-picker",null,0),a(),o(27,"div",13)(28,"input",14),g("ngModelChange",function(h){return m(r),n.rememberMe.set(h),c(n.onChangeRememberMe(h))}),a(),o(29,"h5",15),d(30,"Save Date"),a()(),w(31,St,5,2,"div",16),a()()()()}if(i&2){let r,f,h=N(26);l(9),p("clearable",!1)("ngModel",n.selectedChannelId()),l(),R(n.channelOptions()),l(2),C((r=De(13,11,n.channelDetail$))!=null&&r.ServiceFeeWriteOff&&((r=n.selectedChannel())==null?null:r.TypeID)==n.channelType.Tokopedia?12:-1),l(6),C(n.downloadType()&&((f=n.selectedChannel())==null?null:f.TypeID)==n.channelType.Tokopedia?18:19),l(4),p("rangePicker",h)("min",n.minDate())("max",n.maxDate()),l(),p("ngModel",n.startDate()),l(),p("ngModel",n.endDate()),l(4),p("ngModel",n.rememberMe()),l(3),C(n.showTimePicker()?31:-1)}},dependencies:[Be,Re,Oe,We,Ae,$e,z,ke,Ve,W,Ne,L,pt,Ye,je,He,Ge,Ue,xe],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"],changeDetection:0})}}return t})();var T=(function(t){return t.ALL="all",t.SYNC="sync",t.WRONG="wrong",t.UNSYNC="unsync",t})(T||{});var G=(function(t){return t[t.DoNothing=0]="DoNothing",t[t.New=1]="New",t[t.Update=2]="Update",t})(G||{});var Dt=(t,s)=>({"btn-secondary text-white":t,"btn-outline-dark":s}),yt=(t,s)=>({"btn-success":t,"btn-outline-success":s}),xt=(t,s)=>({"btn-warning text-white":t,"btn-outline-warning":s}),bt=(t,s)=>({"btn-danger":t,"btn-outline-danger":s}),Tt=()=>({"min-width":"100%"}),Mt=()=>({minWidth:"14rem"}),Et=(t,s)=>({"over-due-today":t,"over-due":s});function Pt(t,s){t&1&&d(0," Created Date ")}function Vt(t,s){t&1&&d(0," Modified Date ")}function kt(t,s){if(t&1){let e=D();o(0,"p-multiselect",24),g("onChange",function(n){let r=m(e).filterCallback;return c(r(n.value))}),a()}if(t&2){let e=s.$implicit,i=_(2);p("ngModel",e)("options",i.channelStatusOptions())("panelStyle",U(3,Mt))}}function Nt(t,s){if(t&1&&(o(0,"tr"),v(1,"th",18),o(2,"th",19),d(3,"Number"),a(),o(4,"th",20),w(5,Pt,1,0)(6,Vt,1,0),a(),o(7,"th",21)(8,"div",22),d(9," Channel "),o(10,"p-columnFilter",23),k(11,kt,1,4,"ng-template",null,3,H),a()()(),o(13,"th",21),d(14,"POS Status"),a(),o(15,"th"),d(16,"Action"),a(),v(17,"th",18),a()),t&2){let e,i=_();l(5),C(((e=i.selectedChannel())==null?null:e.TypeID)===i.channelType.WooCommerce?5:6),l(5),p("showMatchModes",!1)("showOperator",!1)("showAddButton",!1)}}function It(t,s){if(t&1&&(o(0,"td"),d(1),Y(2,"date"),a()),t&2){let e=_().$implicit;l(),b(oe(2,1,e.Date,"dd MMM yyyy HH:mm:ss"))}}function Ft(t,s){if(t&1&&(o(0,"td"),d(1),Y(2,"date"),a()),t&2){let e=_().$implicit;l(),b(oe(2,1,e.Modified,"dd MMM yyyy HH:mm:ss"))}}function Ot(t,s){if(t&1&&(o(0,"span"),d(1),a()),t&2){let e=_().$implicit;l(),b(e.ActionString)}}function Rt(t,s){if(t&1&&(o(0,"li"),d(1),a()),t&2){let e=s.$implicit;l(),b(e)}}function Bt(t,s){if(t&1&&(o(0,"ul",26),O(1,Rt,2,1,"li",null,F),a()),t&2){let e=_().$implicit;l(),R(e.ActionString)}}function At(t,s){if(t&1&&(o(0,"span",27),v(1,"i",28),a()),t&2){let e=_().$implicit;p("title",Se("Delivery : ",e.DeliveryState,`
|
|
2
2
|
Payment : `,e.PaymentState))}}function $t(t,s){if(t&1&&(o(0,"tr")(1,"td"),d(2),a(),o(3,"td"),d(4),a(),w(5,It,3,4,"td")(6,Ft,3,4,"td"),o(7,"td")(8,"span"),d(9),a(),d(10),a(),o(11,"td",25)(12,"span"),d(13),a(),d(14),a(),o(15,"td"),w(16,Ot,2,1,"span"),w(17,Bt,3,0,"ul",26),a(),o(18,"td"),w(19,At,2,3,"span",27),a()()),t&2){let e,i=s.$implicit,n=s.rowIndex,r=_();l(2),b(n+1),l(2),b(i.Number),l(),C(((e=r.selectedChannel())==null?null:e.TypeID)===r.channelType.WooCommerce?5:6),l(4),E("",i.ChannelStatus," - "),l(),E("",i.ChannelStatusDescription," "),l(),B(A(13,Et,(i==null?null:i.Action)==r.actionPreviewOrder.Update,(i==null?null:i.Action)==r.actionPreviewOrder.New)),p("matTooltip",i.POSStatus==91||i.POSStatusDescription=="Conflict"?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),l(2),E("",i.POSStatus," - "),l(),E("",i.POSStatusDescription," "),l(2),C(i.ActionString.length==1?16:-1),l(),C(i.ActionString.length>1?17:-1),l(2),C(i.ChannelStatus!=99&&i.POSStatus!=99?19:-1)}}function Wt(t,s){t&1&&(o(0,"tr",29)(1,"td",30)(2,"div",31),v(3,"i",32),a(),o(4,"h4",33),d(5," There is no order to processed "),a()()())}var ct=(()=>{class t{constructor(){this.orderPreview=V(),this.selectedChannel=V(),this.channelType=X,this.allData=u(0),this.syncData=u(0),this.wrongData=u(0),this.unsyncData=u(0),this.pillStatus=u(T.ALL),this.actionPreviewOrder=G,this.previewStatus=T,this.displayPreviewData=u([]),this.exportOrders=new I,this.channelStatusOptions=J(()=>{let e=this.orderPreview()??[],i=new Map;return e.forEach(n=>{i.has(n.ChannelStatus)||i.set(n.ChannelStatus,n.ChannelStatusDescription)}),Array.from(i.entries()).map(([n,r])=>({label:`${n} - ${r}`,value:n}))}),Q(()=>{this.orderPreview()&&(this.filterPreviewData(T.ALL),this.initLengthStatusData())},{allowSignalWrites:!0})}filterPreviewData(e){this.pillStatus.update(()=>e),this.displayPreviewData.update(()=>this.filterDataByStatus(e))}initLengthStatusData(){this.wrongData.update(()=>this.filterDataByStatus(T.WRONG).length),this.syncData.update(()=>this.filterDataByStatus(T.SYNC).length),this.allData.update(()=>this.orderPreview().length),this.unsyncData.update(()=>this.filterDataByStatus(T.UNSYNC).length)}filterDataByStatus(e){let i=[];switch(e){case T.ALL:i=this.orderPreview();break;case T.SYNC:i=this.orderPreview().filter(n=>n.Action==G.DoNothing);break;case T.WRONG:i=this.orderPreview().filter(n=>n.Action==G.Update);break;case T.UNSYNC:i=this.orderPreview().filter(n=>n.Action==G.New);break}return i}onExportOrders(){this.exportOrders.emit()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["preview-step"]],inputs:{orderPreview:[1,"orderPreview"],selectedChannel:[1,"selectedChannel"]},outputs:{exportOrders:"onExportOrders"},decls:30,vars:27,consts:[["header",""],["body",""],["emptymessage",""],["filter",""],[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"col-12","d-flex","justify-content-between","align-items-end",2,"padding-left","0px","padding-right","0px"],[1,"nav","nav-pills"],[1,"nav-item","me-3"],[1,"btn","btn-sm","rounded-pill",3,"click"],[1,"nav-item","mx-3"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"click"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"click"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"click"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-print","me-3"],[3,"value","tableStyle"],["width","1%"],["width","25%"],["width","15%"],["width","10%"],[1,"d-flex","align-items-center","justify-content-between","gap-2"],["field","ChannelStatus","matchMode","in","display","menu",3,"showMatchModes","showOperator","showAddButton"],["optionLabel","label","optionValue","value","placeholder","All",2,"min-width","14rem","width","14rem",3,"onChange","ngModel","options","panelStyle"],["matTooltipClass","custom-width-tooltip",3,"matTooltip"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(i,n){if(i&1){let r=D();o(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"div")(5,"ul",8)(6,"li",9)(7,"button",10),g("click",function(){return m(r),c(n.filterPreviewData(n.previewStatus.ALL))}),d(8),a()(),o(9,"li",11)(10,"button",12),g("click",function(){return m(r),c(n.filterPreviewData(n.previewStatus.SYNC))}),d(11),a()(),o(12,"li",11)(13,"button",13),g("click",function(){return m(r),c(n.filterPreviewData(n.previewStatus.WRONG))}),d(14),a()(),o(15,"li",11)(16,"button",14),g("click",function(){return m(r),c(n.filterPreviewData(n.previewStatus.UNSYNC))}),d(17),a()()()(),o(18,"div")(19,"button",15),g("click",function(){return m(r),c(n.onExportOrders())}),v(20,"i",16),o(21,"span"),d(22,"Export"),a()()()()(),o(23,"p-table",17),k(24,Nt,18,4,"ng-template",null,0,H)(26,$t,20,16,"ng-template",null,1,H)(28,Wt,6,0,"ng-template",null,2,H),a()()()}i&2&&(l(7),B(A(14,Dt,n.pillStatus()=="all",n.pillStatus()!="all")),l(),E(" All (",n.allData(),") "),l(2),B(A(17,yt,n.pillStatus()=="sync",n.pillStatus()!="sync")),l(),E(" Existing (",n.syncData(),") "),l(2),B(A(20,xt,n.pillStatus()=="wrong",n.pillStatus()!="wrong")),l(),E(" Wrong Status (",n.wrongData(),") "),l(2),B(A(23,bt,n.pillStatus()=="unsync",n.pillStatus()!="unsync")),l(),E(" Missing (",n.unsyncData(),") "),l(6),p("value",n.displayPreviewData())("tableStyle",U(26,Tt)))},dependencies:[ne,Ie,lt,at,rt,Qe,Ke,z,W,L,$],encapsulation:2,changeDetection:0})}}return t})();var Lt=["stepper"];function zt(t,s){if(t&1){let e=D();o(0,"div",2)(1,"button",20),g("click",function(){m(e);let n=_();return c(n.onStepperBack())}),d(2," Back "),a(),o(3,"button",21),g("click",function(){m(e);let n=_();return c(n.onNextStep())}),d(4," Next "),a()()}if(t&2){let e=_();l(3),p("disabled",e.disabledNextFilter())}}function jt(t,s){if(t&1){let e=D();o(0,"button",22),g("click",function(){m(e);let n=_();return c(n.onNextStep())}),d(1," Next "),a()}if(t&2){let e=_();p("disabled",e.disabledNextFilter())}}function Gt(t,s){if(t&1){let e=D();o(0,"button",23),g("click",function(){m(e);let n=_();return c(n.onNewDownload())}),v(1,"i",24),d(2," New "),a()}}function Ut(t,s){t&1&&(v(0,"i",25),o(1,"span"),d(2,"Filter"),a())}function Yt(t,s){t&1&&(v(0,"i",26),o(1,"span"),d(2,"Preview"),a())}function Ht(t,s){if(t&1){let e=D();o(0,"preview-step",27),g("onExportOrders",function(){m(e);let n=_();return c(n.onExportOrders())}),a()}if(t&2){let e=_();p("orderPreview",s)("selectedChannel",e.selectedChannel())}}function Kt(t,s){t&1&&(v(0,"i",28),o(1,"span"),d(2,"Finish"),a())}function Qt(t,s){t&1&&v(0,"complete-step",16),t&2&&p("downloadResult",s)}function Zt(t,s){t&1&&(o(0,"h6"),d(1,"1"),a())}function qt(t,s){t&1&&(o(0,"h6"),d(1,"2"),a())}function Jt(t,s){t&1&&(o(0,"h6"),d(1,"3"),a())}var Vi=(()=>{class t{constructor(){this.downloadService=S(j),this.orderService=S(ae),this.productService=S(ze),this.authService=S(te),this.stepperSelectedIndex=u(0),this.disabledNextFilter=u(!0),this.filter=u(void 0),this.isResetFilter=u(!1),this.orderPreview=u(void 0),this.downloadPreview=u(void 0),this.pageTitle=u("Download to POS"),this.cacheKey=u(y.GuidEMpty),this.rememberMe=u(!1),this.selectedChannel=J(()=>{let e=this.filter()?.channelId;if(e)return this.productService.findChannelById(e,this.authService.getChannels())})}onFilterChange(e){this.filter.set(e),this.validateDisabledNext()}validateDisabledNext(){this.disabledNextFilter.update(()=>{let e=this.filter();return y.IsEmpty(e?.channelId)||!y.isValidDate(e.startDate)||!y.isValidDate(e.endDate)})}onNextStep(){switch(this.stepper.selectedIndex){case 0:this.onPreview();let e=this.productService.findChannelById(this.filter().channelId,this.authService.getChannels());this.setPageTitle(`Preview ${e?.Name}`);break;case 1:this.onDownload(),this.setPageTitle("Download");break}}onStepperNext(){this.stepper.selected.completed=!0,this.stepper.next()}onPreview(){let e=this.filter(),i={ID:e.channelId,From:e.startDate,To:e.endDate,IsDisbursement:e.downloadType};y.IsNotEmpty(e.startTime)&&(i=le(re({},i),{TimeFrom:e.startTime+":00",TimeTo:e.endTime+":00"})),this.downloadService.onPreviewOrder(i).subscribe(n=>{n.Data?.length>0&&(this.cacheKey.update(()=>n.CacheKey),this.onStepperNext()),this.orderPreview.set(n.Data)})}onExportOrders(){let e=this.filter(),i={ID:e.channelId,From:e.startDate?e.startDate:null,To:e.endDate?e.endDate:null},n=`Orders ${this.downloadService.getDateTitle(e.startDate,e.endDate)}`;this.orderService.exportOrders(i,n).subscribe()}onDownload(){let e=this.filter(),i={ID:e.channelId,From:e.startDate,To:e.endDate,ListPreview:[],IsDisbursement:e.downloadType,CacheKey:this.cacheKey()},n=this.orderPreview();i.ListPreview=n,this.downloadService.getDownloadOrder(i).subscribe(r=>{this.downloadPreview.set(r),this.onStepperNext()})}setPageTitle(e){let i=this.filter();this.pageTitle.update(()=>`
|
|
3
3
|
${e} (${this.downloadService.getDateTitle(i.startDate,i.endDate)})
|
|
4
4
|
`)}onStepperBack(){this.stepper.previous(),this.pageTitle.update(()=>"Download to POS")}onNewDownload(){this.isResetFilter.update(()=>!this.rememberMe()),this.stepper.reset(),this.stepperSelectedIndex.update(()=>0),this.orderPreview.set(void 0),this.downloadPreview.set(void 0),this.pageTitle.update(()=>"Download to POS")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-download-v2"]],viewQuery:function(i,n){if(i&1&&he(Lt,5),i&2){let r;fe(r=ge())&&(n.stepper=r.first)}},features:[q([j,ae,{provide:Xe,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:17,consts:[["stepper",""],[3,"hideSearchBox","hideSearchDropdown","headerTitle","description"],[1,"btn-group","me-3"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"disabled"],[1,"btn","btn-outline-secondary","btn-fill","d-flex","align-items-center","gap-2"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["linear","",1,"w-100","stepper-download",3,"selectedIndexChange","ngClass","selectedIndex"],["state","filter",3,"completed","editable"],["matStepLabel",""],[1,"w-100",3,"onFilterChange","onRememberMeChange","reset"],["state","preview",3,"editable","completed"],[3,"orderPreview","selectedChannel"],["state","finish"],[3,"downloadResult"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","bg-success","text-white",3,"click","disabled"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"click","disabled"],[1,"btn","btn-outline-secondary","btn-fill","d-flex","align-items-center","gap-2",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt"],[1,"fa-solid","fa-filter","me-3"],[1,"fa-solid","fa-file","me-3"],[3,"onExportOrders","orderPreview","selectedChannel"],[1,"fa-solid","fa-flag","me-3"]],template:function(i,n){if(i&1){let r=D();o(0,"mainpanel",1)(1,"actions"),w(2,zt,5,1,"div",2),w(3,jt,2,1,"button",3),w(4,Gt,3,0,"button",4),a(),o(5,"content")(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8)(10,"mat-stepper",9,0),g("selectedIndexChange",function(h){return m(r),c(n.stepperSelectedIndex.set(h))}),o(12,"mat-step",10),k(13,Ut,3,0,"ng-template",11),o(14,"filter-step",12),g("onFilterChange",function(h){return m(r),c(n.onFilterChange(h))})("onRememberMeChange",function(h){return m(r),c(n.rememberMe.set(h))}),a()(),o(15,"mat-step",13),k(16,Yt,3,0,"ng-template",11),w(17,Ht,1,2,"preview-step",14),a(),o(18,"mat-step",15),k(19,Kt,3,0,"ng-template",11),w(20,Qt,1,1,"complete-step",16),a(),k(21,Zt,2,0,"ng-template",17)(22,qt,2,0,"ng-template",18)(23,Jt,2,0,"ng-template",19),a()()()()()()()}if(i&2){let r,f,h=N(11);p("hideSearchBox",!0)("hideSearchDropdown",!0)("headerTitle",n.pageTitle())("description",n.pageTitle()),l(2),C(n.stepperSelectedIndex()==1?2:-1),l(),C(n.stepperSelectedIndex()==0?3:-1),l(),C(n.stepperSelectedIndex()==2?4:-1),l(6),p("ngClass",ve("last-edited-step-"+h.selectedIndex))("selectedIndex",n.stepperSelectedIndex()),l(2),p("completed",!1)("editable",n.stepperSelectedIndex()!=2),l(2),p("reset",n.isResetFilter()),l(),p("editable",n.stepperSelectedIndex()!=2)("completed",!1),l(2),C((r=n.orderPreview())?17:-1,r),l(3),C((f=n.downloadPreview())?20:-1,f)}},dependencies:[dt,mt,ct,ot,nt,et,it,tt,Fe,Me,ne],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.vertical-radio{display:flex;flex-direction:column;margin:15px 0}.mt-1rem{margin-top:1rem}.dateRange{padding-top:.8rem;padding-bottom:.8rem}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}.form-label-group.radio.download-type{height:45.5938px!important;border-radius:.375rem!important}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as re}from"./chunk-
|
|
1
|
+
import{a as re}from"./chunk-YN2RMQNA.js";import{a as E}from"./chunk-URNP457I.js";import{a as ne}from"./chunk-4MYXPN55.js";import{a as ie}from"./chunk-WDIDEDCE.js";import{a as te}from"./chunk-QCYVPHJM.js";import"./chunk-GK6WYUPQ.js";import"./chunk-WXZ5XRM6.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import{a as ee}from"./chunk-ZA4X34GE.js";import{a as $}from"./chunk-OJ4GCASY.js";import"./chunk-RVHJIVQ5.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import{b as Z}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import"./chunk-M65GNQVQ.js";import{a as Y}from"./chunk-MWUZF6ZW.js";import"./chunk-GF2RVIIT.js";import"./chunk-ITKXL7DT.js";import"./chunk-4AL6NJY5.js";import"./chunk-YOYMZEPB.js";import"./chunk-56UGSRXX.js";import"./chunk-UB22GZAR.js";import"./chunk-F7RHG53H.js";import"./chunk-X22WXNSF.js";import"./chunk-P6EDV7BS.js";import"./chunk-TVKTNDDY.js";import"./chunk-DGB7L5EQ.js";import"./chunk-7YP3O2JY.js";import"./chunk-BKB3Y5UC.js";import"./chunk-TPJEJZPT.js";import"./chunk-ISRTMJUH.js";import"./chunk-2VWSIT3Y.js";import"./chunk-2PONPJQD.js";import{b as X}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import"./chunk-VX4XXFQ3.js";import"./chunk-CXGF2BT5.js";import"./chunk-QXRG5XYP.js";import"./chunk-FDTKJPLI.js";import"./chunk-I4MUFYEG.js";import"./chunk-NNVT5X6O.js";import{A as U,c as G,h as J,m as K,o as Q}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import"./chunk-M5YUVUTR.js";import"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{B as j,D as q,z as R}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{$c as z,Eb as D,Ga as O,Oc as l,Pc as h,Sc as c,Tc as u,Uc as C,V,Vc as I,Wc as k,Xc as A,bc as W,dc as F,ec as N,gc as L,hc as B,ic as g,jc as e,kc as t,kd as w,lc as _,ld as x,mb as a,md as H,na as P,sc as b,ua as p,va as s,xc as v,zc as y}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{a as M,b as T}from"./chunk-66YHNWRR.js";function ae(d,S){if(d&1&&(e(0,"tr")(1,"td"),l(2),t(),e(3,"td"),_(4,"order-link",26),t(),e(5,"td"),l(6),t(),e(7,"td"),l(8),w(9,"number"),t(),e(10,"td"),l(11),w(12,"date"),t(),e(13,"td"),_(14,"app-channel-logo",27),t()()),d&2){let r=S.$implicit;a(2),h(r.Outlet),a(2),g("order",r),a(2),h(r.Customer),a(2),h(x(9,6,r.Amount)),a(3),h(H(12,8,r.Created,"dd MMM yyyy HH:mm")),a(3),g("typeId",r==null?null:r.TypeID)}}function le(d,S){if(d&1){let r=b();e(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),t(),e(6,"th",21),l(7,"Order number"),t(),e(8,"th"),l(9,"Customer"),t(),e(10,"th",22),l(11,"Amount"),t(),e(12,"th",23),l(13," Created On "),t(),e(14,"th",24),l(15,"Channel"),t()()(),e(16,"tbody"),L(17,ae,15,11,"tr",null,N),t()(),e(19,"app-custom-paginator",25),v("next",function(){p(r);let i=y();return s(i.initCancelledOrders())})("previous",function(){p(r);let i=y();return s(i.initCancelledOrders())}),t()()}if(d&2){let r=y(),o=A(0);a(17),B(o),a(2),g("filter",r.filter())("totaldata",o==null?null:o.length)("paginationTotal",o==null?null:o.length)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}function oe(d,S){d&1&&(e(0,"div",16),_(1,"app-empty-state"),t())}var Te=(()=>{class d{constructor(){this.orderService=P(E),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:r=>{this.initFromDate(r)},error:r=>{console.error("Error fetching default date:",r),this.initFromDate(null)}})}initFromDate(r){this.filter.update(o=>T(M({},o),{From:r})),this.initCancelledOrders()}initCancelledOrders(){this.cancelledOrders$=this.orderService.getCancelledOrders(this.filter()).pipe(V(1))}static{this.\u0275fac=function(o){return new(o||d)}}static{this.\u0275cmp=D({type:d,selectors:[["app-cancelled"]],features:[z([E])],decls:34,vars:11,consts:[["headerTitle","Cancelled","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[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"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"],[3,"order"],[3,"typeId"]],template:function(o,i){if(o&1){let m=b();I(0),w(1,"async"),e(2,"mainpanel",0),v("onSubmit",function(){return p(m),s(i.initCancelledOrders())}),C("textChange",function(n){return p(m),u(i.filter().Number,n)||(i.filter().Number=n),s(n)}),e(3,"actions")(4,"a",1),_(5,"i",2),e(6,"span"),l(7,"Order Fulfillment Display"),t()()(),e(8,"filters")(9,"div")(10,"label",3),l(11,"Channel"),t(),e(12,"app-channel-options-v2",4),C("ngModelChange",function(n){return p(m),u(i.filter().ListChannelID,n)||(i.filter().ListChannelID=n),s(n)}),t()(),e(13,"div",5)(14,"label",3),l(15,"From/To"),t(),e(16,"div",6)(17,"datepicker",7),C("dateChange",function(n){return p(m),u(i.filter().From,n)||(i.filter().From=n),s(n)}),t()(),e(18,"div")(19,"datepicker",8),C("dateChange",function(n){return p(m),u(i.filter().To,n)||(i.filter().To=n),s(n)}),t()()(),e(20,"div",5)(21,"label",9),l(22,"Page Number"),t(),e(23,"input",10),C("ngModelChange",function(n){return p(m),u(i.filter().PageNumber,n)||(i.filter().PageNumber=n),s(n)}),t()(),e(24,"div",5)(25,"label",9),l(26,"Page Size"),t(),e(27,"input",11),C("ngModelChange",function(n){return p(m),u(i.filter().PageSize,n)||(i.filter().PageSize=n),s(n)}),t()()(),e(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),W(32,le,20,5,"div",15)(33,oe,2,0,"div",16),t()()()()()}if(o&2){let m=k(x(1,8,i.cancelledOrders$));a(2),c("text",i.filter().Number),a(10),g("multiple",!0),c("ngModel",i.filter().ListChannelID),a(5),c("date",i.filter().From),a(2),c("date",i.filter().To),a(4),c("ngModel",i.filter().PageNumber),a(4),c("ngModel",i.filter().PageSize),a(5),F((m==null?null:m.length)>0?32:33)}},dependencies:[Z,$,ee,U,G,Q,J,K,ne,Y,X,re,ie,te,R,j,q],encapsulation:2,changeDetection:0})}}return d})();export{Te as CancelledComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-4PIQA6ZR.js";import"./chunk-4VNQYYVV.js";import{a as n}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-4PIQA6ZR.js";import"./chunk-4VNQYYVV.js";import{a as n}from"./chunk-HT44Y6CW.js";import{a as u}from"./chunk-N5UVIRO3.js";import"./chunk-M65GNQVQ.js";import"./chunk-MWUZF6ZW.js";import"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import"./chunk-VX4XXFQ3.js";import"./chunk-CXGF2BT5.js";import"./chunk-QXRG5XYP.js";import"./chunk-FDTKJPLI.js";import"./chunk-I4MUFYEG.js";import"./chunk-NNVT5X6O.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import"./chunk-M5YUVUTR.js";import{c as s}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{Eb as r,ic as c,jc as l,kc as p,lc as a,mb as i}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var d=(()=>{class t{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"},{Title:"Scan History",Url:"/menu/products/status/notificationV2",Description:"Scan results for each channel, including product counts and synchronization status"}]}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=r({type:t,selectors:[["app-status"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"]],template:function(o,h){o&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),a(3,"nav-tab",2),p()()(),a(4,"router-outlet")),o&2&&(i(3),c("Tabs",h.productTabs))},dependencies:[u,s],encapsulation:2})}}return t})();var T=[{component:d,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",loadComponent(){return import("./chunk-CAEGYKR3.js").then(t=>t.InPosComponent)},canActivate:[n,e],data:{title:"Products in POS"}},{path:"sold-in-channel",loadComponent(){return import("./chunk-VZMV27MV.js").then(t=>t.SoldInChannelComponent)},canActivate:[n,e],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",loadComponent(){return import("./chunk-D42XSNML.js").then(t=>t.NotInChannelComponent)},canActivate:[n,e],data:{title:"Products not in Channel"}},{path:"not-in-pos",loadComponent(){return import("./chunk-I7YLXAUU.js").then(t=>t.NotInPosComponent)},canActivate:[n,e],data:{title:"Products not in POS"}},{path:"duplicate-sku",loadComponent(){return import("./chunk-DEOUMTGT.js").then(t=>t.DuplicateSkuComponent)},canActivate:[n,e],data:{title:"Duplicate Sku in Channel"}},{path:"duplicate-sku/table",loadComponent(){return import("./chunk-B72J742I.js").then(t=>t.DuplicateSkuV2Component)},canActivate:[n,e],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",loadComponent(){return import("./chunk-TWTCFWHB.js").then(t=>t.ChannelStatisticComponent)},canActivate:[n,e],data:{title:"Channel Statistic"}},{path:"notification",loadComponent(){return import("./chunk-J24BC42H.js").then(t=>t.NotificationComponent)},canActivate:[n,e],data:{title:"Notification"}},{path:"notificationV2",loadComponent(){return import("./chunk-TIEUYSXG.js").then(t=>t.NotificationV2Component)},canActivate:[n,e],data:{title:"Notification"}},{path:"notificationV2/detailV2",loadComponent(){return import("./chunk-244VLQKF.js").then(t=>t.DetailComponent)},canActivate:[n,e],data:{title:"Notification Detail"}},{path:"notification/detail",loadComponent(){return import("./chunk-JNJAWXGM.js").then(t=>t.DetailComponent)},canActivate:[n,e],data:{title:"Notification Detail"}}]}];export{T as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as oe,b as le,c as pe}from"./chunk-CKU644YK.js";import{a as me}from"./chunk-
|
|
1
|
+
import{a as oe,b as le,c as pe}from"./chunk-CKU644YK.js";import{a as me}from"./chunk-YN2RMQNA.js";import{a as T}from"./chunk-URNP457I.js";import{a as de}from"./chunk-4MYXPN55.js";import{a as ae}from"./chunk-QCYVPHJM.js";import"./chunk-GK6WYUPQ.js";import"./chunk-WXZ5XRM6.js";import"./chunk-BDUUVK5L.js";import"./chunk-L2ENNT5V.js";import{a as re}from"./chunk-ZA4X34GE.js";import"./chunk-IFFI5CMD.js";import{a as ne}from"./chunk-OJ4GCASY.js";import"./chunk-RVHJIVQ5.js";import"./chunk-MKENTZJA.js";import"./chunk-V3PUPGL5.js";import"./chunk-2SCD4QZY.js";import"./chunk-K227XGG2.js";import"./chunk-PRLMMKRO.js";import"./chunk-MMGI42DQ.js";import"./chunk-2QRSAAJG.js";import"./chunk-ACIMXBIC.js";import"./chunk-3ANHDTTL.js";import"./chunk-YYY663CV.js";import"./chunk-N77J6LFN.js";import{b as ie}from"./chunk-5DRZPE5O.js";import"./chunk-MZRZ7VV3.js";import"./chunk-M65GNQVQ.js";import{a as te}from"./chunk-MWUZF6ZW.js";import"./chunk-GF2RVIIT.js";import"./chunk-ITKXL7DT.js";import"./chunk-4AL6NJY5.js";import"./chunk-YOYMZEPB.js";import"./chunk-56UGSRXX.js";import"./chunk-UB22GZAR.js";import"./chunk-F7RHG53H.js";import"./chunk-X22WXNSF.js";import"./chunk-P6EDV7BS.js";import"./chunk-TVKTNDDY.js";import"./chunk-DGB7L5EQ.js";import"./chunk-7YP3O2JY.js";import"./chunk-BKB3Y5UC.js";import"./chunk-TPJEJZPT.js";import"./chunk-ISRTMJUH.js";import"./chunk-2VWSIT3Y.js";import"./chunk-2PONPJQD.js";import{b as ee}from"./chunk-BQCLUDBO.js";import"./chunk-TM7PL3CC.js";import"./chunk-VX4XXFQ3.js";import"./chunk-CXGF2BT5.js";import"./chunk-QXRG5XYP.js";import"./chunk-FDTKJPLI.js";import"./chunk-I4MUFYEG.js";import"./chunk-NNVT5X6O.js";import{A as $,c as Q,h as X,m as Y,o as Z}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import"./chunk-M5YUVUTR.js";import"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{B as J,D as K,z as G}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{$c as H,Eb as W,Ga as O,Nc as k,Oc as l,Pc as v,Qc as w,Sc as h,Tc as g,Uc as f,Vc as z,Wc as A,Xc as R,ad as j,bc as y,bd as U,dc as b,ec as D,gc as I,hc as B,ic as u,jc as t,kb as F,kc as i,kd as x,lc as c,ld as V,mb as o,md as q,na as N,sc as E,ua as d,va as m,xc as M,zc as _}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import{a as P,b as L}from"./chunk-66YHNWRR.js";var se=()=>[],ce=r=>({"td-cell-hover":r});function ue(r,S){if(r&1&&c(0,"variants-dropdown",31),r&2){let e=_().$implicit;u("variants",e==null?null:e.Variants)}}function _e(r,S){if(r&1&&c(0,"variant-with-image",32),r&2){let e=_().$implicit;u("variant",e==null?null:e.Variants[0])}}function he(r,S){if(r&1&&(t(0,"span"),l(1),i()),r&2){let e=_().$implicit;o(),w("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ge(r,S){if(r&1&&(t(0,"tr")(1,"td")(2,"div",24),c(3,"img",25),x(4,"channelImage"),t(5,"div",26)(6,"div"),l(7),i(),t(8,"small",27)(9,"span"),l(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div"),c(14,"order-link",29),i(),t(15,"small"),l(16),x(17,"date"),i(),c(18,"br"),t(19,"small"),c(20,"i",30),l(21),i()()(),t(22,"td"),y(23,ue,1,1,"variants-dropdown",31)(24,_e,1,1,"variant-with-image",32),i(),t(25,"td",33),l(26),x(27,"number"),i(),t(28,"td")(29,"div",28)(30,"div",34)(31,"span"),l(32),i(),y(33,he,2,1,"span"),i(),t(34,"small"),l(35),i()()()()),r&2){let e=S.$implicit;o(3),u("src",V(4,14,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),o(4),v(e.Outlet),o(3),v(e.ChannelName),o(4),u("order",e),o(2),w(" ",q(17,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),o(5),w(" ",e.Customer," "),o(),k(U(21,ce,(e.Variants==null?null:e.Variants.length)>1)),o(),b((e.Variants==null?null:e.Variants.length)>1?23:24),o(3),v(V(27,19,e.Amount)),o(6),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),o(),b(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?33:-1),o(2),w(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function fe(r,S){if(r&1){let e=E();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),i(),t(6,"th",20),l(7,"Number"),i(),t(8,"th"),l(9,"Items"),i(),t(10,"th",21),l(11,"Amount"),i(),t(12,"th",22),l(13,"Shipping"),i()()(),t(14,"tbody"),I(15,ge,36,23,"tr",null,D),i()(),t(17,"app-custom-paginator",23),M("next",function(){d(e);let n=_();return m(n.initShippedOrders())})("previous",function(){d(e);let n=_();return m(n.initShippedOrders())}),i()()}if(r&2){let e=_(),p=R(0);o(15),B(p),o(2),u("filter",e.filter())("totaldata",p==null?null:p.length)}}function Se(r,S){r&1&&(t(0,"div",16),c(1,"app-empty-state"),i())}var ke=(()=>{class r{constructor(){this.orderService=N(T),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(p=>L(P({},p),{From:e})),this.initShippedOrders()}initShippedOrders(){this.shippedOrders$=this.orderService.getShippedOrders(this.filter())}static{this.\u0275fac=function(p){return new(p||r)}}static{this.\u0275cmp=W({type:r,selectors:[["app-shipped"]],features:[H([T])],decls:34,vars:12,consts:[["headerTitle","Shipped","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","80px"],["rowCountApi","/api/orders/shippedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"d-flex","align-items-end","gap-2"]],template:function(p,n){if(p&1){let s=E();z(0),x(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return d(s),m(n.initShippedOrders())}),f("textChange",function(a){return d(s),g(n.filter().Number,a)||(n.filter().Number=a),m(a)}),t(3,"actions")(4,"a",1),c(5,"i",2),t(6,"span"),l(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),l(11,"Channel"),i(),t(12,"app-channel-options-v2",4),f("ngModelChange",function(a){return d(s),g(n.filter().ListChannelID,a)||(n.filter().ListChannelID=a),m(a)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),f("dateChange",function(a){return d(s),g(n.filter().From,a)||(n.filter().From=a),m(a)}),i()(),t(18,"div")(19,"datepicker",8),f("dateChange",function(a){return d(s),g(n.filter().To,a)||(n.filter().To=a),m(a)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),f("ngModelChange",function(a){return d(s),g(n.filter().PageNumber,a)||(n.filter().PageNumber=a),m(a)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),f("ngModelChange",function(a){return d(s),g(n.filter().PageSize,a)||(n.filter().PageSize=a),m(a)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),y(32,fe,18,2,"div",15)(33,Se,2,0,"div",16),i()()()()()}if(p&2){let s=A(V(1,8,n.shippedOrders$)||j(11,se));o(2),h("text",n.filter().Number),o(10),u("multiple",!0),h("ngModel",n.filter().ListChannelID),o(5),h("date",n.filter().From),o(2),h("date",n.filter().To),o(4),h("ngModel",n.filter().PageNumber),o(4),h("ngModel",n.filter().PageSize),o(5),b(s.length>0?32:33)}},dependencies:[ie,ne,re,$,Q,Z,X,Y,le,pe,de,te,ee,me,ae,oe,G,J,K],encapsulation:2})}}return r})();export{ke as ShippedComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as X}from"./chunk-ZSUWHVKX.js";import{a as G,h as J}from"./chunk-GQRBV5VY.js";import"./chunk-CXGF2BT5.js";import"./chunk-QXRG5XYP.js";import"./chunk-FDTKJPLI.js";import{a as Y}from"./chunk-I4MUFYEG.js";import{a as b,c as W}from"./chunk-NNVT5X6O.js";import{A as le,c as Z,h as ee,i as te,k as ne,m as ie,n as oe,t as re,u as ae,v as se,w as de}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{b as Q}from"./chunk-M5YUVUTR.js";import{d as K}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{z as H}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{Dc as A,Eb as y,Ec as U,Fc as F,Ga as f,Jc as S,Nc as T,Oc as s,Pc as N,Qc as R,Rc as j,V as I,bc as _,cd as z,dc as h,fc as O,gc as P,hc as E,ia as D,ic as x,jc as o,kb as C,kc as r,kd as $,lc as m,ld as q,mb as a,mc as v,nc as M,oc as V,sc as k,tc as L,ua as p,va as g,wd as B,xb as w,xc as u,zc as d}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function ue(t,c){if(t&1&&(v(0,"swiper-slide")(1,"div")(2,"a",1),V(3,"img",2),M()(),v(4,"a",3),s(5),M(),v(6,"p",4),s(7),M()()),t&2){let e=c.$implicit;a(2),L("href",e.href,C),a(),L("src",e.imgSrc,C),a(),L("href",e.href,C),a(),N(e.title),a(2),N(e.description)}}var me=(()=>{class t{constructor(){this.newsList=B([])}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=y({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:[1,"newsList"]},decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(n,i){n&1&&(v(0,"swiper-container",0),P(1,ue,8,5,"swiper-slide",null,O),M()),n&2&&(a(),E(i.newsList()))},styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"],changeDetection:0})}}return t})();var pe=(()=>{class t{constructor(){}getBrowserName(){let e=window.navigator.userAgent.toLowerCase();switch(!0){case(e.indexOf("edge")>-1||e.indexOf("edg")>-1):return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var _e=["subdomainEl"],he=(t,c)=>({"rounded-end":t,"border-end-0":c});function xe(t,c){if(t&1&&(o(0,"div",33),m(1,"img",34),r()),t&2){let e=c.$implicit;a(),x("src",e.img,C)("title",e.title)("alt",e.title)}}function be(t,c){if(t&1){let e=k();o(0,"div",15)(1,"h3",16),s(2,"DealPOS Omnichannel"),r(),o(3,"small",17),s(4," Multichannel Inventory Management Software "),r()(),o(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),m(10,"i",22),r()(),o(11,"input",23,0),u("ngModelChange",function(i){p(e);let l=d();return g(l.subdomain.set(i))}),r(),o(13,"div")(14,"select",24),u("ngModelChange",function(i){p(e);let l=d();return g(l.domain.set(i))}),o(15,"option",25),s(16," .dealpos.co.id "),r(),o(17,"option",26),s(18,".dealpos.net"),r(),o(19,"option",27),s(20,".dealpos.com"),r(),o(21,"option",28),s(22,".dealpos.app"),r()()()(),o(23,"div",29)(24,"button",30),u("click",function(){p(e);let i=d();return g(i.onNextState())}),s(25," Next "),r()(),o(26,"div",31)(27,"div",32),P(28,xe,2,3,"div",33,O),r()()()()}if(t&2){let e=d();a(11),x("ngModel",e.subdomain()),a(3),x("ngModel",e.domain()),a(14),E(e.channels)}}function Ce(t,c){t&1&&(o(0,"p"),s(1,"Username is required"),r())}function we(t,c){if(t&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),_(3,Ce,2,0,"p"),r()()),t&2){d();let e=S(14);a(3),h(e.errors.required?3:-1)}}function ve(t,c){if(t&1){let e=k();o(0,"i",57),u("click",function(){p(e);let i=d(3);return g(i.hideShowPassword())}),r()}if(t&2){let e=d(3);T("fa "+e.passwordIcon())}}function Me(t,c){if(t&1&&(o(0,"span",47),_(1,ve,1,2,"i",56),r()),t&2){let e=d(2);a(),h(e.password()?1:-1)}}function Se(t,c){t&1&&(o(0,"p"),s(1,"Password is required"),r())}function ye(t,c){if(t&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),_(3,Se,2,0,"p"),r()()),t&2){d();let e=S(21);a(3),h(e.errors.required?3:-1)}}function Oe(t,c){if(t&1){let e=k();o(0,"div",35)(1,"h3",36),s(2,"Sign in"),r(),o(3,"h3",37),s(4," to "),o(5,"h6",38),s(6),r(),o(7,"i",39),u("click",function(){p(e);let i=d();return g(i.onEditDomain())}),r()()(),o(8,"form",40)(9,"div",41)(10,"div",21)(11,"span"),m(12,"i",42),r()(),o(13,"input",43,1),u("ngModelChange",function(i){p(e);let l=d();return g(l.username.set(i))}),r()(),_(15,we,4,1,"div",44),o(16,"div",20)(17,"div",21)(18,"span"),m(19,"i",45),r()(),o(20,"input",46,2),u("ngModelChange",function(i){p(e);let l=d();return g(l.password.set(i))}),r(),_(22,Me,2,1,"span",47),r(),_(23,ye,4,1,"div",44),o(24,"div",48)(25,"button",49),u("click",function(){p(e);let i=d();return g(i.onLogin())}),s(26," Log in "),r()(),o(27,"div",50),m(28,"hr"),o(29,"span",51),s(30,"or"),r(),m(31,"hr"),r(),o(32,"div")(33,"button",52),u("click",function(i){p(e);let l=d();return g(l.onLoginByGoogle(i))}),m(34,"i",53),s(35," Sign In with Google "),r()()()}if(t&2){let e=S(14),n=S(21),i=d();a(6),j(" (",i.subdomain(),"",i.domain(),") "),a(7),x("ngModel",i.username()),a(2),h(e.invalid&&(e.dirty||e.touched)?15:-1),a(5),T(z(10,he,i.browser()=="edge",i.browser()!="edge")),x("type",i.passwordType())("ngModel",i.password()),a(2),h(i.browser()!="edge"?22:-1),a(),h(n.invalid&&(n.dirty||n.touched)?23:-1)}}var He=(()=>{class t{constructor(e,n,i,l,ge){this._router=e,this.toastr=n,this.checkBrowser=i,this.authService=l,this.ngxPermission=ge,this.username=f(""),this.password=f(""),this.subdomain=f(""),this.domain=f(".dealpos.co.id"),this.loginState=f("FORM_DOMAIN"),this.passwordType=f("password"),this.passwordIcon=f("fa-eye"),this.browser=f(""),this.channels=[{title:"Shopee",img:b.SHOOPE},{title:"Tokopedia",img:b.TOKOPEDIA},{title:"Tiktok",img:b.TIKTOK},{title:"Woocommerce",img:b.WOOCOMMERCE},{title:"Lazada",img:b.LAZADA},{title:"Shopify",img:b.SHOPIFY},{title:"Plugo",img:b.PLUGONEW}],this.version=G.version,this.news$=l.getNews().pipe(I(1))}ngOnInit(){this.initLogin(),this.browser.set(this.checkBrowser.getBrowserName()),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let e=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=e}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let e=JSON.parse(localStorage.getItem("Authorization"));if(e){this.username.set(e?.username||""),this.subdomain.set(e?.Host?.split(".")[0]||"");let n=e?.Host?.split("dealpos");this.domain.set(`.dealpos${n[1]}`),this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(W.IsEmpty(this.subdomain())){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState.set("FORM_AUTH")}parseSubdomain(){let e=this.subdomain(),n=e.indexOf(".dealpos");n!=-1&&this.subdomain.set(e.substring(0,n))}onEditDomain(){this.loginState.set("FORM_DOMAIN")}onLogin(){let e={Host:`${this.subdomain()}${this.domain()}`,Username:this.username(),Password:this.password()};this.authService.login(e).subscribe(n=>{this.onSuccessLogin(n)})}onLoginByGoogle(e){let n=`${this.subdomain()}${this.domain()}`;this.authService.loginWithGoogle(e,n).subscribe(i=>{this.onSuccessLogin(i)})}onSuccessLogin(e){this.ngxPermission.hasPermission([X.DashboardView]).then(n=>{n?this._router.navigate(["menu/dashboard"]):e?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType.set(this.passwordType()==="text"?"password":"text"),this.passwordIcon.set(this.passwordIcon()==="fa-eye"?"fa-eye-slash":"fa-eye")}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(n){return new(n||t)(w(K),w(Q),w(pe),w(J),w(Y))}}static{this.\u0275cmp=y({type:t,selectors:[["app-login"]],viewQuery:function(n,i){if(n&1&&A(_e,5),n&2){let l;U(l=F())&&(i.subdomainEl=l.first)}},decls:18,vars:6,consts:[["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngModel"],[1,"input-group-text","border-start-0","rounded-end"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[2,"width","52px"],[1,"text-danger","ps-1"],[3,"class"],[3,"click"]],template:function(n,i){n&1&&(o(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3",6),s(4,"New Features"),r(),m(5,"POS-news-swiper",7),$(6,"async"),r(),o(7,"div",8),_(8,be,30,2)(9,Oe,36,13),r()(),o(10,"div",9)(11,"span",10),s(12,"powered by :"),r(),m(13,"a",11),r(),o(14,"div",12)(15,"a",13),s(16),m(17,"i",14),r()()()),n&2&&(a(5),x("newsList",q(6,4,i.news$)),a(3),h(i.loginState()=="FORM_DOMAIN"?8:9),a(7),x("href",i.changelogUrl,C),a(),R("version ",i.version))},dependencies:[me,le,oe,ae,se,Z,re,ee,te,de,ie,ne,H],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media(max-width:768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width:1300px)and (min-width:1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media(max-width:820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media(max-width:768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media(min-width:1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media(max-width:768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media(min-width:1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media(max-width:768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"],changeDetection:0})}}return t})();export{He as LoginComponent};
|
|
1
|
+
import{a as X}from"./chunk-ZSUWHVKX.js";import{a as G,h as J}from"./chunk-VX4XXFQ3.js";import"./chunk-CXGF2BT5.js";import"./chunk-QXRG5XYP.js";import"./chunk-FDTKJPLI.js";import{a as Y}from"./chunk-I4MUFYEG.js";import{a as b,c as W}from"./chunk-NNVT5X6O.js";import{A as le,c as Z,h as ee,i as te,k as ne,m as ie,n as oe,t as re,u as ae,v as se,w as de}from"./chunk-P6BSXX22.js";import"./chunk-EISQQYRT.js";import"./chunk-34FX4M3J.js";import{b as Q}from"./chunk-M5YUVUTR.js";import{d as K}from"./chunk-RRBAJSPM.js";import"./chunk-D7WVAWLI.js";import{z as H}from"./chunk-MLQKT6FW.js";import"./chunk-ASFPLYOZ.js";import{Dc as A,Eb as y,Ec as U,Fc as F,Ga as f,Jc as S,Nc as T,Oc as s,Pc as N,Qc as R,Rc as j,V as I,bc as _,cd as z,dc as h,fc as O,gc as P,hc as E,ia as D,ic as x,jc as o,kb as C,kc as r,kd as $,lc as m,ld as q,mb as a,mc as v,nc as M,oc as V,sc as k,tc as L,ua as p,va as g,wd as B,xb as w,xc as u,zc as d}from"./chunk-KCXC4XYC.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function ue(t,c){if(t&1&&(v(0,"swiper-slide")(1,"div")(2,"a",1),V(3,"img",2),M()(),v(4,"a",3),s(5),M(),v(6,"p",4),s(7),M()()),t&2){let e=c.$implicit;a(2),L("href",e.href,C),a(),L("src",e.imgSrc,C),a(),L("href",e.href,C),a(),N(e.title),a(2),N(e.description)}}var me=(()=>{class t{constructor(){this.newsList=B([])}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=y({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:[1,"newsList"]},decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(n,i){n&1&&(v(0,"swiper-container",0),P(1,ue,8,5,"swiper-slide",null,O),M()),n&2&&(a(),E(i.newsList()))},styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"],changeDetection:0})}}return t})();var pe=(()=>{class t{constructor(){}getBrowserName(){let e=window.navigator.userAgent.toLowerCase();switch(!0){case(e.indexOf("edge")>-1||e.indexOf("edg")>-1):return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var _e=["subdomainEl"],he=(t,c)=>({"rounded-end":t,"border-end-0":c});function xe(t,c){if(t&1&&(o(0,"div",33),m(1,"img",34),r()),t&2){let e=c.$implicit;a(),x("src",e.img,C)("title",e.title)("alt",e.title)}}function be(t,c){if(t&1){let e=k();o(0,"div",15)(1,"h3",16),s(2,"DealPOS Omnichannel"),r(),o(3,"small",17),s(4," Multichannel Inventory Management Software "),r()(),o(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),m(10,"i",22),r()(),o(11,"input",23,0),u("ngModelChange",function(i){p(e);let l=d();return g(l.subdomain.set(i))}),r(),o(13,"div")(14,"select",24),u("ngModelChange",function(i){p(e);let l=d();return g(l.domain.set(i))}),o(15,"option",25),s(16," .dealpos.co.id "),r(),o(17,"option",26),s(18,".dealpos.net"),r(),o(19,"option",27),s(20,".dealpos.com"),r(),o(21,"option",28),s(22,".dealpos.app"),r()()()(),o(23,"div",29)(24,"button",30),u("click",function(){p(e);let i=d();return g(i.onNextState())}),s(25," Next "),r()(),o(26,"div",31)(27,"div",32),P(28,xe,2,3,"div",33,O),r()()()()}if(t&2){let e=d();a(11),x("ngModel",e.subdomain()),a(3),x("ngModel",e.domain()),a(14),E(e.channels)}}function Ce(t,c){t&1&&(o(0,"p"),s(1,"Username is required"),r())}function we(t,c){if(t&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),_(3,Ce,2,0,"p"),r()()),t&2){d();let e=S(14);a(3),h(e.errors.required?3:-1)}}function ve(t,c){if(t&1){let e=k();o(0,"i",57),u("click",function(){p(e);let i=d(3);return g(i.hideShowPassword())}),r()}if(t&2){let e=d(3);T("fa "+e.passwordIcon())}}function Me(t,c){if(t&1&&(o(0,"span",47),_(1,ve,1,2,"i",56),r()),t&2){let e=d(2);a(),h(e.password()?1:-1)}}function Se(t,c){t&1&&(o(0,"p"),s(1,"Password is required"),r())}function ye(t,c){if(t&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),_(3,Se,2,0,"p"),r()()),t&2){d();let e=S(21);a(3),h(e.errors.required?3:-1)}}function Oe(t,c){if(t&1){let e=k();o(0,"div",35)(1,"h3",36),s(2,"Sign in"),r(),o(3,"h3",37),s(4," to "),o(5,"h6",38),s(6),r(),o(7,"i",39),u("click",function(){p(e);let i=d();return g(i.onEditDomain())}),r()()(),o(8,"form",40)(9,"div",41)(10,"div",21)(11,"span"),m(12,"i",42),r()(),o(13,"input",43,1),u("ngModelChange",function(i){p(e);let l=d();return g(l.username.set(i))}),r()(),_(15,we,4,1,"div",44),o(16,"div",20)(17,"div",21)(18,"span"),m(19,"i",45),r()(),o(20,"input",46,2),u("ngModelChange",function(i){p(e);let l=d();return g(l.password.set(i))}),r(),_(22,Me,2,1,"span",47),r(),_(23,ye,4,1,"div",44),o(24,"div",48)(25,"button",49),u("click",function(){p(e);let i=d();return g(i.onLogin())}),s(26," Log in "),r()(),o(27,"div",50),m(28,"hr"),o(29,"span",51),s(30,"or"),r(),m(31,"hr"),r(),o(32,"div")(33,"button",52),u("click",function(i){p(e);let l=d();return g(l.onLoginByGoogle(i))}),m(34,"i",53),s(35," Sign In with Google "),r()()()}if(t&2){let e=S(14),n=S(21),i=d();a(6),j(" (",i.subdomain(),"",i.domain(),") "),a(7),x("ngModel",i.username()),a(2),h(e.invalid&&(e.dirty||e.touched)?15:-1),a(5),T(z(10,he,i.browser()=="edge",i.browser()!="edge")),x("type",i.passwordType())("ngModel",i.password()),a(2),h(i.browser()!="edge"?22:-1),a(),h(n.invalid&&(n.dirty||n.touched)?23:-1)}}var He=(()=>{class t{constructor(e,n,i,l,ge){this._router=e,this.toastr=n,this.checkBrowser=i,this.authService=l,this.ngxPermission=ge,this.username=f(""),this.password=f(""),this.subdomain=f(""),this.domain=f(".dealpos.co.id"),this.loginState=f("FORM_DOMAIN"),this.passwordType=f("password"),this.passwordIcon=f("fa-eye"),this.browser=f(""),this.channels=[{title:"Shopee",img:b.SHOOPE},{title:"Tokopedia",img:b.TOKOPEDIA},{title:"Tiktok",img:b.TIKTOK},{title:"Woocommerce",img:b.WOOCOMMERCE},{title:"Lazada",img:b.LAZADA},{title:"Shopify",img:b.SHOPIFY},{title:"Plugo",img:b.PLUGONEW}],this.version=G.version,this.news$=l.getNews().pipe(I(1))}ngOnInit(){this.initLogin(),this.browser.set(this.checkBrowser.getBrowserName()),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let e=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=e}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let e=JSON.parse(localStorage.getItem("Authorization"));if(e){this.username.set(e?.username||""),this.subdomain.set(e?.Host?.split(".")[0]||"");let n=e?.Host?.split("dealpos");this.domain.set(`.dealpos${n[1]}`),this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(W.IsEmpty(this.subdomain())){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState.set("FORM_AUTH")}parseSubdomain(){let e=this.subdomain(),n=e.indexOf(".dealpos");n!=-1&&this.subdomain.set(e.substring(0,n))}onEditDomain(){this.loginState.set("FORM_DOMAIN")}onLogin(){let e={Host:`${this.subdomain()}${this.domain()}`,Username:this.username(),Password:this.password()};this.authService.login(e).subscribe(n=>{this.onSuccessLogin(n)})}onLoginByGoogle(e){let n=`${this.subdomain()}${this.domain()}`;this.authService.loginWithGoogle(e,n).subscribe(i=>{this.onSuccessLogin(i)})}onSuccessLogin(e){this.ngxPermission.hasPermission([X.DashboardView]).then(n=>{n?this._router.navigate(["menu/dashboard"]):e?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType.set(this.passwordType()==="text"?"password":"text"),this.passwordIcon.set(this.passwordIcon()==="fa-eye"?"fa-eye-slash":"fa-eye")}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(n){return new(n||t)(w(K),w(Q),w(pe),w(J),w(Y))}}static{this.\u0275cmp=y({type:t,selectors:[["app-login"]],viewQuery:function(n,i){if(n&1&&A(_e,5),n&2){let l;U(l=F())&&(i.subdomainEl=l.first)}},decls:18,vars:6,consts:[["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngModel"],[1,"input-group-text","border-start-0","rounded-end"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[2,"width","52px"],[1,"text-danger","ps-1"],[3,"class"],[3,"click"]],template:function(n,i){n&1&&(o(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3",6),s(4,"New Features"),r(),m(5,"POS-news-swiper",7),$(6,"async"),r(),o(7,"div",8),_(8,be,30,2)(9,Oe,36,13),r()(),o(10,"div",9)(11,"span",10),s(12,"powered by :"),r(),m(13,"a",11),r(),o(14,"div",12)(15,"a",13),s(16),m(17,"i",14),r()()()),n&2&&(a(5),x("newsList",q(6,4,i.news$)),a(3),h(i.loginState()=="FORM_DOMAIN"?8:9),a(7),x("href",i.changelogUrl,C),a(),R("version ",i.version))},dependencies:[me,le,oe,ae,se,Z,re,ee,te,de,ie,ne,H],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media(max-width:768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width:1300px)and (min-width:1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media(max-width:820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media(max-width:768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media(min-width:1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media(max-width:768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media(min-width:1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media(max-width:768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"],changeDetection:0})}}return t})();export{He as LoginComponent};
|