marketplacepos 5.43.1 → 5.43.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/3rdpartylicenses.txt +106 -106
- package/Marketplace/{chunk-XQGRC7V2.js → chunk-2EOAYJGX.js} +1 -1
- package/Marketplace/{chunk-A4F37V57.js → chunk-2IDDYNBR.js} +1 -1
- package/Marketplace/{chunk-NPG45B2D.js → chunk-2YTIJJIP.js} +1 -1
- package/Marketplace/{chunk-USRA2YIW.js → chunk-32WYK3BN.js} +1 -1
- package/Marketplace/{chunk-SXLKJLAE.js → chunk-3BT5DR3X.js} +1 -1
- package/Marketplace/chunk-3KLLGMOI.js +1 -0
- package/Marketplace/{chunk-SIYMMMKQ.js → chunk-3LRWABHB.js} +1 -1
- package/Marketplace/{chunk-YPVYJUXS.js → chunk-3NMM37H7.js} +1 -1
- package/Marketplace/chunk-3R5ZQMUB.js +1 -0
- package/Marketplace/chunk-3YSU3BT5.js +1 -0
- package/Marketplace/chunk-4MB4MXQH.js +1 -0
- package/Marketplace/chunk-52XDZALN.js +1 -0
- package/Marketplace/chunk-53FB4P3K.js +2 -0
- package/Marketplace/{chunk-SYENQYR7.js → chunk-5JVEEL2T.js} +1 -1
- package/Marketplace/{chunk-4CTORK4F.js → chunk-5KS4WK6H.js} +1 -1
- package/Marketplace/{chunk-OKAPL3YZ.js → chunk-5OHRA4AS.js} +1 -1
- package/Marketplace/chunk-5P35Z5AH.js +1 -0
- package/Marketplace/chunk-63FUL7BY.js +1 -0
- package/Marketplace/chunk-66MLRB2J.js +5 -0
- package/Marketplace/{chunk-KQQCKHF3.js → chunk-67N4UGA5.js} +1 -1
- package/Marketplace/{chunk-ZR5IXNXB.js → chunk-6FY74YFQ.js} +1 -1
- package/Marketplace/chunk-6NIAY25W.js +1 -0
- package/Marketplace/chunk-6QYD6NIJ.js +1 -0
- package/Marketplace/{chunk-A2YNWIX6.js → chunk-6W6DKFRE.js} +1 -1
- package/Marketplace/{chunk-4PZ5Q3HI.js → chunk-722SRHLY.js} +1 -1
- package/Marketplace/{chunk-WHZ44BAL.js → chunk-74IXJYWO.js} +1 -1
- package/Marketplace/chunk-7B5X52SQ.js +1 -0
- package/Marketplace/chunk-7H4VD3CX.js +1 -0
- package/Marketplace/{chunk-NB4T45CV.js → chunk-7NCRIMVP.js} +1 -1
- package/Marketplace/{chunk-M5IQRAHV.js → chunk-7SVF5UPT.js} +1 -1
- package/Marketplace/{chunk-55OI2SUF.js → chunk-7UHCDGAA.js} +1 -1
- package/Marketplace/{chunk-LSXUXG54.js → chunk-7ZXNQAAU.js} +1 -1
- package/Marketplace/{chunk-SLQA5QBT.js → chunk-A4BNLR77.js} +1 -1
- package/Marketplace/chunk-AEOSNAHH.js +1 -0
- package/Marketplace/chunk-AQTXFEBA.js +1 -0
- package/Marketplace/{chunk-MZI5AYCE.js → chunk-ATZ475FN.js} +1 -1
- package/Marketplace/{chunk-LR4UZ2OS.js → chunk-AYPY47VM.js} +1 -1
- package/Marketplace/{chunk-2SXRC4IG.js → chunk-B5VBBEEN.js} +1 -1
- package/Marketplace/{chunk-OZ77CAJD.js → chunk-B73M3AMU.js} +1 -1
- package/Marketplace/{chunk-JS55A2RS.js → chunk-B7KTCPKC.js} +3 -3
- package/Marketplace/{chunk-6MPSYC77.js → chunk-BFU7VKO3.js} +1 -1
- package/Marketplace/{chunk-HV6V6JHY.js → chunk-C4XFI4J7.js} +1 -1
- package/Marketplace/{chunk-4VFVMBPQ.js → chunk-CAAQIBRF.js} +1 -1
- package/Marketplace/{chunk-UPYS4A4M.js → chunk-CIIO2CJ6.js} +1 -1
- package/Marketplace/chunk-CKKAJ5VE.js +1 -0
- package/Marketplace/{chunk-6X2OBNJQ.js → chunk-CLER2MX6.js} +1 -1
- package/Marketplace/{chunk-HPYTL6TX.js → chunk-CMTBBXR5.js} +1 -1
- package/Marketplace/{chunk-ZN47D2EO.js → chunk-CNMMW5LL.js} +1 -1
- package/Marketplace/{chunk-JRWFZQ5K.js → chunk-CROPN4YC.js} +1 -1
- package/Marketplace/chunk-CSBEB66Y.js +1 -0
- package/Marketplace/chunk-D7NF5HTE.js +1 -0
- package/Marketplace/{chunk-JOBWFOGC.js → chunk-DDV4X5WD.js} +1 -1
- package/Marketplace/{chunk-FWG4H3QG.js → chunk-DRHWRRQV.js} +1 -1
- package/Marketplace/{chunk-HTQJCQ32.js → chunk-DYWTLXMP.js} +1 -1
- package/Marketplace/{chunk-WGXUKTYP.js → chunk-E3ROEHBW.js} +1 -1
- package/Marketplace/{chunk-5QAURMZF.js → chunk-E6XWD6WX.js} +1 -1
- package/Marketplace/{chunk-VRI3CYGG.js → chunk-ECRWEMEV.js} +1 -1
- package/Marketplace/{chunk-5XI7HWS5.js → chunk-EH6HWI3G.js} +1 -1
- package/Marketplace/{chunk-UJZ3KSBV.js → chunk-EK4VKN7N.js} +1 -1
- package/Marketplace/{chunk-E2CS7ZMC.js → chunk-EPVCMYCI.js} +1 -1
- package/Marketplace/chunk-ERLW7T36.js +1 -0
- package/Marketplace/{chunk-IYHPRFB5.js → chunk-FNEDIIIS.js} +1 -1
- package/Marketplace/chunk-FQQ3RU7S.js +1 -0
- package/Marketplace/chunk-G47XGOST.js +1 -0
- package/Marketplace/{chunk-JTOYNS32.js → chunk-G6X5CZ34.js} +1 -1
- package/Marketplace/{chunk-FBZW4Y3J.js → chunk-GSZJGR7K.js} +1 -1
- package/Marketplace/{chunk-O6U5QCHJ.js → chunk-H3IVI3LN.js} +1 -1
- package/Marketplace/{chunk-LHD7CYML.js → chunk-H3J5OAIG.js} +1 -1
- package/Marketplace/{chunk-OMDX33L2.js → chunk-H4OBICY5.js} +2 -2
- package/Marketplace/chunk-HI5JCHWS.js +1 -0
- package/Marketplace/{chunk-JT4Y2ID4.js → chunk-HXSHMC5O.js} +1 -1
- package/Marketplace/{chunk-TNKPTRB3.js → chunk-HYJVHRMN.js} +1 -1
- package/Marketplace/chunk-I66B4PT4.js +1 -0
- package/Marketplace/{chunk-JV4MMNGD.js → chunk-IA6KOBDJ.js} +1 -1
- package/Marketplace/chunk-IHPLJL2D.js +1 -0
- package/Marketplace/{chunk-2TZBEYNY.js → chunk-IL5JIRWJ.js} +1 -1
- package/Marketplace/{chunk-RFGNZCTV.js → chunk-IOOIEOGD.js} +1 -1
- package/Marketplace/{chunk-MQXPOHBV.js → chunk-J2KWRDVH.js} +1 -1
- package/Marketplace/{chunk-6LH7FSOW.js → chunk-JDIBETL5.js} +1 -1
- package/Marketplace/{chunk-5PVFITW6.js → chunk-JHEGROJF.js} +1 -1
- package/Marketplace/{chunk-ZAVDOMSW.js → chunk-JILE74BG.js} +1 -1
- package/Marketplace/{chunk-XXKHKD6T.js → chunk-JVOLT3NH.js} +1 -1
- package/Marketplace/{chunk-4M63ID5T.js → chunk-JXSBFTQM.js} +1 -1
- package/Marketplace/{chunk-SZECT5VQ.js → chunk-K2GYNGBL.js} +1 -1
- package/Marketplace/{chunk-XEMNZHW6.js → chunk-L7K5HOBY.js} +1 -1
- package/Marketplace/{chunk-25OT4I3W.js → chunk-LA6B2JGP.js} +1 -1
- package/Marketplace/chunk-LRT6Q4SU.js +1 -0
- package/Marketplace/{chunk-AVEGIEYT.js → chunk-LZCEM2PC.js} +1 -1
- package/Marketplace/{chunk-MTUIRWOB.js → chunk-M2FCTYGU.js} +1 -1
- package/Marketplace/{chunk-R76V3PTN.js → chunk-M5JQ7BGW.js} +1 -1
- package/Marketplace/{chunk-PO7JVKK3.js → chunk-M5XGP4SG.js} +1 -1
- package/Marketplace/chunk-M7NOQDVW.js +1 -0
- package/Marketplace/{chunk-KX5AWR75.js → chunk-M7NQID2Z.js} +1 -1
- package/Marketplace/{chunk-ZIOAOUAM.js → chunk-MHCAI6KP.js} +1 -1
- package/Marketplace/{chunk-AUO2UUO7.js → chunk-MPNBRDLS.js} +1 -1
- package/Marketplace/chunk-NJBQPECN.js +2 -0
- package/Marketplace/{chunk-ZNDU44GH.js → chunk-NS46QSCM.js} +1 -1
- package/Marketplace/{chunk-6J745ID2.js → chunk-NWQKGPCM.js} +2 -2
- package/Marketplace/{chunk-KWQS4KX7.js → chunk-OAOQONOA.js} +1 -1
- package/Marketplace/{chunk-AGRVVEIR.js → chunk-OC2FBL33.js} +1 -1
- package/Marketplace/{chunk-NZA4BEER.js → chunk-OLOIQI4D.js} +1 -1
- package/Marketplace/{chunk-KXS76PRS.js → chunk-PAEIUO2F.js} +1 -1
- package/Marketplace/{chunk-6IFZ2TO6.js → chunk-PFB7XEYZ.js} +1 -1
- package/Marketplace/{chunk-IKPRRD5D.js → chunk-PFIBU2IX.js} +1 -1
- package/Marketplace/chunk-PSPROJXC.js +3 -0
- package/Marketplace/{chunk-OL5RQ7K4.js → chunk-QEISWAZ3.js} +1 -1
- package/Marketplace/{chunk-33IXC6UG.js → chunk-QWHPQWPM.js} +1 -1
- package/Marketplace/{chunk-GZXQUJKX.js → chunk-RECNBAEB.js} +1 -1
- package/Marketplace/{chunk-GPC4DECX.js → chunk-RMCAWPWK.js} +1 -1
- package/Marketplace/{chunk-L53DCJFT.js → chunk-RQQSAPSO.js} +1 -1
- package/Marketplace/{chunk-UEWZXE4O.js → chunk-RZU7PSKG.js} +1 -1
- package/Marketplace/{chunk-NTW6FBP5.js → chunk-SB7NWPDS.js} +1 -1
- package/Marketplace/{chunk-F4GMWHYJ.js → chunk-SM3P57SO.js} +1 -1
- package/Marketplace/{chunk-ALKC77XL.js → chunk-SN4AOGQK.js} +1 -1
- package/Marketplace/{chunk-BQTUAYGY.js → chunk-SRVGUGY2.js} +1 -1
- package/Marketplace/{chunk-UJYSVGLV.js → chunk-SWQXSJ7O.js} +1 -1
- package/Marketplace/{chunk-SH7KN2AS.js → chunk-SYUFPF3D.js} +1 -1
- package/Marketplace/chunk-T72JRKMQ.js +5 -0
- package/Marketplace/{chunk-3D323DES.js → chunk-TD7KVTAY.js} +1 -1
- package/Marketplace/{chunk-7HYMSL6P.js → chunk-UAOM4KRX.js} +1 -1
- package/Marketplace/{chunk-GOS4RIF2.js → chunk-UDIDZKN6.js} +1 -1
- package/Marketplace/{chunk-UF4FKEE7.js → chunk-UEPQYAWE.js} +1 -1
- package/Marketplace/{chunk-CPJFWVUP.js → chunk-UWIHXA2S.js} +1 -1
- package/Marketplace/{chunk-2BUABOHG.js → chunk-V5BKQSAT.js} +1 -1
- package/Marketplace/{chunk-ZBVPUFFS.js → chunk-V6CA3EUG.js} +1 -1
- package/Marketplace/{chunk-KYIY3VQ6.js → chunk-VIMB2VWB.js} +1 -1
- package/Marketplace/{chunk-OJWFYXZX.js → chunk-VKMFDXJJ.js} +1 -1
- package/Marketplace/chunk-VP4W3SEJ.js +1 -0
- package/Marketplace/chunk-VTSYSZDA.js +1 -0
- package/Marketplace/{chunk-5EQNOCXP.js → chunk-WPW3D4MQ.js} +1 -1
- package/Marketplace/{chunk-LWSRD5LF.js → chunk-WUHNNJ2C.js} +1 -1
- package/Marketplace/chunk-WVAEHKDB.js +1 -0
- package/Marketplace/{chunk-NRCXYGO3.js → chunk-WW22F76D.js} +1 -1
- package/Marketplace/chunk-X4C6LACX.js +1 -0
- package/Marketplace/chunk-XB4AKFM3.js +1 -0
- package/Marketplace/{chunk-CGJ37FLZ.js → chunk-XOBNVRDL.js} +1 -1
- package/Marketplace/{chunk-GHBGGQNM.js → chunk-XUL4LU4R.js} +1 -1
- package/Marketplace/chunk-YB65PX7S.js +1 -0
- package/Marketplace/{chunk-HFKKITEW.js → chunk-YCH6HHU3.js} +1 -1
- package/Marketplace/{chunk-O55KM5KY.js → chunk-YHKEECJR.js} +1 -1
- package/Marketplace/chunk-YMAIO6KK.js +15 -0
- package/Marketplace/{chunk-WHRDK5NL.js → chunk-YMMOJKVP.js} +1 -1
- package/Marketplace/{chunk-CINZW7MA.js → chunk-YUCD4HRB.js} +1 -1
- package/Marketplace/{chunk-UMY6NG57.js → chunk-YZKPQRLO.js} +1 -1
- package/Marketplace/chunk-ZHZMT7GZ.js +1 -0
- package/Marketplace/index.html +3 -3
- package/Marketplace/main-2UGBVB65.js +1 -0
- package/package.json +1 -1
- package/Marketplace/chunk-222IBZU6.js +0 -1
- package/Marketplace/chunk-235G2DSM.js +0 -1
- package/Marketplace/chunk-2DJWDXTZ.js +0 -4
- package/Marketplace/chunk-2TL43SUD.js +0 -1
- package/Marketplace/chunk-2ZTDLZVZ.js +0 -1
- package/Marketplace/chunk-3K33MNZY.js +0 -1
- package/Marketplace/chunk-74L5LOR4.js +0 -1
- package/Marketplace/chunk-ALSWTSZR.js +0 -1
- package/Marketplace/chunk-B37XDXUI.js +0 -1
- package/Marketplace/chunk-BJWQKM5G.js +0 -1
- package/Marketplace/chunk-CQ6GTQW6.js +0 -1
- package/Marketplace/chunk-CSSG7NAJ.js +0 -1
- package/Marketplace/chunk-CVFPPKTF.js +0 -1
- package/Marketplace/chunk-DJILLV4M.js +0 -1
- package/Marketplace/chunk-E7X3E2GE.js +0 -2
- package/Marketplace/chunk-EL2TGTHA.js +0 -1
- package/Marketplace/chunk-FN6AYDMI.js +0 -1
- package/Marketplace/chunk-G4OF4YLE.js +0 -2
- package/Marketplace/chunk-ILQQ6R7K.js +0 -15
- package/Marketplace/chunk-IMO7KDT2.js +0 -1
- package/Marketplace/chunk-JSA73LJT.js +0 -1
- package/Marketplace/chunk-JX5NLHUQ.js +0 -2
- package/Marketplace/chunk-LPK5TPBQ.js +0 -1
- package/Marketplace/chunk-MC3GSUIF.js +0 -1
- package/Marketplace/chunk-NOO3VUTK.js +0 -1
- package/Marketplace/chunk-NXC2W6VA.js +0 -1
- package/Marketplace/chunk-OUEMCONQ.js +0 -5
- package/Marketplace/chunk-QQ3TCYLJ.js +0 -1
- package/Marketplace/chunk-R4IYKVKK.js +0 -1
- package/Marketplace/chunk-R62F5NWC.js +0 -1
- package/Marketplace/chunk-RBRIJGT2.js +0 -3
- package/Marketplace/chunk-SMCI6XBO.js +0 -1
- package/Marketplace/chunk-WCU6IR2R.js +0 -1
- package/Marketplace/chunk-XND52RIU.js +0 -1
- package/Marketplace/chunk-Y5IPCXWN.js +0 -1
- package/Marketplace/chunk-YA7OZNAF.js +0 -1
- package/Marketplace/main-HEFRSFSR.js +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as ne,b as oe,c as re,d as ae,e as le,f as pe,g as se}from"./chunk-6W6DKFRE.js";import{b as ie}from"./chunk-7UHCDGAA.js";import"./chunk-G47XGOST.js";import"./chunk-IL5JIRWJ.js";import"./chunk-3BT5DR3X.js";import{a as X}from"./chunk-QEISWAZ3.js";import{a as Y,b as Z}from"./chunk-HYJVHRMN.js";import"./chunk-CMTBBXR5.js";import{h as Q}from"./chunk-PSPROJXC.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-V3NCYRCF.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as J}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as ee,n as te}from"./chunk-CLER2MX6.js";import{A as q,c as G,h as z,m as K}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{F as W,H as j,J as $,f as x,g as V,h as A,n as H}from"./chunk-M2FCTYGU.js";import{Fc as v,Gb as C,Gc as p,Hb as k,Hc as B,Ic as L,Ka as M,Kc as O,Lc as F,Mb as m,Mc as R,Qc as P,Sc as w,Yb as l,ic as n,ja as I,jc as i,ka as T,kc as c,lc as f,mc as _,oa as U,ob as N,oc as S,rb as a,tc as y,uc as d,xb as D,ya as g,za as h}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var _e=e=>[e];function ge(e,s){if(e&1&&(f(0),n(1,"a",9),p(2),i(),_()),e&2){let t=s.$implicit;a(),l("routerLink",w(2,_e,t.url)),a(),L(" ",t.title,"")}}var ce=(()=>{class e{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=C({type:e,selectors:[["app-download"]],standalone:!1,decls:12,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[4,"ngFor","ngForOf"],[1,"dropdown-item",3,"routerLink"]],template:function(o,r){o&1&&(n(0,"nav",0)(1,"div",1)(2,"div"),c(3,"nav-tab",2),i()(),n(4,"div")(5,"div",3)(6,"a",4),c(7,"i",5),i(),n(8,"div",6)(9,"div",7),m(10,ge,3,4,"ng-container",8),i()()()()(),c(11,"router-outlet")),o&2&&(a(3),l("Tabs",r.tabs),a(7),l("ngForOf",r.moreMenu))},dependencies:[x,Y,W,j],encapsulation:2})}}return e})();var E=(()=>{class e{constructor(t){this.httpService=t}download(t){return this.httpService.post("/api/Product/downloadurl",t)}static{this.\u0275fac=function(o){return new(o||e)(U(J))}}static{this.\u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Se=e=>({"background-color":e});function Ce(e,s){if(e&1&&(n(0,"th"),p(1),i()),e&2){let t=s.$implicit;a(),B(t.column)}}function ye(e,s){if(e&1&&(f(0),n(1,"td"),c(2,"span",6),i(),_()),e&2){let t=s.$implicit,o=d().$implicit;a(2),l("innerHTML",o[t.prop],N)}}function ve(e,s){if(e&1&&(n(0,"tr",5),m(1,ye,3,1,"ng-container",3),i()),e&2){let t=s.$implicit,o=d();l("ngStyle",w(2,Se,t.Status>200?"#F4D6D5":"#DEE9C9")),a(),l("ngForOf",o.configs)}}var de=(()=>{class e{constructor(){this.eventClose=new M}ngOnInit(){}onClose(){this.eventClose.emit()}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=C({type:e,selectors:[["app-response-api-list"]],inputs:{configs:"configs",data:"data",status:"status"},outputs:{eventClose:"onClose"},standalone:!1,decls:7,vars:2,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"],[3,"ngStyle",4,"ngFor","ngForOf"],[3,"ngStyle"],[3,"innerHTML"]],template:function(o,r){o&1&&(n(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),m(4,Ce,2,1,"th",3),i()(),n(5,"tbody"),m(6,ve,2,4,"tr",4),i()()()),o&2&&(a(4),l("ngForOf",r.configs),a(2),l("ngForOf",r.data))},dependencies:[x,A],encapsulation:2})}}return e})();function xe(e,s){if(e&1){let t=S();f(0),n(1,"button",15),y("click",function(){g(t);let r=d(),u=v(11);return h(r.onNewStepperState(u))}),c(2,"i",16),p(3," New "),i(),_()}}function be(e,s){if(e&1){let t=S();f(0),n(1,"button",15),y("click",function(){g(t),d();let r=v(11);return h(r.previous())}),p(2," Back "),i(),_()}}function Ee(e,s){if(e&1){let t=S();f(0),n(1,"button",17),y("click",function(){g(t);let r=d(),u=v(11);return h(r.onStepperNext(u))}),p(2," Next "),i(),_()}}function De(e,s){if(e&1){let t=S();f(0),n(1,"button",18),y("click",function(){g(t);let r=d(),u=v(11);return h(r.onSubmit(u))}),p(2,"Download"),i(),_()}if(e&2){let t=d();a(),l("disabled",!t.urls)}}function Ie(e,s){e&1&&(c(0,"i",19),n(1,"span"),p(2,"Instruction"),i())}function Te(e,s){e&1&&(n(0,"div",20)(1,"div",21)(2,"div",22)(3,"h4",23),p(4,"Note"),i()(),n(5,"div",24)(6,"ol",25)(7,"li"),p(8," Use this form to Download Products from Tokopedia using product URL "),i(),n(9,"li"),p(10," Copy Product URL from "),n(11,"a",26),p(12,"https://seller.tokopedia.com/ "),i(),p(13," and paste in this form "),i(),n(14,"li"),p(15," Use New Line when you want to input several product URLs "),i()()()()())}function Ue(e,s){e&1&&(c(0,"i",27),n(1,"span"),p(2,"Download"),i())}function Me(e,s){if(e&1){let t=S();n(0,"div",20)(1,"textarea",28),R("ngModelChange",function(r){g(t);let u=d();return F(u.urls,r)||(u.urls=r),h(r)}),i()()}if(e&2){let t=d();a(),l("placeholder",t.urlPlaceholder),O("ngModel",t.urls)}}function Ne(e,s){e&1&&(c(0,"i",29),n(1,"span"),p(2,"Finish"),i())}function ke(e,s){if(e&1&&(n(0,"div",20),c(1,"app-response-api-list",30),i()),e&2){let t=d();a(),l("data",t.downloadResponses)("configs",t.configs)}}function Be(e,s){e&1&&(n(0,"h6"),p(1,"1"),i())}function Le(e,s){e&1&&(n(0,"h6"),p(1,"2"),i())}function Oe(e,s){e&1&&(n(0,"h6"),p(1,"3"),i())}var ue=(()=>{class e{constructor(t,o){this.downloadService=t,this.authService=o,this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
|
|
2
|
+
https://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat`,this.currentDomain=this.authService.getDomain()}onStepperChange(t){this.stepperState=t.selectedStep.state}onSubmit(t){let o=this.urls.split(/\r?\n/);this.downloadService.download(o).subscribe(r=>{this.downloadResponses=r,this.mappingLinkToProduct(),this.onStepperNext(t)})}mappingLinkToProduct(){this.downloadResponses=this.downloadResponses.map(t=>(t.Name=t?.Name?`<a href="${this.currentDomain}/menu/Products/Catalog/Products/Info?ID=${t.ID}" target="_blank">
|
|
3
|
+
${t?.Name}
|
|
4
|
+
</a>`:"-",t))}onNewStepperState(t){this.downloadResponses=[],this.urls=null,this.stepperState="DOWNLOAD",t.reset(),this.onStepperNext(t)}onStepperNext(t){t.selected.completed=!0,t.next()}static{this.\u0275fac=function(o){return new(o||e)(D(E),D(Q))}}static{this.\u0275cmp=C({type:e,selectors:[["app-by-url"]],standalone:!1,features:[P([{provide:ne,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:11,consts:[["stepper",""],["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],["linear","",1,"stepper-downloadByUrl",3,"selectionChange","selectedIndex"],["state","GUIDE",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","DOWNLOAD",3,"editable","completed"],["state","FINISH"],["matStepperIcon","GUIDE"],["matStepperIcon","DOWNLOAD"],["matStepperIcon","FINISH"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"click","disabled"],[1,"fa-solid","fa-info","me-3"],[1,"mt-8"],[1,"card","border","w-50"],[1,"card-header","py-6"],[1,"text-primary"],[1,"card-body",2,"padding-left","0px"],[1,"mt-6"],["href","https://seller.tokopedia.com","target","_blank"],[1,"fa-solid","fa-download","me-3"],["name","url","cols","30","rows","25",1,"form-control",3,"ngModelChange","placeholder","ngModel"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],["status","error",3,"data","configs"]],template:function(o,r){if(o&1){let u=S();n(0,"mainpanel",1)(1,"actions"),m(2,xe,4,0,"ng-container",2)(3,be,3,0,"ng-container",2)(4,Ee,3,0,"ng-container",2)(5,De,3,1,"ng-container",2),i(),n(6,"content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"mat-stepper",6,0),y("selectionChange",function(fe){return g(u),h(r.onStepperChange(fe))}),n(12,"mat-step",7),m(13,Ie,3,0,"ng-template",8)(14,Te,16,0,"ng-template",9),i(),n(15,"mat-step",10),m(16,Ue,3,0,"ng-template",8)(17,Me,2,2,"ng-template",9),i(),n(18,"mat-step",11),m(19,Ne,3,0,"ng-template",8)(20,ke,2,2,"ng-template",9),i(),m(21,Be,2,0,"ng-template",12)(22,Le,2,0,"ng-template",13)(23,Oe,2,0,"ng-template",14),i()()()()()()}o&2&&(l("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),l("ngIf",r.stepperState=="FINISH"),a(),l("ngIf",r.stepperState=="DOWNLOAD"),a(),l("ngIf",r.stepperState=="GUIDE"),a(),l("ngIf",r.stepperState=="DOWNLOAD"),a(5),l("selectedIndex",1),a(2),l("editable",r.stepperState!="FINISH")("completed",!0),a(3),l("editable",r.stepperState!="FINISH")("completed",!1))},dependencies:[V,G,z,K,ee,le,oe,pe,re,ae,de],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.card-header{background-color:#00000008}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}
|
|
5
|
+
`],encapsulation:2})}}return e})();var Fe=[{path:"",component:ce,children:[{path:"by-url",component:ue,data:{title:"Download Product By Url"},canActivate:[X]},{pathMatch:"full",path:"",redirectTo:"by-url"}]}],ct=(()=>{class e{static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275mod=k({type:e})}static{this.\u0275inj=T({providers:[E],imports:[H,q,Z,te,se,ie,$.forChild(Fe)]})}}return e})();export{ct as DownloadModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{g as C}from"./chunk-PSPROJXC.js";import{a as r}from"./chunk-V3NCYRCF.js";import{b as a,c as u}from"./chunk-PW42BQIY.js";import{b as l,e as S}from"./chunk-JXSBFTQM.js";import{aa as p,ea as h,ja as c,oa as o,v as s}from"./chunk-B7KTCPKC.js";var y=(()=>{class i{constructor(e,t,n){this.httpService=e,this.toastr=t,this.tokenService=n}saveChannel(e){return this.httpService.post("/api/Channel/SubmitChannel",e).pipe(p(t=>this.tokenService.refreshToken().pipe(s(n=>t))))}getLastSync(e){return this.httpService.get(`${r.ChannelGetLastSyncByID}/?ID=${e}`)}getChannel(e){return this.httpService.post(r.GetChannel,e)}getChannelLoader(){return this.httpService.get(r.GetChannelLoader)}testShopID(e){return this.httpService.post(r.TestShopID,e).pipe(h(t=>{this.showTostrSuccessTestShopID(t)}))}updateChannelIndex(e){return this.httpService.post(r.UpdateChannelIndex,e)}deleteChannel(e){return this.httpService.post(r.DeleteChannel,e)}mapChannelImage(e){return e.map(t=>(t.img=u.getChannelLogoByTypeId(t.TypeID),t))}showTostrSuccessTestShopID(e){let t="";for(var n in e)t+=n+" : "+e[n]+"<br/>";this.toastr.success(t,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}getRegisterByOutletName(e){return this.httpService.post(r.GetRegisterByOutletName,{Outlet:e})}getChannelRowCount(e){return this.httpService.post(r.GetChannelRowCount,e).pipe(s(t=>t.Count))}getChannelWarehouse(e){return this.httpService.get(`${r.GetChannelWarehouse}/?ChannelID=${e}`)}unSynchronizedWarehouse(e){return this.httpService.delete(`${r.UnSynchronizedWarehouse}?ID=${e}`)}authorizedChannel(e){let t=this.getApiAuthorize(e);return this.httpService.post(`/api/${t}`,null).pipe(h(n=>{window.open(n.Url,"_blank")}))}getApiAuthorize(e){let t;switch(e){case a.Shopee:t="ChannelAuthorization/ShopeeV2_URL";break;case a.Tiktok:t="ChannelAuthorization/Tiktok_URL";break;case a.Lazada:t="ChannelAuthorization/Lazada_URL";break}return t}static{this.\u0275fac=function(t){return new(t||i)(o(S),o(l),o(C))}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as x}from"./chunk-PE5AFID4.js";import{
|
|
1
|
+
import{a as x}from"./chunk-PE5AFID4.js";import{g as u}from"./chunk-PSPROJXC.js";import{b as h,d as C,i as M,j as v,k as S}from"./chunk-CLER2MX6.js";import{G as g,n as p}from"./chunk-M2FCTYGU.js";import{Gb as m,Gc as t,Yb as f,ic as i,ja as s,jc as n,kc as d,pa as o,tc as c}from"./chunk-B7KTCPKC.js";var y=(()=>{class e{constructor(){this.dialogRef=o(h),this.route=o(g),this.modalConfig=new v,this.modalConfig.title="Switch to modern authorization",this.modalConfig.customWidth="450px",this.modalConfig.hideCancel=!0,this.modalConfig.headerType=M.Warning,this.modalConfig.okText="Setup"}onClose(){this.dialogRef.close()}onOk(){this.dialogRef.close(),this.route.navigate(["/menu/users"])}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=m({type:e,selectors:[["app-modal-user-migration-confirmation"]],decls:19,vars:1,consts:[[3,"onOk","onCancel","config"],["content",""],[1,"d-flex","align-items-center","justify-content-between","gap-6"],[1,"text-center",2,"width","300px"],[1,"fa-solid","fa-users-gear","fa-6x"],[1,"lh-base"],["href","https://support.dealpos.com/en/collections/15916183-omnichannel-user-configuration","target","_blank"]],template:function(r,l){r&1&&(i(0,"modal-material",0),c("onOk",function(){return l.onOk()})("onCancel",function(){return l.onClose()}),i(1,"div",1)(2,"div",2)(3,"div",3),d(4,"i",4),n(),i(5,"div",5)(6,"p"),t(7," We have introduced a new Modern Authorization, Please switch from "),i(8,"b"),t(9,"legacy"),n(),t(10," to "),i(11,"b"),t(12,"modern"),n(),t(13," authorization by inviting your users. "),n(),i(14,"div"),t(15," Please refer to this "),i(16,"a",6),t(17,"article"),n(),t(18," for more information "),n()()()()()),r&2&&f("config",l.modalConfig)},dependencies:[p,S],encapsulation:2})}}return e})();var R=(()=>{class e{constructor(){this.dialog=o(C),this.tokenService=o(u),this.dialogRef=null}openDialogMigrationConfirmation(){this.tokenService.getUser()?.AuthorizationMode===x.Legacy&&!this.dialogRef&&(this.dialogRef=this.dialog.open(y),this.dialogRef.afterClosed().subscribe(()=>{this.dialogRef=null}))}resetDialogState(){this.dialogRef&&(this.dialogRef.close(),this.dialogRef=null)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=s({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var B=(e,b)=>(o(R).openDialogMigrationConfirmation(),!0);export{B as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as bt}from"./chunk-
|
|
1
|
+
import{a as bt}from"./chunk-M5XGP4SG.js";import{b as xt}from"./chunk-H3J5OAIG.js";import{a as Ct}from"./chunk-J2KWRDVH.js";import{a as rt}from"./chunk-5DIRXS7I.js";import{b as lt}from"./chunk-PW42BQIY.js";import{a as mt,c as ct}from"./chunk-SWQXSJ7O.js";import{e as st}from"./chunk-JXSBFTQM.js";import{b as ut,c as gt,h as ht,j as ft,k as _t}from"./chunk-CLER2MX6.js";import{A as at,c as it,h as nt,m as ot}from"./chunk-6QYD6NIJ.js";import{r as pt,s as dt}from"./chunk-YCH6HHU3.js";import{g as V,i as et,m as L,n as R}from"./chunk-M2FCTYGU.js";import{$c as I,Fc as S,G as U,Gb as M,Gc as m,Hc as w,Ic as k,Jb as K,K as G,Ka as D,Kc as X,Lc as Z,Mb as u,Mc as tt,Oa as h,Ra as _,X as z,Yb as g,Z as J,ad as y,ca as W,cd as $,dc as P,ea as O,f as j,fa as Y,g as A,ic as r,ja as H,jc as l,kc as B,lc as T,mc as v,nc as Q,oa as q,oc as f,rb as a,rd as N,tc as C,uc as s,v as b,xb as E,ya as p,za as d}from"./chunk-B7KTCPKC.js";function Tt(e,c){e&1&&Q(0)}function vt(e,c){if(e&1&&(T(0),u(1,Tt,1,0,"ng-container",5),v()),e&2){s(2);let t=S(4);a(),g("ngTemplateOutlet",t)}}function wt(e,c){if(e&1&&(r(0,"div",6)(1,"label"),m(2,"Editing Data"),l(),r(3,"div")(4,"span"),m(5),I(6,"number"),l()()()),e&2){let t=s(2);a(5),w(y(6,1,t.value))}}function It(e,c){if(e&1&&(T(0),u(1,vt,2,1,"ng-container",4)(2,wt,7,3,"ng-template",null,1,$),v()),e&2){let t=S(3),i=s();a(),g("ngIf",i.hasPriceEdit)("ngIfElse",t)}}function yt(e,c){if(e&1){let t=f();r(0,"div",7)(1,"input",8),tt("ngModelChange",function(n){p(t);let o=s();return Z(o.value,n)||(o.value=n),d(n)}),l(),r(2,"label",9),m(3),l()()}if(e&2){let t=s();a(),X("ngModel",t.value),g("max",t.maxEditInventory),a(2),w(t.item.Table)}}var Ht=(()=>{class e{constructor(t,i,n){this.dialogRef=t,this.item=i,this.permissionService=n,this.maxEditInventory=1e5,this.permissionService.hasPermission(rt.PriceUpdate).then(o=>this.hasPriceEdit=o)}ngOnInit(){this.selectedChannel=this.item.Variant.Channel.find(t=>t.ChannelID==this.item.ChannelID),this.selectedChannel.ID=this.item.Variant.ID,this.selectedChannel.Sku=this.item.Variant.Code,this.item.Table=="inventory"?(this.value=this.selectedChannel.Inventory,this.maxEditInventory=this.selectedChannel?.TypeID==lt.Tokopedia?1e5:null):this.item.Table=="price"&&(this.value=this.selectedChannel.Price,this.maxEditInventory=null),this.selectedChannel.ItemName=this.item.Name,this.selectedChannel.VarName=this.item.Variant.Model,this.initModalConfig()}initModalConfig(){let t=this.item.Table=="inventory"?"Update Inventory":"Update Price";this.modalConfig=new ft,this.modalConfig.title=`${t} ${this.item?.Name} in ${this.selectedChannel?.Title}`}onSubmit(){this.item.Table=="inventory"?this.selectedChannel.Inventory=this.value:this.item.Table=="price"&&(this.selectedChannel.Price=this.value),this.dialogRef.close(this.selectedChannel)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||e)(E(ut),E(gt),E(mt))}}static{this.\u0275cmp=M({type:e,selectors:[["app-table-dialog"]],decls:5,vars:4,consts:[["INVENTORY",""],["DISABLED",""],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["matTooltipPosition","above","matTooltip","Cannot edit Unit Price because you dont have access ProductEditor role",1,"info-label-group","mt-3",2,"background","#e9ecef","opacity","1"],[1,"form-label-group","mt-3"],["type","text","name","edit","autoNum","",1,"form-control",3,"ngModelChange","ngModel","max"],["for","edit",1,"text-capitalize"]],template:function(i,n){if(i&1){let o=f();r(0,"modal-material",2),C("onClose",function(){return p(o),d(n.onClose())})("onCancel",function(){return p(o),d(n.onClose())})("onOk",function(){return p(o),d(n.onSubmit())}),r(1,"div",3),u(2,It,4,2,"ng-container",4)(3,yt,4,3,"ng-template",null,0,$),l()()}if(i&2){let o=S(4);g("dynamicValidated",n.value)("config",n.modalConfig),a(2),g("ngIf",n.item.Table=="price")("ngIfElse",o)}},dependencies:[R,V,et,L,ht,Ct,xt,bt,_t,at,it,nt,ot,ct,dt,pt],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-left:1rem;margin-right:1rem}.mat-dialog-content[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem;margin-left:.5rem;margin-right:.5rem}.font-lg[_ngcontent-%COMP%]{font-size:large}.font-lgr[_ngcontent-%COMP%]{font-size:larger}"]})}}return e})();var Kt=(()=>{class e{transform(t,i,n=0){if(!t)return t;let o=i?parseInt(i,10):10;return t.length>o?t.substring(n,o)+"...":t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=K({name:"stringLimit",type:e,pure:!0})}}return e})();function Nt(e,c){if(e&1){let t=f();r(0,"span",6),C("click",function(){p(t);let n=s();return d(n.onGetRowCount())}),r(1,"i",7),m(2,"?"),l()()}}function Dt(e,c){if(e&1&&(T(0),r(1,"span"),m(2),I(3,"number"),l(),v()),e&2){let t=s();a(2),w(y(3,1,t.rowCount()))}}function Et(e,c){if(e&1){let t=f();r(0,"a",10),C("click",function(){p(t);let n=s(2);return d(n.onNextPage())}),B(1,"i",11),m(2," Next"),l()}}function Mt(e,c){if(e&1){let t=f();r(0,"a",12),C("click",function(){p(t);let n=s(2);return d(n.onLastPage())}),B(1,"i",13),m(2," Last"),l()}}function St(e,c){if(e&1&&(r(0,"div",5),u(1,Et,3,0,"a",8)(2,Mt,3,0,"a",9),l()),e&2){let t=s();a(),P(t.disableNextButton()&&!t.goToLastPage()?1:-1),a(),P(t.disableNextButton()&&!t.goToLastPage()?2:-1)}}var ie=(()=>{class e{constructor(){this.totalData=h(0),this.rowCount=h(),this.pageNumber=h(),this.disableNextButton=h(),this.goToLastPage=h(),this.hideCount=h(),this.nextPage=new D,this.lastPage=new D,this.getRowCount=new D}onNextPage(){this.nextPage.emit()}onLastPage(){this.lastPage.emit()}onGetRowCount(){this.getRowCount.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=M({type:e,selectors:[["infinite-paginator"]],inputs:{totalData:[1,"totalData"],rowCount:[1,"rowCount"],pageNumber:[1,"pageNumber"],disableNextButton:[1,"disableNextButton"],goToLastPage:[1,"goToLastPage"],hideCount:[1,"hideCount"]},outputs:{nextPage:"onNextPage",lastPage:"onLastPage",getRowCount:"onGetRowCount"},decls:9,vars:7,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[4,"ngIf"],[1,"btn-group"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(i,n){i&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),m(3),I(4,"number"),u(5,Nt,3,0,"span",3)(6,Dt,4,3,"ng-container",4),m(7),l()(),u(8,St,3,2,"div",5),l()),i&2&&(a(3),k(" Showing 1 - ",y(4,5,n.totalData())," of "),a(2),P(n.hideCount()?5:-1),a(),g("ngIf",!n.hideCount()&&n.rowCount()),a(),k(" records ~ ",n.pageNumber()," Page "),a(),P(n.totalData()>0?8:-1))},dependencies:[R,V,L],encapsulation:2})}}return e})();var se=(()=>{class e{constructor(t){this.http=t,this.pagination$=new A(null),this._pageNumber=_(1),this.pageNumber=N(()=>this._pageNumber()),this._hideCount=_(!0),this.hideCount=N(()=>this._hideCount()),this._disableNextButton=_(!0),this.disableNextButton=N(()=>this._disableNextButton()),this._goToLastPage=_(!1),this.isLastPage=N(()=>this._goToLastPage()),this.totalData=_(0),this.destroy$=new j,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this._pageNumber.set(t.PageNumber)}setPaginationButtonState(t,i){i==0?this._disableNextButton.set(!0):this._disableNextButton.set(!(i<t.RowCount*t.PageNumber))}reloadPagination(t){t.PageNumber=1,this.pagination$.next(t),this._hideCount.set(!0),this._goToLastPage.set(!1)}onLastPage(t={}){let i=JSON.parse(JSON.stringify(t));this.totalRowCount$=this.http.post(`/api/${this.fethRowCountEndpoint}`,i).pipe(b(n=>n.Total),O(n=>{this._hideCount.set(!1),i.RowCount=n,i.PageNumber=1,this.pagination$.next(i),this._goToLastPage.set(!0)}))}paginationFunction(){return this.pagination$.pipe(W(this.destroy$),U(t=>t!=null),G(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(b(i=>i.Data?i.Data:[]))),Y(this.pagination$),z((t,i)=>{let[n,o]=t,[x]=i;return o.PageNumber==1?[x,o]:[n.concat(x),o]}),O(([t,i])=>{this.setPageNumberFooter(i);let n=this.calculateProductLength(t);this.totalData.set(n),this.setPaginationButtonState(i,n)}),b(([t])=>t),J())}getRowCount(t){this._hideCount.set(!1),this.totalRowCount$=this.http.post(`/API/${this.fethRowCountEndpoint}`,t).pipe(b(i=>i.Total))}calculateProductLength(t=[]){return t.reduce((n,o)=>n+(o.Variants?.length?o.Variants?.length:0),0)}static{this.\u0275fac=function(i){return new(i||e)(q(st))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();export{Ht as a,Kt as b,ie as c,se as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as y}from"./chunk-
|
|
1
|
+
import{a as y}from"./chunk-ECRWEMEV.js";import{ba as g,ja as o}from"./chunk-LZCEM2PC.js";import{n as m}from"./chunk-M2FCTYGU.js";import{Ca as i,Gb as s,Hb as b,Kb as c,Qc as v,_b as u,ja as p,ka as r,pa as f,vc as d,wc as h}from"./chunk-B7KTCPKC.js";var $=["*"],x=({dt:l})=>`
|
|
2
2
|
.p-floatlabel {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-G6X5CZ34.js";import{a as fe}from"./chunk-NS46QSCM.js";import"./chunk-SM3P57SO.js";import{a as U}from"./chunk-5DIRXS7I.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as re}from"./chunk-Z3ITXK3D.js";import{a as pe}from"./chunk-ACIMXBIC.js";import"./chunk-V3NCYRCF.js";import{c as oe}from"./chunk-PW42BQIY.js";import{b as le,c as se}from"./chunk-SWQXSJ7O.js";import{b as ae}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as me,n as ue}from"./chunk-CLER2MX6.js";import{A as ie}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as de,s as ce}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{E as Y,G as ee,H as te,J as ne,d as K,g as Q,j as W,m as X,n as P}from"./chunk-M2FCTYGU.js";import{$c as _,Gb as x,Gc as s,Hc as h,Ic as z,Jb as L,Mb as m,Nc as q,Oc as $,Pc as C,Qc as j,Sc as I,Tc as J,Yb as p,Z as V,aa as w,ac as S,ad as y,dc as T,ec as k,gc as A,hc as H,ic as a,jc as l,kc as u,lc as g,mc as v,ob as F,oc as B,pa as b,rb as r,rd as Z,tc as G,uc as c,v as M,ya as N,za as R}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as E,b as O}from"./chunk-66YHNWRR.js";var ge=(()=>{class t{transform(e){return typeof e=="number"&&(e=e.toString()),e!=null?e.replace(/\n/g,"<br />"):e}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275pipe=L({name:"newlines",type:t,pure:!0})}}return t})();var Ce=t=>({disabled:t}),_e=(t,d)=>({labelFilledInput:t,labelEmptyInput:d});function ye(t,d){if(t&1&&(a(0,"p"),s(1),_(2,"number"),l()),t&2){let e=c();r(),h(e.inputValueType()==="number"?y(2,1,e.inputValue):e.inputValue)}}function xe(t,d){if(t&1&&(u(0,"p",3),_(1,"newlines")),t&2){let e=c();p("innerHTML",y(1,1,e.inputValue),F)}}function Ie(t,d){if(t&1&&(g(0),s(1),v()),t&2){let e=c();r(),z(" ",e.labelValue," ")}}var ve=(()=>{class t{constructor(){this.inputValue="",this.labelValue="",this.inputType="input",this.labelVisible=!0,this.disabled=!1,this.class="mb-6",this.tooltip="",this.isInputFilled=!1,this.isNotEmpty=pe.IsNotEmpty}inputValueType(){return typeof this.inputValue}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=x({type:t,selectors:[["lib-info-page-input"]],inputs:{inputValue:"inputValue",labelValue:"labelValue",inputType:"inputType",labelVisible:"labelVisible",disabled:"disabled",class:"class",tooltip:"tooltip"},decls:5,vars:14,consts:[["matTooltipPosition","above",3,"ngClass","matTooltip"],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"]],template:function(o,n){o&1&&(a(0,"div",0),m(1,ye,3,3,"p",1)(2,xe,2,3,"p",2),a(3,"label"),m(4,Ie,2,1,"ng-container",1),l()()),o&2&&(S(n.class),p("ngClass",I(9,Ce,n.disabled))("matTooltip",n.tooltip),r(),p("ngIf",n.isNotEmpty(n.inputValue)&&n.inputType=="input"),r(),p("ngIf",n.isNotEmpty(n.inputValue)&&n.inputType=="textarea"),r(),S(J(11,_e,n.isNotEmpty(n.inputValue),!n.isNotEmpty(n.inputValue))),r(),p("ngIf",n.labelVisible))},dependencies:[P,K,Q,X,ge,ce,de],styles:["div[_ngcontent-%COMP%]{border:1px solid #ced4da;position:relative;margin-bottom:1rem;border-radius:.25rem!important}p[_ngcontent-%COMP%]{margin-top:18px;margin-bottom:18px;padding-left:.75rem!important;font-size:.875rem}.labelFilledInput[_ngcontent-%COMP%]{position:absolute;top:-10px;left:10px;background:#fff;padding-left:4px;padding-right:4px;font-size:.75rem!important;color:#9da2a6}.labelEmptyInput[_ngcontent-%COMP%]{margin-top:18px;margin-bottom:18px;padding-left:.75rem!important;font-size:.875rem;color:#ccc}.disabled[_ngcontent-%COMP%]{background-color:#e9ecef;opacity:1}"]})}}return t})();var Pe=t=>({ID:t});function Me(t,d){if(t&1){let e=B();a(0,"button",24),G("click",function(){N(e);let n=c(2),i=C(0);return R(n.onDeleteUser(i==null||i.selectedUser==null?null:i.selectedUser.ID))}),u(1,"i",25),s(2," Delete "),l()}}function Se(t,d){if(t&1&&(g(0),m(1,Me,3,0,"button",23),v()),t&2){let e,o=c(),n=C(0);r(),T((n==null||n.selectedUser==null?null:n.selectedUser.Name)!==((e=o.currentLoginUser())==null?null:e.username)?1:-1)}}function Te(t,d){if(t&1&&(g(0),a(1,"a",26),u(2,"i",27),s(3," Edit "),l(),v()),t&2){c();let e=C(0);r(),p("queryParams",I(1,Pe,e==null||e.selectedUser==null?null:e.selectedUser.ID))}}function Ue(t,d){t&1&&(a(0,"div",20),s(1," All channels assigned to this user "),l())}function De(t,d){if(t&1&&u(0,"p-chip",28),t&2){let e=d.$implicit;p("label",e.Name)("image",e.logo)("alt",e.Name)}}function Ee(t,d){if(t&1&&A(0,De,1,3,"p-chip",28,k),t&2){c();let e=C(0);H(e==null?null:e.selectedChannels)}}var ot=(()=>{class t{constructor(){this.userService=b(D),this.activatedRoute=b(Y),this.toastService=b(ae),this.router=b(ee),this.userLoader$=this.activatedRoute.queryParams.pipe(w(e=>{let o=e.ID||null;return this.userService.getUserFormLoader(o).pipe(V(1),M(n=>(n.Options.Channels=oe.assignChannelLogo(n.Options.Channels),n)))}),M(e=>{let o=e.Options.Users.find(f=>f.ID===e.Form?.ID),n=e.Options.Groups.find(f=>f.ID===e.Form?.GroupID),i=e.Options.Channels.filter(f=>e.UserChannels?.includes(f.ID));return O(E({},e),{selectedUser:o||null,selectedGroup:n||null,selectedChannels:i||[],DownloadOrderDaysRange:e.Form?.DownloadOrderDaysRange||"0"})})),this.userEditRole=U.UserEdit,this.userDeleteRole=U.UserDelete,this.currentLoginUser=Z(()=>{let e=localStorage.getItem(re.AUTHORIZATION);return e?JSON.parse(e):null})}onDeleteUser(e){confirm("Are you sure you want to delete this user?")&&this.userService.deleteUsers([e]).subscribe({next:()=>{this.router.navigate(["/menu/users/users"]),this.toastService.success("User deleted successfully","Success")}})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=x({type:t,selectors:[["app-user-info"]],features:[j([D])],decls:50,vars:12,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","group","aria-label","User Actions",1,"btn-group"],[4,"ngxPermissionsOnly"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row","mt-8"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8","pb-4"],[1,"row"],[1,"col-6"],[1,"info-label-group"],["id","myTab","role","tablist",1,"nav","nav-tabs"],["role","presentation",1,"nav-item"],["id","channel-tab","data-bs-toggle","tab","data-bs-target","#channel-tab-pane","type","button","role","tab","aria-controls","channel-tab-pane","aria-selected","true",1,"nav-link","active"],["id","restriction-tab","data-bs-toggle","tab","data-bs-target","#restriction-tab-pane","type","button","role","tab","aria-controls","restriction-tab-pane","aria-selected","false",1,"nav-link"],[1,"card","rounded-0","border-top-0"],[1,"card-body","pb-4"],["id","myTabContent",1,"tab-content"],["id","channel-tab-pane","role","tabpanel","aria-labelledby","channel-tab","tabindex","0",1,"tab-pane","fade","show","active"],[1,"text-center","fs-5","opacity-50"],["id","restriction-tab-pane","role","tabpanel","aria-labelledby","restriction-tab-pane","tabindex","1",1,"tab-pane","fade"],["tooltip","How many days of past orders this user can download.","labelValue","Download Order Days Range","inputType","input",3,"inputValue"],[1,"btn","btn-outline-secondary"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-trash","me-1"],["role","button","routerLink","/menu/users/users/form",1,"btn","btn-outline-secondary",3,"queryParams"],[1,"fa","fa-edit","me-1"],[1,"me-3","mb-3",2,"--p-chip-image-width","1.2rem","--p-chip-image-height","1.2rem","--p-chip-padding-x","1rem","--p-chip-padding-y","0.5rem","--p-chip-border-radius","0.5rem","--p-chip-font-size","1.2rem",3,"label","image","alt"]],template:function(o,n){if(o&1&&(q(0),_(1,"async"),a(2,"mainpanel",0)(3,"actions")(4,"div",1),m(5,Se,2,1,"ng-container",2)(6,Te,4,3,"ng-container",2),l()(),a(7,"content")(8,"div",3)(9,"div",4)(10,"div",5)(11,"div",6)(12,"div",7)(13,"h3"),s(14,"User Information"),l()(),a(15,"div",8)(16,"div",9)(17,"div",10)(18,"div",11)(19,"label"),s(20,"Selected User"),l(),a(21,"div")(22,"span"),s(23),l()()()(),a(24,"div",10)(25,"div",11)(26,"label"),s(27,"Selected Group"),l(),a(28,"div")(29,"span"),s(30),l()()()()()()()()(),a(31,"div",9)(32,"div",5)(33,"ul",12)(34,"li",13)(35,"button",14),s(36," Channels Filter "),l()(),a(37,"li",13)(38,"button",15),s(39," Restriction "),l()()(),a(40,"div",16)(41,"div",17)(42,"div",18)(43,"div",19),m(44,Ue,2,0,"div",20)(45,Ee,2,0),l(),a(46,"div",21)(47,"div",9)(48,"div",10),u(49,"lib-info-page-input",22),l()()()()()()()()()()()),o&2){let i=$(y(1,9,n.userLoader$));r(2),p("headerTitle",(i==null||i.selectedUser==null?null:i.selectedUser.Name)+" Info")("hideSearchBox",!0)("hideSearchDropdown",!0),r(3),p("ngxPermissionsOnly",n.userDeleteRole),r(),p("ngxPermissionsOnly",n.userEditRole),r(17),h(i==null||i.selectedUser==null?null:i.selectedUser.Name),r(7),h(i==null||i.selectedGroup==null?null:i.selectedGroup.Name),r(14),T((i==null||i.selectedChannels==null?null:i.selectedChannels.length)===0?44:45),r(5),p("inputValue",i==null?null:i.DownloadOrderDaysRange)}},dependencies:[P,W,ue,me,ie,ne,te,fe,se,le,ve],styles:[".nav-tabs[_ngcontent-%COMP%] .nav-link.active[_ngcontent-%COMP%]:hover, .nav-tabs[_ngcontent-%COMP%] .nav-link.active[_ngcontent-%COMP%]:focus, .nav-tabs[_ngcontent-%COMP%] .nav-item.show[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]:hover, .nav-tabs[_ngcontent-%COMP%] .nav-item.show[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]:focus{background-color:#fff!important;border-color:#dee2e6 #dee2e6 #fff}"]})}}return t})();export{ot as UserInfoComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as E}from"./chunk-PW42BQIY.js";import{n as b}from"./chunk-
|
|
1
|
+
import{c as E}from"./chunk-PW42BQIY.js";import{n as b}from"./chunk-M2FCTYGU.js";import{Gb as v,Gc as r,Hc as T,Ic as d,Jb as D,Mb as _,Oa as f,Yb as g,dc as h,ec as C,gc as w,hc as y,ic as a,jc as i,kc as m,pb as u,rb as n,uc as x}from"./chunk-B7KTCPKC.js";var L=(()=>{class t{transform(e){return E.getChannelLogoByTypeId(e)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275pipe=D({name:"channelImage",type:t,pure:!0})}}return t})();function S(t,l){if(t&1&&m(0,"img",8),t&2){let e=x().$implicit;g("src",e==null?null:e.ThumbnailURL,u)}}function V(t,l){t&1&&m(0,"img",9)}function F(t,l){if(t&1&&_(0,S,1,1,"img",8)(1,V,1,0,"img",9),t&2){let e=l.$implicit;h(e!=null&&e.ThumbnailURL?0:1)}}function j(t,l){if(t&1&&m(0,"img",12),t&2){let e=x().$implicit;g("src",e==null?null:e.ThumbnailURL,u)}}function P(t,l){t&1&&m(0,"img",13)}function q(t,l){if(t&1&&(a(0,"div",15),r(1),i()),t&2){let e=x().$implicit;n(),d("x",e.Quantity,"")}}function U(t,l){if(t&1&&(a(0,"li")(1,"div",10)(2,"div",11),_(3,j,1,1,"img",12)(4,P,1,0,"img",13),a(5,"div",14)(6,"div",15),r(7),i(),a(8,"div",16),r(9),i()()(),_(10,q,2,1,"div",15),i()()),t&2){let e=l.$implicit;n(3),h(e!=null&&e.ThumbnailURL?3:4),n(4),T(e.Name),n(2),T(e.Code),n(),h(e.Quantity>1?10:-1)}}var B=(()=>{class t{constructor(){this.variants=f()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=v({type:t,selectors:[["variants-dropdown"]],inputs:{variants:[1,"variants"]},decls:15,vars:2,consts:[[1,"dropdown","pe-6"],["type","button","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","dropdown-toggle","border-0","d-flex","align-items-center","justify-content-between","gap-4","w-100",2,"padding","0px"],[1,"text-start"],[1,"fs-6"],[1,"d-flex","align-items-center","gap-2"],[1,"fa-regular","fa-angle-down"],[1,"dropdown-menu","p-3"],[1,"ms-6","mt-3","text-black"],[1,"thumb-square","border","border-opacity-10",3,"src"],["src","https://cdn.dealpos.app/template/products_thumb.png",1,"border","border-opacity-10","thumb-square"],[1,"dropdown-item","d-flex","align-items-center","gap-5","justify-content-between",2,"padding-left","8px","padding-right","8px"],[1,"d-flex","align-items-center","justify-content-start","gap-5"],[1,"thumb-square-lg","border","border-opacity-10",3,"src"],["src","https://cdn.dealpos.app/template/products_thumb.png",1,"thumb-square-lg","border","border-opacity-10"],[1,"lh-base"],[1,"text-black"],[1,"text-muted"]],template:function(o,p){if(o&1&&(a(0,"div",0)(1,"button",1)(2,"div",2)(3,"div",3),r(4),i(),a(5,"div",4),w(6,F,2,1,null,null,C),i()(),a(8,"div"),m(9,"i",5),i()(),a(10,"ul",6)(11,"h5",7),r(12),i(),w(13,U,11,4,"li",null,C),i()()),o&2){let s,c;n(4),d("",(s=p.variants())==null?null:s.length," items"),n(2),y(p.variants()),n(6),d("",(c=p.variants())==null?null:c.length," Items"),n(),y(p.variants())}},dependencies:[b],styles:[".dropdown-toggle[_ngcontent-%COMP%]:after{display:none!important}.dropdown[_ngcontent-%COMP%] .dropdown-menu.show[_ngcontent-%COMP%]{top:unset!important}.thumb-square[_ngcontent-%COMP%]{width:26px;height:26px;object-fit:contain;object-position:center}.thumb-square-lg[_ngcontent-%COMP%]{width:50px;height:50px;object-fit:contain;object-position:center}"]})}}return t})();var G=(()=>{class t{constructor(){this.variant=f()}ngOnInit(){}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=v({type:t,selectors:[["variant-with-image"]],inputs:{variant:[1,"variant"]},decls:8,vars:3,consts:[[1,"d-flex","align-items-center","gap-5"],[1,"thumb-square-lg","border","border-opacity-10",3,"src"],[1,"lh-base"],[1,"text-black"],[1,"text-muted"]],template:function(o,p){if(o&1&&(a(0,"div",0)(1,"div"),m(2,"img",1),i(),a(3,"div",2)(4,"div",3),r(5),i(),a(6,"div",4),r(7),i()()()),o&2){let s,c,I;n(2),g("src",((s=p.variant())==null?null:s.ThumbnailURL)||"https://cdn.dealpos.app/template/products_thumb.png",u),n(3),d(" ",(c=p.variant())==null?null:c.Name," "),n(2),d(" ",(I=p.variant())==null?null:I.Code," ")}},dependencies:[b],styles:[".thumb-square-lg[_ngcontent-%COMP%]{width:50px;height:50px;object-fit:contain;object-position:center}"]})}}return t})();export{L as a,B as b,G as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ie,b as qe}from"./chunk-UMY6NG57.js";import"./chunk-NRCXYGO3.js";import"./chunk-2SXRC4IG.js";import"./chunk-WGXUKTYP.js";import{e as We,k as Le,l as Ae,m as $e,n as ze,o as Ye}from"./chunk-R76V3PTN.js";import"./chunk-6LH7FSOW.js";import"./chunk-XEMNZHW6.js";import"./chunk-ALKC77XL.js";import"./chunk-NTW6FBP5.js";import"./chunk-LR4UZ2OS.js";import"./chunk-F4GMWHYJ.js";import{a as Oe,b as Ne,c as Re}from"./chunk-ZIOAOUAM.js";import"./chunk-SIYMMMKQ.js";import"./chunk-WHZ44BAL.js";import{a as Be}from"./chunk-JOBWFOGC.js";import"./chunk-DJILLV4M.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SDUUFQUI.js";import"./chunk-M5IQRAHV.js";import"./chunk-OZ7LWNOK.js";import"./chunk-VRI3CYGG.js";import"./chunk-AVEGIEYT.js";import{c as Ee,d as Pe,e as Ie}from"./chunk-SYENQYR7.js";import{a as Ue,b as Ge,c as je,e as Ke,f as He,g as Qe}from"./chunk-A2YNWIX6.js";import"./chunk-55OI2SUF.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import{h as be,i as ee}from"./chunk-RBRIJGT2.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as Z}from"./chunk-V3NCYRCF.js";import{b as De,e as Te}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import"./chunk-HPYTL6TX.js";import{b as X,c as y}from"./chunk-PW42BQIY.js";import{m as Fe,n as ke}from"./chunk-6X2OBNJQ.js";import{c as Se,h as Ce,m as ve,w as ye,z as xe}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import"./chunk-UJYSVGLV.js";import{r as Me,s as Ve}from"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{J as we,d as W,f as B,g as L,j as q,k as J,n as F}from"./chunk-MTUIRWOB.js";import{$c as R,Ac as ce,Bc as he,Cc as ue,Fc as T,Gb as I,Gc as s,Hc as V,Ic as C,Ka as j,Kc as b,Lc as E,Mb as g,Mc as P,Oa as k,Qc as K,Ra as _,Sc as fe,Tc as _e,Yb as d,Z as z,aa as le,ad as U,bd as ge,cd as H,dc as M,ea as Y,ic as o,ja as se,jc as a,kc as S,lc as O,m as re,mc as N,oc as x,pa as v,pb as pe,rb as r,sd as Q,tc as w,uc as h,v as G,xc as de,ya as m,yc as me,za as c}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import{a as ae,b as oe}from"./chunk-66YHNWRR.js";var et=t=>({"over-due":t});function tt(t,p){if(t&1&&(o(0,"tr",8)(1,"td"),s(2),a(),o(3,"td"),s(4),a(),o(5,"td"),s(6),a(),o(7,"td"),s(8),a()()),t&2){let e=p.$implicit,n=p.index;d("ngClass",fe(5,et,e.Exception)),r(2),V(n+1),r(2),V(e.Number),r(2),V(e.Status),r(2),V(e.Exception)}}function it(t,p){if(t&1&&(O(0),g(1,tt,9,7,"tr",7),N()),t&2){let e,n=h();r(),d("ngForOf",(e=n.downloadResult())==null?null:e.Body)}}function nt(t,p){t&1&&(o(0,"tr",9)(1,"td",10)(2,"div",11),S(3,"i",12),a(),o(4,"h4",13),s(5," There is no order to processed "),a()()())}var Je=(()=>{class t{constructor(){this.downloadResult=k()}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"),S(5,"th",5),o(6,"th"),s(7,"Order Number"),a(),o(8,"th"),s(9,"Status"),a(),o(10,"th"),s(11,"Exception"),a()()(),o(12,"tbody"),g(13,it,2,1,"ng-container",6)(14,nt,6,0,"ng-template",null,0,H),a()()()()),n&2){let l,u=T(15);r(13),d("ngIf",((l=i.downloadResult())==null||l.Body==null?null:l.Body.length)>0)("ngIfElse",u)}},dependencies:[F,W,B,L],encapsulation:2})}}return t})();var A=(()=>{class t{constructor(){this.httpService=v(Te),this.toastr=v(De),this.datePipe=v(J)}gerChannelDetailById(e){return this.httpService.post(Z.GetChannelDetail,{ID:e})}getOrderPreview(e){return this.httpService.post(Z.GetOrderPreviewV2,e)}getDownloadOrder(e){return this.httpService.post(Z.GetDownloadOrderV2,e)}onPreviewOrder(e){return this.validateDatePreview(e)?this.getOrderPreview(e).pipe(Y(n=>{n.Data?.length===0&&this.toastrEmptyPreview(e)})):re}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:"",u=e.TimeTo?e.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${l} to ${i} ${u}!`,"No Orders!")}validateDatePreview(e){let n=!0;return e.downloadType==!0?y.getDaysDiff(e?.From,e?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):y.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=y.formatTitleFromDate(new Date(e),new Date(n)),l=this.datePipe.transform(e,i),u=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":l+"-"} ${u}`}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=se({token:t,factory:t.\u0275fac})}}return t})();function at(t,p){if(t&1&&(o(0,"ng-option",13),S(1,"img",14),s(2),a()),t&2){let e=p.$implicit;d("value",e.ID),r(),d("src",e==null?null:e.Img,pe),r(),C("",e.Name," ")}}function ot(t,p){if(t&1){let e=x();o(0,"div",8)(1,"div",4)(2,"h5"),s(3,"Type"),a(),o(4,"p",5),s(5,"Select Type want to download"),a()(),o(6,"div",4)(7,"div",15)(8,"div")(9,"mat-radio-group",16),P("ngModelChange",function(i){m(e);let l=h();return E(l.downloadType,i)||(l.downloadType=i),c(i)}),w("ngModelChange",function(){m(e);let i=h();return c(i.onDownloadTypeChange())}),o(10,"mat-radio-button",17),s(11," Orders "),a(),o(12,"mat-radio-button",18),s(13," Disbursement "),a()()()(),o(14,"div",19)(15,"div",20),S(16,"i",21),a(),o(17,"p",22),s(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(t&2){let e=h();r(9),b("ngModel",e.downloadType),r(),d("value",!1),r(2),d("value",!0)}}function rt(t,p){t&1&&(o(0,"p",5),s(1," Select Disbursement date "),o(2,"span",23),s(3,"(payment date / order complete date)"),a(),s(4," of the channel you want to download (Max 1 Week). "),a())}function lt(t,p){t&1&&(o(0,"p",5),s(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function st(t,p){if(t&1){let e=x();o(0,"div",12)(1,"app-timepicker",24),P("timeChange",function(i){m(e);let l=h();return E(l.startTime,i)||(l.startTime=i),c(i)}),w("timeChange",function(){m(e);let i=h();return c(i.onStartTimeChange())}),a(),o(2,"span",25),s(3,"-"),a(),o(4,"app-timepicker",24),P("timeChange",function(i){m(e);let l=h();return E(l.endTime,i)||(l.endTime=i),c(i)}),w("timeChange",function(){m(e);let i=h();return c(i.onEndTimeChange())}),a()()}if(t&2){let e=h();r(),b("time",e.startTime),r(3),b("time",e.endTime)}}var Xe=(()=>{class t{constructor(){this.reset=k(!1),this.authService=v(ee),this.tokenService=v(be),this.downloadService=v(A),this.downloadType=_(!1),this.selectedChannelId=_(null),this.channelOptions=_(this.authService.getChannels()),this.channelType=X,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 j,Q(()=>{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=y.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(G(e=>e?.Model),z(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let e=1;this.startDate()&&this.endDate()&&(e=y.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>e==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}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:[K([A,We()])],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=x();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),s(5,"Select a Channel"),a(),o(6,"p",5),s(7,"Select Channel want to download order"),a()(),o(8,"div",4)(9,"ng-select",6),P("ngModelChange",function(f){return m(l),E(i.selectedChannelId,f)||(i.selectedChannelId=f),c(f)}),w("ngModelChange",function(){return m(l),c(i.onSelectChannel())}),g(10,at,3,3,"ng-option",7),a()()(),g(11,ot,19,3,"div",8),R(12,"async"),o(13,"div",8)(14,"div",4)(15,"h5"),s(16,"Date Range"),a(),g(17,rt,5,0,"p",5)(18,lt,2,0,"p",5),a(),o(19,"div",4)(20,"div",2)(21,"mat-date-range-input",9)(22,"input",10),P("ngModelChange",function(f){return m(l),E(i.startDate,f)||(i.startDate=f),c(f)}),w("click",function(){m(l);let f=T(25);return c(f.open())}),a(),o(23,"input",11),P("ngModelChange",function(f){return m(l),E(i.endDate,f)||(i.endDate=f),c(f)}),w("click",function(){m(l);let f=T(25);return c(f.open())})("ngModelChange",function(){return m(l),c(i.onFilterDateChange())}),a()(),S(24,"mat-date-range-picker",null,0),a(),g(26,st,5,2,"div",12),a()()()()}if(n&2){let l,u,f=T(25);r(9),d("clearable",!1),b("ngModel",i.selectedChannelId),r(),d("ngForOf",i.channelOptions()),r(),M((l=U(12,11,i.channelDetail$))!=null&&l.ServiceFeeWriteOff&&((l=i.selectedChannel())==null?null:l.TypeID)==i.channelType.Tokopedia?11:-1),r(6),M(i.downloadType()&&((u=i.selectedChannel())==null?null:u.TypeID)==i.channelType.Tokopedia?17:18),r(4),d("rangePicker",f)("min",i.minDate())("max",i.maxDate()),r(),b("ngModel",i.startDate),r(),b("ngModel",i.endDate),r(3),M(i.showTimePicker()?26:-1)}},dependencies:[F,B,q,Ie,Pe,Ee,Re,Oe,Ne,xe,Se,Ce,ye,ve,qe,ze,Le,Ye,Ae,$e],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 D=function(t){return t.ALL="all",t.SYNC="sync",t.WRONG="wrong",t.UNSYNC="unsync",t}(D||{});var $=function(t){return t[t.DoNothing=0]="DoNothing",t[t.New=1]="New",t[t.Update=2]="Update",t}($||{});var pt=(t,p)=>({"over-due-today":t,"over-due":p});function dt(t,p){if(t&1&&(o(0,"th",21),s(1),a()),t&2){let e=h();r(),C(" ",e.selectedChannel()?"Created Date":"Last Status Update"," ")}}function mt(t,p){if(t&1&&(o(0,"td"),s(1),R(2,"date"),a()),t&2){let e=h().$implicit;r(),C(" ",ge(2,1,e.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function ct(t,p){if(t&1&&(o(0,"span"),s(1),a()),t&2){let e=h().$implicit;r(),C(" ",e.ActionString," ")}}function ht(t,p){if(t&1&&(o(0,"li"),s(1),a()),t&2){let e=p.$implicit;r(),C(" ",e," ")}}function ut(t,p){if(t&1&&(o(0,"ul",27),g(1,ht,2,1,"li",22),a()),t&2){let e=h().$implicit;r(),d("ngForOf",e.ActionString)}}function ft(t,p){if(t&1&&(o(0,"span",28),S(1,"i",29),a()),t&2){let e=h().$implicit;me("title","Delivery : ",e.DeliveryState,`
|
|
1
|
+
import{a as ie,b as qe}from"./chunk-YZKPQRLO.js";import{e as We,k as Le,l as Ae,m as $e,n as ze,o as Ye}from"./chunk-M5JQ7BGW.js";import{a as Ue,b as Ge,c as je,e as Ke,f as He,g as Qe}from"./chunk-6W6DKFRE.js";import"./chunk-7UHCDGAA.js";import{a as Oe,b as Ne,c as Re}from"./chunk-MHCAI6KP.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-AQTXFEBA.js";import{a as Be}from"./chunk-DDV4X5WD.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import"./chunk-WW22F76D.js";import"./chunk-B5VBBEEN.js";import"./chunk-E3ROEHBW.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import"./chunk-7SVF5UPT.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import"./chunk-CMTBBXR5.js";import{g as be,h as ee}from"./chunk-PSPROJXC.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as Z}from"./chunk-V3NCYRCF.js";import{c as Ee,d as Pe,e as Ie}from"./chunk-5JVEEL2T.js";import{b as X,c as y}from"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{b as De,e as Te}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as Fe,n as ke}from"./chunk-CLER2MX6.js";import{A as xe,c as Se,h as Ce,m as ve,x as ye}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as Me,s as Ve}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{J as we,d as W,f as B,g as L,j as q,k as J,n as F}from"./chunk-M2FCTYGU.js";import{$c as R,Ac as ce,Bc as he,Cc as ue,Fc as T,Gb as I,Gc as s,Hc as V,Ic as C,Ka as j,Kc as b,Lc as E,Mb as g,Mc as P,Oa as k,Qc as K,Ra as _,Sc as fe,Tc as _e,Yb as d,Z as z,aa as le,ad as U,bd as ge,cd as H,dc as M,ea as Y,ic as o,ja as se,jc as a,kc as S,lc as O,m as re,mc as N,oc as x,pa as v,pb as pe,rb as r,sd as Q,tc as w,uc as h,v as G,xc as de,ya as m,yc as me,za as c}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as ae,b as oe}from"./chunk-66YHNWRR.js";var et=t=>({"over-due":t});function tt(t,p){if(t&1&&(o(0,"tr",8)(1,"td"),s(2),a(),o(3,"td"),s(4),a(),o(5,"td"),s(6),a(),o(7,"td"),s(8),a()()),t&2){let e=p.$implicit,n=p.index;d("ngClass",fe(5,et,e.Exception)),r(2),V(n+1),r(2),V(e.Number),r(2),V(e.Status),r(2),V(e.Exception)}}function it(t,p){if(t&1&&(O(0),g(1,tt,9,7,"tr",7),N()),t&2){let e,n=h();r(),d("ngForOf",(e=n.downloadResult())==null?null:e.Body)}}function nt(t,p){t&1&&(o(0,"tr",9)(1,"td",10)(2,"div",11),S(3,"i",12),a(),o(4,"h4",13),s(5," There is no order to processed "),a()()())}var Je=(()=>{class t{constructor(){this.downloadResult=k()}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"),S(5,"th",5),o(6,"th"),s(7,"Order Number"),a(),o(8,"th"),s(9,"Status"),a(),o(10,"th"),s(11,"Exception"),a()()(),o(12,"tbody"),g(13,it,2,1,"ng-container",6)(14,nt,6,0,"ng-template",null,0,H),a()()()()),n&2){let l,u=T(15);r(13),d("ngIf",((l=i.downloadResult())==null||l.Body==null?null:l.Body.length)>0)("ngIfElse",u)}},dependencies:[F,W,B,L],encapsulation:2})}}return t})();var A=(()=>{class t{constructor(){this.httpService=v(Te),this.toastr=v(De),this.datePipe=v(J)}gerChannelDetailById(e){return this.httpService.post(Z.GetChannelDetail,{ID:e})}getOrderPreview(e){return this.httpService.post(Z.GetOrderPreviewV2,e)}getDownloadOrder(e){return this.httpService.post(Z.GetDownloadOrderV2,e)}onPreviewOrder(e){return this.validateDatePreview(e)?this.getOrderPreview(e).pipe(Y(n=>{n.Data?.length===0&&this.toastrEmptyPreview(e)})):re}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:"",u=e.TimeTo?e.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${l} to ${i} ${u}!`,"No Orders!")}validateDatePreview(e){let n=!0;return e.downloadType==!0?y.getDaysDiff(e?.From,e?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):y.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=y.formatTitleFromDate(new Date(e),new Date(n)),l=this.datePipe.transform(e,i),u=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":l+"-"} ${u}`}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=se({token:t,factory:t.\u0275fac})}}return t})();function at(t,p){if(t&1&&(o(0,"ng-option",13),S(1,"img",14),s(2),a()),t&2){let e=p.$implicit;d("value",e.ID),r(),d("src",e==null?null:e.Img,pe),r(),C("",e.Name," ")}}function ot(t,p){if(t&1){let e=x();o(0,"div",8)(1,"div",4)(2,"h5"),s(3,"Type"),a(),o(4,"p",5),s(5,"Select Type want to download"),a()(),o(6,"div",4)(7,"div",15)(8,"div")(9,"mat-radio-group",16),P("ngModelChange",function(i){m(e);let l=h();return E(l.downloadType,i)||(l.downloadType=i),c(i)}),w("ngModelChange",function(){m(e);let i=h();return c(i.onDownloadTypeChange())}),o(10,"mat-radio-button",17),s(11," Orders "),a(),o(12,"mat-radio-button",18),s(13," Disbursement "),a()()()(),o(14,"div",19)(15,"div",20),S(16,"i",21),a(),o(17,"p",22),s(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(t&2){let e=h();r(9),b("ngModel",e.downloadType),r(),d("value",!1),r(2),d("value",!0)}}function rt(t,p){t&1&&(o(0,"p",5),s(1," Select Disbursement date "),o(2,"span",23),s(3,"(payment date / order complete date)"),a(),s(4," of the channel you want to download (Max 1 Week). "),a())}function lt(t,p){t&1&&(o(0,"p",5),s(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function st(t,p){if(t&1){let e=x();o(0,"div",12)(1,"app-timepicker",24),P("timeChange",function(i){m(e);let l=h();return E(l.startTime,i)||(l.startTime=i),c(i)}),w("timeChange",function(){m(e);let i=h();return c(i.onStartTimeChange())}),a(),o(2,"span",25),s(3,"-"),a(),o(4,"app-timepicker",24),P("timeChange",function(i){m(e);let l=h();return E(l.endTime,i)||(l.endTime=i),c(i)}),w("timeChange",function(){m(e);let i=h();return c(i.onEndTimeChange())}),a()()}if(t&2){let e=h();r(),b("time",e.startTime),r(3),b("time",e.endTime)}}var Xe=(()=>{class t{constructor(){this.reset=k(!1),this.authService=v(ee),this.tokenService=v(be),this.downloadService=v(A),this.downloadType=_(!1),this.selectedChannelId=_(null),this.channelOptions=_(this.authService.getChannels()),this.channelType=X,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 j,Q(()=>{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=y.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(G(e=>e?.Model),z(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let e=1;this.startDate()&&this.endDate()&&(e=y.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>e==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}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:[K([A,We()])],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=x();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),s(5,"Select a Channel"),a(),o(6,"p",5),s(7,"Select Channel want to download order"),a()(),o(8,"div",4)(9,"ng-select",6),P("ngModelChange",function(f){return m(l),E(i.selectedChannelId,f)||(i.selectedChannelId=f),c(f)}),w("ngModelChange",function(){return m(l),c(i.onSelectChannel())}),g(10,at,3,3,"ng-option",7),a()()(),g(11,ot,19,3,"div",8),R(12,"async"),o(13,"div",8)(14,"div",4)(15,"h5"),s(16,"Date Range"),a(),g(17,rt,5,0,"p",5)(18,lt,2,0,"p",5),a(),o(19,"div",4)(20,"div",2)(21,"mat-date-range-input",9)(22,"input",10),P("ngModelChange",function(f){return m(l),E(i.startDate,f)||(i.startDate=f),c(f)}),w("click",function(){m(l);let f=T(25);return c(f.open())}),a(),o(23,"input",11),P("ngModelChange",function(f){return m(l),E(i.endDate,f)||(i.endDate=f),c(f)}),w("click",function(){m(l);let f=T(25);return c(f.open())})("ngModelChange",function(){return m(l),c(i.onFilterDateChange())}),a()(),S(24,"mat-date-range-picker",null,0),a(),g(26,st,5,2,"div",12),a()()()()}if(n&2){let l,u,f=T(25);r(9),d("clearable",!1),b("ngModel",i.selectedChannelId),r(),d("ngForOf",i.channelOptions()),r(),M((l=U(12,11,i.channelDetail$))!=null&&l.ServiceFeeWriteOff&&((l=i.selectedChannel())==null?null:l.TypeID)==i.channelType.Tokopedia?11:-1),r(6),M(i.downloadType()&&((u=i.selectedChannel())==null?null:u.TypeID)==i.channelType.Tokopedia?17:18),r(4),d("rangePicker",f)("min",i.minDate())("max",i.maxDate()),r(),b("ngModel",i.startDate),r(),b("ngModel",i.endDate),r(3),M(i.showTimePicker()?26:-1)}},dependencies:[F,B,q,Ie,Pe,Ee,Re,Oe,Ne,xe,Se,Ce,ye,ve,qe,ze,Le,Ye,Ae,$e],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 D=function(t){return t.ALL="all",t.SYNC="sync",t.WRONG="wrong",t.UNSYNC="unsync",t}(D||{});var $=function(t){return t[t.DoNothing=0]="DoNothing",t[t.New=1]="New",t[t.Update=2]="Update",t}($||{});var pt=(t,p)=>({"over-due-today":t,"over-due":p});function dt(t,p){if(t&1&&(o(0,"th",21),s(1),a()),t&2){let e=h();r(),C(" ",e.selectedChannel()?"Created Date":"Last Status Update"," ")}}function mt(t,p){if(t&1&&(o(0,"td"),s(1),R(2,"date"),a()),t&2){let e=h().$implicit;r(),C(" ",ge(2,1,e.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function ct(t,p){if(t&1&&(o(0,"span"),s(1),a()),t&2){let e=h().$implicit;r(),C(" ",e.ActionString," ")}}function ht(t,p){if(t&1&&(o(0,"li"),s(1),a()),t&2){let e=p.$implicit;r(),C(" ",e," ")}}function ut(t,p){if(t&1&&(o(0,"ul",27),g(1,ht,2,1,"li",22),a()),t&2){let e=h().$implicit;r(),d("ngForOf",e.ActionString)}}function ft(t,p){if(t&1&&(o(0,"span",28),S(1,"i",29),a()),t&2){let e=h().$implicit;me("title","Delivery : ",e.DeliveryState,`
|
|
2
2
|
Payment : `,e.PaymentState,"")}}function _t(t,p){if(t&1&&(o(0,"tr")(1,"td"),s(2),a(),o(3,"td"),s(4),a(),g(5,mt,3,4,"td",23),o(6,"td")(7,"span"),s(8),a(),s(9),a(),o(10,"td",24)(11,"span"),s(12),a(),s(13),a(),o(14,"td"),g(15,ct,2,1,"span",23)(16,ut,2,1,"ul",25),a(),o(17,"td"),g(18,ft,2,3,"span",26),a()()),t&2){let e,n=p.$implicit,i=p.index,l=h(2);r(2),V(i+1),r(2),V(n.Number),r(),d("ngIf",((e=l.selectedChannel())==null?null:e.TypeID)!=l.channelType.Shopee&&((e=l.selectedChannel())==null?null:e.TypeID)!==l.channelType.Tiktok),r(3),C("",n.ChannelStatus," - "),r(),C("",n.ChannelStatusDescription," "),r(),d("ngClass",_e(12,pt,(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":""),r(2),C("",n.POSStatus," - "),r(),C("",n.POSStatusDescription," "),r(2),d("ngIf",n.ActionString.length==1),r(),d("ngIf",n.ActionString.length>1),r(2),d("ngIf",n.ChannelStatus!=99&&n.POSStatus!=99)}}function gt(t,p){if(t&1&&(O(0),g(1,_t,19,15,"tr",22),N()),t&2){let e=h();r(),d("ngForOf",e.displayPreviewData())}}function wt(t,p){t&1&&(o(0,"tr",30)(1,"td",31)(2,"div",32),S(3,"i",33),a(),o(4,"h4",34),s(5," There is no order to processed "),a()()())}var Ze=(()=>{class t{constructor(){this.orderPreview=k(),this.selectedChannel=k(),this.channelType=X,this.allData=_(0),this.syncData=_(0),this.wrongData=_(0),this.unsyncData=_(0),this.pillStatus=_(D.ALL),this.actionPreviewOrder=$,this.previewStatus=D,this.displayPreviewData=_([]),this.exportOrders=new j,Q(()=>{this.orderPreview()&&(this.filterPreviewData(D.ALL),this.initLengthStatusData())},{allowSignalWrites:!0})}filterPreviewData(e){this.pillStatus.update(()=>e),this.displayPreviewData.update(()=>this.filterDataByStatus(e))}initLengthStatusData(){this.wrongData.update(()=>this.filterDataByStatus(D.WRONG).length),this.syncData.update(()=>this.filterDataByStatus(D.SYNC).length),this.allData.update(()=>this.orderPreview().length),this.unsyncData.update(()=>this.filterDataByStatus(D.UNSYNC).length)}filterDataByStatus(e){let n=[];switch(e){case D.ALL:n=this.orderPreview();break;case D.SYNC:n=this.orderPreview().filter(i=>i.Action==$.DoNothing);break;case D.WRONG:n=this.orderPreview().filter(i=>i.Action==$.Update);break;case D.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=x();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div")(5,"ul",5)(6,"li",6)(7,"button",7),w("click",function(){return m(l),c(i.filterPreviewData(i.previewStatus.ALL))}),s(8),a()(),o(9,"li",8)(10,"button",9),w("click",function(){return m(l),c(i.filterPreviewData(i.previewStatus.SYNC))}),s(11),a()(),o(12,"li",8)(13,"button",10),w("click",function(){return m(l),c(i.filterPreviewData(i.previewStatus.WRONG))}),s(14),a()(),o(15,"li",8)(16,"button",11),w("click",function(){return m(l),c(i.filterPreviewData(i.previewStatus.UNSYNC))}),s(17),a()()()(),o(18,"div")(19,"button",12),w("click",function(){return m(l),c(i.onExportOrders())}),S(20,"i",13),o(21,"span"),s(22,"Export"),a()()()()(),o(23,"table",14)(24,"thead",15)(25,"tr"),S(26,"th",16),o(27,"th",17),s(28,"Number"),a(),g(29,dt,2,1,"th",18),o(30,"th",19),s(31,"Channel Status"),a(),o(32,"th",19),s(33,"POS Status"),a(),o(34,"th"),s(35,"Action"),a(),S(36,"th",16),a()(),o(37,"tbody"),g(38,gt,2,1,"ng-container",20)(39,wt,6,0,"ng-template",null,0,H),a()()()()}if(n&2){let l,u,f=T(40);r(7),d("ngClass",i.pillStatus()=="all"?"btn-secondary text-white":"btn-outline-dark"),r(),C(" All (",i.allData(),") "),r(2),d("ngClass",i.pillStatus()=="sync"?"btn-success":"btn-outline-success"),r(),C(" Existing (",i.syncData(),") "),r(2),d("ngClass",i.pillStatus()=="wrong"?"btn-warning text-white":"btn-outline-warning"),r(),C(" Wrong Status (",i.wrongData(),") "),r(2),d("ngClass",i.pillStatus()=="unsync"?"btn-danger":"btn-outline-danger"),r(),C(" Missing (",i.unsyncData(),") "),r(12),d("ngIf",((l=i.selectedChannel())==null?null:l.TypeID)!=i.channelType.Shopee&&((l=i.selectedChannel())==null?null:l.TypeID)!==i.channelType.Tiktok),r(9),d("ngIf",((u=i.displayPreviewData())==null?null:u.length)>0)("ngIfElse",f)}},dependencies:[F,W,B,L,J,Ve,Me],encapsulation:2})}}return t})();var St=["stepper"];function Ct(t,p){if(t&1){let e=x();o(0,"div",2)(1,"button",19),w("click",function(){m(e);let i=h();return c(i.onStepperBack())}),s(2," Back "),a(),o(3,"button",20),w("click",function(){m(e);let i=h();return c(i.onNextStep())}),s(4," Next "),a()()}if(t&2){let e=h();r(3),d("disabled",e.disabledNextFilter())}}function vt(t,p){if(t&1){let e=x();o(0,"button",21),w("click",function(){m(e);let i=h();return c(i.onNextStep())}),s(1," Next "),a()}if(t&2){let e=h();d("disabled",e.disabledNextFilter())}}function yt(t,p){if(t&1){let e=x();o(0,"button",22),w("click",function(){m(e);let i=h();return c(i.onNewDownload())}),S(1,"i",23),s(2," New "),a()}}function xt(t,p){t&1&&(S(0,"i",24),o(1,"span"),s(2,"Filter"),a())}function Dt(t,p){t&1&&(S(0,"i",25),o(1,"span"),s(2,"Preview"),a())}function Tt(t,p){if(t&1){let e=x();O(0),o(1,"preview-step",26),w("onExportOrders",function(){m(e);let i=h();return c(i.onExportOrders())}),a(),N()}if(t&2){let e=p.ngIf;r(),d("orderPreview",e)}}function bt(t,p){t&1&&(S(0,"i",27),o(1,"span"),s(2,"Finish"),a())}function Et(t,p){if(t&1&&(O(0),S(1,"complete-step",28),N()),t&2){let e=p.ngIf;r(),d("downloadResult",e)}}function Pt(t,p){t&1&&(o(0,"h6"),s(1,"1"),a())}function It(t,p){t&1&&(o(0,"h6"),s(1,"2"),a())}function Mt(t,p){t&1&&(o(0,"h6"),s(1,"3"),a())}var Ui=(()=>{class t{constructor(){this.downloadService=v(A),this.orderService=v(ie),this.productService=v(Be),this.authService=v(ee),this.stepperSelectedIndex=_(0),this.disabledNextFilter=_(!0),this.isResetFilter=_(!1),this.pageTitle=_("Download to POS"),this.cacheKey=_(y.GuidEMpty)}onFilterChange(e){this.filter=e,this.validateDisabledNext()}validateDisabledNext(){this.disabledNextFilter.update(()=>y.IsEmpty(this.filter?.channelId)||!y.isValidDate(this.filter.startDate)||!y.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};y.IsNotEmpty(this.filter.startTime)&&(e=oe(ae({},e),{TimeFrom:this.filter.startTime+":00",TimeTo:this.filter.endTime+":00"})),this.orderPreview$=this.downloadService.onPreviewOrder(e).pipe(Y(n=>{n.Data?.length>0&&(this.cacheKey.update(()=>n.CacheKey),this.onStepperNext())}),G(n=>n.Data),z(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(le(n=>(e.ListPreview=n,this.downloadService.getDownloadOrder(e))),Y(()=>{this.onStepperNext()}),z(1))}setPageTitle(e){this.pageTitle.update(()=>`
|
|
3
3
|
${e} (${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)})
|
|
4
4
|
`)}onStepperBack(){this.stepper.previous(),this.pageTitle.update(()=>"Download to POS")}onNewDownload(){this.isResetFilter.update(()=>!0),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(St,5),n&2){let l;he(l=ue())&&(i.stepper=l.first)}},features:[K([A,ie,{provide:Ue,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,"btn","btn-outline-secondary","btn-fill"],[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"],[1,"btn","btn-outline-secondary","btn-fill",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],[1,"fa-solid","fa-filter","me-3"],[1,"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=x();o(0,"mainpanel",1)(1,"actions"),g(2,Ct,5,1,"div",2)(3,vt,2,1,"button",3)(4,yt,3,0,"button",4),a(),o(5,"content")(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8)(10,"mat-stepper",9,0),P("selectedIndexChange",function(f){return m(l),E(i.stepperSelectedIndex,f)||(i.stepperSelectedIndex=f),c(f)}),o(12,"mat-step",10),g(13,xt,3,0,"ng-template",11),o(14,"filter-step",12),w("onFilterChange",function(f){return m(l),c(i.onFilterChange(f))}),a()(),o(15,"mat-step",13),g(16,Dt,3,0,"ng-template",11)(17,Tt,2,1,"ng-container",14),R(18,"async"),a(),o(19,"mat-step",15),g(20,bt,3,0,"ng-template",11)(21,Et,2,1,"ng-container",14),R(22,"async"),a(),g(23,Pt,2,0,"ng-template",16)(24,It,2,0,"ng-template",17)(25,Mt,2,0,"ng-template",18),a()()()()()()()}if(n&2){let l=T(11);d("hideSearchBox",!0)("hideSearchDropdown",!0)("headerTitle",i.pageTitle())("description",i.pageTitle()),r(2),M(i.stepperSelectedIndex()==1?2:-1),r(),M(i.stepperSelectedIndex()==0?3:-1),r(),M(i.stepperSelectedIndex()==2?4:-1),r(6),de("ngClass","last-edited-step-"+l.selectedIndex),b("selectedIndex",i.stepperSelectedIndex),r(2),d("completed",!1)("editable",i.stepperSelectedIndex()!=2),r(2),d("reset",i.isResetFilter()),r(),d("editable",i.stepperSelectedIndex()!=2)("completed",!1),r(2),d("ngIf",U(18,16,i.orderPreview$)),r(4),d("ngIf",U(22,18,i.downloadPreview$))}},dependencies:[F,W,L,q,Je,Xe,Ze,Qe,Ke,Ge,He,je,ke,Fe,we],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.vertical-radio{display:flex;flex-direction:column;margin:15px 0}.mt-1rem{margin-top:1rem}.dateRange{padding-top:.8rem;padding-bottom:.8rem}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}.form-label-group.radio.download-type{height:45.5938px!important;border-radius:.375rem!important}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ft}from"./chunk-
|
|
1
|
+
import{a as ft}from"./chunk-B5VBBEEN.js";import{a as ht}from"./chunk-E3ROEHBW.js";import{a as J,b as vt}from"./chunk-AYPY47VM.js";import{a as $}from"./chunk-ECRWEMEV.js";import{D as F,G as W,Q as U,Y as ut,ba as pt,ia as dt,ja as G,k as lt,q as ct,r as bt,s as L,z as q}from"./chunk-LZCEM2PC.js";import{d as st,i as rt,n as k,o as z}from"./chunk-M2FCTYGU.js";import{Ac as x,Bb as R,Bc as l,Ca as h,Cc as c,Gb as g,Hb as tt,Kb as m,Lb as et,Mb as u,Oa as d,Pa as Z,Qc as nt,Ra as P,Sc as it,Xb as r,Yb as M,_b as _,dc as y,ia as B,ic as D,ja as X,jc as N,ka as Y,kc as S,nc as j,oc as A,od as C,pa as p,pd as at,rb as v,rd as s,sd as ot,tc as I,uc as f,vc as T,wc as w,ya as O,za as V,zc as Q}from"./chunk-B7KTCPKC.js";var _t=["previcon"],yt=["nexticon"],Tt=["content"],wt=["prevButton"],xt=["nextButton"],Ct=["inkbar"],kt=["tabs"],E=["*"],$t=e=>({"p-tablist-viewport":e});function Bt(e,b){e&1&&j(0)}function Dt(e,b){if(e&1&&u(0,Bt,1,0,"ng-container",11),e&2){let t=f(2);M("ngTemplateOutlet",t.prevIconTemplate||t._prevIconTemplate)}}function It(e,b){e&1&&S(0,"ChevronLeftIcon")}function Lt(e,b){if(e&1){let t=A();D(0,"button",10,3),I("click",function(){O(t);let n=f();return V(n.onPrevButtonClick())}),u(2,Dt,1,1,"ng-container")(3,It,1,0,"ChevronLeftIcon"),N()}if(e&2){let t=f();r("aria-label",t.prevButtonAriaLabel)("tabindex",t.tabindex())("data-pc-group-section","navigator"),v(2),y(t.prevIconTemplate||t._prevIconTemplate?2:3)}}function Ft(e,b){e&1&&j(0)}function Et(e,b){if(e&1&&u(0,Ft,1,0,"ng-container",11),e&2){let t=f(2);M("ngTemplateOutlet",t.nextIconTemplate||t._nextIconTemplate)}}function Ot(e,b){e&1&&S(0,"ChevronRightIcon")}function Vt(e,b){if(e&1){let t=A();D(0,"button",12,4),I("click",function(){O(t);let n=f();return V(n.onNextButtonClick())}),u(2,Et,1,1,"ng-container")(3,Ot,1,0,"ChevronRightIcon"),N()}if(e&2){let t=f();r("aria-label",t.nextButtonAriaLabel)("tabindex",t.tabindex())("data-pc-group-section","navigator"),v(2),y(t.nextIconTemplate||t._nextIconTemplate?2:3)}}function Pt(e,b){e&1&&w(0)}var Rt=({dt:e})=>`
|
|
2
2
|
.p-tabs {
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as R,b as E,c as B}from"./chunk-
|
|
1
|
+
import{a as R,b as E,c as B}from"./chunk-MHCAI6KP.js";import{A as T,a as v,h as y,m as P}from"./chunk-6QYD6NIJ.js";import{r as x,s as F}from"./chunk-YCH6HHU3.js";import{f as M,n as O}from"./chunk-M2FCTYGU.js";import{$b as u,Gb as c,Gc as _,Ic as b,Ka as s,Mb as p,Qc as C,Tc as f,Yb as a,ia as m,ic as d,jc as l,rb as r,tc as g,uc as h}from"./chunk-B7KTCPKC.js";var V=(o,n)=>({color:o,"font-weight":n});function k(o,n){if(o&1&&(d(0,"mat-radio-button",2),_(1),l()),o&2){let t=n.$implicit,i=n.index,e=h();u(f(7,V,e.model==t.Key&&e.activeBold?"#0976b4":"",e.model==t.Key&&e.activeBold?"700":"")),a("disabled",e.exception==t.Value)("matTooltip",e.title.length>0?e.title[i]:"")("value",t.Key)("name",e.name),r(),b("",t.Value," ")}}var H=(()=>{class o{constructor(){this.model=null,this.disabled=!1,this.modelChange=new s,this.options=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"}],this.border=!1,this.name="",this.title=[],this.exception="",this.activeBold="",this.onChange=()=>{},this.onTouched=()=>{}}writeValue(t){this.model=t}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}change(t){let i=t&&t.value!==void 0?t.value:t;this.model=i,this.modelChange.emit(i),this.onChange(i),this.onTouched()}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275cmp=c({type:o,selectors:[["lib-radio-options"]],inputs:{model:"model",disabled:"disabled",options:"options",border:"border",name:"name",title:"title",exception:"exception",activeBold:"activeBold"},outputs:{modelChange:"modelChange"},features:[C([{provide:v,useExisting:m(()=>o),multi:!0}])],decls:2,vars:3,consts:[["color","primary",3,"ngModelChange","disabled","ngModel"],["matTooltipPosition","above","class","me-4 mt-1",3,"style","disabled","matTooltip","value","name",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"me-4","mt-1",3,"disabled","matTooltip","value","name"]],template:function(i,e){i&1&&(d(0,"mat-radio-group",0),g("ngModelChange",function(S){return e.change(S)}),p(1,k,2,10,"mat-radio-button",1),l()),i&2&&(a("disabled",e.disabled)("ngModel",e.model),r(),a("ngForOf",e.options))},dependencies:[O,M,B,R,E,T,y,P,F,x],styles:["html[_ngcontent-%COMP%]{--mdc-radio-state-layer-size: 36px}html[_ngcontent-%COMP%]{--mat-radio-touch-target-display: block}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled:checked + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__outer-circle[_ngcontent-%COMP%]{border-color:#0976b4!important}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__inner-circle[_ngcontent-%COMP%]{background-color:#0976b4!important;border-color:#0976b4!important}"]})}}return o})();export{H as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as oe}from"./chunk-EPVCMYCI.js";import{a as le,b as re}from"./chunk-6FY74YFQ.js";import"./chunk-7ZXNQAAU.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-3BT5DR3X.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import{b as ae}from"./chunk-M7NQID2Z.js";import"./chunk-CMTBBXR5.js";import{h as X}from"./chunk-PSPROJXC.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-V3NCYRCF.js";import{a as Y,b as Z,d as ee,e as te}from"./chunk-5JVEEL2T.js";import{c as K}from"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as Q}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as ne,n as ie}from"./chunk-CLER2MX6.js";import{A as G,h as H,m as U}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as V,k as J,l as W,n as k}from"./chunk-M2FCTYGU.js";import{$c as m,Gb as P,Gc as p,Hc as C,Ic as y,Kc as j,Lc as O,Mb as u,Mc as q,Qc as z,Yb as d,Z as M,aa as D,ad as c,bd as A,dc as R,ec as B,g as L,gc as T,hc as $,ic as i,ja as w,jc as a,kc as f,oc as F,pa as g,pb as S,rb as l,tc as v,uc as x,v as I,ya as E,za as N}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as _}from"./chunk-66YHNWRR.js";var b=(()=>{class n{constructor(){this.httpService=g(Q),this._pageination=new L({PageNumber:1,RowCount:100,ChannelID:null}),this.filter$=this._pageination.asObservable(),this.log$=this.filter$.pipe(D(e=>this.getLogs$(e).pipe()))}getLogs$(e){return this.httpService.post("/api/Channel/GetChannelLogPaged",e)}onPaginationChange(e){let t=this._pageination.value;t.PageNumber=e.pageIndex+1,this._pageination.next(t)}onFilter(e){let t=this._pageination.value;t.PageNumber=1,t=_(_({},t),e),this._pageination.next(t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=w({token:n,factory:n.\u0275fac})}}return n})();function me(n,h){if(n&1&&(i(0,"span",10),f(1,"img",11),a(),p(2)),n&2){let e=h.item;l(),d("src",e.Img,S)("alt",e.Name),l(),y(" ",e.Name," ")}}function se(n,h){if(n&1&&(i(0,"tr")(1,"td"),f(2,"img",17),i(3,"span"),p(4),a()(),i(5,"td")(6,"span",18),p(7),m(8,"json"),a()(),i(9,"td"),p(10),m(11,"json"),a(),i(12,"td"),p(13),m(14,"date"),a()()),n&2){let e=h.$implicit;l(2),d("src",e.Img,S),l(2),y(" ",e.ChannelName," "),l(3),C(c(8,5,e.Request)),l(3),C(c(11,7,e.Response)),l(3),C(A(14,9,e.Created,"dd-MM-yyyy hh:mm:ss"))}}function ce(n,h){if(n&1){let e=F();i(0,"div",8)(1,"table",12)(2,"thead")(3,"tr",13)(4,"th",14),p(5,"Channel"),a(),i(6,"th"),p(7,"Request"),a(),i(8,"th"),p(9,"Response"),a(),i(10,"th",15),p(11,"Created"),a()()(),i(12,"tbody"),T(13,se,15,12,"tr",null,B),m(15,"async"),a()(),i(16,"mat-paginator",16),m(17,"async"),m(18,"async"),m(19,"async"),m(20,"async"),v("page",function(r){E(e);let o=x();return N(o.channelLogService.onPaginationChange(r))}),a()()}if(n&2){let e,t,r,o,s=x();l(13),$((e=c(15,3,s.channelLogs$))==null?null:e.Data),l(3),d("length",(t=c(17,5,s.channelLogs$))==null?null:t.Count)("pageSize",(r=c(18,7,s.filter$))==null?null:r.RowCount)("pageIndex",(o=c(19,9,s.filter$))!=null&&o.PageNumber?0:((o=c(20,11,s.filter$))==null?null:o.PageNumber)-1)}}function de(n,h){n&1&&(i(0,"div",9),f(1,"app-empty-state"),a())}var Oe=(()=>{class n{constructor(){this.channelLogService=g(b),this.authService=g(X),this.channelOptions=this.authService.getChannels(),this.channelLogs$=this.channelLogService.log$.pipe(I(e=>(e.Data?e.Data=e.Data.map(t=>(t.Response=t.Response?JSON.parse(t.Response):"",t.Request=t.Request?JSON.parse(t.Request):"",t.Img=K.getChannelLogoByTypeId(t.TypeID),t)):e.Data=[],e)),M(1)),this.filter$=this.channelLogService.filter$}onSubmitFilter(){this.channelLogService.onFilter({ChannelID:this.channelID})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-channel-log"]],features:[z([b])],decls:15,vars:7,consts:[["headerTitle","Authorization Log",3,"onSubmit","hideSearchBox"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[3,"page","length","pageSize","pageIndex"],[1,"me-2",2,"width","25px",3,"src"],[1,""]],template:function(t,r){if(t&1&&(i(0,"mainpanel",0),v("onSubmit",function(){return r.onSubmitFilter()}),i(1,"filters")(2,"div",1)(3,"div")(4,"label",2),p(5,"Channel"),a(),i(6,"ng-select",3),q("ngModelChange",function(s){return O(r.channelID,s)||(r.channelID=s),s}),u(7,me,3,3,"ng-template",4),a()()()(),i(8,"content")(9,"div",5)(10,"div",6)(11,"div",7),u(12,ce,21,13,"div",8),m(13,"async"),u(14,de,2,0,"div",9),a()()()()()),t&2){let o;d("hideSearchBox",!0),l(6),d("clearable",!0)("items",r.channelOptions),j("ngModel",r.channelID),l(6),R(((o=c(13,5,r.channelLogs$))==null||o.Data==null?null:o.Data.length)>0?12:14)}},dependencies:[k,V,W,J,ie,ne,oe,re,le,ae,te,ee,Y,Z,G,H,U],encapsulation:2})}}return n})();export{Oe as ChannelLogComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Ve,b as Re,c as Ne}from"./chunk-V5BKQSAT.js";import{a as Le}from"./chunk-JVOLT3NH.js";import{a as Ee}from"./chunk-RQQSAPSO.js";import{a as Ie}from"./chunk-66MLRB2J.js";import"./chunk-M5JQ7BGW.js";import{a as Fe}from"./chunk-EPVCMYCI.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import"./chunk-CMTBBXR5.js";import{a as Pe}from"./chunk-WPW3D4MQ.js";import"./chunk-PSPROJXC.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as M}from"./chunk-V3NCYRCF.js";import{c as X,d as Z,e as $}from"./chunk-5JVEEL2T.js";import{b as y,c as H}from"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{b as Te,e as U}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{b as ee,c as te,d as we,e as ie,f as ne,g as De,h as oe,m as Oe,n as Me}from"./chunk-CLER2MX6.js";import{A as V,c as ve,h as B,m as z,o as ke}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as xe,s as be}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as Ce,k as j,m as ye,n as O}from"./chunk-M2FCTYGU.js";import{$c as b,G as re,Gb as w,Gc as a,Hc as C,Ic as q,Kc as v,Lc as k,Mb as E,Mc as T,Na as G,Nc as ue,Oa as Y,Oc as he,Pc as ge,Qc as fe,Ra as S,Rc as _e,Sc as Se,Yb as u,Z as me,_b as pe,aa as ae,ac as de,ad as J,bd as I,dc as P,ec as N,gc as L,hc as A,ic as o,ja as F,jc as r,kc as x,oc as D,pa as c,pb as ce,rb as p,rd as Q,tc as d,uc as h,v as W,ya as f,za as _}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as K,b as se}from"./chunk-66YHNWRR.js";function qe(n,g){if(n&1){let e=D();o(0,"div",10),d("click",function(){f(e);let i=h();return _(i.onSelectDelivery("DROP_OFF"))}),o(1,"div",11),x(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=h();pe("text-muted",e.selectedDelivery()&&e.selectedDelivery()==="PICK_UP")("selected",e.selectedDelivery()==="DROP_OFF")}}function Je(n,g){if(n&1){let e=D();o(0,"div",10),d("click",function(){f(e);let i=h();return _(i.onSelectDelivery("PICK_UP"))}),o(1,"div",11),x(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=h();pe("text-muted",e.selectedDelivery()&&e.selectedDelivery()==="DROP_OFF")("selected",e.selectedDelivery()==="PICK_UP")}}var Ae=(()=>{class n{constructor(){this.data=c(te),this.dialogRef=c(ee),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 y.Shopee:break;case y.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=w({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),E(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&&(p(11),P(i.showPickup()?11:-1),p(),P(i.showDropOff()?12:-1))},dependencies:[O,oe,ie,ne],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 Xe(n,g){if(n&1&&(o(0,"ng-option",3),a(1),r()),n&2){let e=g.$implicit;u("value",e==null?null:e.address_id)("matTooltip",e==null?null:e.address),p(),C(e==null?null:e.address)}}function Ze(n,g){if(n&1&&(o(0,"ng-option",6)(1,"span",7),a(2),b(3,"date"),r(),o(4,"span"),a(5),r()()),n&2){let e=g.$implicit;u("value",e==null?null:e.pickup_time_id),p(2),C(I(3,3,e==null?null:e.date,"d MMMM")),p(3),C(e==null?null:e.time_text)}}var Be=(()=>{class n{constructor(){this.shippingOptions=Y(),this.onFormChanges=G(),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 se(K({},t),{date:i})})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({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),T("ngModelChange",function(s){return k(i.selectedShipping,s)||(i.selectedShipping=s),s}),d("ngModelChange",function(s){return i.onAddressChange(s),i.onValueChanges()}),L(4,Xe,2,3,"ng-option",3,N),r()(),o(6,"div",0)(7,"label",4),a(8,"Date"),r(),o(9,"ng-select",5),T("ngModelChange",function(s){return k(i.pickupTime,s)||(i.pickupTime=s),s}),d("ngModelChange",function(){return i.onValueChanges()}),L(10,Ze,6,6,"ng-option",6,N),r()()),t&2&&(p(3),u("clearable",!1),v("ngModel",i.selectedShipping),p(),A(i.addressList()),p(5),u("clearable",!1),v("ngModel",i.pickupTime),p(),A(i.timeOptions()))},dependencies:[O,j,$,Z,X,V,B,z,be,xe],encapsulation:2})}}return n})();function $e(n,g){if(n&1&&(o(0,"ng-option",3)(1,"span",4),a(2),b(3,"date"),r(),o(4,"span"),a(5),b(6,"date"),r(),o(7,"span",5),a(8,"-"),r(),o(9,"span"),a(10),b(11,"date"),r()()),n&2){let e=g.$implicit,t=g.$index;u("value",t),p(2),C(I(3,4,e==null?null:e.start_date,"d MMMM")),p(3),C(I(6,7,e==null?null:e.start_date,"HH:mm")),p(5),C(I(11,10,e==null?null:e.end_date,"HH:mm"))}}var ze=(()=>{class n{constructor(){this.shippingOptions=Y(),this.onFormChanges=G(),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=w({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),T("ngModelChange",function(s){return k(i.selectedTimeIndex,s)||(i.selectedTimeIndex=s),s}),d("ngModelChange",function(){return i.onValueChanges()}),L(4,$e,12,13,"ng-option",3,N),r()()),t&2&&(p(3),u("clearable",!1),v("ngModel",i.selectedTimeIndex),p(),A(i.timeOptions()))},dependencies:[O,j,$,Z,X,V,B,z],encapsulation:2})}}return n})();function et(n,g){if(n&1){let e=D();o(0,"shopee-pickup",10),d("onFormChanges",function(i){f(e);let l=h();return _(l.onFormChanges(i))}),r()}if(n&2){let e=h();u("shippingOptions",e.dialogData.shippingOptions)}}function tt(n,g){if(n&1){let e=D();o(0,"tiktok-pickup",10),d("onFormChanges",function(i){f(e);let l=h();return _(l.onFormChanges(i))}),r()}if(n&2){let e=h();u("shippingOptions",e.dialogData.shippingOptions)}}var He=(()=>{class n{constructor(){this.dialogRef=c(ee),this.dialogData=c(te),this.shippingOptions=S(this.dialogData.shippingOptions),this.channelType=S(this.dialogData.channelType),this.order=S(this.dialogData.order),this.channelTypeEnum=y,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 y.Shopee:return{OrderNumber:this.order().Number,ShopID:this.order().ShopID,pickup:this.pickupData()};case y.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=w({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),E(13,et,1,1,"shopee-pickup",6)(14,tt,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 l,s;p(9),q(" ",!((l=i.order())==null||l.LogisticService==null)&&l.LogisticService.Name?(l=i.order())==null||l.LogisticService==null?null:l.LogisticService.Name:"-"," "),p(4),P((s=i.channelType())===i.channelTypeEnum.Shopee?13:s===i.channelTypeEnum.Tiktok?14:-1)}},dependencies:[O,oe,ie,De,ne,V,Be,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 le=(()=>{class n{constructor(){this.httpService=c(U)}getReadyToShipOrders(e){return this.httpService.post(M.GetToShip,e).pipe(W(t=>t?.Data))}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=F({token:n,factory:n.\u0275fac})}}return n})();var Ue=(()=>{class n{constructor(){this.httpService=c(U)}getShippingOptions(e,t){return this.httpService.post(M.GetTiktokShippingOptions,{OrderNumber:e,ShopID:t}).pipe(W(i=>this.formatDatePickUpOptions(i)))}pickupOrder(e){return this.httpService.post(M.TiktokSelectShipping,e)}dropOffOrder(e,t){let i={handover_method:"DROP_OFF",PackageID:e,ShopID:t};return this.httpService.post(M.TiktokSelectShipping,i)}formatDatePickUpOptions(e){return e?.Options?.pickup_slots&&(e.Options.pickup_slots=e?.Options?.pickup_slots.map(t=>{let i=H.convertTimestampToDate(t.start_time),l=H.convertTimestampToDate(t.end_time);return t.start_date=i,t.end_date=l,t})),e}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=F({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ke=(()=>{class n{constructor(){this.httpService=c(U)}getShippingOptions(e,t){return this.httpService.post(M.GetShopeeShippingOptions,{OrderNumber:e,ShopID:t})}pickupOrder(e){return this.httpService.post(M.ShopeeSelectShipping,e)}dropOffOrder(e,t){let i={OrderNumber:e,ShopID:t,dropoff:{}};return this.httpService.post(M.ShopeeSelectShipping,i)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=F({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ge=(()=>{class n{constructor(){this.shopeeShippingService=c(Ke),this.tiktokShippingService=c(Ue)}getShippingOptions(e,t,i){switch(i){case y.Shopee:return this.getShopeeShippingOptions(e,t);case y.Tiktok:return this.getTiktokShippingOptions(e,t)}}pickupOrder(e,t){switch(e.MarketType){case y.Shopee:return this.shopeeShippingService.pickupOrder(t);case y.Tiktok:return this.tiktokShippingService.pickupOrder(t)}}dropOffOrder(e,t){switch(e.MarketType){case y.Shopee:return this.shopeeShippingService.dropOffOrder(e.Number,e.ShopID);case y.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=F({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var it=()=>[],nt=n=>({"td-cell-hover":n});function ot(n,g){if(n&1&&x(0,"variants-dropdown",30),n&2){let e=h().$implicit;u("variants",e==null?null:e.Variants)}}function rt(n,g){if(n&1&&x(0,"variant-with-image",31),n&2){let e=h().$implicit;u("variant",e==null?null:e.Variants[0])}}function at(n,g){if(n&1&&(o(0,"span"),a(1),r()),n&2){let e=h().$implicit;p(),C(e.LogisticService==null?null:e.LogisticService.Option)}}function pt(n,g){if(n&1){let e=D();o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"div",26)(5,"div",27)(6,"div"),x(7,"img",28),b(8,"channelImage"),r(),o(9,"div"),x(10,"order-link",29),r()(),o(11,"small"),a(12),b(13,"date"),r()()(),o(14,"td"),a(15),r(),o(16,"td"),E(17,ot,1,1,"variants-dropdown",30)(18,rt,1,1,"variant-with-image",31),r(),o(19,"td",32),a(20),b(21,"number"),r(),o(22,"td")(23,"span"),a(24),r(),E(25,at,2,1,"span"),r(),o(26,"td",33)(27,"button",34),d("click",function(){let i=f(e).$implicit,l=h(2);return _(l.onSetFulfillment(i))}),a(28," Set Fulfillment "),r()()()}if(n&2){let e=g.$implicit;p(2),C(e.Outlet),p(5),u("src",J(8,12,e==null?null:e.MarketType),ce)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),p(3),u("order",e),p(2),q(" ",I(13,14,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),p(3),C(e.Customer),p(),de(Se(19,nt,(e.Variants==null?null:e.Variants.length)>1)),p(),P((e.Variants==null?null:e.Variants.length)>1?17:18),p(3),C(J(21,17,e.Amount)),p(4),C(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),p(),P(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?25:-1)}}function lt(n,g){if(n&1){let e=D();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(),x(16,"th",24),r()(),o(17,"tbody"),L(18,pt,29,21,"tr",null,N),r()(),o(20,"app-custom-paginator",25),d("next",function(){f(e);let i=h();return _(i.initReadyToShip())})("previous",function(){f(e);let i=h();return _(i.initReadyToShip())}),r()()}if(n&2){let e=h(),t=ge(0);p(18),A(t),p(2),u("filter",e.filter())("totaldata",t==null?null:t.length)}}function st(n,g){n&1&&(o(0,"div",16),x(1,"app-empty-state"),r())}var Ii=(()=>{class n{constructor(){this.readyToShipService=c(le),this.dialog=c(we),this.pickupService=c(Ge),this.toastr=c(Te),this.filter=S({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.initReadyToShip()}initReadyToShip(){this.readyToShip$=this.readyToShipService.getReadyToShipOrders(this.filter()).pipe(me(1))}onFilterChange(e){this.filter.update(t=>K(K({},t),e))}onSetFulfillment(e){this.pickupService.getShippingOptions(e.Number,e.ShopID,e.MarketType).pipe(ae(t=>this.dialog.open(Ae,{height:"400px",width:"530px",data:{options:t,channelType:e.MarketType}}).afterClosed().pipe(re(i=>H.IsNotEmpty(i)),W(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(re(i=>H.IsNotEmpty(i)),ae(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()})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["app-ready-to-ship"]],features:[fe([le])],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,"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",3,"click"]],template:function(t,i){if(t&1){let l=D();ue(0),b(1,"async"),o(2,"mainpanel",0),d("onSubmit",function(){return f(l),_(i.initReadyToShip())}),T("textChange",function(m){return f(l),k(i.filter().Number,m)||(i.filter().Number=m),_(m)}),o(3,"actions")(4,"a",1),x(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),T("ngModelChange",function(m){return f(l),k(i.filter().ListChannelID,m)||(i.filter().ListChannelID=m),_(m)}),r()(),o(13,"div",5)(14,"label",3),a(15,"From/To"),r(),o(16,"div",6)(17,"datepicker",7),T("dateChange",function(m){return f(l),k(i.filter().From,m)||(i.filter().From=m),_(m)}),r()(),o(18,"div")(19,"datepicker",8),T("dateChange",function(m){return f(l),k(i.filter().To,m)||(i.filter().To=m),_(m)}),r()()(),o(20,"div",5)(21,"label",9),a(22,"Page Number"),r(),o(23,"input",10),T("ngModelChange",function(m){return f(l),k(i.filter().PageNumber,m)||(i.filter().PageNumber=m),_(m)}),r()(),o(24,"div",5)(25,"label",9),a(26,"Page Size"),r(),o(27,"input",11),T("ngModelChange",function(m){return f(l),k(i.filter().PageSize,m)||(i.filter().PageSize=m),_(m)}),r()()(),o(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),E(32,lt,21,2,"div",15)(33,st,2,0,"div",16),r()()()()()}if(t&2){let l=he(J(1,8,i.readyToShip$)||_e(11,it));p(2),v("text",i.filter().Number),p(10),u("multiple",!0),v("ngModel",i.filter().ListChannelID),p(5),v("date",i.filter().From),p(2),v("date",i.filter().To),p(4),v("ngModel",i.filter().PageNumber),p(4),v("ngModel",i.filter().PageSize),p(5),P(l.length>0?32:33)}},dependencies:[O,Ce,ye,j,Me,Oe,Fe,Pe,V,ve,ke,B,z,Ve,Re,Ne,Ie,Ee,Le],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{Ii as ReadyToShipComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as R}from"./chunk-
|
|
1
|
+
import{e as R}from"./chunk-JXSBFTQM.js";import{j as V,m as B,n as E}from"./chunk-M2FCTYGU.js";import{$c as s,Gb as y,Gc as a,Hc as S,Ic as A,Jc as N,Ka as m,Mb as x,Nc as T,Oa as h,Yb as C,Z as _,ad as p,dc as k,ic as r,jc as l,kc as g,oc as w,pa as v,rb as o,tc as f,uc as b,v as P,ya as d,za as c}from"./chunk-B7KTCPKC.js";function z(e,I){if(e&1){let i=w();r(0,"span",9),f("click",function(){d(i);let t=b();return c(t.onShowTotal())}),r(1,"i",10),a(2,"?"),l()()}}function D(e,I){if(e&1&&(r(0,"span"),a(1),s(2,"async"),s(3,"number"),l()),e&2){let i=b();o(),S(i.rowCountApi()?p(2,1,i.rowCount$):p(3,3,i.paginationTotal))}}var K=(()=>{class e{constructor(){this.httpService=v(R),this.nextButtonAlwaysVisible=h(!1),this.next=new m,this.filterChange=new m,this.previous=new m,this.total=new m,this.hasClicked=!1,this.rowCountApi=h(null),this.rowCount$=null}initRowCount(){this.rowCountApi()&&(this.hasClicked=!0,this.rowCount$=this.httpService.post(this.rowCountApi(),this.filter).pipe(P(i=>i.Count),_(1)))}onShowTotal(){this.total.emit(),this.initRowCount()}onPreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.filterChange.emit(this.filter),this.previous.emit()}onNextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.filterChange.emit(this.filter),this.next.emit()}static{this.\u0275fac=function(u){return new(u||e)}}static{this.\u0275cmp=y({type:e,selectors:[["app-custom-paginator"]],inputs:{nextButtonAlwaysVisible:[1,"nextButtonAlwaysVisible"],filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked",rowCountApi:[1,"rowCountApi"]},outputs:{next:"next",filterChange:"filterChange",previous:"previous",total:"total"},decls:18,vars:12,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[1,"btn-group"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click","hidden"],[1,"fas","fa-arrow-left"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click","hidden"],[1,"fas","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(u,t){if(u&1){let n=w();T(0),r(1,"div",0)(2,"div",1)(3,"div",2),a(4),s(5,"number"),s(6,"number"),x(7,z,3,0,"span",3)(8,D,4,5,"span"),a(9),l()(),r(10,"div",4)(11,"a",5),f("click",function(){return d(n),c(t.onPreviousPage())}),g(12,"i",6),a(13," Prev"),l(),r(14,"a",7),s(15,"async"),f("click",function(){return d(n),c(t.onNextPage())}),g(16,"i",8),a(17," Next"),l()()()}if(u&2){let n=t.filter.PageSize!=null?t.filter.PageSize:t.filter.RowCount;o(4),N(" Showing ",p(5,6,n*(t.filter.PageNumber-1)+1)," - ",p(6,8,n*(t.filter.PageNumber-1)+t.totaldata)," of "),o(3),k(t.hasClicked?8:7),o(2),A(" records ~ ",t.filter.PageNumber," Page "),o(2),C("hidden",t.filter.PageNumber==1),o(3),C("hidden",(n*(t.filter.PageNumber-1)+t.totaldata==(t.rowCountApi()?p(15,10,t.rowCount$):t.paginationTotal)||t.totaldata<n)&&!t.nextButtonAlwaysVisible())}},dependencies:[E,V,B],encapsulation:2})}}return e})();export{K as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C}from"./chunk-
|
|
1
|
+
import{a as C}from"./chunk-SM3P57SO.js";import{Aa as a,Ca as o,Gb as r,Kb as l,Xb as s,ac as c,ic as m,jc as d,kc as p}from"./chunk-B7KTCPKC.js";var h=(()=>{class t extends C{static \u0275fac=(()=>{let i;return function(e){return(i||(i=o(t)))(e||t)}})();static \u0275cmp=r({type:t,selectors:[["AngleRightIcon"]],features:[l],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M5.25 11.1728C5.14929 11.1694 5.05033 11.1455 4.9592 11.1025C4.86806 11.0595 4.78666 10.9984 4.72 10.9228C4.57955 10.7822 4.50066 10.5916 4.50066 10.3928C4.50066 10.1941 4.57955 10.0035 4.72 9.86283L7.72 6.86283L4.72 3.86283C4.66067 3.71882 4.64765 3.55991 4.68275 3.40816C4.71785 3.25642 4.79932 3.11936 4.91585 3.01602C5.03238 2.91268 5.17819 2.84819 5.33305 2.83149C5.4879 2.81479 5.64411 2.84671 5.78 2.92283L9.28 6.42283C9.42045 6.56346 9.49934 6.75408 9.49934 6.95283C9.49934 7.15158 9.42045 7.34221 9.28 7.48283L5.78 10.9228C5.71333 10.9984 5.63193 11.0595 5.5408 11.1025C5.44966 11.1455 5.35071 11.1694 5.25 11.1728Z","fill","currentColor"]],template:function(n,e){n&1&&(a(),m(0,"svg",0),p(1,"path",1),d()),n&2&&(c(e.getClassNames()),s("aria-label",e.ariaLabel)("aria-hidden",e.ariaHidden)("role",e.role))},encapsulation:2})}return t})();export{h as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as ht}from"./chunk-MHCAI6KP.js";import"./chunk-3LRWABHB.js";import"./chunk-G47XGOST.js";import{b as ut}from"./chunk-CIIO2CJ6.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import{a as Z}from"./chunk-5DIRXS7I.js";import"./chunk-CMTBBXR5.js";import{h as rt}from"./chunk-PSPROJXC.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-V3NCYRCF.js";import{a as st,b as at,d as lt,e as ct}from"./chunk-5JVEEL2T.js";import{b as h,c as tt}from"./chunk-PW42BQIY.js";import{b as nt,c as ot}from"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{b as et,e as it}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as dt,n as gt}from"./chunk-CLER2MX6.js";import{A as Y,h as Q,m as X}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as mt,s as pt}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{J as y,f as J,g as G,j as q,n as L}from"./chunk-M2FCTYGU.js";import{$c as C,Fc as P,Gb as V,Gc as a,Hb as S,Hc as u,Ic as W,Kc as w,Lc as D,Mb as g,Mc as R,Nc as $,Oc as A,Pc as H,Sc as z,Yb as l,Z as M,aa as F,ad as x,cd as U,ea as k,ic as o,jc as r,ka as f,kc as j,lc as T,mc as N,oc as O,pb as K,q as B,rb as s,tc as I,uc as c,v,xb as _,ya as b,za as E}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ct=e=>[e];function xt(e,m){if(e&1&&(o(0,"span",15),j(1,"img",16),r(),o(2,"span"),a(3),r()),e&2){let t=m.item;s(),l("src",t.Img,K)("alt",t.Name),s(2),W(" ",t.Name," ")}}function Lt(e,m){if(e&1){let t=O();T(0),$(1),C(2,"async"),o(3,"a",17),I("click",function(){b(t);let n=H(1),p=c();return E(p.submitLogistics(n))}),a(4,"Submit"),r(),N()}if(e&2){let t=c();s(),A(x(2,0,t.logisticServices$))}}function yt(e,m){}function vt(e,m){if(e&1){let t=O();o(0,"ng-select",20),R("ngModelChange",function(n){b(t);let p=c(2).$implicit;return D(p.ProductSKU,n)||(p.ProductSKU=n),E(n)}),r()}if(e&2){let t=c().ngIf,i=c().$implicit;w("ngModel",i.ProductSKU),l("items",t)}}function Mt(e,m){if(e&1&&(o(0,"span"),a(1),r()),e&2){let t=c(2).$implicit;s(),u(t.ProductSKU||"-")}}function bt(e,m){if(e&1&&(T(0),g(1,yt,0,0,"ng-template",19)(2,vt,1,2,"ng-template",null,0,U)(4,Mt,2,1,"ng-template",null,1,U),N()),e&2){let t=P(3),i=P(5),n=c(2);s(),l("ngxPermissionsOnly",z(3,Ct,n.logisticEditRole))("ngxPermissionsOnlyThen",t)("ngxPermissionsOnlyElse",i)}}function Et(e,m){if(e&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td"),a(4),r(),o(5,"td"),a(6),r(),o(7,"td"),g(8,bt,6,5,"ng-container",18),C(9,"async"),r()()),e&2){let t=m.$implicit,i=c();s(2),u(t.Name),s(2),u(t.Service),s(2),u(t.TypeString),s(2),l("ngIf",x(9,4,i.logisticOptions$))}}var _t=(()=>{class e{constructor(t,i,n){this.http=t,this.toastr=i,this.authService=n,this.filter={ChannelID:""},this.logisticEditRole=Z.LogisticUpdate,this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let t=[h.WooCommerce,h.Lazada,h.Shopify,h.Plugo,h.Tokopedia];this.channelOptions=this.channelOptions.map(i=>(t.forEach(n=>{i.TypeID===n&&(i.disabled=!0)}),i))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(t=>{this.filter=t.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(M(1))}submitLogistics(t){this.clonedLogisticServices$.pipe(v(i=>t.map(n=>(i.findIndex(d=>d.Name===n.Name&&d.ProductSKU==n.ProductSKU)==-1&&(n.IsChange=!0),n))),F(i=>this.http.post("/api/Logistic/Submit",i))).subscribe(()=>{this.toastr.success("Logistic service updated successfully.","Success"),this.getLogisticService()})}getLogisticService(){this.iniTitle(),this.logisticServices$=this.http.post("/api/Logistic/Get",this.filter).pipe(v(t=>t.map(i=>(i.ProductSKU=tt.IsEmpty(i.ProductSKU)?null:i.ProductSKU,i))),k(t=>{let i=JSON.parse(JSON.stringify(t));this.clonedLogisticServices$=B(i)}),M(1))}iniTitle(){let t=this.channelOptions.find(i=>i.ID==this.filter.ChannelID);this.channelName=t?t.Name:null}static{this.\u0275fac=function(i){return new(i||e)(_(it),_(et),_(rt))}}static{this.\u0275cmp=V({type:e,selectors:[["app-logistic"]],standalone:!1,decls:28,vars:9,consts:[["thenBlock",""],["elseBlock",""],["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[4,"ngxPermissionsOnly"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[4,"ngIf"],[3,"ngxPermissionsOnly","ngxPermissionsOnlyThen","ngxPermissionsOnlyElse"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(i,n){i&1&&(o(0,"mainpanel",2),I("onSubmit",function(){return n.getLogisticService()}),o(1,"filters")(2,"div")(3,"label",3),a(4,"Select a Channel"),r(),o(5,"ng-select",4),R("ngModelChange",function(d){return D(n.filter.ChannelID,d)||(n.filter.ChannelID=d),d}),g(6,xt,4,3,"ng-template",5),r()()(),o(7,"actions"),g(8,Lt,5,3,"ng-container",6),r(),o(9,"content")(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"table",11)(15,"thead",12)(16,"tr",13)(17,"th"),a(18,"Logistic"),r(),o(19,"th"),a(20,"Service"),r(),o(21,"th"),a(22,"Type"),r(),o(23,"th"),a(24,"Logistic Service"),r()()(),o(25,"tbody"),g(26,Et,10,6,"tr",14),C(27,"async"),r()()()()()()()()),i&2&&(l("headerTitle","Logistic Courier - "+n.channelName)("hideSearchDropdown",!1),s(5),l("clearable",!1)("items",n.channelOptions),w("ngModel",n.filter.ChannelID),s(3),l("ngxPermissionsOnly",n.logisticEditRole),s(18),l("ngForOf",x(27,7,n.logisticServices$)))},dependencies:[J,G,Q,X,dt,lt,st,at,mt,nt,q],encapsulation:2})}}return e})();var Tt=[{path:"",component:_t}],St=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=S({type:e})}static{this.\u0275inj=f({imports:[L,y.forChild(Tt)]})}}return e})();var oe=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=S({type:e})}static{this.\u0275inj=f({imports:[L,y,St,Y,gt,ct,ut,ht,pt,ot]})}}return e})();export{oe as LogisticModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as bt}from"./chunk-
|
|
1
|
+
import{a as bt}from"./chunk-B5VBBEEN.js";import{a as mt}from"./chunk-E3ROEHBW.js";import{a as gt,b as vt}from"./chunk-SN4AOGQK.js";import{a as Fe,c as _t,d as ft}from"./chunk-SB7NWPDS.js";import{a as Be}from"./chunk-AYPY47VM.js";import{a as Oe}from"./chunk-SM3P57SO.js";import{b as ht,e as xe}from"./chunk-OZ7LWNOK.js";import{a as de}from"./chunk-ECRWEMEV.js";import{H as dt,L as ut,M as ke,O as ye,V as we,Y as Re,a as N,b as ge,ba as ce,c as ot,e as rt,fa as pt,i as at,ia as Ee,j as st,ja as R,k as fe,ka as j,l as lt,m as ct,p as X,q as F,t as Ne,x as ve}from"./chunk-LZCEM2PC.js";import{c as it,d as be,f as ie,g as nt,i as me}from"./chunk-K5XRGNWG.js";import{a as tt}from"./chunk-6QYD6NIJ.js";import{d as $e,f as et,g as Me,h as Ve,i as Pe,n as te}from"./chunk-M2FCTYGU.js";import{$b as Ge,Aa as De,Ac as Se,Bc as S,Ca as L,Cc as $,Fc as Je,Gb as K,Gc as C,Hb as se,Hc as H,Ic as G,Jc as Xe,Ka as O,Kb as W,La as qe,Mb as h,Oa as ee,Qc as le,Sc as A,Tc as _e,Xb as T,Yb as c,Zb as Ze,ac as z,ia as We,ic as b,ja as oe,jc as _,ka as re,kc as I,lc as P,mc as E,nc as Z,oc as B,od as k,pa as ae,pd as J,rb as l,rd as Ae,tc as D,uc as s,vc as Ie,wc as he,xa as ze,xb as Le,ya as d,za as u,zc as V}from"./chunk-B7KTCPKC.js";var Mt=({dt:t})=>`
|
|
2
2
|
.p-badge {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
border-radius: ${t("badge.border.radius")};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ge,b as Ce,c as _e}from"./chunk-V5BKQSAT.js";import{a as fe}from"./chunk-JVOLT3NH.js";import{a as se}from"./chunk-RQQSAPSO.js";import{a as ue}from"./chunk-722SRHLY.js";import{a as de}from"./chunk-66MLRB2J.js";import"./chunk-M5JQ7BGW.js";import{a as ce}from"./chunk-EPVCMYCI.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-BFU7VKO3.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import"./chunk-CMTBBXR5.js";import{a as me}from"./chunk-WPW3D4MQ.js";import"./chunk-PSPROJXC.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as oe}from"./chunk-V3NCYRCF.js";import"./chunk-5JVEEL2T.js";import{b}from"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{b as ie,e as ne}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as le,n as pe}from"./chunk-CLER2MX6.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as re,s as ae}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as J,k as K,m as Q,n as X}from"./chunk-M2FCTYGU.js";import{$c as y,Gb as F,Gc as l,Hc as v,Ic as z,Kc as C,Lc as _,Mb as x,Mc as f,Nc as j,Oc as H,Pc as R,Qc as U,Ra as N,Sc as G,Yb as g,Z as P,ac as W,ad as E,bd as q,dc as L,ec as D,gc as O,hc as B,ic as t,ja as k,jc as i,kc as d,oc as T,pa as S,pb as I,rb as a,tc as A,uc as u,v as M,ya as c,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var V=(()=>{class n{constructor(){this.httpService=S(ne),this.shippingLabelService=S(ue),this.toastrService=S(ie)}getAwaitingCollectionOrders(e){return this.httpService.post(oe.GetAwaitingCollection,e).pipe(M(p=>p?.Data))}printShippingLabel(e){switch(e?.MarketType){case b.Shopee:this.shippingLabelService.printShippingLabelShopee(e.Number,e.ShopID);break;case b.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e.Number,e.ShopID);break;case b.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e.Number);break;case b.Lazada:this.shippingLabelService.printShippingLabelLazada(e.Number,e.ShopID);break;case b.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275prov=k({token:n,factory:n.\u0275fac})}}return n})();var we=n=>({"td-cell-hover":n});function Se(n,h){if(n&1&&d(0,"variants-dropdown",30),n&2){let e=u().$implicit;g("variants",e==null?null:e.Variants)}}function ve(n,h){if(n&1&&d(0,"variant-with-image",31),n&2){let e=u().$implicit;g("variant",e==null?null:e.Variants[0])}}function be(n,h){if(n&1&&(t(0,"span"),l(1),i()),n&2){let e=u().$implicit;a(),v(e.LogisticService==null?null:e.LogisticService.Option)}}function ye(n,h){if(n&1){let e=T();t(0,"tr")(1,"td"),l(2),i(),t(3,"td")(4,"div",26)(5,"div",27)(6,"div"),d(7,"img",28),y(8,"channelImage"),i(),t(9,"div"),d(10,"order-link",29),i()(),t(11,"small"),l(12),y(13,"date"),i()()(),t(14,"td"),l(15),i(),t(16,"td"),x(17,Se,1,1,"variants-dropdown",30)(18,ve,1,1,"variant-with-image",31),i(),t(19,"td",32),l(20),y(21,"number"),i(),t(22,"td")(23,"span"),l(24),i(),x(25,be,2,1,"span"),i(),t(26,"td",33)(27,"button",34),A("click",function(){let o=c(e).$implicit,m=u(2);return s(m.onPrintShippingLabel(o))}),d(28,"i",35),i()()()}if(n&2){let e=h.$implicit;a(2),v(e.Outlet),a(5),g("src",E(8,12,e==null?null:e.MarketType),I)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),a(3),g("order",e),a(2),z(" ",q(13,14,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),a(3),v(e.Customer),a(),W(G(19,we,(e.Variants==null?null:e.Variants.length)>1)),a(),L((e.Variants==null?null:e.Variants.length)>1?17:18),a(3),v(E(21,17,e.Amount)),a(4),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),a(),L(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?25:-1)}}function xe(n,h){if(n&1){let e=T();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),i(),t(6,"th",21),l(7,"Number"),i(),t(8,"th",21),l(9,"Customer"),i(),t(10,"th"),l(11,"Items"),i(),t(12,"th",22),l(13,"Amount"),i(),t(14,"th",23),l(15,"Shipping"),i(),d(16,"th",24),i()(),t(17,"tbody"),O(18,ye,29,21,"tr",null,D),i()(),t(20,"app-custom-paginator",25),A("next",function(){c(e);let o=u();return s(o.initAwaitingCollection())})("previous",function(){c(e);let o=u();return s(o.initAwaitingCollection())}),i()()}if(n&2){let e=u(),p=R(0);a(18),B(p),a(2),g("filter",e.filter())("totaldata",p==null?null:p.length)}}function Le(n,h){n&1&&(t(0,"div",16),d(1,"app-empty-state"),i())}var it=(()=>{class n{constructor(){this.awaitingCollectionService=S(V),this.filter=N({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.awaitingCollectionService.getAwaitingCollectionOrders(this.filter()).pipe(P(1))}onPrintShippingLabel(e){this.awaitingCollectionService.printShippingLabel(e)}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=F({type:n,selectors:[["app-awaiting-collection"]],features:[U([V])],decls:34,vars:11,consts:[["headerTitle","Awaiting Collection","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","10px"],["rowCountApi","/api/orders/awaitingcollectioncount",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,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Print shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],[1,"fa-solid","fa-print","fs-3"]],template:function(p,o){if(p&1){let m=T();j(0),y(1,"async"),t(2,"mainpanel",0),A("onSubmit",function(){return c(m),s(o.initAwaitingCollection())}),f("textChange",function(r){return c(m),_(o.filter().Number,r)||(o.filter().Number=r),s(r)}),t(3,"actions")(4,"a",1),d(5,"i",2),t(6,"span"),l(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),l(11,"From/To"),i(),t(12,"channel-select-options",4),f("ngModelChange",function(r){return c(m),_(o.filter().ListChannelID,r)||(o.filter().ListChannelID=r),s(r)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),f("dateChange",function(r){return c(m),_(o.filter().From,r)||(o.filter().From=r),s(r)}),i()(),t(18,"div")(19,"datepicker",8),f("dateChange",function(r){return c(m),_(o.filter().To,r)||(o.filter().To=r),s(r)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),f("ngModelChange",function(r){return c(m),_(o.filter().PageNumber,r)||(o.filter().PageNumber=r),s(r)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),f("ngModelChange",function(r){return c(m),_(o.filter().PageSize,r)||(o.filter().PageSize=r),s(r)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),x(32,xe,21,2,"div",15)(33,Le,2,0,"div",16),i()()()()()}if(p&2){let m=H(E(1,8,o.awaitingCollections$));a(2),C("text",o.filter().Number),a(10),g("multiple",!0),C("ngModel",o.filter().ListChannelID),a(5),C("date",o.filter().From),a(2),C("date",o.filter().To),a(4),C("ngModel",o.filter().PageNumber),a(4),C("ngModel",o.filter().PageSize),a(5),L((m==null?null:m.length)>0?32:33)}},dependencies:[X,J,Q,K,pe,le,ce,me,te,Y,ee,Z,$,ge,Ce,_e,de,se,ae,re,fe],encapsulation:2})}}return n})();export{it as AwaitingCollectionComponent};
|