marketplacepos 5.41.2 → 5.41.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/3rdpartylicenses.txt +123 -123
- package/Marketplace/chunk-26DZ5AMC.js +1 -0
- package/Marketplace/chunk-2BBMPSAE.js +93 -0
- package/Marketplace/{chunk-ZIUDNFYT.js → chunk-2G6NLWKN.js} +1 -1
- package/Marketplace/chunk-3E5FYRN4.js +1 -0
- package/Marketplace/chunk-3PNMJUYQ.js +15 -0
- package/Marketplace/chunk-4AMQ66FW.js +1 -0
- package/Marketplace/chunk-4ASUM4N5.js +1 -0
- package/Marketplace/chunk-4G3QN54S.js +193 -0
- package/Marketplace/chunk-4NRAXW65.js +1 -0
- package/Marketplace/chunk-4RTZASVJ.js +1 -0
- package/Marketplace/chunk-4XMCJ7I5.js +1 -0
- package/Marketplace/{chunk-UMY6NG57.js → chunk-5GX2GLRY.js} +1 -1
- package/Marketplace/chunk-5KMCSNS6.js +2 -0
- package/Marketplace/{chunk-25OT4I3W.js → chunk-5MRT2EFE.js} +1 -1
- package/Marketplace/chunk-5S6SIKR7.js +1 -0
- package/Marketplace/chunk-62PFQNHJ.js +1 -0
- package/Marketplace/chunk-6AKFGBPY.js +4 -0
- package/Marketplace/chunk-6ALHX2I4.js +1 -0
- package/Marketplace/{chunk-SYENQYR7.js → chunk-6IAGGRZN.js} +1 -1
- package/Marketplace/{chunk-FWG4H3QG.js → chunk-6NNAICJE.js} +1 -1
- package/Marketplace/{chunk-WGXUKTYP.js → chunk-6XFYITUD.js} +1 -1
- package/Marketplace/{chunk-4CTORK4F.js → chunk-7477X7LJ.js} +1 -1
- package/Marketplace/{chunk-R76V3PTN.js → chunk-75BDXSG3.js} +10 -10
- package/Marketplace/{chunk-ACIMXBIC.js → chunk-77IUCPIQ.js} +1 -1
- package/Marketplace/{chunk-ZR5IXNXB.js → chunk-7FUVW73P.js} +1 -1
- package/Marketplace/chunk-7GQIIDFF.js +4 -0
- package/Marketplace/{chunk-PO7JVKK3.js → chunk-7TWBIV3T.js} +1 -1
- package/Marketplace/chunk-7XREAR3H.js +1 -0
- package/Marketplace/chunk-AMXLXRQK.js +1 -0
- package/Marketplace/chunk-AWDLMHBL.js +1 -0
- package/Marketplace/{chunk-6X2OBNJQ.js → chunk-BIQHA7UA.js} +4 -4
- package/Marketplace/{chunk-4M63ID5T.js → chunk-BUFEIJAI.js} +1 -1
- package/Marketplace/{chunk-SIYMMMKQ.js → chunk-CH2MLZU7.js} +1 -1
- package/Marketplace/chunk-CHZLFJFI.js +3 -0
- package/Marketplace/chunk-CMCNEAGC.js +1 -0
- package/Marketplace/{chunk-KX5AWR75.js → chunk-COBHWPGI.js} +1 -1
- package/Marketplace/chunk-CPAHXWMO.js +1 -0
- package/Marketplace/chunk-CTN7GW4H.js +1 -0
- package/Marketplace/chunk-CYZQNZDB.js +1 -0
- package/Marketplace/chunk-D54NUPYF.js +153 -0
- package/Marketplace/chunk-DI4V7KMK.js +1 -0
- package/Marketplace/chunk-DPLEMBB4.js +1 -0
- package/Marketplace/{chunk-PBGDP6XV.js → chunk-DRSUXHAY.js} +1 -1
- package/Marketplace/chunk-DZ2EE5MV.js +1 -0
- package/Marketplace/chunk-E3HMIPER.js +2 -0
- package/Marketplace/{chunk-JOBWFOGC.js → chunk-EGTYAIU5.js} +1 -1
- package/Marketplace/{chunk-OKAPL3YZ.js → chunk-G6EG5QJS.js} +1 -1
- package/Marketplace/{chunk-IKPRRD5D.js → chunk-GBABJLPQ.js} +1 -1
- package/Marketplace/{chunk-KQQCKHF3.js → chunk-GBXNTL4E.js} +1 -1
- package/Marketplace/{chunk-ZIOAOUAM.js → chunk-GHQH62TZ.js} +1 -1
- package/Marketplace/chunk-GJOCO2OS.js +2 -0
- package/Marketplace/chunk-GPEVUTDI.js +2 -0
- package/Marketplace/chunk-GSH5BYZ6.js +1 -0
- package/Marketplace/{chunk-R5TTZPDX.js → chunk-GSPHYK6J.js} +11 -11
- package/Marketplace/chunk-HKYVBAMV.js +1 -0
- package/Marketplace/{chunk-GPC4DECX.js → chunk-IEYFOHME.js} +1 -1
- package/Marketplace/chunk-IIJMZKPL.js +1 -0
- package/Marketplace/{chunk-A2YNWIX6.js → chunk-IYYVZ6B6.js} +1 -1
- package/Marketplace/{chunk-XQGRC7V2.js → chunk-J3P46Z53.js} +1 -1
- package/Marketplace/{chunk-LHD7CYML.js → chunk-J7AGLBPL.js} +1 -1
- package/Marketplace/{chunk-NRCXYGO3.js → chunk-JBKHY4HH.js} +5 -5
- package/Marketplace/chunk-JDEKWXPV.js +1 -0
- package/Marketplace/chunk-JFJCXZD3.js +1 -0
- package/Marketplace/chunk-K2H6WANG.js +1 -0
- package/Marketplace/{chunk-HPYTL6TX.js → chunk-KHWTOD6H.js} +1 -1
- package/Marketplace/{chunk-KJHSB4A2.js → chunk-KQOYVGBL.js} +1 -1
- package/Marketplace/chunk-KVP6OL4J.js +2 -0
- package/Marketplace/{chunk-2TZBEYNY.js → chunk-KXZCGKQW.js} +1 -1
- package/Marketplace/chunk-LPXBSHUI.js +180 -0
- package/Marketplace/{chunk-LSXUXG54.js → chunk-M3SJUKTG.js} +1 -1
- package/Marketplace/chunk-MATSRG2L.js +447 -0
- package/Marketplace/{chunk-XEMNZHW6.js → chunk-MNFHFW3E.js} +1 -1
- package/Marketplace/{chunk-MCJRJUAO.js → chunk-NMJGLMWI.js} +1 -1
- package/Marketplace/{chunk-TNKPTRB3.js → chunk-OE2JYQHN.js} +1 -1
- package/Marketplace/{chunk-6MPSYC77.js → chunk-OLSC6KHB.js} +1 -1
- package/Marketplace/chunk-PJ72KMDS.js +1 -0
- package/Marketplace/{chunk-JRWFZQ5K.js → chunk-PPDHTO44.js} +1 -1
- package/Marketplace/chunk-PVUSCHKJ.js +1 -0
- package/Marketplace/chunk-PXB4YEY3.js +1 -0
- package/Marketplace/{chunk-M5IQRAHV.js → chunk-Q2OEJFVT.js} +1 -1
- package/Marketplace/chunk-Q2R4GEW5.js +1 -0
- package/Marketplace/{chunk-6LH7FSOW.js → chunk-Q72ZXPDP.js} +1 -1
- package/Marketplace/{chunk-SXLKJLAE.js → chunk-QCZIDOKW.js} +1 -1
- package/Marketplace/chunk-RBC7ADJF.js +1 -0
- package/Marketplace/chunk-REFJUWLL.js +5 -0
- package/Marketplace/{chunk-FBZW4Y3J.js → chunk-RGR34QZ3.js} +1 -1
- package/Marketplace/{chunk-MQXPOHBV.js → chunk-RIHLYYZU.js} +1 -1
- package/Marketplace/chunk-RIYAYANU.js +1 -0
- package/Marketplace/{chunk-55OI2SUF.js → chunk-RVYGL22E.js} +1 -1
- package/Marketplace/chunk-T5ONJF63.js +7 -0
- package/Marketplace/chunk-T6QOFDEE.js +1 -0
- package/Marketplace/{chunk-HFKKITEW.js → chunk-TMFFA26Y.js} +1 -1
- package/Marketplace/chunk-U5VX6JLT.js +1 -0
- package/Marketplace/{chunk-GHBGGQNM.js → chunk-UBMI3NQH.js} +1 -1
- package/Marketplace/{chunk-5XI7HWS5.js → chunk-V2OJQHE3.js} +2 -2
- package/Marketplace/{chunk-TGMCGROM.js → chunk-V5WYSCVT.js} +1 -1
- package/Marketplace/chunk-VAU6MFH7.js +1 -0
- package/Marketplace/chunk-VETHPEVU.js +1 -0
- package/Marketplace/{chunk-SH7KN2AS.js → chunk-VGXQU74M.js} +1 -1
- package/Marketplace/chunk-VJKFHBPN.js +5 -0
- package/Marketplace/chunk-VSEWXNVC.js +291 -0
- package/Marketplace/{chunk-4DV4IT7R.js → chunk-VWFLNITX.js} +1 -1
- package/Marketplace/{chunk-OZ77CAJD.js → chunk-WAW37FIG.js} +1 -1
- package/Marketplace/chunk-X3LH2IJE.js +1 -0
- package/Marketplace/chunk-XM6GN4VF.js +1 -0
- package/Marketplace/chunk-YIUQQGOQ.js +1 -0
- package/Marketplace/{chunk-YPVYJUXS.js → chunk-YR2WEZDG.js} +1 -1
- package/Marketplace/{chunk-UPYS4A4M.js → chunk-YXFTLQ5M.js} +1 -1
- package/Marketplace/{chunk-E2CS7ZMC.js → chunk-ZD5LURJS.js} +1 -1
- package/Marketplace/chunk-ZHUHOS5T.js +1 -0
- package/Marketplace/{chunk-WHZ44BAL.js → chunk-ZZVNB72Q.js} +1 -1
- package/Marketplace/index.html +3 -3
- package/Marketplace/main-CCWBPZQH.js +1 -0
- package/Marketplace/{styles-X3FXEB7T.css → styles-NJFTKO3E.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-2BUABOHG.js +0 -1
- package/Marketplace/chunk-2SXRC4IG.js +0 -1
- package/Marketplace/chunk-2ZTDLZVZ.js +0 -1
- package/Marketplace/chunk-33IXC6UG.js +0 -1
- package/Marketplace/chunk-4HZR3O3W.js +0 -1
- package/Marketplace/chunk-4JG3ZRYP.js +0 -5
- package/Marketplace/chunk-4PZ5Q3HI.js +0 -1
- package/Marketplace/chunk-4YOHPIVG.js +0 -1
- package/Marketplace/chunk-5B4KSPFM.js +0 -1
- package/Marketplace/chunk-5DIRXS7I.js +0 -1
- package/Marketplace/chunk-5EQNOCXP.js +0 -1
- package/Marketplace/chunk-5JYR3YJW.js +0 -1
- package/Marketplace/chunk-5QAURMZF.js +0 -222
- package/Marketplace/chunk-5ZX2OVBB.js +0 -1
- package/Marketplace/chunk-66YHNWRR.js +0 -1
- package/Marketplace/chunk-6IFZ2TO6.js +0 -1
- package/Marketplace/chunk-6RSAOZUV.js +0 -1
- package/Marketplace/chunk-6SBCWEJJ.js +0 -1
- package/Marketplace/chunk-6UEHSA6E.js +0 -1
- package/Marketplace/chunk-7H5ILTTK.js +0 -1
- package/Marketplace/chunk-A4F37V57.js +0 -1
- package/Marketplace/chunk-AGRVVEIR.js +0 -397
- package/Marketplace/chunk-ALKC77XL.js +0 -78
- package/Marketplace/chunk-AVEGIEYT.js +0 -193
- package/Marketplace/chunk-BBVWQJ7M.js +0 -1
- package/Marketplace/chunk-BM4KX73T.js +0 -1
- package/Marketplace/chunk-BQTUAYGY.js +0 -1
- package/Marketplace/chunk-C7QA2BEN.js +0 -3
- package/Marketplace/chunk-CEQA4PTY.js +0 -1
- package/Marketplace/chunk-CMZW5QAE.js +0 -1
- package/Marketplace/chunk-CSSG7NAJ.js +0 -1
- package/Marketplace/chunk-DG32XLYI.js +0 -1
- package/Marketplace/chunk-DJILLV4M.js +0 -1
- package/Marketplace/chunk-DS4AAABV.js +0 -1
- package/Marketplace/chunk-EL2JACEW.js +0 -1
- package/Marketplace/chunk-EU2KAMEK.js +0 -1
- package/Marketplace/chunk-EVLYO3HX.js +0 -1
- package/Marketplace/chunk-F4GMWHYJ.js +0 -33
- package/Marketplace/chunk-FFAZ3Q3F.js +0 -1
- package/Marketplace/chunk-FUWROOE4.js +0 -265
- package/Marketplace/chunk-GCECFUOP.js +0 -1
- package/Marketplace/chunk-GOS4RIF2.js +0 -1
- package/Marketplace/chunk-GZXQUJKX.js +0 -1
- package/Marketplace/chunk-H4PA2O6O.js +0 -1
- package/Marketplace/chunk-H6WIS2HR.js +0 -2
- package/Marketplace/chunk-HPGFBOM4.js +0 -1
- package/Marketplace/chunk-HTQJCQ32.js +0 -1
- package/Marketplace/chunk-IARG7PLL.js +0 -1
- package/Marketplace/chunk-IIMHYIRJ.js +0 -1
- package/Marketplace/chunk-JS55A2RS.js +0 -7
- package/Marketplace/chunk-JV4MMNGD.js +0 -79
- package/Marketplace/chunk-K6YEZYU4.js +0 -5
- package/Marketplace/chunk-KOKHDU4I.js +0 -1
- package/Marketplace/chunk-KTIKLSOU.js +0 -1
- package/Marketplace/chunk-KTXS7IPU.js +0 -1
- package/Marketplace/chunk-KWQS4KX7.js +0 -1
- package/Marketplace/chunk-KXS76PRS.js +0 -70
- package/Marketplace/chunk-KYIY3VQ6.js +0 -141
- package/Marketplace/chunk-LOPJ3O56.js +0 -1
- package/Marketplace/chunk-LR4UZ2OS.js +0 -30
- package/Marketplace/chunk-LWSRD5LF.js +0 -1
- package/Marketplace/chunk-MGVYUYPC.js +0 -15
- package/Marketplace/chunk-MP43HA4R.js +0 -1
- package/Marketplace/chunk-MTUIRWOB.js +0 -2
- package/Marketplace/chunk-MZI5AYCE.js +0 -1
- package/Marketplace/chunk-NTW6FBP5.js +0 -1
- package/Marketplace/chunk-NZA4BEER.js +0 -102
- package/Marketplace/chunk-O55KM5KY.js +0 -1
- package/Marketplace/chunk-OZ7LWNOK.js +0 -15
- package/Marketplace/chunk-P5FCWMYK.js +0 -1
- package/Marketplace/chunk-PE5AFID4.js +0 -1
- package/Marketplace/chunk-PEA6KVUS.js +0 -252
- package/Marketplace/chunk-PW42BQIY.js +0 -1
- package/Marketplace/chunk-Q6V3IOGL.js +0 -1
- package/Marketplace/chunk-REL734JM.js +0 -1
- package/Marketplace/chunk-RHRJXX4W.js +0 -1
- package/Marketplace/chunk-S3YMF63V.js +0 -1
- package/Marketplace/chunk-SD7M7HOB.js +0 -1
- package/Marketplace/chunk-SLQA5QBT.js +0 -1
- package/Marketplace/chunk-SRJREA2O.js +0 -5
- package/Marketplace/chunk-T4K3CJ2R.js +0 -1
- package/Marketplace/chunk-TQ4ZLZ7C.js +0 -1
- package/Marketplace/chunk-TQIIWFRF.js +0 -1
- package/Marketplace/chunk-UDQBFSOV.js +0 -1
- package/Marketplace/chunk-UF4FKEE7.js +0 -93
- package/Marketplace/chunk-UJYSVGLV.js +0 -1
- package/Marketplace/chunk-UYW53K3I.js +0 -1
- package/Marketplace/chunk-VRI3CYGG.js +0 -1
- package/Marketplace/chunk-WTAJSWM2.js +0 -4
- package/Marketplace/chunk-WX5S3HCU.js +0 -1
- package/Marketplace/chunk-XGYBJAFE.js +0 -1
- package/Marketplace/chunk-YP2IPJ2O.js +0 -1
- package/Marketplace/chunk-Z3ITXK3D.js +0 -1
- package/Marketplace/chunk-Z3KD73SP.js +0 -2
- package/Marketplace/chunk-ZAVDOMSW.js +0 -1
- package/Marketplace/chunk-ZGZ74AJR.js +0 -1
- package/Marketplace/chunk-ZLNGASME.js +0 -1
- package/Marketplace/chunk-ZNDU44GH.js +0 -51
- package/Marketplace/main-SPNULRF2.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Gt,b as ke}from"./chunk-ZIUDNFYT.js";import{a as Ce}from"./chunk-4YOHPIVG.js";import"./chunk-MS4AQ6UA.js";import{a as z}from"./chunk-E2CS7ZMC.js";import{e as ft}from"./chunk-RHRJXX4W.js";import{d as be,k as De,l as Te,m as Oe,n as Fe,o as Ee}from"./chunk-R76V3PTN.js";import{a as $t}from"./chunk-XQGRC7V2.js";import{a as st}from"./chunk-WX5S3HCU.js";import"./chunk-PE5AFID4.js";import{b as Re}from"./chunk-ZR5IXNXB.js";import{a as Ie,b as we}from"./chunk-LSXUXG54.js";import{a as X}from"./chunk-5EQNOCXP.js";import{a as ot}from"./chunk-O55KM5KY.js";import{c as ve,f as ye}from"./chunk-6LH7FSOW.js";import"./chunk-XEMNZHW6.js";import{a as fe,b as Se}from"./chunk-5QAURMZF.js";import"./chunk-FWG4H3QG.js";import"./chunk-NZA4BEER.js";import"./chunk-JV4MMNGD.js";import"./chunk-GZXQUJKX.js";import"./chunk-ALKC77XL.js";import"./chunk-NTW6FBP5.js";import"./chunk-LR4UZ2OS.js";import"./chunk-F4GMWHYJ.js";import{a as Ve}from"./chunk-JRWFZQ5K.js";import{a as it}from"./chunk-7KG3DC5J.js";import{a as jt,b as Wt,c as Pe}from"./chunk-ZIOAOUAM.js";import{b as Ne}from"./chunk-GPC4DECX.js";import"./chunk-SIYMMMKQ.js";import"./chunk-WHZ44BAL.js";import"./chunk-UPYS4A4M.js";import{a as $}from"./chunk-JOBWFOGC.js";import"./chunk-PO7JVKK3.js";import"./chunk-LHD7CYML.js";import"./chunk-DJILLV4M.js";import{a as Me}from"./chunk-SH7KN2AS.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SDUUFQUI.js";import"./chunk-3RK6DDJD.js";import{a as Bt}from"./chunk-MQXPOHBV.js";import{f as xe}from"./chunk-M5IQRAHV.js";import{a as R}from"./chunk-5DIRXS7I.js";import"./chunk-KXS76PRS.js";import"./chunk-OZ7LWNOK.js";import"./chunk-VRI3CYGG.js";import"./chunk-AVEGIEYT.js";import{a as _t,b as Vt,d as nt,e as ue}from"./chunk-SYENQYR7.js";import{a as ct}from"./chunk-5JYR3YJW.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import{i as W}from"./chunk-C7QA2BEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CMZW5QAE.js";import{b as Y,e as Z}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import{a as he,b as _e}from"./chunk-TNKPTRB3.js";import"./chunk-HPYTL6TX.js";import{b as w,c as g}from"./chunk-PW42BQIY.js";import{b as kt,c as Rt,d as Q,i as Ut,j as At,k as Lt,m as G,n as ge}from"./chunk-6X2OBNJQ.js";import{b as de,c as ut,h as L,m as B,z as ht}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import{a as pe,b as q,c as me}from"./chunk-UJYSVGLV.js";import{r as gt,s as Ct}from"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{E as Et,F as ce,G as et,H as Nt,J as se,f as U,g as A,j as pt,k as le,m as Ft,n as mt}from"./chunk-MTUIRWOB.js";import{$c as N,Fc as J,G as F,Gb as E,Gc as p,Hb as ae,Hc as K,Ic as b,Kc as D,Lc as T,Mb as h,Mc as O,Ra as vt,Rc as lt,Sc as I,Yb as c,Z as ne,aa as Ot,ad as k,bd as re,ca as qt,cd as H,dc as V,ea as ie,f as ee,ic as a,jc as r,ka as oe,kc as C,lc as P,mc as v,oc as x,pa as rt,pb as M,rb as o,tc as f,uc as s,v as Tt,xb as S,ya as m,za as u}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ye=()=>["/menu/products/download/by-url"],Ue=(()=>{class i{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=E({type:i,selectors:[["app-status"]],standalone:!1,decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(n,e){n&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),r()(),a(4,"div")(5,"div",3)(6,"a",4),C(7,"i",5),r(),a(8,"div",6)(9,"div",7)(10,"a",8),p(11,"Download Product By Url"),r()()()()()(),C(12,"router-outlet")),n&2&&(o(3),c("Tabs",e.productTabs),o(7),c("routerLink",lt(2,Ye)))},dependencies:[he,ce,Nt],encapsulation:2})}}return i})();function Ze(i,d){if(i&1&&(a(0,"div",10),C(1,"img",11),a(2,"span"),p(3),r()()),i&2){let t=d.$implicit;c("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),o(),c("src",t.Img,M),o(2),K(t.Name)}}function qe(i,d){if(i&1&&(a(0,"div",10),C(1,"img",11),a(2,"span"),p(3),r()()),i&2){let t=d.$implicit;c("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),o(),c("src",t.Img,M),o(2),K(t.Name)}}function Qe(i,d){if(i&1&&(a(0,"div",10),C(1,"img",11),a(2,"span"),p(3),r()()),i&2){let t=d.$implicit;c("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),o(),c("src",t.Img,M),o(2),K(t.Name)}}function Xe(i,d){if(i&1){let t=x();a(0,"div",12)(1,"label",13),p(2,"Scan Type"),r(),a(3,"mat-radio-group",14),O("ngModelChange",function(e){m(t);let l=s();return T(l.filter.ScanFull,e)||(l.filter.ScanFull=e),u(e)}),a(4,"mat-radio-button",15),p(5," Full (Include Inactive Products) "),r(),a(6,"mat-radio-button",16),p(7," Active "),r()()()}if(i&2){let t=s();o(3),D("ngModel",t.filter.ScanFull),o(),c("value",!0),o(2),c("value",!1)}}function tn(i,d){i&1&&(a(0,"span"),p(1,"Never"),r())}function en(i,d){if(i&1&&(a(0,"span"),p(1),N(2,"async"),r()),i&2){let t=s(2);o(),K(k(2,1,t.lastSync$))}}function nn(i,d){if(i&1){let t=x();a(0,"div",8)(1,"label",5)(2,"span",17),p(3,"Last Scan:"),r(),h(4,tn,2,0,"span"),N(5,"async"),h(6,en,3,3,"span"),r(),a(7,"mat-radio-group",18),O("ngModelChange",function(e){m(t);let l=s();return T(l.filter.UpdatedProduct,e)||(l.filter.UpdatedProduct=e),u(e)}),a(8,"mat-radio-button",19),p(9," Scan All Products "),r(),a(10,"mat-radio-button",20),p(11),r()()()}if(i&2){let t=s();o(4),V(k(5,6,t.lastSync$)==null?4:6),o(3),D("ngModel",t.filter.UpdatedProduct),o(),c("value",!1),o(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"),o(),b(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function on(i,d){if(i&1){let t=x();a(0,"div",8)(1,"label",5),p(2," Scan Option "),r(),a(3,"mat-radio-group",21),O("ngModelChange",function(e){m(t);let l=s();return T(l.filter.Async,e)||(l.filter.Async=e),u(e)}),a(4,"mat-radio-button",22),p(5," Asynchronous (Get Notified when Complete) "),r(),a(6,"mat-radio-button",23),p(7," Synchronous (Wait until Complete) "),r()()()}if(i&2){let t=s();o(3),D("ngModel",t.filter.Async),o(),c("value",!0),o(2),c("value",!1)}}var j=(()=>{class i{constructor(t,n,e){this.dialogRef=t,this.data=n,this.router=e,this.channelService=rt(Ce),this.channelType=w,this.disabledChannelOption=!1,this.filter={ChannelID:g.GuidEMpty,ScanFull:!1,UpdatedProduct:!1,Async:!1},this.isSingleChannel=g.IsNotEmpty(n.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=g.IsEmpty(n.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new At,this.modalConfig.title=this.isSingleChannel?"Scan Single Product":"Scan Channel Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(t=>(t.disabled=!0,(t.TypeID==w.Tiktok||t.TypeID==w.Tokopedia||t.TypeID==w.Lazada||t.TypeID==w.WooCommerce)&&(t.disabled=!1),t)).sort(t=>t.disabled?1:-1))}onSelectChannel(t){let n=this.filterChannelById(t);this.selectedChannel=n,this.filter.Async=!0,this.iniHasScanUpdate(),this.getLastSync(t)}getLastSync(t){this.lastSync$=this.channelService.getLastSync(t).pipe(Tt(n=>(this.selectedChannel.LastSync=n.LastSync,this.setDefaultConfigUpdate(),g.IsNotEmpty(n.LastSync)?g.convertToReadableDate(n.LastSync):null)),ne(1))}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&g.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==w.Shopee||this.selectedChannel.TypeID==w.Tiktok||this.selectedChannel.TypeID==w.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=w.WooCommerce&&this.selectedChannel?.TypeID!=w.KalCare&&this.selectedChannel?.TypeID!=w.None&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(t){let n;return this.channelOptions&&(n=this.channelOptions.find(e=>e.ID==t)),n}submit(){this.selectedChannel.TypeID==w.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):this.dialogRef.close(this.filter)}isNotEmpty(t){return g.IsNotEmpty(t)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(n){return new(n||i)(S(kt),S(Rt),S(et))}}static{this.\u0275cmp=E({type:i,selectors:[["app-scan-dialog"]],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,"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","Full Scan Product",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Only Active Product",1,"me-5",3,"value"],[1,"me-2"],["name","ScanFull",1,"form-control","h-100","rounded-1",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above",1,"me-5",3,"value","matTooltip"],["name","Async",1,"form-control","h-100","rounded-1",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(n,e){if(n&1){let l=x();a(0,"modal-material",2),f("onOk",function(){return m(l),u(e.submit())})("onClose",function(){return m(l),u(e.onClose())})("onCancel",function(){return m(l),u(e.onClose())}),a(1,"div",3)(2,"div",4)(3,"label",5),p(4,"Select a Channel"),r(),a(5,"p-select",6),O("ngModelChange",function(y){return m(l),T(e.filter.ChannelID,y)||(e.filter.ChannelID=y),u(y)}),f("ngModelChange",function(y){return m(l),u(e.onSelectChannel(y))}),h(6,Ze,4,3,"ng-template",null,0,H)(8,qe,4,3,"ng-template",null,1,H)(10,Qe,4,3,"ng-template",null,1,H),r(),h(12,Xe,8,3,"div",7)(13,nn,12,8,"div",8)(14,on,8,3,"div",9),r()()()}n&2&&(c("dynamicValidated",e.isNotEmpty(e.filter.ChannelID))("config",e.modalConfig),o(5),c("options",e.channelOptions),D("ngModel",e.filter.ChannelID),c("filter",!0),o(7),c("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)),o(),V(e.hasScanUpdate&&e.selectedChannel?13:-1),o(),c("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)))},dependencies:[mt,A,pt,Se,fe,ht,L,B,Lt,Bt,Wt,Ct,gt,ye,jt],encapsulation:2})}}return i})();function an(i,d){if(i&1&&(a(0,"mat-option",6)(1,"div"),C(2,"img",7),a(3,"span"),p(4),r()()()),i&2){let t=d.$implicit;c("value",t.ChannelID),o(2),c("src",t.logo,M),o(2),K(t.Title)}}var Pt=(()=>{class i{constructor(){this.dialogRef=rt(kt),this.channels=rt(Rt),this.channelIds=vt([]),this.channelOptions=vt([])}ngOnInit(){this.initModalConfig();let t=this.channels.filter((n,e,l)=>l.findIndex(_=>_.ChannelID===n.ChannelID)===e);this.channelOptions.set(t)}initModalConfig(){this.modalConfig=new At,this.modalConfig.title="Detach Product",this.modalConfig.okText="Save"}onClose(){this.dialogRef.close()}onSave(){let t=this.channels.filter(n=>this.channelIds().includes(n.ChannelID)).map(n=>({ChannelID:n.ChannelID,ChannelItemID:n.ChannelItemID}));this.dialogRef.close(t)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=E({type:i,selectors:[["app-modal-detach-product"]],decls:8,vars:5,consts:[[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"ngModelChange","ngModel","multiple"],["class","channel-option",3,"value",4,"ngFor","ngForOf"],[1,"channel-option",3,"value"],[2,"width","18px","margin-right","10px",3,"src"]],template:function(n,e){n&1&&(a(0,"modal-material",0),f("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSave()}),a(1,"div",1)(2,"div")(3,"label",2),p(4,"Select a Channel"),r(),a(5,"mat-form-field",3)(6,"mat-select",4),O("ngModelChange",function(_){return T(e.channelIds,_)||(e.channelIds=_),_}),h(7,an,5,3,"mat-option",5),r()()()()()),n&2&&(c("dynamicValidated",e.channelIds().length>0)("config",e.modalConfig),o(6),D("ngModel",e.channelIds),c("multiple",!0),o(),c("ngForOf",e.channelOptions()))},dependencies:[mt,U,Lt,Bt,xe,we,Ie,ve,ht,L,B,Ct],encapsulation:2})}}return i})();var zt=i=>[i];function rn(i,d){if(i&1){let t=x();a(0,"button",14),f("click",function(){m(t);let e=s(2);return u(e.onDetachMultipleProduct())}),C(1,"i",15),p(2),r()}if(i&2){let t,n=s(2);o(2),b("Detach (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function ln(i,d){if(i&1&&(P(0),h(1,rn,3,1,"button",13),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?1:-1)}}function cn(i,d){if(i&1){let t=x();a(0,"button",18),f("click",function(){m(t);let e=s(3);return u(e.onOpenScanDialog())}),C(1,"i",19),p(2," Scan Channel "),r()}}function sn(i,d){if(i&1&&h(0,cn,3,0,"button",17),i&2){let t=s(2);c("ngIf",!t.productService.hasSelection(t.products))}}function dn(i,d){if(i&1&&(P(0),h(1,sn,1,1,"button",16),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?-1:1)}}function pn(i,d){if(i&1){let t=x();a(0,"button",21),f("click",function(){m(t);let e=s(2);return u(e.onScanMultipleProduct())}),C(1,"i",19),p(2),r()}if(i&2){let t,n=s(2);o(2),b(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function mn(i,d){if(i&1&&(P(0),h(1,pn,3,1,"button",20),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)&&t.multipeScanChannels.length>0?1:-1)}}function un(i,d){if(i&1){let t=x();a(0,"button",23),f("click",function(){m(t);let e=s(2);return u(e.onUploadMultipleProduct())}),C(1,"i",24),p(2),r()}if(i&2){let t,n=s(2);o(2),b(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function hn(i,d){if(i&1&&(P(0),h(1,un,3,1,"button",22),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?1:-1)}}function _n(i,d){if(i&1){let t=x();a(0,"div",25)(1,"app-product-card",26),f("onUpload",function(){let e=m(t).$implicit,l=s();return u(l.onUploadToMultipleChannel(e))})("onScan",function(){let e=m(t).$implicit,l=s();return u(l.onScanSingleProduct(e))})("onDescEvent",function(){let e=m(t).index,l=s();return u(l.onOpenDialogVariant(e))})("onCheckBoxChange",function(e){let l=m(t).$implicit;return u(l.selected=e)})("onDetach",function(){let e=m(t).$implicit,l=s();return u(l.onDetachProduct([e]))}),r()()}if(i&2){let t=d.$implicit,n=s();o(),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",n.productService.getChannelProduct(t))("code",n.getVariantCode(t==null?null:t.Variants))("showCheckBox",(t==null?null:t.Channel.length)<n.channelOptions.length)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function gn(i,d){i&1&&(P(0),a(1,"div",27),C(2,"app-empty-state"),r(),v())}function Cn(i,d){if(i&1){let t=x();P(0),a(1,"div",28)(2,"div",29)(3,"app-custom-paginator",30),f("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),r()()(),v()}if(i&2){let t=s();o(3),c("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}var je=(()=>{class i{constructor(t,n,e,l,_,y,at){this.http=t,this.toastr=n,this.dialog=e,this.productService=l,this.authService=_,this.uploadProductService=y,this.route=at,this.searchFilter=new it,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.scanProductRole=R.ProductScan,this.uploadProductRole=R.ProductUpload,this.detachProductRole=R.ProductDetach,this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[w.Tokopedia,w.Tiktok])}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(n=>{this.products=n.Data,this.rowCount=n.Total==null?this.searchFilter.RowCount:n.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(j,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.Async=e.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,n,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){let n=this.products[t]?.Variants||[];this.dialog.open(Gt,{data:{title:this.products[t].Name,variants:n},width:"800px"})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions,[w.Tokopedia,w.Tiktok]);this.dialog.open(j,{data:{filter:t,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(l=>g.IsNotEmpty(l))).subscribe(l=>{this.searchFilter.ChannelID=l.ChannelID,this.searchFilter.ScanFull=l.ScanFull,this.searchFilter.UpdatedProduct=l.UpdatedProduct;let _=this.productService.selectedProduct(this.products),y=this.productService.getVariantCodesProducts(_);this.scanSingleProduct(y)})}onScanSingleProduct(t){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=g.GuidEMpty,this.dialog.open(j,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID;let l=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(l)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${e?.Name} `,"Error")}this.searchFilter.ChannelID=g.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=g.GuidEMpty}})}getVariantCode(t=[]){let n;return t?.length>1&&(n=(t[0].model?t[0].model:"")+t[0].Code),t?.length==1&&(n=t[0].Code),n}onDetachProduct(t){let n=[];t.forEach(e=>{e.Channel=g.assignChannelLogo(e.Channel),n.push(...e.Channel)}),this.dialog.open(Pt,{width:"600px",data:[...n]}).afterClosed().pipe(F(e=>g.IsNotEmpty(e)),Ot(e=>this.productService.detachProduct(e))).subscribe(e=>{this.toastr.success(e.Message,Ut.Success),this.getProducts()})}onDetachMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.onDetachProduct(t)}static{this.\u0275fac=function(n){return new(n||i)(S(Z),S(Y),S(Q),S($),S(W),S(ft),S(et))}}static{this.\u0275cmp=E({type:i,selectors:[["app-in-pos"]],standalone:!1,decls:23,vars:22,consts:[["picker",""],["description","All products which is already available in POS",3,"onSubmit","headerTitle"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"mt-5"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"]],template:function(n,e){if(n&1){let l=x();a(0,"mainpanel",1),f("onSubmit",function(y){return m(l),u(e.searchProduct(y))}),a(1,"actions"),h(2,ln,2,1,"ng-container",2)(3,dn,2,1,"ng-container",2)(4,mn,2,1,"ng-container",2)(5,hn,2,1,"ng-container",2),r(),a(6,"filters")(7,"div")(8,"label",3),p(9,"Category"),r(),a(10,"ng-select",4),f("ngModelChange",function(y){return m(l),u(e.searchFilter.Category=y)}),r()(),a(11,"div",5)(12,"mat-date-range-input",6)(13,"input",7),O("ngModelChange",function(y){return m(l),T(e.startDate,y)||(e.startDate=y),u(y)}),f("click",function(){m(l);let y=J(16);return u(y.open())}),r(),a(14,"input",8),O("ngModelChange",function(y){return m(l),T(e.endDate,y)||(e.endDate=y),u(y)}),f("click",function(){m(l);let y=J(16);return u(y.open())}),r()(),C(15,"mat-date-range-picker",null,0),r()(),a(17,"content")(18,"div",9)(19,"div",10),h(20,_n,2,11,"div",11)(21,gn,3,0,"ng-container",12),r(),h(22,Cn,4,5,"ng-container",12),r()()()}if(n&2){let l=J(16);c("headerTitle","In POS ("+e.rowCount+")"),o(2),c("ngxPermissionsOnly",I(14,zt,e.detachProductRole)),o(),c("ngxPermissionsOnly",I(16,zt,e.scanProductRole)),o(),c("ngxPermissionsOnly",I(18,zt,e.scanProductRole)),o(),c("ngxPermissionsOnly",I(20,zt,e.scanProductRole)),o(5),c("clearable",!0)("items",e.Categories)("ngModel",e.searchFilter.Category),o(2),c("rangePicker",l),o(),D("ngModel",e.startDate),o(),D("ngModel",e.endDate),o(6),c("ngForOf",e.products),o(),c("ngIf",e.products.length==0),o(),c("ngIf",e.products.length>0)}},dependencies:[U,A,ut,L,B,G,nt,X,ot,z,De,Te,Oe,Fe,q],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]})}}return i})();var Yt=i=>[i];function fn(i,d){if(i&1){let t=x();a(0,"button",12),f("click",function(){m(t);let e=s(2);return u(e.onDetachMultipleProduct())}),C(1,"i",13),p(2),r()}if(i&2){let t,n=s(2);o(2),b("Detach (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function Sn(i,d){if(i&1&&(P(0),h(1,fn,3,1,"button",11),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?1:-1)}}function xn(i,d){if(i&1){let t=x();a(0,"button",15),f("click",function(){m(t);let e=s(2);return u(e.onOpenScanDialog())}),C(1,"i",16),p(2," Scan Channel "),r()}}function Pn(i,d){if(i&1&&(P(0),h(1,xn,3,0,"button",14),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?-1:1)}}function vn(i,d){if(i&1){let t=x();a(0,"button",18),f("click",function(){m(t);let e=s(2);return u(e.onScanMultipleProduct())}),C(1,"i",16),p(2),r()}if(i&2){let t=s(2);o(2),b(" Scan (",t.productService.selectedProduct(t.products).length,") ")}}function yn(i,d){if(i&1&&(P(0),h(1,vn,3,1,"button",17),v()),i&2){let t=s();o(),V(t.multipeScanChannels.length>0&&t.productService.hasSelection(t.products)?1:-1)}}function bn(i,d){if(i&1){let t=x();a(0,"button",20),f("click",function(){m(t);let e=s(2);return u(e.onUploadMultipleProduct())}),C(1,"i",21),p(2),r()}if(i&2){let t=s(2);o(2),b(" Upload (",t.productService.selectedProduct(t.products).length,") ")}}function In(i,d){if(i&1&&(P(0),h(1,bn,3,1,"button",19),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?1:-1)}}function wn(i,d){if(i&1&&(a(0,"span",22),C(1,"img",23),r(),p(2)),i&2){let t=d.item;o(),c("src",t.Img,M)("alt",t.Name),o(),b(" ",t.Name," ")}}function Mn(i,d){if(i&1){let t=x();a(0,"div",24)(1,"label",25),p(2,"Item ID"),r(),a(3,"input",26),O("ngModelChange",function(e){m(t);let l=s();return T(l.searchFilter.Item_id,e)||(l.searchFilter.Item_id=e),u(e)}),r()()}if(i&2){let t=s();o(3),D("ngModel",t.searchFilter.Item_id)}}function Dn(i,d){if(i&1){let t=x();a(0,"div",27)(1,"app-product-card",28),f("onUpload",function(){let e=m(t).$implicit,l=s();return u(l.onUploadToMultipleChannel(e))})("onDescEvent",function(){let e=m(t).index,l=s();return u(l.onOpenVariantDetail(e))})("onScan",function(){let e=m(t).$implicit,l=s();return u(l.onScanSingleProduct(e))})("onCheckBoxChange",function(e){let l=m(t).$implicit;return u(l.selected=e)})("onDetach",function(){let e=m(t).$implicit,l=s();return u(l.onDetachProduct([e]))}),r()()}if(i&2){let t=d.$implicit,n=s();o(),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",n.productService.getChannelProduct(t))("code",n.getVariantCode(t==null?null:t.Variants))("showCheckBox",t==null?null:t.hasScan)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function Tn(i,d){i&1&&(P(0),a(1,"div",29),C(2,"app-empty-state"),r(),v())}function On(i,d){if(i&1){let t=x();a(0,"div",30)(1,"div",31)(2,"app-custom-paginator",32),f("total",function(){m(t);let e=s();return u(e.getRowCount())})("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),r()()()}if(i&2){let t=s();o(2),c("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var We=(()=>{class i{constructor(t,n,e,l,_,y,at,Dt){this.http=t,this.dialog=n,this.toastr=e,this.productService=l,this.activateRouter=_,this.authService=y,this.route=at,this.uploadProductService=Dt,this.searchFilter=new it,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=g.GuidEMpty,this.multipeScanChannels=[],this.scanProductRole=R.ProductScan,this.uploadProductRole=R.ProductUpload,this.detachProductRole=R.ProductDetach,this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(g.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(n=>{this.searchFilter=n.Filter,n.Filter.ChannelID!=g.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(n.Filter.ChannelID)),this.searchFilter.PageSize=n.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[w.Tokopedia,w.Tiktok])}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(n=>{this.products=n.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let n=this.products[t].Variants;this.dialog.open(Gt,{data:{variants:n,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(j,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.Async=e.Async,this.scanAllProduct()})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(F(n=>n)).subscribe(n=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(n,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(g.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(j,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID;let l=this.productService.getVariantCodesProduct(t);this.scanProducts(l)})}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}onScanMultipleProduct(){this.searchFilter.ChannelID=g.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(j,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct;let l=this.productService.selectedProduct(this.products),_=this.productService.getVariantCodesProducts(l);this.scanProducts(_)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:n=>{let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);n?this.toastr.success(`Product Successfully scan with ${e?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${e?.Name} `,"Error"),this.searchFilter.ChannelID=g.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=g.GuidEMpty}})}getVariantCode(t){let n;return t.length>1&&(n=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(n=t[0].Code),n}onClearFilterChannel(){this.searchFilter.ChannelID=g.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Total})}onDetachProduct(t){let n=[];t.forEach(e=>{e.Channel=g.assignChannelLogo(e.Channel),n.push(...e.Channel)}),this.dialog.open(Pt,{width:"600px",data:[...n]}).afterClosed().pipe(F(e=>g.IsNotEmpty(e)),Ot(e=>this.productService.detachProduct(e))).subscribe(e=>{this.toastr.success(e.Message,Ut.Success),this.getProducts()})}onDetachMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.onDetachProduct(t)}static{this.\u0275fac=function(n){return new(n||i)(S(Z),S(Q),S(Y),S($),S(Et),S(W),S(et),S(ft))}}static{this.\u0275cmp=E({type:i,selectors:[["app-sold-in-channel"]],standalone:!1,decls:19,vars:21,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"onSubmit","headerTitle"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],["class","mt-5",4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["class","row",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded"],["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,"me-2"],[2,"width","18px",3,"src","alt"],[1,"mt-5"],[1,"fw-bold"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onDescEvent","onScan","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(a(0,"mainpanel",0),f("onSubmit",function(_){return e.searchProduct(_)}),a(1,"actions"),h(2,Sn,2,1,"ng-container",1)(3,Pn,2,1,"ng-container",1)(4,yn,2,1,"ng-container",1)(5,In,2,1,"ng-container",1),r(),a(6,"filters")(7,"div")(8,"label",2),p(9,"Channel"),r(),a(10,"ng-select",3),f("ngModelChange",function(_){return e.searchFilter.ListChannelID=_})("clear",function(){return e.onClearFilterChannel()}),h(11,wn,3,3,"ng-template",4),r()(),h(12,Mn,4,1,"div",5),r(),a(13,"content")(14,"div",6)(15,"div",7),h(16,Dn,2,11,"div",8)(17,Tn,3,0,"ng-container",9),r(),h(18,On,3,4,"div",10),r()()()),n&2&&(c("headerTitle","Sold in Channel"),o(2),c("ngxPermissionsOnly",I(13,Yt,e.detachProductRole)),o(),c("ngxPermissionsOnly",I(15,Yt,e.scanProductRole)),o(),c("ngxPermissionsOnly",I(17,Yt,e.scanProductRole)),o(),c("ngxPermissionsOnly",I(19,Yt,e.uploadProductRole)),o(5),c("clearable",!0)("multiple",!0)("items",e.channelOptions)("ngModel",e.searchFilter.ListChannelID),o(2),c("ngIf",e.searchFilter.ListChannelID!=null),o(4),c("ngForOf",e.products),o(),c("ngIf",e.products.length==0),o(),c("ngIf",e.products==null?null:e.products.length))},dependencies:[U,A,ut,L,B,G,nt,_t,Vt,X,ot,z,q],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]})}}return i})();var Zt=i=>[i];function Fn(i,d){if(i&1){let t=x();a(0,"button",12),f("click",function(){m(t);let e=s(3);return u(e.uploadMultipleProduct())}),C(1,"i",13),p(2),r()}if(i&2){let t=s(3);o(2),b(" upload (",t.selectedProducts==null?null:t.selectedProducts.length,") ")}}function En(i,d){if(i&1&&(P(0),h(1,Fn,3,1,"button",11),v()),i&2){let t=s(2);o(),c("ngIf",t.hasSelectionProduct)}}function Nn(i,d){if(i&1){let t=x();P(0),a(1,"button",14),f("click",function(){m(t);let e=s(2);return u(e.openScanDialog())}),C(2,"i",15),p(3," Scan Channel "),r(),v()}}function Vn(i,d){i&1&&(P(0),C(1,"th",23),v())}function kn(i,d){if(i&1){let t=x();P(0),a(1,"td",30)(2,"input",31),O("ngModelChange",function(e){m(t);let l=s(3).$implicit;return T(l.selected,e)||(l.selected=e),u(e)}),f("ngModelChange",function(){m(t);let e=s(4).ngIf,l=s(3);return u(l.onSelectProduct(e))}),r()(),v()}if(i&2){let t=s(3).$implicit;o(),c("rowSpan",t==null?null:t.Variants.length),o(),D("ngModel",t.selected)}}function Rn(i,d){if(i&1&&(P(0),h(1,kn,3,2,"ng-container",10),v()),i&2){let t=s().index;o(),c("ngIf",t==0)}}function Un(i,d){if(i&1){let t=x();P(0),a(1,"img",36),f("click",function(e){m(t);let l=s(3).$implicit,_=s(4);return u(_.onZoomImage(e,l==null?null:l.ImageUrl))}),r(),v()}if(i&2){let t=s(3).$implicit;o(),c("src",t==null?null:t.ImageUrl,M)}}function An(i,d){i&1&&C(0,"img",37)}function Ln(i,d){if(i&1&&(P(0),a(1,"td",30)(2,"div",32),h(3,Un,2,1,"ng-container",9)(4,An,1,0,"ng-template",null,1,H),r()(),a(6,"td",33)(7,"h4",34)(8,"span",35),p(9),r()()(),v()),i&2){let t=J(5),n=s(2).$implicit;o(),c("rowSpan",n==null?null:n.Variants.length),o(2),c("ngIf",n==null?null:n.ImageUrl)("ngIfElse",t),o(3),c("rowSpan",n==null?null:n.Variants.length),o(2),c("matTooltip",(n==null||n.Name==null?null:n.Name.length)>50?n==null?null:n.Name:""),o(),b(" ",n==null?null:n.Name," ")}}function Bn(i,d){if(i&1&&(a(0,"div")(1,"a",26),C(2,"img",38),r()()),i&2){let t=d.$implicit;o(),c("href",t.URL,M),o(),c("src",t.Img,M)("matTooltip",t.Name)}}function jn(i,d){if(i&1&&(a(0,"div"),C(1,"img",38),r()),i&2){let t=d.$implicit;o(),c("src",t.Img,M)("matTooltip",t.Name)}}function Wn(i,d){if(i&1&&(a(0,"tr"),h(1,Rn,2,1,"ng-container",4)(2,Ln,10,6,"ng-container",10),a(3,"td"),p(4),r(),a(5,"td")(6,"span"),p(7),r(),a(8,"span",25)(9,"a",26),C(10,"i",27),r()()(),a(11,"td",28)(12,"div",29),h(13,Bn,3,3,"div",24),r()(),a(14,"td",28)(15,"div",29),h(16,jn,2,2,"div",24),r()()()),i&2){let t=d.$implicit,n=d.index,e=s(5);o(),c("ngxPermissionsOnly",I(7,Zt,e.uploadProductRole)),o(),c("ngIf",n==0),o(2),b(" ",t.Name," "),o(3),b(" ",t.Code," "),o(2),c("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),M),o(4),c("ngForOf",t==null?null:t.Available),o(3),c("ngForOf",t==null?null:t.NotAvailable)}}function Gn(i,d){if(i&1&&(P(0),h(1,Wn,17,9,"tr",24),v()),i&2){let t=d.$implicit;o(),c("ngForOf",t.Variants)}}function $n(i,d){if(i&1&&(a(0,"tbody"),h(1,Gn,2,1,"ng-container",24),r()),i&2){let t=d.ngIf;o(),c("ngForOf",t)}}function zn(i,d){if(i&1&&(P(0),a(1,"div",16)(2,"table",17)(3,"thead",18)(4,"tr"),h(5,Vn,2,0,"ng-container",4),a(6,"th",19),p(7," Product "),r(),a(8,"th",20),p(9,"Variant"),r(),a(10,"th",20),p(11,"SKU"),r(),a(12,"th",21),p(13,"Available In"),r(),a(14,"th",22),p(15,"Not Available In"),r()()(),h(16,$n,2,1,"tbody",10),N(17,"async"),r()(),v()),i&2){let t=s(2);o(5),c("ngxPermissionsOnly",I(4,Zt,t.uploadProductRole)),o(11),c("ngIf",k(17,2,t.data$))}}function Kn(i,d){i&1&&(a(0,"div",39),C(1,"app-empty-state"),r())}function Jn(i,d){if(i&1){let t=x();a(0,"span",47),f("click",function(){m(t);let e=s(4);return u(e.getRowCount())}),a(1,"i",48),p(2,"?"),r()()}}function Hn(i,d){if(i&1&&(a(0,"span"),p(1),N(2,"number"),r()),i&2){let t=d.ngIf;o(),K(k(2,1,t==null?null:t.Count))}}function Yn(i,d){if(i&1){let t=x();a(0,"a",49),f("click",function(){m(t);let e=s(4);return u(e.onNextPage())}),C(1,"i",50),p(2," Next"),r()}}function Zn(i,d){if(i&1){let t=x();a(0,"a",51),f("click",function(){m(t);let e=s(4);return u(e.onLastPage())}),C(1,"i",52),p(2," Last"),r()}}function qn(i,d){if(i&1&&(P(0),a(1,"div",40)(2,"div",41)(3,"div",42),p(4),N(5,"number"),h(6,Jn,3,0,"span",43)(7,Hn,3,3,"span",10),N(8,"async"),p(9),r()(),a(10,"div",44),h(11,Yn,3,0,"a",45)(12,Zn,3,0,"a",46),r()(),v()),i&2){let t=s().ngIf,n=s(2);o(4),b(" Showing 1 - ",k(5,6,t==null?null:t.length)," of "),o(2),c("ngIf",n.paginationService.hideCount),o(),c("ngIf",!n.paginationService.hideCount&&k(8,8,n.rowCount$)),o(2),b(" records ~ ",n.paginationService.footerPageNumber," Page "),o(2),c("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage),o(),c("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage)}}function Qn(i,d){if(i&1&&(P(0),h(1,qn,13,10,"ng-container",10),v()),i&2){let t=d.ngIf;o(),c("ngIf",(t==null?null:t.length)>0)}}function Xn(i,d){if(i&1){let t=x();a(0,"mainpanel",3),f("onSubmit",function(e){m(t);let l=s();return u(l.searchProduct(e))}),a(1,"actions"),h(2,En,2,1,"ng-container",4)(3,Nn,4,0,"ng-container",4),a(4,"button",5),f("click",function(){m(t);let e=s();return u(e.openExportDialog())}),C(5,"i",6),a(6,"span"),p(7,"Export"),r()()(),a(8,"content")(9,"div",7)(10,"div",8),h(11,zn,18,6,"ng-container",9),N(12,"async"),h(13,Kn,2,0,"ng-template",null,0,H),r(),h(15,Qn,2,1,"ng-container",10),N(16,"async"),r()()()}if(i&2){let t,n=J(14),e=s();c("hideSearchDropdown",!0),o(2),c("ngxPermissionsOnly",I(10,Zt,e.uploadProductRole)),o(),c("ngxPermissionsOnly",I(12,Zt,e.scanProductRole)),o(8),c("ngIf",((t=k(12,6,e.data$))==null?null:t.length)>0)("ngIfElse",n),o(4),c("ngIf",k(16,8,e.data$))}}var Ge=(()=>{class i{constructor(t,n,e,l,_,y,at,Dt,He){this.http=t,this.dialog=n,this.toastr=e,this.route=l,this.productService=_,this.paginationService=y,this.biggerPictureService=at,this.authService=Dt,this.uploadProductService=He,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.scanProductRole=R.ProductScan,this.uploadProductRole=R.ProductUpload,this.channelOptions=Dt.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(ie(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Tt(t=>(t=t.map(n=>(n.Variants=n.Variants.map(e=>(e.Available=this.productService.sortChannel(e.Available),e.NotAvailable=this.productService.sortChannel(e.NotAvailable),e.Available=this.assignLogoChannel(e.Available),e.NotAvailable=this.assignLogoChannel(e.NotAvailable),e)),n.Channel=n?.Variants[0]?.Available,n)),t)))}assignLogoChannel(t){return t=t.map(n=>(n.Img=g.getChannelLogoByTypeId(n.TypeID),n)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(){let t=this.productService.findChannelById(this.filterSearch.ChannelID,this.channelOptions);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(n=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(n,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=g.GuidEMpty,this.dialog.open(j,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.filterSearch.ChannelID=e.ChannelID,this.filterSearch.ScanFull=e.ScanFull,this.filterSearch.UpdatedProduct=e.UpdatedProduct,this.filterSearch.Async=e.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,n){this.biggerPictureService.openBiggerPicture(t,n)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(Ne,{data:{title:"Export Not In Channel",pageNumber:this.filterSearch.PageNumber,rowCount:this.filterSearch.RowCount,filterExport:this.filterSearch,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}static{this.\u0275fac=function(n){return new(n||i)(S(Z),S(Q),S(Y),S(et),S($),S(Ve),S(Me),S(W),S(ft))}}static{this.\u0275cmp=E({type:i,selectors:[["app-not-in-channel"]],standalone:!1,decls:2,vars:3,consts:[["EMPTY",""],["elsePic",""],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","hideSearchDropdown"],[4,"ngxPermissionsOnly"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[2,"width","10px"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(n,e){n&1&&(h(0,Xn,17,14,"mainpanel",2),N(1,"async")),n&2&&c("ngIf",k(1,1,e.loader$))},dependencies:[U,A,de,L,B,G,gt,z,q,pt,Ft],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]})}}return i})();var te=i=>[i],ti=()=>[];function ei(i,d){if(i&1){let t=x();a(0,"button",16),f("click",function(){m(t);let e=s(2);return u(e.openScanDialog())}),C(1,"i",17),p(2," Scan Channel "),r()}}function ni(i,d){if(i&1&&(P(0),h(1,ei,3,0,"button",15),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?-1:1)}}function ii(i,d){if(i&1){let t=x();a(0,"button",19),f("click",function(){m(t);let e=s(2);return u(e.onDownloadAllProduct("SELECTED"))}),C(1,"i",20),p(2),r()}if(i&2){let t,n=s(2);o(2),b(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function oi(i,d){if(i&1&&(P(0),h(1,ii,3,1,"button",18),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?1:-1)}}function ai(i,d){if(i&1&&(a(0,"span",21),C(1,"img",22),r(),p(2)),i&2){let t=d.item;o(),c("src",t.Img,M)("alt",t.Name),o(),b(" ",t.Name," ")}}function ri(i,d){if(i&1){let t=x();a(0,"div",23)(1,"app-product-card",24),f("onCheckBoxChange",function(e){let l=m(t).index,_=s();return u(_.onSelectProduct(e,l))})("onDescEvent",function(){let e=m(t).index,l=s();return u(l.onShowVariantDetail(e))})("onDownload",function(){let e=m(t).$implicit,l=s();return u(l.onDownloadProduct(e))})("onScan",function(){let e=m(t).$implicit,l=s();return u(l.onScanChannel(e))}),r()()}if(i&2){let t=d.$implicit,n=s();o(),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?I(10,te,t==null?null:t.Channel):lt(12,ti))("showCheckBox",n.hasDownloadRole())("scanButton",!0)}}function li(i,d){i&1&&(P(0),a(1,"div",25),C(2,"app-empty-state"),r(),v())}function ci(i,d){if(i&1){let t=x();a(0,"div",26)(1,"div",27)(2,"app-custom-paginator",28),f("total",function(){m(t);let e=s();return u(e.getRowCount())})("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),r()()()}if(i&2){let t=s();o(2),c("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var $e=(()=>{class i{constructor(t,n,e,l,_,y){this.http=t,this.dialog=n,this.productService=e,this.toastrService=l,this.activateRouter=_,this.authService=y,this.permissionService=rt(pe),this.searchFilter=new it,this.products=[],this.hasClickRowCount=!1,this.scanProductRole=R.ProductScan,this.downloadProductRole=R.ProductDownload,this.hasDownloadRole=vt(!0),this.channelOptions=this.authService.getChannels(),this.permissionService.hasPermission(this.downloadProductRole).then(at=>{this.hasDownloadRole.set(at)})}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(g.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(n=>{this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(n=>(t=this.channelOptions.find(e=>e.ID==n.ChannelID),t?n.Channel=JSON.parse(JSON.stringify(t)):n.Channel=null,n)).map(n=>(n.Channel&&(n.Channel.Url=n.Url),n))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?g.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=g.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(g.GuidEMpty),this.productService.successToastrScanAllProduct(n,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=g.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(j,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.Async=e.Async,this.onScanAll()})}onDownloadAllProduct(t){let n;t=="ALL"?n=this.products:n=this.productService.selectedProduct(this.products),n.length>0&&this.productService.downloadMultipleProduct(n).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,n){this.products[n].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let n=JSON.parse(JSON.stringify(t));delete n.Channel,this.productService.scanCompareToPos([n]).subscribe(e=>{e.Status?(this.initPageLoader(g.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let n=this.products[t].Variant;n.length>0&&this.dialog.open(ke,{data:{title:this.products[t].Name,variants:n},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Count})}static{this.\u0275fac=function(n){return new(n||i)(S(Z),S(Q),S($),S(Y),S(Et),S(W))}}static{this.\u0275cmp=E({type:i,selectors:[["app-not-in-pos"]],standalone:!1,decls:30,vars:17,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp",""],[1,"mt-5"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(a(0,"mainpanel",0),f("onSubmit",function(_){return e.onSearch(_)}),a(1,"actions"),h(2,ni,2,1,"ng-container",1)(3,oi,2,1,"ng-container",1),r(),a(4,"filters")(5,"div")(6,"label",2),p(7,"Channel"),r(),a(8,"ng-select",3),O("ngModelChange",function(_){return T(e.searchFilter.ChannelID,_)||(e.searchFilter.ChannelID=_),_}),h(9,ai,3,3,"ng-template",4),r()(),a(10,"div",5)(11,"label",6),p(12,"SKU Assigned"),r(),a(13,"mat-radio-group",7),O("ngModelChange",function(_){return T(e.searchFilter.HaveSku,_)||(e.searchFilter.HaveSku=_),_}),a(14,"mat-radio-button",8),p(15," All "),r(),a(16,"mat-radio-button",8),p(17," Yes "),r(),a(18,"mat-radio-button",8),p(19," No "),r()()(),a(20,"div",5)(21,"label",6),p(22,"Item ID"),r(),a(23,"input",9),O("ngModelChange",function(_){return T(e.searchFilter.Item_id,_)||(e.searchFilter.Item_id=_),_}),r()()(),a(24,"content")(25,"div",10)(26,"div",11),h(27,ri,2,13,"div",12)(28,li,3,0,"ng-container",13),r(),h(29,ci,3,4,"div",14),r()()()),n&2&&(o(2),c("ngxPermissionsOnly",I(13,te,e.scanProductRole)),o(),c("ngxPermissionsOnly",I(15,te,e.downloadProductRole)),o(5),c("clearable",!0)("items",e.channelOptions),D("ngModel",e.searchFilter.ChannelID),o(5),D("ngModel",e.searchFilter.HaveSku),o(),c("value",0),o(2),c("value",1),o(2),c("value",2),o(5),D("ngModel",e.searchFilter.Item_id),o(4),c("ngForOf",e.products),o(),c("ngIf",e.products.length==0),o(),c("ngIf",(e.products==null?null:e.products.length)>0))},dependencies:[U,A,ut,L,B,G,nt,_t,jt,Wt,X,ot,z,q],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]})}}return i})();function si(i,d){if(i&1&&(a(0,"span",9),C(1,"img",10),r(),p(2)),i&2){let t=d.item,n=s();o(),c("src",n.getChannelLogo(t.TypeID),M),o(),b(" ",t.Name," ")}}function di(i,d){if(i&1&&(a(0,"div",11),C(1,"app-duplicate-product-card",12),r()),i&2){let t=d.$implicit,n=d.index;o(),c("imageForZoom",t.ImageUrl)("title",t.Name)("code",t.Code)("id",n)("image",t.ThumbnailURL)("channels",t.Channels)}}function pi(i,d){i&1&&(P(0),a(1,"div",13),C(2,"app-empty-state"),r(),v())}function mi(i,d){if(i&1){let t=x();P(0),a(1,"div",14)(2,"div",15)(3,"app-custom-paginator",16),f("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())})("total",function(){m(t);let e=s();return u(e.getRowCount())}),r()()(),v()}if(i&2){let t=s();o(3),c("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickedRowCount)}}var ze=(()=>{class i{constructor(t,n,e){this.httpService=t,this.productService=n,this.authService=e,this.searchFilter=new it,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=e.getChannels()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(n=>{this.products=n.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=g.GuidEMpty}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}static{this.\u0275fac=function(n){return new(n||i)(S(Z),S($),S(W))}}static{this.\u0275cmp=E({type:i,selectors:[["app-duplicate-sku"]],standalone:!1,decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","multiple","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(a(0,"mainpanel",0),f("onSubmit",function(_){return e.onSearch(_)}),a(1,"filters")(2,"div",1)(3,"div")(4,"h6",2),p(5,"Channel"),r(),a(6,"ng-select",3),O("ngModelChange",function(_){return T(e.searchFilter.ListChannelID,_)||(e.searchFilter.ListChannelID=_),_}),f("clear",function(){return e.onClearFilter()}),h(7,si,3,2,"ng-template",4),r()()()(),a(8,"content")(9,"div",5)(10,"div",6),h(11,di,2,6,"div",7)(12,pi,3,0,"ng-container",8),r(),h(13,mi,4,4,"ng-container",8),r()()()),n&2&&(o(6),c("multiple",!0)("clearable",!0)("items",e.channelOptions),D("ngModel",e.searchFilter.ListChannelID),o(5),c("ngForOf",e.products),o(),c("ngIf",(e.products==null?null:e.products.length)==0),o(),c("ngIf",(e.products==null?null:e.products.length)>0))},dependencies:[U,A,L,B,G,nt,_t,Vt,$t,X,z],encapsulation:2})}}return i})();var ui=()=>["/menu/products/status/sold-in-channel"],Ke=i=>({ID:i}),hi=()=>["/menu/products/status/not-in-pos"],_i=i=>[i];function gi(i,d){if(i&1&&(P(0),p(1),v()),i&2){let t=s().$implicit;o(),b(" ",t.Count," ")}}function Ci(i,d){if(i&1){let t=x();a(0,"span",25),f("click",function(){m(t);let e=s().$implicit,l=s(2);return u(l.getLiveProductCount(e.ID,e))}),C(1,"i",26),r()}}function fi(i,d){if(i&1){let t=x();P(0),a(1,"button",27),f("click",function(){m(t);let e=s().$implicit,l=s(2);return u(l.onScanChannel(e))}),C(2,"i",28),p(3," Scan "),r(),v()}}function Si(i,d){if(i&1){let t=x();a(0,"tr")(1,"td"),C(2,"img",17),a(3,"span",18),p(4),r()(),a(5,"td",19),h(6,gi,2,1,"ng-container",6)(7,Ci,2,0,"ng-template",null,1,H),r(),a(9,"td",19)(10,"a",20),p(11),N(12,"number"),r()(),a(13,"td",19)(14,"a",20),p(15),N(16,"number"),r()(),a(17,"td"),p(18),N(19,"date"),r(),a(20,"td")(21,"div",21),h(22,fi,4,0,"ng-container",22),a(23,"button",23),f("click",function(){let e=m(t).$implicit,l=s(2);return u(l.onClearCache(e.ID))}),C(24,"i",24),p(25," Clear "),r()()()()}if(i&2){let t=d.$implicit,n=J(8),e=s(2);o(2),c("src",e.getChannelLogo(t.TypeID),M),o(2),K(t.Name),o(2),c("ngIf",t.Count!==void 0)("ngIfElse",n),o(4),c("routerLink",lt(19,ui))("queryParams",I(20,Ke,t.ID)),o(),b(" ",k(12,12,t.SoldInChannel)," "),o(3),c("routerLink",lt(22,hi))("queryParams",I(23,Ke,t.ID)),o(),b(" ",k(16,14,t.NotInPOS)," "),o(3),b(" ",t.LastSync?re(19,16,t.LastSync,"dd MMM yyyy HH:mm"):"Never"," "),o(4),c("ngxPermissionsOnly",I(25,_i,e.scanProductRole))}}function xi(i,d){if(i&1&&(P(0),a(1,"div",7)(2,"table",8)(3,"thead",9)(4,"tr",10)(5,"th"),p(6,"Channel"),r(),a(7,"th",11),p(8," Live Product "),r(),a(9,"th",12),p(10," Sold In Channel "),r(),a(11,"th",13),p(12," Product Not in POS "),r(),a(13,"th",14),p(14,"Last Sync"),r(),C(15,"th",15),r()(),a(16,"tbody"),h(17,Si,26,27,"tr",16),N(18,"async"),r()()(),v()),i&2){let t,n=s();o(17),c("ngForOf",(t=k(18,1,n.channels$))==null?null:t.Data)}}function Pi(i,d){i&1&&(a(0,"div",29),C(1,"app-empty-state"),r())}var Je=(()=>{class i{constructor(t,n,e,l){this.productService=t,this.toastr=n,this.dialog=e,this.authService=l,this.scanProductRole=R.ProductScan,this.destroy$=new ee,this.channelOptions=l.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,n){this.productService.getTotalProductLive(t).pipe(qt(this.destroy$)).subscribe(e=>{n.Count=e.Count})}onScanChannel(t){this.dialog.open(j,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(F(n=>g.IsNotEmpty(n))).subscribe(n=>{this.scanAllProduct(t.ID,n)})}scanAllProduct(t,n){let e=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async).pipe(F(l=>l)).subscribe(l=>{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(l,e,!n.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(qt(this.destroy$)).subscribe(e=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(n){return new(n||i)(S($),S(Y),S(Q),S(W))}}static{this.\u0275cmp=E({type:i,selectors:[["app-channel-statistic"]],standalone:!1,decls:9,vars:6,consts:[["EMPTY",""],["QUESTION",""],["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngxPermissionsOnly"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,e){if(n&1&&(a(0,"mainpanel",2)(1,"content")(2,"div",3)(3,"div",4)(4,"div",5),h(5,xi,19,3,"ng-container",6),N(6,"async"),h(7,Pi,2,0,"ng-template",null,0,H),r()()()()()),n&2){let l,_=J(8);c("hideSearchBox",!0)("hideSearchDropdown",!0),o(5),c("ngIf",((l=k(6,4,e.channels$))==null||l.Data==null?null:l.Data.length)>0)("ngIfElse",_)}},dependencies:[U,A,G,gt,Nt,z,q,pt,Ft,le],encapsulation:2})}}return i})();var vi=[{component:Ue,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:je,canActivate:[ct,st],data:{title:"Products in POS"}},{path:"sold-in-channel",component:We,canActivate:[ct,st],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:Ge,canActivate:[ct,st],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:$e,canActivate:[ct,st],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:ze,canActivate:[ct,st],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:Je,canActivate:[ct,st],data:{title:"Channel Statistic"}}]}],Ma=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ae({type:i})}static{this.\u0275inj=oe({imports:[mt,ht,ge,Ct,ue,Re,Pe,_e,$t,X,ot,se.forChild(vi),Ee,be,Pt,me]})}}return i})();export{Ma as StatusModule};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import{a as M}from"./chunk-VRI3CYGG.js";import{A as b,D as l,I,b as k,ba as L,d as r,k as D,v as a,z as w}from"./chunk-AVEGIEYT.js";import{o as y}from"./chunk-MTUIRWOB.js";import{Ca as c,Hb as h,Ib as u,Kb as f,La as m,Qc as g,ja as p,ka as d,pa as o,sd as v}from"./chunk-JS55A2RS.js";var F=({dt:i})=>`
|
|
2
|
-
/* For PrimeNG */
|
|
3
|
-
.p-ripple {
|
|
4
|
-
overflow: hidden;
|
|
5
|
-
position: relative;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.p-ink {
|
|
9
|
-
display: block;
|
|
10
|
-
position: absolute;
|
|
11
|
-
background: ${i("ripple.background")};
|
|
12
|
-
border-radius: 100%;
|
|
13
|
-
transform: scale(0);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.p-ink-active {
|
|
17
|
-
animation: ripple 0.4s linear;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.p-ripple-disabled .p-ink {
|
|
21
|
-
display: none !important;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@keyframes ripple {
|
|
25
|
-
100% {
|
|
26
|
-
opacity: 0;
|
|
27
|
-
transform: scale(2.5);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
`,O={root:"p-ink"},x=(()=>{class i extends L{name="ripple";theme=F;classes=O;static \u0275fac=(()=>{let e;return function(s){return(e||(e=c(i)))(s||i)}})();static \u0275prov=p({token:i,factory:i.\u0275fac})}return i})();var z=(()=>{class i extends M{zone=o(m);_componentStyle=o(x);animationListener;mouseDownListener;timeout;constructor(){super(),v(()=>{y(this.platformId)&&(this.config.ripple()?this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.renderer.listen(this.el.nativeElement,"mousedown",this.onMouseDown.bind(this))}):this.remove())})}ngAfterViewInit(){super.ngAfterViewInit()}onMouseDown(e){let t=this.getInk();if(!t||this.document.defaultView?.getComputedStyle(t,null).display==="none")return;if(r(t,"p-ink-active"),!a(t)&&!l(t)){let n=Math.max(D(this.el.nativeElement),b(this.el.nativeElement));t.style.height=n+"px",t.style.width=n+"px"}let s=w(this.el.nativeElement),E=e.pageX-s.left+this.document.body.scrollTop-l(t)/2,A=e.pageY-s.top+this.document.body.scrollLeft-a(t)/2;this.renderer.setStyle(t,"top",A+"px"),this.renderer.setStyle(t,"left",E+"px"),k(t,"p-ink-active"),this.timeout=setTimeout(()=>{let n=this.getInk();n&&r(n,"p-ink-active")},401)}getInk(){let e=this.el.nativeElement.children;for(let t=0;t<e.length;t++)if(typeof e[t].className=="string"&&e[t].className.indexOf("p-ink")!==-1)return e[t];return null}resetInk(){let e=this.getInk();e&&r(e,"p-ink-active")}onAnimationEnd(e){this.timeout&&clearTimeout(this.timeout),r(e.currentTarget,"p-ink-active")}create(){let e=this.renderer.createElement("span");this.renderer.addClass(e,"p-ink"),this.renderer.appendChild(this.el.nativeElement,e),this.renderer.setAttribute(e,"aria-hidden","true"),this.renderer.setAttribute(e,"role","presentation"),this.animationListener||(this.animationListener=this.renderer.listen(e,"animationend",this.onAnimationEnd.bind(this)))}remove(){let e=this.getInk();e&&(this.mouseDownListener&&this.mouseDownListener(),this.animationListener&&this.animationListener(),this.mouseDownListener=null,this.animationListener=null,I(e))}ngOnDestroy(){this.config&&this.config.ripple()&&this.remove(),super.ngOnDestroy()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=u({type:i,selectors:[["","pRipple",""]],hostAttrs:[1,"p-ripple"],features:[g([x]),f]})}return i})(),H=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=h({type:i});static \u0275inj=d({})}return i})();export{z as a,H as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as C}from"./chunk-F4GMWHYJ.js";import{Aa as a,Ca as o,Gb as r,Kb as l,Xb as s,ac as c,ic as m,jc as d,kc as p}from"./chunk-JS55A2RS.js";var h=(()=>{class t extends C{static \u0275fac=(()=>{let i;return function(e){return(i||(i=o(t)))(e||t)}})();static \u0275cmp=r({type:t,selectors:[["AngleRightIcon"]],features:[l],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M5.25 11.1728C5.14929 11.1694 5.05033 11.1455 4.9592 11.1025C4.86806 11.0595 4.78666 10.9984 4.72 10.9228C4.57955 10.7822 4.50066 10.5916 4.50066 10.3928C4.50066 10.1941 4.57955 10.0035 4.72 9.86283L7.72 6.86283L4.72 3.86283C4.66067 3.71882 4.64765 3.55991 4.68275 3.40816C4.71785 3.25642 4.79932 3.11936 4.91585 3.01602C5.03238 2.91268 5.17819 2.84819 5.33305 2.83149C5.4879 2.81479 5.64411 2.84671 5.78 2.92283L9.28 6.42283C9.42045 6.56346 9.49934 6.75408 9.49934 6.95283C9.49934 7.15158 9.42045 7.34221 9.28 7.48283L5.78 10.9228C5.71333 10.9984 5.63193 11.0595 5.5408 11.1025C5.44966 11.1455 5.35071 11.1694 5.25 11.1728Z","fill","currentColor"]],template:function(n,e){n&1&&(a(),m(0,"svg",0),p(1,"path",1),d()),n&2&&(c(e.getClassNames()),s("aria-label",e.ariaLabel)("aria-hidden",e.ariaHidden)("role",e.role))},encapsulation:2})}return t})();export{h as a};
|