marketplacepos 5.44.2 → 5.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/3rdpartylicenses.txt +31 -31
- package/Marketplace/{chunk-IA6KOBDJ.js → chunk-2HNZ6XV3.js} +1 -1
- package/Marketplace/{chunk-NAT7HRBS.js → chunk-2KDM4NDG.js} +1 -1
- package/Marketplace/chunk-3NFS6ZDY.js +1 -0
- package/Marketplace/chunk-3NHZEKEI.js +1 -0
- package/Marketplace/{chunk-5JQJRPL3.js → chunk-3TYYN7ZX.js} +1 -1
- package/Marketplace/{chunk-CUB2QFUO.js → chunk-3UN6FPMN.js} +1 -1
- package/Marketplace/{chunk-SYUFPF3D.js → chunk-3YP6ORBR.js} +1 -1
- package/Marketplace/{chunk-NXOXSOUJ.js → chunk-43E7L4CY.js} +1 -1
- package/Marketplace/{chunk-E4Z7OR75.js → chunk-4KHHGHFJ.js} +1 -1
- package/Marketplace/chunk-4UWGWYKJ.js +1 -0
- package/Marketplace/{chunk-MS3ZBCON.js → chunk-4VITMSIA.js} +1 -1
- package/Marketplace/{chunk-IIZDEGGW.js → chunk-5LQRO4AI.js} +1 -1
- package/Marketplace/{chunk-6QYD6NIJ.js → chunk-5PS6ZS3N.js} +1 -1
- package/Marketplace/{chunk-M7HQIICB.js → chunk-5QLKBL54.js} +1 -1
- package/Marketplace/{chunk-KCH7AGAT.js → chunk-5X2WQKXH.js} +1 -1
- package/Marketplace/{chunk-35XX6SQT.js → chunk-6KBMGQMI.js} +1 -1
- package/Marketplace/{chunk-IL5JIRWJ.js → chunk-6L7TD5DW.js} +1 -1
- package/Marketplace/{chunk-PNITO7BE.js → chunk-6RLISMEX.js} +1 -1
- package/Marketplace/{chunk-G7R7LUW4.js → chunk-74ELVGDK.js} +1 -1
- package/Marketplace/{chunk-4GW36MPQ.js → chunk-753FTTID.js} +1 -1
- package/Marketplace/{chunk-DXEJKRNB.js → chunk-76XHGJE7.js} +1 -1
- package/Marketplace/{chunk-LZCEM2PC.js → chunk-7AE3725T.js} +1 -1
- package/Marketplace/chunk-7WG7VRYR.js +1 -0
- package/Marketplace/{chunk-H3IVI3LN.js → chunk-A44LN77B.js} +1 -1
- package/Marketplace/{chunk-IMK2JGZA.js → chunk-A64VIOKR.js} +1 -1
- package/Marketplace/chunk-A6G2H7IF.js +2 -0
- package/Marketplace/chunk-A6PK5NP6.js +1 -0
- package/Marketplace/{chunk-CZDUJH26.js → chunk-AHLYED4C.js} +1 -1
- package/Marketplace/{chunk-QINTIYLK.js → chunk-AKVBFSUI.js} +1 -1
- package/Marketplace/{chunk-HVLMIZAB.js → chunk-AP24AK5A.js} +1 -1
- package/Marketplace/{chunk-L3FX4O3H.js → chunk-B67DSLBY.js} +1 -1
- package/Marketplace/{chunk-PFIBU2IX.js → chunk-BBQGPXDH.js} +1 -1
- package/Marketplace/{chunk-EQIFZBRG.js → chunk-BJUPMCEP.js} +2 -2
- package/Marketplace/{chunk-DL66NZ2A.js → chunk-BQIB3N6V.js} +1 -1
- package/Marketplace/{chunk-LA6B2JGP.js → chunk-CHWXOJDB.js} +1 -1
- package/Marketplace/{chunk-AVT3WVH4.js → chunk-DFFRRMPT.js} +1 -1
- package/Marketplace/{chunk-SM3P57SO.js → chunk-DFGZ4L65.js} +1 -1
- package/Marketplace/{chunk-PAMSUURJ.js → chunk-DLURPTQ3.js} +1 -1
- package/Marketplace/{chunk-YTL4RBBS.js → chunk-DQ3XZQ7W.js} +1 -1
- package/Marketplace/{chunk-M6UQ3NJ3.js → chunk-DUF425GC.js} +1 -1
- package/Marketplace/{chunk-YM4TJJMM.js → chunk-DZYBXWL2.js} +1 -1
- package/Marketplace/chunk-EBCTTFHD.js +2 -0
- package/Marketplace/chunk-EOLVRL5H.js +2 -0
- package/Marketplace/{chunk-SWQXSJ7O.js → chunk-ERXVXBTU.js} +1 -1
- package/Marketplace/chunk-EWTJL2KE.js +1 -0
- package/Marketplace/chunk-F6HNCBQX.js +5 -0
- package/Marketplace/{chunk-WW22F76D.js → chunk-FFCWYWBW.js} +1 -1
- package/Marketplace/{chunk-Q6P7MEKT.js → chunk-FHH5BTG7.js} +1 -1
- package/Marketplace/chunk-FHPIPQMB.js +15 -0
- package/Marketplace/{chunk-UGVEAL7H.js → chunk-FO7G4GMY.js} +1 -1
- package/Marketplace/{chunk-OC2FBL33.js → chunk-FPYZBABH.js} +1 -1
- package/Marketplace/{chunk-Z5GRNGHJ.js → chunk-FVORY74O.js} +1 -1
- package/Marketplace/{chunk-M2FCTYGU.js → chunk-FXQKRJWU.js} +1 -1
- package/Marketplace/{chunk-UWAXFTHD.js → chunk-FXVFO74P.js} +1 -1
- package/Marketplace/{chunk-B5VBBEEN.js → chunk-G7T42LFR.js} +1 -1
- package/Marketplace/{chunk-AJL3CYNX.js → chunk-GH5FTODR.js} +1 -1
- package/Marketplace/chunk-GVLJDP5K.js +1 -0
- package/Marketplace/{chunk-B5V5KFQU.js → chunk-HFCAD7GH.js} +1 -1
- package/Marketplace/{chunk-3LRWABHB.js → chunk-HVCIQI7B.js} +1 -1
- package/Marketplace/chunk-I2Y5WJEO.js +5 -0
- package/Marketplace/chunk-I4WCZRNL.js +1 -0
- package/Marketplace/{chunk-GCDQNJQN.js → chunk-ID2YZPRH.js} +1 -1
- package/Marketplace/chunk-IL2CPGYS.js +1 -0
- package/Marketplace/{chunk-CIAZIJGR.js → chunk-IQ4AFE6X.js} +1 -1
- package/Marketplace/{chunk-AEOSNAHH.js → chunk-J53BPEDH.js} +1 -1
- package/Marketplace/{chunk-SNPFU5TF.js → chunk-JL5DYPDV.js} +1 -1
- package/Marketplace/{chunk-CMTBBXR5.js → chunk-JVNHFIYT.js} +1 -1
- package/Marketplace/{chunk-UTCTTFIM.js → chunk-KVZ7LQSK.js} +1 -1
- package/Marketplace/{chunk-OAOQONOA.js → chunk-KXEADFBM.js} +1 -1
- package/Marketplace/chunk-LBXSZJDS.js +1 -0
- package/Marketplace/{chunk-OLOIQI4D.js → chunk-LDD4NVMB.js} +1 -1
- package/Marketplace/{chunk-KALG6D6L.js → chunk-LDPDLCRL.js} +1 -1
- package/Marketplace/chunk-LFMEBDL2.js +1 -0
- package/Marketplace/{chunk-E3ROEHBW.js → chunk-LRUVI2Z3.js} +1 -1
- package/Marketplace/chunk-LSCMIKJ2.js +1 -0
- package/Marketplace/{chunk-SB7NWPDS.js → chunk-M7V7A7Z6.js} +1 -1
- package/Marketplace/chunk-MO53T3IK.js +1 -0
- package/Marketplace/{chunk-6JUVLRWS.js → chunk-MVBY6S4R.js} +1 -1
- package/Marketplace/chunk-MW6Q6DZF.js +1 -0
- package/Marketplace/{chunk-PAEIUO2F.js → chunk-N2SPK2VI.js} +1 -1
- package/Marketplace/{chunk-EYBZQLBT.js → chunk-N6HMVYWS.js} +1 -1
- package/Marketplace/{chunk-UYYAK364.js → chunk-NERXQ5KH.js} +1 -1
- package/Marketplace/chunk-NFN7BQB3.js +3 -0
- package/Marketplace/{chunk-IHNN4Q2N.js → chunk-NNRBGHXB.js} +1 -1
- package/Marketplace/{chunk-W6FZQ6XT.js → chunk-OFZOAEW5.js} +1 -1
- package/Marketplace/{chunk-VPWALMDU.js → chunk-OIEZ4JUJ.js} +1 -1
- package/Marketplace/{chunk-B7KTCPKC.js → chunk-OJMQBH6T.js} +3 -3
- package/Marketplace/{chunk-K5GEJ2GZ.js → chunk-OK3LLCAK.js} +1 -1
- package/Marketplace/{chunk-EPVCMYCI.js → chunk-OLANEXLB.js} +1 -1
- package/Marketplace/{chunk-M6UMLTY2.js → chunk-OPKLFRVD.js} +1 -1
- package/Marketplace/{chunk-E2SXYIML.js → chunk-ORDCBJ4G.js} +1 -1
- package/Marketplace/{chunk-WQ3GDXQW.js → chunk-OXOTD33C.js} +1 -1
- package/Marketplace/{chunk-2ODVHD2K.js → chunk-PFXOFSJG.js} +1 -1
- package/Marketplace/{chunk-3IIKX554.js → chunk-PFZOP2J7.js} +1 -1
- package/Marketplace/{chunk-BXW7N3ER.js → chunk-PONMPAT5.js} +1 -1
- package/Marketplace/{chunk-YPWHTELF.js → chunk-PPHTN2H6.js} +1 -1
- package/Marketplace/{chunk-5JVEEL2T.js → chunk-PYXL7UF7.js} +1 -1
- package/Marketplace/{chunk-AYPY47VM.js → chunk-QBL6V7QF.js} +1 -1
- package/Marketplace/chunk-QGK4LEFP.js +1 -0
- package/Marketplace/{chunk-CCWNSX4Y.js → chunk-QHE3PKRD.js} +1 -1
- package/Marketplace/{chunk-AO46RPZ4.js → chunk-QK4BGDSS.js} +1 -1
- package/Marketplace/{chunk-WMFWJNS5.js → chunk-QNM4JQ46.js} +1 -1
- package/Marketplace/chunk-QP4C4R4W.js +1 -0
- package/Marketplace/{chunk-74IXJYWO.js → chunk-QS22J2SC.js} +1 -1
- package/Marketplace/{chunk-U7I4JXN6.js → chunk-RDJPSZRF.js} +1 -1
- package/Marketplace/{chunk-M5XGP4SG.js → chunk-RHHHL4OR.js} +1 -1
- package/Marketplace/{chunk-6BIM4KEI.js → chunk-RNTPX24O.js} +1 -1
- package/Marketplace/{chunk-M7NQID2Z.js → chunk-RTT3JVJM.js} +1 -1
- package/Marketplace/{chunk-KPGKJKR5.js → chunk-SMRDRDSH.js} +1 -1
- package/Marketplace/{chunk-E4KNET2R.js → chunk-TH6VZX34.js} +1 -1
- package/Marketplace/{chunk-WUHNNJ2C.js → chunk-TYG67JH3.js} +1 -1
- package/Marketplace/chunk-UBAADH47.js +1 -0
- package/Marketplace/chunk-UHJEXTOG.js +1 -0
- package/Marketplace/{chunk-ECRWEMEV.js → chunk-UHTMVOX6.js} +1 -1
- package/Marketplace/{chunk-UEPQYAWE.js → chunk-UIFPDTMW.js} +1 -1
- package/Marketplace/{chunk-GYPJGQYN.js → chunk-UUJWRGO4.js} +1 -1
- package/Marketplace/{chunk-D6URDVES.js → chunk-UXPULNCR.js} +1 -1
- package/Marketplace/{chunk-SN4AOGQK.js → chunk-UYLSZYOD.js} +1 -1
- package/Marketplace/{chunk-PH6H2XX4.js → chunk-V3CLQBGH.js} +1 -1
- package/Marketplace/{chunk-ATZ475FN.js → chunk-V3USB3ZU.js} +1 -1
- package/Marketplace/{chunk-74U7L3IP.js → chunk-V4UHOZJ4.js} +1 -1
- package/Marketplace/{chunk-77JJJNRM.js → chunk-V5KHEF77.js} +1 -1
- package/Marketplace/{chunk-ZOKAF4JQ.js → chunk-VCTMSNVC.js} +1 -1
- package/Marketplace/{chunk-5SYAYUVP.js → chunk-VKFFHT27.js} +1 -1
- package/Marketplace/{chunk-6EH5RQIV.js → chunk-VPFSU3X4.js} +1 -1
- package/Marketplace/chunk-VVX6LRMW.js +1 -0
- package/Marketplace/{chunk-GGSB6FC2.js → chunk-W3JKSCRF.js} +1 -1
- package/Marketplace/{chunk-5OHRA4AS.js → chunk-W3JTS22H.js} +1 -1
- package/Marketplace/{chunk-JXSBFTQM.js → chunk-W5L6FMO3.js} +1 -1
- package/Marketplace/chunk-WCVSETLP.js +2 -0
- package/Marketplace/{chunk-EH6HWI3G.js → chunk-WFT47MCY.js} +1 -1
- package/Marketplace/{chunk-3DMGCQAD.js → chunk-WHNSPPOH.js} +1 -1
- package/Marketplace/{chunk-NS46QSCM.js → chunk-WJAE4LW2.js} +1 -1
- package/Marketplace/chunk-WKSCLDT7.js +1 -0
- package/Marketplace/{chunk-MH4SJTQX.js → chunk-WLRPCY65.js} +1 -1
- package/Marketplace/{chunk-VIMB2VWB.js → chunk-WPELZYFP.js} +1 -1
- package/Marketplace/{chunk-IBCRFNV4.js → chunk-WVHSR3DQ.js} +1 -1
- package/Marketplace/{chunk-RECNBAEB.js → chunk-WWISWZF5.js} +1 -1
- package/Marketplace/{chunk-FIXI7CJ5.js → chunk-X5KQU53P.js} +1 -1
- package/Marketplace/{chunk-KX7FIURR.js → chunk-XB3CW7KH.js} +1 -1
- package/Marketplace/chunk-XEBKP2KL.js +1 -0
- package/Marketplace/{chunk-5KS4WK6H.js → chunk-XXWBR6S5.js} +1 -1
- package/Marketplace/{chunk-ZQ5EGXEB.js → chunk-YIXZLIPA.js} +1 -1
- package/Marketplace/{chunk-QJJ2WFVX.js → chunk-Z3ZYINRX.js} +1 -1
- package/Marketplace/chunk-ZBKUZ4CN.js +1 -0
- package/Marketplace/{chunk-VK3NG4L3.js → chunk-ZDXNJIJA.js} +1 -1
- package/Marketplace/chunk-ZHDGR4XE.js +1 -0
- package/Marketplace/chunk-ZWEHKGL5.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-QWLBNOBB.js → main-3TBM4ISM.js} +1 -1
- package/Marketplace/{styles-X3FXEB7T.css → styles-EW2SXTVD.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-2TXL3UEN.js +0 -1
- package/Marketplace/chunk-3OIE7ARG.js +0 -1
- package/Marketplace/chunk-3YNS3PF3.js +0 -1
- package/Marketplace/chunk-4J4NGUMH.js +0 -1
- package/Marketplace/chunk-5UGNYVSK.js +0 -1
- package/Marketplace/chunk-66N77XWP.js +0 -1
- package/Marketplace/chunk-6RKA4STM.js +0 -1
- package/Marketplace/chunk-7YA3MQOI.js +0 -1
- package/Marketplace/chunk-AQTXFEBA.js +0 -1
- package/Marketplace/chunk-BAUHJDSM.js +0 -1
- package/Marketplace/chunk-BU5LUO3S.js +0 -1
- package/Marketplace/chunk-DUEZ2ZYL.js +0 -2
- package/Marketplace/chunk-GIRXMYNI.js +0 -1
- package/Marketplace/chunk-GLZJR5RB.js +0 -1
- package/Marketplace/chunk-IT3DTSKV.js +0 -1
- package/Marketplace/chunk-L6WNU54G.js +0 -1
- package/Marketplace/chunk-LDHQNVI5.js +0 -1
- package/Marketplace/chunk-LZQRF7OP.js +0 -1
- package/Marketplace/chunk-MMLMRH2X.js +0 -1
- package/Marketplace/chunk-MS4AQ6UA.js +0 -0
- package/Marketplace/chunk-NRNXUMZX.js +0 -1
- package/Marketplace/chunk-O6GXF2YS.js +0 -4
- package/Marketplace/chunk-O75DCJY4.js +0 -1
- package/Marketplace/chunk-OPFENZ3W.js +0 -1
- package/Marketplace/chunk-OWQ3RWNF.js +0 -1
- package/Marketplace/chunk-P7NATRFC.js +0 -1
- package/Marketplace/chunk-QANQWW5Y.js +0 -15
- package/Marketplace/chunk-R46PZJM7.js +0 -1
- package/Marketplace/chunk-ROEKFCHJ.js +0 -2
- package/Marketplace/chunk-S25SHAFH.js +0 -5
- package/Marketplace/chunk-SLI26GUH.js +0 -1
- package/Marketplace/chunk-UBXKO4QI.js +0 -1
- package/Marketplace/chunk-UD3DLFU3.js +0 -1
- package/Marketplace/chunk-V5BKQSAT.js +0 -1
- package/Marketplace/chunk-VA7FHRY6.js +0 -2
- package/Marketplace/chunk-X3TNRXVW.js +0 -5
- package/Marketplace/chunk-YZKPQRLO.js +0 -2
- package/Marketplace/chunk-ZKZ5DIIR.js +0 -3
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as x}from"./chunk-PE5AFID4.js";import{g as u}from"./chunk-ZKZ5DIIR.js";import{b as h,d as C,i as M,j as v,k as S}from"./chunk-UGVEAL7H.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/16213478-user-group","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,2 +0,0 @@
|
|
|
1
|
-
import{b as ze}from"./chunk-ZQ5EGXEB.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import{a as Ke}from"./chunk-AO46RPZ4.js";import"./chunk-5KS4WK6H.js";import{a as V}from"./chunk-X3TNRXVW.js";import{a as ee}from"./chunk-XHAXYWZ7.js";import{a as He,b as Ge,c as Ye,d as J}from"./chunk-3OIE7ARG.js";import{a as je,b as Qe}from"./chunk-YPWHTELF.js";import"./chunk-OC2FBL33.js";import"./chunk-NS46QSCM.js";import"./chunk-EH6HWI3G.js";import"./chunk-E3ROEHBW.js";import"./chunk-OLOIQI4D.js";import"./chunk-RECNBAEB.js";import"./chunk-IA6KOBDJ.js";import"./chunk-M5XGP4SG.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import{a as $e}from"./chunk-YTL4RBBS.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import{a as We}from"./chunk-SYUFPF3D.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import{a as q}from"./chunk-UMP6ZMEJ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as Ue,b as Oe,c as Be}from"./chunk-E2SXYIML.js";import"./chunk-CMTBBXR5.js";import"./chunk-ZOKAF4JQ.js";import{h as Fe}from"./chunk-ZKZ5DIIR.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import{a as X}from"./chunk-OWQ3RWNF.js";import{b as ye,e as ve}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{e as Te}from"./chunk-5JVEEL2T.js";import{c as f}from"./chunk-PW42BQIY.js";import{b as De,c as Pe,d as Ee,j as Me,k as Ve,l as Le,m as Ne,n as Ae}from"./chunk-UGVEAL7H.js";import{A as Se,b as he,c as Ce,h as ge,m as fe,o as xe}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{a as Ie,b as we,c as be}from"./chunk-SWQXSJ7O.js";import{r as ke,s as Re}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{H as _e,J as ue,d as pe,g as me,j as $,k as W,m as de,n as j}from"./chunk-M2FCTYGU.js";import{$c as g,Fc as K,G as Q,Gb as O,Gc as c,Hc as U,Ic as I,Kc as b,Lc as F,Mb as h,Mc as T,Nc as le,Oc as re,Pc as se,Qc as B,Ra as k,Rc as ce,Sc as E,Yb as m,Z as N,ac as oe,ad as y,bd as R,cd as Z,dc as v,ea as z,ec as H,gc as G,hc as Y,ic as a,jc as l,kc as x,lc as D,mc as P,oc as S,pa as M,pb as A,rb as s,tc as C,uc as r,v as L,xb as w,xc as ae,ya as d,za as _}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as ie}from"./chunk-66YHNWRR.js";var tt=()=>["/menu/orderV2/download"];function nt(n,p){if(n&1&&(a(0,"li",4)(1,"div"),c(2," The last time you manually download your order is on "),a(3,"span",8),c(4),g(5,"date"),l()(),a(6,"div",9),c(7),l()()),n&2){r();let e=se(0);s(4),I(" ",R(5,2,e==null?null:e.OrderDownloadLatestOn,"dd MMM yyyy HH:mm")," "),s(3),I("(",e==null?null:e.calculatedDate,")")}}function it(n,p){n&1&&(a(0,"li",4),c(1," The last time you manually download your order is on (-) "),l())}var Ze=(()=>{class n{constructor(){this.dialogRef=M(De),this.data=M(Pe),this.modalConfig=new Me,this.inventoryService=M(V),this.lastDownloadInfo$=this.inventoryService.getLastInfoDownloadInventory(this.data.channelId).pipe(L(e=>{let o=e.OrderDownloadLatestOn!=f.MinDate,t=null,i=null;return o&&(t=new Date(e.OrderDownloadLatestOn),i=f.convertToReadableDate(t)),{OrderDownloadLatestOn:t,calculatedDate:i}}),N(1)),this.selectedProducts=k(this.data.selectedProducts||[]),this.modalConfig.title="Manual Inventory Sync",this.modalConfig.customWidth="500px",this.modalConfig.bodyScrollable=!0,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}onUpdate(){this.dialogRef.close(!0)}onCancel(){this.dialogRef.close(!1)}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-dialog-update-product-info"]],features:[B([V])],decls:16,vars:8,consts:[[3,"onCancel","config"],["content",""],[1,"container"],[1,"mt-8"],[1,"lh-base"],["footer",""],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","routerLink"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","keyup.F2"],[1,"fw-bold","me-1"],[1,"fw-bold"]],template:function(o,t){if(o&1){let i=S();le(0),g(1,"async"),a(2,"modal-material",0),C("onCancel",function(){return d(i),_(t.onCancel())}),a(3,"div",1)(4,"div",2)(5,"h4"),c(6),l(),a(7,"div",3)(8,"ul"),h(9,nt,8,5,"li",4)(10,it,2,0,"li",4),l()()()(),a(11,"div",5)(12,"a",6),C("click",function(){return d(i),_(t.onCancel())}),c(13," Download "),l(),a(14,"button",7),C("click",function(){return d(i),_(t.onUpdate())})("keyup.F2",function(){return d(i),_(t.onUpdate())}),c(15," Update Anyway "),l()()()}if(o&2){let i=re(y(1,4,t.lastDownloadInfo$));s(2),m("config",t.modalConfig),s(4),I("",t.selectedProducts().length," Product(s) will be updated."),s(3),v(i!=null&&i.OrderDownloadLatestOn?9:10),s(3),m("routerLink",ce(7,tt))}},dependencies:[Ve,j,$,W,ue,_e],encapsulation:2})}}return n})();var te=n=>[n],ot=n=>({"text-decoration-line-through":n}),at=n=>({"me-10":n}),lt=n=>({"bg-gradient-warning":n}),rt=n=>({cursor:n});function st(n,p){if(n&1){let e=S();a(0,"button",39),C("click",function(){d(e);let t=r().ngIf,i=r(2);return _(i.onScanInventory(t))}),x(1,"i",40),c(2,"Refresh "),l()}}function ct(n,p){if(n&1){let e=S();a(0,"div",37)(1,"button",41),C("click",function(){d(e);let t=r().ngIf,i=r(2);return _(i.onOpenDialogUpdateStockInfo(t))}),x(2,"i",42),c(3," Update "),l(),x(4,"button",43),a(5,"ul",44)(6,"a",45),C("click",function(){d(e);let t=r(3);return _(t.openExportDialog())}),x(7,"i",46),a(8,"span"),c(9,"Export"),l()()()()}}function pt(n,p){if(n&1){let e=S();a(0,"button",47),C("click",function(){d(e);let t=r(3);return _(t.openExportDialog())}),x(1,"i",46),a(2,"span"),c(3,"Export"),l()()}}function mt(n,p){if(n&1&&(a(0,"div"),h(1,st,3,0,"button",36)(2,ct,10,0,"div",37)(3,pt,4,0,"button",38),l()),n&2){let e=p.ngIf,o=r(2);s(),m("ngIf",o.productService.hasSelectionVariant(e)),s(),v(o.productService.hasSelectionVariant(e)?2:3)}}function dt(n,p){n&1&&(a(0,"div",48)(1,"span"),c(2," showing only different stock, please press next to populate more data "),l()())}function _t(n,p){if(n&1){let e=S();a(0,"th")(1,"input",49),T("ngModelChange",function(t){d(e);let i=r(3);return F(i.checkboxState,t)||(i.checkboxState=t),_(t)}),C("ngModelChange",function(){let t=d(e).ngIf,i=r(3);return _(i.onCheckboxStateChange(t))}),l()()}if(n&2){let e=r(3);s(),b("ngModel",e.checkboxState)}}function ut(n,p){if(n&1&&(D(0),h(1,_t,2,1,"th",5),g(2,"async"),P()),n&2){let e=r(2);s(),m("ngIf",y(2,1,e.products$))}}function ht(n,p){n&1&&(a(0,"th",33),c(1," Reserved "),l())}function Ct(n,p){if(n&1){let e=S();a(0,"input",65),T("ngModelChange",function(t){d(e);let i=r(4).$implicit;return F(i.selected,t)||(i.selected=t),_(t)}),C("ngModelChange",function(){d(e);let t=r(4).$implicit,i=r(2);return _(i.onCheckboxStateProduct(t))}),l()}if(n&2){let e=r(4).$implicit;b("ngModel",e.selected)}}function gt(n,p){if(n&1&&(D(0),a(1,"div",63),h(2,Ct,1,1,"input",64),l(),P()),n&2){let e=r(3).$implicit;s(),m("ngClass",E(2,at,e.Variants.length<=1)),s(),v(e.Variants.length>1?2:-1)}}function ft(n,p){if(n&1){let e=S();a(0,"img",66),C("click",function(t){d(e);let i=r(3).$implicit,u=r(2);return _(u.onZoomImage(t,i==null?null:i.ImageUrl))}),l()}if(n&2){let e=r(3).$implicit;ae("src",e==null?null:e.ThumbnailUrl,A)}}function xt(n,p){n&1&&x(0,"img",60)}function St(n,p){if(n&1&&(x(0,"br"),a(1,"div",67),x(2,"i",68),a(3,"small"),c(4),l()()),n&2){let e=r(3).$implicit;s(4),I("(",e==null?null:e.Category,")")}}function yt(n,p){if(n&1&&(a(0,"td",58)(1,"div",14),h(2,gt,3,4,"ng-container",27),a(3,"div"),h(4,ft,1,1,"img",59)(5,xt,1,0,"img",60),l()()(),a(6,"td",61)(7,"span",62),c(8),l(),h(9,St,5,1),l()),n&2){let e=r(2).$implicit,o=r(2);m("rowSpan",e==null?null:e.Variants.length),s(2),m("ngxPermissionsOnly",E(6,te,o.inventoryUpdateRole)),s(2),v(e!=null&&e.ThumbnailUrl?4:5),s(2),m("rowSpan",e==null?null:e.Variants.length),s(2),U(e==null?null:e.Name),s(),v(e.CategoryID!==null&&e.CategoryID!=o.guidEmpty?9:-1)}}function vt(n,p){if(n&1){let e=S();a(0,"input",49),T("ngModelChange",function(t){d(e);let i=r(3).$implicit;return F(i.selected,t)||(i.selected=t),_(t)}),l()}if(n&2){let e=r(3).$implicit;b("ngModel",e.selected)}}function It(n,p){if(n&1&&h(0,vt,1,1,"input",70),n&2){let e=r(2).$implicit;v((e==null?null:e.Inventory)<=1e5?0:-1)}}function wt(n,p){if(n&1){let e=S();a(0,"input",49),T("ngModelChange",function(t){d(e);let i=r(2).$implicit;return F(i.selected,t)||(i.selected=t),_(t)}),l()}if(n&2){let e=r(2).$implicit;b("ngModel",e.selected)}}function bt(n,p){if(n&1&&(D(0),a(1,"td",69),h(2,It,1,1)(3,wt,1,1,"input",70),l(),P()),n&2){let e=r().$implicit;s(2),v((e==null?null:e.Channel[0].TypeID)==1?2:(e==null?null:e.Inventory)>=0?3:-1)}}function Ft(n,p){n&1&&(a(0,"div",71),c(1," Not Found "),l())}function Tt(n,p){if(n&1&&(a(0,"div")(1,"span",72),c(2),g(3,"number"),l(),c(4," => "),a(5,"span",73),c(6),g(7,"number"),l()()),n&2){let e=r().$implicit;s(2),I(" ",y(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),U(y(7,4,e==null?null:e.Inventory))}}function Dt(n,p){if(n&1&&(c(0),g(1,"number")),n&2){let e=r().$implicit;I(" ",y(1,1,e==null?null:e.Inventory)," ")}}function Pt(n,p){if(n&1&&(D(0),a(1,"div",74)(2,"a",75),x(3,"i",76),l()(),P()),n&2){let e=r().$implicit,o=r(3);s(2),m("href",o.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),A)}}function Et(n,p){if(n&1){let e=S();a(0,"span",81),C("click",function(){d(e);let t=r(2).$implicit,i=r().$implicit,u=r(2);return _(u.openTableDialog(i,t))}),c(1),g(2,"number"),l()}if(n&2){let e=r(2).$implicit,o=r(3);oe(E(5,rt,o.hasInventoryEdit())),s(),I(" ",y(2,3,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function Mt(n,p){if(n&1){let e=S();a(0,"td",77)(1,"div",53)(2,"div"),h(3,Et,3,7,"span",78),g(4,"async"),l(),a(5,"div",74)(6,"a",75),x(7,"i",76),l()(),a(8,"div",74)(9,"span",79),C("click",function(){d(e);let t=r().$implicit,i=r(3);return _(i.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),x(10,"i",80),l()()()()}if(n&2){let e=r().$implicit,o=r(3);m("ngClass",E(5,lt,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),m("ngIf",y(4,3,o.products$)),s(3),m("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,A)}}function Vt(n,p){if(n&1&&(D(0),a(1,"span",82),c(2),g(3,"number"),l(),P()),n&2){let e=r(2).$implicit;s(2),I(" (",y(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function kt(n,p){n&1&&c(0," - ")}function Rt(n,p){if(n&1&&(D(0),a(1,"td",51),h(2,Vt,4,3,"ng-container",57)(3,kt,1,0,"ng-template",null,1,Z),l(),P()),n&2){let e=K(4),o=r().$implicit;s(2),m("ngIf",o==null||o.Channel[0]==null?null:o.Channel[0].InventoryReserved)("ngIfElse",e)}}function Lt(n,p){n&1&&(D(0),c(1," - "),P())}function Nt(n,p){if(n&1&&(a(0,"span",83),g(1,"date"),c(2),g(3,"date"),l()),n&2){let e=r().$implicit;m("matTooltip",R(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),I(" ",R(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function At(n,p){if(n&1&&(a(0,"tr"),h(1,yt,10,8),a(2,"td",50),c(3),l(),a(4,"td",51)(5,"span",52),c(6),l()(),h(7,bt,4,1,"ng-container",27),a(8,"td")(9,"div",53),h(10,Ft,2,0,"div",54)(11,Tt,8,6,"div")(12,Dt,2,3)(13,Pt,4,1,"ng-container",5),l()(),h(14,Mt,11,7,"td",55)(15,Rt,5,2,"ng-container",5),a(16,"td",56),h(17,Lt,2,0,"ng-container",57)(18,Nt,4,8,"ng-template",null,0,Z),l()()),n&2){let e=p.$implicit,o=p.$index,t=K(19),i=r(3);s(),v(o==0?1:-1),s(2),U(e==null?null:e.Model),s(2),m("matTooltip",e.Discontinued?i.discontinuedVariantMsg:"")("ngClass",E(14,ot,e.Discontinued)),s(),U(e==null?null:e.Code),s(),m("ngxPermissionsOnly",E(16,te,i.inventoryUpdateRole)),s(3),m("ngIf",(e==null?null:e.I)==null),s(),v((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?11:-1),s(),v((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?12:-1),s(),m("ngIf",(e==null?null:e.I)!=null),s(),m("ngIf",e==null?null:e.Channel),s(),m("ngIf",i.isShowReservedColumn),s(2),m("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==i.minDate)("ngIfElse",t)}}function Ut(n,p){if(n&1&&(a(0,"tbody"),G(1,At,20,18,"tr",null,H),l()),n&2){let e=p.$implicit;s(),Y(e.Variants)}}function Ot(n,p){if(n&1){let e=S();a(0,"mainpanel",3),C("onSubmit",function(t){d(e);let i=r();return _(i.onSearch(t))}),a(1,"actions")(2,"div",4),h(3,mt,4,2,"div",5),g(4,"async"),l()(),a(5,"filters")(6,"div")(7,"label",6),c(8,"Channel"),l(),a(9,"multiwarehouse-tree-select",7),C("onChannelChange",function(t){d(e);let i=r();return _(i.onChannelChange(t))}),l()(),a(10,"div",8)(11,"label",9),c(12,"PageNumber"),l(),a(13,"input",10),T("ngModelChange",function(t){d(e);let i=r();return F(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),_(t)}),l()(),a(14,"div",8)(15,"label",11),c(16,"Page Size"),l(),a(17,"input",12),T("ngModelChange",function(t){d(e);let i=r();return F(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),_(t)}),l()(),a(18,"div",8)(19,"label",13),c(20,"Quantity From - To"),l(),a(21,"div",14)(22,"input",15),T("ngModelChange",function(t){d(e);let i=r();return F(i.searchFilter.QuantityFrom,t)||(i.searchFilter.QuantityFrom=t),_(t)}),l(),c(23," - "),a(24,"input",16),T("ngModelChange",function(t){d(e);let i=r();return F(i.searchFilter.QuantityTo,t)||(i.searchFilter.QuantityTo=t),_(t)}),l()()()(),a(25,"content")(26,"div",17)(27,"div",18)(28,"div",19),h(29,dt,3,0,"div",20),a(30,"table",21),C("matSortChange",function(t){d(e);let i=r();return _(i.onSortVariant(t))}),a(31,"thead",22)(32,"tr")(33,"th",23),c(34," Product "),x(35,"br"),a(36,"mat-slide-toggle",24),C("toggleChange",function(){d(e);let t=r();return t.showDifferenceStock=!t.showDifferenceStock,_(t.onShowDifferenceStock())}),a(37,"small",13),c(38,"FILTER DIFFERENT INVENTORY"),l()()(),a(39,"th",25),c(40,"Variant"),l(),a(41,"th",26),c(42,"SKU"),l(),h(43,ut,3,3,"ng-container",27),a(44,"th",28),c(45," POS "),l(),a(46,"th",29)(47,"div",30),C("click",function(){d(e);let t=r();return _(t.openModalFilter())}),x(48,"img",31),a(49,"span",32),c(50),g(51,"stringLimit"),l()()(),h(52,ht,2,0,"th",33),a(53,"th",34),c(54,"Last Sync"),l()()(),G(55,Ut,3,0,"tbody",null,H),g(57,"async"),l(),a(58,"infinite-paginator",35),g(59,"async"),C("onNextPage",function(){d(e);let t=r();return _(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){d(e);let t=r();return _(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){d(e);let t=r();return _(t.infinitePagination.getRowCount(t.searchFilter))}),l()()()()()()}if(n&2){let e,o,t,i=r();m("headerTitle","Inventory Comparison")("pageData",i.pageData)("hideSearchBox",!1),s(3),m("ngIf",y(4,21,i.products$)),s(6),m("ngModel",(i.searchFilter==null?null:i.searchFilter.LocationID)||(i.searchFilter==null?null:i.searchFilter.ChannelID)),s(4),b("ngModel",i.searchFilter.PageNumber),s(4),b("ngModel",i.searchFilter.RowCount),s(5),b("ngModel",i.searchFilter.QuantityFrom),s(2),b("ngModel",i.searchFilter.QuantityTo),s(5),m("ngIf",(i.searchFilter==null?null:i.searchFilter.filterModel)==3),s(14),m("ngxPermissionsOnly",E(30,te,i.inventoryUpdateRole)),s(4),m("matTooltip",((e=i.channelIdentity())==null||e.label==null?null:e.label.length)>13?(e=i.channelIdentity())==null?null:e.label:""),s(),m("src",(o=i.channelIdentity())==null?null:o.img,A),s(2),I(" ",R(51,23,(t=i.channelIdentity())==null?null:t.label,13)," "),s(2),v(i.isShowReservedColumn?52:-1),s(3),Y(y(57,26,i.products$)),s(3),m("totalData",i.infinitePagination.totalData())("hideCount",i.infinitePagination.hideCount())("rowCount",y(59,28,i.infinitePagination.totalRowCount$))("pageNumber",i.infinitePagination.pageNumber())("disableNextButton",i.infinitePagination.disableNextButton())("goToLastPage",i.infinitePagination.isLastPage())}}var An=(()=>{class n{constructor(e,o,t,i,u,ne,qe,Xe){this.http=e,this.toastr=o,this.dialog=t,this.productService=i,this.authService=u,this.biggerPictureService=ne,this.inventoryService=qe,this.mainPanelService=Xe,this.infinitePagination=M(J),this.ngxPermissionsService=M(Ie),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=f.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=f.GuidEMpty,this.selectedChannel=k(null),this.channelIdentity=k({img:null,label:null}),this.inventoryUpdateRole=q.InventoryUpdate,this.hasInventoryEdit=k(!0),this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.initRoles(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe(z(e=>{this.checkShowReservedColumn(e)}),L(e=>(e=this.calculateAvailableStock(e),e)),N(1)),this.products$=this.sourceObs$}initRoles(){this.ngxPermissionsService.hasPermission(q.InventoryUpdate).then(e=>this.hasInventoryEdit.set(e))}calculateAvailableStock(e){return e.map(t=>(t.totalAvailable=t.Variants.reduce((i,u)=>(i+=u.I?.Available||0,i),0),t))}checkShowReservedColumn(e){let o=0,t;e.forEach(i=>{t=i.Variants.find(u=>f.IsNotEmpty(u?.Channel[0]?.InventoryReserved)),t&&(o+=1)}),this.isShowReservedColumn=o>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(N(1),z(e=>{this.searchFilter={RowCount:e.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:e.Filter.ChannelID,LocationID:e.Filter.LocationID},this.initReloadData(),this.showToastrMarketplaceInactive(!e.Filter.IsMarketplaceAppActive)}))}onChannelChange(e){let o=Object.assign({},e);this.selectedChannel.set(o),f.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let e=Object.assign({},this.selectedChannel());f.IsNotEmpty(e.parent)?(this.searchFilter.LocationID=e.id,this.searchFilter.ChannelID=e?.parent?.id,e.label=e?.parent?.label+" - "+e?.label,e.img=f.getChannelLogoByTypeId(e?.parent?.typeid)):(this.searchFilter.LocationID=null,e.img=f.getChannelLogoByTypeId(e?.typeid),this.searchFilter.ChannelID=e?.id,this.selectedChannel.set(e)),this.channelIdentity.update(()=>({img:e.img,label:e.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(e){e&&this.toastr.warning(`Automatic inventory sync disabled.
|
|
2
|
-
Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}onSearch(e){this.searchFilter.text=e,this.setChannelFilter(),this.initReloadData()}openModalFilter(){this.mainPanelService.openModalFilter()}onOpenDialogUpdateStockInfo(e){let o=this.productService.selectedVariantProduct(e);this.dialog.open(Ze,{data:{channelId:o[0]?.Channel[0]?.ChannelID,selectedProducts:o}}).afterClosed().pipe(Q(t=>t===!0)).subscribe(()=>{this.updateStock(o)})}updateStock(e){if(e.length>0){let o=this.searchFilter.LocationID,t=e.map(u=>ie({ChannelItemID:u?.Channel[0]?.ChannelItemID,ChannelVariationID:u?.Channel[0]?.ChannelVariationID,Inventory:u.Inventory},f.IsNotEmpty(o)&&{LocationID:o})),i={ListChannelID:[this.searchFilter.ChannelID],List:t};this.http.post(X.UpdateInventoryChannel,i).subscribe(u=>{this.initReloadData(),this.checkboxState=!1,this.handlingUpdateStock(u)})}}handlingUpdateStock(e){if(e[0]?.Response){let o=e[0]?.Response?.Fail_list,t=e[0]?.Response?.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",t,o)}else this.toastr.error(e[0]?.Exception,"Error")}refreshInventory(e,o,t,i){let u={ChannelItemID:e,ChannelVariationID:o,ChannelID:t,VariantID:i};this.http.post("/api/Inventory/RefreshInventoryChannel",u).subscribe(ne=>{this.toastr.success("Successfully updated","Success"),this.initReloadData()})}onCheckboxStateProduct(e){e.Variants=e.Variants.map(o=>(o.Inventory>=0&&(o.selected=e.selected),o))}onCheckboxStateChange(e){e=e.map(o=>(o.Variants=o.Variants.map(t=>(t.selected=this.checkboxState,t)),o))}openTableDialog(e,o){this.hasInventoryEdit()&&this.dialog.open(He,{data:{Name:e.Name,Variant:o,ChannelID:o?.Channel[0]?.ChannelID,Table:"inventory",ChannelItemID:e.ChannelItemID}}).afterClosed().pipe(Q(i=>f.IsNotEmpty(i))).subscribe(i=>{this.updateItemAfterDialog(i)})}updateItemAfterDialog(e){let o=e.InventoryMultiwarehouse[0]?.LocationID,t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:e?.Inventory,VariantID:e.ID,SKU:e?.Sku,LocationID:o};this.http.post(X.UpdateUpdateQuantityByItem,t).subscribe(i=>{this.searchFilter.PageNumber=1,this.initReloadData(),this.handlingUpdateStock([i])})}onScanInventory(e){let o=this.productService.selectedVariantProduct(e);this.inventoryService.refreshInventory(o).subscribe(()=>{this.initReloadData(),this.toastr.success("Inventory refreshed successfully","Success")})}openExportDialog(){this.dialog.open(ze,{data:{title:"Export Inventory Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,QuantityFrom:this.searchFilter.QuantityFrom,QuantityTo:this.searchFilter.QuantityTo,exportApi:"Inventory/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=ee.DIFFERENCE:this.searchFilter.filterModel=ee.ALL,this.initReloadData()}onZoomImage(e,o){this.biggerPictureService.openBiggerPicture(e,o)}onSortVariant(e){if(e.direction==""){this.products$=this.sourceObs$;return}this.products$=this.products$.pipe(L(o=>o.map(t=>(t.Variants=t.Variants.sort((i,u)=>f.compare(i.I?.Available,u.I?.Available,e.direction==="asc")),t)).sort((t,i)=>f.compare(t.totalAvailable,i.totalAvailable,e.direction==="asc"))))}static{this.\u0275fac=function(o){return new(o||n)(w(ve),w(ye),w(Ee),w($e),w(Fe),w(We),w(V),w(Le))}}static{this.\u0275cmp=O({type:n,selectors:[["app-single-channel-comparison"]],features:[B([J,V])],decls:2,vars:3,consts:[["SYNCDATE",""],["EMPTY_RESERVED",""],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"onSubmit","headerTitle","pageData","hideSearchBox"],[1,"d-flex"],[4,"ngIf"],["for","channelOptions",1,"fw-bold","mb-2"],["id","channelOptions",3,"onChannelChange","ngModel"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],["matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],[4,"ngxPermissionsOnly"],["scope","col","mat-sort-header","Available","arrowPosition","before",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-center",2,"width","145px"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["class","btn btn-outline-dark me-3","matTooltip","Fetch the latest stock directly from the channel",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary","shadow","rounded"],["matTooltip","Fetch the latest stock directly from the channel",1,"btn","btn-outline-dark","me-3",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-success","btn-sm","dropdown-toggle","border-start"],[1,"dropdown-menu","dropdown-menu-end","pointer"],["role","button",1,"dropdown-item","cursor-pointer","fs-5",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"text-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[3,"ngClass"],["type","checkbox",1,"me-3",3,"ngModel"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],["title","Stock Available"],["title","Inventory below minimum inventory"],[1,"ms-3"],["target","_blank",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"text-end",3,"ngClass"],[3,"class","click",4,"ngIf"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom","pt-1"],[3,"click"],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"]],template:function(o,t){o&1&&(h(0,Ot,60,32,"mainpanel",2),g(1,"async")),o&2&&m("ngIf",y(1,1,t.loader$))},dependencies:[j,pe,me,$,de,W,Ae,Ne,Te,Se,Ce,xe,he,ge,fe,Ge,Ye,be,we,Qe,je,Re,ke,Be,Ue,Oe,Ke],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]})}}return n})();export{An as SingleChannelComparisonComponent};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as ie,b as qe}from"./chunk-YZKPQRLO.js";import"./chunk-WW22F76D.js";import"./chunk-B5VBBEEN.js";import{a as Ue,b as Ge,c as je,e as Ke,f as He,g as Qe}from"./chunk-CIAZIJGR.js";import{e as We,k as Le,l as Ae,m as $e,n as ze,o as Ye}from"./chunk-L3FX4O3H.js";import"./chunk-G7R7LUW4.js";import{a as Oe,b as Ne,c as Re}from"./chunk-K5GEJ2GZ.js";import"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-E3ROEHBW.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import{a as Be}from"./chunk-YTL4RBBS.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-KALG6D6L.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import"./chunk-CMTBBXR5.js";import"./chunk-ZOKAF4JQ.js";import{g as be,h as ee}from"./chunk-ZKZ5DIIR.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import{a as Z}from"./chunk-OWQ3RWNF.js";import{b as De,e as Te}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.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{m as Fe,n as ke}from"./chunk-UGVEAL7H.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"./chunk-SWQXSJ7O.js";import{r as Me,s as Ve}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.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
|
-
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
|
-
${e} (${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)})
|
|
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}
|
|
5
|
-
`],encapsulation:2})}}return t})();export{Ui as DownloadV2Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as R,b as E,c as B}from"./chunk-K5GEJ2GZ.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-IHNN4Q2N.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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as F}from"./chunk-EPVCMYCI.js";import{e as B}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as $,n as H}from"./chunk-UGVEAL7H.js";import"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{E as I,H as M,J as R,f as w,j as y,k as b,n as T}from"./chunk-M2FCTYGU.js";import{$c as m,Gb as _,Gc as o,Ic as d,Mb as p,Yb as h,Z as v,ad as u,bd as S,dc as O,ea as E,ic as e,jc as t,kc as C,q as x,rb as a,uc as g,v as D,xb as c}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function N(n,s){if(n&1&&(e(0,"tr")(1,"td"),o(2),t(),e(3,"td"),o(4),t(),e(5,"td"),o(6),m(7,"date"),t(),e(8,"td"),o(9),m(10,"date"),t(),e(11,"td"),o(12),t()()),n&2){let i=s.$implicit;a(2),d(" ",i.Number," "),a(2),d(" ",i.Status," "),a(2),d(" ",S(7,5,i.Start,"HH:mm:ss:SSS")," "),a(3),d(" ",S(10,8,i.End,"HH:mm:ss:SSS")," "),a(3),d(" ",i.Exception," ")}}function P(n,s){if(n&1&&(e(0,"div",5)(1,"table",7)(2,"thead")(3,"tr",8)(4,"th",9),o(5,"Number"),t(),e(6,"th",10),o(7,"Status"),t(),e(8,"th",11),o(9,"Start Time"),t(),e(10,"th",11),o(11,"End Time"),t(),e(12,"th"),o(13,"Exception"),t()()(),e(14,"tbody"),p(15,N,13,11,"tr",12),m(16,"async"),t()()()),n&2){let i=g();a(15),h("ngForOf",u(16,1,i.orderDetails$))}}function L(n,s){n&1&&(e(0,"div",6),C(1,"app-empty-state"),t())}var V=(()=>{class n{constructor(i,r){this.route=i,this.httpService=r,this.orderDetails$=x([])}ngOnInit(){this.initOrderDetails()}initOrderDetails(){let i=this.route.snapshot?.queryParams;this.orderDetails$=this.httpService.post("/api/Orders/DownloadOrderLogsDetail",{ID:i.ID}).pipe(E(r=>{let l=r?.hits[0]?._source;this.headerTitle=`${l?.ChannelName} (${l?.DateRange})`}),D(r=>r?.hits[0]._source?.Detail),v(1))}static{this.\u0275fac=function(r){return new(r||n)(c(I),c(B))}}static{this.\u0275cmp=_({type:n,selectors:[["app-download-order-detail"]],decls:11,vars:7,consts:[[3,"headerTitle","description","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/Order/Download_Order_Log",1,"btn","btn-secondary","btn-fill","btn-lg","me-2"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"table-light"],[2,"width","200px"],[2,"width","150px"],[2,"width","100px"],[4,"ngFor","ngForOf"]],template:function(r,l){if(r&1&&(e(0,"mainpanel",0)(1,"actions")(2,"a",1),o(3,"Back"),t()(),e(4,"content")(5,"div",2)(6,"div",3)(7,"div",4),p(8,P,17,3,"div",5),m(9,"async"),p(10,L,2,0,"div",6),t()()()()()),r&2){let f;h("headerTitle",l.headerTitle)("description",l.headerTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),a(8),O(((f=u(9,5,l.orderDetails$))==null?null:f.length)>0?8:10)}},dependencies:[T,w,y,b,H,$,F,R,M],encapsulation:2})}}return n})();export{V as DownloadOrderDetailComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as rn}from"./chunk-OPFENZ3W.js";import{a as Ke}from"./chunk-H3IVI3LN.js";import{a as Le}from"./chunk-NXOXSOUJ.js";import"./chunk-MS4AQ6UA.js";import{a as Be,b as je}from"./chunk-W6FZQ6XT.js";import{a as an}from"./chunk-LDHQNVI5.js";import{a as Z}from"./chunk-EPVCMYCI.js";import{e as Pt}from"./chunk-GLZJR5RB.js";import"./chunk-35XX6SQT.js";import{d as He,k as Qe,l as Xe,m as tn,n as en,o as nn}from"./chunk-L3FX4O3H.js";import{a as Ht}from"./chunk-GCDQNJQN.js";import{a as Q}from"./chunk-R46PZJM7.js";import"./chunk-PE5AFID4.js";import{a as Gt,b as zt,c as We}from"./chunk-K5GEJ2GZ.js";import{b as ln}from"./chunk-B5V5KFQU.js";import{a as Ye,b as Ze}from"./chunk-E4Z7OR75.js";import{a as q}from"./chunk-Q6P7MEKT.js";import{a as pt}from"./chunk-CCWNSX4Y.js";import{c as Ge,f as ze}from"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import{b as on}from"./chunk-ZQ5EGXEB.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-YPWHTELF.js";import"./chunk-OLOIQI4D.js";import"./chunk-RECNBAEB.js";import"./chunk-IA6KOBDJ.js";import"./chunk-M5XGP4SG.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import{a as Y}from"./chunk-YTL4RBBS.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import{a as qe}from"./chunk-SYUFPF3D.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import{a as Wt}from"./chunk-CUB2QFUO.js";import{f as $e}from"./chunk-KALG6D6L.js";import{a as U}from"./chunk-UMP6ZMEJ.js";import"./chunk-PAEIUO2F.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as Re,b as Ae}from"./chunk-IMK2JGZA.js";import"./chunk-CMTBBXR5.js";import{a as dt}from"./chunk-7KG3DC5J.js";import"./chunk-ZOKAF4JQ.js";import{a as Je}from"./chunk-YERZ6W22.js";import{a as ot}from"./chunk-D6URDVES.js";import{h as K}from"./chunk-ZKZ5DIIR.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import{a as Oe}from"./chunk-OWQ3RWNF.js";import{b as z,e as H}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{a as xt,b as Bt,d as lt,e as Ee}from"./chunk-5JVEEL2T.js";import{b as I,c as f}from"./chunk-PW42BQIY.js";import{b as yt,c as vt,d as it,e as ke,f as Fe,g as Ve,h as Ne,i as jt,j as bt,k as $t,m as J,n as Ue}from"./chunk-UGVEAL7H.js";import{A as St,b as Me,c as ft,h as j,m as $}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{a as Te,b as nt,c as De}from"./chunk-SWQXSJ7O.js";import{r as ct,s as st}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{E as Lt,F as Pe,G as rt,H as Ie,J as we,d as Ut,f as B,g as N,j as gt,k as be,m as Ct,n as et}from"./chunk-M2FCTYGU.js";import{$c as k,Fc as W,G as F,Gb as T,Gc as p,Hb as Ce,Hc as A,Ic as b,Ka as Dt,Kb as fe,Kc as D,Lc as O,Mb as h,Mc as E,Ra as ut,Rc as Ot,Sc as w,Tc as oe,Vc as ye,Xb as te,Yb as l,Z as ue,Zb as Se,aa as Tt,ad as V,bd as ve,ca as Xt,cd as G,dc as R,ea as he,ec as ee,f as me,gc as ne,hc as ie,ic as o,jc as r,ka as _e,kc as g,lc as y,mc as v,ob as ge,oc as x,pa as tt,pb as M,rb as a,tc as C,uc as s,v as Rt,vc as xe,wc as At,xb as S,ya as m,za as u}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var cn=(()=>{class i{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"},{Title:"Scan Job",Url:"/menu/products/status/notification",Description:"Scan results for each channel, including product counts and synchronization status"}]}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=T({type:i,selectors:[["app-status"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"]],template:function(n,e){n&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),g(3,"nav-tab",2),r()()(),g(4,"router-outlet")),n&2&&(a(3),l("Tabs",e.productTabs))},dependencies:[Re,Pe],encapsulation:2})}}return i})();function xn(i,d){if(i&1&&(o(0,"div",10),g(1,"img",11),o(2,"span"),p(3),r()()),i&2){let t=d.$implicit;l("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),a(),l("src",t.Img,M),a(2),A(t.Name)}}function yn(i,d){if(i&1&&(o(0,"div",10),g(1,"img",11),o(2,"span"),p(3),r()()),i&2){let t=d.$implicit;l("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),a(),l("src",t.Img,M),a(2),A(t.Name)}}function vn(i,d){if(i&1&&(o(0,"div",10),g(1,"img",11),o(2,"span"),p(3),r()()),i&2){let t=d.$implicit;l("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),a(),l("src",t.Img,M),a(2),A(t.Name)}}function bn(i,d){if(i&1&&(o(0,"mat-radio-button",16),p(1," Sellable "),r()),i&2){let t=s(2);l("value",t.scanTypeEnum.Sellable)}}function Pn(i,d){if(i&1){let t=x();o(0,"div",12)(1,"label",13),p(2,"Scan Type"),r(),o(3,"mat-radio-group",14),E("ngModelChange",function(e){m(t);let c=s();return O(c.filter.ScanFull,e)||(c.filter.ScanFull=e),u(e)}),o(4,"mat-radio-button",15),p(5," All "),r(),h(6,bn,2,1,"mat-radio-button",16),o(7,"mat-radio-button",17),p(8," Active "),r()()()}if(i&2){let t=s();a(3),D("ngModel",t.filter.ScanFull),a(),l("value",t.scanTypeEnum.All),a(2),R(t.selectedChannel.TypeID==t.channelType.Tiktok?6:-1),a(),l("value",t.scanTypeEnum.Active)}}function In(i,d){i&1&&(o(0,"span"),p(1,"Never"),r())}function wn(i,d){if(i&1&&(o(0,"span"),p(1),k(2,"async"),r()),i&2){let t=s(2);a(),A(V(2,1,t.lastSync$))}}function Mn(i,d){if(i&1){let t=x();o(0,"div",8)(1,"label",5)(2,"span",18),p(3,"Last Scan:"),r(),h(4,In,2,0,"span"),k(5,"async"),h(6,wn,3,3,"span"),r(),o(7,"mat-radio-group",19),E("ngModelChange",function(e){m(t);let c=s();return O(c.filter.UpdatedProduct,e)||(c.filter.UpdatedProduct=e),u(e)}),o(8,"mat-radio-button",20),p(9," Scan All Products "),r(),o(10,"mat-radio-button",21),p(11),r()()()}if(i&2){let t=s();a(4),R(V(5,6,t.lastSync$)==null?4:6),a(3),D("ngModel",t.filter.UpdatedProduct),a(),l("value",!1),a(2),l("value",!0)("matTooltip",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Use Tokopedia URL for mapping SKU between POS and Tokopedia":"Scan only products that have been updated since the last channel scan"),a(),b(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function Tn(i,d){if(i&1){let t=x();o(0,"div",8)(1,"label",5),p(2," Scan Option "),r(),o(3,"mat-radio-group",22),E("ngModelChange",function(e){m(t);let c=s();return O(c.filter.Async,e)||(c.filter.Async=e),u(e)}),o(4,"mat-radio-button",23),p(5," Asynchronous (Get Notified when Complete) "),r(),o(6,"mat-radio-button",24),p(7," Synchronous (Wait until Complete) "),r()()()}if(i&2){let t=s();a(3),D("ngModel",t.filter.Async),a(),l("value",!0),a(2),l("value",!1)}}var L=(()=>{class i extends Ke{constructor(t,n,e){super(),this.dialogRef=t,this.data=n,this.router=e,this.channelService=tt(Le),this.channelType=I,this.disabledChannelOption=!1,this.filter={ChannelID:f.GuidEMpty,ScanFull:0,UpdatedProduct:!1,Async:!1},this.scanTypeEnum=Je,this.isSingleChannel=f.IsNotEmpty(n.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=f.IsEmpty(n.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}ngAfterViewInit(){this.initTopPosition()}ngOnDestroy(){this.stopOverlayObserver()}initModalConfig(){this.modalConfig=new bt,this.modalConfig.title=this.isSingleChannel?"Scan Single Product":"Scan Channel Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(t=>(t.disabled=!0,(t.TypeID==I.Tiktok||t.TypeID==I.Tokopedia||t.TypeID==I.Lazada||t.TypeID==I.WooCommerce)&&(t.disabled=!1),t)).sort(t=>t.disabled?1:-1))}onSelectChannel(t){let n=this.filterChannelById(t);this.selectedChannel=n,this.filter.Async=!0,this.iniHasScanUpdate(),this.getLastSync(t)}onClickSelect(){setTimeout(()=>{this.adjustOverlayPosition()},0)}getLastSync(t){this.lastSync$=this.channelService.getLastSync(t).pipe(Rt(n=>(this.selectedChannel.LastSync=n.LastSync,this.setDefaultConfigUpdate(),f.IsNotEmpty(n.LastSync)?f.convertToReadableDate(n.LastSync):null)),ue(1))}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&f.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==I.Shopee||this.selectedChannel.TypeID==I.Tiktok||this.selectedChannel.TypeID==I.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=I.WooCommerce&&this.selectedChannel?.TypeID!=I.KalCare&&this.selectedChannel?.TypeID!=I.None&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(t){let n;return this.channelOptions&&(n=this.channelOptions.find(e=>e.ID==t)),n}submit(){this.selectedChannel.TypeID==I.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):this.dialogRef.close(this.filter)}isNotEmpty(t){return f.IsNotEmpty(t)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(n){return new(n||i)(S(yt),S(vt),S(rt))}}static{this.\u0275cmp=T({type:i,selectors:[["app-scan-dialog"]],features:[fe],decls:15,vars:8,consts:[["selectedItem",""],["item",""],[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["optionLabel","Name","optionValue","ID","placeholder","Select a Channel","appendTo","body","filterBy","Name",1,"w-100",2,"--p-select-padding-y","0.75rem",3,"click","ngModelChange","options","ngModel","filter"],["class","mt-4",4,"ngIf"],[1,"mt-8"],["class","mt-8",4,"ngIf"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mt-4"],[1,"mb-2","fw-bold","mt-3"],["name","scanType",1,"form-control","h-100","rounded-1",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scans all products across every status in seller center",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scans products with status Active, Pending, Seller Deactivated, and Unknown status in seller center",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan Product with Active status in seller center",1,"me-5",3,"value"],[1,"me-2"],["name","ScanFull",1,"form-control","h-100","rounded-1",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above",1,"me-5",3,"value","matTooltip"],["name","Async",1,"form-control","h-100","rounded-1",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(n,e){if(n&1){let c=x();o(0,"modal-material",2),C("onOk",function(){return m(c),u(e.submit())})("onClose",function(){return m(c),u(e.onClose())})("onCancel",function(){return m(c),u(e.onClose())}),o(1,"div",3)(2,"div",4)(3,"label",5),p(4,"Select a Channel"),r(),o(5,"p-select",6),C("click",function(){return m(c),u(e.onClickSelect())}),E("ngModelChange",function(P){return m(c),O(e.filter.ChannelID,P)||(e.filter.ChannelID=P),u(P)}),C("ngModelChange",function(P){return m(c),u(e.onSelectChannel(P))}),h(6,xn,4,3,"ng-template",null,0,G)(8,yn,4,3,"ng-template",null,1,G)(10,vn,4,3,"ng-template",null,1,G),r(),h(12,Pn,9,4,"div",7)(13,Mn,12,8,"div",8)(14,Tn,8,3,"div",9),r()()()}n&2&&(l("dynamicValidated",e.isNotEmpty(e.filter.ChannelID))("config",e.modalConfig),a(5),l("options",e.channelOptions),D("ngModel",e.filter.ChannelID),l("filter",!0),a(7),l("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)),a(),R(e.hasScanUpdate&&e.selectedChannel?13:-1),a(),l("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)))},dependencies:[et,N,gt,je,Be,St,j,$,$t,Wt,zt,st,ct,ze,Gt],encapsulation:2})}}return i})();var _t=function(i){return i.Tokopedia="https://seller.tokopedia.com",i.Shoope="https://seller.shopee.co.id",i.Tiktok="https://seller-id.tiktok.com",i.WooCommerce="https://woocommerce.dealpos.app",i.Lazada="https://sellercenter.lazada.co.id",i}(_t||{});var re={Success:"Success",Info:"Info",Warning:"Warning",Error:"Error"};var Dn=[[["header"]],[["content"]],[["footer"]]],On=["header","content","footer"],En=(i,d)=>({bodyScrollable:i,hideScrollbar:d}),kn=(i,d,t,n)=>({"bg-success":i,"bg-warning":d,"bg-info":t,"bg-danger":n}),Fn=i=>({"mx-auto":i}),Vn=(i,d)=>({"show-footer":i,"p-0":d});function Nn(i,d){if(i&1){let t=x();o(0,"div",8),C("click",function(){m(t);let e=s();return u(e.onBack.emit())}),o(1,"a",9),g(2,"i",10),r()()}}function Rn(i,d){if(i&1){let t=x();o(0,"div")(1,"a",11),C("click",function(){m(t);let e=s();return u(e.onClose.emit())}),g(2,"i",12),r()()}}function An(i,d){if(i&1){let t=x();o(0,"a",16),C("click",function(){m(t);let e=s(2);return u(e.onCancel.emit())}),p(1),r()}if(i&2){let t=s(2);a(),b(" ",t.config!=null&&t.config.cancelText?t.config==null?null:t.config.cancelText:"Cancel","")}}function Un(i,d){if(i&1){let t=x();o(0,"button",17),C("click",function(){m(t);let e=s(2);return u(e.onOk.emit())})("keyup.F2",function(){m(t);let e=s(2);return u(e.onOk.emit())}),r()}if(i&2){let t=s(2);l("disabled",!(t.config!=null&&t.config.validated)||!t.dynamicValidated)("innerHTML",t.config!=null&&t.config.okText?t.config==null?null:t.config.okText:"Ok (F2)",ge)}}function Ln(i,d){if(i&1&&(o(0,"mat-dialog-actions",13),At(1,2),h(2,An,2,1,"a",14)(3,Un,1,2,"button",15),r()),i&2){let t=s();a(2),l("ngIf",!(t.config!=null&&t.config.hideCancel)),a(),l("ngIf",!(t.config!=null&&t.config.hideOk))}}var le=class{constructor(){this.title="New Modal",this.okText="Ok (F2)",this.cancelText="Cancel",this.hideFooter=!1,this.hideCancel=!1,this.hideOk=!1,this.hideClose=!1,this.eMoney=!1,this.headerType=re.Success,this.validated=!0,this.customWidth="initial",this.bodyScrollable=!1,this.hideScrollbar=!1,this.disableKeyup=!1,this.noPadding=!1}},sn=(()=>{class i{constructor(){this.dynamicValidated=!0,this.onOk=new Dt,this.onCancel=new Dt,this.onClose=new Dt,this.onBack=new Dt,this.headerType=re}ngOnInit(){this.config==null&&(this.config=new le)}onKeyup(t){this.config?.disableKeyup||(t.code=="F2"&&this.onOk.emit("F2"),(t.code=="Enter"||t.code=="NumpadEnter")&&this.onOk.emit("Enter"))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=T({type:i,selectors:[["modal-material"]],inputs:{config:"config",dynamicValidated:"dynamicValidated"},outputs:{onOk:"onOk",onCancel:"onCancel",onClose:"onClose",onBack:"onBack"},ngContentSelectors:On,decls:11,vars:23,consts:[["id","modal_material",1,"modal-material","d-flex","align-items-start","flex-column","position-relative","maxHeight",3,"keyup","ngClass"],["mat-dialog-title","",1,"d-flex","w-100","justify-content-between","modal-header","position-relative",3,"ngClass"],["class","back-button position-absolute pointer d-print-none",3,"click",4,"ngIf"],[1,"d-flex","flex-row","d-print-none","align-items-center",3,"ngClass"],[1,"fw-normal"],[4,"ngIf"],[1,"modal-body","w-100",3,"ngClass"],["class","w-100 py-7 border-top d-flex justify-content-end d-print-none",4,"ngIf"],[1,"back-button","position-absolute","pointer","d-print-none",3,"click"],[1,"btn","back-button"],[1,"fa-solid","fa-arrow-left"],[1,"btn-light-blue","btn-sm","pointer","close",3,"click"],[1,"fa-solid","fa-xmark","fa-lg","text-primary"],[1,"w-100","py-7","border-top","d-flex","justify-content-end","d-print-none"],["class","btn btn-light-blue text-primary btn-lg fw-bold mx-3",3,"click",4,"ngIf"],["class","btn btn-light-blue me-6 text-primary btn-lg fw-bold mx-3","data-cy","btn-ok",3,"disabled","innerHTML","click","keyup.F2",4,"ngIf"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],["data-cy","btn-ok",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click","keyup.F2","disabled","innerHTML"]],template:function(n,e){n&1&&(xe(Dn),o(0,"div",0),C("keyup",function(_){return e.onKeyup(_)}),o(1,"div",1),h(2,Nn,3,0,"div",2),o(3,"div",3)(4,"h4",4),p(5),r(),At(6),r(),h(7,Rn,3,0,"div",5),r(),o(8,"mat-dialog-content",6),At(9,1),r(),h(10,Ln,4,2,"mat-dialog-actions",7),r()),n&2&&(Se("width",e.config==null?null:e.config.customWidth),l("ngClass",oe(10,En,e.config==null?null:e.config.bodyScrollable,e.config==null?null:e.config.hideScrollbar)),a(),l("ngClass",ye(13,kn,e.headerType.Success==(e.config==null?null:e.config.headerType),e.headerType.Warning==(e.config==null?null:e.config.headerType),e.headerType.Info==(e.config==null?null:e.config.headerType),e.headerType.Error==(e.config==null?null:e.config.headerType))),a(),l("ngIf",e.config==null?null:e.config.eMoney),a(),l("ngClass",w(18,Fn,e.config==null?null:e.config.eMoney)),a(2),A(e.config==null?null:e.config.title),a(2),l("ngIf",!(e.config!=null&&e.config.hideClose)),a(),l("ngClass",oe(20,Vn,!(e.config!=null&&e.config.hideFooter),e.config==null?null:e.config.noPadding)),a(2),l("ngIf",!(e.config!=null&&e.config.hideFooter)))},dependencies:[et,Ut,N,Ne,ke,Ve,Fe],styles:[".mat-mdc-dialog-container{padding:0!important;border-radius:4px!important;overflow:visible!important} .mat-mdc-dialog-container [mat-dialog-title]{color:#fff;padding:15px;border:none}@media print{ .mat-mdc-dialog-container{box-shadow:unset;width:100vw}}@media print{ .cdk-overlay-pane{position:absolute!important;top:-30px;max-width:100vw!important}.modal-body[_ngcontent-%COMP%]{width:100vw!important}}body.modal-body[_ngcontent-%COMP%]{height:100%;overflow-y:hidden}mat-dialog-actions[_ngcontent-%COMP%]{bottom:15px}mat-dialog-actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:15px!important;margin-right:12px}mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:15px!important}mat-dialog-actions[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin-right:auto;margin-top:-1rem;padding-top:.4rem!important;margin-left:1rem}.back-button[_ngcontent-%COMP%]{top:5px;left:0}.close[_ngcontent-%COMP%]{padding:.4rem .5rem}.no-padding[_ngcontent-%COMP%]{padding:0}.modal-material[_ngcontent-%COMP%]{width:40vw}@media (max-width: 992px){.modal-material[_ngcontent-%COMP%]{width:50vw!important}}@media (max-width: 576px){ .dialog-filter .modal-material{width:100%!important} .dialog-filter mat-dialog-actions{position:sticky;bottom:0;background:#fff} .dialog-filter .modal-material.d-flex.align-items-start.flex-column.position-relative.maxHeight.bodyScrollable.maxHeight.bodyScrollable .modal-body{max-height:100%!important;overflow-y:auto}}.maxHeight.bodyScrollable[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow-y:auto}.modal-header[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:15px}.modal-dialog[_ngcontent-%COMP%]{max-width:none}.modal-content[_ngcontent-%COMP%]{width:auto;margin:auto;max-width:850px}.maxHeight[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow:auto}.modal-body[_ngcontent-%COMP%]{padding:1rem}.modal-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block}.modal-body[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin:0;position:absolute;bottom:-20px}.modal-body[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]{border:1px solid #c8d3df;padding:5px 7px}.modal-body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:330px;height:90px}"]})}}return i})();var Bn=i=>({"is-disabled":i});function jn(i,d){if(i&1&&(y(0),o(1,"tr")(2,"td",10),p(3),r(),o(4,"td",10),p(5),r(),o(6,"td",11)(7,"p",12),p(8,"Product Not in Channel!"),r()()(),v()),i&2){let t=s().$implicit;a(3),b(" ",t==null?null:t.Model," "),a(2),b(" ",t==null?null:t.Code," ")}}function $n(i,d){if(i&1&&(o(0,"td",10),p(1),r()),i&2){let t=s(3).$implicit;te("rowspan",t.Channel.length),a(),b(" ",t==null?null:t.Model," ")}}function Wn(i,d){if(i&1&&(o(0,"td",10),p(1),r()),i&2){let t=s(3).$implicit;te("rowspan",t.Channel.length),a(),b(" ",t==null?null:t.Code," ")}}function Gn(i,d){if(i&1){let t=x();o(0,"tr"),h(1,$n,2,2,"td",13)(2,Wn,2,2,"td",13),o(3,"td",10)(4,"div",14)(5,"a",15),g(6,"img",16),r(),o(7,"div",17),p(8),r()()(),o(9,"td",10),p(10),k(11,"number"),r(),o(12,"td",18),p(13),k(14,"number"),r(),o(15,"td",19)(16,"div",20)(17,"button",21),C("click",function(){let e=m(t).$implicit,c=s(2).$implicit,_=s();return u(_.onDetach(e,c))}),g(18,"i",22),o(19,"span",23),p(20,"Detach"),r()(),o(21,"a",24),g(22,"i",25),o(23,"span",23),p(24,"Edit"),r()()()()()}if(i&2){let t=d.$implicit,n=d.$index,e=s(3);a(),l("ngIf",n==0),a(),l("ngIf",n==0),a(3),l("href",t.Url,M)("title",t.Title),a(),l("src",e.getChannelLogo(t.TypeID),M),a(),l("matTooltip",(t==null||t.Name==null?null:t.Name.length)>40?t==null?null:t.Name:""),a(),b(" ",t.Name," "),a(2),A(V(11,12,t.Price)),a(3),A(V(14,14,t.Inventory)),a(8),l("href",e.getHyperlinkSellerCenter(t),M)("ngClass",w(16,Bn,t.TypeID==e.channelType.KalCare))("matTooltip",t.TypeID!=e.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function zn(i,d){if(i&1&&ne(0,Gn,25,18,"tr",null,ee),i&2){let t=s().$implicit;ie(t==null?null:t.Channel)}}function Hn(i,d){if(i&1&&h(0,jn,9,2,"ng-container",9)(1,zn,2,0,"ng-template",null,0,G),i&2){let t=d.$implicit,n=W(2);l("ngIf",!t.Channel||t.Channel.length<1)("ngIfElse",n)}}var Kt=(()=>{class i{constructor(t,n){this.data=t,this.dialogRef=n,this.httpService=tt(H),this.toastr=tt(z),this.variants=ut([]),this.channelType=I,this.variants.set(this.data.variants),this.title=t.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new bt,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideFooter=!0,this.modalConfig.customWidth="850px"}onDetach(t,n){let e={ChannelID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariationID:t.ChannelVariationID};this.httpService.post(Oe.DetachVariant,[e]).subscribe(c=>{this.toastr.success(c.Message,"Success"),this.updateVariantAfterDetach(n,t.ChannelVariationID)})}updateVariantAfterDetach(t,n){this.variants.update(e=>{let c=e.findIndex(_=>_.ID===t.ID);return c!==-1&&(e[c].Channel=e[c].Channel.filter(_=>_.ChannelVariationID!==n)),[...e]})}getChannelLogo(t){return f.getChannelLogoByTypeId(t)}getHyperlinkSellerCenter(t){let n="javascript:void(0)";switch(t.TypeID){case I.Shopee:n=`${_t.Shoope}/portal/product/${t.ChannelItemID}`;break;case I.Tiktok:n=`${_t.Tiktok}/product/edit/${t.ChannelItemID}`;break;case I.Tokopedia:n=`${_t.Tokopedia}/edit-product/${t.ChannelItemID}`;break;case I.WooCommerce:n=`${_t.WooCommerce}/wp-admin/post.php?post=${t.ChannelItemID}&action=edit`;break;case I.Lazada:n=`${_t.Lazada}/apps/product/publish?productId=${t.ChannelItemID}`;break}return n}static{this.\u0275fac=function(n){return new(n||i)(S(vt),S(yt))}}static{this.\u0275cmp=T({type:i,selectors:[["app-modal-variant"]],decls:27,vars:1,consts:[["printChannelModal",""],[3,"onClose","onCancel","config"],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],[1,"d-flex","align-items-center"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[4,"ngIf","ngIfElse"],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],["class","text-start",4,"ngIf"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],[1,"text-end"],[1,"d-flex","align-items-center","justify-content-end"],[1,"btn","btn-small","btn-light","px-4","py-2","me-3",3,"click"],[1,"fa-sharp","fa-link-slash","me-2",2,"font-size","10px"],[1,"fs-6"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-edit","me-2",2,"font-size","10px"]],template:function(n,e){n&1&&(o(0,"modal-material",1),C("onClose",function(){return e.dialogRef.close()})("onCancel",function(){return e.dialogRef.close()}),o(1,"content")(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4)(6,"div",5)(7,"span"),p(8,"VARIANT"),r(),o(9,"sup"),g(10,"i",6),r()()(),o(11,"th",4),p(12,"SKU"),r(),o(13,"th",4)(14,"div",5)(15,"span"),p(16,"PRODUCT"),r(),o(17,"sup"),g(18,"i",7),r()()(),o(19,"th",4),p(20,"PRICE"),r(),o(21,"th",8),p(22,"INVENTORY"),r(),g(23,"th",4),r()(),o(24,"tbody"),ne(25,Hn,3,2,null,null,ee),r()()()()),n&2&&(l("config",e.modalConfig),a(25),ie(e.variants()))},dependencies:[et,Ut,N,Ct,st,ct,sn],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"]})}}return i})();function Kn(i,d){if(i&1&&(o(0,"mat-option",6)(1,"div"),g(2,"img",7),o(3,"span"),p(4),r()()()),i&2){let t=d.$implicit;l("value",t.ChannelID),a(2),l("src",t.logo,M),a(2),A(t.Title)}}var Mt=(()=>{class i{constructor(){this.dialogRef=tt(yt),this.channels=tt(vt),this.channelIds=ut([]),this.channelOptions=ut([])}ngOnInit(){this.initModalConfig();let t=this.channels.filter((n,e,c)=>c.findIndex(_=>_.ChannelID===n.ChannelID)===e);this.channelOptions.set(t)}initModalConfig(){this.modalConfig=new bt,this.modalConfig.title="Detach Product",this.modalConfig.okText="Save"}onClose(){this.dialogRef.close()}onSave(){let t=this.channels.filter(n=>this.channelIds().includes(n.ChannelID)).map(n=>({ChannelID:n.ChannelID,ChannelItemID:n.ChannelItemID}));this.dialogRef.close(t)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=T({type:i,selectors:[["app-modal-detach-product"]],decls:8,vars:5,consts:[[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"ngModelChange","ngModel","multiple"],["class","channel-option",3,"value",4,"ngFor","ngForOf"],[1,"channel-option",3,"value"],[2,"width","18px","margin-right","10px",3,"src"]],template:function(n,e){n&1&&(o(0,"modal-material",0),C("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSave()}),o(1,"div",1)(2,"div")(3,"label",2),p(4,"Select a Channel"),r(),o(5,"mat-form-field",3)(6,"mat-select",4),E("ngModelChange",function(_){return O(e.channelIds,_)||(e.channelIds=_),_}),h(7,Kn,5,3,"mat-option",5),r()()()()()),n&2&&(l("dynamicValidated",e.channelIds().length>0)("config",e.modalConfig),a(6),D("ngModel",e.channelIds),l("multiple",!0),a(),l("ngForOf",e.channelOptions()))},dependencies:[et,B,$t,Wt,$e,Ze,Ye,Ge,St,j,$,st],encapsulation:2})}}return i})();var Jt=i=>[i];function Jn(i,d){if(i&1){let t=x();o(0,"button",14),C("click",function(){m(t);let e=s(2);return u(e.onDetachMultipleProduct())}),g(1,"i",15),p(2),r()}if(i&2){let t,n=s(2);a(2),b("Detach (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function Yn(i,d){if(i&1&&(y(0),h(1,Jn,3,1,"button",13),v()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)?1:-1)}}function Zn(i,d){if(i&1){let t=x();o(0,"button",18),C("click",function(){m(t);let e=s(3);return u(e.onOpenScanDialog())}),g(1,"i",19),p(2," Scan Channel "),r()}}function qn(i,d){if(i&1&&h(0,Zn,3,0,"button",17),i&2){let t=s(2);l("ngIf",!t.productService.hasSelection(t.products))}}function Qn(i,d){if(i&1&&(y(0),h(1,qn,1,1,"button",16),v()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)?-1:1)}}function Xn(i,d){if(i&1){let t=x();o(0,"button",21),C("click",function(){m(t);let e=s(2);return u(e.onScanMultipleProduct())}),g(1,"i",19),p(2),r()}if(i&2){let t,n=s(2);a(2),b(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function ti(i,d){if(i&1&&(y(0),h(1,Xn,3,1,"button",20),v()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)&&t.multipeScanChannels.length>0?1:-1)}}function ei(i,d){if(i&1){let t=x();o(0,"button",23),C("click",function(){m(t);let e=s(2);return u(e.onUploadMultipleProduct())}),g(1,"i",24),p(2),r()}if(i&2){let t,n=s(2);a(2),b(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function ni(i,d){if(i&1&&(y(0),h(1,ei,3,1,"button",22),v()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)?1:-1)}}function ii(i,d){if(i&1){let t=x();o(0,"div",25)(1,"app-product-card",26),C("onUpload",function(){let e=m(t).$implicit,c=s();return u(c.onUploadToMultipleChannel(e))})("onScan",function(){let e=m(t).$implicit,c=s();return u(c.onScanSingleProduct(e))})("onDescEvent",function(){let e=m(t).index,c=s();return u(c.onOpenDialogVariant(e))})("onCheckBoxChange",function(e){let c=m(t).$implicit;return u(c.selected=e)})("onDetach",function(){let e=m(t).$implicit,c=s();return u(c.onDetachProduct([e]))}),r()()}if(i&2){let t=d.$implicit,n=s();a(),l("productId",t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",n.productService.getChannelProduct(t))("code",n.getVariantCode(t==null?null:t.Variants))("showCheckBox",(t==null?null:t.Channel.length)<n.channelOptions.length)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function oi(i,d){i&1&&(y(0),o(1,"div",27),g(2,"app-empty-state"),r(),v())}function ai(i,d){if(i&1){let t=x();y(0),o(1,"div",28)(2,"div",29)(3,"app-custom-paginator",30),C("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),r()()(),v()}if(i&2){let t=s();a(3),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}var mn=(()=>{class i{constructor(t,n,e,c,_,P,mt){this.http=t,this.toastr=n,this.dialog=e,this.productService=c,this.authService=_,this.uploadProductService=P,this.route=mt,this.searchFilter=new dt,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.scanProductRole=U.ProductScan,this.uploadProductRole=U.ProductUpload,this.detachProductRole=U.ProductDetach,this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok])}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(n=>{this.products=n.Data,this.rowCount=n.Total==null?this.searchFilter.RowCount:n.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(L,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.Async=e.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,n,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){let n=this.products[t]?.Variants||[];this.dialog.open(Kt,{data:{title:this.products[t].Name,variants:n}})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok]);this.dialog.open(L,{data:{filter:t,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(c=>f.IsNotEmpty(c))).subscribe(c=>{this.searchFilter.ChannelID=c.ChannelID,this.searchFilter.ScanFull=c.ScanFull,this.searchFilter.UpdatedProduct=c.UpdatedProduct;let _=this.productService.selectedProduct(this.products),P=this.productService.getVariantCodesProducts(_);this.scanSingleProduct(P)})}onScanSingleProduct(t){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=f.GuidEMpty,this.dialog.open(L,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID;let c=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(c)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${e?.Name} `,"Error")}this.searchFilter.ChannelID=f.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=f.GuidEMpty}})}getVariantCode(t=[]){let n;return t?.length>1&&(n=(t[0].model?t[0].model:"")+t[0].Code),t?.length==1&&(n=t[0].Code),n}onDetachProduct(t){let n=[];t.forEach(e=>{e.Channel=f.assignChannelLogo(e.Channel),n.push(...e.Channel)}),this.dialog.open(Mt,{width:"600px",data:[...n]}).afterClosed().pipe(F(e=>f.IsNotEmpty(e)),Tt(e=>this.productService.detachProduct(e))).subscribe(e=>{this.toastr.success(e.Message,jt.Success),this.getProducts()})}onDetachMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.onDetachProduct(t)}static{this.\u0275fac=function(n){return new(n||i)(S(H),S(z),S(it),S(Y),S(K),S(Pt),S(rt))}}static{this.\u0275cmp=T({type:i,selectors:[["app-in-pos"]],standalone:!1,decls:23,vars:22,consts:[["picker",""],["description","All products which is already available in POS",3,"onSubmit","headerTitle"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"mt-5"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"]],template:function(n,e){if(n&1){let c=x();o(0,"mainpanel",1),C("onSubmit",function(P){return m(c),u(e.searchProduct(P))}),o(1,"actions"),h(2,Yn,2,1,"ng-container",2)(3,Qn,2,1,"ng-container",2)(4,ti,2,1,"ng-container",2)(5,ni,2,1,"ng-container",2),r(),o(6,"filters")(7,"div")(8,"label",3),p(9,"Category"),r(),o(10,"ng-select",4),C("ngModelChange",function(P){return m(c),u(e.searchFilter.Category=P)}),r()(),o(11,"div",5)(12,"mat-date-range-input",6)(13,"input",7),E("ngModelChange",function(P){return m(c),O(e.startDate,P)||(e.startDate=P),u(P)}),C("click",function(){m(c);let P=W(16);return u(P.open())}),r(),o(14,"input",8),E("ngModelChange",function(P){return m(c),O(e.endDate,P)||(e.endDate=P),u(P)}),C("click",function(){m(c);let P=W(16);return u(P.open())}),r()(),g(15,"mat-date-range-picker",null,0),r()(),o(17,"content")(18,"div",9)(19,"div",10),h(20,ii,2,11,"div",11)(21,oi,3,0,"ng-container",12),r(),h(22,ai,4,5,"ng-container",12),r()()()}if(n&2){let c=W(16);l("headerTitle","In POS ("+e.rowCount+")"),a(2),l("ngxPermissionsOnly",w(14,Jt,e.detachProductRole)),a(),l("ngxPermissionsOnly",w(16,Jt,e.scanProductRole)),a(),l("ngxPermissionsOnly",w(18,Jt,e.scanProductRole)),a(),l("ngxPermissionsOnly",w(20,Jt,e.scanProductRole)),a(5),l("clearable",!0)("items",e.Categories)("ngModel",e.searchFilter.Category),a(2),l("rangePicker",c),a(),D("ngModel",e.startDate),a(),D("ngModel",e.endDate),a(6),l("ngForOf",e.products),a(),l("ngIf",e.products.length==0),a(),l("ngIf",e.products.length>0)}},dependencies:[B,N,ft,j,$,J,lt,ot,pt,Z,Qe,Xe,tn,en,nt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]})}}return i})();var de=i=>[i];function ri(i,d){if(i&1){let t=x();o(0,"button",12),C("click",function(){m(t);let e=s(2);return u(e.onDetachMultipleProduct())}),g(1,"i",13),p(2),r()}if(i&2){let t,n=s(2);a(2),b("Detach (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function li(i,d){if(i&1&&(y(0),h(1,ri,3,1,"button",11),v()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)?1:-1)}}function ci(i,d){if(i&1){let t=x();o(0,"div",14)(1,"button",16),C("click",function(){m(t);let e=s(2);return u(e.onScanAllProducts())}),g(2,"i",17),p(3," Scan Channel "),r(),g(4,"button",18),o(5,"ul",19)(6,"li")(7,"a",20),C("click",function(){m(t);let e=s(2);return u(e.onScanAllV2Products())}),g(8,"i",17),p(9," Scan Channel V2 "),r()()()()}}function si(i,d){if(i&1){let t=x();o(0,"button",21),C("click",function(){m(t);let e=s(2);return u(e.onScanMultipleProduct())}),g(1,"i",17),p(2),r()}if(i&2){let t=s(2);a(2),b(" Scan (",t.productService.selectedProduct(t.products).length,") ")}}function di(i,d){if(i&1&&(y(0),h(1,ci,10,0,"div",14)(2,si,3,1,"button",15),v()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)?t.multipeScanChannels.length>0&&t.productService.hasSelection(t.products)?2:-1:1)}}function pi(i,d){if(i&1){let t=x();o(0,"button",23),C("click",function(){m(t);let e=s(2);return u(e.onUploadMultipleProduct())}),g(1,"i",24),p(2),r()}if(i&2){let t=s(2);a(2),b(" Upload (",t.productService.selectedProduct(t.products).length,") ")}}function mi(i,d){if(i&1&&(y(0),h(1,pi,3,1,"button",22),v()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)?1:-1)}}function ui(i,d){if(i&1&&(o(0,"span",25),g(1,"img",26),r(),p(2)),i&2){let t=d.item;a(),l("src",t.Img,M)("alt",t.Name),a(),b(" ",t.Name," ")}}function hi(i,d){if(i&1){let t=x();o(0,"div",27)(1,"label",28),p(2,"Item ID"),r(),o(3,"input",29),E("ngModelChange",function(e){m(t);let c=s();return O(c.searchFilter.Item_id,e)||(c.searchFilter.Item_id=e),u(e)}),r()()}if(i&2){let t=s();a(3),D("ngModel",t.searchFilter.Item_id)}}function _i(i,d){if(i&1){let t=x();o(0,"div",30)(1,"app-product-card",31),C("onUpload",function(){let e=m(t).$implicit,c=s();return u(c.onUploadToMultipleChannel(e))})("onDescEvent",function(){let e=m(t).index,c=s();return u(c.onOpenVariantDetail(e))})("onScan",function(){let e=m(t).$implicit,c=s();return u(c.onScanSingleProduct(e))})("onCheckBoxChange",function(e){let c=m(t).$implicit;return u(c.selected=e)})("onDetach",function(){let e=m(t).$implicit,c=s();return u(c.onDetachProduct([e]))}),r()()}if(i&2){let t=d.$implicit,n=s();a(),l("productId",t==null?null:t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",n.productService.getChannelProduct(t))("code",n.getVariantCode(t==null?null:t.Variants))("showCheckBox",t==null?null:t.hasScan)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function gi(i,d){i&1&&(y(0),o(1,"div",32),g(2,"app-empty-state"),r(),v())}function Ci(i,d){if(i&1){let t=x();o(0,"div",33)(1,"div",34)(2,"app-custom-paginator",35),C("total",function(){m(t);let e=s();return u(e.getRowCount())})("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),r()()()}if(i&2){let t=s();a(2),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var un=(()=>{class i{constructor(t,n,e,c,_,P,mt,Nt){this.http=t,this.dialog=n,this.toastr=e,this.productService=c,this.activateRouter=_,this.authService=P,this.route=mt,this.uploadProductService=Nt,this.searchFilter=new dt,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=f.GuidEMpty,this.multipeScanChannels=[],this.scanProductRole=U.ProductScan,this.uploadProductRole=U.ProductUpload,this.detachProductRole=U.ProductDetach,this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(f.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(n=>{this.searchFilter=n.Filter,n.Filter.ChannelID!=f.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(n.Filter.ChannelID)),this.searchFilter.PageSize=n.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok])}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(n=>{this.products=n.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let n=this.products[t].Variants;this.dialog.open(Kt,{data:{variants:n,title:this.products[t].Name}})}onScanAllProducts(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(L,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.Async=e.Async,this.scanAllProduct()})}onScanAllV2Products(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(L,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(n=>f.IsNotEmpty(n)),Tt(n=>this.productService.scanProductV2(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async))).subscribe(()=>{this.initPageLoader(f.GuidEMpty)})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(F(n=>n)).subscribe(n=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(n,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(f.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(L,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID;let c=this.productService.getVariantCodesProduct(t);this.scanProducts(c)})}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}onScanMultipleProduct(){this.searchFilter.ChannelID=f.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(L,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct;let c=this.productService.selectedProduct(this.products),_=this.productService.getVariantCodesProducts(c);this.scanProducts(_)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:n=>{let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);n?this.toastr.success(`Product Successfully scan with ${e?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${e?.Name} `,"Error"),this.searchFilter.ChannelID=f.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=f.GuidEMpty}})}getVariantCode(t){let n;return t.length>1&&(n=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(n=t[0].Code),n}onClearFilterChannel(){this.searchFilter.ChannelID=f.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Total})}onDetachProduct(t){let n=[];t.forEach(e=>{e.Channel=f.assignChannelLogo(e.Channel),n.push(...e.Channel)}),this.dialog.open(Mt,{width:"600px",data:[...n]}).afterClosed().pipe(F(e=>f.IsNotEmpty(e)),Tt(e=>this.productService.detachProduct(e))).subscribe(e=>{this.toastr.success(e.Message,jt.Success),this.getProducts()})}onDetachMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.onDetachProduct(t)}static{this.\u0275fac=function(n){return new(n||i)(S(H),S(it),S(z),S(Y),S(Lt),S(K),S(rt),S(Pt))}}static{this.\u0275cmp=T({type:i,selectors:[["app-sold-in-channel"]],standalone:!1,decls:18,vars:18,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"onSubmit","headerTitle"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],["class","mt-5",4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["class","row",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],[1,"btn-group","me-3","shadow"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],[1,"btn","btn-outline-secondary","border-end-0",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu",2,"cursor","pointer"],[1,"dropdown-item",3,"click"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"mt-5"],[1,"fw-bold"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onDescEvent","onScan","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(o(0,"mainpanel",0),C("onSubmit",function(_){return e.searchProduct(_)}),o(1,"actions"),h(2,li,2,1,"ng-container",1)(3,di,3,1,"ng-container",1)(4,mi,2,1,"ng-container",1),r(),o(5,"filters")(6,"div")(7,"label",2),p(8,"Channel"),r(),o(9,"ng-select",3),C("ngModelChange",function(_){return e.searchFilter.ListChannelID=_})("clear",function(){return e.onClearFilterChannel()}),h(10,ui,3,3,"ng-template",4),r()(),h(11,hi,4,1,"div",5),r(),o(12,"content")(13,"div",6)(14,"div",7),h(15,_i,2,11,"div",8)(16,gi,3,0,"ng-container",9),r(),h(17,Ci,3,4,"div",10),r()()()),n&2&&(l("headerTitle","Sold in Channel"),a(2),l("ngxPermissionsOnly",w(12,de,e.detachProductRole)),a(),l("ngxPermissionsOnly",w(14,de,e.scanProductRole)),a(),l("ngxPermissionsOnly",w(16,de,e.uploadProductRole)),a(5),l("clearable",!0)("multiple",!0)("items",e.channelOptions)("ngModel",e.searchFilter.ListChannelID),a(2),l("ngIf",e.searchFilter.ListChannelID!=null),a(4),l("ngForOf",e.products),a(),l("ngIf",e.products.length==0),a(),l("ngIf",e.products==null?null:e.products.length))},dependencies:[B,N,ft,j,$,J,lt,xt,Bt,ot,pt,Z,nt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]})}}return i})();var Qt=i=>[i];function fi(i,d){if(i&1){let t=x();o(0,"button",12),C("click",function(){m(t);let e=s(3);return u(e.uploadMultipleProduct())}),g(1,"i",13),p(2),r()}if(i&2){let t=s(3);a(2),b(" upload (",t.selectedProducts==null?null:t.selectedProducts.length,") ")}}function Si(i,d){if(i&1&&(y(0),h(1,fi,3,1,"button",11),v()),i&2){let t=s(2);a(),l("ngIf",t.hasSelectionProduct)}}function xi(i,d){if(i&1){let t=x();y(0),o(1,"button",14),C("click",function(){m(t);let e=s(2);return u(e.openScanDialog())}),g(2,"i",15),p(3," Scan Channel "),r(),v()}}function yi(i,d){i&1&&(y(0),g(1,"th",23),v())}function vi(i,d){if(i&1){let t=x();y(0),o(1,"td",30)(2,"input",31),E("ngModelChange",function(e){m(t);let c=s(3).$implicit;return O(c.selected,e)||(c.selected=e),u(e)}),C("ngModelChange",function(){m(t);let e=s(4).ngIf,c=s(3);return u(c.onSelectProduct(e))}),r()(),v()}if(i&2){let t=s(3).$implicit;a(),l("rowSpan",t==null?null:t.Variants.length),a(),D("ngModel",t.selected)}}function bi(i,d){if(i&1&&(y(0),h(1,vi,3,2,"ng-container",10),v()),i&2){let t=s().index;a(),l("ngIf",t==0)}}function Pi(i,d){if(i&1){let t=x();y(0),o(1,"img",36),C("click",function(e){m(t);let c=s(3).$implicit,_=s(4);return u(_.onZoomImage(e,c==null?null:c.ImageUrl))}),r(),v()}if(i&2){let t=s(3).$implicit;a(),l("src",t==null?null:t.ImageUrl,M)}}function Ii(i,d){i&1&&g(0,"img",37)}function wi(i,d){if(i&1&&(y(0),o(1,"td",30)(2,"div",32),h(3,Pi,2,1,"ng-container",9)(4,Ii,1,0,"ng-template",null,1,G),r()(),o(6,"td",33)(7,"h4",34)(8,"span",35),p(9),r()()(),v()),i&2){let t=W(5),n=s(2).$implicit;a(),l("rowSpan",n==null?null:n.Variants.length),a(2),l("ngIf",n==null?null:n.ImageUrl)("ngIfElse",t),a(3),l("rowSpan",n==null?null:n.Variants.length),a(2),l("matTooltip",(n==null||n.Name==null?null:n.Name.length)>50?n==null?null:n.Name:""),a(),b(" ",n==null?null:n.Name," ")}}function Mi(i,d){if(i&1&&(o(0,"div")(1,"a",26),g(2,"img",38),r()()),i&2){let t=d.$implicit;a(),l("href",t.URL,M),a(),l("src",t.Img,M)("matTooltip",t.Name)}}function Ti(i,d){if(i&1&&(o(0,"div"),g(1,"img",38),r()),i&2){let t=d.$implicit;a(),l("src",t.Img,M)("matTooltip",t.Name)}}function Di(i,d){if(i&1&&(o(0,"tr"),h(1,bi,2,1,"ng-container",4)(2,wi,10,6,"ng-container",10),o(3,"td"),p(4),r(),o(5,"td")(6,"span"),p(7),r(),o(8,"span",25)(9,"a",26),g(10,"i",27),r()()(),o(11,"td",28)(12,"div",29),h(13,Mi,3,3,"div",24),r()(),o(14,"td",28)(15,"div",29),h(16,Ti,2,2,"div",24),r()()()),i&2){let t=d.$implicit,n=d.index,e=s(5);a(),l("ngxPermissionsOnly",w(7,Qt,e.uploadProductRole)),a(),l("ngIf",n==0),a(2),b(" ",t.Name," "),a(3),b(" ",t.Code," "),a(2),l("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),M),a(4),l("ngForOf",t==null?null:t.Available),a(3),l("ngForOf",t==null?null:t.NotAvailable)}}function Oi(i,d){if(i&1&&(y(0),h(1,Di,17,9,"tr",24),v()),i&2){let t=d.$implicit;a(),l("ngForOf",t.Variants)}}function Ei(i,d){if(i&1&&(o(0,"tbody"),h(1,Oi,2,1,"ng-container",24),r()),i&2){let t=d.ngIf;a(),l("ngForOf",t)}}function ki(i,d){if(i&1&&(y(0),o(1,"div",16)(2,"table",17)(3,"thead",18)(4,"tr"),h(5,yi,2,0,"ng-container",4),o(6,"th",19),p(7," Product "),r(),o(8,"th",20),p(9,"Variant"),r(),o(10,"th",20),p(11,"SKU"),r(),o(12,"th",21),p(13,"Available In"),r(),o(14,"th",22),p(15,"Not Available In"),r()()(),h(16,Ei,2,1,"tbody",10),k(17,"async"),r()(),v()),i&2){let t=s(2);a(5),l("ngxPermissionsOnly",w(4,Qt,t.uploadProductRole)),a(11),l("ngIf",V(17,2,t.data$))}}function Fi(i,d){i&1&&(o(0,"div",39),g(1,"app-empty-state"),r())}function Vi(i,d){if(i&1){let t=x();o(0,"span",47),C("click",function(){m(t);let e=s(4);return u(e.getRowCount())}),o(1,"i",48),p(2,"?"),r()()}}function Ni(i,d){if(i&1&&(o(0,"span"),p(1),k(2,"number"),r()),i&2){let t=d.ngIf;a(),A(V(2,1,t==null?null:t.Count))}}function Ri(i,d){if(i&1){let t=x();o(0,"a",49),C("click",function(){m(t);let e=s(4);return u(e.onNextPage())}),g(1,"i",50),p(2," Next"),r()}}function Ai(i,d){if(i&1){let t=x();o(0,"a",51),C("click",function(){m(t);let e=s(4);return u(e.onLastPage())}),g(1,"i",52),p(2," Last"),r()}}function Ui(i,d){if(i&1&&(y(0),o(1,"div",40)(2,"div",41)(3,"div",42),p(4),k(5,"number"),h(6,Vi,3,0,"span",43)(7,Ni,3,3,"span",10),k(8,"async"),p(9),r()(),o(10,"div",44),h(11,Ri,3,0,"a",45)(12,Ai,3,0,"a",46),r()(),v()),i&2){let t=s().ngIf,n=s(2);a(4),b(" Showing 1 - ",V(5,6,t==null?null:t.length)," of "),a(2),l("ngIf",n.paginationService.hideCount),a(),l("ngIf",!n.paginationService.hideCount&&V(8,8,n.rowCount$)),a(2),b(" records ~ ",n.paginationService.footerPageNumber," Page "),a(2),l("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage),a(),l("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage)}}function Li(i,d){if(i&1&&(y(0),h(1,Ui,13,10,"ng-container",10),v()),i&2){let t=d.ngIf;a(),l("ngIf",(t==null?null:t.length)>0)}}function Bi(i,d){if(i&1){let t=x();o(0,"mainpanel",3),C("onSubmit",function(e){m(t);let c=s();return u(c.searchProduct(e))}),o(1,"actions"),h(2,Si,2,1,"ng-container",4)(3,xi,4,0,"ng-container",4),o(4,"button",5),C("click",function(){m(t);let e=s();return u(e.openExportDialog())}),g(5,"i",6),o(6,"span"),p(7,"Export"),r()()(),o(8,"content")(9,"div",7)(10,"div",8),h(11,ki,18,6,"ng-container",9),k(12,"async"),h(13,Fi,2,0,"ng-template",null,0,G),r(),h(15,Li,2,1,"ng-container",10),k(16,"async"),r()()()}if(i&2){let t,n=W(14),e=s();l("hideSearchDropdown",!0),a(2),l("ngxPermissionsOnly",w(10,Qt,e.uploadProductRole)),a(),l("ngxPermissionsOnly",w(12,Qt,e.scanProductRole)),a(8),l("ngIf",((t=V(12,6,e.data$))==null?null:t.length)>0)("ngIfElse",n),a(4),l("ngIf",V(16,8,e.data$))}}var hn=(()=>{class i{constructor(t,n,e,c,_,P,mt,Nt,Sn){this.http=t,this.dialog=n,this.toastr=e,this.route=c,this.productService=_,this.paginationService=P,this.biggerPictureService=mt,this.authService=Nt,this.uploadProductService=Sn,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.scanProductRole=U.ProductScan,this.uploadProductRole=U.ProductUpload,this.channelOptions=Nt.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(he(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Rt(t=>(t=t.map(n=>(n.Variants=n.Variants.map(e=>(e.Available=this.productService.sortChannel(e.Available),e.NotAvailable=this.productService.sortChannel(e.NotAvailable),e.Available=this.assignLogoChannel(e.Available),e.NotAvailable=this.assignLogoChannel(e.NotAvailable),e)),n.Channel=n?.Variants[0]?.Available,n)),t)))}assignLogoChannel(t){return t=t.map(n=>(n.Img=f.getChannelLogoByTypeId(n.TypeID),n)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(){let t=this.productService.findChannelById(this.filterSearch.ChannelID,this.channelOptions);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(n=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(n,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=f.GuidEMpty,this.dialog.open(L,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.filterSearch.ChannelID=e.ChannelID,this.filterSearch.ScanFull=e.ScanFull,this.filterSearch.UpdatedProduct=e.UpdatedProduct,this.filterSearch.Async=e.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,n){this.biggerPictureService.openBiggerPicture(t,n)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(on,{data:{title:"Export Not In Channel",pageNumber:this.filterSearch.PageNumber,rowCount:this.filterSearch.RowCount,filterExport:this.filterSearch,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}static{this.\u0275fac=function(n){return new(n||i)(S(H),S(it),S(z),S(rt),S(Y),S(an),S(qe),S(K),S(Pt))}}static{this.\u0275cmp=T({type:i,selectors:[["app-not-in-channel"]],standalone:!1,decls:2,vars:3,consts:[["EMPTY",""],["elsePic",""],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","hideSearchDropdown"],[4,"ngxPermissionsOnly"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[2,"width","10px"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[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"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[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",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(n,e){n&1&&(h(0,Bi,17,14,"mainpanel",2),k(1,"async")),n&2&&l("ngIf",V(1,1,e.loader$))},dependencies:[B,N,Me,j,$,J,ct,Z,nt,gt,Ct],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]})}}return i})();var pe=i=>[i],ji=()=>[];function $i(i,d){if(i&1){let t=x();o(0,"button",16),C("click",function(){m(t);let e=s(2);return u(e.openScanDialog())}),g(1,"i",17),p(2," Scan Channel "),r()}}function Wi(i,d){if(i&1&&(y(0),h(1,$i,3,0,"button",15),v()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)?-1:1)}}function Gi(i,d){if(i&1){let t=x();o(0,"button",19),C("click",function(){m(t);let e=s(2);return u(e.onDownloadAllProduct("SELECTED"))}),g(1,"i",20),p(2),r()}if(i&2){let t,n=s(2);a(2),b(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function zi(i,d){if(i&1&&(y(0),h(1,Gi,3,1,"button",18),v()),i&2){let t=s();a(),R(t.productService.hasSelection(t.products)?1:-1)}}function Hi(i,d){if(i&1&&(o(0,"span",21),g(1,"img",22),r(),p(2)),i&2){let t=d.item;a(),l("src",t.Img,M)("alt",t.Name),a(),b(" ",t.Name," ")}}function Ki(i,d){if(i&1){let t=x();o(0,"div",23)(1,"app-product-card",24),C("onCheckBoxChange",function(e){let c=m(t).index,_=s();return u(_.onSelectProduct(e,c))})("onDescEvent",function(){let e=m(t).index,c=s();return u(c.onShowVariantDetail(e))})("onDownload",function(){let e=m(t).$implicit,c=s();return u(c.onDownloadProduct(e))})("onScan",function(){let e=m(t).$implicit,c=s();return u(c.onScanChannel(e))}),r()()}if(i&2){let t=d.$implicit,n=s();a(),l("showRedirectIcon",!1)("title",t==null?null:t.Name)("image",t==null?null:t.Image)("imageForZoom",t==null?null:t.Image)("code",t==null?null:t.SKU)("description",(t==null||t.Variant==null?null:t.Variant.length)>0?(t==null||t.Variant==null?null:t.Variant.length)+" Variants":null)("downloadButton",!0)("channels",t!=null&&t.Channel?w(10,pe,t==null?null:t.Channel):Ot(12,ji))("showCheckBox",n.hasDownloadRole())("scanButton",!0)}}function Ji(i,d){i&1&&(y(0),o(1,"div",25),g(2,"app-empty-state"),r(),v())}function Yi(i,d){if(i&1){let t=x();o(0,"div",26)(1,"div",27)(2,"app-custom-paginator",28),C("total",function(){m(t);let e=s();return u(e.getRowCount())})("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),r()()()}if(i&2){let t=s();a(2),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var _n=(()=>{class i{constructor(t,n,e,c,_,P){this.http=t,this.dialog=n,this.productService=e,this.toastrService=c,this.activateRouter=_,this.authService=P,this.permissionService=tt(Te),this.searchFilter=new dt,this.products=[],this.hasClickRowCount=!1,this.scanProductRole=U.ProductScan,this.downloadProductRole=U.ProductDownload,this.hasDownloadRole=ut(!0),this.channelOptions=this.authService.getChannels(),this.permissionService.hasPermission(this.downloadProductRole).then(mt=>{this.hasDownloadRole.set(mt)})}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(f.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(n=>{this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(n=>(t=this.channelOptions.find(e=>e.ID==n.ChannelID),t?n.Channel=JSON.parse(JSON.stringify(t)):n.Channel=null,n)).map(n=>(n.Channel&&(n.Channel.Url=n.Url),n))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?f.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=f.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(f.GuidEMpty),this.productService.successToastrScanAllProduct(n,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=f.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(L,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.Async=e.Async,this.onScanAll()})}onDownloadAllProduct(t){let n;t=="ALL"?n=this.products:n=this.productService.selectedProduct(this.products),n.length>0&&this.productService.downloadMultipleProduct(n).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,n){this.products[n].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let n=JSON.parse(JSON.stringify(t));delete n.Channel,this.productService.scanCompareToPos([n]).subscribe(e=>{e.Status?(this.initPageLoader(f.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let n=this.products[t].Variant;n.length>0&&this.dialog.open(rn,{data:{title:this.products[t].Name,variants:n},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Count})}static{this.\u0275fac=function(n){return new(n||i)(S(H),S(it),S(Y),S(z),S(Lt),S(K))}}static{this.\u0275cmp=T({type:i,selectors:[["app-not-in-pos"]],standalone:!1,decls:30,vars:17,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp",""],[1,"mt-5"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(o(0,"mainpanel",0),C("onSubmit",function(_){return e.onSearch(_)}),o(1,"actions"),h(2,Wi,2,1,"ng-container",1)(3,zi,2,1,"ng-container",1),r(),o(4,"filters")(5,"div")(6,"label",2),p(7,"Channel"),r(),o(8,"ng-select",3),E("ngModelChange",function(_){return O(e.searchFilter.ChannelID,_)||(e.searchFilter.ChannelID=_),_}),h(9,Hi,3,3,"ng-template",4),r()(),o(10,"div",5)(11,"label",6),p(12,"SKU Assigned"),r(),o(13,"mat-radio-group",7),E("ngModelChange",function(_){return O(e.searchFilter.HaveSku,_)||(e.searchFilter.HaveSku=_),_}),o(14,"mat-radio-button",8),p(15," All "),r(),o(16,"mat-radio-button",8),p(17," Yes "),r(),o(18,"mat-radio-button",8),p(19," No "),r()()(),o(20,"div",5)(21,"label",6),p(22,"Item ID"),r(),o(23,"input",9),E("ngModelChange",function(_){return O(e.searchFilter.Item_id,_)||(e.searchFilter.Item_id=_),_}),r()()(),o(24,"content")(25,"div",10)(26,"div",11),h(27,Ki,2,13,"div",12)(28,Ji,3,0,"ng-container",13),r(),h(29,Yi,3,4,"div",14),r()()()),n&2&&(a(2),l("ngxPermissionsOnly",w(13,pe,e.scanProductRole)),a(),l("ngxPermissionsOnly",w(15,pe,e.downloadProductRole)),a(5),l("clearable",!0)("items",e.channelOptions),D("ngModel",e.searchFilter.ChannelID),a(5),D("ngModel",e.searchFilter.HaveSku),a(),l("value",0),a(2),l("value",1),a(2),l("value",2),a(5),D("ngModel",e.searchFilter.Item_id),a(4),l("ngForOf",e.products),a(),l("ngIf",e.products.length==0),a(),l("ngIf",(e.products==null?null:e.products.length)>0))},dependencies:[B,N,ft,j,$,J,lt,xt,Gt,zt,ot,pt,Z,nt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]})}}return i})();function Zi(i,d){if(i&1&&(o(0,"span",9),g(1,"img",10),r(),p(2)),i&2){let t=d.item,n=s();a(),l("src",n.getChannelLogo(t.TypeID),M),a(),b(" ",t.Name," ")}}function qi(i,d){if(i&1&&(o(0,"div",11),g(1,"app-duplicate-product-card",12),r()),i&2){let t=d.$implicit,n=d.index;a(),l("imageForZoom",t.ImageUrl)("title",t.Name)("code",t.Code)("id",n)("image",t.ThumbnailURL)("channels",t.Channels)}}function Qi(i,d){i&1&&(y(0),o(1,"div",13),g(2,"app-empty-state"),r(),v())}function Xi(i,d){if(i&1){let t=x();y(0),o(1,"div",14)(2,"div",15)(3,"app-custom-paginator",16),C("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())})("total",function(){m(t);let e=s();return u(e.getRowCount())}),r()()(),v()}if(i&2){let t=s();a(3),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickedRowCount)}}var gn=(()=>{class i{constructor(t,n,e){this.httpService=t,this.productService=n,this.authService=e,this.searchFilter=new dt,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=e.getChannels()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(n=>{this.products=n.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=f.GuidEMpty}getChannelLogo(t){return f.getChannelLogoByTypeId(t)}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}static{this.\u0275fac=function(n){return new(n||i)(S(H),S(Y),S(K))}}static{this.\u0275cmp=T({type:i,selectors:[["app-duplicate-sku"]],standalone:!1,decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","multiple","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(o(0,"mainpanel",0),C("onSubmit",function(_){return e.onSearch(_)}),o(1,"filters")(2,"div",1)(3,"div")(4,"h6",2),p(5,"Channel"),r(),o(6,"ng-select",3),E("ngModelChange",function(_){return O(e.searchFilter.ListChannelID,_)||(e.searchFilter.ListChannelID=_),_}),C("clear",function(){return e.onClearFilter()}),h(7,Zi,3,2,"ng-template",4),r()()()(),o(8,"content")(9,"div",5)(10,"div",6),h(11,qi,2,6,"div",7)(12,Qi,3,0,"ng-container",8),r(),h(13,Xi,4,4,"ng-container",8),r()()()),n&2&&(a(6),l("multiple",!0)("clearable",!0)("items",e.channelOptions),D("ngModel",e.searchFilter.ListChannelID),a(5),l("ngForOf",e.products),a(),l("ngIf",(e.products==null?null:e.products.length)==0),a(),l("ngIf",(e.products==null?null:e.products.length)>0))},dependencies:[B,N,j,$,J,lt,xt,Bt,Ht,ot,Z],encapsulation:2})}}return i})();var to=()=>["/menu/products/status/sold-in-channel"],Cn=i=>({ID:i}),eo=()=>["/menu/products/status/not-in-pos"],no=i=>[i];function io(i,d){if(i&1&&(y(0),p(1),v()),i&2){let t=s().$implicit;a(),b(" ",t.Count," ")}}function oo(i,d){if(i&1){let t=x();o(0,"span",25),C("click",function(){m(t);let e=s().$implicit,c=s(2);return u(c.getLiveProductCount(e.ID,e))}),g(1,"i",26),r()}}function ao(i,d){if(i&1){let t=x();y(0),o(1,"button",27),C("click",function(){m(t);let e=s().$implicit,c=s(2);return u(c.onScanChannel(e))}),g(2,"i",28),p(3," Scan "),r(),v()}}function ro(i,d){if(i&1){let t=x();o(0,"tr")(1,"td"),g(2,"img",17),o(3,"span",18),p(4),r()(),o(5,"td",19),h(6,io,2,1,"ng-container",6)(7,oo,2,0,"ng-template",null,1,G),r(),o(9,"td",19)(10,"a",20),p(11),k(12,"number"),r()(),o(13,"td",19)(14,"a",20),p(15),k(16,"number"),r()(),o(17,"td"),p(18),k(19,"date"),r(),o(20,"td")(21,"div",21),h(22,ao,4,0,"ng-container",22),o(23,"button",23),C("click",function(){let e=m(t).$implicit,c=s(2);return u(c.onClearCache(e.ID))}),g(24,"i",24),p(25," Clear "),r()()()()}if(i&2){let t=d.$implicit,n=W(8),e=s(2);a(2),l("src",e.getChannelLogo(t.TypeID),M),a(2),A(t.Name),a(2),l("ngIf",t.Count!==void 0)("ngIfElse",n),a(4),l("routerLink",Ot(19,to))("queryParams",w(20,Cn,t.ID)),a(),b(" ",V(12,12,t.SoldInChannel)," "),a(3),l("routerLink",Ot(22,eo))("queryParams",w(23,Cn,t.ID)),a(),b(" ",V(16,14,t.NotInPOS)," "),a(3),b(" ",t.LastSync?ve(19,16,t.LastSync,"dd MMM yyyy HH:mm"):"Never"," "),a(4),l("ngxPermissionsOnly",w(25,no,e.scanProductRole))}}function lo(i,d){if(i&1&&(y(0),o(1,"div",7)(2,"table",8)(3,"thead",9)(4,"tr",10)(5,"th"),p(6,"Channel"),r(),o(7,"th",11),p(8," Live Product "),r(),o(9,"th",12),p(10," Sold In Channel "),r(),o(11,"th",13),p(12," Product Not in POS "),r(),o(13,"th",14),p(14,"Last Sync"),r(),g(15,"th",15),r()(),o(16,"tbody"),h(17,ro,26,27,"tr",16),k(18,"async"),r()()(),v()),i&2){let t,n=s();a(17),l("ngForOf",(t=V(18,1,n.channels$))==null?null:t.Data)}}function co(i,d){i&1&&(o(0,"div",29),g(1,"app-empty-state"),r())}var fn=(()=>{class i{constructor(t,n,e,c){this.productService=t,this.toastr=n,this.dialog=e,this.authService=c,this.scanProductRole=U.ProductScan,this.destroy$=new me,this.channelOptions=c.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,n){this.productService.getTotalProductLive(t).pipe(Xt(this.destroy$)).subscribe(e=>{n.Count=e.Count})}onScanChannel(t){this.dialog.open(L,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(F(n=>f.IsNotEmpty(n))).subscribe(n=>{this.scanAllProduct(t.ID,n)})}scanAllProduct(t,n){let e=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async).pipe(F(c=>c)).subscribe(c=>{n.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(c,e,!n.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(Xt(this.destroy$)).subscribe(e=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return f.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(n){return new(n||i)(S(Y),S(z),S(it),S(K))}}static{this.\u0275cmp=T({type:i,selectors:[["app-channel-statistic"]],standalone:!1,decls:9,vars:6,consts:[["EMPTY",""],["QUESTION",""],["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngxPermissionsOnly"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,e){if(n&1&&(o(0,"mainpanel",2)(1,"content")(2,"div",3)(3,"div",4)(4,"div",5),h(5,lo,19,3,"ng-container",6),k(6,"async"),h(7,co,2,0,"ng-template",null,0,G),r()()()()()),n&2){let c,_=W(8);l("hideSearchBox",!0)("hideSearchDropdown",!0),a(5),l("ngIf",((c=V(6,4,e.channels$))==null||c.Data==null?null:c.Data.length)>0)("ngIfElse",_)}},dependencies:[B,N,J,ct,Ie,Z,nt,gt,Ct,be],encapsulation:2})}}return i})();var so=[{component:cn,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:mn,canActivate:[q,Q],data:{title:"Products in POS"}},{path:"sold-in-channel",component:un,canActivate:[q,Q],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:hn,canActivate:[q,Q],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:_n,canActivate:[q,Q],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:gn,canActivate:[q,Q],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:fn,canActivate:[q,Q],data:{title:"Channel Statistic"}},{path:"notification",loadComponent(){return import("./chunk-GYPJGQYN.js").then(i=>i.NotificationComponent)},canActivate:[q,Q],data:{title:"Notification"}},{path:"notificationV2",loadComponent(){return import("./chunk-66N77XWP.js").then(i=>i.NotificationV2Component)},canActivate:[q,Q],data:{title:"Notification"}},{path:"notification/detailV2",loadComponent(){return import("./chunk-M6UMLTY2.js").then(i=>i.DetailComponent)},canActivate:[q,Q],data:{title:"Notification Detail"}},{path:"notification/detail",loadComponent(){return import("./chunk-74U7L3IP.js").then(i=>i.DetailComponent)},canActivate:[q,Q],data:{title:"Notification Detail"}}]}],jr=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Ce({type:i})}static{this.\u0275inj=_e({imports:[et,St,Ue,st,Ee,ln,We,Ae,Ht,ot,pt,we.forChild(so),nn,He,Mt,De]})}}return i})();export{jr as StatusModule};
|
|
@@ -1 +0,0 @@
|
|
|
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};
|