marketplacepos 5.48.2 → 5.48.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/{chunk-H7GV5SNI.js → chunk-2XYIINPQ.js} +1 -1
- package/Marketplace/{chunk-CAZ7U2IL.js → chunk-4JRHCYVO.js} +1 -1
- package/Marketplace/{chunk-6OIMOM7S.js → chunk-4UPWMQJX.js} +1 -1
- package/Marketplace/{chunk-ADKAX3OO.js → chunk-5NFLGFHD.js} +1 -1
- package/Marketplace/{chunk-Y77WYZ6Y.js → chunk-5QQCKNH2.js} +1 -1
- package/Marketplace/{chunk-XK4RP5MQ.js → chunk-6FAJM27Z.js} +1 -1
- package/Marketplace/{chunk-ALPG22RQ.js → chunk-77NAUG5Y.js} +1 -1
- package/Marketplace/{chunk-HKHNRMPT.js → chunk-7CYONN5M.js} +1 -1
- package/Marketplace/{chunk-FRZCC6KZ.js → chunk-A62IPN6W.js} +1 -1
- package/Marketplace/{chunk-5KYN6Y7M.js → chunk-B5AYTAZQ.js} +1 -1
- package/Marketplace/{chunk-SZVL42NR.js → chunk-BNAARI67.js} +1 -1
- package/Marketplace/{chunk-KZSTYKIP.js → chunk-BTSGHYIF.js} +1 -1
- package/Marketplace/{chunk-UCEZJNIL.js → chunk-BUY4AAHK.js} +1 -1
- package/Marketplace/{chunk-CLQGGKN6.js → chunk-DCAYH4J7.js} +1 -1
- package/Marketplace/{chunk-B6F5PDL5.js → chunk-F7I7HQGQ.js} +1 -1
- package/Marketplace/chunk-F7JWZJVZ.js +1 -0
- package/Marketplace/{chunk-PLLHTY6O.js → chunk-FQQOS3AF.js} +1 -1
- package/Marketplace/{chunk-M65Z55OS.js → chunk-GFVJVBGH.js} +1 -1
- package/Marketplace/{chunk-RCBY7EIY.js → chunk-GWYT3CQM.js} +1 -1
- package/Marketplace/{chunk-AEVLZ7NS.js → chunk-HANPHNZU.js} +1 -1
- package/Marketplace/{chunk-7SB4C4PT.js → chunk-HCR33US3.js} +1 -1
- package/Marketplace/{chunk-I723PUUO.js → chunk-HF4T6G54.js} +1 -1
- package/Marketplace/{chunk-QCV5XC3U.js → chunk-HUZZJ34K.js} +2 -2
- package/Marketplace/{chunk-CBU473N2.js → chunk-IFP44BTX.js} +1 -1
- package/Marketplace/chunk-IGS6BEII.js +1 -0
- package/Marketplace/{chunk-3JYZF65T.js → chunk-KNPQ6DPC.js} +1 -1
- package/Marketplace/{chunk-UBTALPOC.js → chunk-KOQGQF2L.js} +1 -1
- package/Marketplace/{chunk-KSVJCX2D.js → chunk-M2FDHHOH.js} +1 -1
- package/Marketplace/chunk-MQRQ3LOB.js +1 -0
- package/Marketplace/{chunk-TIIGDXIJ.js → chunk-NN6DSN34.js} +2 -2
- package/Marketplace/{chunk-2IASUYTM.js → chunk-OR34CB7O.js} +1 -1
- package/Marketplace/{chunk-7DT7FQ2T.js → chunk-PHTDDNER.js} +1 -1
- package/Marketplace/{chunk-5CHTDUME.js → chunk-PL2WVYMI.js} +1 -1
- package/Marketplace/{chunk-DH5CXAEM.js → chunk-QMC2DZIB.js} +1 -1
- package/Marketplace/{chunk-PZKN5FIT.js → chunk-QQY7JGZW.js} +1 -1
- package/Marketplace/{chunk-ZUL6ZHSW.js → chunk-SZVJOKAX.js} +1 -1
- package/Marketplace/{chunk-J6BQDYXO.js → chunk-U6KJZIHD.js} +1 -1
- package/Marketplace/{chunk-GVI6GJHY.js → chunk-WFXKYFBX.js} +1 -1
- package/Marketplace/{chunk-C6JHPCLF.js → chunk-WPKFNEM6.js} +1 -1
- package/Marketplace/{chunk-FCFCTT5A.js → chunk-X2RNU4B3.js} +1 -1
- package/Marketplace/{chunk-3K2EKA5O.js → chunk-X7JNYYQS.js} +1 -1
- package/Marketplace/{chunk-MKADKY44.js → chunk-XMN2RKK3.js} +1 -1
- package/Marketplace/{chunk-IDH7MCR3.js → chunk-YF56YLYK.js} +1 -1
- package/Marketplace/chunk-YLQKFPMU.js +1 -0
- package/Marketplace/chunk-YN55P3QH.js +1 -0
- package/Marketplace/{chunk-GX6JPDQ5.js → chunk-YQWENM2M.js} +1 -1
- package/Marketplace/{chunk-LABF6W37.js → chunk-Z5D5R7AO.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-YJKBQ3LW.js → main-BI4BOJO4.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-5X2L45XK.js +0 -1
- package/Marketplace/chunk-VYQD3A3M.js +0 -1
- package/Marketplace/chunk-WRK3ZHRX.js +0 -1
- package/Marketplace/chunk-X6COQADC.js +0 -1
- package/Marketplace/chunk-XDBH7EGC.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ei}from"./chunk-O4EO3YBL.js";import{a as Vn}from"./chunk-3JYZF65T.js";import{a as ti}from"./chunk-6XDT56RT.js";import{a as nt}from"./chunk-7JQEF4XX.js";import{a as zn}from"./chunk-BKR7YPEW.js";import{e as At}from"./chunk-M65Z55OS.js";import"./chunk-5X2E3W32.js";import{d as Gn,k as Jn,l as qn,m as Qn,n as Yn,o as Xn}from"./chunk-ZW2TMVZP.js";import{a as be}from"./chunk-E66QUDQF.js";import{a as X}from"./chunk-ADKAX3OO.js";import"./chunk-4VNQYYVV.js";import{b as ni}from"./chunk-FKGKMEDE.js";import{a as Hn,b as Kn}from"./chunk-ZKIO2ZQ6.js";import{a as Y}from"./chunk-UCEZJNIL.js";import{a as gt}from"./chunk-36U7D4LI.js";import{c as $n,f as Wn}from"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import{c as Rt,d as xt}from"./chunk-T7HRAMHR.js";import"./chunk-DAUML5UD.js";import"./chunk-DXYMG6QK.js";import"./chunk-63I3I3MX.js";import{a as et}from"./chunk-2IASUYTM.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import{a as ye,b as Se,c as Un}from"./chunk-5BSPSA4O.js";import"./chunk-FULVA6QB.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import{a as xe}from"./chunk-4YCSITNV.js";import{f as Ln}from"./chunk-WHHW4IZT.js";import{a as j}from"./chunk-ZSUWHVKX.js";import{a as Pn,b as Tn}from"./chunk-A7PUMY67.js";import"./chunk-N5AE5WMQ.js";import{a as Zn}from"./chunk-6OJQRHIZ.js";import{a as kn}from"./chunk-FHER4TFY.js";import{a as Ct}from"./chunk-7KG3DC5J.js";import{a as yn}from"./chunk-6OIMOM7S.js";import{d as fn,e as xn}from"./chunk-6KWG6O5L.js";import{a as ft}from"./chunk-5KYN6Y7M.js";import{a as An,b as Rn,c as jn}from"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as ct}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import{a as Bn}from"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import{a as En}from"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import{e as Nn}from"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import{a as fe}from"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import{i as lt}from"./chunk-I723PUUO.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import{g as ge}from"./chunk-L7WZ6U4T.js";import{b as Bt,c as Dn,d as Re,e as Jt}from"./chunk-LOWGZOML.js";import{P as Be,Q as Mn,ja as On,na as Zt,ra as Fn,sa as Ae}from"./chunk-5PMKN6PM.js";import{a as pt}from"./chunk-AGBJEXIM.js";import{b as Q,e as J}from"./chunk-OXWPYJNB.js";import{c as Ee,d as Ne,f as ue,g as mn,i as he,k as un,m as hn}from"./chunk-XBIHN6D3.js";import{b as I,c as y}from"./chunk-JBEKD57G.js";import{b as Vt,c as Et,d as st,e as Sn,f as bn,g as vn,h as wn,i as _e,j as Nt,k as Ce,m as tt,n as In}from"./chunk-EDEZ3JLR.js";import{A as kt,b as pn,c as Dt,h as K,m as Z}from"./chunk-L3W6SG2T.js";import{a as _n}from"./chunk-YTHY4IFS.js";import{a as Cn,b as rt,c as gn}from"./chunk-ZETUYNFJ.js";import{v as ht,w as _t}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{D as pe,E as cn,F as at,G as me,I as dn,c as Ot,e as an,f as rn,h as ln,i as ut,j as sn,l as Ft,m as ot}from"./chunk-LNJUGHOX.js";import{$b as g,$c as T,Ac as oe,Cc as ae,Dc as re,Fd as de,G as k,Gb as P,Gd as Kt,Ha as U,Hb as De,Hc as le,Ic as tn,K as ze,Kb as dt,Kc as se,Lb as Ye,Lc as q,Mb as V,Mc as p,Nc as L,Oa as wt,Oc as w,Qc as M,Rc as O,Sc as F,Tc as en,X as He,Z as Xt,Zb as G,Zc as jt,_c as St,aa as Wt,ac as Pt,ad as zt,bc as f,ca as Gt,cc as ke,cd as ce,dc as W,ea as vt,ec as A,f as Yt,fa as Ke,fc as R,g as Oe,gc as d,hc as r,hd as D,ic as s,id as B,jc as _,jd as nn,kb as ee,kc as Tt,kd as Ht,lb as $,lc as It,ma as te,mc as Mt,na as Fe,nb as l,nc as E,oc as N,od as on,pa as Ze,pc as Ve,qa as Je,qc as b,ra as C,rc as ne,sb as mt,tb as qe,v as yt,vc as x,xa as m,xc as c,ya as u,yc as Xe,za as it,zb as Qe,zc as ie}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var oi=(()=>{let a=class a{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"},{Title:"Scan Job V2",Url:"/menu/products/status/notificationV2",Description:"Scan results for each channel, including product counts and synchronization status"}]}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-status"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"]],template:function(n,o){n&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),_(3,"nav-tab",2),s()()(),_(4,"router-outlet")),n&2&&(l(3),d("Tabs",o.productTabs))},dependencies:[Pn,cn],encapsulation:2});let i=a;return i})();var bi=["data-p-icon","exclamation-triangle"],ai=(()=>{class i extends fe{pathId;onInit(){this.pathId="url(#"+Bt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=wt(i)))(n||i)}})();static \u0275cmp=P({type:i,selectors:[["","data-p-icon","exclamation-triangle"]],features:[dt],attrs:bi,decls:7,vars:2,consts:[["d","M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z","fill","currentColor"],["d","M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z","fill","currentColor"],["d","M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(e,n){e&1&&(it(),Tt(0,"g"),Mt(1,"path",0)(2,"path",1)(3,"path",2),It(),Tt(4,"defs")(5,"clipPath",3),Mt(6,"rect",4),It()()),e&2&&(G("clip-path",n.pathId),l(5),ne("id",n.pathId))},encapsulation:2})}return i})();var vi=["data-p-icon","info-circle"],ri=(()=>{class i extends fe{pathId;onInit(){this.pathId="url(#"+Bt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=wt(i)))(n||i)}})();static \u0275cmp=P({type:i,selectors:[["","data-p-icon","info-circle"]],features:[dt],attrs:vi,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(e,n){e&1&&(it(),Tt(0,"g"),Mt(1,"path",0),It(),Tt(2,"defs")(3,"clipPath",1),Mt(4,"rect",2),It()()),e&2&&(G("clip-path",n.pathId),l(3),ne("id",n.pathId))},encapsulation:2})}return i})();function wi(i,a){if(i&1&&(r(0,"div",9),_(1,"img",10),r(2,"span"),p(3),s()()),i&2){let t=a.$implicit;d("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),l(),d("src",t.Img,$),l(2),L(t.Name)}}function Pi(i,a){if(i&1&&(r(0,"div",9),_(1,"img",10),r(2,"span"),p(3),s()()),i&2){let t=a.$implicit;d("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),l(),d("src",t.Img,$),l(2),L(t.Name)}}function Ti(i,a){if(i&1&&(r(0,"mat-radio-button",14),p(1," Sellable "),s()),i&2){let t=c(2);d("value",t.scanTypeEnum.Sellable)}}function Ii(i,a){if(i&1){let t=b();r(0,"div",7)(1,"label",11),p(2,"Scan Type"),s(),r(3,"mat-radio-group",12),F("ngModelChange",function(n){m(t);let o=c();return O(o.filter.ScanFull,n)||(o.filter.ScanFull=n),u(n)}),r(4,"mat-radio-button",13),p(5," All "),s(),g(6,Ti,2,1,"mat-radio-button",14),r(7,"mat-radio-button",15),p(8," Active "),s()()()}if(i&2){let t=c();l(3),M("ngModel",t.filter.ScanFull),l(),d("value",t.scanTypeEnum.All),l(2),f(t.selectedChannel.TypeID==t.channelType.Tiktok?6:-1),l(),d("value",t.scanTypeEnum.Active)}}function Mi(i,a){i&1&&(r(0,"span"),p(1,"Never"),s())}function Oi(i,a){if(i&1&&(r(0,"span"),p(1),D(2,"async"),s()),i&2){let t=c(2);l(),L(B(2,1,t.lastSync$))}}function Fi(i,a){if(i&1){let t=b();r(0,"div",8)(1,"label",5)(2,"span",16),p(3,"Last Scan:"),s(),g(4,Mi,2,0,"span"),D(5,"async"),Pt(6,Oi,3,3,"span"),s(),r(7,"mat-radio-group",17),F("ngModelChange",function(n){m(t);let o=c();return O(o.filter.UpdatedProduct,n)||(o.filter.UpdatedProduct=n),u(n)}),r(8,"mat-radio-button",18),p(9," Scan All Products "),s(),r(10,"mat-radio-button",19),p(11),s()()()}if(i&2){let t=c();l(4),f(B(5,6,t.lastSync$)==null?4:6),l(3),M("ngModel",t.filter.UpdatedProduct),l(),d("value",!1),l(2),d("value",!0)("matTooltip",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Use Tokopedia URL for mapping SKU between POS and Tokopedia":"Scan only products that have been updated since the last channel scan"),l(),w(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function Di(i,a){if(i&1){let t=b();r(0,"div",8)(1,"label",5),p(2," Scan Option "),s(),r(3,"mat-radio-group",20),F("ngModelChange",function(n){m(t);let o=c();return O(o.filter.Async,n)||(o.filter.Async=n),u(n)}),r(4,"mat-radio-button",21),p(5," Asynchronous (Get Notified when Complete) "),s(),r(6,"mat-radio-button",22),p(7," Synchronous (Wait until Complete) "),s()()()}if(i&2){let t=c();l(3),M("ngModel",t.filter.Async),l(),d("value",!0),l(2),d("value",!1)}}var H=(()=>{let a=class a extends jn{constructor(){super(),this.dialogRef=C(Vt),this.data=C(Et),this.router=C(at),this.channelService=C(Vn),this.channelType=I,this.disabledChannelOption=!1,this.filter={ChannelID:y.GuidEMpty,ScanFull:0,UpdatedProduct:!1,Async:!1},this.scanTypeEnum=zn;let e=this.data;this.isSingleChannel=y.IsNotEmpty(e.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=y.IsEmpty(e.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}ngAfterViewInit(){this.initTopPosition()}ngOnDestroy(){this.stopOverlayObserver()}initModalConfig(){this.modalConfig=new Nt,this.data.useV2?this.modalConfig.title="Scan Channel Marketplace V2":this.modalConfig.title=this.isSingleChannel?"Scan Single Product":"Scan Channel Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(e=>(e.disabled=!0,(e.TypeID==I.Tiktok||e.TypeID==I.Tokopedia||e.TypeID==I.Lazada||e.TypeID==I.WooCommerce)&&(e.disabled=!1),e)).sort(e=>e.disabled?1:-1))}onSelectChannel(e){let n=this.filterChannelById(e);this.selectedChannel=n,this.filter.Async=!0,this.iniHasScanUpdate(),this.getLastSync(e)}onClickSelect(){setTimeout(()=>{this.adjustOverlayPosition()},0)}getLastSync(e){this.lastSync$=this.channelService.getLastSync(e).pipe(yt(n=>(this.selectedChannel.LastSync=n.LastSync,this.setDefaultConfigUpdate(),y.IsNotEmpty(n.LastSync)?y.convertToReadableDate(n.LastSync):null)),Xt(1))}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&y.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==I.Shopee||this.selectedChannel.TypeID==I.Tiktok||this.selectedChannel.TypeID==I.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=I.WooCommerce&&this.selectedChannel?.TypeID!=I.KalCare&&this.selectedChannel?.TypeID!=I.None&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(e){let n;return this.channelOptions&&(n=this.channelOptions.find(o=>o.ID==e)),n}submit(){this.selectedChannel.TypeID==I.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):this.dialogRef.close(this.filter)}isNotEmpty(e){return y.IsNotEmpty(e)}onClose(){this.dialogRef.close()}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-scan-dialog"]],features:[dt],decls:13,vars:8,consts:[["selectedItem",""],["item",""],[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["optionLabel","Name","optionValue","ID","placeholder","Select a Channel","appendTo","body","filterBy","Name",1,"w-100",2,"--p-select-padding-y","0.75rem",3,"click","ngModelChange","options","ngModel","filter"],[1,"mt-4"],[1,"mt-8"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mb-2","fw-bold","mt-3"],["name","scanType",1,"form-control","h-100","rounded-1",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scans all products across every status in seller center",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scans products available for sale, including Active, Pending, Seller Deactivated, and Unknown status in seller center",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan Product with Active status in seller center",1,"me-5",3,"value"],[1,"me-2"],["name","ScanFull",1,"form-control","h-100","rounded-1",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above",1,"me-5",3,"value","matTooltip"],["name","Async",1,"form-control","h-100","rounded-1",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(n,o){if(n&1){let h=b();r(0,"modal-material",2),x("onOk",function(){return m(h),u(o.submit())})("onClose",function(){return m(h),u(o.onClose())})("onCancel",function(){return m(h),u(o.onClose())}),r(1,"div",3)(2,"div",4)(3,"label",5),p(4,"Select a Channel"),s(),r(5,"p-select",6),x("click",function(){return m(h),u(o.onClickSelect())}),F("ngModelChange",function(v){return m(h),O(o.filter.ChannelID,v)||(o.filter.ChannelID=v),u(v)}),x("ngModelChange",function(v){return m(h),u(o.onSelectChannel(v))}),V(6,wi,4,3,"ng-template",null,0,Ht)(8,Pi,4,3,"ng-template",null,1,Ht),s(),g(10,Ii,9,4,"div",7),g(11,Fi,12,8,"div",8),g(12,Di,8,3,"div",8),s()()()}n&2&&(d("dynamicValidated",o.isNotEmpty(o.filter.ChannelID))("config",o.modalConfig),l(5),d("options",o.channelOptions),M("ngModel",o.filter.ChannelID),d("filter",!0),l(5),f(!o.isSingleChannel&&o.isNotEmpty(o.filter.ChannelID)?10:-1),l(),f(o.hasScanUpdate&&o.selectedChannel?11:-1),l(),f(!o.isSingleChannel&&o.isNotEmpty(o.filter.ChannelID)?12:-1))},dependencies:[ot,Rn,An,kt,K,Z,Ce,xe,Se,_t,ht,Wn,ye,ut],encapsulation:2});let i=a;return i})();var bt=(function(i){return i.Tokopedia="https://seller.tokopedia.com",i.Shoope="https://seller.shopee.co.id",i.Tiktok="https://seller-id.tiktok.com",i.WooCommerce="https://woocommerce.dealpos.app",i.Lazada="https://sellercenter.lazada.co.id",i})(bt||{});var Ue={Success:"Success",Info:"Info",Warning:"Warning",Error:"Error"};var ki=[[["header"]],[["content"]],[["footer"]]],Vi=["header","content","footer"],Ei=(i,a)=>({bodyScrollable:i,hideScrollbar:a}),Ni=(i,a,t,e)=>({"bg-success":i,"bg-warning":a,"bg-info":t,"bg-danger":e}),Bi=i=>({"mx-auto":i}),Ai=(i,a)=>({"show-footer":i,"p-0":a});function Ri(i,a){if(i&1){let t=b();r(0,"div",7),x("click",function(){m(t);let n=c();return u(n.onBack.emit())}),r(1,"a",8),_(2,"i",9),s()()}}function Li(i,a){if(i&1){let t=b();r(0,"div")(1,"a",10),x("click",function(){m(t);let n=c();return u(n.onClose.emit())}),_(2,"i",11),s()()}}function Ui(i,a){if(i&1){let t=b();r(0,"a",14),x("click",function(){m(t);let n=c(2);return u(n.onCancel.emit())}),p(1),s()}if(i&2){let t=c(2);l(),w(" ",t.config!=null&&t.config.cancelText?t.config==null?null:t.config.cancelText:"Cancel")}}function $i(i,a){if(i&1){let t=b();r(0,"button",15),x("click",function(){m(t);let n=c(2);return u(n.onOk.emit())})("keyup.F2",function(){m(t);let n=c(2);return u(n.onOk.emit())}),s()}if(i&2){let t=c(2);d("disabled",!(t.config!=null&&t.config.validated)||!t.dynamicValidated)("innerHTML",t.config!=null&&t.config.okText?t.config==null?null:t.config.okText:"Ok (F2)",ee)}}function Wi(i,a){if(i&1&&(r(0,"mat-dialog-actions",6),ie(1,2),g(2,Ui,2,1,"a",12),g(3,$i,1,2,"button",13),s()),i&2){let t=c();l(2),f(t.config!=null&&t.config.hideCancel?-1:2),l(),f(t.config!=null&&t.config.hideOk?-1:3)}}var $e=class{constructor(){this.title="New Modal",this.okText="Ok (F2)",this.cancelText="Cancel",this.hideFooter=!1,this.hideCancel=!1,this.hideOk=!1,this.hideClose=!1,this.eMoney=!1,this.headerType=Ue.Success,this.validated=!0,this.customWidth="initial",this.bodyScrollable=!1,this.hideScrollbar=!1,this.disableKeyup=!1,this.noPadding=!1}},li=(()=>{let a=class a{constructor(){this.dynamicValidated=!0,this.onOk=new mt,this.onCancel=new mt,this.onClose=new mt,this.onBack=new mt,this.headerType=Ue}ngOnInit(){this.config==null&&(this.config=new $e)}onKeyup(e){this.config?.disableKeyup||(e.code=="F2"&&this.onOk.emit("F2"),(e.code=="Enter"||e.code=="NumpadEnter")&&this.onOk.emit("Enter"))}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["modal-material"]],inputs:{config:"config",dynamicValidated:"dynamicValidated"},outputs:{onOk:"onOk",onCancel:"onCancel",onClose:"onClose",onBack:"onBack"},ngContentSelectors:Vi,decls:11,vars:23,consts:[["id","modal_material",1,"modal-material","d-flex","align-items-start","flex-column","position-relative","maxHeight",3,"keyup","ngClass"],["mat-dialog-title","",1,"d-flex","w-100","justify-content-between","modal-header","position-relative",3,"ngClass"],[1,"back-button","position-absolute","pointer","d-print-none"],[1,"d-flex","flex-row","d-print-none","align-items-center",3,"ngClass"],[1,"fw-normal"],[1,"modal-body","w-100",3,"ngClass"],[1,"w-100","py-7","border-top","d-flex","justify-content-end","d-print-none"],[1,"back-button","position-absolute","pointer","d-print-none",3,"click"],[1,"btn","back-button"],[1,"fa-solid","fa-arrow-left"],[1,"btn-light-blue","btn-sm","pointer","close",3,"click"],[1,"fa-solid","fa-xmark","fa-lg","text-primary"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3"],["data-cy","btn-ok",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"disabled","innerHTML"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],["data-cy","btn-ok",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click","keyup.F2","disabled","innerHTML"]],template:function(n,o){n&1&&(Xe(ki),r(0,"div",0),x("keyup",function(S){return o.onKeyup(S)}),r(1,"div",1),g(2,Ri,3,0,"div",2),r(3,"div",3)(4,"h4",4),p(5),s(),ie(6),s(),g(7,Li,3,0,"div"),s(),r(8,"mat-dialog-content",5),ie(9,1),s(),g(10,Wi,4,2,"mat-dialog-actions",6),s()),n&2&&(tn("width",o.config==null?null:o.config.customWidth),d("ngClass",zt(10,Ei,o.config==null?null:o.config.bodyScrollable,o.config==null?null:o.config.hideScrollbar)),l(),d("ngClass",ce(13,Ni,o.headerType.Success==(o.config==null?null:o.config.headerType),o.headerType.Warning==(o.config==null?null:o.config.headerType),o.headerType.Info==(o.config==null?null:o.config.headerType),o.headerType.Error==(o.config==null?null:o.config.headerType))),l(),f(o.config!=null&&o.config.eMoney?2:-1),l(),d("ngClass",T(18,Bi,o.config==null?null:o.config.eMoney)),l(2),L(o.config==null?null:o.config.title),l(2),f(o.config!=null&&o.config.hideClose?-1:7),l(),d("ngClass",zt(20,Ai,!(o.config!=null&&o.config.hideFooter),o.config==null?null:o.config.noPadding)),l(2),f(o.config!=null&&o.config.hideFooter?-1:10))},dependencies:[ot,Ot,wn,Sn,vn,bn],styles:[".mat-mdc-dialog-container{padding:0!important;border-radius:4px!important;overflow:visible!important} .mat-mdc-dialog-container [mat-dialog-title]{color:#fff;padding:15px;border:none}@media print{ .mat-mdc-dialog-container{box-shadow:unset;width:100vw}}@media print{ .cdk-overlay-pane{position:absolute!important;top:-30px;max-width:100vw!important}.modal-body[_ngcontent-%COMP%]{width:100vw!important}}body.modal-body[_ngcontent-%COMP%]{height:100%;overflow-y:hidden}mat-dialog-actions[_ngcontent-%COMP%]{bottom:15px}mat-dialog-actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:15px!important;margin-right:12px}mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:15px!important}mat-dialog-actions[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin-right:auto;margin-top:-1rem;padding-top:.4rem!important;margin-left:1rem}.back-button[_ngcontent-%COMP%]{top:5px;left:0}.close[_ngcontent-%COMP%]{padding:.4rem .5rem}.no-padding[_ngcontent-%COMP%]{padding:0}.modal-material[_ngcontent-%COMP%]{width:40vw}@media (max-width: 992px){.modal-material[_ngcontent-%COMP%]{width:50vw!important}}@media (max-width: 576px){ .dialog-filter .modal-material{width:100%!important} .dialog-filter mat-dialog-actions{position:sticky;bottom:0;background:#fff} .dialog-filter .modal-material.d-flex.align-items-start.flex-column.position-relative.maxHeight.bodyScrollable.maxHeight.bodyScrollable .modal-body{max-height:100%!important;overflow-y:auto}}.maxHeight.bodyScrollable[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow-y:auto}.modal-header[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:15px}.modal-dialog[_ngcontent-%COMP%]{max-width:none}.modal-content[_ngcontent-%COMP%]{width:auto;margin:auto;max-width:850px}.maxHeight[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow:auto}.modal-body[_ngcontent-%COMP%]{padding:1rem}.modal-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block}.modal-body[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin:0;position:absolute;bottom:-20px}.modal-body[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]{border:1px solid #c8d3df;padding:5px 7px}.modal-body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:330px;height:90px}"]});let i=a;return i})();var Gi=i=>({"is-disabled":i});function ji(i,a){if(i&1&&(r(0,"tr")(1,"td",8),p(2),s(),r(3,"td",8),p(4),s(),r(5,"td",9)(6,"p",10),p(7,"Product Not in Channel!"),s()()()),i&2){let t=c().$implicit;l(2),w(" ",t==null?null:t.Model," "),l(2),w(" ",t==null?null:t.Code," ")}}function zi(i,a){if(i&1&&(r(0,"td",8),p(1),s()),i&2){let t=c(3).$implicit;G("rowspan",t.Channel.length),l(),w(" ",t==null?null:t.Model," ")}}function Hi(i,a){if(i&1&&(r(0,"td",8),p(1),s()),i&2){let t=c(3).$implicit;G("rowspan",t.Channel.length),l(),w(" ",t==null?null:t.Code," ")}}function Ki(i,a){if(i&1){let t=b();r(0,"tr"),g(1,zi,2,2,"td",8),g(2,Hi,2,2,"td",8),r(3,"td",8)(4,"div",11)(5,"a",12),_(6,"img",13),s(),r(7,"div",14),p(8),s()()(),r(9,"td",8),p(10),D(11,"number"),s(),r(12,"td",15),p(13),D(14,"number"),s(),r(15,"td",16)(16,"div",17)(17,"button",18),x("click",function(){let n=m(t).$implicit,o=c(2).$implicit,h=c();return u(h.onDetach(n,o))}),_(18,"i",19),r(19,"span",20),p(20,"Detach"),s()(),r(21,"a",21),_(22,"i",22),r(23,"span",20),p(24,"Edit"),s()()()()()}if(i&2){let t=a.$implicit,e=a.$index,n=c(3);l(),f(e==0?1:-1),l(),f(e==0?2:-1),l(3),d("href",t.Url,$)("title",t.Title),l(),d("src",n.getChannelLogo(t.TypeID),$),l(),d("matTooltip",(t==null||t.Name==null?null:t.Name.length)>40?t==null?null:t.Name:""),l(),w(" ",t.Name," "),l(2),L(B(11,12,t.Price)),l(3),L(B(14,14,t.Inventory)),l(8),d("href",n.getHyperlinkSellerCenter(t),$)("ngClass",T(16,Gi,t.TypeID==n.channelType.KalCare))("matTooltip",t.TypeID!=n.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function Zi(i,a){if(i&1&&A(0,Ki,25,18,"tr",null,ke),i&2){let t=c().$implicit;R(t==null?null:t.Channel)}}function Ji(i,a){if(i&1&&g(0,ji,8,2,"tr")(1,Zi,2,0),i&2){let t=a.$implicit;f(!t.Channel||t.Channel.length<1?0:1)}}var ve=(()=>{let a=class a{constructor(){this.data=C(Et),this.dialogRef=C(Vt),this.httpService=C(J),this.toastr=C(Q),this.variants=U([]),this.channelType=I;let e=this.data;this.variants.set(this.data.variants),this.title=e.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new Nt,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideFooter=!0,this.modalConfig.customWidth="850px"}onDetach(e,n){let o={ChannelID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariationID:e.ChannelVariationID};this.httpService.post(pt.DetachVariant,[o]).subscribe(h=>{this.toastr.success(h.Message,"Success"),this.updateVariantAfterDetach(n,e.ChannelVariationID)})}updateVariantAfterDetach(e,n){this.variants.update(o=>{let h=o.findIndex(S=>S.ID===e.ID);return h!==-1&&(o[h].Channel=o[h].Channel.filter(S=>S.ChannelVariationID!==n)),[...o]})}getChannelLogo(e){return y.getChannelLogoByTypeId(e)}getHyperlinkSellerCenter(e){let n="javascript:void(0)";switch(e.TypeID){case I.Shopee:n=`${bt.Shoope}/portal/product/${e.ChannelItemID}`;break;case I.Tiktok:n=`${bt.Tiktok}/product/edit/${e.ChannelItemID}`;break;case I.Tokopedia:n=`${bt.Tokopedia}/edit-product/${e.ChannelItemID}`;break;case I.WooCommerce:n=`${bt.WooCommerce}/wp-admin/post.php?post=${e.ChannelItemID}&action=edit`;break;case I.Lazada:n=`${bt.Lazada}/apps/product/publish?productId=${e.ChannelItemID}`;break}return n}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-modal-variant"]],decls:27,vars:1,consts:[[3,"onClose","onCancel","config"],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],[1,"d-flex","align-items-center"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],[1,"text-end"],[1,"d-flex","align-items-center","justify-content-end"],[1,"btn","btn-small","btn-light","px-4","py-2","me-3",3,"click"],[1,"fa-sharp","fa-link-slash","me-2",2,"font-size","10px"],[1,"fs-6"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-edit","me-2",2,"font-size","10px"]],template:function(n,o){n&1&&(r(0,"modal-material",0),x("onClose",function(){return o.dialogRef.close()})("onCancel",function(){return o.dialogRef.close()}),r(1,"content")(2,"table",1)(3,"thead",2)(4,"tr")(5,"th",3)(6,"div",4)(7,"span"),p(8,"VARIANT"),s(),r(9,"sup"),_(10,"i",5),s()()(),r(11,"th",3),p(12,"SKU"),s(),r(13,"th",3)(14,"div",4)(15,"span"),p(16,"PRODUCT"),s(),r(17,"sup"),_(18,"i",6),s()()(),r(19,"th",3),p(20,"PRICE"),s(),r(21,"th",7),p(22,"INVENTORY"),s(),_(23,"th",3),s()(),r(24,"tbody"),A(25,Ji,2,1,null,null,ke),s()()()()),n&2&&(d("config",o.modalConfig),l(25),R(o.variants()))},dependencies:[ot,Ot,_t,ht,li,Ft],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"]});let i=a;return i})();function qi(i,a){if(i&1&&(r(0,"mat-option",5)(1,"div"),_(2,"img",6),r(3,"span"),p(4),s()()()),i&2){let t=a.$implicit;d("value",t.ChannelID),l(2),d("src",t.logo,$),l(2),L(t.Title)}}var $t=(()=>{let a=class a{constructor(){this.dialogRef=C(Vt),this.channels=C(Et),this.channelIds=U([]),this.channelOptions=U([])}ngOnInit(){this.initModalConfig();let e=this.channels.filter((n,o,h)=>h.findIndex(S=>S.ChannelID===n.ChannelID)===o);this.channelOptions.set(e)}initModalConfig(){this.modalConfig=new Nt,this.modalConfig.title="Detach Product",this.modalConfig.okText="Save"}onClose(){this.dialogRef.close()}onSave(){let e=this.channels.filter(n=>this.channelIds().includes(n.ChannelID)).map(n=>({ChannelID:n.ChannelID,ChannelItemID:n.ChannelItemID}));this.dialogRef.close(e)}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-modal-detach-product"]],decls:9,vars:4,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"],[1,"channel-option",3,"value"],[2,"width","18px","margin-right","10px",3,"src"]],template:function(n,o){n&1&&(r(0,"modal-material",0),x("onClose",function(){return o.onClose()})("onCancel",function(){return o.onClose()})("onOk",function(){return o.onSave()}),r(1,"div",1)(2,"div")(3,"label",2),p(4,"Select a Channel"),s(),r(5,"mat-form-field",3)(6,"mat-select",4),F("ngModelChange",function(S){return O(o.channelIds,S)||(o.channelIds=S),S}),A(7,qi,5,3,"mat-option",5,W),s()()()()()),n&2&&(d("dynamicValidated",o.channelIds().length>0)("config",o.modalConfig),l(6),M("ngModel",o.channelIds),d("multiple",!0),l(),R(o.channelOptions()))},dependencies:[Ce,xe,Ln,Kn,Hn,$n,kt,K,Z,_t],encapsulation:2});let i=a;return i})();var we=i=>[i];function Qi(i,a){if(i&1){let t=b();r(0,"button",15),x("click",function(){m(t);let n=c(2);return u(n.onDetachMultipleProduct())}),_(1,"i",16),p(2),s()}if(i&2){let t,e=c(2);l(2),w("Detach (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function Yi(i,a){if(i&1&&(E(0),g(1,Qi,3,1,"button",14),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)?1:-1)}}function Xi(i,a){if(i&1){let t=b();r(0,"button",18),x("click",function(){m(t);let n=c(3);return u(n.onOpenScanDialog())}),_(1,"i",19),p(2," Scan Channel "),s()}}function to(i,a){if(i&1&&g(0,Xi,3,0,"button",17),i&2){let t=c(2);f(t.productService.hasSelection(t.products)?-1:0)}}function eo(i,a){if(i&1&&(E(0),g(1,to,1,1),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)?-1:1)}}function no(i,a){if(i&1){let t=b();r(0,"button",21),x("click",function(){m(t);let n=c(2);return u(n.onScanMultipleProduct())}),_(1,"i",19),p(2),s()}if(i&2){let t,e=c(2);l(2),w(" Scan (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function io(i,a){if(i&1&&(E(0),g(1,no,3,1,"button",20),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)&&t.multipeScanChannels.length>0?1:-1)}}function oo(i,a){if(i&1){let t=b();r(0,"button",23),x("click",function(){m(t);let n=c(2);return u(n.onUploadMultipleProduct())}),_(1,"i",24),p(2),s()}if(i&2){let t,e=c(2);l(2),w(" Upload (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function ao(i,a){if(i&1&&(E(0),g(1,oo,3,1,"button",22),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)?1:-1)}}function ro(i,a){if(i&1){let t=b();r(0,"div",11)(1,"app-product-card",25),x("onUpload",function(){let n=m(t).$implicit,o=c();return u(o.onUploadToMultipleChannel(n))})("onScan",function(){let n=m(t).$implicit,o=c();return u(o.onScanSingleProduct(n))})("onDescEvent",function(){let n=m(t).$index,o=c();return u(o.onOpenDialogVariant(n))})("onCheckBoxChange",function(n){let o=m(t).$implicit;return u(o.selected=n)})("onDetach",function(){let n=m(t).$implicit,o=c();return u(o.onDetachProduct([n]))}),s()()}if(i&2){let t=a.$implicit,e=c();l(),d("productId",t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",e.productService.getChannelProduct(t))("code",e.getVariantCode(t==null?null:t.Variants))("showCheckBox",(t==null?null:t.Channel.length)<e.channelOptions.length)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function lo(i,a){i&1&&(r(0,"div",12),_(1,"app-empty-state"),s())}function so(i,a){if(i&1){let t=b();r(0,"div",13)(1,"div",26)(2,"app-custom-paginator",27),x("next",function(){m(t);let n=c();return u(n.getProducts())})("previous",function(){m(t);let n=c();return u(n.getProducts())}),s()()()}if(i&2){let t=c();l(2),d("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}var ci=(()=>{let a=class a{constructor(){this.http=C(J),this.toastr=C(Q),this.dialog=C(st),this.productService=C(et),this.authService=C(lt),this.uploadProductService=C(At),this.route=C(at),this.searchFilter=new Ct,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.scanProductRole=j.ProductScan,this.uploadProductRole=j.ProductUpload,this.detachProductRole=j.ProductDetach,this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(e=>{this.Categories=e.Options.Categories,this.searchFilter.PageNumber=e.Filter.PageNumber,this.searchFilter.RowCount=e.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=e.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok])}getProducts(){let e={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",e).subscribe(n=>{this.products=n.Data,this.rowCount=n.Total==null?this.searchFilter.RowCount:n.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=y.GuidEMpty,this.dialog.open(H,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(k(o=>y.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(e,n,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(e){let n=this.products[e]?.Variants||[];this.dialog.open(ve,{data:{title:this.products[e].Name,variants:n}})}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(e),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(e){this.uploadProductService.setSelectedProduct([e]),this.route.navigate(["/menu/products/upload"])}searchProduct(e){this.searchFilter.text=e,this.getProducts()}onScanMultipleProduct(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=y.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok]);this.dialog.open(H,{data:{filter:e,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(k(h=>y.IsNotEmpty(h))).subscribe(h=>{this.searchFilter.ChannelID=h.ChannelID,this.searchFilter.ScanFull=h.ScanFull,this.searchFilter.UpdatedProduct=h.UpdatedProduct;let S=this.productService.selectedProduct(this.products),v=this.productService.getVariantCodesProducts(S);this.scanSingleProduct(v)})}onScanSingleProduct(e){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=y.GuidEMpty,this.dialog.open(H,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(k(o=>y.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID;let h=this.productService.getVariantCodesProduct(e);this.scanSingleProduct(h)})}scanSingleProduct(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${o?.Name} `,"Error")}this.searchFilter.ChannelID=y.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=y.GuidEMpty}})}getVariantCode(e=[]){let n;return e?.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),e?.length==1&&(n=e[0].Code),n}onDetachProduct(e){let n=[];e.forEach(o=>{o.Channel=y.assignChannelLogo(o.Channel),n.push(...o.Channel)}),this.dialog.open($t,{width:"600px",data:[...n]}).afterClosed().pipe(k(o=>y.IsNotEmpty(o)),Wt(o=>this.productService.detachProduct(o))).subscribe(o=>{this.toastr.success(o.Message,_e.Success),this.getProducts()})}onDetachMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.onDetachProduct(e)}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-in-pos"]],standalone:!1,decls:24,vars:21,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"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],["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"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"]],template:function(n,o){if(n&1){let h=b();r(0,"mainpanel",1),x("onSubmit",function(v){return m(h),u(o.searchProduct(v))}),r(1,"actions"),V(2,Yi,2,1,"ng-container",2)(3,eo,2,1,"ng-container",2)(4,io,2,1,"ng-container",2)(5,ao,2,1,"ng-container",2),s(),r(6,"filters")(7,"div")(8,"label",3),p(9,"Category"),s(),r(10,"ng-select",4),x("ngModelChange",function(v){return m(h),u(o.searchFilter.Category=v)}),s()(),r(11,"div",5)(12,"mat-date-range-input",6)(13,"input",7),F("ngModelChange",function(v){return m(h),O(o.startDate,v)||(o.startDate=v),u(v)}),x("click",function(){m(h);let v=le(16);return u(v.open())}),s(),r(14,"input",8),F("ngModelChange",function(v){return m(h),O(o.endDate,v)||(o.endDate=v),u(v)}),x("click",function(){m(h);let v=le(16);return u(v.open())}),s()(),_(15,"mat-date-range-picker",null,0),s()(),r(17,"content")(18,"div",9)(19,"div",10),A(20,ro,2,11,"div",11,W),g(22,lo,2,0,"div",12),s(),g(23,so,3,5,"div",13),s()()()}if(n&2){let h=le(16);d("headerTitle","In POS ("+o.rowCount+")"),l(2),d("ngxPermissionsOnly",T(13,we,o.detachProductRole)),l(),d("ngxPermissionsOnly",T(15,we,o.scanProductRole)),l(),d("ngxPermissionsOnly",T(17,we,o.scanProductRole)),l(),d("ngxPermissionsOnly",T(19,we,o.scanProductRole)),l(5),d("clearable",!0)("items",o.Categories)("ngModel",o.searchFilter.Category),l(2),d("rangePicker",h),l(),M("ngModel",o.startDate),l(),M("ngModel",o.endDate),l(6),R(o.products),l(2),f(o.products.length==0?22:-1),l(),f(o.products.length>0?23:-1)}},dependencies:[Dt,K,Z,tt,fn,ct,gt,nt,Jn,qn,Qn,Yn,rt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]});let i=a;return i})();var di=`
|
|
1
|
+
import{a as ei}from"./chunk-O4EO3YBL.js";import{a as Vn}from"./chunk-KNPQ6DPC.js";import{a as ti}from"./chunk-6XDT56RT.js";import{a as nt}from"./chunk-7JQEF4XX.js";import{a as zn}from"./chunk-BKR7YPEW.js";import{e as At}from"./chunk-GFVJVBGH.js";import"./chunk-5X2E3W32.js";import{d as Gn,k as Jn,l as qn,m as Qn,n as Yn,o as Xn}from"./chunk-ZW2TMVZP.js";import{a as be}from"./chunk-E66QUDQF.js";import{a as X}from"./chunk-5NFLGFHD.js";import"./chunk-4VNQYYVV.js";import{b as ni}from"./chunk-FKGKMEDE.js";import{a as Hn,b as Kn}from"./chunk-ZKIO2ZQ6.js";import{a as Y}from"./chunk-BUY4AAHK.js";import{a as gt}from"./chunk-36U7D4LI.js";import{c as $n,f as Wn}from"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import{c as Rt,d as xt}from"./chunk-T7HRAMHR.js";import"./chunk-DAUML5UD.js";import"./chunk-DXYMG6QK.js";import"./chunk-63I3I3MX.js";import{a as et}from"./chunk-OR34CB7O.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import{a as ye,b as Se,c as Un}from"./chunk-5BSPSA4O.js";import"./chunk-FULVA6QB.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import{a as xe}from"./chunk-4YCSITNV.js";import{f as Ln}from"./chunk-WHHW4IZT.js";import{a as j}from"./chunk-ZSUWHVKX.js";import{a as Pn,b as Tn}from"./chunk-A7PUMY67.js";import"./chunk-N5AE5WMQ.js";import{a as Zn}from"./chunk-6OJQRHIZ.js";import{a as kn}from"./chunk-FHER4TFY.js";import{a as Ct}from"./chunk-7KG3DC5J.js";import{a as yn}from"./chunk-4UPWMQJX.js";import{d as fn,e as xn}from"./chunk-6KWG6O5L.js";import{a as ft}from"./chunk-B5AYTAZQ.js";import{a as An,b as Rn,c as jn}from"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as ct}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import{a as Bn}from"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import{a as En}from"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import{e as Nn}from"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import{a as fe}from"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import{i as lt}from"./chunk-HF4T6G54.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import{g as ge}from"./chunk-L7WZ6U4T.js";import{b as Bt,c as Dn,d as Re,e as Jt}from"./chunk-LOWGZOML.js";import{P as Be,Q as Mn,ja as On,na as Zt,ra as Fn,sa as Ae}from"./chunk-5PMKN6PM.js";import{a as pt}from"./chunk-AGBJEXIM.js";import{b as Q,e as J}from"./chunk-OXWPYJNB.js";import{c as Ee,d as Ne,f as ue,g as mn,i as he,k as un,m as hn}from"./chunk-XBIHN6D3.js";import{b as I,c as y}from"./chunk-JBEKD57G.js";import{b as Vt,c as Et,d as st,e as Sn,f as bn,g as vn,h as wn,i as _e,j as Nt,k as Ce,m as tt,n as In}from"./chunk-EDEZ3JLR.js";import{A as kt,b as pn,c as Dt,h as K,m as Z}from"./chunk-L3W6SG2T.js";import{a as _n}from"./chunk-YTHY4IFS.js";import{a as Cn,b as rt,c as gn}from"./chunk-ZETUYNFJ.js";import{v as ht,w as _t}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{D as pe,E as cn,F as at,G as me,I as dn,c as Ot,e as an,f as rn,h as ln,i as ut,j as sn,l as Ft,m as ot}from"./chunk-LNJUGHOX.js";import{$b as g,$c as T,Ac as oe,Cc as ae,Dc as re,Fd as de,G as k,Gb as P,Gd as Kt,Ha as U,Hb as De,Hc as le,Ic as tn,K as ze,Kb as dt,Kc as se,Lb as Ye,Lc as q,Mb as V,Mc as p,Nc as L,Oa as wt,Oc as w,Qc as M,Rc as O,Sc as F,Tc as en,X as He,Z as Xt,Zb as G,Zc as jt,_c as St,aa as Wt,ac as Pt,ad as zt,bc as f,ca as Gt,cc as ke,cd as ce,dc as W,ea as vt,ec as A,f as Yt,fa as Ke,fc as R,g as Oe,gc as d,hc as r,hd as D,ic as s,id as B,jc as _,jd as nn,kb as ee,kc as Tt,kd as Ht,lb as $,lc as It,ma as te,mc as Mt,na as Fe,nb as l,nc as E,oc as N,od as on,pa as Ze,pc as Ve,qa as Je,qc as b,ra as C,rc as ne,sb as mt,tb as qe,v as yt,vc as x,xa as m,xc as c,ya as u,yc as Xe,za as it,zb as Qe,zc as ie}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var oi=(()=>{let a=class a{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"},{Title:"Scan Job V2",Url:"/menu/products/status/notificationV2",Description:"Scan results for each channel, including product counts and synchronization status"}]}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-status"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"]],template:function(n,o){n&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),_(3,"nav-tab",2),s()()(),_(4,"router-outlet")),n&2&&(l(3),d("Tabs",o.productTabs))},dependencies:[Pn,cn],encapsulation:2});let i=a;return i})();var bi=["data-p-icon","exclamation-triangle"],ai=(()=>{class i extends fe{pathId;onInit(){this.pathId="url(#"+Bt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=wt(i)))(n||i)}})();static \u0275cmp=P({type:i,selectors:[["","data-p-icon","exclamation-triangle"]],features:[dt],attrs:bi,decls:7,vars:2,consts:[["d","M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z","fill","currentColor"],["d","M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z","fill","currentColor"],["d","M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(e,n){e&1&&(it(),Tt(0,"g"),Mt(1,"path",0)(2,"path",1)(3,"path",2),It(),Tt(4,"defs")(5,"clipPath",3),Mt(6,"rect",4),It()()),e&2&&(G("clip-path",n.pathId),l(5),ne("id",n.pathId))},encapsulation:2})}return i})();var vi=["data-p-icon","info-circle"],ri=(()=>{class i extends fe{pathId;onInit(){this.pathId="url(#"+Bt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=wt(i)))(n||i)}})();static \u0275cmp=P({type:i,selectors:[["","data-p-icon","info-circle"]],features:[dt],attrs:vi,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(e,n){e&1&&(it(),Tt(0,"g"),Mt(1,"path",0),It(),Tt(2,"defs")(3,"clipPath",1),Mt(4,"rect",2),It()()),e&2&&(G("clip-path",n.pathId),l(3),ne("id",n.pathId))},encapsulation:2})}return i})();function wi(i,a){if(i&1&&(r(0,"div",9),_(1,"img",10),r(2,"span"),p(3),s()()),i&2){let t=a.$implicit;d("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),l(),d("src",t.Img,$),l(2),L(t.Name)}}function Pi(i,a){if(i&1&&(r(0,"div",9),_(1,"img",10),r(2,"span"),p(3),s()()),i&2){let t=a.$implicit;d("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),l(),d("src",t.Img,$),l(2),L(t.Name)}}function Ti(i,a){if(i&1&&(r(0,"mat-radio-button",14),p(1," Sellable "),s()),i&2){let t=c(2);d("value",t.scanTypeEnum.Sellable)}}function Ii(i,a){if(i&1){let t=b();r(0,"div",7)(1,"label",11),p(2,"Scan Type"),s(),r(3,"mat-radio-group",12),F("ngModelChange",function(n){m(t);let o=c();return O(o.filter.ScanFull,n)||(o.filter.ScanFull=n),u(n)}),r(4,"mat-radio-button",13),p(5," All "),s(),g(6,Ti,2,1,"mat-radio-button",14),r(7,"mat-radio-button",15),p(8," Active "),s()()()}if(i&2){let t=c();l(3),M("ngModel",t.filter.ScanFull),l(),d("value",t.scanTypeEnum.All),l(2),f(t.selectedChannel.TypeID==t.channelType.Tiktok?6:-1),l(),d("value",t.scanTypeEnum.Active)}}function Mi(i,a){i&1&&(r(0,"span"),p(1,"Never"),s())}function Oi(i,a){if(i&1&&(r(0,"span"),p(1),D(2,"async"),s()),i&2){let t=c(2);l(),L(B(2,1,t.lastSync$))}}function Fi(i,a){if(i&1){let t=b();r(0,"div",8)(1,"label",5)(2,"span",16),p(3,"Last Scan:"),s(),g(4,Mi,2,0,"span"),D(5,"async"),Pt(6,Oi,3,3,"span"),s(),r(7,"mat-radio-group",17),F("ngModelChange",function(n){m(t);let o=c();return O(o.filter.UpdatedProduct,n)||(o.filter.UpdatedProduct=n),u(n)}),r(8,"mat-radio-button",18),p(9," Scan All Products "),s(),r(10,"mat-radio-button",19),p(11),s()()()}if(i&2){let t=c();l(4),f(B(5,6,t.lastSync$)==null?4:6),l(3),M("ngModel",t.filter.UpdatedProduct),l(),d("value",!1),l(2),d("value",!0)("matTooltip",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Use Tokopedia URL for mapping SKU between POS and Tokopedia":"Scan only products that have been updated since the last channel scan"),l(),w(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function Di(i,a){if(i&1){let t=b();r(0,"div",8)(1,"label",5),p(2," Scan Option "),s(),r(3,"mat-radio-group",20),F("ngModelChange",function(n){m(t);let o=c();return O(o.filter.Async,n)||(o.filter.Async=n),u(n)}),r(4,"mat-radio-button",21),p(5," Asynchronous (Get Notified when Complete) "),s(),r(6,"mat-radio-button",22),p(7," Synchronous (Wait until Complete) "),s()()()}if(i&2){let t=c();l(3),M("ngModel",t.filter.Async),l(),d("value",!0),l(2),d("value",!1)}}var H=(()=>{let a=class a extends jn{constructor(){super(),this.dialogRef=C(Vt),this.data=C(Et),this.router=C(at),this.channelService=C(Vn),this.channelType=I,this.disabledChannelOption=!1,this.filter={ChannelID:y.GuidEMpty,ScanFull:0,UpdatedProduct:!1,Async:!1},this.scanTypeEnum=zn;let e=this.data;this.isSingleChannel=y.IsNotEmpty(e.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=y.IsEmpty(e.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}ngAfterViewInit(){this.initTopPosition()}ngOnDestroy(){this.stopOverlayObserver()}initModalConfig(){this.modalConfig=new Nt,this.data.useV2?this.modalConfig.title="Scan Channel Marketplace V2":this.modalConfig.title=this.isSingleChannel?"Scan Single Product":"Scan Channel Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(e=>(e.disabled=!0,(e.TypeID==I.Tiktok||e.TypeID==I.Tokopedia||e.TypeID==I.Lazada||e.TypeID==I.WooCommerce)&&(e.disabled=!1),e)).sort(e=>e.disabled?1:-1))}onSelectChannel(e){let n=this.filterChannelById(e);this.selectedChannel=n,this.filter.Async=!0,this.iniHasScanUpdate(),this.getLastSync(e)}onClickSelect(){setTimeout(()=>{this.adjustOverlayPosition()},0)}getLastSync(e){this.lastSync$=this.channelService.getLastSync(e).pipe(yt(n=>(this.selectedChannel.LastSync=n.LastSync,this.setDefaultConfigUpdate(),y.IsNotEmpty(n.LastSync)?y.convertToReadableDate(n.LastSync):null)),Xt(1))}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&y.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==I.Shopee||this.selectedChannel.TypeID==I.Tiktok||this.selectedChannel.TypeID==I.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=I.WooCommerce&&this.selectedChannel?.TypeID!=I.KalCare&&this.selectedChannel?.TypeID!=I.None&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(e){let n;return this.channelOptions&&(n=this.channelOptions.find(o=>o.ID==e)),n}submit(){this.selectedChannel.TypeID==I.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):this.dialogRef.close(this.filter)}isNotEmpty(e){return y.IsNotEmpty(e)}onClose(){this.dialogRef.close()}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-scan-dialog"]],features:[dt],decls:13,vars:8,consts:[["selectedItem",""],["item",""],[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["optionLabel","Name","optionValue","ID","placeholder","Select a Channel","appendTo","body","filterBy","Name",1,"w-100",2,"--p-select-padding-y","0.75rem",3,"click","ngModelChange","options","ngModel","filter"],[1,"mt-4"],[1,"mt-8"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mb-2","fw-bold","mt-3"],["name","scanType",1,"form-control","h-100","rounded-1",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scans all products across every status in seller center",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scans products available for sale, including Active, Pending, Seller Deactivated, and Unknown status in seller center",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan Product with Active status in seller center",1,"me-5",3,"value"],[1,"me-2"],["name","ScanFull",1,"form-control","h-100","rounded-1",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above",1,"me-5",3,"value","matTooltip"],["name","Async",1,"form-control","h-100","rounded-1",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(n,o){if(n&1){let h=b();r(0,"modal-material",2),x("onOk",function(){return m(h),u(o.submit())})("onClose",function(){return m(h),u(o.onClose())})("onCancel",function(){return m(h),u(o.onClose())}),r(1,"div",3)(2,"div",4)(3,"label",5),p(4,"Select a Channel"),s(),r(5,"p-select",6),x("click",function(){return m(h),u(o.onClickSelect())}),F("ngModelChange",function(v){return m(h),O(o.filter.ChannelID,v)||(o.filter.ChannelID=v),u(v)}),x("ngModelChange",function(v){return m(h),u(o.onSelectChannel(v))}),V(6,wi,4,3,"ng-template",null,0,Ht)(8,Pi,4,3,"ng-template",null,1,Ht),s(),g(10,Ii,9,4,"div",7),g(11,Fi,12,8,"div",8),g(12,Di,8,3,"div",8),s()()()}n&2&&(d("dynamicValidated",o.isNotEmpty(o.filter.ChannelID))("config",o.modalConfig),l(5),d("options",o.channelOptions),M("ngModel",o.filter.ChannelID),d("filter",!0),l(5),f(!o.isSingleChannel&&o.isNotEmpty(o.filter.ChannelID)?10:-1),l(),f(o.hasScanUpdate&&o.selectedChannel?11:-1),l(),f(!o.isSingleChannel&&o.isNotEmpty(o.filter.ChannelID)?12:-1))},dependencies:[ot,Rn,An,kt,K,Z,Ce,xe,Se,_t,ht,Wn,ye,ut],encapsulation:2});let i=a;return i})();var bt=(function(i){return i.Tokopedia="https://seller.tokopedia.com",i.Shoope="https://seller.shopee.co.id",i.Tiktok="https://seller-id.tiktok.com",i.WooCommerce="https://woocommerce.dealpos.app",i.Lazada="https://sellercenter.lazada.co.id",i})(bt||{});var Ue={Success:"Success",Info:"Info",Warning:"Warning",Error:"Error"};var ki=[[["header"]],[["content"]],[["footer"]]],Vi=["header","content","footer"],Ei=(i,a)=>({bodyScrollable:i,hideScrollbar:a}),Ni=(i,a,t,e)=>({"bg-success":i,"bg-warning":a,"bg-info":t,"bg-danger":e}),Bi=i=>({"mx-auto":i}),Ai=(i,a)=>({"show-footer":i,"p-0":a});function Ri(i,a){if(i&1){let t=b();r(0,"div",7),x("click",function(){m(t);let n=c();return u(n.onBack.emit())}),r(1,"a",8),_(2,"i",9),s()()}}function Li(i,a){if(i&1){let t=b();r(0,"div")(1,"a",10),x("click",function(){m(t);let n=c();return u(n.onClose.emit())}),_(2,"i",11),s()()}}function Ui(i,a){if(i&1){let t=b();r(0,"a",14),x("click",function(){m(t);let n=c(2);return u(n.onCancel.emit())}),p(1),s()}if(i&2){let t=c(2);l(),w(" ",t.config!=null&&t.config.cancelText?t.config==null?null:t.config.cancelText:"Cancel")}}function $i(i,a){if(i&1){let t=b();r(0,"button",15),x("click",function(){m(t);let n=c(2);return u(n.onOk.emit())})("keyup.F2",function(){m(t);let n=c(2);return u(n.onOk.emit())}),s()}if(i&2){let t=c(2);d("disabled",!(t.config!=null&&t.config.validated)||!t.dynamicValidated)("innerHTML",t.config!=null&&t.config.okText?t.config==null?null:t.config.okText:"Ok (F2)",ee)}}function Wi(i,a){if(i&1&&(r(0,"mat-dialog-actions",6),ie(1,2),g(2,Ui,2,1,"a",12),g(3,$i,1,2,"button",13),s()),i&2){let t=c();l(2),f(t.config!=null&&t.config.hideCancel?-1:2),l(),f(t.config!=null&&t.config.hideOk?-1:3)}}var $e=class{constructor(){this.title="New Modal",this.okText="Ok (F2)",this.cancelText="Cancel",this.hideFooter=!1,this.hideCancel=!1,this.hideOk=!1,this.hideClose=!1,this.eMoney=!1,this.headerType=Ue.Success,this.validated=!0,this.customWidth="initial",this.bodyScrollable=!1,this.hideScrollbar=!1,this.disableKeyup=!1,this.noPadding=!1}},li=(()=>{let a=class a{constructor(){this.dynamicValidated=!0,this.onOk=new mt,this.onCancel=new mt,this.onClose=new mt,this.onBack=new mt,this.headerType=Ue}ngOnInit(){this.config==null&&(this.config=new $e)}onKeyup(e){this.config?.disableKeyup||(e.code=="F2"&&this.onOk.emit("F2"),(e.code=="Enter"||e.code=="NumpadEnter")&&this.onOk.emit("Enter"))}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["modal-material"]],inputs:{config:"config",dynamicValidated:"dynamicValidated"},outputs:{onOk:"onOk",onCancel:"onCancel",onClose:"onClose",onBack:"onBack"},ngContentSelectors:Vi,decls:11,vars:23,consts:[["id","modal_material",1,"modal-material","d-flex","align-items-start","flex-column","position-relative","maxHeight",3,"keyup","ngClass"],["mat-dialog-title","",1,"d-flex","w-100","justify-content-between","modal-header","position-relative",3,"ngClass"],[1,"back-button","position-absolute","pointer","d-print-none"],[1,"d-flex","flex-row","d-print-none","align-items-center",3,"ngClass"],[1,"fw-normal"],[1,"modal-body","w-100",3,"ngClass"],[1,"w-100","py-7","border-top","d-flex","justify-content-end","d-print-none"],[1,"back-button","position-absolute","pointer","d-print-none",3,"click"],[1,"btn","back-button"],[1,"fa-solid","fa-arrow-left"],[1,"btn-light-blue","btn-sm","pointer","close",3,"click"],[1,"fa-solid","fa-xmark","fa-lg","text-primary"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3"],["data-cy","btn-ok",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"disabled","innerHTML"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],["data-cy","btn-ok",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click","keyup.F2","disabled","innerHTML"]],template:function(n,o){n&1&&(Xe(ki),r(0,"div",0),x("keyup",function(S){return o.onKeyup(S)}),r(1,"div",1),g(2,Ri,3,0,"div",2),r(3,"div",3)(4,"h4",4),p(5),s(),ie(6),s(),g(7,Li,3,0,"div"),s(),r(8,"mat-dialog-content",5),ie(9,1),s(),g(10,Wi,4,2,"mat-dialog-actions",6),s()),n&2&&(tn("width",o.config==null?null:o.config.customWidth),d("ngClass",zt(10,Ei,o.config==null?null:o.config.bodyScrollable,o.config==null?null:o.config.hideScrollbar)),l(),d("ngClass",ce(13,Ni,o.headerType.Success==(o.config==null?null:o.config.headerType),o.headerType.Warning==(o.config==null?null:o.config.headerType),o.headerType.Info==(o.config==null?null:o.config.headerType),o.headerType.Error==(o.config==null?null:o.config.headerType))),l(),f(o.config!=null&&o.config.eMoney?2:-1),l(),d("ngClass",T(18,Bi,o.config==null?null:o.config.eMoney)),l(2),L(o.config==null?null:o.config.title),l(2),f(o.config!=null&&o.config.hideClose?-1:7),l(),d("ngClass",zt(20,Ai,!(o.config!=null&&o.config.hideFooter),o.config==null?null:o.config.noPadding)),l(2),f(o.config!=null&&o.config.hideFooter?-1:10))},dependencies:[ot,Ot,wn,Sn,vn,bn],styles:[".mat-mdc-dialog-container{padding:0!important;border-radius:4px!important;overflow:visible!important} .mat-mdc-dialog-container [mat-dialog-title]{color:#fff;padding:15px;border:none}@media print{ .mat-mdc-dialog-container{box-shadow:unset;width:100vw}}@media print{ .cdk-overlay-pane{position:absolute!important;top:-30px;max-width:100vw!important}.modal-body[_ngcontent-%COMP%]{width:100vw!important}}body.modal-body[_ngcontent-%COMP%]{height:100%;overflow-y:hidden}mat-dialog-actions[_ngcontent-%COMP%]{bottom:15px}mat-dialog-actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:15px!important;margin-right:12px}mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:15px!important}mat-dialog-actions[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin-right:auto;margin-top:-1rem;padding-top:.4rem!important;margin-left:1rem}.back-button[_ngcontent-%COMP%]{top:5px;left:0}.close[_ngcontent-%COMP%]{padding:.4rem .5rem}.no-padding[_ngcontent-%COMP%]{padding:0}.modal-material[_ngcontent-%COMP%]{width:40vw}@media (max-width: 992px){.modal-material[_ngcontent-%COMP%]{width:50vw!important}}@media (max-width: 576px){ .dialog-filter .modal-material{width:100%!important} .dialog-filter mat-dialog-actions{position:sticky;bottom:0;background:#fff} .dialog-filter .modal-material.d-flex.align-items-start.flex-column.position-relative.maxHeight.bodyScrollable.maxHeight.bodyScrollable .modal-body{max-height:100%!important;overflow-y:auto}}.maxHeight.bodyScrollable[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow-y:auto}.modal-header[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:15px}.modal-dialog[_ngcontent-%COMP%]{max-width:none}.modal-content[_ngcontent-%COMP%]{width:auto;margin:auto;max-width:850px}.maxHeight[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow:auto}.modal-body[_ngcontent-%COMP%]{padding:1rem}.modal-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block}.modal-body[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin:0;position:absolute;bottom:-20px}.modal-body[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]{border:1px solid #c8d3df;padding:5px 7px}.modal-body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:330px;height:90px}"]});let i=a;return i})();var Gi=i=>({"is-disabled":i});function ji(i,a){if(i&1&&(r(0,"tr")(1,"td",8),p(2),s(),r(3,"td",8),p(4),s(),r(5,"td",9)(6,"p",10),p(7,"Product Not in Channel!"),s()()()),i&2){let t=c().$implicit;l(2),w(" ",t==null?null:t.Model," "),l(2),w(" ",t==null?null:t.Code," ")}}function zi(i,a){if(i&1&&(r(0,"td",8),p(1),s()),i&2){let t=c(3).$implicit;G("rowspan",t.Channel.length),l(),w(" ",t==null?null:t.Model," ")}}function Hi(i,a){if(i&1&&(r(0,"td",8),p(1),s()),i&2){let t=c(3).$implicit;G("rowspan",t.Channel.length),l(),w(" ",t==null?null:t.Code," ")}}function Ki(i,a){if(i&1){let t=b();r(0,"tr"),g(1,zi,2,2,"td",8),g(2,Hi,2,2,"td",8),r(3,"td",8)(4,"div",11)(5,"a",12),_(6,"img",13),s(),r(7,"div",14),p(8),s()()(),r(9,"td",8),p(10),D(11,"number"),s(),r(12,"td",15),p(13),D(14,"number"),s(),r(15,"td",16)(16,"div",17)(17,"button",18),x("click",function(){let n=m(t).$implicit,o=c(2).$implicit,h=c();return u(h.onDetach(n,o))}),_(18,"i",19),r(19,"span",20),p(20,"Detach"),s()(),r(21,"a",21),_(22,"i",22),r(23,"span",20),p(24,"Edit"),s()()()()()}if(i&2){let t=a.$implicit,e=a.$index,n=c(3);l(),f(e==0?1:-1),l(),f(e==0?2:-1),l(3),d("href",t.Url,$)("title",t.Title),l(),d("src",n.getChannelLogo(t.TypeID),$),l(),d("matTooltip",(t==null||t.Name==null?null:t.Name.length)>40?t==null?null:t.Name:""),l(),w(" ",t.Name," "),l(2),L(B(11,12,t.Price)),l(3),L(B(14,14,t.Inventory)),l(8),d("href",n.getHyperlinkSellerCenter(t),$)("ngClass",T(16,Gi,t.TypeID==n.channelType.KalCare))("matTooltip",t.TypeID!=n.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function Zi(i,a){if(i&1&&A(0,Ki,25,18,"tr",null,ke),i&2){let t=c().$implicit;R(t==null?null:t.Channel)}}function Ji(i,a){if(i&1&&g(0,ji,8,2,"tr")(1,Zi,2,0),i&2){let t=a.$implicit;f(!t.Channel||t.Channel.length<1?0:1)}}var ve=(()=>{let a=class a{constructor(){this.data=C(Et),this.dialogRef=C(Vt),this.httpService=C(J),this.toastr=C(Q),this.variants=U([]),this.channelType=I;let e=this.data;this.variants.set(this.data.variants),this.title=e.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new Nt,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideFooter=!0,this.modalConfig.customWidth="850px"}onDetach(e,n){let o={ChannelID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariationID:e.ChannelVariationID};this.httpService.post(pt.DetachVariant,[o]).subscribe(h=>{this.toastr.success(h.Message,"Success"),this.updateVariantAfterDetach(n,e.ChannelVariationID)})}updateVariantAfterDetach(e,n){this.variants.update(o=>{let h=o.findIndex(S=>S.ID===e.ID);return h!==-1&&(o[h].Channel=o[h].Channel.filter(S=>S.ChannelVariationID!==n)),[...o]})}getChannelLogo(e){return y.getChannelLogoByTypeId(e)}getHyperlinkSellerCenter(e){let n="javascript:void(0)";switch(e.TypeID){case I.Shopee:n=`${bt.Shoope}/portal/product/${e.ChannelItemID}`;break;case I.Tiktok:n=`${bt.Tiktok}/product/edit/${e.ChannelItemID}`;break;case I.Tokopedia:n=`${bt.Tokopedia}/edit-product/${e.ChannelItemID}`;break;case I.WooCommerce:n=`${bt.WooCommerce}/wp-admin/post.php?post=${e.ChannelItemID}&action=edit`;break;case I.Lazada:n=`${bt.Lazada}/apps/product/publish?productId=${e.ChannelItemID}`;break}return n}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-modal-variant"]],decls:27,vars:1,consts:[[3,"onClose","onCancel","config"],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],[1,"d-flex","align-items-center"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],[1,"text-end"],[1,"d-flex","align-items-center","justify-content-end"],[1,"btn","btn-small","btn-light","px-4","py-2","me-3",3,"click"],[1,"fa-sharp","fa-link-slash","me-2",2,"font-size","10px"],[1,"fs-6"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-edit","me-2",2,"font-size","10px"]],template:function(n,o){n&1&&(r(0,"modal-material",0),x("onClose",function(){return o.dialogRef.close()})("onCancel",function(){return o.dialogRef.close()}),r(1,"content")(2,"table",1)(3,"thead",2)(4,"tr")(5,"th",3)(6,"div",4)(7,"span"),p(8,"VARIANT"),s(),r(9,"sup"),_(10,"i",5),s()()(),r(11,"th",3),p(12,"SKU"),s(),r(13,"th",3)(14,"div",4)(15,"span"),p(16,"PRODUCT"),s(),r(17,"sup"),_(18,"i",6),s()()(),r(19,"th",3),p(20,"PRICE"),s(),r(21,"th",7),p(22,"INVENTORY"),s(),_(23,"th",3),s()(),r(24,"tbody"),A(25,Ji,2,1,null,null,ke),s()()()()),n&2&&(d("config",o.modalConfig),l(25),R(o.variants()))},dependencies:[ot,Ot,_t,ht,li,Ft],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"]});let i=a;return i})();function qi(i,a){if(i&1&&(r(0,"mat-option",5)(1,"div"),_(2,"img",6),r(3,"span"),p(4),s()()()),i&2){let t=a.$implicit;d("value",t.ChannelID),l(2),d("src",t.logo,$),l(2),L(t.Title)}}var $t=(()=>{let a=class a{constructor(){this.dialogRef=C(Vt),this.channels=C(Et),this.channelIds=U([]),this.channelOptions=U([])}ngOnInit(){this.initModalConfig();let e=this.channels.filter((n,o,h)=>h.findIndex(S=>S.ChannelID===n.ChannelID)===o);this.channelOptions.set(e)}initModalConfig(){this.modalConfig=new Nt,this.modalConfig.title="Detach Product",this.modalConfig.okText="Save"}onClose(){this.dialogRef.close()}onSave(){let e=this.channels.filter(n=>this.channelIds().includes(n.ChannelID)).map(n=>({ChannelID:n.ChannelID,ChannelItemID:n.ChannelItemID}));this.dialogRef.close(e)}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-modal-detach-product"]],decls:9,vars:4,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"],[1,"channel-option",3,"value"],[2,"width","18px","margin-right","10px",3,"src"]],template:function(n,o){n&1&&(r(0,"modal-material",0),x("onClose",function(){return o.onClose()})("onCancel",function(){return o.onClose()})("onOk",function(){return o.onSave()}),r(1,"div",1)(2,"div")(3,"label",2),p(4,"Select a Channel"),s(),r(5,"mat-form-field",3)(6,"mat-select",4),F("ngModelChange",function(S){return O(o.channelIds,S)||(o.channelIds=S),S}),A(7,qi,5,3,"mat-option",5,W),s()()()()()),n&2&&(d("dynamicValidated",o.channelIds().length>0)("config",o.modalConfig),l(6),M("ngModel",o.channelIds),d("multiple",!0),l(),R(o.channelOptions()))},dependencies:[Ce,xe,Ln,Kn,Hn,$n,kt,K,Z,_t],encapsulation:2});let i=a;return i})();var we=i=>[i];function Qi(i,a){if(i&1){let t=b();r(0,"button",15),x("click",function(){m(t);let n=c(2);return u(n.onDetachMultipleProduct())}),_(1,"i",16),p(2),s()}if(i&2){let t,e=c(2);l(2),w("Detach (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function Yi(i,a){if(i&1&&(E(0),g(1,Qi,3,1,"button",14),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)?1:-1)}}function Xi(i,a){if(i&1){let t=b();r(0,"button",18),x("click",function(){m(t);let n=c(3);return u(n.onOpenScanDialog())}),_(1,"i",19),p(2," Scan Channel "),s()}}function to(i,a){if(i&1&&g(0,Xi,3,0,"button",17),i&2){let t=c(2);f(t.productService.hasSelection(t.products)?-1:0)}}function eo(i,a){if(i&1&&(E(0),g(1,to,1,1),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)?-1:1)}}function no(i,a){if(i&1){let t=b();r(0,"button",21),x("click",function(){m(t);let n=c(2);return u(n.onScanMultipleProduct())}),_(1,"i",19),p(2),s()}if(i&2){let t,e=c(2);l(2),w(" Scan (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function io(i,a){if(i&1&&(E(0),g(1,no,3,1,"button",20),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)&&t.multipeScanChannels.length>0?1:-1)}}function oo(i,a){if(i&1){let t=b();r(0,"button",23),x("click",function(){m(t);let n=c(2);return u(n.onUploadMultipleProduct())}),_(1,"i",24),p(2),s()}if(i&2){let t,e=c(2);l(2),w(" Upload (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function ao(i,a){if(i&1&&(E(0),g(1,oo,3,1,"button",22),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)?1:-1)}}function ro(i,a){if(i&1){let t=b();r(0,"div",11)(1,"app-product-card",25),x("onUpload",function(){let n=m(t).$implicit,o=c();return u(o.onUploadToMultipleChannel(n))})("onScan",function(){let n=m(t).$implicit,o=c();return u(o.onScanSingleProduct(n))})("onDescEvent",function(){let n=m(t).$index,o=c();return u(o.onOpenDialogVariant(n))})("onCheckBoxChange",function(n){let o=m(t).$implicit;return u(o.selected=n)})("onDetach",function(){let n=m(t).$implicit,o=c();return u(o.onDetachProduct([n]))}),s()()}if(i&2){let t=a.$implicit,e=c();l(),d("productId",t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",e.productService.getChannelProduct(t))("code",e.getVariantCode(t==null?null:t.Variants))("showCheckBox",(t==null?null:t.Channel.length)<e.channelOptions.length)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function lo(i,a){i&1&&(r(0,"div",12),_(1,"app-empty-state"),s())}function so(i,a){if(i&1){let t=b();r(0,"div",13)(1,"div",26)(2,"app-custom-paginator",27),x("next",function(){m(t);let n=c();return u(n.getProducts())})("previous",function(){m(t);let n=c();return u(n.getProducts())}),s()()()}if(i&2){let t=c();l(2),d("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}var ci=(()=>{let a=class a{constructor(){this.http=C(J),this.toastr=C(Q),this.dialog=C(st),this.productService=C(et),this.authService=C(lt),this.uploadProductService=C(At),this.route=C(at),this.searchFilter=new Ct,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.scanProductRole=j.ProductScan,this.uploadProductRole=j.ProductUpload,this.detachProductRole=j.ProductDetach,this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(e=>{this.Categories=e.Options.Categories,this.searchFilter.PageNumber=e.Filter.PageNumber,this.searchFilter.RowCount=e.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=e.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok])}getProducts(){let e={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",e).subscribe(n=>{this.products=n.Data,this.rowCount=n.Total==null?this.searchFilter.RowCount:n.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=y.GuidEMpty,this.dialog.open(H,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(k(o=>y.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(e,n,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(e){let n=this.products[e]?.Variants||[];this.dialog.open(ve,{data:{title:this.products[e].Name,variants:n}})}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(e),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(e){this.uploadProductService.setSelectedProduct([e]),this.route.navigate(["/menu/products/upload"])}searchProduct(e){this.searchFilter.text=e,this.getProducts()}onScanMultipleProduct(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=y.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok]);this.dialog.open(H,{data:{filter:e,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(k(h=>y.IsNotEmpty(h))).subscribe(h=>{this.searchFilter.ChannelID=h.ChannelID,this.searchFilter.ScanFull=h.ScanFull,this.searchFilter.UpdatedProduct=h.UpdatedProduct;let S=this.productService.selectedProduct(this.products),v=this.productService.getVariantCodesProducts(S);this.scanSingleProduct(v)})}onScanSingleProduct(e){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=y.GuidEMpty,this.dialog.open(H,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(k(o=>y.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID;let h=this.productService.getVariantCodesProduct(e);this.scanSingleProduct(h)})}scanSingleProduct(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${o?.Name} `,"Error")}this.searchFilter.ChannelID=y.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=y.GuidEMpty}})}getVariantCode(e=[]){let n;return e?.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),e?.length==1&&(n=e[0].Code),n}onDetachProduct(e){let n=[];e.forEach(o=>{o.Channel=y.assignChannelLogo(o.Channel),n.push(...o.Channel)}),this.dialog.open($t,{width:"600px",data:[...n]}).afterClosed().pipe(k(o=>y.IsNotEmpty(o)),Wt(o=>this.productService.detachProduct(o))).subscribe(o=>{this.toastr.success(o.Message,_e.Success),this.getProducts()})}onDetachMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.onDetachProduct(e)}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-in-pos"]],standalone:!1,decls:24,vars:21,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"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],["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"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"]],template:function(n,o){if(n&1){let h=b();r(0,"mainpanel",1),x("onSubmit",function(v){return m(h),u(o.searchProduct(v))}),r(1,"actions"),V(2,Yi,2,1,"ng-container",2)(3,eo,2,1,"ng-container",2)(4,io,2,1,"ng-container",2)(5,ao,2,1,"ng-container",2),s(),r(6,"filters")(7,"div")(8,"label",3),p(9,"Category"),s(),r(10,"ng-select",4),x("ngModelChange",function(v){return m(h),u(o.searchFilter.Category=v)}),s()(),r(11,"div",5)(12,"mat-date-range-input",6)(13,"input",7),F("ngModelChange",function(v){return m(h),O(o.startDate,v)||(o.startDate=v),u(v)}),x("click",function(){m(h);let v=le(16);return u(v.open())}),s(),r(14,"input",8),F("ngModelChange",function(v){return m(h),O(o.endDate,v)||(o.endDate=v),u(v)}),x("click",function(){m(h);let v=le(16);return u(v.open())}),s()(),_(15,"mat-date-range-picker",null,0),s()(),r(17,"content")(18,"div",9)(19,"div",10),A(20,ro,2,11,"div",11,W),g(22,lo,2,0,"div",12),s(),g(23,so,3,5,"div",13),s()()()}if(n&2){let h=le(16);d("headerTitle","In POS ("+o.rowCount+")"),l(2),d("ngxPermissionsOnly",T(13,we,o.detachProductRole)),l(),d("ngxPermissionsOnly",T(15,we,o.scanProductRole)),l(),d("ngxPermissionsOnly",T(17,we,o.scanProductRole)),l(),d("ngxPermissionsOnly",T(19,we,o.scanProductRole)),l(5),d("clearable",!0)("items",o.Categories)("ngModel",o.searchFilter.Category),l(2),d("rangePicker",h),l(),M("ngModel",o.startDate),l(),M("ngModel",o.endDate),l(6),R(o.products),l(2),f(o.products.length==0?22:-1),l(),f(o.products.length>0?23:-1)}},dependencies:[Dt,K,Z,tt,fn,ct,gt,nt,Jn,qn,Qn,Yn,rt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]});let i=a;return i})();var di=`
|
|
2
2
|
.p-toast {
|
|
3
3
|
width: dt('toast.width');
|
|
4
4
|
white-space: pre-line;
|
|
@@ -263,4 +263,4 @@ import{a as ei}from"./chunk-O4EO3YBL.js";import{a as Vn}from"./chunk-3JYZF65T.js
|
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
`}this.renderer.setProperty(this.styleElement,"innerHTML",t),Be(this.styleElement,"nonce",this.config?.csp()?.nonce)}}destroyStyle(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}onDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.el&&this.autoZIndex&&ge.clear(this.el.nativeElement),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.destroyStyle()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=P({type:i,selectors:[["p-toast"]],contentQueries:function(e,n,o){if(e&1&&(oe(o,Fo,5),oe(o,Do,5),oe(o,Fn,4)),e&2){let h;ae(h=re())&&(n.template=h.first),ae(h=re())&&(n.headlessTemplate=h.first),ae(h=re())&&(n.templates=h)}},hostVars:4,hostBindings:function(e,n){e&2&&(se(n.sx("root")),q(n.cn(n.cx("root"),n.styleClass)))},inputs:{key:"key",autoZIndex:[2,"autoZIndex","autoZIndex",de],baseZIndex:[2,"baseZIndex","baseZIndex",Kt],life:[2,"life","life",Kt],styleClass:"styleClass",position:"position",preventOpenDuplicates:[2,"preventOpenDuplicates","preventOpenDuplicates",de],preventDuplicates:[2,"preventDuplicates","preventDuplicates",de],showTransformOptions:"showTransformOptions",hideTransformOptions:"hideTransformOptions",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",breakpoints:"breakpoints"},outputs:{onClose:"onClose"},features:[jt([Te,{provide:pi,useExisting:i},{provide:Dn,useExisting:i}]),Ye([Jt]),dt],decls:1,vars:1,consts:[[3,"message","index","life","template","headlessTemplate","showTransformOptions","hideTransformOptions","showTransitionOptions","hideTransitionOptions","pt","onClose",4,"ngFor","ngForOf"],[3,"onClose","message","index","life","template","headlessTemplate","showTransformOptions","hideTransformOptions","showTransitionOptions","hideTransitionOptions","pt"]],template:function(e,n){e&1&&V(0,ko,1,11,"p-toastItem",0),e&2&&d("ngForOf",n.messages)},dependencies:[ot,an,No,Ae],encapsulation:2,data:{animation:[Ee("toastAnimation",[he(":enter, :leave",[hn("@*",un())])])]},changeDetection:0})}return i})();var Bo=()=>({"--p-toast-width":"375px !important",top:"60px"});function Ao(i,a){i&1&&_(0,"i",4)}function Ro(i,a){i&1&&_(0,"i",5)}function Lo(i,a){i&1&&_(0,"i",6)}function Uo(i,a){if(i&1){let t=b();r(0,"button",16),x("click",function(){m(t);let n=c(2);return u(n.copyToClipboard())}),p(1),s()}if(i&2){let t=c(2);l(),w(" ",t.copyText()," ")}}function $o(i,a){if(i&1){let t=b();r(0,"div",2)(1,"div",3),g(2,Ao,1,0,"i",4)(3,Ro,1,0,"i",5)(4,Lo,1,0,"i",6),s(),r(5,"div",7)(6,"div",8)(7,"span",9),p(8),s()(),r(9,"div",10),_(10,"app-channel-logo",11),r(11,"div",12),p(12),s()(),r(13,"div",12),_(14,"span",13),s(),r(15,"div",14),g(16,Uo,2,1,"button",15),r(17,"button",16),x("click",function(){m(t);let n=c();return u(n.navigateToNotificationPage())}),p(18," Notification "),s()()()()}if(i&2){let t,e=a.$implicit;l(2),f((t=e.severity)==="info"?2:t==="success"?3:t==="error"?4:-1),l(6),L(e.text),l(2),d("showChannelName",!1)("width",14)("height",14)("typeId",e==null||e.data==null?null:e.data.channelTypeId),l(2),L(e==null||e.data==null?null:e.data.channelName),l(2),d("innerHTML",e.detail,ee),l(2),f(e.severity=="info"?16:-1)}}var Ie=(()=>{let a=class a{constructor(){this.toastr=C(yn),this.messageService=C(Zt),this.router=C(at),this.jobId=U(null),this.copyText=U("Copy"),this.key=U(0),this.stringKey=on(()=>JSON.stringify(this.key())),this.listenOnShowToast()}listenOnShowToast(){this.toastr.onShowToast$.pipe(_n()).subscribe(e=>{this.copyText.set("Copy"),this.jobId.set(e?.data?.jobId),this.messageService.add(e)})}copyToClipboard(){navigator.clipboard.writeText(this.jobId()).then(()=>{this.copyText.set("Copied")})}navigateToNotificationPage(){this.router.navigate(["/menu/products/status/notificationV2"]),this.messageService.clear()}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["scan-channel-toastr"]],features:[jt([Zt])],decls:3,vars:4,consts:[["message",""],["position","top-right",1,"p-toast-custom",3,"baseZIndex"],[1,"d-flex","align-items-start","gap-3","flex-fill"],[1,"pt-2"],[1,"fa-solid","fa-circle-info","info-icon-color","fs-4"],[1,"fa-solid","fa-circle-check","success-icon-color","fs-4"],[1,"fa-solid","fa-circle-xmark","error-icon-color","fs-4"],[1,"d-flex","flex-column","align-items-start","flex-fill","gap-1"],[1,"d-flex","align-items-center","gap-2","flex-fill"],[1,"fw-bold","fs-4"],[1,"fs-6","d-flex","align-items-center","mt-1"],[3,"showChannelName","width","height","typeId"],[1,"opacity-75"],[3,"innerHTML"],[1,"d-flex","align-items-center","gap-8","mt-2",2,"font-size","12px"],[1,"btn","btn-icon-only","fw-medium"],[1,"btn","btn-icon-only","fw-medium",3,"click"]],template:function(n,o){n&1&&(r(0,"p-toast",1),V(1,$o,19,9,"ng-template",null,0,Ht),s()),n&2&&(se(St(3,Bo)),d("baseZIndex",5e3))},dependencies:[mi,kn],styles:[`.p-toast-custom .p-toast-message.p-toast-message-info,.p-toast-custom .p-toast-message.p-toast-message-success,.p-toast-custom .p-toast-message.p-toast-message-error{background-color:#fff!important;color:#000}.p-toast-custom .p-toast-message.p-toast-message-info{border-left:8px solid #0078d4!important}.p-toast-custom .p-toast-message.p-toast-message-success{border-left:8px solid #28a745!important}.p-toast-custom .p-toast-message.p-toast-message-error{border-left:8px solid #dc3545!important}.info-icon-color{color:#0078d4!important}.success-icon-color{color:#28a745!important}.error-icon-color{color:#dc3545!important}
|
|
266
|
-
`],encapsulation:2});let i=a;return i})();var Ge=i=>[i];function Go(i,a){if(i&1){let t=b();r(0,"button",12),x("click",function(){m(t);let n=c(2);return u(n.onDetachMultipleProduct())}),_(1,"i",13),p(2),s()}if(i&2){let t,e=c(2);l(2),w("Detach (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function jo(i,a){if(i&1&&(E(0),g(1,Go,3,1,"button",11),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)?1:-1)}}function zo(i,a){if(i&1){let t=b();r(0,"div",14)(1,"button",16),x("click",function(){m(t);let n=c(2);return u(n.onScanAllV2Products())}),_(2,"i",17),p(3," Scan Channel V2 "),s(),_(4,"button",18),r(5,"ul",19)(6,"li")(7,"a",20),x("click",function(){m(t);let n=c(2);return u(n.onScanAllProducts())}),_(8,"i",17),p(9," Scan Channel "),s()()()()}}function Ho(i,a){if(i&1){let t=b();r(0,"button",21),x("click",function(){m(t);let n=c(2);return u(n.onScanMultipleProduct())}),_(1,"i",17),p(2),s()}if(i&2){let t=c(2);l(2),w(" Scan (",t.productService.selectedProduct(t.products).length,") ")}}function Ko(i,a){if(i&1&&(E(0),g(1,zo,10,0,"div",14)(2,Ho,3,1,"button",15),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)?t.multipeScanChannels.length>0&&t.productService.hasSelection(t.products)?2:-1:1)}}function Zo(i,a){if(i&1){let t=b();r(0,"button",23),x("click",function(){m(t);let n=c(2);return u(n.onUploadMultipleProduct())}),_(1,"i",24),p(2),s()}if(i&2){let t=c(2);l(2),w(" Upload (",t.productService.selectedProduct(t.products).length,") ")}}function Jo(i,a){if(i&1&&(E(0),g(1,Zo,3,1,"button",22),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)?1:-1)}}function qo(i,a){if(i&1){let t=b();r(0,"div",2)(1,"label",3),p(2,"Item ID"),s(),r(3,"input",25),F("ngModelChange",function(n){m(t);let o=c();return O(o.searchFilter.Item_id,n)||(o.searchFilter.Item_id=n),u(n)}),s()()}if(i&2){let t=c();l(3),M("ngModel",t.searchFilter.Item_id)}}function Qo(i,a){if(i&1){let t=b();r(0,"div",8)(1,"app-product-card",26),x("onUpload",function(){let n=m(t).$implicit,o=c();return u(o.onUploadToMultipleChannel(n))})("onDescEvent",function(){let n=m(t).$index,o=c();return u(o.onOpenVariantDetail(n))})("onScan",function(){let n=m(t).$implicit,o=c();return u(o.onScanSingleProduct(n))})("onCheckBoxChange",function(n){let o=m(t).$implicit;return u(o.selected=n)})("onDetach",function(){let n=m(t).$implicit,o=c();return u(o.onDetachProduct([n]))}),s()()}if(i&2){let t=a.$implicit,e=c();l(),d("productId",t==null?null:t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",e.productService.getChannelProduct(t))("code",e.getVariantCode(t==null?null:t.Variants))("showCheckBox",t==null?null:t.hasScan)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function Yo(i,a){i&1&&(r(0,"div",9),_(1,"app-empty-state"),s())}function Xo(i,a){if(i&1){let t=b();r(0,"div",10)(1,"div",27)(2,"app-custom-paginator",28),x("total",function(){m(t);let n=c();return u(n.getRowCount())})("next",function(){m(t);let n=c();return u(n.getProducts())})("previous",function(){m(t);let n=c();return u(n.getProducts())}),s()()()}if(i&2){let t=c();l(2),d("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var _i=(()=>{let a=class a{constructor(){this.http=C(J),this.dialog=C(st),this.toastr=C(Q),this.productService=C(et),this.activateRouter=C(pe),this.authService=C(lt),this.route=C(at),this.uploadProductService=C(At),this.placeholderService=C(Rt),this.searchFilter=new Ct,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=y.GuidEMpty,this.multipeScanChannels=[],this.filterOptions=U({SearchComparatorTypeOptions:[],SearchSKUOnlyOrSKUNameOptions:[]}),this.searchPlaceholder=U("Search ..."),this.scanProductRole=j.ProductScan,this.uploadProductRole=j.ProductUpload,this.detachProductRole=j.ProductDetach,this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(e=>{e.ID?this.initPageLoader(e.ID):this.initPageLoader(y.GuidEMpty)})}initPageLoader(e){this.productService.loader(e).subscribe(n=>{this.filterOptions.set(n.Options),this.searchFilter=n.Filter,n.Filter.ChannelID!=y.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(n.Filter.ChannelID)),this.searchFilter.PageSize=n.Filter?.RowCount,this.getProducts(),this.initSearchPlaceholder()})}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok])}getProducts(){let e={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.productService.findAllSoldInChannel(e).subscribe(n=>{this.products=n.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(e){this.searchFilter.text=e,this.hasClickRowCount=!1,this.getProducts(),this.initSearchPlaceholder()}onOpenVariantDetail(e){let n=this.products[e].Variants;this.dialog.open(ve,{data:{variants:n,title:this.products[e].Name}})}onScanAllProducts(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=y.GuidEMpty,this.dialog.open(H,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(k(o=>y.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}onScanAllV2Products(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=y.GuidEMpty,this.dialog.open(H,{data:{filter:e,channelOptions:this.channelOptions,useV2:!0},width:"600px"}).afterClosed().pipe(k(n=>y.IsNotEmpty(n)),Wt(n=>this.productService.scanProductV2(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async))).subscribe(()=>{this.initPageLoader(y.GuidEMpty)})}scanAllProduct(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(k(n=>n)).subscribe(n=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct),this.initPageLoader(y.GuidEMpty))})}onScanSingleProduct(e){e.Channel=this.productService.getChannelProduct(e);let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(H,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(k(o=>y.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID;let h=this.productService.getVariantCodesProduct(e);this.scanProducts(h)})}onUploadToMultipleChannel(e){this.uploadProductService.setSelectedProduct([e]),this.route.navigate(["/menu/products/upload"])}onScanMultipleProduct(){this.searchFilter.ChannelID=y.GuidEMpty;let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(H,{data:{filter:e,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(k(o=>y.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct;let h=this.productService.selectedProduct(this.products),S=this.productService.getVariantCodesProducts(h);this.scanProducts(S)})}scanProducts(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:n=>{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);n?this.toastr.success(`Product Successfully scan with ${o?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${o?.Name} `,"Error"),this.searchFilter.ChannelID=y.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=y.GuidEMpty}})}getVariantCode(e){let n;return e.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),e.length==1&&(n=e[0].Code),n}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(e),this.route.navigate(["/menu/products/upload"])}getRowCount(){let e={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.http.post(pt.GetSoldInChannelRowCount,e).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Total})}onDetachProduct(e){let n=[];e.forEach(o=>{o.Channel=y.assignChannelLogo(o.Channel),n.push(...o.Channel)}),this.dialog.open($t,{width:"600px",data:[...n]}).afterClosed().pipe(k(o=>y.IsNotEmpty(o)),Wt(o=>this.productService.detachProduct(o))).subscribe(o=>{this.toastr.success(o.Message,_e.Success),this.getProducts()})}onDetachMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.onDetachProduct(e)}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-sold-in-channel"]],standalone:!1,decls:21,vars:20,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"onSubmit","headerTitle","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],[1,"btn-group","me-3","shadow"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],[1,"btn","btn-outline-secondary","border-end-0",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu",2,"cursor","pointer"],[1,"dropdown-item",3,"click"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[3,"onUpload","onDescEvent","onScan","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,o){n&1&&(r(0,"mainpanel",0),x("onSubmit",function(S){return o.searchProduct(S)}),r(1,"actions"),V(2,jo,2,1,"ng-container",1)(3,Ko,3,1,"ng-container",1)(4,Jo,2,1,"ng-container",1),s(),r(5,"filters")(6,"div",2)(7,"label",3),p(8,"Channel"),s(),r(9,"app-channel-options-v2",4),F("ngModelChange",function(S){return O(o.searchFilter.ListChannelID,S)||(o.searchFilter.ListChannelID=S),S}),s()(),g(10,qo,4,1,"div",2),r(11,"div")(12,"filter-query-type",5),F("numberFilterComparatorChange",function(S){return O(o.searchFilter.NumberFilterComparator,S)||(o.searchFilter.NumberFilterComparator=S),S})("searchTypeChange",function(S){return O(o.searchFilter.SearchType,S)||(o.searchFilter.SearchType=S),S}),s()()(),r(13,"content"),_(14,"scan-channel-toastr"),r(15,"div",6)(16,"div",7),A(17,Qo,2,11,"div",8,W),g(19,Yo,2,0,"div",9),s(),g(20,Xo,3,4,"div",10),s()()()),n&2&&(d("headerTitle","Sold in Channel")("searchBoxPlaceHolder",o.searchPlaceholder()),l(2),d("ngxPermissionsOnly",T(14,Ge,o.detachProductRole)),l(),d("ngxPermissionsOnly",T(16,Ge,o.scanProductRole)),l(),d("ngxPermissionsOnly",T(18,Ge,o.uploadProductRole)),l(5),d("multiple",!0),M("ngModel",o.searchFilter.ListChannelID),l(),f(o.searchFilter.ListChannelID!=null?10:-1),l(2),d("numberFilterComparatorOptions",o.filterOptions().SearchComparatorTypeOptions),M("numberFilterComparator",o.searchFilter.NumberFilterComparator),d("searchTypeOptions",o.filterOptions().SearchSKUOnlyOrSKUNameOptions),M("searchType",o.searchFilter.SearchType),l(5),R(o.products),l(2),f(o.products.length==0?19:-1),l(),f(o.products!=null&&o.products.length?20:-1))},dependencies:[Dt,K,Z,tt,ct,gt,nt,rt,Ie,ft,xt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let i=a;return i})();var Ci=(()=>{let a=class a{get footerPageNumber(){return this._footerPageNumber}set footerPageNumber(e){this._footerPageNumber=e}get hideCount(){return this._hideCount}set hideCount(e){this._hideCount=e}get disableNextButton(){return this._disableNextButton}set disableNextButton(e){this._disableNextButton=e}get goToLastPage(){return this._goToLastPage}set goToLastPage(e){this._goToLastPage=e}constructor(e){this.http=e,this.pagination$=new Oe(null),this.destroy$=new Yt,this.data$=this.paginationFunction()}onNextPage(e){e.PageNumber+=1,this.pagination$.next(e)}setPageNumberFooter(e){this.footerPageNumber=e.PageNumber}setPaginationButtonState(e,n){n==0?this.disableNextButton=!0:this.disableNextButton=!(n<e.RowCount*e.PageNumber)}reloadPagination(e){y.IsEmpty(e.PageNumber)&&(e.PageNumber=1),this.pagination$.next(e),this.hideCount=!0,this.goToLastPage=!1}getAllData(e,n){e.RowCount=n,this.pagination$.next(e),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new Oe(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe(Gt(this.destroy$),k(e=>e!=null),ze(e=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(e)).pipe(yt(n=>n.Data))),Ke(this.pagination$),He((e,n)=>{let[o,h]=e,[S]=n;return h.PageNumber==1?[S,h]:[o.concat(S),h]}),vt(([e,n])=>{this.setPageNumberFooter(n),this.setPaginationButtonState(n,e.length)}),yt(([e])=>e),Xt())}};a.\u0275fac=function(n){return new(n||a)(Je(J))},a.\u0275prov=te({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var Me=i=>[i];function ta(i,a){if(i&1){let t=b();r(0,"button",11),x("click",function(){m(t);let n=c(3);return u(n.uploadMultipleProduct())}),_(1,"i",12),p(2),s()}if(i&2){let t=c(3);l(2),w(" upload (",t.selectedProducts==null?null:t.selectedProducts.length,") ")}}function ea(i,a){if(i&1&&(E(0),g(1,ta,3,1,"button",10),N()),i&2){let t=c(2);l(),f(t.hasSelectionProduct?1:-1)}}function na(i,a){if(i&1){let t=b();E(0),r(1,"button",13),x("click",function(){m(t);let n=c(2);return u(n.openScanDialog())}),_(2,"i",14),p(3," Scan Channel "),s(),N()}}function ia(i,a){i&1&&(E(0),_(1,"th",21),N())}function oa(i,a){if(i&1){let t=b();r(0,"td",27)(1,"input",28),F("ngModelChange",function(n){m(t);let o=c(3).$implicit;return O(o.selected,n)||(o.selected=n),u(n)}),x("ngModelChange",function(){m(t);let n=c(4),o=c(3);return u(o.onSelectProduct(n))}),s()()}if(i&2){let t=c(3).$implicit;d("rowSpan",t==null?null:t.Variants.length),l(),M("ngModel",t.selected)}}function aa(i,a){if(i&1&&(E(0),g(1,oa,2,2,"td",27),N()),i&2){let t=c().$index;l(),f(t==0?1:-1)}}function ra(i,a){if(i&1){let t=b();r(0,"img",35),x("click",function(n){m(t);let o=c(3).$implicit,h=c(4);return u(h.onZoomImage(n,o==null?null:o.ImageUrl))}),s()}if(i&2){let t=c(3).$implicit;d("src",t==null?null:t.ImageUrl,$)}}function la(i,a){i&1&&_(0,"img",31)}function sa(i,a){if(i&1&&(r(0,"td",27)(1,"div",29),g(2,ra,1,1,"img",30)(3,la,1,0,"img",31),s()(),r(4,"td",32)(5,"h4",33)(6,"span",34),p(7),s()()()),i&2){let t=c(2).$implicit;d("rowSpan",t==null?null:t.Variants.length),l(2),f(t!=null&&t.ImageUrl?2:3),l(2),d("rowSpan",t==null?null:t.Variants.length),l(2),d("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),l(),w(" ",t==null?null:t.Name," ")}}function ca(i,a){if(i&1&&(r(0,"div")(1,"a",23),_(2,"img",36),s()()),i&2){let t=a.$implicit;l(),d("href",t.URL,$),l(),d("src",t.Img,$)("matTooltip",t.Name)}}function da(i,a){if(i&1&&(r(0,"div"),_(1,"img",36),s()),i&2){let t=a.$implicit;l(),d("src",t.Img,$)("matTooltip",t.Name)}}function pa(i,a){if(i&1&&(r(0,"tr"),V(1,aa,2,1,"ng-container",2),g(2,sa,8,5),r(3,"td"),p(4),s(),r(5,"td")(6,"span"),p(7),s(),r(8,"span",22)(9,"a",23),_(10,"i",24),s()()(),r(11,"td",25)(12,"div",26),A(13,ca,3,3,"div",null,W),s()(),r(15,"td",25)(16,"div",26),A(17,da,2,2,"div",null,W),s()()()),i&2){let t=a.$implicit,e=a.$index,n=c(5);l(),d("ngxPermissionsOnly",T(5,Me,n.uploadProductRole)),l(),f(e==0?2:-1),l(2),w(" ",t.Name," "),l(3),w(" ",t.Code," "),l(2),d("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),$),l(4),R(t==null?null:t.Available),l(4),R(t==null?null:t.NotAvailable)}}function ma(i,a){if(i&1&&A(0,pa,19,7,"tr",null,W),i&2){let t=a.$implicit;R(t.Variants)}}function ua(i,a){i&1&&(r(0,"tbody"),A(1,ma,2,0,null,null,W),s()),i&2&&(l(),R(a))}function ha(i,a){if(i&1&&(r(0,"div",8)(1,"table",15)(2,"thead",16)(3,"tr"),V(4,ia,2,0,"ng-container",2),r(5,"th",17),p(6," Product "),s(),r(7,"th",18),p(8,"Variant"),s(),r(9,"th",18),p(10,"SKU"),s(),r(11,"th",19),p(12,"Available In"),s(),r(13,"th",20),p(14,"Not Available In"),s()()(),g(15,ua,3,0,"tbody"),D(16,"async"),s()()),i&2){let t,e=c(2);l(4),d("ngxPermissionsOnly",T(4,Me,e.uploadProductRole)),l(11),f((t=B(16,2,e.data$))?15:-1,t)}}function _a(i,a){i&1&&(r(0,"div",9),_(1,"app-empty-state"),s())}function Ca(i,a){if(i&1){let t=b();r(0,"span",44),x("click",function(){m(t);let n=c(4);return u(n.getRowCount())}),r(1,"i",45),p(2,"?"),s()()}}function ga(i,a){if(i&1&&(r(0,"span"),p(1),D(2,"number"),s()),i&2){let t=a;l(),L(B(2,1,t==null?null:t.Count))}}function fa(i,a){if(i&1){let t=b();r(0,"a",46),x("click",function(){m(t);let n=c(4);return u(n.onNextPage())}),_(1,"i",47),p(2," Next"),s()}}function xa(i,a){if(i&1){let t=b();r(0,"a",48),x("click",function(){m(t);let n=c(4);return u(n.onLastPage())}),_(1,"i",49),p(2," Last"),s()}}function ya(i,a){if(i&1&&(r(0,"div",37)(1,"div",38)(2,"div",39),p(3),D(4,"number"),g(5,Ca,3,0,"span",40),g(6,ga,3,3,"span"),D(7,"async"),p(8),s()(),r(9,"div",41),g(10,fa,3,0,"a",42),g(11,xa,3,0,"a",43),s()()),i&2){let t,e=c(),n=c(2);l(3),w(" Showing 1 - ",B(4,6,e==null?null:e.length)," of "),l(2),f(n.paginationService.hideCount?5:-1),l(),f((t=!n.paginationService.hideCount&&B(7,8,n.rowCount$))?6:-1,t),l(2),w(" records ~ ",n.paginationService.footerPageNumber," Page "),l(2),f(n.paginationService.disableNextButton&&!n.paginationService.goToLastPage?10:-1),l(),f(n.paginationService.disableNextButton&&!n.paginationService.goToLastPage?11:-1)}}function Sa(i,a){if(i&1&&g(0,ya,12,10,"div",37),i&2){let t=a;f((t==null?null:t.length)>0?0:-1)}}function ba(i,a){if(i&1){let t=b();r(0,"mainpanel",1),x("onSubmit",function(n){m(t);let o=c();return u(o.searchProduct(n))}),r(1,"actions"),V(2,ea,2,1,"ng-container",2)(3,na,4,0,"ng-container",2),r(4,"button",3),x("click",function(){m(t);let n=c();return u(n.openExportDialog())}),_(5,"i",4),r(6,"span"),p(7,"Export"),s()()(),r(8,"filters")(9,"filter-query-type",5),F("numberFilterComparatorChange",function(n){m(t);let o=c();return O(o.searchFilter.NumberFilterComparator,n)||(o.searchFilter.NumberFilterComparator=n),u(n)})("searchTypeChange",function(n){m(t);let o=c();return O(o.searchFilter.SearchType,n)||(o.searchFilter.SearchType=n),u(n)}),s()(),r(10,"content")(11,"div",6)(12,"div",7),g(13,ha,17,6,"div",8),D(14,"async"),Pt(15,_a,2,0,"div",9),s(),g(16,Sa,1,1),D(17,"async"),s()()()}if(i&2){let t,e,n=a,o=c();d("searchBoxPlaceHolder",o.searchPlaceholder()),l(2),d("ngxPermissionsOnly",T(13,Me,o.uploadProductRole)),l(),d("ngxPermissionsOnly",T(15,Me,o.scanProductRole)),l(6),d("numberFilterComparatorOptions",n==null||n.Options==null?null:n.Options.SearchComparatorTypeOptions),M("numberFilterComparator",o.searchFilter.NumberFilterComparator),d("searchTypeOptions",n==null||n.Options==null?null:n.Options.SearchSKUOnlyOrSKUNameOptions),M("searchType",o.searchFilter.SearchType),l(4),f(((t=B(14,9,o.data$))==null?null:t.length)>0?13:15),l(3),f((e=B(17,11,o.data$))?16:-1,e)}}var gi=(()=>{let a=class a{constructor(){this.http=C(J),this.dialog=C(st),this.toastr=C(Q),this.route=C(at),this.productService=C(et),this.paginationService=C(Ci),this.biggerPictureService=C(Zn),this.authService=C(lt),this.uploadProductService=C(At),this.placeholderService=C(Rt),this.loaderAPI="product/Load",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.scanProductRole=j.ProductScan,this.uploadProductRole=j.ProductUpload,this.searchPlaceholder=U("Search ...");let e=this.authService;this.channelOptions=e.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(vt(e=>{this.searchFilter=e.Filter,this.paginationService.reloadPagination(e.Filter),this.initSearchPlaceholder()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}iniData(){this.data$=this.paginationService.data$.pipe(yt(e=>(e=e.map(n=>(n.Variants=n.Variants.map(o=>(o.Available=this.productService.sortChannel(o.Available),o.NotAvailable=this.productService.sortChannel(o.NotAvailable),o.Available=this.assignLogoChannel(o.Available),o.NotAvailable=this.assignLogoChannel(o.NotAvailable),o)),n.Channel=n?.Variants[0]?.Available,n)),e)))}assignLogoChannel(e){return e=e.map(n=>(n.Img=y.getChannelLogoByTypeId(n.TypeID),n)),e}searchProduct(e){this.searchFilter.text=e,this.paginationService.reloadPagination(this.searchFilter),this.initSearchPlaceholder()}scanAllProduct(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{this.searchFilter.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=y.GuidEMpty,this.dialog.open(H,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(k(o=>y.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1;let e={text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.rowCount$=this.http.post(pt.GetNotInChannelRowCount,e)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){let e={text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.http.post(pt.GetNotInChannelRowCount,e).subscribe({next:n=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,n.Count)}})}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}onSelectProduct(e){this.hasSelectionProduct=this.productService.hasSelection(e),this.selectedProducts=this.productService.selectedProduct(e)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(ti,{data:{title:"Export Not In Channel",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-not-in-channel"]],standalone:!1,decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"searchBoxPlaceHolder"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[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"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[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"],[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,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[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"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[1,"btn-group"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(n,o){if(n&1&&(g(0,ba,18,17,"mainpanel",0),D(1,"async")),n&2){let h;f((h=B(1,1,o.loader$))?0:-1,h)}},dependencies:[pn,K,Z,tt,ht,nt,rt,xt,ut,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%}"]});let i=a;return i})();var je=i=>[i],va=()=>[];function wa(i,a){if(i&1){let t=b();r(0,"button",16),x("click",function(){m(t);let n=c(2);return u(n.openScanDialog())}),_(1,"i",17),p(2," Scan Channel "),s()}}function Pa(i,a){if(i&1&&(E(0),g(1,wa,3,0,"button",15),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)?-1:1)}}function Ta(i,a){if(i&1){let t=b();r(0,"button",19),x("click",function(){m(t);let n=c(2);return u(n.onDownloadAllProduct("SELECTED"))}),_(1,"i",20),p(2),s()}if(i&2){let t,e=c(2);l(2),w(" Download (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function Ia(i,a){if(i&1&&(E(0),g(1,Ta,3,1,"button",18),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)?1:-1)}}function Ma(i,a){if(i&1){let t=b();r(0,"div",12)(1,"app-product-card",21),x("onCheckBoxChange",function(n){let o=m(t).$index,h=c();return u(h.onSelectProduct(n,o))})("onDescEvent",function(){let n=m(t).$index,o=c();return u(o.onShowVariantDetail(n))})("onDownload",function(){let n=m(t).$implicit,o=c();return u(o.onDownloadProduct(n))})("onScan",function(){let n=m(t).$implicit,o=c();return u(o.onScanChannel(n))}),s()()}if(i&2){let t=a.$implicit,e=c();l(),d("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?T(10,je,t==null?null:t.Channel):St(12,va))("showCheckBox",e.hasDownloadRole())("scanButton",!0)}}function Oa(i,a){i&1&&(r(0,"div",13),_(1,"app-empty-state"),s())}function Fa(i,a){if(i&1){let t=b();r(0,"div",14)(1,"div",22)(2,"app-custom-paginator",23),x("total",function(){m(t);let n=c();return u(n.getRowCount())})("next",function(){m(t);let n=c();return u(n.getProducts())})("previous",function(){m(t);let n=c();return u(n.getProducts())}),s()()()}if(i&2){let t=c();l(2),d("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var fi=(()=>{let a=class a{constructor(){this.http=C(J),this.dialog=C(st),this.productService=C(et),this.toastrService=C(Q),this.activateRouter=C(pe),this.authService=C(lt),this.placeholderService=C(Rt),this.permissionService=C(Cn),this.searchFilter=new Ct,this.products=[],this.hasClickRowCount=!1,this.scanProductRole=j.ProductScan,this.downloadProductRole=j.ProductDownload,this.hasDownloadRole=U(!0),this.searchPlaceholder=U("Search ..."),this.channelOptions=this.authService.getChannels(),this.permissionService.hasPermission(this.downloadProductRole).then(e=>{this.hasDownloadRole.set(e)})}ngOnInit(){this.activateRouter.queryParams.subscribe(e=>{e.ID?this.initPageLoader(e.ID):this.initPageLoader(y.GuidEMpty)})}initPageLoader(e){this.loader$=this.productService.loader(e).pipe(vt(n=>{this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.getProducts(),this.initSearchPlaceholder()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(e=>{this.products=e.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let e;this.products=this.products.map(n=>(e=this.channelOptions.find(o=>o.ID==n.ChannelID),e?n.Channel=JSON.parse(JSON.stringify(e)):n.Channel=null,n)).map(n=>(n.Channel&&(n.Channel.Url=n.Url),n))}setSkuProduct(){this.products=this.products.map(e=>(e?.Variant?.length==0?y.IsNotEmpty(e?.ChannelItemSKU)?e.SKU=e?.ChannelItemSKU:e.SKU="SKU not assigned":e.SKU=e?.Variant[0]?.ChannelVariationSKU?e?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",e))}onSearch(e){this.searchFilter.text=e,this.hasClickRowCount=!1,this.getProducts(),this.initSearchPlaceholder()}onClearChannelFilter(){this.searchFilter.ChannelID=y.GuidEMpty}onScanAll(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(y.GuidEMpty),this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=y.GuidEMpty})}openScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=y.GuidEMpty,this.dialog.open(H,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(k(o=>y.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.Async=o.Async,this.onScanAll()})}onDownloadAllProduct(e){let n;e=="ALL"?n=this.products:n=this.productService.selectedProduct(this.products),n.length>0&&this.productService.downloadMultipleProduct(n).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(e,n){this.products[n].selected=e}onDownloadProduct(e){confirm(`Are you sure you want to Retrieve product ${e?.Name} from ${e?.Channel.Name} to POS?`)&&this.productService.downloadProduct(e).subscribe({next:()=>{this.getProducts()}})}onScanChannel(e){let n=JSON.parse(JSON.stringify(e));delete n.Channel,this.productService.scanCompareToPos([n]).subscribe(o=>{o.Status?(this.initPageLoader(y.GuidEMpty),this.toastrService.success(`product ${e.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${e.Name} is not existed in POS`,"Error")})}onShowVariantDetail(e){let n=this.products[e].Variant;n.length>0&&this.dialog.open(ei,{data:{title:this.products[e].Name,variants:n},width:"30%"})}getRowCount(){let e={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku),SearchType:this.searchFilter.SearchType,NumberFilterComparator:this.searchFilter.NumberFilterComparator};this.http.post(pt.GetNotInPosRowCount,e).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Count})}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-not-in-pos"]],standalone:!1,decls:34,vars:21,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],["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"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,o){if(n&1){let h=b();en(0),D(1,"async"),r(2,"mainpanel",0),x("onSubmit",function(v){return m(h),u(o.onSearch(v))}),r(3,"actions"),V(4,Pa,2,1,"ng-container",1)(5,Ia,2,1,"ng-container",1),s(),r(6,"filters")(7,"div",2)(8,"label",3),p(9,"Channel"),s(),r(10,"app-channel-options-v2",4),F("ngModelChange",function(v){return m(h),O(o.searchFilter.ChannelID,v)||(o.searchFilter.ChannelID=v),u(v)}),s()(),r(11,"div",2)(12,"label",5),p(13,"SKU Assigned"),s(),r(14,"mat-radio-group",6),F("ngModelChange",function(v){return m(h),O(o.searchFilter.HaveSku,v)||(o.searchFilter.HaveSku=v),u(v)}),r(15,"mat-radio-button",7),p(16," All "),s(),r(17,"mat-radio-button",7),p(18," Yes "),s(),r(19,"mat-radio-button",7),p(20," No "),s()()(),r(21,"div",2)(22,"label",5),p(23,"Item ID"),s(),r(24,"input",8),F("ngModelChange",function(v){return m(h),O(o.searchFilter.Item_id,v)||(o.searchFilter.Item_id=v),u(v)}),s()(),r(25,"div")(26,"filter-query-type",9),F("numberFilterComparatorChange",function(v){return m(h),O(o.searchFilter.NumberFilterComparator,v)||(o.searchFilter.NumberFilterComparator=v),u(v)})("searchTypeChange",function(v){return m(h),O(o.searchFilter.SearchType,v)||(o.searchFilter.SearchType=v),u(v)}),s()()(),r(27,"content")(28,"div",10)(29,"div",11),A(30,Ma,2,13,"div",12,W),g(32,Oa,2,0,"div",13),s(),g(33,Fa,3,4,"div",14),s()()()}if(n&2){let h=B(1,15,o.loader$);l(2),d("searchBoxPlaceHolder",o.searchPlaceholder()),l(2),d("ngxPermissionsOnly",T(17,je,o.scanProductRole)),l(),d("ngxPermissionsOnly",T(19,je,o.downloadProductRole)),l(5),M("ngModel",o.searchFilter.ChannelID),l(4),M("ngModel",o.searchFilter.HaveSku),l(),d("value",0),l(2),d("value",1),l(2),d("value",2),l(5),M("ngModel",o.searchFilter.Item_id),l(2),d("numberFilterComparatorOptions",h==null||h.Options==null?null:h.Options.SearchComparatorTypeOptions),M("numberFilterComparator",o.searchFilter.NumberFilterComparator),d("searchTypeOptions",h==null||h.Options==null?null:h.Options.SearchSKUOnlyOrSKUNameOptions),M("searchType",o.searchFilter.SearchType),l(4),R(o.products),l(2),f(o.products.length==0?32:-1),l(),f((o.products==null?null:o.products.length)>0?33:-1)}},dependencies:[Dt,K,Z,tt,ye,Se,ct,gt,nt,rt,ft,xt,ut],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});let i=a;return i})();function Da(i,a){if(i&1&&(r(0,"div",8),_(1,"app-duplicate-product-card",11),s()),i&2){let t=a.$implicit,e=a.$index;l(),d("imageForZoom",t.ImageUrl)("title",t.Name)("code",t.Code)("id",e)("image",t.ThumbnailURL)("channels",t.Channels)("totalChannel",t.Total)}}function ka(i,a){i&1&&(r(0,"div",9),_(1,"app-empty-state"),s())}function Va(i,a){if(i&1){let t=b();r(0,"div",10)(1,"div",12)(2,"app-custom-paginator",13),x("next",function(){m(t);let n=c();return u(n.getProducts())})("previous",function(){m(t);let n=c();return u(n.getProducts())})("total",function(){m(t);let n=c();return u(n.getRowCount())}),s()()()}if(i&2){let t=c();l(2),d("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickedRowCount)}}var xi=(()=>{let a=class a{constructor(){this.httpService=C(J),this.productService=C(et),this.searchFilter=new Ct,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){let e={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",e).subscribe(n=>{this.products=n.Data})}onSearch(e){this.searchFilter.text=e,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=y.GuidEMpty}getChannelLogo(e){return y.getChannelLogoByTypeId(e)}getRowCount(){let e={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",e).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-duplicate-sku"]],standalone:!1,decls:19,vars:4,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["routerLink","/menu/products/status/duplicate-sku/table",1,"btn","btn-outline-secondary","btn-lg","d-flex","align-items-center","gap-2"],[1,"fa-solid","fa-table"],["container",""],[1,"mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-8","mx-1"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[3,"imageForZoom","title","code","id","image","channels","totalChannel"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,o){n&1&&(r(0,"mainpanel",0),x("onSubmit",function(S){return o.onSearch(S)}),r(1,"actions")(2,"a",1),_(3,"i",2),r(4,"span"),p(5,"Table View"),s()()(),r(6,"filters")(7,"div",3)(8,"div")(9,"h6",4),p(10,"Channel"),s(),r(11,"app-channel-options-v2",5),F("ngModelChange",function(S){return O(o.searchFilter.ListChannelID,S)||(o.searchFilter.ListChannelID=S),S}),s()()()(),r(12,"content")(13,"div",6)(14,"div",7),A(15,Da,2,7,"div",8,W),g(17,ka,2,0,"div",9),s(),g(18,Va,3,4,"div",10),s()()()),n&2&&(l(11),d("multiple",!0),M("ngModel",o.searchFilter.ListChannelID),l(4),R(o.products),l(2),f((o.products==null?null:o.products.length)==0?17:-1),l(),f((o.products==null?null:o.products.length)>0?18:-1))},dependencies:[K,Z,tt,be,ct,me,nt,ft],encapsulation:2});let i=a;return i})();var Ea=()=>["/menu/products/status/sold-in-channel"],yi=i=>({ID:i}),Na=()=>["/menu/products/status/not-in-pos"],Ba=i=>[i];function Aa(i,a){if(i&1&&p(0),i&2){let t=c().$implicit;w(" ",t.Count," ")}}function Ra(i,a){if(i&1){let t=b();r(0,"span",23),x("click",function(){m(t);let n=c().$implicit,o=c(2);return u(o.getLiveProductCount(n.ID,n))}),_(1,"i",24),s()}}function La(i,a){if(i&1){let t=b();E(0),r(1,"button",25),x("click",function(){m(t);let n=c().$implicit,o=c(2);return u(o.onScanChannel(n))}),_(2,"i",26),p(3," Scan "),s(),N()}}function Ua(i,a){if(i&1){let t=b();r(0,"tr")(1,"td"),_(2,"img",14),r(3,"span",15),p(4),s()(),r(5,"td",16),g(6,Aa,1,1)(7,Ra,2,0,"span",17),s(),r(8,"td",16)(9,"a",18),p(10),D(11,"number"),s()(),r(12,"td",16)(13,"a",18),p(14),D(15,"number"),s()(),r(16,"td"),p(17),D(18,"date"),s(),r(19,"td")(20,"div",19),V(21,La,4,0,"ng-container",20),r(22,"button",21),x("click",function(){let n=m(t).$implicit,o=c(2);return u(o.onClearCache(n.ID))}),_(23,"i",22),p(24," Clear "),s()()()()}if(i&2){let t=a.$implicit,e=c(2);l(2),d("src",e.getChannelLogo(t.TypeID),$),l(2),L(t.Name),l(2),f(t.Count!==void 0?6:7),l(3),d("routerLink",St(18,Ea))("queryParams",T(19,yi,t.ID)),l(),w(" ",B(11,11,t.SoldInChannel)," "),l(3),d("routerLink",St(21,Na))("queryParams",T(22,yi,t.ID)),l(),w(" ",B(15,13,t.NotInPOS)," "),l(3),w(" ",t.LastSync?nn(18,15,t.LastSync,"dd MMM yyyy HH:mm"):"Never"," "),l(4),d("ngxPermissionsOnly",T(24,Ba,e.scanProductRole))}}function $a(i,a){if(i&1&&(r(0,"div",4)(1,"table",6)(2,"thead",7)(3,"tr",8)(4,"th"),p(5,"Channel"),s(),r(6,"th",9),p(7," Live Product "),s(),r(8,"th",10),p(9," Sold In Channel "),s(),r(10,"th",11),p(11," Product Not in POS "),s(),r(12,"th",12),p(13,"Last Sync"),s(),_(14,"th",13),s()(),r(15,"tbody"),A(16,Ua,25,26,"tr",null,W),D(18,"async"),s()()()),i&2){let t,e=c();l(16),R((t=B(18,0,e.channels$))==null?null:t.Data)}}function Wa(i,a){i&1&&(r(0,"div",5),_(1,"app-empty-state"),s())}var Si=(()=>{let a=class a{constructor(){this.productService=C(et),this.toastr=C(Q),this.dialog=C(st),this.authService=C(lt),this.scanProductRole=j.ProductScan;let e=this.authService;this.destroy$=new Yt,this.channelOptions=e.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(e,n){this.productService.getTotalProductLive(e).pipe(Gt(this.destroy$)).subscribe(o=>{n.Count=o.Count})}onScanChannel(e){this.dialog.open(H,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:e.ID},disabledChannelOption:!0}}).afterClosed().pipe(k(n=>y.IsNotEmpty(n))).subscribe(n=>{this.scanAllProduct(e.ID,n)})}scanAllProduct(e,n){let o=this.productService.findChannelById(e,this.channelOptions);this.productService.scanAll(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async).pipe(k(h=>h)).subscribe(h=>{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(h,o,!n.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(e){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(e).pipe(Gt(this.destroy$)).subscribe(o=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(e){return y.getChannelLogoByTypeId(e)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-channel-statistic"]],standalone:!1,decls:8,vars:5,consts:[["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary"],[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"]],template:function(n,o){if(n&1&&(r(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),g(5,$a,19,2,"div",4),D(6,"async"),Pt(7,Wa,2,0,"div",5),s()()()()()),n&2){let h;d("hideSearchBox",!0)("hideSearchDropdown",!0),l(5),f(((h=B(6,3,o.channels$))==null||h.Data==null?null:h.Data.length)>0?5:7)}},dependencies:[tt,ht,me,nt,rt,ut,Ft,sn],encapsulation:2});let i=a;return i})();var Ga=[{component:oi,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:ci,canActivate:[Y,X],data:{title:"Products in POS"}},{path:"sold-in-channel",component:_i,canActivate:[Y,X],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:gi,canActivate:[Y,X],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:fi,canActivate:[Y,X],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:xi,canActivate:[Y,X],data:{title:"Duplicate Sku in Channel"}},{path:"duplicate-sku/table",loadComponent(){return import("./chunk-LABF6W37.js").then(i=>i.DuplicateSkuV2Component)},canActivate:[Y,X],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:Si,canActivate:[Y,X],data:{title:"Channel Statistic"}},{path:"notification",loadComponent(){return import("./chunk-FCFCTT5A.js").then(i=>i.NotificationComponent)},canActivate:[Y,X],data:{title:"Notification"}},{path:"notificationV2",loadComponent(){return import("./chunk-ALPG22RQ.js").then(i=>i.NotificationV2Component)},canActivate:[Y,X],data:{title:"Notification"}},{path:"notificationV2/detailV2",loadComponent(){return import("./chunk-6EORXONU.js").then(i=>i.DetailComponent)},canActivate:[Y,X],data:{title:"Notification Detail"}},{path:"notification/detail",loadComponent(){return import("./chunk-AEVLZ7NS.js").then(i=>i.DetailComponent)},canActivate:[Y,X],data:{title:"Notification Detail"}}]}],ld=(()=>{let a=class a{};a.\u0275fac=function(n){return new(n||a)},a.\u0275mod=De({type:a}),a.\u0275inj=Fe({imports:[ot,kt,In,_t,xn,ni,Un,Tn,be,ct,gt,dn.forChild(Ga),Xn,Gn,$t,gn,Ie,ft,xt]});let i=a;return i})();export{ld as StatusModule};
|
|
266
|
+
`],encapsulation:2});let i=a;return i})();var Ge=i=>[i];function Go(i,a){if(i&1){let t=b();r(0,"button",12),x("click",function(){m(t);let n=c(2);return u(n.onDetachMultipleProduct())}),_(1,"i",13),p(2),s()}if(i&2){let t,e=c(2);l(2),w("Detach (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function jo(i,a){if(i&1&&(E(0),g(1,Go,3,1,"button",11),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)?1:-1)}}function zo(i,a){if(i&1){let t=b();r(0,"div",14)(1,"button",16),x("click",function(){m(t);let n=c(2);return u(n.onScanAllV2Products())}),_(2,"i",17),p(3," Scan Channel V2 "),s(),_(4,"button",18),r(5,"ul",19)(6,"li")(7,"a",20),x("click",function(){m(t);let n=c(2);return u(n.onScanAllProducts())}),_(8,"i",17),p(9," Scan Channel "),s()()()()}}function Ho(i,a){if(i&1){let t=b();r(0,"button",21),x("click",function(){m(t);let n=c(2);return u(n.onScanMultipleProduct())}),_(1,"i",17),p(2),s()}if(i&2){let t=c(2);l(2),w(" Scan (",t.productService.selectedProduct(t.products).length,") ")}}function Ko(i,a){if(i&1&&(E(0),g(1,zo,10,0,"div",14)(2,Ho,3,1,"button",15),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)?t.multipeScanChannels.length>0&&t.productService.hasSelection(t.products)?2:-1:1)}}function Zo(i,a){if(i&1){let t=b();r(0,"button",23),x("click",function(){m(t);let n=c(2);return u(n.onUploadMultipleProduct())}),_(1,"i",24),p(2),s()}if(i&2){let t=c(2);l(2),w(" Upload (",t.productService.selectedProduct(t.products).length,") ")}}function Jo(i,a){if(i&1&&(E(0),g(1,Zo,3,1,"button",22),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)?1:-1)}}function qo(i,a){if(i&1){let t=b();r(0,"div",2)(1,"label",3),p(2,"Item ID"),s(),r(3,"input",25),F("ngModelChange",function(n){m(t);let o=c();return O(o.searchFilter.Item_id,n)||(o.searchFilter.Item_id=n),u(n)}),s()()}if(i&2){let t=c();l(3),M("ngModel",t.searchFilter.Item_id)}}function Qo(i,a){if(i&1){let t=b();r(0,"div",8)(1,"app-product-card",26),x("onUpload",function(){let n=m(t).$implicit,o=c();return u(o.onUploadToMultipleChannel(n))})("onDescEvent",function(){let n=m(t).$index,o=c();return u(o.onOpenVariantDetail(n))})("onScan",function(){let n=m(t).$implicit,o=c();return u(o.onScanSingleProduct(n))})("onCheckBoxChange",function(n){let o=m(t).$implicit;return u(o.selected=n)})("onDetach",function(){let n=m(t).$implicit,o=c();return u(o.onDetachProduct([n]))}),s()()}if(i&2){let t=a.$implicit,e=c();l(),d("productId",t==null?null:t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",e.productService.getChannelProduct(t))("code",e.getVariantCode(t==null?null:t.Variants))("showCheckBox",t==null?null:t.hasScan)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function Yo(i,a){i&1&&(r(0,"div",9),_(1,"app-empty-state"),s())}function Xo(i,a){if(i&1){let t=b();r(0,"div",10)(1,"div",27)(2,"app-custom-paginator",28),x("total",function(){m(t);let n=c();return u(n.getRowCount())})("next",function(){m(t);let n=c();return u(n.getProducts())})("previous",function(){m(t);let n=c();return u(n.getProducts())}),s()()()}if(i&2){let t=c();l(2),d("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var _i=(()=>{let a=class a{constructor(){this.http=C(J),this.dialog=C(st),this.toastr=C(Q),this.productService=C(et),this.activateRouter=C(pe),this.authService=C(lt),this.route=C(at),this.uploadProductService=C(At),this.placeholderService=C(Rt),this.searchFilter=new Ct,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=y.GuidEMpty,this.multipeScanChannels=[],this.filterOptions=U({SearchComparatorTypeOptions:[],SearchSKUOnlyOrSKUNameOptions:[]}),this.searchPlaceholder=U("Search ..."),this.scanProductRole=j.ProductScan,this.uploadProductRole=j.ProductUpload,this.detachProductRole=j.ProductDetach,this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(e=>{e.ID?this.initPageLoader(e.ID):this.initPageLoader(y.GuidEMpty)})}initPageLoader(e){this.productService.loader(e).subscribe(n=>{this.filterOptions.set(n.Options),this.searchFilter=n.Filter,n.Filter.ChannelID!=y.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(n.Filter.ChannelID)),this.searchFilter.PageSize=n.Filter?.RowCount,this.getProducts(),this.initSearchPlaceholder()})}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok])}getProducts(){let e={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.productService.findAllSoldInChannel(e).subscribe(n=>{this.products=n.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(e){this.searchFilter.text=e,this.hasClickRowCount=!1,this.getProducts(),this.initSearchPlaceholder()}onOpenVariantDetail(e){let n=this.products[e].Variants;this.dialog.open(ve,{data:{variants:n,title:this.products[e].Name}})}onScanAllProducts(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=y.GuidEMpty,this.dialog.open(H,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(k(o=>y.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}onScanAllV2Products(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=y.GuidEMpty,this.dialog.open(H,{data:{filter:e,channelOptions:this.channelOptions,useV2:!0},width:"600px"}).afterClosed().pipe(k(n=>y.IsNotEmpty(n)),Wt(n=>this.productService.scanProductV2(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async))).subscribe(()=>{this.initPageLoader(y.GuidEMpty)})}scanAllProduct(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(k(n=>n)).subscribe(n=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct),this.initPageLoader(y.GuidEMpty))})}onScanSingleProduct(e){e.Channel=this.productService.getChannelProduct(e);let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(H,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(k(o=>y.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID;let h=this.productService.getVariantCodesProduct(e);this.scanProducts(h)})}onUploadToMultipleChannel(e){this.uploadProductService.setSelectedProduct([e]),this.route.navigate(["/menu/products/upload"])}onScanMultipleProduct(){this.searchFilter.ChannelID=y.GuidEMpty;let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(H,{data:{filter:e,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(k(o=>y.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct;let h=this.productService.selectedProduct(this.products),S=this.productService.getVariantCodesProducts(h);this.scanProducts(S)})}scanProducts(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:n=>{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);n?this.toastr.success(`Product Successfully scan with ${o?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${o?.Name} `,"Error"),this.searchFilter.ChannelID=y.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=y.GuidEMpty}})}getVariantCode(e){let n;return e.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),e.length==1&&(n=e[0].Code),n}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(e),this.route.navigate(["/menu/products/upload"])}getRowCount(){let e={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.http.post(pt.GetSoldInChannelRowCount,e).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Total})}onDetachProduct(e){let n=[];e.forEach(o=>{o.Channel=y.assignChannelLogo(o.Channel),n.push(...o.Channel)}),this.dialog.open($t,{width:"600px",data:[...n]}).afterClosed().pipe(k(o=>y.IsNotEmpty(o)),Wt(o=>this.productService.detachProduct(o))).subscribe(o=>{this.toastr.success(o.Message,_e.Success),this.getProducts()})}onDetachMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.onDetachProduct(e)}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-sold-in-channel"]],standalone:!1,decls:21,vars:20,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"onSubmit","headerTitle","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],[1,"btn-group","me-3","shadow"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],[1,"btn","btn-outline-secondary","border-end-0",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu",2,"cursor","pointer"],[1,"dropdown-item",3,"click"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[3,"onUpload","onDescEvent","onScan","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,o){n&1&&(r(0,"mainpanel",0),x("onSubmit",function(S){return o.searchProduct(S)}),r(1,"actions"),V(2,jo,2,1,"ng-container",1)(3,Ko,3,1,"ng-container",1)(4,Jo,2,1,"ng-container",1),s(),r(5,"filters")(6,"div",2)(7,"label",3),p(8,"Channel"),s(),r(9,"app-channel-options-v2",4),F("ngModelChange",function(S){return O(o.searchFilter.ListChannelID,S)||(o.searchFilter.ListChannelID=S),S}),s()(),g(10,qo,4,1,"div",2),r(11,"div")(12,"filter-query-type",5),F("numberFilterComparatorChange",function(S){return O(o.searchFilter.NumberFilterComparator,S)||(o.searchFilter.NumberFilterComparator=S),S})("searchTypeChange",function(S){return O(o.searchFilter.SearchType,S)||(o.searchFilter.SearchType=S),S}),s()()(),r(13,"content"),_(14,"scan-channel-toastr"),r(15,"div",6)(16,"div",7),A(17,Qo,2,11,"div",8,W),g(19,Yo,2,0,"div",9),s(),g(20,Xo,3,4,"div",10),s()()()),n&2&&(d("headerTitle","Sold in Channel")("searchBoxPlaceHolder",o.searchPlaceholder()),l(2),d("ngxPermissionsOnly",T(14,Ge,o.detachProductRole)),l(),d("ngxPermissionsOnly",T(16,Ge,o.scanProductRole)),l(),d("ngxPermissionsOnly",T(18,Ge,o.uploadProductRole)),l(5),d("multiple",!0),M("ngModel",o.searchFilter.ListChannelID),l(),f(o.searchFilter.ListChannelID!=null?10:-1),l(2),d("numberFilterComparatorOptions",o.filterOptions().SearchComparatorTypeOptions),M("numberFilterComparator",o.searchFilter.NumberFilterComparator),d("searchTypeOptions",o.filterOptions().SearchSKUOnlyOrSKUNameOptions),M("searchType",o.searchFilter.SearchType),l(5),R(o.products),l(2),f(o.products.length==0?19:-1),l(),f(o.products!=null&&o.products.length?20:-1))},dependencies:[Dt,K,Z,tt,ct,gt,nt,rt,Ie,ft,xt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let i=a;return i})();var Ci=(()=>{let a=class a{get footerPageNumber(){return this._footerPageNumber}set footerPageNumber(e){this._footerPageNumber=e}get hideCount(){return this._hideCount}set hideCount(e){this._hideCount=e}get disableNextButton(){return this._disableNextButton}set disableNextButton(e){this._disableNextButton=e}get goToLastPage(){return this._goToLastPage}set goToLastPage(e){this._goToLastPage=e}constructor(e){this.http=e,this.pagination$=new Oe(null),this.destroy$=new Yt,this.data$=this.paginationFunction()}onNextPage(e){e.PageNumber+=1,this.pagination$.next(e)}setPageNumberFooter(e){this.footerPageNumber=e.PageNumber}setPaginationButtonState(e,n){n==0?this.disableNextButton=!0:this.disableNextButton=!(n<e.RowCount*e.PageNumber)}reloadPagination(e){y.IsEmpty(e.PageNumber)&&(e.PageNumber=1),this.pagination$.next(e),this.hideCount=!0,this.goToLastPage=!1}getAllData(e,n){e.RowCount=n,this.pagination$.next(e),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new Oe(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe(Gt(this.destroy$),k(e=>e!=null),ze(e=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(e)).pipe(yt(n=>n.Data))),Ke(this.pagination$),He((e,n)=>{let[o,h]=e,[S]=n;return h.PageNumber==1?[S,h]:[o.concat(S),h]}),vt(([e,n])=>{this.setPageNumberFooter(n),this.setPaginationButtonState(n,e.length)}),yt(([e])=>e),Xt())}};a.\u0275fac=function(n){return new(n||a)(Je(J))},a.\u0275prov=te({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var Me=i=>[i];function ta(i,a){if(i&1){let t=b();r(0,"button",11),x("click",function(){m(t);let n=c(3);return u(n.uploadMultipleProduct())}),_(1,"i",12),p(2),s()}if(i&2){let t=c(3);l(2),w(" upload (",t.selectedProducts==null?null:t.selectedProducts.length,") ")}}function ea(i,a){if(i&1&&(E(0),g(1,ta,3,1,"button",10),N()),i&2){let t=c(2);l(),f(t.hasSelectionProduct?1:-1)}}function na(i,a){if(i&1){let t=b();E(0),r(1,"button",13),x("click",function(){m(t);let n=c(2);return u(n.openScanDialog())}),_(2,"i",14),p(3," Scan Channel "),s(),N()}}function ia(i,a){i&1&&(E(0),_(1,"th",21),N())}function oa(i,a){if(i&1){let t=b();r(0,"td",27)(1,"input",28),F("ngModelChange",function(n){m(t);let o=c(3).$implicit;return O(o.selected,n)||(o.selected=n),u(n)}),x("ngModelChange",function(){m(t);let n=c(4),o=c(3);return u(o.onSelectProduct(n))}),s()()}if(i&2){let t=c(3).$implicit;d("rowSpan",t==null?null:t.Variants.length),l(),M("ngModel",t.selected)}}function aa(i,a){if(i&1&&(E(0),g(1,oa,2,2,"td",27),N()),i&2){let t=c().$index;l(),f(t==0?1:-1)}}function ra(i,a){if(i&1){let t=b();r(0,"img",35),x("click",function(n){m(t);let o=c(3).$implicit,h=c(4);return u(h.onZoomImage(n,o==null?null:o.ImageUrl))}),s()}if(i&2){let t=c(3).$implicit;d("src",t==null?null:t.ImageUrl,$)}}function la(i,a){i&1&&_(0,"img",31)}function sa(i,a){if(i&1&&(r(0,"td",27)(1,"div",29),g(2,ra,1,1,"img",30)(3,la,1,0,"img",31),s()(),r(4,"td",32)(5,"h4",33)(6,"span",34),p(7),s()()()),i&2){let t=c(2).$implicit;d("rowSpan",t==null?null:t.Variants.length),l(2),f(t!=null&&t.ImageUrl?2:3),l(2),d("rowSpan",t==null?null:t.Variants.length),l(2),d("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),l(),w(" ",t==null?null:t.Name," ")}}function ca(i,a){if(i&1&&(r(0,"div")(1,"a",23),_(2,"img",36),s()()),i&2){let t=a.$implicit;l(),d("href",t.URL,$),l(),d("src",t.Img,$)("matTooltip",t.Name)}}function da(i,a){if(i&1&&(r(0,"div"),_(1,"img",36),s()),i&2){let t=a.$implicit;l(),d("src",t.Img,$)("matTooltip",t.Name)}}function pa(i,a){if(i&1&&(r(0,"tr"),V(1,aa,2,1,"ng-container",2),g(2,sa,8,5),r(3,"td"),p(4),s(),r(5,"td")(6,"span"),p(7),s(),r(8,"span",22)(9,"a",23),_(10,"i",24),s()()(),r(11,"td",25)(12,"div",26),A(13,ca,3,3,"div",null,W),s()(),r(15,"td",25)(16,"div",26),A(17,da,2,2,"div",null,W),s()()()),i&2){let t=a.$implicit,e=a.$index,n=c(5);l(),d("ngxPermissionsOnly",T(5,Me,n.uploadProductRole)),l(),f(e==0?2:-1),l(2),w(" ",t.Name," "),l(3),w(" ",t.Code," "),l(2),d("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),$),l(4),R(t==null?null:t.Available),l(4),R(t==null?null:t.NotAvailable)}}function ma(i,a){if(i&1&&A(0,pa,19,7,"tr",null,W),i&2){let t=a.$implicit;R(t.Variants)}}function ua(i,a){i&1&&(r(0,"tbody"),A(1,ma,2,0,null,null,W),s()),i&2&&(l(),R(a))}function ha(i,a){if(i&1&&(r(0,"div",8)(1,"table",15)(2,"thead",16)(3,"tr"),V(4,ia,2,0,"ng-container",2),r(5,"th",17),p(6," Product "),s(),r(7,"th",18),p(8,"Variant"),s(),r(9,"th",18),p(10,"SKU"),s(),r(11,"th",19),p(12,"Available In"),s(),r(13,"th",20),p(14,"Not Available In"),s()()(),g(15,ua,3,0,"tbody"),D(16,"async"),s()()),i&2){let t,e=c(2);l(4),d("ngxPermissionsOnly",T(4,Me,e.uploadProductRole)),l(11),f((t=B(16,2,e.data$))?15:-1,t)}}function _a(i,a){i&1&&(r(0,"div",9),_(1,"app-empty-state"),s())}function Ca(i,a){if(i&1){let t=b();r(0,"span",44),x("click",function(){m(t);let n=c(4);return u(n.getRowCount())}),r(1,"i",45),p(2,"?"),s()()}}function ga(i,a){if(i&1&&(r(0,"span"),p(1),D(2,"number"),s()),i&2){let t=a;l(),L(B(2,1,t==null?null:t.Count))}}function fa(i,a){if(i&1){let t=b();r(0,"a",46),x("click",function(){m(t);let n=c(4);return u(n.onNextPage())}),_(1,"i",47),p(2," Next"),s()}}function xa(i,a){if(i&1){let t=b();r(0,"a",48),x("click",function(){m(t);let n=c(4);return u(n.onLastPage())}),_(1,"i",49),p(2," Last"),s()}}function ya(i,a){if(i&1&&(r(0,"div",37)(1,"div",38)(2,"div",39),p(3),D(4,"number"),g(5,Ca,3,0,"span",40),g(6,ga,3,3,"span"),D(7,"async"),p(8),s()(),r(9,"div",41),g(10,fa,3,0,"a",42),g(11,xa,3,0,"a",43),s()()),i&2){let t,e=c(),n=c(2);l(3),w(" Showing 1 - ",B(4,6,e==null?null:e.length)," of "),l(2),f(n.paginationService.hideCount?5:-1),l(),f((t=!n.paginationService.hideCount&&B(7,8,n.rowCount$))?6:-1,t),l(2),w(" records ~ ",n.paginationService.footerPageNumber," Page "),l(2),f(n.paginationService.disableNextButton&&!n.paginationService.goToLastPage?10:-1),l(),f(n.paginationService.disableNextButton&&!n.paginationService.goToLastPage?11:-1)}}function Sa(i,a){if(i&1&&g(0,ya,12,10,"div",37),i&2){let t=a;f((t==null?null:t.length)>0?0:-1)}}function ba(i,a){if(i&1){let t=b();r(0,"mainpanel",1),x("onSubmit",function(n){m(t);let o=c();return u(o.searchProduct(n))}),r(1,"actions"),V(2,ea,2,1,"ng-container",2)(3,na,4,0,"ng-container",2),r(4,"button",3),x("click",function(){m(t);let n=c();return u(n.openExportDialog())}),_(5,"i",4),r(6,"span"),p(7,"Export"),s()()(),r(8,"filters")(9,"filter-query-type",5),F("numberFilterComparatorChange",function(n){m(t);let o=c();return O(o.searchFilter.NumberFilterComparator,n)||(o.searchFilter.NumberFilterComparator=n),u(n)})("searchTypeChange",function(n){m(t);let o=c();return O(o.searchFilter.SearchType,n)||(o.searchFilter.SearchType=n),u(n)}),s()(),r(10,"content")(11,"div",6)(12,"div",7),g(13,ha,17,6,"div",8),D(14,"async"),Pt(15,_a,2,0,"div",9),s(),g(16,Sa,1,1),D(17,"async"),s()()()}if(i&2){let t,e,n=a,o=c();d("searchBoxPlaceHolder",o.searchPlaceholder()),l(2),d("ngxPermissionsOnly",T(13,Me,o.uploadProductRole)),l(),d("ngxPermissionsOnly",T(15,Me,o.scanProductRole)),l(6),d("numberFilterComparatorOptions",n==null||n.Options==null?null:n.Options.SearchComparatorTypeOptions),M("numberFilterComparator",o.searchFilter.NumberFilterComparator),d("searchTypeOptions",n==null||n.Options==null?null:n.Options.SearchSKUOnlyOrSKUNameOptions),M("searchType",o.searchFilter.SearchType),l(4),f(((t=B(14,9,o.data$))==null?null:t.length)>0?13:15),l(3),f((e=B(17,11,o.data$))?16:-1,e)}}var gi=(()=>{let a=class a{constructor(){this.http=C(J),this.dialog=C(st),this.toastr=C(Q),this.route=C(at),this.productService=C(et),this.paginationService=C(Ci),this.biggerPictureService=C(Zn),this.authService=C(lt),this.uploadProductService=C(At),this.placeholderService=C(Rt),this.loaderAPI="product/Load",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.scanProductRole=j.ProductScan,this.uploadProductRole=j.ProductUpload,this.searchPlaceholder=U("Search ...");let e=this.authService;this.channelOptions=e.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(vt(e=>{this.searchFilter=e.Filter,this.paginationService.reloadPagination(e.Filter),this.initSearchPlaceholder()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}iniData(){this.data$=this.paginationService.data$.pipe(yt(e=>(e=e.map(n=>(n.Variants=n.Variants.map(o=>(o.Available=this.productService.sortChannel(o.Available),o.NotAvailable=this.productService.sortChannel(o.NotAvailable),o.Available=this.assignLogoChannel(o.Available),o.NotAvailable=this.assignLogoChannel(o.NotAvailable),o)),n.Channel=n?.Variants[0]?.Available,n)),e)))}assignLogoChannel(e){return e=e.map(n=>(n.Img=y.getChannelLogoByTypeId(n.TypeID),n)),e}searchProduct(e){this.searchFilter.text=e,this.paginationService.reloadPagination(this.searchFilter),this.initSearchPlaceholder()}scanAllProduct(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{this.searchFilter.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=y.GuidEMpty,this.dialog.open(H,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(k(o=>y.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1;let e={text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.rowCount$=this.http.post(pt.GetNotInChannelRowCount,e)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){let e={text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.http.post(pt.GetNotInChannelRowCount,e).subscribe({next:n=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,n.Count)}})}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}onSelectProduct(e){this.hasSelectionProduct=this.productService.hasSelection(e),this.selectedProducts=this.productService.selectedProduct(e)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(ti,{data:{title:"Export Not In Channel",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-not-in-channel"]],standalone:!1,decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"searchBoxPlaceHolder"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[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"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[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"],[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,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[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"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[1,"btn-group"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(n,o){if(n&1&&(g(0,ba,18,17,"mainpanel",0),D(1,"async")),n&2){let h;f((h=B(1,1,o.loader$))?0:-1,h)}},dependencies:[pn,K,Z,tt,ht,nt,rt,xt,ut,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%}"]});let i=a;return i})();var je=i=>[i],va=()=>[];function wa(i,a){if(i&1){let t=b();r(0,"button",16),x("click",function(){m(t);let n=c(2);return u(n.openScanDialog())}),_(1,"i",17),p(2," Scan Channel "),s()}}function Pa(i,a){if(i&1&&(E(0),g(1,wa,3,0,"button",15),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)?-1:1)}}function Ta(i,a){if(i&1){let t=b();r(0,"button",19),x("click",function(){m(t);let n=c(2);return u(n.onDownloadAllProduct("SELECTED"))}),_(1,"i",20),p(2),s()}if(i&2){let t,e=c(2);l(2),w(" Download (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function Ia(i,a){if(i&1&&(E(0),g(1,Ta,3,1,"button",18),N()),i&2){let t=c();l(),f(t.productService.hasSelection(t.products)?1:-1)}}function Ma(i,a){if(i&1){let t=b();r(0,"div",12)(1,"app-product-card",21),x("onCheckBoxChange",function(n){let o=m(t).$index,h=c();return u(h.onSelectProduct(n,o))})("onDescEvent",function(){let n=m(t).$index,o=c();return u(o.onShowVariantDetail(n))})("onDownload",function(){let n=m(t).$implicit,o=c();return u(o.onDownloadProduct(n))})("onScan",function(){let n=m(t).$implicit,o=c();return u(o.onScanChannel(n))}),s()()}if(i&2){let t=a.$implicit,e=c();l(),d("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?T(10,je,t==null?null:t.Channel):St(12,va))("showCheckBox",e.hasDownloadRole())("scanButton",!0)}}function Oa(i,a){i&1&&(r(0,"div",13),_(1,"app-empty-state"),s())}function Fa(i,a){if(i&1){let t=b();r(0,"div",14)(1,"div",22)(2,"app-custom-paginator",23),x("total",function(){m(t);let n=c();return u(n.getRowCount())})("next",function(){m(t);let n=c();return u(n.getProducts())})("previous",function(){m(t);let n=c();return u(n.getProducts())}),s()()()}if(i&2){let t=c();l(2),d("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var fi=(()=>{let a=class a{constructor(){this.http=C(J),this.dialog=C(st),this.productService=C(et),this.toastrService=C(Q),this.activateRouter=C(pe),this.authService=C(lt),this.placeholderService=C(Rt),this.permissionService=C(Cn),this.searchFilter=new Ct,this.products=[],this.hasClickRowCount=!1,this.scanProductRole=j.ProductScan,this.downloadProductRole=j.ProductDownload,this.hasDownloadRole=U(!0),this.searchPlaceholder=U("Search ..."),this.channelOptions=this.authService.getChannels(),this.permissionService.hasPermission(this.downloadProductRole).then(e=>{this.hasDownloadRole.set(e)})}ngOnInit(){this.activateRouter.queryParams.subscribe(e=>{e.ID?this.initPageLoader(e.ID):this.initPageLoader(y.GuidEMpty)})}initPageLoader(e){this.loader$=this.productService.loader(e).pipe(vt(n=>{this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.getProducts(),this.initSearchPlaceholder()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(e=>{this.products=e.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let e;this.products=this.products.map(n=>(e=this.channelOptions.find(o=>o.ID==n.ChannelID),e?n.Channel=JSON.parse(JSON.stringify(e)):n.Channel=null,n)).map(n=>(n.Channel&&(n.Channel.Url=n.Url),n))}setSkuProduct(){this.products=this.products.map(e=>(e?.Variant?.length==0?y.IsNotEmpty(e?.ChannelItemSKU)?e.SKU=e?.ChannelItemSKU:e.SKU="SKU not assigned":e.SKU=e?.Variant[0]?.ChannelVariationSKU?e?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",e))}onSearch(e){this.searchFilter.text=e,this.hasClickRowCount=!1,this.getProducts(),this.initSearchPlaceholder()}onClearChannelFilter(){this.searchFilter.ChannelID=y.GuidEMpty}onScanAll(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(y.GuidEMpty),this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=y.GuidEMpty})}openScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=y.GuidEMpty,this.dialog.open(H,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(k(o=>y.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.Async=o.Async,this.onScanAll()})}onDownloadAllProduct(e){let n;e=="ALL"?n=this.products:n=this.productService.selectedProduct(this.products),n.length>0&&this.productService.downloadMultipleProduct(n).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(e,n){this.products[n].selected=e}onDownloadProduct(e){confirm(`Are you sure you want to Retrieve product ${e?.Name} from ${e?.Channel.Name} to POS?`)&&this.productService.downloadProduct(e).subscribe({next:()=>{this.getProducts()}})}onScanChannel(e){let n=JSON.parse(JSON.stringify(e));delete n.Channel,this.productService.scanCompareToPos([n]).subscribe(o=>{o.Status?(this.initPageLoader(y.GuidEMpty),this.toastrService.success(`product ${e.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${e.Name} is not existed in POS`,"Error")})}onShowVariantDetail(e){let n=this.products[e].Variant;n.length>0&&this.dialog.open(ei,{data:{title:this.products[e].Name,variants:n},width:"30%"})}getRowCount(){let e={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku),SearchType:this.searchFilter.SearchType,NumberFilterComparator:this.searchFilter.NumberFilterComparator};this.http.post(pt.GetNotInPosRowCount,e).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Count})}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-not-in-pos"]],standalone:!1,decls:34,vars:21,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],["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"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,o){if(n&1){let h=b();en(0),D(1,"async"),r(2,"mainpanel",0),x("onSubmit",function(v){return m(h),u(o.onSearch(v))}),r(3,"actions"),V(4,Pa,2,1,"ng-container",1)(5,Ia,2,1,"ng-container",1),s(),r(6,"filters")(7,"div",2)(8,"label",3),p(9,"Channel"),s(),r(10,"app-channel-options-v2",4),F("ngModelChange",function(v){return m(h),O(o.searchFilter.ChannelID,v)||(o.searchFilter.ChannelID=v),u(v)}),s()(),r(11,"div",2)(12,"label",5),p(13,"SKU Assigned"),s(),r(14,"mat-radio-group",6),F("ngModelChange",function(v){return m(h),O(o.searchFilter.HaveSku,v)||(o.searchFilter.HaveSku=v),u(v)}),r(15,"mat-radio-button",7),p(16," All "),s(),r(17,"mat-radio-button",7),p(18," Yes "),s(),r(19,"mat-radio-button",7),p(20," No "),s()()(),r(21,"div",2)(22,"label",5),p(23,"Item ID"),s(),r(24,"input",8),F("ngModelChange",function(v){return m(h),O(o.searchFilter.Item_id,v)||(o.searchFilter.Item_id=v),u(v)}),s()(),r(25,"div")(26,"filter-query-type",9),F("numberFilterComparatorChange",function(v){return m(h),O(o.searchFilter.NumberFilterComparator,v)||(o.searchFilter.NumberFilterComparator=v),u(v)})("searchTypeChange",function(v){return m(h),O(o.searchFilter.SearchType,v)||(o.searchFilter.SearchType=v),u(v)}),s()()(),r(27,"content")(28,"div",10)(29,"div",11),A(30,Ma,2,13,"div",12,W),g(32,Oa,2,0,"div",13),s(),g(33,Fa,3,4,"div",14),s()()()}if(n&2){let h=B(1,15,o.loader$);l(2),d("searchBoxPlaceHolder",o.searchPlaceholder()),l(2),d("ngxPermissionsOnly",T(17,je,o.scanProductRole)),l(),d("ngxPermissionsOnly",T(19,je,o.downloadProductRole)),l(5),M("ngModel",o.searchFilter.ChannelID),l(4),M("ngModel",o.searchFilter.HaveSku),l(),d("value",0),l(2),d("value",1),l(2),d("value",2),l(5),M("ngModel",o.searchFilter.Item_id),l(2),d("numberFilterComparatorOptions",h==null||h.Options==null?null:h.Options.SearchComparatorTypeOptions),M("numberFilterComparator",o.searchFilter.NumberFilterComparator),d("searchTypeOptions",h==null||h.Options==null?null:h.Options.SearchSKUOnlyOrSKUNameOptions),M("searchType",o.searchFilter.SearchType),l(4),R(o.products),l(2),f(o.products.length==0?32:-1),l(),f((o.products==null?null:o.products.length)>0?33:-1)}},dependencies:[Dt,K,Z,tt,ye,Se,ct,gt,nt,rt,ft,xt,ut],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});let i=a;return i})();function Da(i,a){if(i&1&&(r(0,"div",8),_(1,"app-duplicate-product-card",11),s()),i&2){let t=a.$implicit,e=a.$index;l(),d("imageForZoom",t.ImageUrl)("title",t.Name)("code",t.Code)("id",e)("image",t.ThumbnailURL)("channels",t.Channels)("totalChannel",t.Total)}}function ka(i,a){i&1&&(r(0,"div",9),_(1,"app-empty-state"),s())}function Va(i,a){if(i&1){let t=b();r(0,"div",10)(1,"div",12)(2,"app-custom-paginator",13),x("next",function(){m(t);let n=c();return u(n.getProducts())})("previous",function(){m(t);let n=c();return u(n.getProducts())})("total",function(){m(t);let n=c();return u(n.getRowCount())}),s()()()}if(i&2){let t=c();l(2),d("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickedRowCount)}}var xi=(()=>{let a=class a{constructor(){this.httpService=C(J),this.productService=C(et),this.searchFilter=new Ct,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){let e={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",e).subscribe(n=>{this.products=n.Data})}onSearch(e){this.searchFilter.text=e,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=y.GuidEMpty}getChannelLogo(e){return y.getChannelLogoByTypeId(e)}getRowCount(){let e={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",e).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-duplicate-sku"]],standalone:!1,decls:19,vars:4,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["routerLink","/menu/products/status/duplicate-sku/table",1,"btn","btn-outline-secondary","btn-lg","d-flex","align-items-center","gap-2"],[1,"fa-solid","fa-table"],["container",""],[1,"mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-8","mx-1"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[3,"imageForZoom","title","code","id","image","channels","totalChannel"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,o){n&1&&(r(0,"mainpanel",0),x("onSubmit",function(S){return o.onSearch(S)}),r(1,"actions")(2,"a",1),_(3,"i",2),r(4,"span"),p(5,"Table View"),s()()(),r(6,"filters")(7,"div",3)(8,"div")(9,"h6",4),p(10,"Channel"),s(),r(11,"app-channel-options-v2",5),F("ngModelChange",function(S){return O(o.searchFilter.ListChannelID,S)||(o.searchFilter.ListChannelID=S),S}),s()()()(),r(12,"content")(13,"div",6)(14,"div",7),A(15,Da,2,7,"div",8,W),g(17,ka,2,0,"div",9),s(),g(18,Va,3,4,"div",10),s()()()),n&2&&(l(11),d("multiple",!0),M("ngModel",o.searchFilter.ListChannelID),l(4),R(o.products),l(2),f((o.products==null?null:o.products.length)==0?17:-1),l(),f((o.products==null?null:o.products.length)>0?18:-1))},dependencies:[K,Z,tt,be,ct,me,nt,ft],encapsulation:2});let i=a;return i})();var Ea=()=>["/menu/products/status/sold-in-channel"],yi=i=>({ID:i}),Na=()=>["/menu/products/status/not-in-pos"],Ba=i=>[i];function Aa(i,a){if(i&1&&p(0),i&2){let t=c().$implicit;w(" ",t.Count," ")}}function Ra(i,a){if(i&1){let t=b();r(0,"span",23),x("click",function(){m(t);let n=c().$implicit,o=c(2);return u(o.getLiveProductCount(n.ID,n))}),_(1,"i",24),s()}}function La(i,a){if(i&1){let t=b();E(0),r(1,"button",25),x("click",function(){m(t);let n=c().$implicit,o=c(2);return u(o.onScanChannel(n))}),_(2,"i",26),p(3," Scan "),s(),N()}}function Ua(i,a){if(i&1){let t=b();r(0,"tr")(1,"td"),_(2,"img",14),r(3,"span",15),p(4),s()(),r(5,"td",16),g(6,Aa,1,1)(7,Ra,2,0,"span",17),s(),r(8,"td",16)(9,"a",18),p(10),D(11,"number"),s()(),r(12,"td",16)(13,"a",18),p(14),D(15,"number"),s()(),r(16,"td"),p(17),D(18,"date"),s(),r(19,"td")(20,"div",19),V(21,La,4,0,"ng-container",20),r(22,"button",21),x("click",function(){let n=m(t).$implicit,o=c(2);return u(o.onClearCache(n.ID))}),_(23,"i",22),p(24," Clear "),s()()()()}if(i&2){let t=a.$implicit,e=c(2);l(2),d("src",e.getChannelLogo(t.TypeID),$),l(2),L(t.Name),l(2),f(t.Count!==void 0?6:7),l(3),d("routerLink",St(18,Ea))("queryParams",T(19,yi,t.ID)),l(),w(" ",B(11,11,t.SoldInChannel)," "),l(3),d("routerLink",St(21,Na))("queryParams",T(22,yi,t.ID)),l(),w(" ",B(15,13,t.NotInPOS)," "),l(3),w(" ",t.LastSync?nn(18,15,t.LastSync,"dd MMM yyyy HH:mm"):"Never"," "),l(4),d("ngxPermissionsOnly",T(24,Ba,e.scanProductRole))}}function $a(i,a){if(i&1&&(r(0,"div",4)(1,"table",6)(2,"thead",7)(3,"tr",8)(4,"th"),p(5,"Channel"),s(),r(6,"th",9),p(7," Live Product "),s(),r(8,"th",10),p(9," Sold In Channel "),s(),r(10,"th",11),p(11," Product Not in POS "),s(),r(12,"th",12),p(13,"Last Sync"),s(),_(14,"th",13),s()(),r(15,"tbody"),A(16,Ua,25,26,"tr",null,W),D(18,"async"),s()()()),i&2){let t,e=c();l(16),R((t=B(18,0,e.channels$))==null?null:t.Data)}}function Wa(i,a){i&1&&(r(0,"div",5),_(1,"app-empty-state"),s())}var Si=(()=>{let a=class a{constructor(){this.productService=C(et),this.toastr=C(Q),this.dialog=C(st),this.authService=C(lt),this.scanProductRole=j.ProductScan;let e=this.authService;this.destroy$=new Yt,this.channelOptions=e.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(e,n){this.productService.getTotalProductLive(e).pipe(Gt(this.destroy$)).subscribe(o=>{n.Count=o.Count})}onScanChannel(e){this.dialog.open(H,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:e.ID},disabledChannelOption:!0}}).afterClosed().pipe(k(n=>y.IsNotEmpty(n))).subscribe(n=>{this.scanAllProduct(e.ID,n)})}scanAllProduct(e,n){let o=this.productService.findChannelById(e,this.channelOptions);this.productService.scanAll(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async).pipe(k(h=>h)).subscribe(h=>{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(h,o,!n.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(e){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(e).pipe(Gt(this.destroy$)).subscribe(o=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(e){return y.getChannelLogoByTypeId(e)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-channel-statistic"]],standalone:!1,decls:8,vars:5,consts:[["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary"],[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"]],template:function(n,o){if(n&1&&(r(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),g(5,$a,19,2,"div",4),D(6,"async"),Pt(7,Wa,2,0,"div",5),s()()()()()),n&2){let h;d("hideSearchBox",!0)("hideSearchDropdown",!0),l(5),f(((h=B(6,3,o.channels$))==null||h.Data==null?null:h.Data.length)>0?5:7)}},dependencies:[tt,ht,me,nt,rt,ut,Ft,sn],encapsulation:2});let i=a;return i})();var Ga=[{component:oi,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:ci,canActivate:[Y,X],data:{title:"Products in POS"}},{path:"sold-in-channel",component:_i,canActivate:[Y,X],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:gi,canActivate:[Y,X],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:fi,canActivate:[Y,X],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:xi,canActivate:[Y,X],data:{title:"Duplicate Sku in Channel"}},{path:"duplicate-sku/table",loadComponent(){return import("./chunk-Z5D5R7AO.js").then(i=>i.DuplicateSkuV2Component)},canActivate:[Y,X],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:Si,canActivate:[Y,X],data:{title:"Channel Statistic"}},{path:"notification",loadComponent(){return import("./chunk-X2RNU4B3.js").then(i=>i.NotificationComponent)},canActivate:[Y,X],data:{title:"Notification"}},{path:"notificationV2",loadComponent(){return import("./chunk-77NAUG5Y.js").then(i=>i.NotificationV2Component)},canActivate:[Y,X],data:{title:"Notification"}},{path:"notificationV2/detailV2",loadComponent(){return import("./chunk-6EORXONU.js").then(i=>i.DetailComponent)},canActivate:[Y,X],data:{title:"Notification Detail"}},{path:"notification/detail",loadComponent(){return import("./chunk-HANPHNZU.js").then(i=>i.DetailComponent)},canActivate:[Y,X],data:{title:"Notification Detail"}}]}],ld=(()=>{let a=class a{};a.\u0275fac=function(n){return new(n||a)},a.\u0275mod=De({type:a}),a.\u0275inj=Fe({imports:[ot,kt,In,_t,xn,ni,Un,Tn,be,ct,gt,dn.forChild(Ga),Xn,Gn,$t,gn,Ie,ft,xt]});let i=a;return i})();export{ld as StatusModule};
|