marketplacepos 5.48.0 → 5.48.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/3rdpartylicenses.txt +26 -26
- package/Marketplace/{chunk-222IOSGU.js → chunk-2F4DTZCZ.js} +1 -1
- package/Marketplace/{chunk-3LU2SFN4.js → chunk-2IASUYTM.js} +1 -1
- package/Marketplace/chunk-2USFVKEX.js +1 -0
- package/Marketplace/chunk-36U7D4LI.js +1 -0
- package/Marketplace/chunk-3JYZF65T.js +1 -0
- package/Marketplace/chunk-3K2EKA5O.js +1 -0
- package/Marketplace/{chunk-ZV7EHPNJ.js → chunk-3L7Y6LG6.js} +1 -1
- package/Marketplace/chunk-4JDI3AL5.js +1 -0
- package/Marketplace/{chunk-5YBWBAQS.js → chunk-4YCSITNV.js} +1 -1
- package/Marketplace/{chunk-55BTWXFX.js → chunk-5BSPSA4O.js} +1 -1
- package/Marketplace/chunk-5CHTDUME.js +1 -0
- package/Marketplace/chunk-5KYN6Y7M.js +1 -0
- package/Marketplace/{chunk-56BH43Y7.js → chunk-5X2E3W32.js} +1 -1
- package/Marketplace/{chunk-WW7F6LSG.js → chunk-5X2L45XK.js} +1 -1
- package/Marketplace/chunk-6EORXONU.js +4 -0
- package/Marketplace/{chunk-34UF36YY.js → chunk-6OIMOM7S.js} +1 -1
- package/Marketplace/{chunk-J2BPOHP6.js → chunk-6OJQRHIZ.js} +1 -1
- package/Marketplace/{chunk-ZAUKG4R6.js → chunk-6PW6S7MI.js} +1 -1
- package/Marketplace/chunk-6XDT56RT.js +2 -0
- package/Marketplace/{chunk-JOKDW6WD.js → chunk-7DT7FQ2T.js} +1 -1
- package/Marketplace/{chunk-KKB4B7FU.js → chunk-7GY4O2UX.js} +3 -3
- package/Marketplace/chunk-7SB4C4PT.js +1 -0
- package/Marketplace/chunk-A7PUMY67.js +1 -0
- package/Marketplace/chunk-ADKAX3OO.js +1 -0
- package/Marketplace/chunk-AEVLZ7NS.js +1 -0
- package/Marketplace/{chunk-NECWUPZQ.js → chunk-AFIF6VRM.js} +1 -1
- package/Marketplace/chunk-AGBJEXIM.js +1 -0
- package/Marketplace/chunk-ALPG22RQ.js +1 -0
- package/Marketplace/{chunk-DRTRU4DB.js → chunk-B6F5PDL5.js} +1 -1
- package/Marketplace/{chunk-HERBJRWM.js → chunk-BXYXVBXP.js} +1 -1
- package/Marketplace/{chunk-KWNXPX2M.js → chunk-C6JHPCLF.js} +1 -1
- package/Marketplace/{chunk-B4QCGMST.js → chunk-C7N6EI73.js} +1 -1
- package/Marketplace/{chunk-PQEXTCFW.js → chunk-CAZ7U2IL.js} +10 -10
- package/Marketplace/chunk-CBU473N2.js +1 -0
- package/Marketplace/{chunk-UNGNRJ2B.js → chunk-CLQGGKN6.js} +1 -1
- package/Marketplace/chunk-CT6UFONR.js +1 -0
- package/Marketplace/{chunk-IO2TWJDO.js → chunk-DAUML5UD.js} +1 -1
- package/Marketplace/chunk-DH5CXAEM.js +1 -0
- package/Marketplace/chunk-DHPNXR6E.js +1 -0
- package/Marketplace/chunk-DTAHV4GM.js +1 -0
- package/Marketplace/{chunk-MQXW3UAW.js → chunk-DXYMG6QK.js} +1 -1
- package/Marketplace/chunk-E3EBAWLJ.js +1 -0
- package/Marketplace/chunk-E66QUDQF.js +1 -0
- package/Marketplace/chunk-E6ZWL77N.js +1 -0
- package/Marketplace/chunk-EDEZ3JLR.js +4 -0
- package/Marketplace/{chunk-OROFEDQN.js → chunk-FCEXPGTK.js} +1 -1
- package/Marketplace/chunk-FCFCTT5A.js +1 -0
- package/Marketplace/chunk-FHER4TFY.js +1 -0
- package/Marketplace/{chunk-VZSHSSQZ.js → chunk-FKGKMEDE.js} +1 -1
- package/Marketplace/chunk-FRZCC6KZ.js +1 -0
- package/Marketplace/chunk-GG3MDS4C.js +1 -0
- package/Marketplace/{chunk-ONU4O7N2.js → chunk-GPHNPV7O.js} +1 -1
- package/Marketplace/{chunk-J7FL3VT4.js → chunk-GURSK3ZV.js} +1 -1
- package/Marketplace/{chunk-N3WBRUNI.js → chunk-GVI6GJHY.js} +1 -1
- package/Marketplace/chunk-GX6JPDQ5.js +1 -0
- package/Marketplace/chunk-H7GV5SNI.js +5 -0
- package/Marketplace/{chunk-S32PEKW5.js → chunk-HKHNRMPT.js} +1 -1
- package/Marketplace/{chunk-5O33CV4F.js → chunk-I723PUUO.js} +1 -1
- package/Marketplace/{chunk-PGR6BEOA.js → chunk-I7C6W3RB.js} +1 -1
- package/Marketplace/{chunk-R6SCDZGW.js → chunk-IDH7MCR3.js} +1 -1
- package/Marketplace/chunk-ILW6ZFFV.js +1 -0
- package/Marketplace/chunk-J6BQDYXO.js +1 -0
- package/Marketplace/{chunk-TCWEUEBR.js → chunk-J6CZKQ53.js} +1 -1
- package/Marketplace/chunk-JBEKD57G.js +1 -0
- package/Marketplace/{chunk-G6P2UZU4.js → chunk-JW7NES7L.js} +1 -1
- package/Marketplace/{chunk-O4HOLA7Y.js → chunk-KSVJCX2D.js} +1 -1
- package/Marketplace/chunk-KVDREHOE.js +1 -0
- package/Marketplace/chunk-KZSTYKIP.js +1 -0
- package/Marketplace/{chunk-76CPUGUB.js → chunk-L76NLJD7.js} +2 -2
- package/Marketplace/{chunk-XBDQR2BA.js → chunk-LABF6W37.js} +1 -1
- package/Marketplace/{chunk-MAMCOUZ6.js → chunk-M2BYW5SR.js} +1 -1
- package/Marketplace/{chunk-P6TDS7UT.js → chunk-M65Z55OS.js} +1 -1
- package/Marketplace/chunk-MKADKY44.js +2 -0
- package/Marketplace/{chunk-NYJPPKGX.js → chunk-NCKPMA6Q.js} +1 -1
- package/Marketplace/{chunk-TDCMI7YC.js → chunk-O2YF5VGD.js} +1 -1
- package/Marketplace/chunk-O4EO3YBL.js +1 -0
- package/Marketplace/{chunk-Y6WFE3L2.js → chunk-OBF4XVU7.js} +1 -1
- package/Marketplace/chunk-PDCVMSLL.js +1 -0
- package/Marketplace/chunk-PLLHTY6O.js +15 -0
- package/Marketplace/chunk-PMVDQ2OP.js +1 -0
- package/Marketplace/chunk-PZKN5FIT.js +1 -0
- package/Marketplace/chunk-Q4TAOZ73.js +1 -0
- package/Marketplace/chunk-QCV5XC3U.js +266 -0
- package/Marketplace/{chunk-GV3NEJJ6.js → chunk-QFSA7CU4.js} +1 -1
- package/Marketplace/{chunk-XUBQATMN.js → chunk-R2XT5M5F.js} +1 -1
- package/Marketplace/chunk-RCBY7EIY.js +1 -0
- package/Marketplace/{chunk-J5BZDPXE.js → chunk-RQQWNLDZ.js} +1 -1
- package/Marketplace/chunk-S5R6MCNP.js +5 -0
- package/Marketplace/{chunk-RJFFTIAO.js → chunk-S7CKRTJV.js} +1 -1
- package/Marketplace/{chunk-PZB3GQWT.js → chunk-SHUYFOQI.js} +1 -1
- package/Marketplace/{chunk-SILAIDPV.js → chunk-STYL7ETF.js} +1 -1
- package/Marketplace/{chunk-E7FHMF3J.js → chunk-SZVL42NR.js} +1 -1
- package/Marketplace/chunk-T7HRAMHR.js +1 -0
- package/Marketplace/chunk-TIIGDXIJ.js +2 -0
- package/Marketplace/{chunk-CEXUETT6.js → chunk-TJYYRHZZ.js} +1 -1
- package/Marketplace/{chunk-DYQ3BWPB.js → chunk-TXOZULMZ.js} +1 -1
- package/Marketplace/chunk-TYQY4WPY.js +1 -0
- package/Marketplace/chunk-UBTALPOC.js +2 -0
- package/Marketplace/{chunk-6XT3JSG5.js → chunk-UCEZJNIL.js} +1 -1
- package/Marketplace/chunk-VWX2IX64.js +1 -0
- package/Marketplace/{chunk-W7YZT7CH.js → chunk-VYQD3A3M.js} +1 -1
- package/Marketplace/{chunk-37NOSLQL.js → chunk-WHHW4IZT.js} +1 -1
- package/Marketplace/{chunk-74JHI4MS.js → chunk-WNUTNP6I.js} +1 -1
- package/Marketplace/{chunk-DQOO5YZC.js → chunk-WRK3ZHRX.js} +1 -1
- package/Marketplace/chunk-X6COQADC.js +1 -0
- package/Marketplace/{chunk-7Y2L4CNS.js → chunk-XDBH7EGC.js} +1 -1
- package/Marketplace/chunk-XK4RP5MQ.js +1 -0
- package/Marketplace/{chunk-3I2V337G.js → chunk-XLIPGDSC.js} +1 -1
- package/Marketplace/chunk-Y77WYZ6Y.js +5 -0
- package/Marketplace/{chunk-NLSVMXR7.js → chunk-ZKIO2ZQ6.js} +1 -1
- package/Marketplace/chunk-ZME22WYI.js +1 -0
- package/Marketplace/{chunk-A7YRNCQP.js → chunk-ZTHO6JJM.js} +1 -1
- package/Marketplace/chunk-ZUL6ZHSW.js +1 -0
- package/Marketplace/{chunk-UW3UCIOY.js → chunk-ZW2TMVZP.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/main-YJKBQ3LW.js +1 -0
- package/Marketplace/{styles-3SQUCHWS.css → styles-ANCVZJP7.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-2FSRCK7Y.js +0 -1
- package/Marketplace/chunk-2LCP6ZFH.js +0 -1
- package/Marketplace/chunk-3YDWTOSL.js +0 -1
- package/Marketplace/chunk-44URQXRM.js +0 -1
- package/Marketplace/chunk-465DKI6M.js +0 -1
- package/Marketplace/chunk-46IROEMV.js +0 -2
- package/Marketplace/chunk-4R746B4G.js +0 -1
- package/Marketplace/chunk-573EEV7X.js +0 -1
- package/Marketplace/chunk-5S7ONNKP.js +0 -1
- package/Marketplace/chunk-6ZEQRKBC.js +0 -1
- package/Marketplace/chunk-7HVOZWYY.js +0 -1
- package/Marketplace/chunk-7U32FNM2.js +0 -2
- package/Marketplace/chunk-7VRLCSNB.js +0 -1
- package/Marketplace/chunk-AL5RTE5M.js +0 -1
- package/Marketplace/chunk-AXC6LM6T.js +0 -1
- package/Marketplace/chunk-BHGEKKCM.js +0 -1
- package/Marketplace/chunk-BLHKSSK6.js +0 -1
- package/Marketplace/chunk-BXOHTPGP.js +0 -1
- package/Marketplace/chunk-CNTLG54D.js +0 -1
- package/Marketplace/chunk-DLXWO2XC.js +0 -1
- package/Marketplace/chunk-DPQMNLFO.js +0 -1
- package/Marketplace/chunk-E5JZCOHZ.js +0 -1
- package/Marketplace/chunk-EMLE4JDW.js +0 -1
- package/Marketplace/chunk-FFTZPZOW.js +0 -5
- package/Marketplace/chunk-FHZNWINZ.js +0 -1
- package/Marketplace/chunk-GLMM3CVD.js +0 -1
- package/Marketplace/chunk-GQCDEPDY.js +0 -1
- package/Marketplace/chunk-GZLXMT7F.js +0 -1
- package/Marketplace/chunk-HG4R6CUP.js +0 -1
- package/Marketplace/chunk-HU7LMMZJ.js +0 -1
- package/Marketplace/chunk-I3IA6MAD.js +0 -1
- package/Marketplace/chunk-IZZQQW5G.js +0 -5
- package/Marketplace/chunk-JLVWTKDH.js +0 -1
- package/Marketplace/chunk-JUO4RKIH.js +0 -1
- package/Marketplace/chunk-L2GMXVN6.js +0 -1
- package/Marketplace/chunk-M7U5T2ZP.js +0 -1
- package/Marketplace/chunk-MEER4VNV.js +0 -1
- package/Marketplace/chunk-N26QQL77.js +0 -1
- package/Marketplace/chunk-NOIKC7TF.js +0 -1
- package/Marketplace/chunk-ODQVHQPB.js +0 -15
- package/Marketplace/chunk-PE7QBBA6.js +0 -1
- package/Marketplace/chunk-PNUEO4J2.js +0 -1
- package/Marketplace/chunk-PS43OK3J.js +0 -1
- package/Marketplace/chunk-SNSROU6N.js +0 -1
- package/Marketplace/chunk-SUTHLGCO.js +0 -266
- package/Marketplace/chunk-TUJHFVOP.js +0 -1
- package/Marketplace/chunk-UI5ITL7Z.js +0 -4
- package/Marketplace/chunk-XFIUNEOU.js +0 -1
- package/Marketplace/chunk-XW2CGM4G.js +0 -5
- package/Marketplace/chunk-YJTPDV4D.js +0 -1
- package/Marketplace/chunk-YKEAAH3N.js +0 -2
- package/Marketplace/chunk-YTUPRTC2.js +0 -1
- package/Marketplace/chunk-ZS465QKM.js +0 -2
- package/Marketplace/main-NBCLYU5Y.js +0 -1
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
import{a as pi}from"./chunk-7VRLCSNB.js";import{a as $n}from"./chunk-L2GMXVN6.js";import{c as Gt,e as di}from"./chunk-7U32FNM2.js";import{a as yt}from"./chunk-IO2TWJDO.js";import{a as at}from"./chunk-7JQEF4XX.js";import{a as ei}from"./chunk-BKR7YPEW.js";import{e as $t}from"./chunk-P6TDS7UT.js";import"./chunk-56BH43Y7.js";import{d as Xn,k as ai,l as ri,m as li,n as si,o as ci}from"./chunk-UW3UCIOY.js";import{a as Me}from"./chunk-EMLE4JDW.js";import{a as nt}from"./chunk-SNSROU6N.js";import"./chunk-4VNQYYVV.js";import{b as mi}from"./chunk-VZSHSSQZ.js";import{a as ni,b as ii}from"./chunk-NLSVMXR7.js";import{a as Ie,b as Te,c as Yn}from"./chunk-55BTWXFX.js";import"./chunk-FULVA6QB.js";import{a as et}from"./chunk-6XT3JSG5.js";import{a as St}from"./chunk-GLMM3CVD.js";import{c as qn,f as Qn}from"./chunk-A7YRNCQP.js";import"./chunk-OROFEDQN.js";import"./chunk-PZB3GQWT.js";import"./chunk-B4QCGMST.js";import"./chunk-MQXW3UAW.js";import"./chunk-63I3I3MX.js";import{a as ot}from"./chunk-3LU2SFN4.js";import"./chunk-GV3NEJJ6.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-ONU4O7N2.js";import"./chunk-3RK6DDJD.js";import{a as Pe}from"./chunk-5YBWBAQS.js";import{f as Jn}from"./chunk-37NOSLQL.js";import{a as G}from"./chunk-ZSUWHVKX.js";import{a as Nn,b as An}from"./chunk-PS43OK3J.js";import"./chunk-N5AE5WMQ.js";import{a as oi}from"./chunk-J2BPOHP6.js";import{a as Wn}from"./chunk-I3IA6MAD.js";import{a as xt}from"./chunk-7KG3DC5J.js";import{a as Se}from"./chunk-34UF36YY.js";import{d as _t,e as Dn}from"./chunk-6KWG6O5L.js";import{a as bt}from"./chunk-AL5RTE5M.js";import{a as Kn,b as Zn,c as ti}from"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as pt}from"./chunk-XFIUNEOU.js";import"./chunk-AFDI4TD4.js";import{a as Hn}from"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import{a as Gn}from"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import{e as zn}from"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import{a as we}from"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import{i as ct}from"./chunk-5O33CV4F.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import{g as ve}from"./chunk-L7WZ6U4T.js";import{b as Wt,c as jn,d as Ye,e as Xt}from"./chunk-LOWGZOML.js";import{P as Ze,Q as Rn,ja as Ln,na as Qt,ra as Un,sa as Je}from"./chunk-5PMKN6PM.js";import{a as On}from"./chunk-YJTPDV4D.js";import{b as tt,e as Y}from"./chunk-OXWPYJNB.js";import{c as He,d as Ke,f as fe,g as vn,i as xe,k as wn,m as Pn}from"./chunk-XBIHN6D3.js";import{b as D,c as f}from"./chunk-BLHKSSK6.js";import{b as Lt,c as Ut,d as dt,e as Fn,f as kn,g as En,h as Vn,i as ye,j as jt,k as be,m as it,n as Bn}from"./chunk-UI5ITL7Z.js";import{A as Rt,b as bn,c as Bt,h as Z,m as J}from"./chunk-L3W6SG2T.js";import{a as In}from"./chunk-YTHY4IFS.js";import{a as Tn,b as st,c as Mn}from"./chunk-ZETUYNFJ.js";import{v as Ct,w as ft}from"./chunk-SILAIDPV.js";import"./chunk-3I2V337G.js";import{D as _e,E as Sn,F as lt,G as Ce,I as yn,c as Nt,e as $,f as U,h as fn,i as gt,j as xn,l as At,m as q}from"./chunk-LNJUGHOX.js";import{$b as I,$c as O,Ac as de,Cc as pe,Dc as me,Fd as ge,G as N,Gb as M,Gd as qt,Ha as j,Hb as je,Hc as Q,Ic as hn,K as an,Kb as ut,Kc as ue,Lb as pn,Lc as X,Mb as x,Mc as p,Nc as A,Oa as Ft,Oc as P,Qc as F,Rc as k,Sc as E,Tc as gn,X as rn,Z as ae,Zb as W,Zc as Jt,_c as Pt,aa as Kt,ac as mn,ad as Yt,bc as T,ca as Zt,cc as We,cd as he,ea as Dt,ec as $e,f as oe,fa as ln,fc as Ge,g as Le,gc as c,hc as r,hd as V,ic as s,id as B,jc as g,jd as _n,kb as le,kc as kt,kd as K,lb as L,lc as Et,ma as re,mc as Vt,na as Ue,nb as l,nc as v,oc as w,od as Cn,pa as sn,pc as ze,qa as cn,qc as S,ra as R,rc as se,sb as ht,tb as dn,v as wt,vc as C,xa as u,xc as d,ya as h,yc as un,za as rt,zb as y,zc as ce}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var ui=(()=>{let a=class a{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"}]}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=M({type:a,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,o){n&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),g(3,"nav-tab",2),s()()(),g(4,"router-outlet")),n&2&&(l(3),c("Tabs",o.productTabs))},dependencies:[Nn,Sn],encapsulation:2});let i=a;return i})();var Ei=["data-p-icon","exclamation-triangle"],hi=(()=>{class i extends we{pathId;onInit(){this.pathId="url(#"+Wt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=Ft(i)))(n||i)}})();static \u0275cmp=M({type:i,selectors:[["","data-p-icon","exclamation-triangle"]],features:[ut],attrs:Ei,decls:7,vars:2,consts:[["d","M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z","fill","currentColor"],["d","M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z","fill","currentColor"],["d","M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(e,n){e&1&&(rt(),kt(0,"g"),Vt(1,"path",0)(2,"path",1)(3,"path",2),Et(),kt(4,"defs")(5,"clipPath",3),Vt(6,"rect",4),Et()()),e&2&&(W("clip-path",n.pathId),l(5),se("id",n.pathId))},encapsulation:2})}return i})();var Vi=["data-p-icon","info-circle"],gi=(()=>{class i extends we{pathId;onInit(){this.pathId="url(#"+Wt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=Ft(i)))(n||i)}})();static \u0275cmp=M({type:i,selectors:[["","data-p-icon","info-circle"]],features:[ut],attrs:Vi,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(e,n){e&1&&(rt(),kt(0,"g"),Vt(1,"path",0),Et(),kt(2,"defs")(3,"clipPath",1),Vt(4,"rect",2),Et()()),e&2&&(W("clip-path",n.pathId),l(3),se("id",n.pathId))},encapsulation:2})}return i})();function Ni(i,a){if(i&1&&(r(0,"div",10),g(1,"img",11),r(2,"span"),p(3),s()()),i&2){let t=a.$implicit;c("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),l(),c("src",t.Img,L),l(2),A(t.Name)}}function Ai(i,a){if(i&1&&(r(0,"div",10),g(1,"img",11),r(2,"span"),p(3),s()()),i&2){let t=a.$implicit;c("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),l(),c("src",t.Img,L),l(2),A(t.Name)}}function Bi(i,a){if(i&1&&(r(0,"div",10),g(1,"img",11),r(2,"span"),p(3),s()()),i&2){let t=a.$implicit;c("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),l(),c("src",t.Img,L),l(2),A(t.Name)}}function Ri(i,a){if(i&1&&(r(0,"mat-radio-button",16),p(1," Sellable "),s()),i&2){let t=d(2);c("value",t.scanTypeEnum.Sellable)}}function Li(i,a){if(i&1){let t=S();r(0,"div",12)(1,"label",13),p(2,"Scan Type"),s(),r(3,"mat-radio-group",14),E("ngModelChange",function(n){u(t);let o=d();return k(o.filter.ScanFull,n)||(o.filter.ScanFull=n),h(n)}),r(4,"mat-radio-button",15),p(5," All "),s(),I(6,Ri,2,1,"mat-radio-button",16),r(7,"mat-radio-button",17),p(8," Active "),s()()()}if(i&2){let t=d();l(3),F("ngModel",t.filter.ScanFull),l(),c("value",t.scanTypeEnum.All),l(2),T(t.selectedChannel.TypeID==t.channelType.Tiktok?6:-1),l(),c("value",t.scanTypeEnum.Active)}}function Ui(i,a){i&1&&(r(0,"span"),p(1,"Never"),s())}function ji(i,a){if(i&1&&(r(0,"span"),p(1),V(2,"async"),s()),i&2){let t=d(2);l(),A(B(2,1,t.lastSync$))}}function Wi(i,a){if(i&1){let t=S();r(0,"div",8)(1,"label",5)(2,"span",18),p(3,"Last Scan:"),s(),I(4,Ui,2,0,"span"),V(5,"async"),mn(6,ji,3,3,"span"),s(),r(7,"mat-radio-group",19),E("ngModelChange",function(n){u(t);let o=d();return k(o.filter.UpdatedProduct,n)||(o.filter.UpdatedProduct=n),h(n)}),r(8,"mat-radio-button",20),p(9," Scan All Products "),s(),r(10,"mat-radio-button",21),p(11),s()()()}if(i&2){let t=d();l(4),T(B(5,6,t.lastSync$)==null?4:6),l(3),F("ngModel",t.filter.UpdatedProduct),l(),c("value",!1),l(2),c("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"),l(),P(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function $i(i,a){if(i&1){let t=S();r(0,"div",8)(1,"label",5),p(2," Scan Option "),s(),r(3,"mat-radio-group",22),E("ngModelChange",function(n){u(t);let o=d();return k(o.filter.Async,n)||(o.filter.Async=n),h(n)}),r(4,"mat-radio-button",23),p(5," Asynchronous (Get Notified when Complete) "),s(),r(6,"mat-radio-button",24),p(7," Synchronous (Wait until Complete) "),s()()()}if(i&2){let t=d();l(3),F("ngModel",t.filter.Async),l(),c("value",!0),l(2),c("value",!1)}}var H=(()=>{let a=class a extends ti{constructor(e,n,o){super(),this.dialogRef=e,this.data=n,this.router=o,this.channelService=R($n),this.channelType=D,this.disabledChannelOption=!1,this.filter={ChannelID:f.GuidEMpty,ScanFull:0,UpdatedProduct:!1,Async:!1},this.scanTypeEnum=ei,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 jt,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(e=>(e.disabled=!0,(e.TypeID==D.Tiktok||e.TypeID==D.Tokopedia||e.TypeID==D.Lazada||e.TypeID==D.WooCommerce)&&(e.disabled=!1),e)).sort(e=>e.disabled?1:-1))}onSelectChannel(e){let n=this.filterChannelById(e);this.selectedChannel=n,this.filter.Async=!0,this.iniHasScanUpdate(),this.getLastSync(e)}onClickSelect(){setTimeout(()=>{this.adjustOverlayPosition()},0)}getLastSync(e){this.lastSync$=this.channelService.getLastSync(e).pipe(wt(n=>(this.selectedChannel.LastSync=n.LastSync,this.setDefaultConfigUpdate(),f.IsNotEmpty(n.LastSync)?f.convertToReadableDate(n.LastSync):null)),ae(1))}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&f.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==D.Shopee||this.selectedChannel.TypeID==D.Tiktok||this.selectedChannel.TypeID==D.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=D.WooCommerce&&this.selectedChannel?.TypeID!=D.KalCare&&this.selectedChannel?.TypeID!=D.None&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(e){let n;return this.channelOptions&&(n=this.channelOptions.find(o=>o.ID==e)),n}submit(){this.selectedChannel.TypeID==D.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):this.dialogRef.close(this.filter)}isNotEmpty(e){return f.IsNotEmpty(e)}onClose(){this.dialogRef.close()}};a.\u0275fac=function(n){return new(n||a)(y(Lt),y(Ut),y(lt))},a.\u0275cmp=M({type:a,selectors:[["app-scan-dialog"]],features:[ut],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 available for sale, including 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,o){if(n&1){let m=S();r(0,"modal-material",2),C("onOk",function(){return u(m),h(o.submit())})("onClose",function(){return u(m),h(o.onClose())})("onCancel",function(){return u(m),h(o.onClose())}),r(1,"div",3)(2,"div",4)(3,"label",5),p(4,"Select a Channel"),s(),r(5,"p-select",6),C("click",function(){return u(m),h(o.onClickSelect())}),E("ngModelChange",function(b){return u(m),k(o.filter.ChannelID,b)||(o.filter.ChannelID=b),h(b)}),C("ngModelChange",function(b){return u(m),h(o.onSelectChannel(b))}),x(6,Ni,4,3,"ng-template",null,0,K)(8,Ai,4,3,"ng-template",null,1,K)(10,Bi,4,3,"ng-template",null,1,K),s(),x(12,Li,9,4,"div",7),I(13,Wi,12,8,"div",8),x(14,$i,8,3,"div",9),s()()()}n&2&&(c("dynamicValidated",o.isNotEmpty(o.filter.ChannelID))("config",o.modalConfig),l(5),c("options",o.channelOptions),F("ngModel",o.filter.ChannelID),c("filter",!0),l(7),c("ngIf",!o.isSingleChannel&&o.isNotEmpty(o.filter.ChannelID)),l(),T(o.hasScanUpdate&&o.selectedChannel?13:-1),l(),c("ngIf",!o.isSingleChannel&&o.isNotEmpty(o.filter.ChannelID)))},dependencies:[q,U,Zn,Kn,Rt,Z,J,be,Pe,Te,ft,Ct,Qn,Ie,gt],encapsulation:2});let i=a;return i})();var Mt=(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})(Mt||{});var Qe={Success:"Success",Info:"Info",Warning:"Warning",Error:"Error"};var Gi=[[["header"]],[["content"]],[["footer"]]],zi=["header","content","footer"],Hi=(i,a)=>({bodyScrollable:i,hideScrollbar:a}),Ki=(i,a,t,e)=>({"bg-success":i,"bg-warning":a,"bg-info":t,"bg-danger":e}),Zi=i=>({"mx-auto":i}),Ji=(i,a)=>({"show-footer":i,"p-0":a});function Yi(i,a){if(i&1){let t=S();r(0,"div",7),C("click",function(){u(t);let n=d();return h(n.onBack.emit())}),r(1,"a",8),g(2,"i",9),s()()}}function qi(i,a){if(i&1){let t=S();r(0,"div")(1,"a",10),C("click",function(){u(t);let n=d();return h(n.onClose.emit())}),g(2,"i",11),s()()}}function Qi(i,a){if(i&1){let t=S();r(0,"a",14),C("click",function(){u(t);let n=d(2);return h(n.onCancel.emit())}),p(1),s()}if(i&2){let t=d(2);l(),P(" ",t.config!=null&&t.config.cancelText?t.config==null?null:t.config.cancelText:"Cancel")}}function Xi(i,a){if(i&1){let t=S();r(0,"button",15),C("click",function(){u(t);let n=d(2);return h(n.onOk.emit())})("keyup.F2",function(){u(t);let n=d(2);return h(n.onOk.emit())}),s()}if(i&2){let t=d(2);c("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)",le)}}function to(i,a){if(i&1&&(r(0,"mat-dialog-actions",6),ce(1,2),I(2,Qi,2,1,"a",12),I(3,Xi,1,2,"button",13),s()),i&2){let t=d();l(2),T(t.config!=null&&t.config.hideCancel?-1:2),l(),T(t.config!=null&&t.config.hideOk?-1:3)}}var Xe=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=Qe.Success,this.validated=!0,this.customWidth="initial",this.bodyScrollable=!1,this.hideScrollbar=!1,this.disableKeyup=!1,this.noPadding=!1}},_i=(()=>{let a=class a{constructor(){this.dynamicValidated=!0,this.onOk=new ht,this.onCancel=new ht,this.onClose=new ht,this.onBack=new ht,this.headerType=Qe}ngOnInit(){this.config==null&&(this.config=new Xe)}onKeyup(e){this.config?.disableKeyup||(e.code=="F2"&&this.onOk.emit("F2"),(e.code=="Enter"||e.code=="NumpadEnter")&&this.onOk.emit("Enter"))}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=M({type:a,selectors:[["modal-material"]],inputs:{config:"config",dynamicValidated:"dynamicValidated"},outputs:{onOk:"onOk",onCancel:"onCancel",onClose:"onClose",onBack:"onBack"},ngContentSelectors:zi,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"],[1,"back-button","position-absolute","pointer","d-print-none"],[1,"d-flex","flex-row","d-print-none","align-items-center",3,"ngClass"],[1,"fw-normal"],[1,"modal-body","w-100",3,"ngClass"],[1,"w-100","py-7","border-top","d-flex","justify-content-end","d-print-none"],[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,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3"],["data-cy","btn-ok",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"disabled","innerHTML"],[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,o){n&1&&(un(Gi),r(0,"div",0),C("keyup",function(_){return o.onKeyup(_)}),r(1,"div",1),I(2,Yi,3,0,"div",2),r(3,"div",3)(4,"h4",4),p(5),s(),ce(6),s(),I(7,qi,3,0,"div"),s(),r(8,"mat-dialog-content",5),ce(9,1),s(),I(10,to,4,2,"mat-dialog-actions",6),s()),n&2&&(hn("width",o.config==null?null:o.config.customWidth),c("ngClass",Yt(10,Hi,o.config==null?null:o.config.bodyScrollable,o.config==null?null:o.config.hideScrollbar)),l(),c("ngClass",he(13,Ki,o.headerType.Success==(o.config==null?null:o.config.headerType),o.headerType.Warning==(o.config==null?null:o.config.headerType),o.headerType.Info==(o.config==null?null:o.config.headerType),o.headerType.Error==(o.config==null?null:o.config.headerType))),l(),T(o.config!=null&&o.config.eMoney?2:-1),l(),c("ngClass",O(18,Zi,o.config==null?null:o.config.eMoney)),l(2),A(o.config==null?null:o.config.title),l(2),T(o.config!=null&&o.config.hideClose?-1:7),l(),c("ngClass",Yt(20,Ji,!(o.config!=null&&o.config.hideFooter),o.config==null?null:o.config.noPadding)),l(2),T(o.config!=null&&o.config.hideFooter?-1:10))},dependencies:[q,Nt,Vn,Fn,En,kn],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}"]});let i=a;return i})();var eo=i=>({"is-disabled":i});function no(i,a){if(i&1&&(v(0),r(1,"tr")(2,"td",10),p(3),s(),r(4,"td",10),p(5),s(),r(6,"td",11)(7,"p",12),p(8,"Product Not in Channel!"),s()()(),w()),i&2){let t=d().$implicit;l(3),P(" ",t==null?null:t.Model," "),l(2),P(" ",t==null?null:t.Code," ")}}function io(i,a){if(i&1&&(r(0,"td",10),p(1),s()),i&2){let t=d(3).$implicit;W("rowspan",t.Channel.length),l(),P(" ",t==null?null:t.Model," ")}}function oo(i,a){if(i&1&&(r(0,"td",10),p(1),s()),i&2){let t=d(3).$implicit;W("rowspan",t.Channel.length),l(),P(" ",t==null?null:t.Code," ")}}function ao(i,a){if(i&1){let t=S();r(0,"tr"),x(1,io,2,2,"td",13)(2,oo,2,2,"td",13),r(3,"td",10)(4,"div",14)(5,"a",15),g(6,"img",16),s(),r(7,"div",17),p(8),s()()(),r(9,"td",10),p(10),V(11,"number"),s(),r(12,"td",18),p(13),V(14,"number"),s(),r(15,"td",19)(16,"div",20)(17,"button",21),C("click",function(){let n=u(t).$implicit,o=d(2).$implicit,m=d();return h(m.onDetach(n,o))}),g(18,"i",22),r(19,"span",23),p(20,"Detach"),s()(),r(21,"a",24),g(22,"i",25),r(23,"span",23),p(24,"Edit"),s()()()()()}if(i&2){let t=a.$implicit,e=a.$index,n=d(3);l(),c("ngIf",e==0),l(),c("ngIf",e==0),l(3),c("href",t.Url,L)("title",t.Title),l(),c("src",n.getChannelLogo(t.TypeID),L),l(),c("matTooltip",(t==null||t.Name==null?null:t.Name.length)>40?t==null?null:t.Name:""),l(),P(" ",t.Name," "),l(2),A(B(11,12,t.Price)),l(3),A(B(14,14,t.Inventory)),l(8),c("href",n.getHyperlinkSellerCenter(t),L)("ngClass",O(16,eo,t.TypeID==n.channelType.KalCare))("matTooltip",t.TypeID!=n.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function ro(i,a){if(i&1&&$e(0,ao,25,18,"tr",null,We),i&2){let t=d().$implicit;Ge(t==null?null:t.Channel)}}function lo(i,a){if(i&1&&x(0,no,9,2,"ng-container",9)(1,ro,2,0,"ng-template",null,0,K),i&2){let t=a.$implicit,e=Q(2);c("ngIf",!t.Channel||t.Channel.length<1)("ngIfElse",e)}}var Oe=(()=>{let a=class a{constructor(e,n){this.data=e,this.dialogRef=n,this.httpService=R(Y),this.toastr=R(tt),this.variants=j([]),this.channelType=D,this.variants.set(this.data.variants),this.title=e.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new jt,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideFooter=!0,this.modalConfig.customWidth="850px"}onDetach(e,n){let o={ChannelID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariationID:e.ChannelVariationID};this.httpService.post(On.DetachVariant,[o]).subscribe(m=>{this.toastr.success(m.Message,"Success"),this.updateVariantAfterDetach(n,e.ChannelVariationID)})}updateVariantAfterDetach(e,n){this.variants.update(o=>{let m=o.findIndex(_=>_.ID===e.ID);return m!==-1&&(o[m].Channel=o[m].Channel.filter(_=>_.ChannelVariationID!==n)),[...o]})}getChannelLogo(e){return f.getChannelLogoByTypeId(e)}getHyperlinkSellerCenter(e){let n="javascript:void(0)";switch(e.TypeID){case D.Shopee:n=`${Mt.Shoope}/portal/product/${e.ChannelItemID}`;break;case D.Tiktok:n=`${Mt.Tiktok}/product/edit/${e.ChannelItemID}`;break;case D.Tokopedia:n=`${Mt.Tokopedia}/edit-product/${e.ChannelItemID}`;break;case D.WooCommerce:n=`${Mt.WooCommerce}/wp-admin/post.php?post=${e.ChannelItemID}&action=edit`;break;case D.Lazada:n=`${Mt.Lazada}/apps/product/publish?productId=${e.ChannelItemID}`;break}return n}};a.\u0275fac=function(n){return new(n||a)(y(Ut),y(Lt))},a.\u0275cmp=M({type:a,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,o){n&1&&(r(0,"modal-material",1),C("onClose",function(){return o.dialogRef.close()})("onCancel",function(){return o.dialogRef.close()}),r(1,"content")(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4)(6,"div",5)(7,"span"),p(8,"VARIANT"),s(),r(9,"sup"),g(10,"i",6),s()()(),r(11,"th",4),p(12,"SKU"),s(),r(13,"th",4)(14,"div",5)(15,"span"),p(16,"PRODUCT"),s(),r(17,"sup"),g(18,"i",7),s()()(),r(19,"th",4),p(20,"PRICE"),s(),r(21,"th",8),p(22,"INVENTORY"),s(),g(23,"th",4),s()(),r(24,"tbody"),$e(25,lo,3,2,null,null,We),s()()()()),n&2&&(c("config",o.modalConfig),l(25),Ge(o.variants()))},dependencies:[q,Nt,U,ft,Ct,_i,At],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}"]});let i=a;return i})();function so(i,a){if(i&1&&(r(0,"mat-option",6)(1,"div"),g(2,"img",7),r(3,"span"),p(4),s()()()),i&2){let t=a.$implicit;c("value",t.ChannelID),l(2),c("src",t.logo,L),l(2),A(t.Title)}}var Ht=(()=>{let a=class a{constructor(){this.dialogRef=R(Lt),this.channels=R(Ut),this.channelIds=j([]),this.channelOptions=j([])}ngOnInit(){this.initModalConfig();let e=this.channels.filter((n,o,m)=>m.findIndex(_=>_.ChannelID===n.ChannelID)===o);this.channelOptions.set(e)}initModalConfig(){this.modalConfig=new jt,this.modalConfig.title="Detach Product",this.modalConfig.okText="Save"}onClose(){this.dialogRef.close()}onSave(){let e=this.channels.filter(n=>this.channelIds().includes(n.ChannelID)).map(n=>({ChannelID:n.ChannelID,ChannelItemID:n.ChannelItemID}));this.dialogRef.close(e)}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=M({type:a,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,o){n&1&&(r(0,"modal-material",0),C("onClose",function(){return o.onClose()})("onCancel",function(){return o.onClose()})("onOk",function(){return o.onSave()}),r(1,"div",1)(2,"div")(3,"label",2),p(4,"Select a Channel"),s(),r(5,"mat-form-field",3)(6,"mat-select",4),E("ngModelChange",function(_){return k(o.channelIds,_)||(o.channelIds=_),_}),x(7,so,5,3,"mat-option",5),s()()()()()),n&2&&(c("dynamicValidated",o.channelIds().length>0)("config",o.modalConfig),l(6),F("ngModel",o.channelIds),c("multiple",!0),l(),c("ngForOf",o.channelOptions()))},dependencies:[q,$,be,Pe,Jn,ii,ni,qn,Rt,Z,J,ft],encapsulation:2});let i=a;return i})();var De=i=>[i];function co(i,a){if(i&1){let t=S();r(0,"button",14),C("click",function(){u(t);let n=d(2);return h(n.onDetachMultipleProduct())}),g(1,"i",15),p(2),s()}if(i&2){let t,e=d(2);l(2),P("Detach (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function po(i,a){if(i&1&&(v(0),I(1,co,3,1,"button",13),w()),i&2){let t=d();l(),T(t.productService.hasSelection(t.products)?1:-1)}}function mo(i,a){if(i&1){let t=S();r(0,"button",18),C("click",function(){u(t);let n=d(3);return h(n.onOpenScanDialog())}),g(1,"i",19),p(2," Scan Channel "),s()}}function uo(i,a){if(i&1&&x(0,mo,3,0,"button",17),i&2){let t=d(2);c("ngIf",!t.productService.hasSelection(t.products))}}function ho(i,a){if(i&1&&(v(0),I(1,uo,1,1,"button",16),w()),i&2){let t=d();l(),T(t.productService.hasSelection(t.products)?-1:1)}}function go(i,a){if(i&1){let t=S();r(0,"button",21),C("click",function(){u(t);let n=d(2);return h(n.onScanMultipleProduct())}),g(1,"i",19),p(2),s()}if(i&2){let t,e=d(2);l(2),P(" Scan (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function _o(i,a){if(i&1&&(v(0),I(1,go,3,1,"button",20),w()),i&2){let t=d();l(),T(t.productService.hasSelection(t.products)&&t.multipeScanChannels.length>0?1:-1)}}function Co(i,a){if(i&1){let t=S();r(0,"button",23),C("click",function(){u(t);let n=d(2);return h(n.onUploadMultipleProduct())}),g(1,"i",24),p(2),s()}if(i&2){let t,e=d(2);l(2),P(" Upload (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function fo(i,a){if(i&1&&(v(0),I(1,Co,3,1,"button",22),w()),i&2){let t=d();l(),T(t.productService.hasSelection(t.products)?1:-1)}}function xo(i,a){if(i&1){let t=S();r(0,"div",25)(1,"app-product-card",26),C("onUpload",function(){let n=u(t).$implicit,o=d();return h(o.onUploadToMultipleChannel(n))})("onScan",function(){let n=u(t).$implicit,o=d();return h(o.onScanSingleProduct(n))})("onDescEvent",function(){let n=u(t).index,o=d();return h(o.onOpenDialogVariant(n))})("onCheckBoxChange",function(n){let o=u(t).$implicit;return h(o.selected=n)})("onDetach",function(){let n=u(t).$implicit,o=d();return h(o.onDetachProduct([n]))}),s()()}if(i&2){let t=a.$implicit,e=d();l(),c("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",e.productService.getChannelProduct(t))("code",e.getVariantCode(t==null?null:t.Variants))("showCheckBox",(t==null?null:t.Channel.length)<e.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 So(i,a){i&1&&(v(0),r(1,"div",27),g(2,"app-empty-state"),s(),w())}function yo(i,a){if(i&1){let t=S();v(0),r(1,"div",28)(2,"div",29)(3,"app-custom-paginator",30),C("next",function(){u(t);let n=d();return h(n.getProducts())})("previous",function(){u(t);let n=d();return h(n.getProducts())}),s()()(),w()}if(i&2){let t=d();l(3),c("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}var xi=(()=>{let a=class a{constructor(e,n,o,m,_,b,vt){this.http=e,this.toastr=n,this.dialog=o,this.productService=m,this.authService=_,this.uploadProductService=b,this.route=vt,this.searchFilter=new xt,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.scanProductRole=G.ProductScan,this.uploadProductRole=G.ProductUpload,this.detachProductRole=G.ProductDetach,this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(e=>{this.Categories=e.Options.Categories,this.searchFilter.PageNumber=e.Filter.PageNumber,this.searchFilter.RowCount=e.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=e.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[D.Tokopedia,D.Tiktok])}getProducts(){let e={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",e).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 e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=f.GuidEMpty,this.dialog.open(H,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(N(o=>f.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.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(e=>{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(e,n,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(e){let n=this.products[e]?.Variants||[];this.dialog.open(Oe,{data:{title:this.products[e].Name,variants:n}})}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(e),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(e){this.uploadProductService.setSelectedProduct([e]),this.route.navigate(["/menu/products/upload"])}searchProduct(e){this.searchFilter.text=e,this.getProducts()}onScanMultipleProduct(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=f.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions,[D.Tokopedia,D.Tiktok]);this.dialog.open(H,{data:{filter:e,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(N(m=>f.IsNotEmpty(m))).subscribe(m=>{this.searchFilter.ChannelID=m.ChannelID,this.searchFilter.ScanFull=m.ScanFull,this.searchFilter.UpdatedProduct=m.UpdatedProduct;let _=this.productService.selectedProduct(this.products),b=this.productService.getVariantCodesProducts(_);this.scanSingleProduct(b)})}onScanSingleProduct(e){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=f.GuidEMpty,this.dialog.open(H,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(N(o=>f.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID;let m=this.productService.getVariantCodesProduct(e);this.scanSingleProduct(m)})}scanSingleProduct(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${o?.Name} `,"Error")}this.searchFilter.ChannelID=f.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=f.GuidEMpty}})}getVariantCode(e=[]){let n;return e?.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),e?.length==1&&(n=e[0].Code),n}onDetachProduct(e){let n=[];e.forEach(o=>{o.Channel=f.assignChannelLogo(o.Channel),n.push(...o.Channel)}),this.dialog.open(Ht,{width:"600px",data:[...n]}).afterClosed().pipe(N(o=>f.IsNotEmpty(o)),Kt(o=>this.productService.detachProduct(o))).subscribe(o=>{this.toastr.success(o.Message,ye.Success),this.getProducts()})}onDetachMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.onDetachProduct(e)}};a.\u0275fac=function(n){return new(n||a)(y(Y),y(tt),y(dt),y(ot),y(ct),y($t),y(lt))},a.\u0275cmp=M({type:a,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,o){if(n&1){let m=S();r(0,"mainpanel",1),C("onSubmit",function(b){return u(m),h(o.searchProduct(b))}),r(1,"actions"),x(2,po,2,1,"ng-container",2)(3,ho,2,1,"ng-container",2)(4,_o,2,1,"ng-container",2)(5,fo,2,1,"ng-container",2),s(),r(6,"filters")(7,"div")(8,"label",3),p(9,"Category"),s(),r(10,"ng-select",4),C("ngModelChange",function(b){return u(m),h(o.searchFilter.Category=b)}),s()(),r(11,"div",5)(12,"mat-date-range-input",6)(13,"input",7),E("ngModelChange",function(b){return u(m),k(o.startDate,b)||(o.startDate=b),h(b)}),C("click",function(){u(m);let b=Q(16);return h(b.open())}),s(),r(14,"input",8),E("ngModelChange",function(b){return u(m),k(o.endDate,b)||(o.endDate=b),h(b)}),C("click",function(){u(m);let b=Q(16);return h(b.open())}),s()(),g(15,"mat-date-range-picker",null,0),s()(),r(17,"content")(18,"div",9)(19,"div",10),x(20,xo,2,11,"div",11)(21,So,3,0,"ng-container",12),s(),x(22,yo,4,5,"ng-container",12),s()()()}if(n&2){let m=Q(16);c("headerTitle","In POS ("+o.rowCount+")"),l(2),c("ngxPermissionsOnly",O(14,De,o.detachProductRole)),l(),c("ngxPermissionsOnly",O(16,De,o.scanProductRole)),l(),c("ngxPermissionsOnly",O(18,De,o.scanProductRole)),l(),c("ngxPermissionsOnly",O(20,De,o.scanProductRole)),l(5),c("clearable",!0)("items",o.Categories)("ngModel",o.searchFilter.Category),l(2),c("rangePicker",m),l(),F("ngModel",o.startDate),l(),F("ngModel",o.endDate),l(6),c("ngForOf",o.products),l(),c("ngIf",o.products.length==0),l(),c("ngIf",o.products.length>0)}},dependencies:[$,U,Bt,Z,J,it,_t,pt,St,at,ai,ri,li,si,st],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}"]});let i=a;return i})();var Si=`
|
|
2
|
-
.p-toast {
|
|
3
|
-
width: dt('toast.width');
|
|
4
|
-
white-space: pre-line;
|
|
5
|
-
word-break: break-word;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.p-toast-message {
|
|
9
|
-
margin: 0 0 1rem 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.p-toast-message-icon {
|
|
13
|
-
flex-shrink: 0;
|
|
14
|
-
font-size: dt('toast.icon.size');
|
|
15
|
-
width: dt('toast.icon.size');
|
|
16
|
-
height: dt('toast.icon.size');
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.p-toast-message-content {
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: flex-start;
|
|
22
|
-
padding: dt('toast.content.padding');
|
|
23
|
-
gap: dt('toast.content.gap');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.p-toast-message-text {
|
|
27
|
-
flex: 1 1 auto;
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
gap: dt('toast.text.gap');
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.p-toast-summary {
|
|
34
|
-
font-weight: dt('toast.summary.font.weight');
|
|
35
|
-
font-size: dt('toast.summary.font.size');
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.p-toast-detail {
|
|
39
|
-
font-weight: dt('toast.detail.font.weight');
|
|
40
|
-
font-size: dt('toast.detail.font.size');
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.p-toast-close-button {
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
justify-content: center;
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
position: relative;
|
|
49
|
-
cursor: pointer;
|
|
50
|
-
background: transparent;
|
|
51
|
-
transition:
|
|
52
|
-
background dt('toast.transition.duration'),
|
|
53
|
-
color dt('toast.transition.duration'),
|
|
54
|
-
outline-color dt('toast.transition.duration'),
|
|
55
|
-
box-shadow dt('toast.transition.duration');
|
|
56
|
-
outline-color: transparent;
|
|
57
|
-
color: inherit;
|
|
58
|
-
width: dt('toast.close.button.width');
|
|
59
|
-
height: dt('toast.close.button.height');
|
|
60
|
-
border-radius: dt('toast.close.button.border.radius');
|
|
61
|
-
margin: -25% 0 0 0;
|
|
62
|
-
right: -25%;
|
|
63
|
-
padding: 0;
|
|
64
|
-
border: none;
|
|
65
|
-
user-select: none;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.p-toast-close-button:dir(rtl) {
|
|
69
|
-
margin: -25% 0 0 auto;
|
|
70
|
-
left: -25%;
|
|
71
|
-
right: auto;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.p-toast-message-info,
|
|
75
|
-
.p-toast-message-success,
|
|
76
|
-
.p-toast-message-warn,
|
|
77
|
-
.p-toast-message-error,
|
|
78
|
-
.p-toast-message-secondary,
|
|
79
|
-
.p-toast-message-contrast {
|
|
80
|
-
border-width: dt('toast.border.width');
|
|
81
|
-
border-style: solid;
|
|
82
|
-
backdrop-filter: blur(dt('toast.blur'));
|
|
83
|
-
border-radius: dt('toast.border.radius');
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.p-toast-close-icon {
|
|
87
|
-
font-size: dt('toast.close.icon.size');
|
|
88
|
-
width: dt('toast.close.icon.size');
|
|
89
|
-
height: dt('toast.close.icon.size');
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.p-toast-close-button:focus-visible {
|
|
93
|
-
outline-width: dt('focus.ring.width');
|
|
94
|
-
outline-style: dt('focus.ring.style');
|
|
95
|
-
outline-offset: dt('focus.ring.offset');
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.p-toast-message-info {
|
|
99
|
-
background: dt('toast.info.background');
|
|
100
|
-
border-color: dt('toast.info.border.color');
|
|
101
|
-
color: dt('toast.info.color');
|
|
102
|
-
box-shadow: dt('toast.info.shadow');
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.p-toast-message-info .p-toast-detail {
|
|
106
|
-
color: dt('toast.info.detail.color');
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.p-toast-message-info .p-toast-close-button:focus-visible {
|
|
110
|
-
outline-color: dt('toast.info.close.button.focus.ring.color');
|
|
111
|
-
box-shadow: dt('toast.info.close.button.focus.ring.shadow');
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.p-toast-message-info .p-toast-close-button:hover {
|
|
115
|
-
background: dt('toast.info.close.button.hover.background');
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.p-toast-message-success {
|
|
119
|
-
background: dt('toast.success.background');
|
|
120
|
-
border-color: dt('toast.success.border.color');
|
|
121
|
-
color: dt('toast.success.color');
|
|
122
|
-
box-shadow: dt('toast.success.shadow');
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.p-toast-message-success .p-toast-detail {
|
|
126
|
-
color: dt('toast.success.detail.color');
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.p-toast-message-success .p-toast-close-button:focus-visible {
|
|
130
|
-
outline-color: dt('toast.success.close.button.focus.ring.color');
|
|
131
|
-
box-shadow: dt('toast.success.close.button.focus.ring.shadow');
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.p-toast-message-success .p-toast-close-button:hover {
|
|
135
|
-
background: dt('toast.success.close.button.hover.background');
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.p-toast-message-warn {
|
|
139
|
-
background: dt('toast.warn.background');
|
|
140
|
-
border-color: dt('toast.warn.border.color');
|
|
141
|
-
color: dt('toast.warn.color');
|
|
142
|
-
box-shadow: dt('toast.warn.shadow');
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.p-toast-message-warn .p-toast-detail {
|
|
146
|
-
color: dt('toast.warn.detail.color');
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.p-toast-message-warn .p-toast-close-button:focus-visible {
|
|
150
|
-
outline-color: dt('toast.warn.close.button.focus.ring.color');
|
|
151
|
-
box-shadow: dt('toast.warn.close.button.focus.ring.shadow');
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.p-toast-message-warn .p-toast-close-button:hover {
|
|
155
|
-
background: dt('toast.warn.close.button.hover.background');
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.p-toast-message-error {
|
|
159
|
-
background: dt('toast.error.background');
|
|
160
|
-
border-color: dt('toast.error.border.color');
|
|
161
|
-
color: dt('toast.error.color');
|
|
162
|
-
box-shadow: dt('toast.error.shadow');
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.p-toast-message-error .p-toast-detail {
|
|
166
|
-
color: dt('toast.error.detail.color');
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.p-toast-message-error .p-toast-close-button:focus-visible {
|
|
170
|
-
outline-color: dt('toast.error.close.button.focus.ring.color');
|
|
171
|
-
box-shadow: dt('toast.error.close.button.focus.ring.shadow');
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.p-toast-message-error .p-toast-close-button:hover {
|
|
175
|
-
background: dt('toast.error.close.button.hover.background');
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.p-toast-message-secondary {
|
|
179
|
-
background: dt('toast.secondary.background');
|
|
180
|
-
border-color: dt('toast.secondary.border.color');
|
|
181
|
-
color: dt('toast.secondary.color');
|
|
182
|
-
box-shadow: dt('toast.secondary.shadow');
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.p-toast-message-secondary .p-toast-detail {
|
|
186
|
-
color: dt('toast.secondary.detail.color');
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.p-toast-message-secondary .p-toast-close-button:focus-visible {
|
|
190
|
-
outline-color: dt('toast.secondary.close.button.focus.ring.color');
|
|
191
|
-
box-shadow: dt('toast.secondary.close.button.focus.ring.shadow');
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.p-toast-message-secondary .p-toast-close-button:hover {
|
|
195
|
-
background: dt('toast.secondary.close.button.hover.background');
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.p-toast-message-contrast {
|
|
199
|
-
background: dt('toast.contrast.background');
|
|
200
|
-
border-color: dt('toast.contrast.border.color');
|
|
201
|
-
color: dt('toast.contrast.color');
|
|
202
|
-
box-shadow: dt('toast.contrast.shadow');
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.p-toast-message-contrast .p-toast-detail {
|
|
206
|
-
color: dt('toast.contrast.detail.color');
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.p-toast-message-contrast .p-toast-close-button:focus-visible {
|
|
210
|
-
outline-color: dt('toast.contrast.close.button.focus.ring.color');
|
|
211
|
-
box-shadow: dt('toast.contrast.close.button.focus.ring.shadow');
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.p-toast-message-contrast .p-toast-close-button:hover {
|
|
215
|
-
background: dt('toast.contrast.close.button.hover.background');
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.p-toast-top-center {
|
|
219
|
-
transform: translateX(-50%);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.p-toast-bottom-center {
|
|
223
|
-
transform: translateX(-50%);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.p-toast-center {
|
|
227
|
-
min-width: 20vw;
|
|
228
|
-
transform: translate(-50%, -50%);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.p-toast-message-enter-from {
|
|
232
|
-
opacity: 0;
|
|
233
|
-
transform: translateY(50%);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.p-toast-message-leave-from {
|
|
237
|
-
max-height: 1000px;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.p-toast .p-toast-message.p-toast-message-leave-to {
|
|
241
|
-
max-height: 0;
|
|
242
|
-
opacity: 0;
|
|
243
|
-
margin-bottom: 0;
|
|
244
|
-
overflow: hidden;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.p-toast-message-enter-active {
|
|
248
|
-
transition:
|
|
249
|
-
transform 0.3s,
|
|
250
|
-
opacity 0.3s;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.p-toast-message-leave-active {
|
|
254
|
-
transition:
|
|
255
|
-
max-height 0.45s cubic-bezier(0, 1, 0, 1),
|
|
256
|
-
opacity 0.3s,
|
|
257
|
-
margin-bottom 0.3s;
|
|
258
|
-
}
|
|
259
|
-
`;var bo=(i,a,t,e)=>({showTransformParams:i,hideTransformParams:a,showTransitionParams:t,hideTransitionParams:e}),vo=i=>({value:"visible",params:i}),wo=(i,a)=>({$implicit:i,closeFn:a}),Po=i=>({$implicit:i});function Io(i,a){i&1&&ze(0)}function To(i,a){if(i&1&&x(0,Io,1,0,"ng-container",3),i&2){let t=d();c("ngTemplateOutlet",t.headlessTemplate)("ngTemplateOutletContext",Yt(2,wo,t.message,t.onCloseIconClick))}}function Mo(i,a){if(i&1&&g(0,"span",4),i&2){let t=d(3);X(t.cn(t.cx("messageIcon"),t.message==null?null:t.message.icon)),c("pBind",t.ptm("messageIcon"))}}function Oo(i,a){if(i&1&&(rt(),g(0,"svg",11)),i&2){let t=d(4);X(t.cx("messageIcon")),c("pBind",t.ptm("messageIcon")),W("aria-hidden",!0)}}function Do(i,a){if(i&1&&(rt(),g(0,"svg",12)),i&2){let t=d(4);X(t.cx("messageIcon")),c("pBind",t.ptm("messageIcon")),W("aria-hidden",!0)}}function Fo(i,a){if(i&1&&(rt(),g(0,"svg",13)),i&2){let t=d(4);X(t.cx("messageIcon")),c("pBind",t.ptm("messageIcon")),W("aria-hidden",!0)}}function ko(i,a){if(i&1&&(rt(),g(0,"svg",14)),i&2){let t=d(4);X(t.cx("messageIcon")),c("pBind",t.ptm("messageIcon")),W("aria-hidden",!0)}}function Eo(i,a){if(i&1&&(rt(),g(0,"svg",12)),i&2){let t=d(4);X(t.cx("messageIcon")),c("pBind",t.ptm("messageIcon")),W("aria-hidden",!0)}}function Vo(i,a){if(i&1&&I(0,Oo,1,4,":svg:svg",7)(1,Do,1,4,":svg:svg",8)(2,Fo,1,4,":svg:svg",9)(3,ko,1,4,":svg:svg",10)(4,Eo,1,4,":svg:svg",8),i&2){let t,e=d(3);T((t=e.message.severity)==="success"?0:t==="info"?1:t==="error"?2:t==="warn"?3:4)}}function No(i,a){if(i&1&&(v(0),I(1,Mo,1,3,"span",2)(2,Vo,5,1),r(3,"div",6)(4,"div",6),p(5),s(),r(6,"div",6),p(7),s()(),w()),i&2){let t=d(2);l(),T(t.message.icon?1:2),l(2),c("pBind",t.ptm("messageText"))("ngClass",t.cx("messageText")),l(),c("pBind",t.ptm("summary"))("ngClass",t.cx("summary")),l(),P(" ",t.message.summary," "),l(),c("pBind",t.ptm("detail"))("ngClass",t.cx("detail")),l(),A(t.message.detail)}}function Ao(i,a){i&1&&ze(0)}function Bo(i,a){if(i&1&&g(0,"span",4),i&2){let t=d(4);X(t.cn(t.cx("closeIcon"),t.message==null?null:t.message.closeIcon)),c("pBind",t.ptm("closeIcon"))}}function Ro(i,a){if(i&1&&x(0,Bo,1,3,"span",17),i&2){let t=d(3);c("ngIf",t.message.closeIcon)}}function Lo(i,a){if(i&1&&(rt(),g(0,"svg",18)),i&2){let t=d(3);X(t.cx("closeIcon")),c("pBind",t.ptm("closeIcon")),W("aria-hidden",!0)}}function Uo(i,a){if(i&1){let t=S();r(0,"div")(1,"button",15),C("click",function(n){u(t);let o=d(2);return h(o.onCloseIconClick(n))})("keydown.enter",function(n){u(t);let o=d(2);return h(o.onCloseIconClick(n))}),I(2,Ro,1,1,"span",2)(3,Lo,1,4,":svg:svg",16),s()()}if(i&2){let t=d(2);l(),c("pBind",t.ptm("closeButton")),W("class",t.cx("closeButton"))("aria-label",t.closeAriaLabel),l(),T(t.message.closeIcon?2:3)}}function jo(i,a){if(i&1&&(r(0,"div",4),x(1,No,8,9,"ng-container",5)(2,Ao,1,0,"ng-container",3),I(3,Uo,4,4,"div"),s()),i&2){let t=d();X(t.cn(t.cx("messageContent"),t.message==null?null:t.message.contentStyleClass)),c("pBind",t.ptm("messageContent")),l(),c("ngIf",!t.template),l(),c("ngTemplateOutlet",t.template)("ngTemplateOutletContext",O(7,Po,t.message)),l(),T((t.message==null?null:t.message.closable)!==!1?3:-1)}}var Wo=["message"],$o=["headless"];function Go(i,a){if(i&1){let t=S();r(0,"p-toastItem",1),C("onClose",function(n){u(t);let o=d();return h(o.onMessageClose(n))})("@toastAnimation.start",function(n){u(t);let o=d();return h(o.onAnimationStart(n))})("@toastAnimation.done",function(n){u(t);let o=d();return h(o.onAnimationEnd(n))}),s()}if(i&2){let t=a.$implicit,e=a.index,n=d();c("message",t)("index",e)("life",n.life)("template",n.template||n._template)("headlessTemplate",n.headlessTemplate||n._headlessTemplate)("@toastAnimation",void 0)("showTransformOptions",n.showTransformOptions)("hideTransformOptions",n.hideTransformOptions)("showTransitionOptions",n.showTransitionOptions)("hideTransitionOptions",n.hideTransitionOptions)("pt",n.pt)}}var zo={root:({instance:i})=>{let{_position:a}=i;return{position:"fixed",top:a==="top-right"||a==="top-left"||a==="top-center"?"20px":a==="center"?"50%":null,right:(a==="top-right"||a==="bottom-right")&&"20px",bottom:(a==="bottom-left"||a==="bottom-right"||a==="bottom-center")&&"20px",left:a==="top-left"||a==="bottom-left"?"20px":a==="center"||a==="top-center"||a==="bottom-center"?"50%":null}}},Ho={root:({instance:i})=>["p-toast p-component",`p-toast-${i._position}`],message:({instance:i})=>({"p-toast-message":!0,"p-toast-message-info":i.message.severity==="info"||i.message.severity===void 0,"p-toast-message-warn":i.message.severity==="warn","p-toast-message-error":i.message.severity==="error","p-toast-message-success":i.message.severity==="success","p-toast-message-secondary":i.message.severity==="secondary","p-toast-message-contrast":i.message.severity==="contrast"}),messageContent:"p-toast-message-content",messageIcon:({instance:i})=>({"p-toast-message-icon":!0,[`pi ${i.message.icon}`]:!!i.message.icon}),messageText:"p-toast-message-text",summary:"p-toast-summary",detail:"p-toast-detail",closeButton:"p-toast-close-button",closeIcon:({instance:i})=>({"p-toast-close-icon":!0,[`pi ${i.message.closeIcon}`]:!!i.message.closeIcon})},Ve=(()=>{class i extends Ln{name="toast";style=Si;classes=Ho;inlineStyles=zo;static \u0275fac=(()=>{let t;return function(n){return(t||(t=Ft(i)))(n||i)}})();static \u0275prov=re({token:i,factory:i.\u0275fac})}return i})();var yi=new sn("TOAST_INSTANCE"),Ko=(()=>{class i extends Ye{zone;message;index;life;template;headlessTemplate;showTransformOptions;hideTransformOptions;showTransitionOptions;hideTransitionOptions;onClose=new ht;_componentStyle=R(Ve);timeout;constructor(t){super(),this.zone=t}onAfterViewInit(){this.initTimeout()}initTimeout(){this.message?.sticky||(this.clearTimeout(),this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>{this.onClose.emit({index:this.index,message:this.message})},this.message?.life||this.life||3e3)}))}clearTimeout(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}onMouseEnter(){this.clearTimeout()}onMouseLeave(){this.initTimeout()}onCloseIconClick=t=>{this.clearTimeout(),this.onClose.emit({index:this.index,message:this.message}),t.preventDefault()};get closeAriaLabel(){return this.config.translation.aria?this.config.translation.aria.close:void 0}onDestroy(){this.clearTimeout()}static \u0275fac=function(e){return new(e||i)(y(dn))};static \u0275cmp=M({type:i,selectors:[["p-toastItem"]],inputs:{message:"message",index:[2,"index","index",qt],life:[2,"life","life",qt],template:"template",headlessTemplate:"headlessTemplate",showTransformOptions:"showTransformOptions",hideTransformOptions:"hideTransformOptions",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onClose:"onClose"},features:[Jt([Ve]),ut],decls:4,vars:13,consts:[["container",""],["role","alert","aria-live","assertive","aria-atomic","true",3,"mouseenter","mouseleave","pBind"],[3,"pBind","class"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"pBind"],[4,"ngIf"],[3,"pBind","ngClass"],["data-p-icon","check",3,"pBind","class"],["data-p-icon","info-circle",3,"pBind","class"],["data-p-icon","times-circle",3,"pBind","class"],["data-p-icon","exclamation-triangle",3,"pBind","class"],["data-p-icon","check",3,"pBind"],["data-p-icon","info-circle",3,"pBind"],["data-p-icon","times-circle",3,"pBind"],["data-p-icon","exclamation-triangle",3,"pBind"],["type","button","autofocus","",3,"click","keydown.enter","pBind"],["data-p-icon","times",3,"pBind","class"],[3,"pBind","class",4,"ngIf"],["data-p-icon","times",3,"pBind"]],template:function(e,n){if(e&1){let o=S();r(0,"div",1,0),C("mouseenter",function(){return u(o),h(n.onMouseEnter())})("mouseleave",function(){return u(o),h(n.onMouseLeave())}),I(2,To,1,5,"ng-container")(3,jo,4,9,"div",2),s()}e&2&&(X(n.cn(n.cx("message"),n.message==null?null:n.message.styleClass)),c("pBind",n.ptm("message"))("@messageState",O(11,vo,he(6,bo,n.showTransformOptions,n.hideTransformOptions,n.showTransitionOptions,n.hideTransitionOptions))),W("id",n.message==null?null:n.message.id),l(2),T(n.headlessTemplate?2:3))},dependencies:[q,Nt,U,fn,Gn,hi,gi,zn,Hn,Je,Xt],encapsulation:2,data:{animation:[He("messageState",[vn("visible",fe({transform:"translateY(0)",opacity:1})),xe("void => *",[fe({transform:"{{showTransformParams}}",opacity:0}),Ke("{{showTransitionParams}}")]),xe("* => void",[Ke("{{hideTransitionParams}}",fe({height:0,opacity:0,transform:"{{hideTransformParams}}"}))])])]},changeDetection:0})}return i})(),bi=(()=>{class i extends Ye{$pcToast=R(yi,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=R(Xt,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}key;autoZIndex=!0;baseZIndex=0;life=3e3;styleClass;get position(){return this._position}set position(t){this._position=t,this.cd.markForCheck()}preventOpenDuplicates=!1;preventDuplicates=!1;showTransformOptions="translateY(100%)";hideTransformOptions="translateY(-100%)";showTransitionOptions="300ms ease-out";hideTransitionOptions="250ms ease-in";breakpoints;onClose=new ht;template;headlessTemplate;messageSubscription;clearSubscription;messages;messagesArchieve;_position="top-right";messageService=R(Qt);_componentStyle=R(Ve);styleElement;id=Wt("pn_id_");templates;constructor(){super()}onInit(){this.messageSubscription=this.messageService.messageObserver.subscribe(t=>{if(t)if(Array.isArray(t)){let e=t.filter(n=>this.canAdd(n));this.add(e)}else this.canAdd(t)&&this.add([t])}),this.clearSubscription=this.messageService.clearObserver.subscribe(t=>{t?this.key===t&&(this.messages=null):this.messages=null,this.cd.markForCheck()})}_template;_headlessTemplate;onAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"message":this._template=t.template;break;case"headless":this._headlessTemplate=t.template;break;default:this._template=t.template;break}})}onAfterViewInit(){this.breakpoints&&this.createStyle()}add(t){this.messages=this.messages?[...this.messages,...t]:[...t],this.preventDuplicates&&(this.messagesArchieve=this.messagesArchieve?[...this.messagesArchieve,...t]:[...t]),this.cd.markForCheck()}canAdd(t){let e=this.key===t.key;return e&&this.preventOpenDuplicates&&(e=!this.containsMessage(this.messages,t)),e&&this.preventDuplicates&&(e=!this.containsMessage(this.messagesArchieve,t)),e}containsMessage(t,e){return t?t.find(n=>n.summary===e.summary&&n.detail==e.detail&&n.severity===e.severity)!=null:!1}onMessageClose(t){this.messages?.splice(t.index,1),this.onClose.emit({message:t.message}),this.cd.detectChanges()}onAnimationStart(t){t.fromState==="void"&&(this.renderer.setAttribute(this.el?.nativeElement,this.id,""),this.autoZIndex&&this.el?.nativeElement.style.zIndex===""&&ve.set("modal",this.el?.nativeElement,this.baseZIndex||this.config.zIndex.modal))}onAnimationEnd(t){t.toState==="void"&&this.autoZIndex&&Rn(this.messages)&&ve.clear(this.el?.nativeElement)}createStyle(){if(!this.styleElement){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",Ze(this.styleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.styleElement);let t="";for(let e in this.breakpoints){let n="";for(let o in this.breakpoints[e])n+=o+":"+this.breakpoints[e][o]+" !important;";t+=`
|
|
260
|
-
@media screen and (max-width: ${e}) {
|
|
261
|
-
.p-toast[${this.id}] {
|
|
262
|
-
${n}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
`}this.renderer.setProperty(this.styleElement,"innerHTML",t),Ze(this.styleElement,"nonce",this.config?.csp()?.nonce)}}destroyStyle(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}onDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.el&&this.autoZIndex&&ve.clear(this.el.nativeElement),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.destroyStyle()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=M({type:i,selectors:[["p-toast"]],contentQueries:function(e,n,o){if(e&1&&(de(o,Wo,5),de(o,$o,5),de(o,Un,4)),e&2){let m;pe(m=me())&&(n.template=m.first),pe(m=me())&&(n.headlessTemplate=m.first),pe(m=me())&&(n.templates=m)}},hostVars:4,hostBindings:function(e,n){e&2&&(ue(n.sx("root")),X(n.cn(n.cx("root"),n.styleClass)))},inputs:{key:"key",autoZIndex:[2,"autoZIndex","autoZIndex",ge],baseZIndex:[2,"baseZIndex","baseZIndex",qt],life:[2,"life","life",qt],styleClass:"styleClass",position:"position",preventOpenDuplicates:[2,"preventOpenDuplicates","preventOpenDuplicates",ge],preventDuplicates:[2,"preventDuplicates","preventDuplicates",ge],showTransformOptions:"showTransformOptions",hideTransformOptions:"hideTransformOptions",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",breakpoints:"breakpoints"},outputs:{onClose:"onClose"},features:[Jt([Ve,{provide:yi,useExisting:i},{provide:jn,useExisting:i}]),pn([Xt]),ut],decls:1,vars:1,consts:[[3,"message","index","life","template","headlessTemplate","showTransformOptions","hideTransformOptions","showTransitionOptions","hideTransitionOptions","pt","onClose",4,"ngFor","ngForOf"],[3,"onClose","message","index","life","template","headlessTemplate","showTransformOptions","hideTransformOptions","showTransitionOptions","hideTransitionOptions","pt"]],template:function(e,n){e&1&&x(0,Go,1,11,"p-toastItem",0),e&2&&c("ngForOf",n.messages)},dependencies:[q,$,Ko,Je],encapsulation:2,data:{animation:[He("toastAnimation",[xe(":enter, :leave",[Pn("@*",wn())])])]},changeDetection:0})}return i})();var Zo=()=>({"--p-toast-width":"375px !important"});function Jo(i,a){i&1&&g(0,"i",4)}function Yo(i,a){i&1&&g(0,"i",5)}function qo(i,a){i&1&&g(0,"i",6)}function Qo(i,a){if(i&1){let t=S();r(0,"button",16),C("click",function(){u(t);let n=d(2);return h(n.copyToClipboard())}),p(1),s()}if(i&2){let t=d(2);l(),P(" ",t.copyText()," ")}}function Xo(i,a){if(i&1){let t=S();r(0,"div",2)(1,"div",3),I(2,Jo,1,0,"i",4)(3,Yo,1,0,"i",5)(4,qo,1,0,"i",6),s(),r(5,"div",7)(6,"div",8)(7,"span",9),p(8),s()(),r(9,"div",10),g(10,"app-channel-logo",11),r(11,"div",12),p(12),s()(),r(13,"div",12),g(14,"span",13),s(),r(15,"div",14),I(16,Qo,2,1,"button",15),r(17,"button",16),C("click",function(){u(t);let n=d();return h(n.navigateToNotificationPage())}),p(18," Notification "),s()()()()}if(i&2){let t,e=a.$implicit;l(2),T((t=e.severity)==="info"?2:t==="success"?3:t==="error"?4:-1),l(6),A(e.text),l(2),c("showChannelName",!1)("width",14)("height",14)("typeId",e==null||e.data==null?null:e.data.channelTypeId),l(2),A(e==null||e.data==null?null:e.data.channelName),l(2),c("innerHTML",e.detail,le),l(2),T(e.severity=="info"?16:-1)}}var Ne=(()=>{let a=class a{constructor(){this.toastr=R(Se),this.messageService=R(Qt),this.router=R(lt),this.jobId=j(null),this.copyText=j("Copy"),this.key=j(0),this.stringKey=Cn(()=>JSON.stringify(this.key())),this.listenOnShowToast()}listenOnShowToast(){this.toastr.onShowToast$.pipe(In()).subscribe(e=>{this.copyText.set("Copy"),this.jobId.set(e?.data?.jobId),this.messageService.add(e)})}copyToClipboard(){navigator.clipboard.writeText(this.jobId()).then(()=>{this.copyText.set("Copied")})}navigateToNotificationPage(){this.router.navigate(["/menu/products/status/notificationV2"]),this.messageService.clear()}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=M({type:a,selectors:[["scan-channel-toastr"]],features:[Jt([Qt])],decls:3,vars:4,consts:[["message",""],["position","top-right",1,"p-toast-custom",3,"baseZIndex"],[1,"d-flex","align-items-start","gap-3","flex-fill"],[1,"pt-2"],[1,"fa-solid","fa-circle-info","info-icon-color","fs-4"],[1,"fa-solid","fa-circle-check","success-icon-color","fs-4"],[1,"fa-solid","fa-circle-xmark","error-icon-color","fs-4"],[1,"d-flex","flex-column","align-items-start","flex-fill","gap-1"],[1,"d-flex","align-items-center","gap-2","flex-fill"],[1,"fw-bold","fs-4"],[1,"fs-6","d-flex","align-items-center","mt-1"],[3,"showChannelName","width","height","typeId"],[1,"opacity-75"],[3,"innerHTML"],[1,"d-flex","align-items-center","gap-8","mt-2",2,"font-size","12px"],[1,"btn","btn-icon-only","fw-medium"],[1,"btn","btn-icon-only","fw-medium",3,"click"]],template:function(n,o){n&1&&(r(0,"p-toast",1),x(1,Xo,19,9,"ng-template",null,0,K),s()),n&2&&(ue(Pt(3,Zo)),c("baseZIndex",5e3))},dependencies:[bi,Wn],styles:[`.p-toast-custom .p-toast-message.p-toast-message-info,.p-toast-custom .p-toast-message.p-toast-message-success,.p-toast-custom .p-toast-message.p-toast-message-error{background-color:#fff!important;color:#000}.p-toast-custom .p-toast-message.p-toast-message-info{border-left:8px solid #0078d4!important}.p-toast-custom .p-toast-message.p-toast-message-success{border-left:8px solid #28a745!important}.p-toast-custom .p-toast-message.p-toast-message-error{border-left:8px solid #dc3545!important}.info-icon-color{color:#0078d4!important}.success-icon-color{color:#28a745!important}.error-icon-color{color:#dc3545!important}
|
|
266
|
-
`],encapsulation:2});let i=a;return i})();var nn=i=>[i];function ea(i,a){if(i&1){let t=S();r(0,"button",15),C("click",function(){u(t);let n=d(2);return h(n.onDetachMultipleProduct())}),g(1,"i",16),p(2),s()}if(i&2){let t,e=d(2);l(2),P("Detach (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function na(i,a){if(i&1&&(v(0),I(1,ea,3,1,"button",14),w()),i&2){let t=d();l(),T(t.productService.hasSelection(t.products)?1:-1)}}function ia(i,a){if(i&1){let t=S();r(0,"div",17)(1,"button",19),C("click",function(){u(t);let n=d(2);return h(n.onScanAllProducts())}),g(2,"i",20),p(3," Scan Channel "),s(),g(4,"button",21),r(5,"ul",22)(6,"li")(7,"a",23),C("click",function(){u(t);let n=d(2);return h(n.onScanAllV2Products())}),g(8,"i",20),p(9," Scan Channel V2 "),s()()()()}}function oa(i,a){if(i&1){let t=S();r(0,"button",24),C("click",function(){u(t);let n=d(2);return h(n.onScanMultipleProduct())}),g(1,"i",20),p(2),s()}if(i&2){let t=d(2);l(2),P(" Scan (",t.productService.selectedProduct(t.products).length,") ")}}function aa(i,a){if(i&1&&(v(0),I(1,ia,10,0,"div",17)(2,oa,3,1,"button",18),w()),i&2){let t=d();l(),T(t.productService.hasSelection(t.products)?t.multipeScanChannels.length>0&&t.productService.hasSelection(t.products)?2:-1:1)}}function ra(i,a){if(i&1){let t=S();r(0,"button",26),C("click",function(){u(t);let n=d(2);return h(n.onUploadMultipleProduct())}),g(1,"i",27),p(2),s()}if(i&2){let t=d(2);l(2),P(" Upload (",t.productService.selectedProduct(t.products).length,") ")}}function la(i,a){if(i&1&&(v(0),I(1,ra,3,1,"button",25),w()),i&2){let t=d();l(),T(t.productService.hasSelection(t.products)?1:-1)}}function sa(i,a){if(i&1){let t=S();r(0,"div",4)(1,"label",2),p(2,"Item ID"),s(),r(3,"input",28),E("ngModelChange",function(n){u(t);let o=d();return k(o.searchFilter.Item_id,n)||(o.searchFilter.Item_id=n),h(n)}),s()()}if(i&2){let t=d();l(3),F("ngModel",t.searchFilter.Item_id)}}function ca(i,a){if(i&1){let t=S();r(0,"div",29)(1,"app-product-card",30),C("onUpload",function(){let n=u(t).$implicit,o=d();return h(o.onUploadToMultipleChannel(n))})("onDescEvent",function(){let n=u(t).index,o=d();return h(o.onOpenVariantDetail(n))})("onScan",function(){let n=u(t).$implicit,o=d();return h(o.onScanSingleProduct(n))})("onCheckBoxChange",function(n){let o=u(t).$implicit;return h(o.selected=n)})("onDetach",function(){let n=u(t).$implicit,o=d();return h(o.onDetachProduct([n]))}),s()()}if(i&2){let t=a.$implicit,e=d();l(),c("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",e.productService.getChannelProduct(t))("code",e.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 da(i,a){i&1&&(v(0),r(1,"div",31),g(2,"app-empty-state"),s(),w())}function pa(i,a){if(i&1){let t=S();r(0,"div",32)(1,"div",33)(2,"app-custom-paginator",34),C("total",function(){u(t);let n=d();return h(n.getRowCount())})("next",function(){u(t);let n=d();return h(n.getProducts())})("previous",function(){u(t);let n=d();return h(n.getProducts())}),s()()()}if(i&2){let t=d();l(2),c("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var Ii=(()=>{let a=class a{constructor(e,n,o,m,_,b,vt,Ot,Be,Re){this.http=e,this.dialog=n,this.toastr=o,this.productService=m,this.activateRouter=_,this.authService=b,this.route=vt,this.uploadProductService=Ot,this.scanChannelToastr=Be,this.placeholderService=Re,this.searchFilter=new xt,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=f.GuidEMpty,this.multipeScanChannels=[],this.filterOptions=j({SearchComparatorTypeOptions:[],SearchSKUOnlyOrSKUNameOptions:[]}),this.searchPlaceholder=j("Search ..."),this.scanProductRole=G.ProductScan,this.uploadProductRole=G.ProductUpload,this.detachProductRole=G.ProductDetach,this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(e=>{e.ID?this.initPageLoader(e.ID):this.initPageLoader(f.GuidEMpty)})}initPageLoader(e){this.productService.loader(e).subscribe(n=>{this.filterOptions.set(n.Options),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.getProducts(),this.initSearchPlaceholder()})}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[D.Tokopedia,D.Tiktok])}getProducts(){let e={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.productService.findAllSoldInChannel(e).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(e){this.searchFilter.text=e,this.hasClickRowCount=!1,this.getProducts(),this.initSearchPlaceholder()}onOpenVariantDetail(e){let n=this.products[e].Variants;this.dialog.open(Oe,{data:{variants:n,title:this.products[e].Name}})}onScanAllProducts(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=f.GuidEMpty,this.dialog.open(H,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(N(o=>f.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}onScanAllV2Products(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=f.GuidEMpty,this.dialog.open(H,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(N(n=>f.IsNotEmpty(n)),Kt(n=>this.productService.scanProductV2(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async))).subscribe(()=>{this.initPageLoader(f.GuidEMpty)})}scanAllProduct(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(N(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,e,!this.searchFilter.UpdatedProduct),this.initPageLoader(f.GuidEMpty))})}onScanSingleProduct(e){e.Channel=this.productService.getChannelProduct(e);let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(H,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(N(o=>f.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID;let m=this.productService.getVariantCodesProduct(e);this.scanProducts(m)})}onUploadToMultipleChannel(e){this.uploadProductService.setSelectedProduct([e]),this.route.navigate(["/menu/products/upload"])}onScanMultipleProduct(){this.searchFilter.ChannelID=f.GuidEMpty;let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(H,{data:{filter:e,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(N(o=>f.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct;let m=this.productService.selectedProduct(this.products),_=this.productService.getVariantCodesProducts(m);this.scanProducts(_)})}scanProducts(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:n=>{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);n?this.toastr.success(`Product Successfully scan with ${o?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${o?.Name} `,"Error"),this.searchFilter.ChannelID=f.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=f.GuidEMpty}})}getVariantCode(e){let n;return e.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),e.length==1&&(n=e[0].Code),n}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(e),this.route.navigate(["/menu/products/upload"])}getRowCount(){let e={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",e).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Total})}onDetachProduct(e){let n=[];e.forEach(o=>{o.Channel=f.assignChannelLogo(o.Channel),n.push(...o.Channel)}),this.dialog.open(Ht,{width:"600px",data:[...n]}).afterClosed().pipe(N(o=>f.IsNotEmpty(o)),Kt(o=>this.productService.detachProduct(o))).subscribe(o=>{this.toastr.success(o.Message,ye.Success),this.getProducts()})}onDetachMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.onDetachProduct(e)}};a.\u0275fac=function(n){return new(n||a)(y(Y),y(dt),y(tt),y(ot),y(_e),y(ct),y(lt),y($t),y(Se),y(Gt))},a.\u0275cmp=M({type:a,selectors:[["app-sold-in-channel"]],standalone:!1,decls:27,vars:21,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"onSubmit","headerTitle","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],["bindLabel","Value","bindValue","Key","placeholder","Number Filter Comparator","name","numberFilterComparator","appendTo","body",3,"ngModelChange","items","ngModel"],[1,"mt-6"],[1,"border","border-1","rounded-1","p-4"],[3,"ngModelChange","options","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"],["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"],["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,o){n&1&&(r(0,"mainpanel",0),C("onSubmit",function(_){return o.searchProduct(_)}),r(1,"actions"),x(2,na,2,1,"ng-container",1)(3,aa,3,1,"ng-container",1)(4,la,2,1,"ng-container",1),s(),r(5,"filters")(6,"div")(7,"label",2),p(8,"Channel"),s(),r(9,"app-channel-options-v2",3),E("ngModelChange",function(_){return k(o.searchFilter.ListChannelID,_)||(o.searchFilter.ListChannelID=_),_}),s()(),I(10,sa,4,1,"div",4),r(11,"div",4)(12,"label",2),p(13,"Number Filter Comparator"),s(),r(14,"ng-select",5),E("ngModelChange",function(_){return k(o.searchFilter.NumberFilterComparator,_)||(o.searchFilter.NumberFilterComparator=_),_}),s()(),r(15,"div",6)(16,"label",2),p(17,"Search Type"),s(),r(18,"div",7)(19,"radio-options",8),E("ngModelChange",function(_){return k(o.searchFilter.SearchType,_)||(o.searchFilter.SearchType=_),_}),s()()()(),r(20,"content"),g(21,"scan-channel-toastr"),r(22,"div",9)(23,"div",10),x(24,ca,2,11,"div",11)(25,da,3,0,"ng-container",12),s(),x(26,pa,3,4,"div",13),s()()()),n&2&&(c("headerTitle","Sold in Channel")("searchBoxPlaceHolder",o.searchPlaceholder()),l(2),c("ngxPermissionsOnly",O(15,nn,o.detachProductRole)),l(),c("ngxPermissionsOnly",O(17,nn,o.scanProductRole)),l(),c("ngxPermissionsOnly",O(19,nn,o.uploadProductRole)),l(5),c("multiple",!0),F("ngModel",o.searchFilter.ListChannelID),l(),T(o.searchFilter.ListChannelID!=null?10:-1),l(4),c("items",o.filterOptions().SearchComparatorTypeOptions),F("ngModel",o.searchFilter.NumberFilterComparator),l(5),c("options",o.filterOptions().SearchSKUOnlyOrSKUNameOptions),F("ngModel",o.searchFilter.SearchType),l(5),c("ngForOf",o.products),l(),c("ngIf",o.products.length==0),l(),c("ngIf",o.products==null?null:o.products.length))},dependencies:[$,U,Bt,Z,J,it,_t,pt,St,at,st,yt,Ne,bt],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}"]});let i=a;return i})();var Ti=(()=>{let a=class a{get footerPageNumber(){return this._footerPageNumber}set footerPageNumber(e){this._footerPageNumber=e}get hideCount(){return this._hideCount}set hideCount(e){this._hideCount=e}get disableNextButton(){return this._disableNextButton}set disableNextButton(e){this._disableNextButton=e}get goToLastPage(){return this._goToLastPage}set goToLastPage(e){this._goToLastPage=e}constructor(e){this.http=e,this.pagination$=new Le(null),this.destroy$=new oe,this.data$=this.paginationFunction()}onNextPage(e){e.PageNumber+=1,this.pagination$.next(e)}setPageNumberFooter(e){this.footerPageNumber=e.PageNumber}setPaginationButtonState(e,n){n==0?this.disableNextButton=!0:this.disableNextButton=!(n<e.RowCount*e.PageNumber)}reloadPagination(e){f.IsEmpty(e.PageNumber)&&(e.PageNumber=1),this.pagination$.next(e),this.hideCount=!0,this.goToLastPage=!1}getAllData(e,n){e.RowCount=n,this.pagination$.next(e),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new Le(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe(Zt(this.destroy$),N(e=>e!=null),an(e=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(e)).pipe(wt(n=>n.Data))),ln(this.pagination$),rn((e,n)=>{let[o,m]=e,[_]=n;return m.PageNumber==1?[_,m]:[o.concat(_),m]}),Dt(([e,n])=>{this.setPageNumberFooter(n),this.setPaginationButtonState(n,e.length)}),wt(([e])=>e),ae())}};a.\u0275fac=function(n){return new(n||a)(cn(Y))},a.\u0275prov=re({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var Ae=i=>[i];function ua(i,a){if(i&1){let t=S();r(0,"button",17),C("click",function(){u(t);let n=d(3);return h(n.uploadMultipleProduct())}),g(1,"i",18),p(2),s()}if(i&2){let t=d(3);l(2),P(" upload (",t.selectedProducts==null?null:t.selectedProducts.length,") ")}}function ha(i,a){if(i&1&&(v(0),x(1,ua,3,1,"button",16),w()),i&2){let t=d(2);l(),c("ngIf",t.hasSelectionProduct)}}function ga(i,a){if(i&1){let t=S();v(0),r(1,"button",19),C("click",function(){u(t);let n=d(2);return h(n.openScanDialog())}),g(2,"i",20),p(3," Scan Channel "),s(),w()}}function _a(i,a){i&1&&(v(0),g(1,"th",28),w())}function Ca(i,a){if(i&1){let t=S();v(0),r(1,"td",35)(2,"input",36),E("ngModelChange",function(n){u(t);let o=d(3).$implicit;return k(o.selected,n)||(o.selected=n),h(n)}),C("ngModelChange",function(){u(t);let n=d(4).ngIf,o=d(3);return h(o.onSelectProduct(n))}),s()(),w()}if(i&2){let t=d(3).$implicit;l(),c("rowSpan",t==null?null:t.Variants.length),l(),F("ngModel",t.selected)}}function fa(i,a){if(i&1&&(v(0),x(1,Ca,3,2,"ng-container",15),w()),i&2){let t=d().index;l(),c("ngIf",t==0)}}function xa(i,a){if(i&1){let t=S();v(0),r(1,"img",41),C("click",function(n){u(t);let o=d(3).$implicit,m=d(4);return h(m.onZoomImage(n,o==null?null:o.ImageUrl))}),s(),w()}if(i&2){let t=d(3).$implicit;l(),c("src",t==null?null:t.ImageUrl,L)}}function Sa(i,a){i&1&&g(0,"img",42)}function ya(i,a){if(i&1&&(v(0),r(1,"td",35)(2,"div",37),x(3,xa,2,1,"ng-container",14)(4,Sa,1,0,"ng-template",null,1,K),s()(),r(6,"td",38)(7,"h4",39)(8,"span",40),p(9),s()()(),w()),i&2){let t=Q(5),e=d(2).$implicit;l(),c("rowSpan",e==null?null:e.Variants.length),l(2),c("ngIf",e==null?null:e.ImageUrl)("ngIfElse",t),l(3),c("rowSpan",e==null?null:e.Variants.length),l(2),c("matTooltip",(e==null||e.Name==null?null:e.Name.length)>50?e==null?null:e.Name:""),l(),P(" ",e==null?null:e.Name," ")}}function ba(i,a){if(i&1&&(r(0,"div")(1,"a",31),g(2,"img",43),s()()),i&2){let t=a.$implicit;l(),c("href",t.URL,L),l(),c("src",t.Img,L)("matTooltip",t.Name)}}function va(i,a){if(i&1&&(r(0,"div"),g(1,"img",43),s()),i&2){let t=a.$implicit;l(),c("src",t.Img,L)("matTooltip",t.Name)}}function wa(i,a){if(i&1&&(r(0,"tr"),x(1,fa,2,1,"ng-container",4)(2,ya,10,6,"ng-container",15),r(3,"td"),p(4),s(),r(5,"td")(6,"span"),p(7),s(),r(8,"span",30)(9,"a",31),g(10,"i",32),s()()(),r(11,"td",33)(12,"div",34),x(13,ba,3,3,"div",29),s()(),r(14,"td",33)(15,"div",34),x(16,va,2,2,"div",29),s()()()),i&2){let t=a.$implicit,e=a.index,n=d(5);l(),c("ngxPermissionsOnly",O(7,Ae,n.uploadProductRole)),l(),c("ngIf",e==0),l(2),P(" ",t.Name," "),l(3),P(" ",t.Code," "),l(2),c("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),L),l(4),c("ngForOf",t==null?null:t.Available),l(3),c("ngForOf",t==null?null:t.NotAvailable)}}function Pa(i,a){if(i&1&&(v(0),x(1,wa,17,9,"tr",29),w()),i&2){let t=a.$implicit;l(),c("ngForOf",t.Variants)}}function Ia(i,a){if(i&1&&(r(0,"tbody"),x(1,Pa,2,1,"ng-container",29),s()),i&2){let t=a.ngIf;l(),c("ngForOf",t)}}function Ta(i,a){if(i&1&&(v(0),r(1,"div",21)(2,"table",22)(3,"thead",23)(4,"tr"),x(5,_a,2,0,"ng-container",4),r(6,"th",24),p(7," Product "),s(),r(8,"th",25),p(9,"Variant"),s(),r(10,"th",25),p(11,"SKU"),s(),r(12,"th",26),p(13,"Available In"),s(),r(14,"th",27),p(15,"Not Available In"),s()()(),x(16,Ia,2,1,"tbody",15),V(17,"async"),s()(),w()),i&2){let t=d(2);l(5),c("ngxPermissionsOnly",O(4,Ae,t.uploadProductRole)),l(11),c("ngIf",B(17,2,t.data$))}}function Ma(i,a){i&1&&(r(0,"div",44),g(1,"app-empty-state"),s())}function Oa(i,a){if(i&1){let t=S();r(0,"span",52),C("click",function(){u(t);let n=d(4);return h(n.getRowCount())}),r(1,"i",53),p(2,"?"),s()()}}function Da(i,a){if(i&1&&(r(0,"span"),p(1),V(2,"number"),s()),i&2){let t=a.ngIf;l(),A(B(2,1,t==null?null:t.Count))}}function Fa(i,a){if(i&1){let t=S();r(0,"a",54),C("click",function(){u(t);let n=d(4);return h(n.onNextPage())}),g(1,"i",55),p(2," Next"),s()}}function ka(i,a){if(i&1){let t=S();r(0,"a",56),C("click",function(){u(t);let n=d(4);return h(n.onLastPage())}),g(1,"i",57),p(2," Last"),s()}}function Ea(i,a){if(i&1&&(v(0),r(1,"div",45)(2,"div",46)(3,"div",47),p(4),V(5,"number"),x(6,Oa,3,0,"span",48)(7,Da,3,3,"span",15),V(8,"async"),p(9),s()(),r(10,"div",49),x(11,Fa,3,0,"a",50)(12,ka,3,0,"a",51),s()(),w()),i&2){let t=d().ngIf,e=d(2);l(4),P(" Showing 1 - ",B(5,6,t==null?null:t.length)," of "),l(2),c("ngIf",e.paginationService.hideCount),l(),c("ngIf",!e.paginationService.hideCount&&B(8,8,e.rowCount$)),l(2),P(" records ~ ",e.paginationService.footerPageNumber," Page "),l(2),c("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage),l(),c("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage)}}function Va(i,a){if(i&1&&(v(0),x(1,Ea,13,10,"ng-container",15),w()),i&2){let t=a.ngIf;l(),c("ngIf",(t==null?null:t.length)>0)}}function Na(i,a){if(i&1){let t=S();r(0,"mainpanel",3),C("onSubmit",function(n){u(t);let o=d();return h(o.searchProduct(n))}),r(1,"actions"),x(2,ha,2,1,"ng-container",4)(3,ga,4,0,"ng-container",4),r(4,"button",5),C("click",function(){u(t);let n=d();return h(n.openExportDialog())}),g(5,"i",6),r(6,"span"),p(7,"Export"),s()()(),r(8,"filters")(9,"div",7)(10,"label",8),p(11,"Number Filter Comparator"),s(),r(12,"ng-select",9),E("ngModelChange",function(n){u(t);let o=d();return k(o.searchFilter.NumberFilterComparator,n)||(o.searchFilter.NumberFilterComparator=n),h(n)}),s()(),r(13,"div",7)(14,"label",8),p(15,"Search Type"),s(),r(16,"div",10)(17,"radio-options",11),E("ngModelChange",function(n){u(t);let o=d();return k(o.searchFilter.SearchType,n)||(o.searchFilter.SearchType=n),h(n)}),s()()()(),r(18,"content")(19,"div",12)(20,"div",13),x(21,Ta,18,6,"ng-container",14),V(22,"async"),x(23,Ma,2,0,"ng-template",null,0,K),s(),x(25,Va,2,1,"ng-container",15),V(26,"async"),s()()()}if(i&2){let t,e=a.ngIf,n=Q(24),o=d();c("searchBoxPlaceHolder",o.searchPlaceholder()),l(2),c("ngxPermissionsOnly",O(14,Ae,o.uploadProductRole)),l(),c("ngxPermissionsOnly",O(16,Ae,o.scanProductRole)),l(9),c("items",e==null||e.Options==null?null:e.Options.SearchComparatorTypeOptions),F("ngModel",o.searchFilter.NumberFilterComparator),l(5),c("options",e==null||e.Options==null?null:e.Options.SearchSKUOnlyOrSKUNameOptions),F("ngModel",o.searchFilter.SearchType),l(4),c("ngIf",((t=B(22,10,o.data$))==null?null:t.length)>0)("ngIfElse",n),l(4),c("ngIf",B(26,12,o.data$))}}var Mi=(()=>{let a=class a{constructor(e,n,o,m,_,b,vt,Ot,Be,Re){this.http=e,this.dialog=n,this.toastr=o,this.route=m,this.productService=_,this.paginationService=b,this.biggerPictureService=vt,this.authService=Ot,this.uploadProductService=Be,this.placeholderService=Re,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.scanProductRole=G.ProductScan,this.uploadProductRole=G.ProductUpload,this.searchPlaceholder=j("Search ..."),this.channelOptions=Ot.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(Dt(e=>{this.searchFilter=e.Filter,this.paginationService.reloadPagination(e.Filter),this.initSearchPlaceholder()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}iniData(){this.data$=this.paginationService.data$.pipe(wt(e=>(e=e.map(n=>(n.Variants=n.Variants.map(o=>(o.Available=this.productService.sortChannel(o.Available),o.NotAvailable=this.productService.sortChannel(o.NotAvailable),o.Available=this.assignLogoChannel(o.Available),o.NotAvailable=this.assignLogoChannel(o.NotAvailable),o)),n.Channel=n?.Variants[0]?.Available,n)),e)))}assignLogoChannel(e){return e=e.map(n=>(n.Img=f.getChannelLogoByTypeId(n.TypeID),n)),e}searchProduct(e){this.searchFilter.text=e,this.paginationService.reloadPagination(this.searchFilter),this.initSearchPlaceholder()}scanAllProduct(){let e=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.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=f.GuidEMpty,this.dialog.open(H,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(N(o=>f.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e.Count)}})}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}onSelectProduct(e){this.hasSelectionProduct=this.productService.hasSelection(e),this.selectedProducts=this.productService.selectedProduct(e)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(di,{data:{title:"Export Not In Channel",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}};a.\u0275fac=function(n){return new(n||a)(y(Y),y(dt),y(tt),y(lt),y(ot),y(Ti),y(oi),y(ct),y($t),y(Gt))},a.\u0275cmp=M({type:a,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,"searchBoxPlaceHolder","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"mb-5"],[1,"fw-bold","mb-2"],["bindLabel","Value","bindValue","Key","placeholder","Number Filter Comparator","name","numberFilterComparator","appendTo","body",3,"ngModelChange","items","ngModel"],[1,"border","border-1","rounded-1","p-4"],[3,"ngModelChange","options","ngModel"],[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,o){n&1&&(x(0,Na,27,18,"mainpanel",2),V(1,"async")),n&2&&c("ngIf",B(1,1,o.loader$))},dependencies:[$,U,bn,Z,J,it,Ct,_t,at,st,yt,gt,At],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%}"]});let i=a;return i})();var on=i=>[i],Aa=()=>[];function Ba(i,a){if(i&1){let t=S();r(0,"button",18),C("click",function(){u(t);let n=d(2);return h(n.openScanDialog())}),g(1,"i",19),p(2," Scan Channel "),s()}}function Ra(i,a){if(i&1&&(v(0),I(1,Ba,3,0,"button",17),w()),i&2){let t=d();l(),T(t.productService.hasSelection(t.products)?-1:1)}}function La(i,a){if(i&1){let t=S();r(0,"button",21),C("click",function(){u(t);let n=d(2);return h(n.onDownloadAllProduct("SELECTED"))}),g(1,"i",22),p(2),s()}if(i&2){let t,e=d(2);l(2),P(" Download (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function Ua(i,a){if(i&1&&(v(0),I(1,La,3,1,"button",20),w()),i&2){let t=d();l(),T(t.productService.hasSelection(t.products)?1:-1)}}function ja(i,a){if(i&1){let t=S();r(0,"div",23)(1,"app-product-card",24),C("onCheckBoxChange",function(n){let o=u(t).index,m=d();return h(m.onSelectProduct(n,o))})("onDescEvent",function(){let n=u(t).index,o=d();return h(o.onShowVariantDetail(n))})("onDownload",function(){let n=u(t).$implicit,o=d();return h(o.onDownloadProduct(n))})("onScan",function(){let n=u(t).$implicit,o=d();return h(o.onScanChannel(n))}),s()()}if(i&2){let t=a.$implicit,e=d();l(),c("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?O(10,on,t==null?null:t.Channel):Pt(12,Aa))("showCheckBox",e.hasDownloadRole())("scanButton",!0)}}function Wa(i,a){i&1&&(v(0),r(1,"div",25),g(2,"app-empty-state"),s(),w())}function $a(i,a){if(i&1){let t=S();r(0,"div",26)(1,"div",27)(2,"app-custom-paginator",28),C("total",function(){u(t);let n=d();return h(n.getRowCount())})("next",function(){u(t);let n=d();return h(n.getProducts())})("previous",function(){u(t);let n=d();return h(n.getProducts())}),s()()()}if(i&2){let t=d();l(2),c("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var Oi=(()=>{let a=class a{constructor(e,n,o,m,_,b,vt){this.http=e,this.dialog=n,this.productService=o,this.toastrService=m,this.activateRouter=_,this.authService=b,this.placeholderService=vt,this.permissionService=R(Tn),this.searchFilter=new xt,this.products=[],this.hasClickRowCount=!1,this.scanProductRole=G.ProductScan,this.downloadProductRole=G.ProductDownload,this.hasDownloadRole=j(!0),this.searchPlaceholder=j("Search ..."),this.channelOptions=this.authService.getChannels(),this.permissionService.hasPermission(this.downloadProductRole).then(Ot=>{this.hasDownloadRole.set(Ot)})}ngOnInit(){this.activateRouter.queryParams.subscribe(e=>{e.ID?this.initPageLoader(e.ID):this.initPageLoader(f.GuidEMpty)})}initPageLoader(e){this.loader$=this.productService.loader(e).pipe(Dt(n=>{this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.getProducts(),this.initSearchPlaceholder()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(e=>{this.products=e.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let e;this.products=this.products.map(n=>(e=this.channelOptions.find(o=>o.ID==n.ChannelID),e?n.Channel=JSON.parse(JSON.stringify(e)):n.Channel=null,n)).map(n=>(n.Channel&&(n.Channel.Url=n.Url),n))}setSkuProduct(){this.products=this.products.map(e=>(e?.Variant?.length==0?f.IsNotEmpty(e?.ChannelItemSKU)?e.SKU=e?.ChannelItemSKU:e.SKU="SKU not assigned":e.SKU=e?.Variant[0]?.ChannelVariationSKU?e?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",e))}onSearch(e){this.searchFilter.text=e,this.hasClickRowCount=!1,this.getProducts(),this.initSearchPlaceholder()}onClearChannelFilter(){this.searchFilter.ChannelID=f.GuidEMpty}onScanAll(){let e=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,e,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=f.GuidEMpty})}openScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=f.GuidEMpty,this.dialog.open(H,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(N(o=>f.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.Async=o.Async,this.onScanAll()})}onDownloadAllProduct(e){let n;e=="ALL"?n=this.products:n=this.productService.selectedProduct(this.products),n.length>0&&this.productService.downloadMultipleProduct(n).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(e,n){this.products[n].selected=e}onDownloadProduct(e){confirm(`Are you sure you want to Retrieve product ${e?.Name} from ${e?.Channel.Name} to POS?`)&&this.productService.downloadProduct(e).subscribe({next:()=>{this.getProducts()}})}onScanChannel(e){let n=JSON.parse(JSON.stringify(e));delete n.Channel,this.productService.scanCompareToPos([n]).subscribe(o=>{o.Status?(this.initPageLoader(f.GuidEMpty),this.toastrService.success(`product ${e.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${e.Name} is not existed in POS`,"Error")})}onShowVariantDetail(e){let n=this.products[e].Variant;n.length>0&&this.dialog.open(pi,{data:{title:this.products[e].Name,variants:n},width:"30%"})}getRowCount(){let e={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",e).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Count})}};a.\u0275fac=function(n){return new(n||a)(y(Y),y(dt),y(ot),y(tt),y(_e),y(ct),y(Gt))},a.\u0275cmp=M({type:a,selectors:[["app-not-in-pos"]],standalone:!1,decls:40,vars:22,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[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"],["bindLabel","Value","bindValue","Key","placeholder","Number Filter Comparator","name","numberFilterComparator","appendTo","body",3,"ngModelChange","items","ngModel"],[1,"border","border-1","rounded-1","p-4"],[3,"ngModelChange","options","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,"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,o){if(n&1){let m=S();gn(0),V(1,"async"),r(2,"mainpanel",0),C("onSubmit",function(b){return u(m),h(o.onSearch(b))}),r(3,"actions"),x(4,Ra,2,1,"ng-container",1)(5,Ua,2,1,"ng-container",1),s(),r(6,"filters")(7,"div",2)(8,"label",3),p(9,"Channel"),s(),r(10,"app-channel-options-v2",4),E("ngModelChange",function(b){return u(m),k(o.searchFilter.ChannelID,b)||(o.searchFilter.ChannelID=b),h(b)}),s()(),r(11,"div",2)(12,"label",5),p(13,"SKU Assigned"),s(),r(14,"mat-radio-group",6),E("ngModelChange",function(b){return u(m),k(o.searchFilter.HaveSku,b)||(o.searchFilter.HaveSku=b),h(b)}),r(15,"mat-radio-button",7),p(16," All "),s(),r(17,"mat-radio-button",7),p(18," Yes "),s(),r(19,"mat-radio-button",7),p(20," No "),s()()(),r(21,"div",2)(22,"label",5),p(23,"Item ID"),s(),r(24,"input",8),E("ngModelChange",function(b){return u(m),k(o.searchFilter.Item_id,b)||(o.searchFilter.Item_id=b),h(b)}),s()(),r(25,"div",2)(26,"label",3),p(27,"Number Filter Comparator"),s(),r(28,"ng-select",9),E("ngModelChange",function(b){return u(m),k(o.searchFilter.NumberFilterComparator,b)||(o.searchFilter.NumberFilterComparator=b),h(b)}),s()(),r(29,"div")(30,"label",3),p(31,"Search Type"),s(),r(32,"div",10)(33,"radio-options",11),E("ngModelChange",function(b){return u(m),k(o.searchFilter.SearchType,b)||(o.searchFilter.SearchType=b),h(b)}),s()()()(),r(34,"content")(35,"div",12)(36,"div",13),x(37,ja,2,13,"div",14)(38,Wa,3,0,"ng-container",15),s(),x(39,$a,3,4,"div",16),s()()()}if(n&2){let m=B(1,16,o.loader$);l(2),c("searchBoxPlaceHolder",o.searchPlaceholder()),l(2),c("ngxPermissionsOnly",O(18,on,o.scanProductRole)),l(),c("ngxPermissionsOnly",O(20,on,o.downloadProductRole)),l(5),F("ngModel",o.searchFilter.ChannelID),l(4),F("ngModel",o.searchFilter.HaveSku),l(),c("value",0),l(2),c("value",1),l(2),c("value",2),l(5),F("ngModel",o.searchFilter.Item_id),l(4),c("items",m==null||m.Options==null?null:m.Options.SearchComparatorTypeOptions),F("ngModel",o.searchFilter.NumberFilterComparator),l(5),c("options",m==null||m.Options==null?null:m.Options.SearchSKUOnlyOrSKUNameOptions),F("ngModel",o.searchFilter.SearchType),l(4),c("ngForOf",o.products),l(),c("ngIf",o.products.length==0),l(),c("ngIf",(o.products==null?null:o.products.length)>0)}},dependencies:[$,U,Bt,Z,J,it,_t,Ie,Te,pt,St,at,st,yt,bt,gt],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}"]});let i=a;return i})();function Ga(i,a){if(i&1&&(r(0,"div",10),g(1,"app-duplicate-product-card",11),s()),i&2){let t=a.$implicit,e=a.index;l(),c("imageForZoom",t.ImageUrl)("title",t.Name)("code",t.Code)("id",e)("image",t.ThumbnailURL)("channels",t.Channels)("totalChannel",t.Total)}}function za(i,a){i&1&&(v(0),r(1,"div",12),g(2,"app-empty-state"),s(),w())}function Ha(i,a){if(i&1){let t=S();v(0),r(1,"div",13)(2,"div",14)(3,"app-custom-paginator",15),C("next",function(){u(t);let n=d();return h(n.getProducts())})("previous",function(){u(t);let n=d();return h(n.getProducts())})("total",function(){u(t);let n=d();return h(n.getRowCount())}),s()()(),w()}if(i&2){let t=d();l(3),c("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickedRowCount)}}var Di=(()=>{let a=class a{constructor(e,n){this.httpService=e,this.productService=n,this.searchFilter=new xt,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){let e={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",e).subscribe(n=>{this.products=n.Data})}onSearch(e){this.searchFilter.text=e,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=f.GuidEMpty}getChannelLogo(e){return f.getChannelLogoByTypeId(e)}getRowCount(){let e={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",e).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}};a.\u0275fac=function(n){return new(n||a)(y(Y),y(ot))},a.\u0275cmp=M({type:a,selectors:[["app-duplicate-sku"]],standalone:!1,decls:18,vars:5,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["routerLink","/menu/products/status/duplicate-sku/table",1,"btn","btn-outline-secondary","btn-lg","d-flex","align-items-center","gap-2"],[1,"fa-solid","fa-table"],["container",""],[1,"mb-2"],[3,"ngModelChange","multiple","ngModel"],[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,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels","totalChannel"],[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,o){n&1&&(r(0,"mainpanel",0),C("onSubmit",function(_){return o.onSearch(_)}),r(1,"actions")(2,"a",1),g(3,"i",2),r(4,"span"),p(5,"Table View"),s()()(),r(6,"filters")(7,"div",3)(8,"div")(9,"h6",4),p(10,"Channel"),s(),r(11,"app-channel-options-v2",5),E("ngModelChange",function(_){return k(o.searchFilter.ListChannelID,_)||(o.searchFilter.ListChannelID=_),_}),s()()()(),r(12,"content")(13,"div",6)(14,"div",7),x(15,Ga,2,7,"div",8)(16,za,3,0,"ng-container",9),s(),x(17,Ha,4,4,"ng-container",9),s()()()),n&2&&(l(11),c("multiple",!0),F("ngModel",o.searchFilter.ListChannelID),l(4),c("ngForOf",o.products),l(),c("ngIf",(o.products==null?null:o.products.length)==0),l(),c("ngIf",(o.products==null?null:o.products.length)>0))},dependencies:[$,U,Z,J,it,Me,pt,Ce,at,bt],encapsulation:2});let i=a;return i})();var Ka=()=>["/menu/products/status/sold-in-channel"],Fi=i=>({ID:i}),Za=()=>["/menu/products/status/not-in-pos"],Ja=i=>[i];function Ya(i,a){if(i&1&&(v(0),p(1),w()),i&2){let t=d().$implicit;l(),P(" ",t.Count," ")}}function qa(i,a){if(i&1){let t=S();r(0,"span",25),C("click",function(){u(t);let n=d().$implicit,o=d(2);return h(o.getLiveProductCount(n.ID,n))}),g(1,"i",26),s()}}function Qa(i,a){if(i&1){let t=S();v(0),r(1,"button",27),C("click",function(){u(t);let n=d().$implicit,o=d(2);return h(o.onScanChannel(n))}),g(2,"i",28),p(3," Scan "),s(),w()}}function Xa(i,a){if(i&1){let t=S();r(0,"tr")(1,"td"),g(2,"img",17),r(3,"span",18),p(4),s()(),r(5,"td",19),x(6,Ya,2,1,"ng-container",6)(7,qa,2,0,"ng-template",null,1,K),s(),r(9,"td",19)(10,"a",20),p(11),V(12,"number"),s()(),r(13,"td",19)(14,"a",20),p(15),V(16,"number"),s()(),r(17,"td"),p(18),V(19,"date"),s(),r(20,"td")(21,"div",21),x(22,Qa,4,0,"ng-container",22),r(23,"button",23),C("click",function(){let n=u(t).$implicit,o=d(2);return h(o.onClearCache(n.ID))}),g(24,"i",24),p(25," Clear "),s()()()()}if(i&2){let t=a.$implicit,e=Q(8),n=d(2);l(2),c("src",n.getChannelLogo(t.TypeID),L),l(2),A(t.Name),l(2),c("ngIf",t.Count!==void 0)("ngIfElse",e),l(4),c("routerLink",Pt(19,Ka))("queryParams",O(20,Fi,t.ID)),l(),P(" ",B(12,12,t.SoldInChannel)," "),l(3),c("routerLink",Pt(22,Za))("queryParams",O(23,Fi,t.ID)),l(),P(" ",B(16,14,t.NotInPOS)," "),l(3),P(" ",t.LastSync?_n(19,16,t.LastSync,"dd MMM yyyy HH:mm"):"Never"," "),l(4),c("ngxPermissionsOnly",O(25,Ja,n.scanProductRole))}}function tr(i,a){if(i&1&&(v(0),r(1,"div",7)(2,"table",8)(3,"thead",9)(4,"tr",10)(5,"th"),p(6,"Channel"),s(),r(7,"th",11),p(8," Live Product "),s(),r(9,"th",12),p(10," Sold In Channel "),s(),r(11,"th",13),p(12," Product Not in POS "),s(),r(13,"th",14),p(14,"Last Sync"),s(),g(15,"th",15),s()(),r(16,"tbody"),x(17,Xa,26,27,"tr",16),V(18,"async"),s()()(),w()),i&2){let t,e=d();l(17),c("ngForOf",(t=B(18,1,e.channels$))==null?null:t.Data)}}function er(i,a){i&1&&(r(0,"div",29),g(1,"app-empty-state"),s())}var ki=(()=>{let a=class a{constructor(e,n,o,m){this.productService=e,this.toastr=n,this.dialog=o,this.authService=m,this.scanProductRole=G.ProductScan,this.destroy$=new oe,this.channelOptions=m.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(e,n){this.productService.getTotalProductLive(e).pipe(Zt(this.destroy$)).subscribe(o=>{n.Count=o.Count})}onScanChannel(e){this.dialog.open(H,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:e.ID},disabledChannelOption:!0}}).afterClosed().pipe(N(n=>f.IsNotEmpty(n))).subscribe(n=>{this.scanAllProduct(e.ID,n)})}scanAllProduct(e,n){let o=this.productService.findChannelById(e,this.channelOptions);this.productService.scanAll(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async).pipe(N(m=>m)).subscribe(m=>{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(m,o,!n.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(e){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(e).pipe(Zt(this.destroy$)).subscribe(o=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(e){return f.getChannelLogoByTypeId(e)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};a.\u0275fac=function(n){return new(n||a)(y(ot),y(tt),y(dt),y(ct))},a.\u0275cmp=M({type:a,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,o){if(n&1&&(r(0,"mainpanel",2)(1,"content")(2,"div",3)(3,"div",4)(4,"div",5),x(5,tr,19,3,"ng-container",6),V(6,"async"),x(7,er,2,0,"ng-template",null,0,K),s()()()()()),n&2){let m,_=Q(8);c("hideSearchBox",!0)("hideSearchDropdown",!0),l(5),c("ngIf",((m=B(6,4,o.channels$))==null||m.Data==null?null:m.Data.length)>0)("ngIfElse",_)}},dependencies:[$,U,it,Ct,Ce,at,st,gt,At,xn],encapsulation:2});let i=a;return i})();var nr=[{component:ui,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:xi,canActivate:[et,nt],data:{title:"Products in POS"}},{path:"sold-in-channel",component:Ii,canActivate:[et,nt],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:Mi,canActivate:[et,nt],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:Oi,canActivate:[et,nt],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:Di,canActivate:[et,nt],data:{title:"Duplicate Sku in Channel"}},{path:"duplicate-sku/table",loadComponent(){return import("./chunk-XBDQR2BA.js").then(i=>i.DuplicateSkuV2Component)},canActivate:[et,nt],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:ki,canActivate:[et,nt],data:{title:"Channel Statistic"}},{path:"notification",loadComponent(){return import("./chunk-DPQMNLFO.js").then(i=>i.NotificationComponent)},canActivate:[et,nt],data:{title:"Notification"}},{path:"notificationV2",loadComponent(){return import("./chunk-2LCP6ZFH.js").then(i=>i.NotificationV2Component)},canActivate:[et,nt],data:{title:"Notification"}},{path:"notification/detailV2",loadComponent(){return import("./chunk-CNTLG54D.js").then(i=>i.DetailComponent)},canActivate:[et,nt],data:{title:"Notification Detail"}},{path:"notification/detail",loadComponent(){return import("./chunk-GQCDEPDY.js").then(i=>i.DetailComponent)},canActivate:[et,nt],data:{title:"Notification Detail"}}]}],Tc=(()=>{let a=class a{};a.\u0275fac=function(n){return new(n||a)},a.\u0275mod=je({type:a}),a.\u0275inj=Ue({imports:[q,Rt,Bn,ft,Dn,mi,Yn,An,Me,pt,St,yn.forChild(nr),ci,Xn,Ht,Mn,yt,Ne,bt]});let i=a;return i})();export{Tc as StatusModule};
|