marketplacepos 5.45.0 → 5.46.1
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-26ZM2UD3.js +1 -0
- package/Marketplace/{chunk-FPYZBABH.js → chunk-2O4IEGGR.js} +1 -1
- package/Marketplace/chunk-2SGPD432.js +1 -0
- package/Marketplace/{chunk-B7JSVIVV.js → chunk-2XWZQCUR.js} +1 -1
- package/Marketplace/{chunk-XP6R2ZYJ.js → chunk-2Z7CPNRS.js} +1 -1
- package/Marketplace/{chunk-Z3ZYINRX.js → chunk-3BALA33G.js} +1 -1
- package/Marketplace/{chunk-6RLISMEX.js → chunk-3GDM5JNY.js} +1 -1
- package/Marketplace/chunk-3VUO4APC.js +1 -0
- package/Marketplace/{chunk-LBXSZJDS.js → chunk-4G7SG2H6.js} +1 -1
- package/Marketplace/{chunk-6WCXK7FR.js → chunk-4LZODV4E.js} +2 -2
- package/Marketplace/chunk-4NEKWRL7.js +1 -0
- package/Marketplace/chunk-4TDVVQ64.js +1 -0
- package/Marketplace/chunk-4YRBARG2.js +1 -0
- package/Marketplace/{chunk-LDD4NVMB.js → chunk-5CKVZBHM.js} +1 -1
- package/Marketplace/{chunk-PFXOFSJG.js → chunk-67HPC5Y3.js} +1 -1
- package/Marketplace/{chunk-MMUSTFHH.js → chunk-6CIQBRO4.js} +1 -1
- package/Marketplace/{chunk-FFCWYWBW.js → chunk-6H2KAYSB.js} +6 -99
- package/Marketplace/{chunk-WLRPCY65.js → chunk-6OMSPZZC.js} +1 -1
- package/Marketplace/{chunk-6VDV7CA2.js → chunk-6U4YIJLC.js} +2 -2
- package/Marketplace/chunk-6VYFG4AQ.js +1 -0
- package/Marketplace/chunk-77MWKV5I.js +158 -0
- package/Marketplace/chunk-7DJXZQ7M.js +1 -0
- package/Marketplace/{chunk-DFGZ4L65.js → chunk-7G6GQTSH.js} +1 -1
- package/Marketplace/{chunk-BBQGPXDH.js → chunk-A6PXM4YX.js} +1 -1
- package/Marketplace/{chunk-HFCAD7GH.js → chunk-ABYG6YZT.js} +1 -1
- package/Marketplace/{chunk-3TYYN7ZX.js → chunk-AGZCB65X.js} +1 -1
- package/Marketplace/{chunk-QHE3PKRD.js → chunk-BAXQ2L7B.js} +1 -1
- package/Marketplace/{chunk-2HNZ6XV3.js → chunk-BKRCW7SH.js} +1 -1
- package/Marketplace/{chunk-IQ4AFE6X.js → chunk-BMYBLBSP.js} +3 -3
- package/Marketplace/chunk-CGEIIRYF.js +1 -0
- package/Marketplace/chunk-CGOB6Y3X.js +1 -0
- package/Marketplace/{chunk-3LN6RMRN.js → chunk-CJ4F7QUO.js} +1 -1
- package/Marketplace/chunk-CRKCNTXF.js +1 -0
- package/Marketplace/{chunk-JJKMVDXR.js → chunk-CVM573KF.js} +1 -1
- package/Marketplace/{chunk-6V4LFY52.js → chunk-DAXM2MPK.js} +1 -1
- package/Marketplace/chunk-DB7C3AL2.js +257 -0
- package/Marketplace/chunk-DSYYZDXI.js +1 -0
- package/Marketplace/chunk-DZEO4HK4.js +1 -0
- package/Marketplace/chunk-EFI2CLNP.js +1 -0
- package/Marketplace/{chunk-2I7ZZ3F2.js → chunk-EHBCYQSG.js} +1 -1
- package/Marketplace/{chunk-QP4C4R4W.js → chunk-EHUVS2VB.js} +1 -1
- package/Marketplace/{chunk-2TN45S53.js → chunk-EI65NYTN.js} +1 -1
- package/Marketplace/chunk-EPBVNII2.js +51 -0
- package/Marketplace/{chunk-G7T42LFR.js → chunk-EYONZQ2W.js} +1 -1
- package/Marketplace/chunk-F2533PAC.js +1 -0
- package/Marketplace/chunk-FB2AEPXA.js +15 -0
- package/Marketplace/{chunk-VVX6LRMW.js → chunk-FGFIV3VO.js} +1 -1
- package/Marketplace/chunk-FGRPTNDB.js +234 -0
- package/Marketplace/chunk-FHWKSD5A.js +3 -0
- package/Marketplace/chunk-FIAI5SPR.js +1 -0
- package/Marketplace/chunk-FTWATKXK.js +1 -0
- package/Marketplace/chunk-GHVAGYK3.js +2 -0
- package/Marketplace/chunk-GKRWJPI3.js +2 -0
- package/Marketplace/chunk-GPGD3XQH.js +1 -0
- package/Marketplace/{chunk-ZKXPDUO4.js → chunk-GQXYHXWJ.js} +1 -1
- package/Marketplace/{chunk-YIXZLIPA.js → chunk-GRYGUILI.js} +2 -2
- package/Marketplace/{chunk-BJUPMCEP.js → chunk-GZKOMS4T.js} +1 -1
- package/Marketplace/{chunk-LF6HWNC2.js → chunk-HERZ7KEM.js} +1 -1
- package/Marketplace/{chunk-FESS3PG3.js → chunk-HHO2NGCF.js} +1 -1
- package/Marketplace/{chunk-3UN6FPMN.js → chunk-HIC5QC3Y.js} +1 -1
- package/Marketplace/{chunk-4VITMSIA.js → chunk-HITTNWB6.js} +1 -1
- package/Marketplace/{chunk-FO7G4GMY.js → chunk-HJXYT6MI.js} +3 -3
- package/Marketplace/{chunk-5LQRO4AI.js → chunk-IHSGQFDX.js} +2 -2
- package/Marketplace/{chunk-XXWBR6S5.js → chunk-IITU3NV6.js} +1 -1
- package/Marketplace/chunk-ISUN5G42.js +5 -0
- package/Marketplace/chunk-IWKRZSYG.js +1 -0
- package/Marketplace/{chunk-LDPDLCRL.js → chunk-JBT7GBCM.js} +1 -1
- package/Marketplace/{chunk-BFPMFJI7.js → chunk-JGEU4EJT.js} +1 -1
- package/Marketplace/chunk-JYCBJ7CC.js +1 -0
- package/Marketplace/chunk-KCFCXS2F.js +1 -0
- package/Marketplace/{chunk-L7EQZACZ.js → chunk-KFOHH7PE.js} +1 -1
- package/Marketplace/chunk-KRQHTRFM.js +7 -0
- package/Marketplace/{chunk-B67DSLBY.js → chunk-KS7ACI26.js} +6 -6
- package/Marketplace/{chunk-OK3LLCAK.js → chunk-KSHWHTCH.js} +1 -1
- package/Marketplace/{chunk-LK2PMDRL.js → chunk-L7TKCTLD.js} +1 -1
- package/Marketplace/{chunk-RNTPX24O.js → chunk-LBMUKJV5.js} +1 -1
- package/Marketplace/{chunk-UXPULNCR.js → chunk-LDL3A7NM.js} +1 -1
- package/Marketplace/chunk-LFGPYQCI.js +1 -0
- package/Marketplace/chunk-LOU3DIPY.js +1 -0
- package/Marketplace/{chunk-DZYBXWL2.js → chunk-LYPHZP72.js} +1 -1
- package/Marketplace/chunk-M7LXGXUM.js +1 -0
- package/Marketplace/{chunk-NNRBGHXB.js → chunk-MFQQEEHJ.js} +3 -3
- package/Marketplace/chunk-MJNFY4NT.js +1 -0
- package/Marketplace/chunk-MX5SR3SR.js +94 -0
- package/Marketplace/chunk-NLPXBGIX.js +1 -0
- package/Marketplace/{chunk-CHWXOJDB.js → chunk-NNOI3AG4.js} +1 -1
- package/Marketplace/chunk-NWWYOZ4V.js +5 -0
- package/Marketplace/chunk-OAG6OVUY.js +1 -0
- package/Marketplace/{chunk-TC4JRJQL.js → chunk-OE7TF7SI.js} +1 -1
- package/Marketplace/{chunk-QK4BGDSS.js → chunk-OHVOVAKD.js} +1 -1
- package/Marketplace/chunk-OJZ7NGRW.js +1 -0
- package/Marketplace/{chunk-DDVDUCPY.js → chunk-ORLTYLPA.js} +1 -1
- package/Marketplace/chunk-OVPVQS4J.js +33 -0
- package/Marketplace/{chunk-UIFPDTMW.js → chunk-OXWPLJEW.js} +1 -1
- package/Marketplace/{chunk-BQIB3N6V.js → chunk-PFY5UG5D.js} +1 -1
- package/Marketplace/{chunk-74ELVGDK.js → chunk-PHUHUFYL.js} +1 -1
- package/Marketplace/{chunk-ELSSXU6Y.js → chunk-PIBVGTHJ.js} +1 -1
- package/Marketplace/{chunk-OFZOAEW5.js → chunk-PQQSREEC.js} +1 -1
- package/Marketplace/{chunk-QBL6V7QF.js → chunk-Q4N2QUV6.js} +1 -1
- package/Marketplace/{chunk-QE3IIBDW.js → chunk-QOP7KZK7.js} +1 -1
- package/Marketplace/{chunk-M7V7A7Z6.js → chunk-QW4EOJRM.js} +1 -1
- package/Marketplace/{chunk-WPELZYFP.js → chunk-QWISVEBT.js} +1 -1
- package/Marketplace/{chunk-4KHHGHFJ.js → chunk-RAQRGWCZ.js} +2 -2
- package/Marketplace/chunk-RC5PUUVM.js +193 -0
- package/Marketplace/{chunk-WWISWZF5.js → chunk-RGAKHXPF.js} +1 -1
- package/Marketplace/{chunk-ZBKUZ4CN.js → chunk-RGAWEFPQ.js} +1 -1
- package/Marketplace/{chunk-V5KHEF77.js → chunk-RJ5D24ZW.js} +1 -1
- package/Marketplace/chunk-RM2OSYMV.js +1 -0
- package/Marketplace/{chunk-KXEADFBM.js → chunk-RNNH3EZC.js} +1 -1
- package/Marketplace/{chunk-YNJPF4PB.js → chunk-S3FZRSRP.js} +1 -1
- package/Marketplace/{chunk-HPFBJL3A.js → chunk-SLEJQAL7.js} +1 -1
- package/Marketplace/chunk-SZGOLKC6.js +1 -0
- package/Marketplace/{chunk-UYLSZYOD.js → chunk-T2OSIFLN.js} +1 -1
- package/Marketplace/chunk-T43QRQH5.js +1 -0
- package/Marketplace/chunk-TE5EYKIN.js +5 -0
- package/Marketplace/chunk-TGQ5CJ3A.js +1 -0
- package/Marketplace/chunk-UGG2CIUU.js +1 -0
- package/Marketplace/{chunk-WFT47MCY.js → chunk-UZWED4UK.js} +1 -1
- package/Marketplace/{chunk-BYSLV4DQ.js → chunk-V6UNCLNJ.js} +2 -2
- package/Marketplace/{chunk-LRUVI2Z3.js → chunk-VFATXJRG.js} +1 -1
- package/Marketplace/chunk-VIDSOLHF.js +1 -0
- package/Marketplace/{chunk-FVORY74O.js → chunk-W3DTXPRM.js} +1 -1
- package/Marketplace/{chunk-6KBMGQMI.js → chunk-WAZXTB4X.js} +1 -1
- package/Marketplace/{chunk-W5L6FMO3.js → chunk-WN5DZGA4.js} +1 -1
- package/Marketplace/{chunk-A64VIOKR.js → chunk-WRJFUNM3.js} +1 -1
- package/Marketplace/{chunk-TYG67JH3.js → chunk-XPCRS7AL.js} +1 -1
- package/Marketplace/{chunk-TH6VZX34.js → chunk-XXT6F2ZS.js} +1 -1
- package/Marketplace/{chunk-KUUDZPGN.js → chunk-YB4KXB2C.js} +1 -1
- package/Marketplace/chunk-YFDFIBAG.js +1 -0
- package/Marketplace/{chunk-N2SPK2VI.js → chunk-YQLOB7IQ.js} +1 -1
- package/Marketplace/{chunk-PPHTN2H6.js → chunk-YTCIQBSO.js} +1 -1
- package/Marketplace/chunk-ZUYGRGXM.js +1 -0
- package/Marketplace/{chunk-H46SHHXR.js → chunk-ZVKOEYH7.js} +1 -1
- package/Marketplace/chunk-ZXTHWBJ4.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/main-RRL4BIVO.js +1 -0
- package/package.json +1 -1
- package/Marketplace/chunk-2LK24YA5.js +0 -1
- package/Marketplace/chunk-37L3YDKT.js +0 -1
- package/Marketplace/chunk-3E7JHNVC.js +0 -5
- package/Marketplace/chunk-3FPEQHTI.js +0 -7
- package/Marketplace/chunk-42MFOGHP.js +0 -5
- package/Marketplace/chunk-4Q5ZSKVO.js +0 -1
- package/Marketplace/chunk-4ZQCJGTZ.js +0 -1
- package/Marketplace/chunk-6NUQGKRV.js +0 -1
- package/Marketplace/chunk-6VHVQEVM.js +0 -3
- package/Marketplace/chunk-6ZOHSFR5.js +0 -1
- package/Marketplace/chunk-7AE3725T.js +0 -193
- package/Marketplace/chunk-BERZDE6Y.js +0 -1
- package/Marketplace/chunk-BZBQHO76.js +0 -1
- package/Marketplace/chunk-CNJDARBM.js +0 -1
- package/Marketplace/chunk-D5YID4W4.js +0 -5
- package/Marketplace/chunk-DSQSL5VX.js +0 -15
- package/Marketplace/chunk-EVQLTXB7.js +0 -1
- package/Marketplace/chunk-FAMP5PPX.js +0 -1
- package/Marketplace/chunk-FJ455ZYZ.js +0 -1
- package/Marketplace/chunk-FOFXARTB.js +0 -1
- package/Marketplace/chunk-GLVYOZA4.js +0 -1
- package/Marketplace/chunk-ID2YZPRH.js +0 -1
- package/Marketplace/chunk-IML3KYQE.js +0 -1
- package/Marketplace/chunk-J53BPEDH.js +0 -1
- package/Marketplace/chunk-JBNND5FL.js +0 -1
- package/Marketplace/chunk-JFS634DA.js +0 -1
- package/Marketplace/chunk-K5XRGNWG.js +0 -1
- package/Marketplace/chunk-L7KCZLIM.js +0 -1
- package/Marketplace/chunk-LCRPUAWG.js +0 -1
- package/Marketplace/chunk-LHX4ZOLA.js +0 -2
- package/Marketplace/chunk-LQ2NLQKV.js +0 -1
- package/Marketplace/chunk-MBBQZFI4.js +0 -1
- package/Marketplace/chunk-MWTFYMKY.js +0 -1
- package/Marketplace/chunk-ORDCBJ4G.js +0 -2
- package/Marketplace/chunk-PQGPOOCK.js +0 -1
- package/Marketplace/chunk-QUKRHI5J.js +0 -1
- package/Marketplace/chunk-R7INAZCD.js +0 -1
- package/Marketplace/chunk-RDRNWLJI.js +0 -1
- package/Marketplace/chunk-RHF7TPRF.js +0 -1
- package/Marketplace/chunk-RLBTXXCD.js +0 -1
- package/Marketplace/chunk-RQEQPIMI.js +0 -1
- package/Marketplace/chunk-RTT3JVJM.js +0 -1
- package/Marketplace/chunk-SHRLQGK3.js +0 -1
- package/Marketplace/chunk-TZEINVZY.js +0 -1
- package/Marketplace/chunk-UHTMVOX6.js +0 -1
- package/Marketplace/chunk-UML74HNB.js +0 -1
- package/Marketplace/chunk-WJAE4LW2.js +0 -51
- package/Marketplace/chunk-XNVULGQ3.js +0 -266
- package/Marketplace/chunk-YWSUS64O.js +0 -1
- package/Marketplace/main-ZZ76NVAH.js +0 -1
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as Xe,b as et,c as tt}from"./chunk-FFCWYWBW.js";import"./chunk-G7T42LFR.js";import{a as se}from"./chunk-LHX4ZOLA.js";import{a as He,b as Ke,c as Qe,e as Ze,f as qe,g as Je}from"./chunk-IQ4AFE6X.js";import{e as Ae,k as Ye,l as $e,m as Ue,n as Ge,o as je}from"./chunk-B67DSLBY.js";import"./chunk-74ELVGDK.js";import{a as Re,b as Be,c as Le}from"./chunk-OK3LLCAK.js";import"./chunk-HVCIQI7B.js";import"./chunk-6RLISMEX.js";import"./chunk-TH6VZX34.js";import"./chunk-QS22J2SC.js";import"./chunk-QP4C4R4W.js";import"./chunk-LRUVI2Z3.js";import"./chunk-UYLSZYOD.js";import"./chunk-M7V7A7Z6.js";import"./chunk-QBL6V7QF.js";import"./chunk-DFGZ4L65.js";import{a as ze}from"./chunk-3FPEQHTI.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-WLRPCY65.js";import"./chunk-LDPDLCRL.js";import"./chunk-OZ7LWNOK.js";import"./chunk-UHTMVOX6.js";import{ha as We}from"./chunk-7AE3725T.js";import"./chunk-JVNHFIYT.js";import"./chunk-FJ455ZYZ.js";import{g as Me,h as re}from"./chunk-6VHVQEVM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import{a as oe}from"./chunk-RDRNWLJI.js";import{b as Pe,e as Ie}from"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import{c as Ve,d as ke,e as Fe}from"./chunk-PYXL7UF7.js";import{b as ne,c as x}from"./chunk-PW42BQIY.js";import{m as Oe,n as Ne}from"./chunk-FO7G4GMY.js";import{A as ie,c as be,h as ee,m as te,x as Ee}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as ae,s as le}from"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{J as Te,d as F,f as L,g as A,j as X,k as z,n as M}from"./chunk-FXQKRJWU.js";import{$c as R,Ac as Ce,Bc as Se,Cc as ve,Fc as D,Gb as I,Gc as p,Hc as k,Ic as S,Ka as B,Kc as b,Lc as E,Mb as w,Mc as P,Oa as O,Qc as Q,Ra as _,Rc as ye,Sc as Z,Tc as xe,Yb as s,Z as U,aa as ue,ad as j,bd as De,cd as q,dc as V,ea as G,ic as o,ja as he,jc as r,kc as C,lc as N,m as ce,mc as W,oc as v,pa as y,pb as fe,rb as a,sd as J,tc as g,uc as f,v as K,xb as _e,xc as ge,ya as m,yc as we,za as c}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as de,b as me}from"./chunk-66YHNWRR.js";var at=t=>({"over-due":t});function lt(t,d){if(t&1&&(o(0,"tr",8)(1,"td"),p(2),r(),o(3,"td"),p(4),r(),o(5,"td"),p(6),r(),o(7,"td"),p(8),r()()),t&2){let e=d.$implicit,n=d.index;s("ngClass",Z(5,at,e.Exception)),a(2),k(n+1),a(2),k(e.Number),a(2),k(e.Status),a(2),k(e.Exception)}}function pt(t,d){if(t&1&&(N(0),w(1,lt,9,7,"tr",7),W()),t&2){let e,n=f();a(),s("ngForOf",(e=n.downloadResult())==null?null:e.Body)}}function st(t,d){t&1&&(o(0,"tr",9)(1,"td",10)(2,"div",11),C(3,"i",12),r(),o(4,"h4",13),p(5," There is no order to processed "),r()()())}var it=(()=>{class t{constructor(){this.downloadResult=O()}ngOnInit(){}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=I({type:t,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},decls:16,vars:2,consts:[["EMPTY_DOWNLOAD",""],[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[4,"ngIf","ngIfElse"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[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(n,i){if(n&1&&(o(0,"div",1)(1,"div",2)(2,"table",3)(3,"thead",4)(4,"tr"),C(5,"th",5),o(6,"th"),p(7,"Order Number"),r(),o(8,"th"),p(9,"Status"),r(),o(10,"th"),p(11,"Exception"),r()()(),o(12,"tbody"),w(13,pt,2,1,"ng-container",6)(14,st,6,0,"ng-template",null,0,q),r()()()()),n&2){let l,h=D(15);a(13),s("ngIf",((l=i.downloadResult())==null||l.Body==null?null:l.Body.length)>0)("ngIfElse",h)}},dependencies:[M,F,L,A],encapsulation:2})}}return t})();var mt=t=>({"full-width":t}),ct=()=>({standalone:!0}),nt=(()=>{class t{constructor(e){this.datePipe=e,this.fullWidth=!1,this.timeChange=new B}ngOnInit(){}onTimeChange(e){let n=null;e&&(n=this.datePipe.transform(e,"HH:mm")),this.timeChange.emit(n),this.onTimePickerChange()}onShowCalendar(){let e=document.getElementById("dropdown-filter");if(e){var n=new bootstrap.Dropdown(e);n&&(n._config.autoClose="inside")}}onTimePickerChange(){let e=document.getElementById("dropdown-filter");if(e){var n=new bootstrap.Dropdown(e);n&&(n._config.autoClose="outside")}}static{this.\u0275fac=function(n){return new(n||t)(_e(z))}}static{this.\u0275cmp=I({type:t,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:"fullWidth"},outputs:{timeChange:"timeChange"},decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","ngClass","baseZIndex","ngModel","timeOnly","ngModelOptions"],["size","small","label","Close",3,"click"]],template:function(n,i){if(n&1){let l=v();o(0,"p-datepicker",1,0),P("ngModelChange",function(u){return m(l),E(i.time,u)||(i.time=u),c(u)}),g("ngModelChange",function(u){return m(l),c(i.onTimeChange(u))})("onSelect",function(){return m(l),c(i.onShowCalendar())}),o(2,"p-footer")(3,"p-button",2),g("click",function(){return m(l),D(1).hideOverlay(),c(i.onShowCalendar())}),r()()()}n&2&&(s("ngClass",Z(5,mt,i.fullWidth))("baseZIndex",1100),b("ngModel",i.time),s("timeOnly",!0)("ngModelOptions",ye(7,ct)))},dependencies:[M,F,ie,ee,te,tt,et,Xe,We],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}"]})}}return t})();var Y=(()=>{class t{constructor(){this.httpService=y(Ie),this.toastr=y(Pe),this.datePipe=y(z)}gerChannelDetailById(e){return this.httpService.post(oe.GetChannelDetail,{ID:e})}getOrderPreview(e){return this.httpService.post(oe.GetOrderPreviewV2,e)}getDownloadOrder(e){return this.httpService.post(oe.GetDownloadOrderV2,e)}onPreviewOrder(e){return this.validateDatePreview(e)?this.getOrderPreview(e).pipe(G(n=>{n.Data?.length===0&&this.toastrEmptyPreview(e)})):ce}toastrEmptyPreview(e){let n=this.datePipe.transform(e.From,"dd MMM yyyy"),i=this.datePipe.transform(e.To,"dd MMM yyyy"),l=e.TimeFrom?e.TimeFrom:"",h=e.TimeTo?e.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${l} to ${i} ${h}!`,"No Orders!")}validateDatePreview(e){let n=!0;return e.downloadType==!0?x.getDaysDiff(e?.From,e?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):x.getDaysDiff(e?.From,e?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),n=!1),n}getDateTitle(e,n){let i=x.formatTitleFromDate(new Date(e),new Date(n)),l=this.datePipe.transform(e,i),h=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":l+"-"} ${h}`}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=he({token:t,factory:t.\u0275fac})}}return t})();function ut(t,d){if(t&1&&(o(0,"ng-option",13),C(1,"img",14),p(2),r()),t&2){let e=d.$implicit;s("value",e.ID),a(),s("src",e==null?null:e.Img,fe),a(),S("",e.Name," ")}}function ht(t,d){if(t&1){let e=v();o(0,"div",8)(1,"div",4)(2,"h5"),p(3,"Type"),r(),o(4,"p",5),p(5,"Select Type want to download"),r()(),o(6,"div",4)(7,"div",15)(8,"div")(9,"mat-radio-group",16),P("ngModelChange",function(i){m(e);let l=f();return E(l.downloadType,i)||(l.downloadType=i),c(i)}),g("ngModelChange",function(){m(e);let i=f();return c(i.onDownloadTypeChange())}),o(10,"mat-radio-button",17),p(11," Orders "),r(),o(12,"mat-radio-button",18),p(13," Disbursement "),r()()()(),o(14,"div",19)(15,"div",20),C(16,"i",21),r(),o(17,"p",22),p(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),r()()()()}if(t&2){let e=f();a(9),b("ngModel",e.downloadType),a(),s("value",!1),a(2),s("value",!0)}}function ft(t,d){t&1&&(o(0,"p",5),p(1," Select Disbursement date "),o(2,"span",23),p(3,"(payment date / order complete date)"),r(),p(4," of the channel you want to download (Max 1 Week). "),r())}function _t(t,d){t&1&&(o(0,"p",5),p(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),r())}function gt(t,d){if(t&1){let e=v();o(0,"div",12)(1,"app-timepicker",24),P("timeChange",function(i){m(e);let l=f();return E(l.startTime,i)||(l.startTime=i),c(i)}),g("timeChange",function(){m(e);let i=f();return c(i.onStartTimeChange())}),r(),o(2,"span",25),p(3,"-"),r(),o(4,"app-timepicker",24),P("timeChange",function(i){m(e);let l=f();return E(l.endTime,i)||(l.endTime=i),c(i)}),g("timeChange",function(){m(e);let i=f();return c(i.onEndTimeChange())}),r()()}if(t&2){let e=f();a(),b("time",e.startTime),a(3),b("time",e.endTime)}}var ot=(()=>{class t{constructor(){this.reset=O(!1),this.authService=y(re),this.tokenService=y(Me),this.downloadService=y(Y),this.downloadType=_(!1),this.selectedChannelId=_(null),this.channelOptions=_(this.authService.getChannels()),this.channelType=ne,this.selectedChannel=_(null),this.showTimePicker=_(!1),this.startDate=_(null),this.endDate=_(null),this.startTime=_("00:00"),this.endTime=_("23:59"),this.minDate=_(new Date),this.maxDate=_(new Date),this.filterData=new B,J(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0}),this.initDateValidation()}initDateValidation(){let e=this.tokenService?.getTokenValue(),n=e?.DownloadRange?JSON.parse(e?.DownloadRange):0;if(n<=0)this.minDate.set(null),this.maxDate.set(null);else{let i=new Date,l=x.addDays(i,n-1);this.minDate.set(l)}}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(K(e=>e?.Model),U(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let e=1;this.startDate()&&this.endDate()&&(e=x.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()})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=I({type:t,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange"},features:[Q([Y,Ae()])],decls:27,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",4,"ngFor","ngForOf"],[1,"row","mt-6"],["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,"mt-8"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(n,i){if(n&1){let l=v();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),p(5,"Select a Channel"),r(),o(6,"p",5),p(7,"Select Channel want to download order"),r()(),o(8,"div",4)(9,"ng-select",6),P("ngModelChange",function(u){return m(l),E(i.selectedChannelId,u)||(i.selectedChannelId=u),c(u)}),g("ngModelChange",function(){return m(l),c(i.onSelectChannel())}),w(10,ut,3,3,"ng-option",7),r()()(),w(11,ht,19,3,"div",8),R(12,"async"),o(13,"div",8)(14,"div",4)(15,"h5"),p(16,"Date Range"),r(),w(17,ft,5,0,"p",5)(18,_t,2,0,"p",5),r(),o(19,"div",4)(20,"div",2)(21,"mat-date-range-input",9)(22,"input",10),P("ngModelChange",function(u){return m(l),E(i.startDate,u)||(i.startDate=u),c(u)}),g("click",function(){m(l);let u=D(25);return c(u.open())}),r(),o(23,"input",11),P("ngModelChange",function(u){return m(l),E(i.endDate,u)||(i.endDate=u),c(u)}),g("click",function(){m(l);let u=D(25);return c(u.open())})("ngModelChange",function(){return m(l),c(i.onFilterDateChange())}),r()(),C(24,"mat-date-range-picker",null,0),r(),w(26,gt,5,2,"div",12),r()()()()}if(n&2){let l,h,u=D(25);a(9),s("clearable",!1),b("ngModel",i.selectedChannelId),a(),s("ngForOf",i.channelOptions()),a(),V((l=j(12,11,i.channelDetail$))!=null&&l.ServiceFeeWriteOff&&((l=i.selectedChannel())==null?null:l.TypeID)==i.channelType.Tokopedia?11:-1),a(6),V(i.downloadType()&&((h=i.selectedChannel())==null?null:h.TypeID)==i.channelType.Tokopedia?17:18),a(4),s("rangePicker",u)("min",i.minDate())("max",i.maxDate()),a(),b("ngModel",i.startDate),a(),b("ngModel",i.endDate),a(3),V(i.showTimePicker()?26:-1)}},dependencies:[M,L,X,Fe,ke,Ve,Le,Re,Be,ie,be,ee,Ee,te,nt,Ge,Ye,je,$e,Ue],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}"]})}}return t})();var T=function(t){return t.ALL="all",t.SYNC="sync",t.WRONG="wrong",t.UNSYNC="unsync",t}(T||{});var $=function(t){return t[t.DoNothing=0]="DoNothing",t[t.New=1]="New",t[t.Update=2]="Update",t}($||{});var Ct=(t,d)=>({"over-due-today":t,"over-due":d});function St(t,d){if(t&1&&(o(0,"th",21),p(1),r()),t&2){let e=f();a(),S(" ",e.selectedChannel()?"Created Date":"Last Status Update"," ")}}function vt(t,d){if(t&1&&(o(0,"td"),p(1),R(2,"date"),r()),t&2){let e=f().$implicit;a(),S(" ",De(2,1,e.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function yt(t,d){if(t&1&&(o(0,"span"),p(1),r()),t&2){let e=f().$implicit;a(),S(" ",e.ActionString," ")}}function xt(t,d){if(t&1&&(o(0,"li"),p(1),r()),t&2){let e=d.$implicit;a(),S(" ",e," ")}}function Dt(t,d){if(t&1&&(o(0,"ul",27),w(1,xt,2,1,"li",22),r()),t&2){let e=f().$implicit;a(),s("ngForOf",e.ActionString)}}function Tt(t,d){if(t&1&&(o(0,"span",28),C(1,"i",29),r()),t&2){let e=f().$implicit;we("title","Delivery : ",e.DeliveryState,`
|
|
2
|
-
Payment : `,e.PaymentState,"")}}function bt(t,d){if(t&1&&(o(0,"tr")(1,"td"),p(2),r(),o(3,"td"),p(4),r(),w(5,vt,3,4,"td",23),o(6,"td")(7,"span"),p(8),r(),p(9),r(),o(10,"td",24)(11,"span"),p(12),r(),p(13),r(),o(14,"td"),w(15,yt,2,1,"span",23)(16,Dt,2,1,"ul",25),r(),o(17,"td"),w(18,Tt,2,3,"span",26),r()()),t&2){let e,n=d.$implicit,i=d.index,l=f(2);a(2),k(i+1),a(2),k(n.Number),a(),s("ngIf",((e=l.selectedChannel())==null?null:e.TypeID)!=l.channelType.Shopee&&((e=l.selectedChannel())==null?null:e.TypeID)!==l.channelType.Tiktok),a(3),S("",n.ChannelStatus," - "),a(),S("",n.ChannelStatusDescription," "),a(),s("ngClass",xe(12,Ct,(n==null?null:n.Action)==l.actionPreviewOrder.Update,(n==null?null:n.Action)==l.actionPreviewOrder.New))("matTooltip",n.POSStatus==91||n.POSStatusDescription=="Conflict"?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),a(2),S("",n.POSStatus," - "),a(),S("",n.POSStatusDescription," "),a(2),s("ngIf",n.ActionString.length==1),a(),s("ngIf",n.ActionString.length>1),a(2),s("ngIf",n.ChannelStatus!=99&&n.POSStatus!=99)}}function Et(t,d){if(t&1&&(N(0),w(1,bt,19,15,"tr",22),W()),t&2){let e=f();a(),s("ngForOf",e.displayPreviewData())}}function Pt(t,d){t&1&&(o(0,"tr",30)(1,"td",31)(2,"div",32),C(3,"i",33),r(),o(4,"h4",34),p(5," There is no order to processed "),r()()())}var rt=(()=>{class t{constructor(){this.orderPreview=O(),this.selectedChannel=O(),this.channelType=ne,this.allData=_(0),this.syncData=_(0),this.wrongData=_(0),this.unsyncData=_(0),this.pillStatus=_(T.ALL),this.actionPreviewOrder=$,this.previewStatus=T,this.displayPreviewData=_([]),this.exportOrders=new B,J(()=>{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 n=[];switch(e){case T.ALL:n=this.orderPreview();break;case T.SYNC:n=this.orderPreview().filter(i=>i.Action==$.DoNothing);break;case T.WRONG:n=this.orderPreview().filter(i=>i.Action==$.Update);break;case T.UNSYNC:n=this.orderPreview().filter(i=>i.Action==$.New);break}return n}onExportOrders(){this.exportOrders.emit()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=I({type:t,selectors:[["preview-step"]],inputs:{orderPreview:[1,"orderPreview"],selectedChannel:[1,"selectedChannel"]},outputs:{exportOrders:"onExportOrders"},decls:41,vars:11,consts:[["EMPTY",""],[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"col-12","d-flex","justify-content-between","align-items-end",2,"padding-left","0px","padding-right","0px"],[1,"nav","nav-pills"],[1,"nav-item","me-3"],[1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],[1,"nav-item","mx-3"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%",4,"ngIf"],["width","10%"],[4,"ngIf","ngIfElse"],["width","15%"],[4,"ngFor","ngForOf"],[4,"ngIf"],["matTooltipClass","custom-width-tooltip",3,"ngClass","matTooltip"],["class","ps-5",4,"ngIf"],[3,"title",4,"ngIf"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1){let l=v();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div")(5,"ul",5)(6,"li",6)(7,"button",7),g("click",function(){return m(l),c(i.filterPreviewData(i.previewStatus.ALL))}),p(8),r()(),o(9,"li",8)(10,"button",9),g("click",function(){return m(l),c(i.filterPreviewData(i.previewStatus.SYNC))}),p(11),r()(),o(12,"li",8)(13,"button",10),g("click",function(){return m(l),c(i.filterPreviewData(i.previewStatus.WRONG))}),p(14),r()(),o(15,"li",8)(16,"button",11),g("click",function(){return m(l),c(i.filterPreviewData(i.previewStatus.UNSYNC))}),p(17),r()()()(),o(18,"div")(19,"button",12),g("click",function(){return m(l),c(i.onExportOrders())}),C(20,"i",13),o(21,"span"),p(22,"Export"),r()()()()(),o(23,"table",14)(24,"thead",15)(25,"tr"),C(26,"th",16),o(27,"th",17),p(28,"Number"),r(),w(29,St,2,1,"th",18),o(30,"th",19),p(31,"Channel Status"),r(),o(32,"th",19),p(33,"POS Status"),r(),o(34,"th"),p(35,"Action"),r(),C(36,"th",16),r()(),o(37,"tbody"),w(38,Et,2,1,"ng-container",20)(39,Pt,6,0,"ng-template",null,0,q),r()()()()}if(n&2){let l,h,u=D(40);a(7),s("ngClass",i.pillStatus()=="all"?"btn-secondary text-white":"btn-outline-dark"),a(),S(" All (",i.allData(),") "),a(2),s("ngClass",i.pillStatus()=="sync"?"btn-success":"btn-outline-success"),a(),S(" Existing (",i.syncData(),") "),a(2),s("ngClass",i.pillStatus()=="wrong"?"btn-warning text-white":"btn-outline-warning"),a(),S(" Wrong Status (",i.wrongData(),") "),a(2),s("ngClass",i.pillStatus()=="unsync"?"btn-danger":"btn-outline-danger"),a(),S(" Missing (",i.unsyncData(),") "),a(12),s("ngIf",((l=i.selectedChannel())==null?null:l.TypeID)!=i.channelType.Shopee&&((l=i.selectedChannel())==null?null:l.TypeID)!==i.channelType.Tiktok),a(9),s("ngIf",((h=i.displayPreviewData())==null?null:h.length)>0)("ngIfElse",u)}},dependencies:[M,F,L,A,z,le,ae],encapsulation:2})}}return t})();var It=["stepper"];function Mt(t,d){if(t&1){let e=v();o(0,"div",2)(1,"button",18),g("click",function(){m(e);let i=f();return c(i.onStepperBack())}),p(2," Back "),r(),o(3,"button",19),g("click",function(){m(e);let i=f();return c(i.onNextStep())}),p(4," Next "),r()()}if(t&2){let e=f();a(3),s("disabled",e.disabledNextFilter())}}function Vt(t,d){if(t&1){let e=v();o(0,"button",20),g("click",function(){m(e);let i=f();return c(i.onNextStep())}),p(1," Next "),r()}if(t&2){let e=f();s("disabled",e.disabledNextFilter())}}function kt(t,d){if(t&1){let e=v();o(0,"div",2)(1,"button",21),g("click",function(){m(e);let i=f();return c(i.onNewDownload(!1))}),C(2,"i",22),p(3," Repeat Last "),r(),o(4,"button",23),g("click",function(){m(e);let i=f();return c(i.onNewDownload())}),C(5,"i",24),p(6," New "),r()()}}function Ft(t,d){t&1&&(C(0,"i",25),o(1,"span"),p(2,"Filter"),r())}function Ot(t,d){t&1&&(C(0,"i",26),o(1,"span"),p(2,"Preview"),r())}function Nt(t,d){if(t&1){let e=v();N(0),o(1,"preview-step",27),g("onExportOrders",function(){m(e);let i=f();return c(i.onExportOrders())}),r(),W()}if(t&2){let e=d.ngIf;a(),s("orderPreview",e)}}function Wt(t,d){t&1&&(C(0,"i",28),o(1,"span"),p(2,"Finish"),r())}function Rt(t,d){if(t&1&&(N(0),C(1,"complete-step",29),W()),t&2){let e=d.ngIf;a(),s("downloadResult",e)}}function Bt(t,d){t&1&&(o(0,"h6"),p(1,"1"),r())}function Lt(t,d){t&1&&(o(0,"h6"),p(1,"2"),r())}function At(t,d){t&1&&(o(0,"h6"),p(1,"3"),r())}var mn=(()=>{class t{constructor(){this.downloadService=y(Y),this.orderService=y(se),this.productService=y(ze),this.authService=y(re),this.stepperSelectedIndex=_(0),this.disabledNextFilter=_(!0),this.isResetFilter=_(!1),this.pageTitle=_("Download to POS"),this.cacheKey=_(x.GuidEMpty)}onFilterChange(e){this.filter=e,this.validateDisabledNext()}validateDisabledNext(){this.disabledNextFilter.update(()=>x.IsEmpty(this.filter?.channelId)||!x.isValidDate(this.filter.startDate)||!x.isValidDate(this.filter.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={ID:this.filter.channelId,From:this.filter.startDate,To:this.filter.endDate,IsDisbursement:this.filter.downloadType};x.IsNotEmpty(this.filter.startTime)&&(e=me(de({},e),{TimeFrom:this.filter.startTime+":00",TimeTo:this.filter.endTime+":00"})),this.orderPreview$=this.downloadService.onPreviewOrder(e).pipe(G(n=>{n.Data?.length>0&&(this.cacheKey.update(()=>n.CacheKey),this.onStepperNext())}),K(n=>n.Data),U(1))}onExportOrders(){let e={ID:this.filter.channelId,From:this.filter.startDate?this.filter.startDate:null,To:this.filter.endDate?this.filter.endDate:null},n=`Orders ${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)}`;this.orderService.exportOrders(e,n).subscribe()}onDownload(){let e={ID:this.filter.channelId,From:this.filter.startDate,To:this.filter.endDate,ListPreview:[],IsDisbursement:this.filter.downloadType,CacheKey:this.cacheKey()};this.downloadPreview$=this.orderPreview$.pipe(ue(n=>(e.ListPreview=n,this.downloadService.getDownloadOrder(e))),G(()=>{this.onStepperNext()}),U(1))}setPageTitle(e){this.pageTitle.update(()=>`
|
|
3
|
-
${e} (${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)})
|
|
4
|
-
`)}onStepperBack(){this.stepper.previous(),this.pageTitle.update(()=>"Download to POS")}onNewDownload(e=!0){this.isResetFilter.update(()=>e),this.stepper.reset(),this.stepperSelectedIndex.update(()=>0),this.orderPreview$=null,this.downloadPreview$=null,this.pageTitle.update(()=>"Download to POS")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=I({type:t,selectors:[["app-download-v2"]],viewQuery:function(n,i){if(n&1&&Ce(It,5),n&2){let l;Se(l=ve())&&(i.stepper=l.first)}},features:[Q([Y,se,{provide:He,useValue:{displayDefaultIndicatorType:!1}}])],decls:26,vars:20,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,"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","reset"],["state","preview",3,"editable","completed"],[4,"ngIf"],["state","finish"],["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"],["matTooltip","Creates a new download order using previous channel and date settings.",1,"btn","btn-outline-secondary","border-end-0","d-flex","align-items-center","gap-2",3,"click"],[1,"fa-solid","fa-rotate"],[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"],[1,"fa-solid","fa-flag","me-3"],[3,"downloadResult"]],template:function(n,i){if(n&1){let l=v();o(0,"mainpanel",1)(1,"actions"),w(2,Mt,5,1,"div",2)(3,Vt,2,1,"button",3)(4,kt,7,0,"div",2),r(),o(5,"content")(6,"div",4)(7,"div",5)(8,"div",6)(9,"div",7)(10,"mat-stepper",8,0),P("selectedIndexChange",function(u){return m(l),E(i.stepperSelectedIndex,u)||(i.stepperSelectedIndex=u),c(u)}),o(12,"mat-step",9),w(13,Ft,3,0,"ng-template",10),o(14,"filter-step",11),g("onFilterChange",function(u){return m(l),c(i.onFilterChange(u))}),r()(),o(15,"mat-step",12),w(16,Ot,3,0,"ng-template",10)(17,Nt,2,1,"ng-container",13),R(18,"async"),r(),o(19,"mat-step",14),w(20,Wt,3,0,"ng-template",10)(21,Rt,2,1,"ng-container",13),R(22,"async"),r(),w(23,Bt,2,0,"ng-template",15)(24,Lt,2,0,"ng-template",16)(25,At,2,0,"ng-template",17),r()()()()()()()}if(n&2){let l=D(11);s("hideSearchBox",!0)("hideSearchDropdown",!0)("headerTitle",i.pageTitle())("description",i.pageTitle()),a(2),V(i.stepperSelectedIndex()==1?2:-1),a(),V(i.stepperSelectedIndex()==0?3:-1),a(),V(i.stepperSelectedIndex()==2?4:-1),a(6),ge("ngClass","last-edited-step-"+l.selectedIndex),b("selectedIndex",i.stepperSelectedIndex),a(2),s("completed",!1)("editable",i.stepperSelectedIndex()!=2),a(2),s("reset",i.isResetFilter()),a(),s("editable",i.stepperSelectedIndex()!=2)("completed",!1),a(2),s("ngIf",j(18,16,i.orderPreview$)),a(4),s("ngIf",j(22,18,i.downloadPreview$))}},dependencies:[M,F,A,X,it,ot,rt,Je,Ze,Ke,qe,Qe,Ne,Oe,Te,le,ae],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}
|
|
5
|
-
`],encapsulation:2})}}return t})();export{mn as DownloadV2Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Ie,b as Ve,c as Re}from"./chunk-UHJEXTOG.js";import{a as Le}from"./chunk-H46SHHXR.js";import{a as ce}from"./chunk-LHX4ZOLA.js";import{a as Ne}from"./chunk-PFXOFSJG.js";import{a as Fe}from"./chunk-OLANEXLB.js";import"./chunk-BQIB3N6V.js";import"./chunk-B67DSLBY.js";import"./chunk-6RLISMEX.js";import"./chunk-TH6VZX34.js";import"./chunk-QS22J2SC.js";import"./chunk-QP4C4R4W.js";import"./chunk-5LQRO4AI.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-WLRPCY65.js";import"./chunk-3RK6DDJD.js";import"./chunk-3UN6FPMN.js";import"./chunk-LDPDLCRL.js";import"./chunk-JVNHFIYT.js";import{a as Ee}from"./chunk-FESS3PG3.js";import"./chunk-3YP6ORBR.js";import{a as Pe}from"./chunk-UXPULNCR.js";import"./chunk-6VHVQEVM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import{a as I}from"./chunk-RDRNWLJI.js";import{b as be,e as X}from"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import{c as Z,d as $,e as ee}from"./chunk-PYXL7UF7.js";import{b as C,c as U}from"./chunk-PW42BQIY.js";import{b as te,c as ie,d as we,e as ne,f as oe,g as De,h as re,m as Oe,n as Me}from"./chunk-FO7G4GMY.js";import{A as E,c as Te,h as z,m as H,o as xe}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as ae,s as le}from"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{j as ve,k as j,m as ke,n as P}from"./chunk-FXQKRJWU.js";import{$c as D,G as pe,Gb as O,Gc as a,Hc as y,Ic as B,Kc as k,Lc as T,Mb as M,Mc as x,Na as Y,Nc as ge,Oa as q,Oc as fe,Pc as _e,Qc as Se,Ra as S,Rc as Ce,Sc as ye,Yb as _,Z as de,_b as me,aa as se,ac as he,ad as J,bd as F,dc as b,ec as V,gc as R,hc as N,ic as o,ja as W,jc as r,kc as v,oc as w,pa as h,pb as ue,rb as l,rd as Q,tc as d,uc as c,v as G,ya as g,za as f}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as A,b as K}from"./chunk-66YHNWRR.js";function qe(n,u){if(n&1){let e=w();o(0,"div",10),d("click",function(){g(e);let i=c();return f(i.onSelectDelivery("DROP_OFF"))}),o(1,"div",11),v(2,"i",12),o(3,"h3",13),a(4,"Drop off"),r()(),o(5,"p",14),a(6," You can drop off your package at the nearest shipping counter in your city. "),r()()}if(n&2){let e=c();me("text-muted",e.selectedDelivery()&&e.selectedDelivery()==="PICK_UP")("selected",e.selectedDelivery()==="DROP_OFF")}}function Je(n,u){if(n&1){let e=w();o(0,"div",10),d("click",function(){g(e);let i=c();return f(i.onSelectDelivery("PICK_UP"))}),o(1,"div",11),v(2,"i",15),o(3,"h3",16),a(4,"Pick up"),r()(),o(5,"p",17),a(6," The courier will collect the package from your address. "),r()()}if(n&2){let e=c();me("text-muted",e.selectedDelivery()&&e.selectedDelivery()==="DROP_OFF")("selected",e.selectedDelivery()==="PICK_UP")}}var Ae=(()=>{class n{constructor(){this.data=h(ie),this.dialogRef=h(te),this.selectedDelivery=S("DROP_OFF"),this.showPickup=S(!0),this.showDropOff=S(!0),this.initOptionsCondition()}onSelectDelivery(e){this.selectedDelivery.set(e)}initOptionsCondition(){switch(this.data.channelType){case C.Shopee:break;case C.Tiktok:this.showPickup.set(this.data.options?.Form?.information?.can_pickup),this.showDropOff.set(this.data.options?.Form?.information?.can_drop_off);break}}onConfirm(){this.dialogRef.close(this.selectedDelivery())}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-delivery-dialog"]],decls:16,vars:2,consts:[["mat-dialog-title","",1,"mt-12","mb-8"],[1,"d-flex","justify-content-between","align-items-start","lh-lg"],[1,"ms-2"],[1,"text-secondary-emphasis"],[1,"fa-solid","fa-xmark","text-muted","cursor-pointer","fs-3",3,"click"],[1,"pb-0"],[1,"d-flex","align-items-center","justify-content-center","gap-12"],["role","button",1,"delivery-option","d-flex","flex-column","align-items-center","justify-content-center","p-4","cursor-pointer",3,"text-muted","selected"],[1,"d-flex","justify-content-end",2,"margin-top","1.5rem"],[1,"btn","btn-light-blue","me-3","text-primary","btn-lg","fw-bold","mx-3","py-6",2,"width","70px",3,"click"],["role","button",1,"delivery-option","d-flex","flex-column","align-items-center","justify-content-center","p-4","cursor-pointer",3,"click"],[1,"text-center"],[1,"fa-solid","fa-cart-shopping-fast","fa-4x"],[1,"mt-4","titlew"],[1,"text-center","mt-4","lh-sm","subtitlew"],[1,"fa-solid","fa-hand-holding-box","fa-4x"],[1,"mt-4"],[1,"text-center","mt-4","lh-sm"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2"),a(4,"Delivery Order"),r(),o(5,"div",3),a(6,"Your selected order(s) will be set to"),r()(),o(7,"div")(8,"i",4),d("click",function(){return i.onClose()}),r()()()(),o(9,"mat-dialog-content",5)(10,"div",6),M(11,qe,7,4,"div",7)(12,Je,7,4,"div",7),r(),o(13,"div",8)(14,"button",9),d("click",function(){return i.onConfirm()}),a(15," OK "),r()()()),t&2&&(l(11),b(i.showPickup()?11:-1),l(),b(i.showDropOff()?12:-1))},dependencies:[P,re,ne,oe],styles:[".delivery-option[_ngcontent-%COMP%]{width:14rem;height:12rem;border:1px solid #656565}.delivery-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}.delivery-option.text-muted[_ngcontent-%COMP%]{border-color:#000;color:#000}.delivery-option.selected[_ngcontent-%COMP%]{color:#5e9708;border-color:#5e9708}.delivery-option.selected[_ngcontent-%COMP%] .titlew[_ngcontent-%COMP%]{color:#5e9708;font-weight:700}.delivery-option.selected[_ngcontent-%COMP%] .subtitlew[_ngcontent-%COMP%]{color:#5e9708}"]})}}return n})();function Ze(n,u){if(n&1&&(o(0,"ng-option",3),a(1),r()),n&2){let e=u.$implicit;_("value",e==null?null:e.address_id)("matTooltip",e==null?null:e.address),l(),y(e==null?null:e.address)}}function $e(n,u){if(n&1&&(o(0,"ng-option",6)(1,"span",7),a(2),D(3,"date"),r(),o(4,"span"),a(5),r()()),n&2){let e=u.$implicit;_("value",e==null?null:e.pickup_time_id),l(2),y(F(3,3,e==null?null:e.date,"d MMMM")),l(3),y(e==null?null:e.time_text)}}var je=(()=>{class n{constructor(){this.shippingOptions=q(),this.onFormChanges=Y(),this.addressList=Q(()=>this.shippingOptions()?.response?.pickup?.address_list||[]),this.selectedShipping=S(null),this.timeOptions=S(this.convertTimestampToDate(this.addressList()[0]?.time_slot_list||[])),this.pickupTime=S(null)}onAddressChange(e){let t=this.addressList().find(i=>i.address_id===e);this.timeOptions.set(this.convertTimestampToDate(t?.time_slot_list||[])),this.pickupTime.set(null)}onValueChanges(){this.onFormChanges.emit({address_id:this.selectedShipping(),pickup_time_id:this.pickupTime()})}convertTimestampToDate(e){return e.map(t=>{let i=new Date(t.date*1e3);return K(A({},t),{date:i})})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=O({type:n,selectors:[["shopee-pickup"]],inputs:{shippingOptions:[1,"shippingOptions"]},outputs:{onFormChanges:"onFormChanges"},decls:12,vars:4,consts:[[1,"mb-6"],["for","address",1,"mb-2","text-muted"],["id","address","placeholder","Select Address to Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value","matTooltip"],["for","timepicker",1,"mb-2","text-muted"],["id","timepicker","placeholder","Select Date Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"me-2"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"label",1),a(2,"Address"),r(),o(3,"ng-select",2),x("ngModelChange",function(s){return T(i.selectedShipping,s)||(i.selectedShipping=s),s}),d("ngModelChange",function(s){return i.onAddressChange(s),i.onValueChanges()}),R(4,Ze,2,3,"ng-option",3,V),r()(),o(6,"div",0)(7,"label",4),a(8,"Date"),r(),o(9,"ng-select",5),x("ngModelChange",function(s){return T(i.pickupTime,s)||(i.pickupTime=s),s}),d("ngModelChange",function(){return i.onValueChanges()}),R(10,$e,6,6,"ng-option",6,V),r()()),t&2&&(l(3),_("clearable",!1),k("ngModel",i.selectedShipping),l(),N(i.addressList()),l(5),_("clearable",!1),k("ngModel",i.pickupTime),l(),N(i.timeOptions()))},dependencies:[P,j,ee,$,Z,E,z,H,le,ae],encapsulation:2})}}return n})();function et(n,u){if(n&1&&(o(0,"ng-option",3)(1,"span",4),a(2),D(3,"date"),r(),o(4,"span"),a(5),D(6,"date"),r(),o(7,"span",5),a(8,"-"),r(),o(9,"span"),a(10),D(11,"date"),r()()),n&2){let e=u.$implicit,t=u.$index;_("value",t),l(2),y(F(3,4,e==null?null:e.start_date,"d MMMM")),l(3),y(F(6,7,e==null?null:e.start_date,"HH:mm")),l(5),y(F(11,10,e==null?null:e.end_date,"HH:mm"))}}var ze=(()=>{class n{constructor(){this.shippingOptions=q(),this.onFormChanges=Y(),this.timeOptions=Q(()=>this.shippingOptions()?.Options?.pickup_slots),this.selectedTimeIndex=S(null)}onValueChanges(){let e=this.timeOptions()[this.selectedTimeIndex()];this.onFormChanges.emit({start_time:e?.start_time,end_time:e?.end_time})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=O({type:n,selectors:[["tiktok-pickup"]],inputs:{shippingOptions:[1,"shippingOptions"]},outputs:{onFormChanges:"onFormChanges"},decls:6,vars:2,consts:[[1,"mb-6"],["for","timepicker",1,"mb-2","text-muted"],["id","timepicker","placeholder","Select Time Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"me-2"],[1,"mx-1"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"label",1),a(2,"Time"),r(),o(3,"ng-select",2),x("ngModelChange",function(s){return T(i.selectedTimeIndex,s)||(i.selectedTimeIndex=s),s}),d("ngModelChange",function(){return i.onValueChanges()}),R(4,et,12,13,"ng-option",3,V),r()()),t&2&&(l(3),_("clearable",!1),k("ngModel",i.selectedTimeIndex),l(),N(i.timeOptions()))},dependencies:[P,j,ee,$,Z,E,z,H],encapsulation:2})}}return n})();function tt(n,u){if(n&1){let e=w();o(0,"shopee-pickup",10),d("onFormChanges",function(i){g(e);let p=c();return f(p.onFormChanges(i))}),r()}if(n&2){let e=c();_("shippingOptions",e.dialogData.shippingOptions)}}function it(n,u){if(n&1){let e=w();o(0,"tiktok-pickup",10),d("onFormChanges",function(i){g(e);let p=c();return f(p.onFormChanges(i))}),r()}if(n&2){let e=c();_("shippingOptions",e.dialogData.shippingOptions)}}var He=(()=>{class n{constructor(){this.dialogRef=h(te),this.dialogData=h(ie),this.shippingOptions=S(this.dialogData.shippingOptions),this.channelType=S(this.dialogData.channelType),this.order=S(this.dialogData.order),this.channelTypeEnum=C,this.pickupData=S(null)}onFormChanges(e){this.pickupData.set(e)}onClose(){this.dialogRef.close()}onSave(){let e=this.generatePickupData();this.dialogRef.close(e)}generatePickupData(){switch(this.channelType()){case C.Shopee:return{OrderNumber:this.order().Number,ShopID:this.order().ShopID,pickup:this.pickupData()};case C.Tiktok:return{handover_method:"PICKUP",PackageID:this.shippingOptions().Form?.information?.PackageID,ShopID:this.order().ShopID,pickup_slot:this.pickupData()}}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-pickup-dialog"]],decls:21,vars:2,consts:[["mat-dialog-title","",1,"mt-12","mb-6"],[1,"d-flex","justify-content-between","align-items-start","lh-lg"],[1,"lh-base","mt-6"],[1,"text-muted","fs-6"],["role","button",1,"fa-solid","fa-xmark","text-muted","cursor-pointer","fs-3",3,"click"],[2,"padding-bottom","10px"],[3,"shippingOptions"],[1,"d-flex","justify-content-end","align-items-center","w-100","pe-8","mb-4"],[1,"btn","btn-outline-secondary","me-4",2,"width","70px",3,"click"],[1,"btn","btn-success",2,"width","70px",3,"click"],[3,"onFormChanges","shippingOptions"]],template:function(t,i){if(t&1&&(o(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),a(4,"Set Pickup"),r(),o(5,"div",2)(6,"div",3),a(7,"Shipping Method"),r(),o(8,"div",3),a(9),r()()(),o(10,"div")(11,"i",4),d("click",function(){return i.onClose()}),r()()()(),o(12,"mat-dialog-content",5),M(13,tt,1,1,"shopee-pickup",6)(14,it,1,1,"tiktok-pickup",6),r(),o(15,"mat-dialog-actions")(16,"div",7)(17,"button",8),d("click",function(){return i.onClose()}),a(18," Cancel "),r(),o(19,"button",9),d("click",function(){return i.onSave()}),a(20," Ok "),r()()()),t&2){let p,s;l(9),B(" ",!((p=i.order())==null||p.LogisticService==null)&&p.LogisticService.Name?(p=i.order())==null||p.LogisticService==null?null:p.LogisticService.Name:"-"," "),l(4),b((s=i.channelType())===i.channelTypeEnum.Shopee?13:s===i.channelTypeEnum.Tiktok?14:-1)}},dependencies:[P,re,ne,De,oe,E,je,ze],styles:['ng-select.shipping-timepicker .ng-arrow{border:none!important;width:0;height:0} ng-select.shipping-timepicker .ng-arrow-wrapper{width:28px;display:flex;align-items:center;justify-content:center} ng-select.shipping-timepicker .ng-arrow-wrapper:after{content:"\\f107";font-family:"Font Awesome 6 Pro","Font Awesome 6 Free","Font Awesome 5 Pro","Font Awesome 5 Free";font-style:normal;font-weight:400!important;font-size:16px;line-height:1;display:inline-block;color:#6b7280;pointer-events:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto}.label-opacity[_ngcontent-%COMP%]{opacity:.7}']})}}return n})();var Ue=(()=>{class n{constructor(){this.httpService=h(X)}getShippingOptions(e,t){return this.httpService.post(I.GetTiktokShippingOptions,{OrderNumber:e,ShopID:t}).pipe(G(i=>this.formatDatePickUpOptions(i)))}pickupOrder(e){return this.httpService.post(I.TiktokSelectShipping,e)}dropOffOrder(e,t){let i={handover_method:"DROP_OFF",PackageID:e,ShopID:t};return this.httpService.post(I.TiktokSelectShipping,i)}formatDatePickUpOptions(e){return e?.Options?.pickup_slots&&(e.Options.pickup_slots=e?.Options?.pickup_slots.map(t=>{let i=U.convertTimestampToDate(t.start_time),p=U.convertTimestampToDate(t.end_time);return t.start_date=i,t.end_date=p,t})),e}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=W({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ke=(()=>{class n{constructor(){this.httpService=h(X)}getShippingOptions(e,t){return this.httpService.post(I.GetShopeeShippingOptions,{OrderNumber:e,ShopID:t})}pickupOrder(e){return this.httpService.post(I.ShopeeSelectShipping,e)}dropOffOrder(e,t){let i={OrderNumber:e,ShopID:t,dropoff:{}};return this.httpService.post(I.ShopeeSelectShipping,i)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=W({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ge=(()=>{class n{constructor(){this.shopeeShippingService=h(Ke),this.tiktokShippingService=h(Ue)}getShippingOptions(e,t,i){switch(i){case C.Shopee:return this.getShopeeShippingOptions(e,t);case C.Tiktok:return this.getTiktokShippingOptions(e,t)}}pickupOrder(e,t){switch(e.MarketType){case C.Shopee:return this.shopeeShippingService.pickupOrder(t);case C.Tiktok:return this.tiktokShippingService.pickupOrder(t)}}dropOffOrder(e,t){switch(e.MarketType){case C.Shopee:return this.shopeeShippingService.dropOffOrder(e.Number,e.ShopID);case C.Tiktok:let i=t?.Form?.information?.PackageID;return this.tiktokShippingService.dropOffOrder(i,e.ShopID)}}getShopeeShippingOptions(e,t){return this.shopeeShippingService.getShippingOptions(e,t)}getTiktokShippingOptions(e,t){return this.tiktokShippingService.getShippingOptions(e,t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=W({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var nt=()=>[],ot=n=>({"td-cell-hover":n});function rt(n,u){if(n&1&&v(0,"variants-dropdown",30),n&2){let e=c().$implicit;_("variants",e==null?null:e.Variants)}}function at(n,u){if(n&1&&v(0,"variant-with-image",31),n&2){let e=c().$implicit;_("variant",e==null?null:e.Variants[0])}}function lt(n,u){if(n&1&&(o(0,"span"),a(1),r()),n&2){let e=c().$implicit;l(),B("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function pt(n,u){if(n&1){let e=w();o(0,"div")(1,"button",36),d("click",function(){g(e);let i=c().$implicit,p=c(2);return f(p.refreshShippingAndRefNumber(i))}),v(2,"i",37),r()()}}function st(n,u){if(n&1){let e=w();o(0,"button",38),d("click",function(){g(e);let i=c().$implicit,p=c(2);return f(p.onSetFulfillment(i))}),a(1," Set Fulfillment "),r()}}function mt(n,u){if(n&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"div",26)(5,"div",27)(6,"div"),v(7,"img",28),D(8,"channelImage"),r(),o(9,"div"),v(10,"order-link",29),r()(),o(11,"small"),a(12),D(13,"date"),r()()(),o(14,"td"),a(15),r(),o(16,"td"),M(17,rt,1,1,"variants-dropdown",30)(18,at,1,1,"variant-with-image",31),r(),o(19,"td",32),a(20),D(21,"number"),r(),o(22,"td")(23,"div",33)(24,"div",26)(25,"div",27)(26,"span"),a(27),r(),M(28,lt,2,1,"span"),r(),o(29,"small"),a(30),r()(),M(31,pt,3,0,"div"),r()(),o(32,"td",34),M(33,st,2,0,"button",35),r()()),n&2){let e=u.$implicit,t=c(2);l(2),y(e.Outlet),l(5),_("src",J(8,15,e==null?null:e.MarketType),ue)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(3),_("order",e),l(2),B(" ",F(13,17,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(3),y(e.Customer),l(),he(ye(22,ot,(e.Variants==null?null:e.Variants.length)>1)),l(),b((e.Variants==null?null:e.Variants.length)>1?17:18),l(3),y(J(21,20,e.Amount)),l(7),y(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),b(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?28:-1),l(2),B(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),l(),b(!(e.LogisticService!=null&&e.LogisticService.Name)||!e.ReferenceNumber?31:-1),l(2),b((e==null?null:e.MarketType)!=t.channelType.WooCommerce?33:-1)}}function ct(n,u){if(n&1){let e=w();o(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),r(),o(6,"th",21),a(7,"Number"),r(),o(8,"th",21),a(9,"Customer"),r(),o(10,"th"),a(11,"Items"),r(),o(12,"th",22),a(13,"Amount"),r(),o(14,"th",23),a(15,"Shipping"),r(),v(16,"th",24),r()(),o(17,"tbody"),R(18,mt,34,24,"tr",null,V),r()(),o(20,"app-custom-paginator",25),d("next",function(){g(e);let i=c();return f(i.initReadyToShip())})("previous",function(){g(e);let i=c();return f(i.initReadyToShip())}),r()()}if(n&2){let e=c(),t=_e(0);l(18),N(t),l(2),_("filter",e.filter())("totaldata",t==null?null:t.length)}}function dt(n,u){n&1&&(o(0,"div",16),v(1,"app-empty-state"),r())}var Fi=(()=>{class n{constructor(){this.dialog=h(we),this.pickupService=h(Ge),this.toastr=h(be),this.orderService=h(ce),this.channelType=C,this.filter=S({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let e=this.orderService.getOrderDefaultValue();this.filter.update(t=>K(A({},t),{From:e})),this.initReadyToShip()}initReadyToShip(){this.readyToShip$=this.orderService.getReadyToShipOrders(this.filter()).pipe(de(1))}onFilterChange(e){this.filter.update(t=>A(A({},t),e))}onSetFulfillment(e){this.pickupService.getShippingOptions(e.Number,e.ShopID,e.MarketType).pipe(se(t=>this.dialog.open(Ae,{height:"400px",width:"530px",data:{options:t,channelType:e.MarketType}}).afterClosed().pipe(pe(i=>U.IsNotEmpty(i)),G(i=>({type:i,order:e,options:t}))))).subscribe(t=>{t.type=="PICK_UP"?this.onSelectPickup(t.order,t.options):this.onSelectDropOff(t.order,t.options)})}onSelectPickup(e,t){this.dialog.open(He,{width:"530px",data:{order:e,shippingOptions:t,channelType:e.MarketType},disableClose:!0}).afterClosed().pipe(pe(i=>U.IsNotEmpty(i)),se(i=>this.pickupService.pickupOrder(e,i))).subscribe(()=>{this.toastr.success("Pickup order created successfully","Success"),this.initReadyToShip()})}onSelectDropOff(e,t){this.pickupService.dropOffOrder(e,t).subscribe(()=>{this.toastr.success("Drop-off order created successfully","Success"),this.initReadyToShip()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initReadyToShip()})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-ready-to-ship"]],features:[Se([ce])],decls:34,vars:12,consts:[["headerTitle","To Ship","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","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],[2,"width","160px"],["rowCountApi","/api/orders/toshipcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"d-flex","align-items-center","gap-6"],[1,"actions-cell"],[1,"btn","btn-success","btn-sm",2,"--bs-btn-padding-y","0.25rem","--bs-btn-padding-x","0.5rem","--bs-btn-font-size","0.75rem"],["matTooltip","Retrieve shipping courier and reference number",1,"btn","btn-icon-only",3,"click"],[1,"fa-solid","fa-arrows-rotate","fs-6"],[1,"btn","btn-success","btn-sm",2,"--bs-btn-padding-y","0.25rem","--bs-btn-padding-x","0.5rem","--bs-btn-font-size","0.75rem",3,"click"]],template:function(t,i){if(t&1){let p=w();ge(0),D(1,"async"),o(2,"mainpanel",0),d("onSubmit",function(){return g(p),f(i.initReadyToShip())}),x("textChange",function(m){return g(p),T(i.filter().Number,m)||(i.filter().Number=m),f(m)}),o(3,"actions")(4,"a",1),v(5,"i",2),o(6,"span"),a(7,"Order Fulfillment Display"),r()()(),o(8,"filters")(9,"div")(10,"label",3),a(11,"From/To"),r(),o(12,"channel-select-options",4),x("ngModelChange",function(m){return g(p),T(i.filter().ListChannelID,m)||(i.filter().ListChannelID=m),f(m)}),r()(),o(13,"div",5)(14,"label",3),a(15,"From/To"),r(),o(16,"div",6)(17,"datepicker",7),x("dateChange",function(m){return g(p),T(i.filter().From,m)||(i.filter().From=m),f(m)}),r()(),o(18,"div")(19,"datepicker",8),x("dateChange",function(m){return g(p),T(i.filter().To,m)||(i.filter().To=m),f(m)}),r()()(),o(20,"div",5)(21,"label",9),a(22,"Page Number"),r(),o(23,"input",10),x("ngModelChange",function(m){return g(p),T(i.filter().PageNumber,m)||(i.filter().PageNumber=m),f(m)}),r()(),o(24,"div",5)(25,"label",9),a(26,"Page Size"),r(),o(27,"input",11),x("ngModelChange",function(m){return g(p),T(i.filter().PageSize,m)||(i.filter().PageSize=m),f(m)}),r()()(),o(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),M(32,ct,21,2,"div",15)(33,dt,2,0,"div",16),r()()()()()}if(t&2){let p=fe(J(1,8,i.readyToShip$)||Ce(11,nt));l(2),k("text",i.filter().Number),l(10),_("multiple",!0),k("ngModel",i.filter().ListChannelID),l(5),k("date",i.filter().From),l(2),k("date",i.filter().To),l(4),k("ngModel",i.filter().PageNumber),l(4),k("ngModel",i.filter().PageSize),l(5),b(p.length>0?32:33)}},dependencies:[P,ve,ke,j,Me,Oe,Fe,Pe,E,Te,xe,z,H,Ie,Ve,Re,Ne,Ee,Le,le,ae],styles:[".actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{opacity:0;visibility:hidden;transition:opacity .12s ease-in-out}tr[_ngcontent-%COMP%]:hover .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:hover .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:focus-within .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:focus{opacity:1;visibility:visible}"]})}}return n})();export{Fi as ReadyToShipComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as G}from"./chunk-FESS3PG3.js";import"./chunk-6VHVQEVM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import{a as F}from"./chunk-RDRNWLJI.js";import{e as j}from"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import"./chunk-PYXL7UF7.js";import"./chunk-PW42BQIY.js";import{m as H,n as J}from"./chunk-FO7G4GMY.js";import{A as R,c as k,h as B,m as W}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{j as D,l as I,n as P}from"./chunk-FXQKRJWU.js";import{$c as b,Gb as S,Gc as i,Hc as N,Kc as g,Lc as f,Mb as x,Mc as C,Nc as O,Oc as V,Pc as _,Ra as w,Yb as m,Z as v,ad as y,dc as M,ic as e,jc as t,kc as L,oc as T,pa as E,rb as p,tc as h,uc as A,ya as d,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function Y(n,U){if(n&1&&(e(0,"pre",21),i(1),b(2,"json"),t()),n&2){A();let l=_(25);p(),N(y(2,1,l))}}function q(n,U){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var pe=(()=>{class n{constructor(){this.httpService=E(j),this.selectedChannel=w(null),this.orderNumber=w(null)}initEscrowLog(){this.escrowLog$=this.httpService.post(F.GetEscrowDetail,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(v(1))}copyToClipboard(l){if(!l)return;let c=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(c),alert("Copied to clipboard!")}static{this.\u0275fac=function(c){return new(c||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-escrow-api"]],decls:40,vars:10,consts:[["headerTitle","Origin Escrow Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel","onlyInputTypeID"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","escrowLogText"],[1,"text-center","my-12","text-muted"]],template:function(c,o){if(c&1){let a=T();e(0,"mainpanel",0)(1,"actions")(2,"button",1),h("click",function(){return d(a),s(o.initEscrowLog())}),L(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Escrow API "),t()(),e(15,"div",9)(16,"channel-select-options",10),C("ngModelChange",function(r){return d(a),f(o.selectedChannel,r)||(o.selectedChannel=r),s(r)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),C("ngModelChange",function(r){return d(a),f(o.orderNumber,r)||(o.orderNumber=r),s(r)}),t()()()()(),O(25),b(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),h("click",function(){d(a);let r=_(25);return s(o.copyToClipboard(r))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),x(38,Y,3,3,"pre",21)(39,q,2,0,"p",22),t()()()()()()()()()}if(c&2){m("hideSearchBox",!0)("hideSearchDropdown",!0),p(16),g("ngModel",o.selectedChannel),m("onlyInputTypeID",5),p(8),g("ngModel",o.orderNumber),p();let a=V(y(26,7,o.escrowLog$));p(8),m("disabled",!a),p(5),M(a?38:39)}},dependencies:[P,D,I,R,k,B,W,J,H,G],styles:[".container-fluid[_ngcontent-%COMP%]{padding-bottom:1rem}#escrowLogText[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word}"]})}}return n})();export{pe as EscrowApiComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as pe}from"./chunk-UMP6ZMEJ.js";import{a as me,h as xe}from"./chunk-6VHVQEVM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import"./chunk-RDRNWLJI.js";import{b as ue,e as y}from"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import{e as _e}from"./chunk-PYXL7UF7.js";import{a as v,c as ge}from"./chunk-PW42BQIY.js";import{A as le,c as ee,h as te,i as ne,k as ie,m as oe,n as re,t as ae,u as se,v as de,w as ce}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{a as fe,c as he}from"./chunk-ERXVXBTU.js";import{E as P,G as C,J as D,d as $,f as z,g as J,j as X,n as Z}from"./chunk-FXQKRJWU.js";import{$c as G,Ac as U,Bc as W,Cc as q,Fc as O,Gb as _,Gc as a,Hb as A,Hc as b,Ic as H,Jc as B,Kc as E,Lc as I,Mb as f,Mc as L,Tc as Y,Yb as p,Z as R,ac as F,ad as Q,cd as K,ic as n,ja as V,jc as r,ka as T,kc as c,lc as S,mc as k,oc as N,pb as w,rb as s,tc as u,uc as m,xb as l,ya as h,za as x}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var be=(()=>{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(i){return new(i||t)}}static{this.\u0275prov=V({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Ie(t,g){if(t&1&&(n(0,"swiper-slide")(1,"div")(2,"a",2),c(3,"img",3),r()(),n(4,"a",4),a(5),r(),n(6,"p",5),a(7),r()()),t&2){let e=g.$implicit;s(2),p("href",e.href,w),s(),p("src",e.imgSrc,w),s(),p("href",e.href,w),s(),b(e.title),s(2),b(e.description)}}var Ce=(()=>{class t{constructor(){this.newsList=[]}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:"newsList"},standalone:!1,decls:2,vars:1,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],[4,"ngFor","ngForOf"],["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(i,o){i&1&&(n(0,"swiper-container",0),f(1,Ie,8,5,"swiper-slide",1),r()),i&2&&(s(),p("ngForOf",o.newsList))},dependencies:[z],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]})}}return t})();var Te=["subdomainEl"],Ae=(t,g)=>({"rounded-end":t,"border-end-0":g});function Ne(t,g){if(t&1&&(S(0),n(1,"div",36),c(2,"img",37),r(),k()),t&2){let e=g.$implicit;s(2),p("src",e.img,w)("title",e.title)("alt",e.title)}}function ze(t,g){if(t&1){let e=N();S(0),n(1,"div",17)(2,"h3",18),a(3," DealPOS Omnichannel "),r(),n(4,"small",19),a(5," Multichannel Inventory Management Software "),r()(),n(6,"form",20)(7,"div",21)(8,"div",22)(9,"div",23)(10,"span"),c(11,"i",24),r()(),n(12,"input",25,1),L("ngModelChange",function(o){h(e);let d=m();return I(d.subdomain,o)||(d.subdomain=o),x(o)}),r(),n(14,"div")(15,"select",26),L("ngModelChange",function(o){h(e);let d=m();return I(d.domain,o)||(d.domain=o),x(o)}),n(16,"option",27),a(17,".dealpos.co.id"),r(),n(18,"option",28),a(19,".dealpos.net"),r(),n(20,"option",29),a(21,".dealpos.com"),r(),n(22,"option",30),a(23,".dealpos.app"),r()()()(),n(24,"div",31)(25,"button",32),u("click",function(){h(e);let o=m();return x(o.onNextState())}),a(26," Next "),r()(),n(27,"div",33)(28,"div",34),f(29,Ne,3,3,"ng-container",35),r()()()(),k()}if(t&2){let e=m();s(12),E("ngModel",e.subdomain),s(3),E("ngModel",e.domain),s(14),p("ngForOf",e.channels)}}function De(t,g){t&1&&(n(0,"p"),a(1," Username is required "),r())}function je(t,g){if(t&1&&(S(0),n(1,"div",57),c(2,"div",58),n(3,"div",59),f(4,De,2,0,"p",47),r()(),k()),t&2){m();let e=O(14);s(4),p("ngIf",e.errors.required)}}function Re(t,g){if(t&1){let e=N();n(0,"i",62),u("click",function(){h(e);let o=m(3);return x(o.hideShowPassword())}),r()}if(t&2){let e=m(3);F("fa "+e.passwordIcon)}}function Ve(t,g){if(t&1&&(n(0,"span",60),f(1,Re,1,2,"i",61),r()),t&2){let e=m(2);s(),p("ngIf",e.password)}}function Fe(t,g){t&1&&(n(0,"p"),a(1," Password is required "),r())}function Ue(t,g){if(t&1&&(S(0),n(1,"div",57),c(2,"div",58),n(3,"div",59),f(4,Fe,2,0,"p",47),r()(),k()),t&2){m();let e=O(21);s(4),p("ngIf",e.errors.required)}}function We(t,g){if(t&1){let e=N();n(0,"div",38)(1,"h3",39),a(2,"Sign in"),r(),n(3,"h3",40),a(4," to "),n(5,"h6",41),a(6),r(),n(7,"i",42),u("click",function(){h(e);let o=m();return x(o.onEditDomain())}),r()()(),n(8,"form",43)(9,"div",44)(10,"div",23)(11,"span"),c(12,"i",45),r()(),n(13,"input",46,2),L("ngModelChange",function(o){h(e);let d=m();return I(d.username,o)||(d.username=o),x(o)}),r()(),f(15,je,5,1,"ng-container",47),n(16,"div",22)(17,"div",23)(18,"span"),c(19,"i",48),r()(),n(20,"input",49,3),L("ngModelChange",function(o){h(e);let d=m();return I(d.password,o)||(d.password=o),x(o)}),r(),f(22,Ve,2,1,"span",50),r(),f(23,Ue,5,1,"ng-container",47),n(24,"div",51)(25,"button",52),u("click",function(){h(e);let o=m();return x(o.onLogin())}),a(26," Log in "),r()(),n(27,"div",53),c(28,"hr"),n(29,"span",54),a(30,"or"),r(),c(31,"hr"),r(),n(32,"div")(33,"button",55),u("click",function(o){h(e);let d=m();return x(d.onLoginByGoogle(o))}),c(34,"i",56),a(35," Sign In with Google "),r()()()}if(t&2){let e=O(14),i=O(21),o=m();s(6),B(" (",o.subdomain,"",o.domain,") "),s(7),E("ngModel",o.username),s(2),p("ngIf",e.invalid&&(e.dirty||e.touched)),s(5),p("type",o.passwordType)("ngClass",Y(9,Ae,o.browser=="edge",o.browser!="edge")),E("ngModel",o.password),s(2),p("ngIf",o.browser!="edge"),s(),p("ngIf",i.invalid&&(i.dirty||i.touched))}}var ve=(()=>{class t{constructor(e,i,o,d,Se){this._router=e,this.toastr=i,this.checkBrowser=o,this.authService=d,this.ngxPermission=Se,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:v.SHOOPE},{title:"Tokopedia",img:v.TOKOPEDIA},{title:"Tiktok",img:v.TIKTOK},{title:"Woocommerce",img:v.WOOCOMMERCE},{title:"Lazada",img:v.LAZADA},{title:"Shopify",img:v.SHOPIFY},{title:"Plugo",img:v.PLUGONEW}],this.version=me.version,this.news$=d.getNews().pipe(R(1))}ngOnInit(){this.initLogin(),this.browser=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=e?.username,this.subdomain=e?.Host?.split(".")[0];let i=e?.Host?.split("dealpos");this.domain=`.dealpos${i[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ge.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let e=this.subdomain.indexOf(".dealpos");e!=-1&&(this.subdomain=this.subdomain.substring(0,e))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let e={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(e).subscribe(i=>{this.onSuccessLogin(i)})}onLoginByGoogle(e){let i=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(e,i).subscribe(o=>{this.onSuccessLogin(o)})}onSuccessLogin(e){this.ngxPermission.hasPermission([pe.DashboardView]).then(i=>{i?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=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(i){return new(i||t)(l(C),l(ue),l(be),l(xe),l(fe))}}static{this.\u0275cmp=_({type:t,selectors:[["app-login"]],viewQuery:function(i,o){if(i&1&&U(Te,5),i&2){let d;W(d=q())&&(o.subdomainEl=d.first)}},standalone:!1,decls:19,vars:7,consts:[["USERNAME_PASSWORD",""],["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"],[4,"ngIf","ngIfElse"],[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"],[4,"ngFor","ngForOf"],[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"],[4,"ngIf"],[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","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[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"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[2,"width","52px"],[1,"text-danger","ps-1"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(i,o){if(i&1&&(n(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),a(4,"New Features"),r(),c(5,"POS-news-swiper",8),G(6,"async"),r(),n(7,"div",9),f(8,ze,30,3,"ng-container",10)(9,We,36,12,"ng-template",null,0,K),r()(),n(11,"div",11)(12,"span",12),a(13,"powered by :"),r(),c(14,"a",13),r(),n(15,"div",14)(16,"a",15),a(17),c(18,"i",16),r()()()),i&2){let d=O(10);s(5),p("newsList",Q(6,5,o.news$)),s(3),p("ngIf",o.loginState=="FORM_DOMAIN")("ngIfElse",d),s(8),p("href",o.changelogUrl,w),s(),H("version ",o.version,"")}},dependencies:[$,z,J,re,se,de,ee,ae,te,ne,ce,oe,ie,Ce,X],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}"]})}}return t})();var Me=(()=>{class t{constructor(e,i,o){this.route=e,this.http=i,this.service=o}ngOnInit(){this.route.queryParams.subscribe(e=>{this.shopID=e.shop_id,this.code=e.code})}addShopee(){let e={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",e).subscribe(o=>{this.service.navigate(["/menu/channel"])})}static{this.\u0275fac=function(i){return new(i||t)(l(P),l(y),l(C))}}static{this.\u0275cmp=_({type:t,selectors:[["shopee-authorized"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(i,o){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),c(5,"i",5),n(6,"div",6),a(7,"Success !"),r()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),n(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),n(13,"div"),a(14," Your shopID is "),n(15,"span",8),a(16),r()(),n(17,"button",9),u("click",function(){return o.addShopee()}),c(18,"i",10),a(19," Add to my Channel"),r()()()()()()),i&2&&(s(16),b(o.shopID))},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}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]})}}return t})();var Oe=(()=>{class t{constructor(e,i,o){this.route=e,this.http=i,this.service=o}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code,this.state=e.state})}addChannelTiktok(){let e={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}static{this.\u0275fac=function(i){return new(i||t)(l(P),l(y),l(C))}}static{this.\u0275cmp=_({type:t,selectors:[["app-tiktok"]],standalone:!1,decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(i,o){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),c(5,"i",5),n(6,"div",6),a(7,"Success !"),r()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),n(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),n(13,"div"),a(14," Your Code is "),n(15,"span",8),a(16),r()(),n(17,"div"),a(18," Your State is "),n(19,"span",8),a(20),r()(),n(21,"button",9),u("click",function(){return o.addChannelTiktok()}),c(22,"i",10),a(23," Add to my Channel"),r()()()()()()),i&2&&(s(16),b(o.code),s(4),b(o.state))},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}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]})}}return t})();var Pe=(()=>{class t{constructor(e,i,o){this.route=e,this.http=i,this.service=o}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code})}addChannelLazada(){let e={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}static{this.\u0275fac=function(i){return new(i||t)(l(P),l(y),l(C))}}static{this.\u0275cmp=_({type:t,selectors:[["app-lazada"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(i,o){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),c(5,"i",5),n(6,"div",6),a(7,"Success !"),r()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),n(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),n(13,"div"),a(14," Your Code is "),n(15,"span",8),a(16),r()(),n(17,"button",9),u("click",function(){return o.addChannelLazada()}),c(18,"i",10),a(19," Add to my Channel"),r()()()()()()),i&2&&(s(16),b(o.code))},encapsulation:2})}}return t})();var qe=[{path:"",component:ve,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Me,data:{title:"Success"}},{path:"tiktok",component:Oe,data:{title:"Success"}},{path:"lazada",component:Pe,data:{title:"Success"}}],ye=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=A({type:t})}static{this.\u0275inj=T({imports:[D.forChild(qe),D]})}}return t})();var Pt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=A({type:t})}static{this.\u0275inj=T({imports:[Z,le,ye,_e,he]})}}return t})();export{Pt as LoginModule};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as T}from"./chunk-Z3ITXK3D.js";import{a as Qe}from"./chunk-ACIMXBIC.js";import{a as Je}from"./chunk-J53BPEDH.js";import{a as Ke,b as me,c as ze,d as Ve,e as Se,f as qe,g as ve,h as Ge,i as G,j as Ae,k as y}from"./chunk-TGMCGROM.js";import{a as Ye}from"./chunk-RDRNWLJI.js";import{e as ne}from"./chunk-W5L6FMO3.js";import{b as ge,c as te}from"./chunk-PW42BQIY.js";import{b as Ze}from"./chunk-V3USB3ZU.js";import{a as Xe}from"./chunk-ERXVXBTU.js";import{G as We,n as $e,o as Ue,p as He}from"./chunk-FXQKRJWU.js";import{F as Oe,G as Me,Hb as U,La as L,O as de,Ra as ee,T as Ne,Wa as $,Z as he,aa as x,ba as pe,c as g,dd as Fe,ea as V,ed as Le,f as Y,id as q,j as xe,ja as k,k as Re,ka as B,ma as b,n as K,o as Q,oa as h,p as R,pa as F,q as z,qa as Be,ua as fe,v as D,w as je}from"./chunk-OJMQBH6T.js";import{a as ue,i as I}from"./chunk-66YHNWRR.js";var et={production:!0,version:"5.45.0",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var wt="firebase",kt="11.10.0";G(wt,kt,"app");var H=new Fe("ANGULARFIRE2_VERSION");var tt=(n,s)=>{let e=s?[s]:Ge(),t=[];return e.forEach(r=>{r.container.getProvider(n).instances.forEach(i=>{t.includes(i)||t.push(i)})}),t},we=function(n){return n[n.SILENT=0]="SILENT",n[n.WARN=1]="WARN",n[n.VERBOSE=2]="VERBOSE",n}(we||{}),Dn=q()&&typeof Zone<"u"?we.WARN:we.SILENT;var re=class{zone;delegate;constructor(s,e=Re){this.zone=s,this.delegate=e}now(){return this.delegate.now()}schedule(s,e,t){let r=this.zone,o=function(i){r?r.runGuarded(()=>{s.apply(this,[i])}):s.apply(this,[i])};return this.delegate.schedule(o,e,t)}},ke=(()=>{class n{outsideAngular;insideAngular;constructor(){let e=F(L);this.outsideAngular=e.runOutsideAngular(()=>new re(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=e.run(()=>new re(typeof Zone>"u"?void 0:Zone.current,xe))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=k({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var It=new Map,bt={activated:!1,tokenObservers:[]},Tt={initialized:!1,enabled:!1};function C(n){return It.get(n)||Object.assign({},bt)}function it(){return Tt}var yt="https://content-firebaseappcheck.googleapis.com/v1";var Ct="exchangeDebugToken",nt={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3},$n=24*60*60*1e3;var be=class{constructor(s,e,t,r,o){if(this.operation=s,this.retryPolicy=e,this.getWaitDuration=t,this.lowerBound=r,this.upperBound=o,this.pending=null,this.nextErrorWaitInterval=r,r>o)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(s){return I(this,null,function*(){this.stop();try{this.pending=new me,this.pending.promise.catch(e=>{}),yield Pt(this.getNextRun(s)),this.pending.resolve(),yield this.pending.promise,this.pending=new me,this.pending.promise.catch(e=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(e){this.retryPolicy(e)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(s){if(s)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let e=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),e}}};function Pt(n){return new Promise(s=>{setTimeout(s,n)})}var Dt={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},j=new Ve("appCheck","AppCheck",Dt);function st(n){if(!C(n).activated)throw j.create("use-before-activation",{appName:n.name})}function at(t,r){return I(this,arguments,function*({url:n,body:s},e){let o={"Content-Type":"application/json"},i=e.getImmediate({optional:!0});if(i){let f=yield i.getHeartbeatsHeader();f&&(o["X-Firebase-Client"]=f)}let a={method:"POST",body:JSON.stringify(s),headers:o},l;try{l=yield fetch(n,a)}catch(f){throw j.create("fetch-network-error",{originalErrorMessage:f?.message})}if(l.status!==200)throw j.create("fetch-status-error",{httpStatus:l.status});let c;try{c=yield l.json()}catch(f){throw j.create("fetch-parse-error",{originalErrorMessage:f?.message})}let d=c.ttl.match(/^([\d.]+)(s)$/);if(!d||!d[2]||isNaN(Number(d[1])))throw j.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${c.ttl}`});let u=Number(d[1])*1e3,p=Date.now();return{token:c.token,expireTimeMillis:p+u,issuedAtTimeMillis:p}})}function ct(n,s){let{projectId:e,appId:t,apiKey:r}=n.options;return{url:`${yt}/projects/${e}/apps/${t}:${Ct}?key=${r}`,body:{debug_token:s}}}var _t="firebase-app-check-database",xt=1,Te="firebase-app-check-store";var oe=null;function Rt(){return oe||(oe=new Promise((n,s)=>{try{let e=indexedDB.open(_t,xt);e.onsuccess=t=>{n(t.target.result)},e.onerror=t=>{var r;s(j.create("storage-open",{originalErrorMessage:(r=t.target.error)===null||r===void 0?void 0:r.message}))},e.onupgradeneeded=t=>{let r=t.target.result;switch(t.oldVersion){case 0:r.createObjectStore(Te,{keyPath:"compositeKey"})}}}catch(e){s(j.create("storage-open",{originalErrorMessage:e?.message}))}}),oe)}function jt(n,s){return Ot(Mt(n),s)}function Ot(n,s){return I(this,null,function*(){let t=(yield Rt()).transaction(Te,"readwrite"),o=t.objectStore(Te).put({compositeKey:n,value:s});return new Promise((i,a)=>{o.onsuccess=l=>{i()},t.onerror=l=>{var c;a(j.create("storage-set",{originalErrorMessage:(c=l.target.error)===null||c===void 0?void 0:c.message}))}})})}function Mt(n){return`${n.options.appId}-${n.name}`}var Z=new qe("@firebase/app-check");function Ee(n,s){return ze()?jt(n,s).catch(e=>{Z.warn(`Failed to write token to IndexedDB. Error: ${e}`)}):Promise.resolve()}function lt(){return it().enabled}function ut(){return I(this,null,function*(){let n=it();if(n.enabled&&n.token)return n.token.promise;throw Error(`
|
|
2
|
-
Can't get debug token in production mode.
|
|
3
|
-
`)})}var Nt={error:"UNKNOWN_ERROR"};function Bt(n){return Ke.encodeString(JSON.stringify(n),!1)}function ye(n,s=!1,e=!1){return I(this,null,function*(){let t=n.app;st(t);let r=C(t),o=r.token,i;if(o&&!J(o)&&(r.token=void 0,o=void 0),!o){let c=yield r.cachedTokenPromise;c&&(J(c)?o=c:yield Ee(t,void 0))}if(!s&&o&&J(o))return{token:o.token};let a=!1;if(lt())try{r.exchangeTokenPromise||(r.exchangeTokenPromise=at(ct(t,yield ut()),n.heartbeatServiceProvider).finally(()=>{r.exchangeTokenPromise=void 0}),a=!0);let c=yield r.exchangeTokenPromise;return yield Ee(t,c),r.token=c,{token:c.token}}catch(c){return c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?Z.warn(c.message):e&&Z.error(c),Ie(c)}try{r.exchangeTokenPromise||(r.exchangeTokenPromise=r.provider.getToken().finally(()=>{r.exchangeTokenPromise=void 0}),a=!0),o=yield C(t).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?Z.warn(c.message):e&&Z.error(c),i=c}let l;return o?i?J(o)?l={token:o.token,internalError:i}:l=Ie(i):(l={token:o.token},r.token=o,yield Ee(t,o)):l=Ie(i),a&&Ut(t,l),l})}function Ft(n){return I(this,null,function*(){let s=n.app;st(s);let{provider:e}=C(s);if(lt()){let t=yield ut(),{token:r}=yield at(ct(s,t),n.heartbeatServiceProvider);return{token:r}}else{let{token:t}=yield e.getToken();return{token:t}}})}function Lt(n,s,e,t){let{app:r}=n,o=C(r),i={next:e,error:t,type:s};if(o.tokenObservers=[...o.tokenObservers,i],o.token&&J(o.token)){let a=o.token;Promise.resolve().then(()=>{e({token:a.token}),rt(n)}).catch(()=>{})}o.cachedTokenPromise.then(()=>rt(n))}function dt(n,s){let e=C(n),t=e.tokenObservers.filter(r=>r.next!==s);t.length===0&&e.tokenRefresher&&e.tokenRefresher.isRunning()&&e.tokenRefresher.stop(),e.tokenObservers=t}function rt(n){let{app:s}=n,e=C(s),t=e.tokenRefresher;t||(t=$t(n),e.tokenRefresher=t),!t.isRunning()&&e.isTokenAutoRefreshEnabled&&t.start()}function $t(n){let{app:s}=n;return new be(()=>I(null,null,function*(){let e=C(s),t;if(e.token?t=yield ye(n,!0):t=yield ye(n),t.error)throw t.error;if(t.internalError)throw t.internalError}),()=>!0,()=>{let e=C(s);if(e.token){let t=e.token.issuedAtTimeMillis+(e.token.expireTimeMillis-e.token.issuedAtTimeMillis)*.5+3e5,r=e.token.expireTimeMillis-5*60*1e3;return t=Math.min(t,r),Math.max(0,t-Date.now())}else return 0},nt.RETRIAL_MIN_WAIT,nt.RETRIAL_MAX_WAIT)}function Ut(n,s){let e=C(n).tokenObservers;for(let t of e)try{t.type==="EXTERNAL"&&s.error!=null?t.error(s.error):t.next(s)}catch{}}function J(n){return n.expireTimeMillis-Date.now()>0}function Ie(n){return{token:Bt(Nt),error:n}}var Ce=class{constructor(s,e){this.app=s,this.heartbeatServiceProvider=e}_delete(){let{tokenObservers:s}=C(this.app);for(let e of s)dt(this.app,e.next);return Promise.resolve()}};function Ht(n,s){return new Ce(n,s)}function Wt(n){return{getToken:s=>ye(n,s),getLimitedUseToken:()=>Ft(n),addTokenListener:s=>Lt(n,"INTERNAL",s),removeTokenListener:s=>dt(n.app,s)}}var Kt="@firebase/app-check",zt="0.10.1";var Vt="app-check",ot="app-check-internal";function qt(){ve(new Se(Vt,n=>{let s=n.getProvider("app").getImmediate(),e=n.getProvider("heartbeat");return Ht(s,e)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((n,s,e)=>{n.getProvider(ot).initialize()})),ve(new Se(ot,n=>{let s=n.getProvider("app-check").getImmediate();return Wt(s)},"PUBLIC").setInstantiationMode("EXPLICIT")),G(Kt,zt)}qt();var Gt="app-check";var ie=class{constructor(){return tt(Gt)}};var Zt=["localhost","0.0.0.0","127.0.0.1"],tr=typeof window<"u"&&Zt.includes(window.location.hostname);var Xt="firebase",Yt="11.10.0";y.registerVersion(Xt,Yt,"app-compat");var Qt=["ngOnDestroy"],pt=(n,s,e,t={})=>new Proxy(n,{get:(r,o)=>e.runOutsideAngular(()=>{if(n[o])return t?.spy?.get&&t.spy.get(o,n[o]),n[o];if(Qt.indexOf(o)>-1)return()=>{};let i=s.toPromise().then(a=>{let l=a?.[o];return typeof l=="function"?l.bind(a):l?.then?l.then(c=>e.run(()=>c)):e.run(()=>l)});return new Proxy(()=>{},{get:(a,l)=>i[l],apply:(a,l,c)=>i.then(d=>{let u=d?.(...c);return t?.spy?.apply&&t.spy.apply(o,c,u),u})})})});var se=class{constructor(s){return s}},ae=new b("angularfire2.app.options"),ce=new b("angularfire2.app.name");function Pe(n,s,e){let t=typeof e=="string"&&e||"[DEFAULT]",r=typeof e=="object"&&e||{};r.name=r.name||t;let i=y.apps.filter(a=>a&&a.name===r.name)[0]||s.runOutsideAngular(()=>y.initializeApp(n,r));try{if(JSON.stringify(n)!==JSON.stringify(i.options)){let a=!!module.hot;en("error",`${i.name} Firebase App already initialized with different options${a?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new se(i)}var en=(n,...s)=>{q()&&typeof console<"u"&&console[n](...s)},tn={provide:se,useFactory:Pe,deps:[ae,L,[new Be,ce]]},Go=(()=>{class n{static initializeApp(e,t){return{ngModule:n,providers:[{provide:ae,useValue:e},{provide:ce,useValue:t}]}}constructor(e){y.registerVersion("angularfire",H.full,"core"),y.registerVersion("angularfire",H.full,"app-compat"),y.registerVersion("angular",Le.full,e.toString())}static \u0275fac=function(t){return new(t||n)(h($))};static \u0275mod=U({type:n});static \u0275inj=B({providers:[tn]})}return n})();function ft(n,s,e,t,r){let[,o,i]=globalThis.\u0275AngularfireInstanceCache.find(a=>a[0]===n)||[];if(o)return nn(r,i)||(ht("error",`${s} was already initialized on the ${e} Firebase App with different settings.${rn?" You may need to reload as Firebase is not HMR aware.":""}`),ht("warn",{is:r,was:i})),o;{let a=t();return globalThis.\u0275AngularfireInstanceCache.push([n,a,r]),a}}function nn(n,s){try{return n.toString()===s.toString()}catch{return n===s}}var rn=typeof module<"u"&&!!module.hot,ht=(n,...s)=>{q()&&typeof console<"u"&&console[n](...s)};globalThis.\u0275AngularfireInstanceCache||=[];var on=new b("angularfire2.auth.use-emulator"),sn=new b("angularfire2.auth.settings"),an=new b("angularfire2.auth.tenant-id"),cn=new b("angularfire2.auth.langugage-code"),ln=new b("angularfire2.auth.use-device-language"),un=new b("angularfire.auth.persistence"),dn=(n,s,e,t,r,o,i,a)=>ft(`${n.name}.auth`,"AngularFireAuth",n.name,()=>{let l=s.runOutsideAngular(()=>n.auth());if(e&&l.useEmulator(...e),t&&(l.tenantId=t),l.languageCode=r,o&&l.useDeviceLanguage(),i)for(let[c,d]of Object.entries(i))l.settings[c]=d;return a&&l.setPersistence(a),l},[e,t,r,o,i,a]),De=(()=>{class n{injector=F(fe);authState;idToken;user;idTokenResult;credential;constructor(e,t,r,o,i,a,l,c,d,u,p,f){let W=new Y,O=z(void 0).pipe(K(i.outsideAngular),x(()=>o.runOutsideAngular(()=>import("./chunk-GCECFUOP.js"))),D(()=>Pe(e,o,t)),D(P=>dn(P,o,a,c,d,u,l,p)),he({bufferSize:1,refCount:!1}));if(He(r))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=z(null);else{O.pipe(Ne()).subscribe();let P=O.pipe(x(S=>S.getRedirectResult().then(_=>_,()=>null)),Ze(this.injector),he({bufferSize:1,refCount:!1})),X=O.pipe(x(S=>new g(_=>({unsubscribe:o.runOutsideAngular(()=>S.onAuthStateChanged(M=>_.next(M),M=>_.error(M),()=>_.complete()))})))),le=O.pipe(x(S=>new g(_=>({unsubscribe:o.runOutsideAngular(()=>S.onIdTokenChanged(M=>_.next(M),M=>_.error(M),()=>_.complete()))}))));this.authState=P.pipe(pe(X),Q(i.outsideAngular),K(i.insideAngular)),this.user=P.pipe(pe(le),Q(i.outsideAngular),K(i.insideAngular)),this.idToken=this.user.pipe(x(S=>S?R(S.getIdToken()):z(null))),this.idTokenResult=this.user.pipe(x(S=>S?R(S.getIdTokenResult()):z(null))),this.credential=Oe(P,W,this.authState.pipe(Me(S=>!S))).pipe(D(S=>S?.user?S:null),Q(i.outsideAngular),K(i.insideAngular))}return pt(this,O,o,{spy:{apply:(P,X,le)=>{(P.startsWith("signIn")||P.startsWith("createUser"))&&le.then(S=>W.next(S))}}})}static \u0275fac=function(t){return new(t||n)(h(ae),h(ce,8),h($),h(L),h(ke),h(on,8),h(sn,8),h(an,8),h(cn,8),h(ln,8),h(un,8),h(ie,8))};static \u0275prov=k({token:n,factory:n.\u0275fac,providedIn:"any"})}return n})(),ui=(()=>{class n{constructor(){y.registerVersion("angularfire",H.full,"auth-compat")}static \u0275fac=function(t){return new(t||n)};static \u0275mod=U({type:n});static \u0275inj=B({providers:[De]})}return n})();function m(n,s,e,t){return new Promise((r,o)=>{n||o("IndexedDB not available");let i=n.open(s,e),a;i.onsuccess=l=>{a=i.result,r(a)},i.onerror=l=>{o(`IndexedDB error: ${i.error}`)},typeof t=="function"&&(i.onupgradeneeded=l=>{t(l,a)})})}function gt(n,s,e,t,r){if(!n)return;let o=n.open(s,e);o.onupgradeneeded=i=>{let a=i.target.result;t.forEach(c=>{if(!a.objectStoreNames.contains(c.store)){let d=a.createObjectStore(c.store,c.storeConfig);c.storeSchema.forEach(u=>{d.createIndex(u.name,u.keypath,u.options)})}});let l=r&&r();l&&Object.keys(l).map(c=>parseInt(c,10)).filter(c=>c>i.oldVersion).sort((c,d)=>c-d).forEach(c=>{l[c](a,o.transaction)}),a.close()},o.onsuccess=i=>{i.target.result.close()}}function pn(n,s,e){if(!n||!s||!e)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(t=>{try{let r=s+1,o=indexedDB.open(n,r);o.onupgradeneeded=i=>{let a=i.target.result;a.deleteObjectStore(e),a.close(),console.log("onupgradeneeded"),t.next(!0),t.complete()},o.onerror=i=>t.error(i)}catch(r){t.error(r)}})}function fn(n,s){return n.objectStoreNames.contains(s)}function E(n,s,e){n||e("You need to use the openDatabase function to create a database before you query it!"),fn(n,s)||e(`objectStore does not exists: ${s}`)}function A(n,s){let e=n.transaction(s.storeName,s.dbMode);return e.onerror=s.error,e.onabort=s.abort,e}function w(n,s,e,t){return{storeName:s,dbMode:n,error:r=>{e(r)},abort:r=>{e(r)}}}var v=function(n){return n.readonly="readonly",n.readwrite="readwrite",n}(v||{}),mt=new b(null),_e=(()=>{class n{constructor(e,t){if(this.dbConfig=e,this.platformId=t,!e.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!e.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");this.isBrowser=Ue(this.platformId),this.isBrowser&&(this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,gt(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),m(this.indexedDB,e.name).then(r=>{r.version!==e.version&&(this.dbConfig.version=r.version)}))}createObjectStore(e,t){let r=[e];gt(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,r,t)}add(e,t,r){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{let l=A(i,w(v.readwrite,e,d=>o.error(d))).objectStore(e),c=r?l.add(t,r):l.add(t);c.onsuccess=d=>I(this,null,function*(){let u=d.target.result,p=l.get(u);p.onsuccess=f=>{o.next(f.target.result),o.complete()}})}).catch(i=>o.error(i))})}bulkAdd(e,t){let r=new Promise((o,i)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{let c=A(a,w(v.readwrite,e,o,i)).objectStore(e),d=t.map(u=>new Promise((p,f)=>{let W=u.key;delete u.key;let O=W?c.add(u,W):c.add(u);O.onsuccess=P=>{let X=P.target.result;p(X)}}));o(Promise.all(d))}).catch(a=>i(a))});return R(r)}bulkDelete(e,t){let r=t.map(o=>new Promise((i,a)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(l=>{let c=A(l,w(v.readwrite,e,a,i));c.objectStore(e).delete(o),c.oncomplete=()=>{this.getAll(e).pipe(de(1)).subscribe(u=>{i(u)})}}).catch(l=>a(l))}));return R(Promise.all(r))}getByKey(e,t){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{let l=A(o,w(v.readonly,e,r.error)).objectStore(e).get(t);l.onsuccess=c=>{r.next(c.target.result),r.complete()},l.onerror=c=>{r.error(c)}}).catch(o=>r.error(o))})}bulkGet(e,t){let r=t.map(o=>this.getByKey(e,o));return new g(o=>{je(r).subscribe(i=>{o.next(i),o.complete()})})}getByID(e,t){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{E(o,e,c=>r.error(c));let l=A(o,w(v.readonly,e,r.error,r.next)).objectStore(e).get(t);l.onsuccess=c=>{r.next(c.target.result)}}).catch(o=>r.error(o))})}getByIndex(e,t,r){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{E(i,e,u=>o.error(u));let d=A(i,w(v.readonly,e,o.error)).objectStore(e).index(t).get(r);d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(i=>o.error(i))})}getAll(e){return new g(t=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,e,l=>t.error(l));let a=A(r,w(v.readonly,e,t.error,t.next)).objectStore(e).getAll();a.onerror=l=>{t.error(l)},a.onsuccess=({target:{result:l}})=>{t.next(l),t.complete()}}).catch(r=>t.error(r))})}update(e,t){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{E(o,e,c=>r.error(c));let a=A(o,w(v.readwrite,e,c=>r.error(c))).objectStore(e),l=a.put(t);l.onsuccess=c=>I(this,null,function*(){let d=c.target.result,u=a.get(d);u.onsuccess=p=>{r.next(p.target.result),r.complete()}})}).catch(o=>r.error(o))})}delete(e,t){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{E(o,e,l=>r.error(l));let i=A(o,w(v.readwrite,e,l=>r.error(l)));i.objectStore(e).delete(t),i.oncomplete=()=>{this.getAll(e).pipe(de(1)).subscribe(l=>{r.next(l),r.complete()})}}).catch(o=>r.error(o))})}deleteByKey(e,t){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{E(o,e,l=>r.error(l));let i=A(o,w(v.readwrite,e,l=>r.error(l))),a=i.objectStore(e);i.oncomplete=()=>{r.next(!0),r.complete()},a.delete(t)}).catch(o=>r.error(o))})}clear(e){return new g(t=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,e,a=>t.error(a));let o=A(r,w(v.readwrite,e,a=>t.error(a)));o.objectStore(e).clear(),o.oncomplete=()=>{t.next(!0),t.complete()}}).catch(r=>t.error(r))})}deleteDatabase(){return new g(e=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>I(this,null,function*(){yield t.close();let r=this.indexedDB.deleteDatabase(this.dbConfig.name);r.onsuccess=()=>{e.next(!0),e.complete()},r.onerror=o=>e.error(o),r.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(t=>e.error(t))})}openCursor(e,t){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{E(o,e,c=>r.error(c));let a=A(o,w(v.readonly,e,r.error)).objectStore(e),l=t===void 0?a.openCursor():a.openCursor(t);l.onsuccess=c=>{r.next(c),r.complete()}}).catch(o=>r.error(o))})}openCursorByIndex(e,t,r,o=v.readonly){let i=new Y;return m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{E(a,e,p=>{i.error(p)});let u=A(a,w(o,e,p=>{i.error(p)},()=>{i.next()})).objectStore(e).index(t).openCursor(r);u.onsuccess=p=>{i.next(p)}}).catch(a=>i.error(a)),i}getAllByIndex(e,t,r){let o=[];return new g(i=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{E(a,e,p=>i.error(p));let u=A(a,w(v.readonly,e,i.error)).objectStore(e).index(t).openCursor(r);u.onsuccess=p=>{let f=p.target.result;f?(o.push(f.value),f.continue()):(i.next(o),i.complete())}}).catch(a=>i.error(a))})}getAllKeysByIndex(e,t,r){let o=[];return new g(i=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{E(a,e,p=>i.error(p));let u=A(a,w(v.readonly,e,i.error)).objectStore(e).index(t).openKeyCursor(r);u.onsuccess=p=>{let f=p.target.result;f?(o.push({primaryKey:f.primaryKey,key:f.key}),f.continue()):(i.next(o),i.complete())}}).catch(a=>i.error(a))})}count(e,t){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{E(o,e,c=>r.error(c));let l=A(o,w(v.readonly,e,r.error)).objectStore(e).count(t);l.onerror=c=>r.error(c),l.onsuccess=c=>{r.next(c.target.result),r.complete()}}).catch(o=>r.error(o))})}countByIndex(e,t,r){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{E(i,e,u=>o.error(u));let d=A(i,w(v.readonly,e,o.error)).objectStore(e).index(t).count(r);d.onerror=u=>o.error(u),d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(i=>o.error(i))})}deleteObjectStore(e){return pn(this.dbConfig.name,++this.dbConfig.version,e)}}return n.\u0275fac=function(e){return new(e||n)(h(mt),h($))},n.\u0275prov=k({token:n,factory:n.\u0275fac}),n})(),vi=(()=>{class n{static forRoot(e){return{ngModule:n,providers:[_e,{provide:mt,useValue:e}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=U({type:n}),n.\u0275inj=B({imports:[[$e]]}),n})();var St=(()=>{class n{constructor(e){this.db=e,this.DATABASE="Categories"}saveCategoriesByChannelType(e,t){let r=this.getKey(t);return this.db.add(this.DATABASE,e,r).pipe(D(o=>e))}getCategoriesByChannelType(e){let t=this.getKey(e);return this.db.getByKey(this.DATABASE,t)}getKey(e){let t="";switch(e){case ge.Lazada:t="Lazada";break;case ge.Tokopedia:t="Tokopedia";break}return t}clearDatabase(){this.db.clear(this.DATABASE)}getHostName(){let e=localStorage.getItem("Authorization");return this.hostName=JSON.parse(e)?.Host,this.hostName}static{this.\u0275fac=function(t){return new(t||n)(h(_e))}}static{this.\u0275prov=k({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var vt=(()=>{class n{inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:"xv1oomgl",name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){let t={Enabled:!0};e&&(t=ue(ue({},t),e)),localStorage.setItem("Intercom",JSON.stringify(t))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!0}),e.hide_default_launcher=!0,this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!1}),e.hide_default_launcher=!1,this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return te.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=k({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var At=(()=>{class n{constructor(){this.httpService=F(ne),this.currentUser=ee(null),this.tokenValue=ee(null),this.channels=ee([])}refreshToken(){return this.httpService.get(Ye.RefreshToken).pipe(V(e=>{this.updateTokenInLocalStorage(e)}))}updateTokenInLocalStorage(e){this.saveUserToLocalStorage(e),this.saveChannelsToLocalStorage(e.Channels)}saveUserToLocalStorage(e){let t=JSON.stringify(e);localStorage.setItem(T.USER,t)}getUser(){if(this.currentUser())return this.currentUser();{let e=localStorage.getItem(T.USER);return this.currentUser.set(e?JSON.parse(e):null),this.currentUser()}}getTokenValue(){let e=this.getUser();if(!this.tokenValue()){let t=Qe.parseJwt(e?.Token.access_token);this.tokenValue.set(t)}return this.tokenValue()}saveChannelsToLocalStorage(e){let t=JSON.stringify(e);localStorage.setItem(T.CHANNELS,t)}getChannels(){if(this.channels().length==0){let e=localStorage.getItem(T.CHANNELS),t=e?JSON.parse(e):[];this.channels.set(t)}return this.channels()}clearStorage(){localStorage.removeItem(T.USER),localStorage.removeItem(T.CHANNELS),this.currentUser.set(null),this.tokenValue.set(null),this.channels.set([])}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=k({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var $i=(()=>{class n{constructor(e,t,r,o,i,a,l,c){this.httpService=e,this.tokenDecodeService=t,this.afAuth=r,this.ngxPermission=o,this.localDataService=i,this.router=a,this.intercomService=l,this.tokenService=c}login(e){return this.httpService.post("/api/token/Login",e).pipe(V(t=>{this.setLocalStorage(t,e.Host,e.Username),this.loadPermissions()}))}getNews(){return this.httpService.get(et.news).pipe(D(e=>e?.items?.map(t=>t?.properties)))}loginWithGoogle(e,t){e.preventDefault();let r=new Ae;return r.setCustomParameters({prompt:"select_account"}),R(this.afAuth.signInWithPopup(r)).pipe(D(o=>o.credential),D(o=>o.idToken),x(o=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:o,Host:t}))),V(o=>{this.setLocalStorage(o,t,null),this.loadPermissions()}))}setLocalStorage(e,t,r){this.tokenService.updateTokenInLocalStorage(e),localStorage.setItem(T.AUTHORIZATION,JSON.stringify({Host:t,username:r})),this.intercomService.updateLocalStorage(e.IntercomWidget),this.intercomService.inititalizeIntercom()}loadPermissions(){this.ngxPermission.loadPermissions([]);let e=localStorage.getItem(T.USER);if(te.IsNotEmpty(e)){let t=this.tokenDecodeService.GetRoles();this.ngxPermission.loadPermissions(t)}}getChannels(){return this.tokenService.getChannels()}logout(){this.clearLocalStorage(),this.ngxPermission.flushPermissions()}isActiveToken(){let e=this.tokenService.getUser(),t=new Date;if(e!=null){let r=new Date(e.Token.expiredAt);return t<r?!0:(this.clearLocalStorage(),!1)}else return!1}getDomain(){if(!this.domain){let e=localStorage.getItem(T.AUTHORIZATION);this.domain="https://"+JSON.parse(e).Host}return this.domain}clearLocalStorage(){this.domain=null,this.tokenService.clearStorage(),this.intercomService.shutdown(),this.localDataService.clearDatabase(),this.router.navigate([""])}static{this.\u0275fac=function(t){return new(t||n)(h(ne),h(Je),h(De),h(Xe),h(St),h(We),h(vt),h(At))}}static{this.\u0275prov=k({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();export{et as a,Go as b,ui as c,vi as d,St as e,vt as f,At as g,$i as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ae}from"./chunk-H46SHHXR.js";import{a as M}from"./chunk-LHX4ZOLA.js";import{a as oe}from"./chunk-PFXOFSJG.js";import{a as re}from"./chunk-OLANEXLB.js";import"./chunk-BQIB3N6V.js";import"./chunk-B67DSLBY.js";import"./chunk-6RLISMEX.js";import"./chunk-TH6VZX34.js";import"./chunk-QS22J2SC.js";import"./chunk-QP4C4R4W.js";import"./chunk-5LQRO4AI.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-WLRPCY65.js";import"./chunk-3RK6DDJD.js";import"./chunk-3UN6FPMN.js";import"./chunk-LDPDLCRL.js";import"./chunk-JVNHFIYT.js";import{a as le}from"./chunk-FESS3PG3.js";import{a as te,b as ie}from"./chunk-RTT3JVJM.js";import{a as ne}from"./chunk-UXPULNCR.js";import"./chunk-6VHVQEVM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-J53BPEDH.js";import"./chunk-TGMCGROM.js";import"./chunk-RDRNWLJI.js";import"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import"./chunk-PYXL7UF7.js";import"./chunk-PW42BQIY.js";import{m as $,n as ee}from"./chunk-FO7G4GMY.js";import{A as X,c as J,h as K,m as Q,o as U}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as Y,s as Z}from"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{j as R,k as j,m as q,n as G}from"./chunk-FXQKRJWU.js";import{$c as w,Gb as W,Gc as o,Hc as h,Kc as c,Lc as u,Mb as L,Mc as C,Nc as I,Oc as k,Pc as A,Qc as z,Ra as O,Yb as g,Z as P,ad as x,bd as H,dc as N,ec as D,gc as F,hc as B,ic as e,jc as t,kc as _,oc as b,pa as V,rb as l,tc as v,uc as y,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as E,b as T}from"./chunk-66YHNWRR.js";function me(m,S){if(m&1&&(e(0,"tr")(1,"td"),o(2),t(),e(3,"td"),_(4,"order-link",26),t(),e(5,"td"),o(6),t(),e(7,"td"),o(8),w(9,"number"),t(),e(10,"td"),o(11),w(12,"date"),t(),e(13,"td"),_(14,"app-channel-logo",27),t()()),m&2){let r=S.$implicit;l(2),h(r.Outlet),l(2),g("order",r),l(2),h(r.Customer),l(2),h(x(9,6,r.Amount)),l(3),h(H(12,8,r.Created,"dd MMM yyyy HH:mm")),l(3),g("typeId",r==null?null:r.TypeID)}}function de(m,S){if(m&1){let r=b();e(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),o(5,"Outlet"),t(),e(6,"th",21),o(7,"Order number"),t(),e(8,"th"),o(9,"Customer"),t(),e(10,"th",22),o(11,"Amount"),t(),e(12,"th",23),o(13," Created On "),t(),e(14,"th",24),o(15,"Channel"),t()()(),e(16,"tbody"),F(17,me,15,11,"tr",null,D),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(m&2){let r=y(),a=A(0);l(17),B(a),l(2),g("filter",r.filter())("totaldata",a==null?null:a.length)("paginationTotal",a==null?null:a.length)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}function pe(m,S){m&1&&(e(0,"div",16),_(1,"app-empty-state"),t())}var Le=(()=>{class m{constructor(){this.orderService=V(M),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let r=this.orderService.getOrderDefaultValue();this.filter.update(a=>T(E({},a),{From:r})),this.initCancelledOrders()}initCancelledOrders(){this.cancelledOrders$=this.orderService.getCancelledOrders(this.filter()).pipe(P(1))}static{this.\u0275fac=function(a){return new(a||m)}}static{this.\u0275cmp=W({type:m,selectors:[["app-cancelled"]],features:[z([M])],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(a,i){if(a&1){let d=b();I(0),w(1,"async"),e(2,"mainpanel",0),v("onSubmit",function(){return p(d),s(i.initCancelledOrders())}),C("textChange",function(n){return p(d),u(i.filter().Number,n)||(i.filter().Number=n),s(n)}),e(3,"actions")(4,"a",1),_(5,"i",2),e(6,"span"),o(7,"Order Fulfillment Display"),t()()(),e(8,"filters")(9,"div")(10,"label",3),o(11,"From/To"),t(),e(12,"channel-select-options",4),C("ngModelChange",function(n){return p(d),u(i.filter().ListChannelID,n)||(i.filter().ListChannelID=n),s(n)}),t()(),e(13,"div",5)(14,"label",3),o(15,"From/To"),t(),e(16,"div",6)(17,"datepicker",7),C("dateChange",function(n){return p(d),u(i.filter().From,n)||(i.filter().From=n),s(n)}),t()(),e(18,"div")(19,"datepicker",8),C("dateChange",function(n){return p(d),u(i.filter().To,n)||(i.filter().To=n),s(n)}),t()()(),e(20,"div",5)(21,"label",9),o(22,"Page Number"),t(),e(23,"input",10),C("ngModelChange",function(n){return p(d),u(i.filter().PageNumber,n)||(i.filter().PageNumber=n),s(n)}),t()(),e(24,"div",5)(25,"label",9),o(26,"Page Size"),t(),e(27,"input",11),C("ngModelChange",function(n){return p(d),u(i.filter().PageSize,n)||(i.filter().PageSize=n),s(n)}),t()()(),e(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),L(32,de,20,5,"div",15)(33,pe,2,0,"div",16),t()()()()()}if(a&2){let d=k(x(1,8,i.cancelledOrders$));l(2),c("text",i.filter().Number),l(10),g("multiple",!0),c("ngModel",i.filter().ListChannelID),l(5),c("date",i.filter().From),l(2),c("date",i.filter().To),l(4),c("ngModel",i.filter().PageNumber),l(4),c("ngModel",i.filter().PageSize),l(5),N((d==null?null:d.length)>0?32:33)}},dependencies:[G,R,q,j,ee,$,re,ne,X,J,U,K,Q,oe,le,Z,Y,ae,ie,te],encapsulation:2})}}return m})();export{Le as CancelledComponent};
|