marketplacepos 5.41.1 → 5.41.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/3rdpartylicenses.txt +123 -123
- package/Marketplace/chunk-26DZ5AMC.js +1 -0
- package/Marketplace/chunk-2BBMPSAE.js +93 -0
- package/Marketplace/{chunk-ZIUDNFYT.js → chunk-2G6NLWKN.js} +1 -1
- package/Marketplace/chunk-3E5FYRN4.js +1 -0
- package/Marketplace/chunk-3PNMJUYQ.js +15 -0
- package/Marketplace/chunk-4AMQ66FW.js +1 -0
- package/Marketplace/chunk-4ASUM4N5.js +1 -0
- package/Marketplace/chunk-4G3QN54S.js +193 -0
- package/Marketplace/chunk-4NRAXW65.js +1 -0
- package/Marketplace/chunk-4RTZASVJ.js +1 -0
- package/Marketplace/chunk-4XMCJ7I5.js +1 -0
- package/Marketplace/{chunk-UMY6NG57.js → chunk-5GX2GLRY.js} +1 -1
- package/Marketplace/chunk-5KMCSNS6.js +2 -0
- package/Marketplace/{chunk-25OT4I3W.js → chunk-5MRT2EFE.js} +1 -1
- package/Marketplace/chunk-5S6SIKR7.js +1 -0
- package/Marketplace/chunk-62PFQNHJ.js +1 -0
- package/Marketplace/chunk-6AKFGBPY.js +4 -0
- package/Marketplace/chunk-6ALHX2I4.js +1 -0
- package/Marketplace/{chunk-SYENQYR7.js → chunk-6IAGGRZN.js} +1 -1
- package/Marketplace/{chunk-FWG4H3QG.js → chunk-6NNAICJE.js} +1 -1
- package/Marketplace/{chunk-WGXUKTYP.js → chunk-6XFYITUD.js} +1 -1
- package/Marketplace/{chunk-4CTORK4F.js → chunk-7477X7LJ.js} +1 -1
- package/Marketplace/{chunk-R76V3PTN.js → chunk-75BDXSG3.js} +10 -10
- package/Marketplace/{chunk-ACIMXBIC.js → chunk-77IUCPIQ.js} +1 -1
- package/Marketplace/{chunk-ZR5IXNXB.js → chunk-7FUVW73P.js} +1 -1
- package/Marketplace/chunk-7GQIIDFF.js +4 -0
- package/Marketplace/{chunk-PO7JVKK3.js → chunk-7TWBIV3T.js} +1 -1
- package/Marketplace/chunk-7XREAR3H.js +1 -0
- package/Marketplace/chunk-AMXLXRQK.js +1 -0
- package/Marketplace/chunk-AWDLMHBL.js +1 -0
- package/Marketplace/{chunk-6X2OBNJQ.js → chunk-BIQHA7UA.js} +4 -4
- package/Marketplace/{chunk-4M63ID5T.js → chunk-BUFEIJAI.js} +1 -1
- package/Marketplace/{chunk-SIYMMMKQ.js → chunk-CH2MLZU7.js} +1 -1
- package/Marketplace/chunk-CHZLFJFI.js +3 -0
- package/Marketplace/chunk-CMCNEAGC.js +1 -0
- package/Marketplace/{chunk-KX5AWR75.js → chunk-COBHWPGI.js} +1 -1
- package/Marketplace/chunk-CPAHXWMO.js +1 -0
- package/Marketplace/chunk-CTN7GW4H.js +1 -0
- package/Marketplace/chunk-CYZQNZDB.js +1 -0
- package/Marketplace/chunk-D54NUPYF.js +153 -0
- package/Marketplace/chunk-DI4V7KMK.js +1 -0
- package/Marketplace/chunk-DPLEMBB4.js +1 -0
- package/Marketplace/{chunk-PBGDP6XV.js → chunk-DRSUXHAY.js} +1 -1
- package/Marketplace/chunk-DZ2EE5MV.js +1 -0
- package/Marketplace/chunk-E3HMIPER.js +2 -0
- package/Marketplace/{chunk-JOBWFOGC.js → chunk-EGTYAIU5.js} +1 -1
- package/Marketplace/{chunk-OKAPL3YZ.js → chunk-G6EG5QJS.js} +1 -1
- package/Marketplace/{chunk-IKPRRD5D.js → chunk-GBABJLPQ.js} +1 -1
- package/Marketplace/{chunk-KQQCKHF3.js → chunk-GBXNTL4E.js} +1 -1
- package/Marketplace/{chunk-ZIOAOUAM.js → chunk-GHQH62TZ.js} +1 -1
- package/Marketplace/chunk-GJOCO2OS.js +2 -0
- package/Marketplace/chunk-GPEVUTDI.js +2 -0
- package/Marketplace/chunk-GSH5BYZ6.js +1 -0
- package/Marketplace/{chunk-OH6LACWK.js → chunk-GSPHYK6J.js} +11 -11
- package/Marketplace/chunk-HKYVBAMV.js +1 -0
- package/Marketplace/{chunk-GPC4DECX.js → chunk-IEYFOHME.js} +1 -1
- package/Marketplace/chunk-IIJMZKPL.js +1 -0
- package/Marketplace/{chunk-A2YNWIX6.js → chunk-IYYVZ6B6.js} +1 -1
- package/Marketplace/{chunk-XQGRC7V2.js → chunk-J3P46Z53.js} +1 -1
- package/Marketplace/{chunk-LHD7CYML.js → chunk-J7AGLBPL.js} +1 -1
- package/Marketplace/{chunk-NRCXYGO3.js → chunk-JBKHY4HH.js} +5 -5
- package/Marketplace/chunk-JDEKWXPV.js +1 -0
- package/Marketplace/chunk-JFJCXZD3.js +1 -0
- package/Marketplace/chunk-K2H6WANG.js +1 -0
- package/Marketplace/{chunk-HPYTL6TX.js → chunk-KHWTOD6H.js} +1 -1
- package/Marketplace/{chunk-KJHSB4A2.js → chunk-KQOYVGBL.js} +1 -1
- package/Marketplace/chunk-KVP6OL4J.js +2 -0
- package/Marketplace/{chunk-2TZBEYNY.js → chunk-KXZCGKQW.js} +1 -1
- package/Marketplace/chunk-LPXBSHUI.js +180 -0
- package/Marketplace/{chunk-LSXUXG54.js → chunk-M3SJUKTG.js} +1 -1
- package/Marketplace/chunk-MATSRG2L.js +447 -0
- package/Marketplace/{chunk-XEMNZHW6.js → chunk-MNFHFW3E.js} +1 -1
- package/Marketplace/{chunk-5ANFGKBV.js → chunk-NMJGLMWI.js} +1 -1
- package/Marketplace/{chunk-TNKPTRB3.js → chunk-OE2JYQHN.js} +1 -1
- package/Marketplace/{chunk-6MPSYC77.js → chunk-OLSC6KHB.js} +1 -1
- package/Marketplace/chunk-PJ72KMDS.js +1 -0
- package/Marketplace/{chunk-JRWFZQ5K.js → chunk-PPDHTO44.js} +1 -1
- package/Marketplace/chunk-PVUSCHKJ.js +1 -0
- package/Marketplace/chunk-PXB4YEY3.js +1 -0
- package/Marketplace/{chunk-M5IQRAHV.js → chunk-Q2OEJFVT.js} +1 -1
- package/Marketplace/chunk-Q2R4GEW5.js +1 -0
- package/Marketplace/{chunk-6LH7FSOW.js → chunk-Q72ZXPDP.js} +1 -1
- package/Marketplace/{chunk-SXLKJLAE.js → chunk-QCZIDOKW.js} +1 -1
- package/Marketplace/chunk-RBC7ADJF.js +1 -0
- package/Marketplace/chunk-REFJUWLL.js +5 -0
- package/Marketplace/{chunk-FBZW4Y3J.js → chunk-RGR34QZ3.js} +1 -1
- package/Marketplace/{chunk-MQXPOHBV.js → chunk-RIHLYYZU.js} +1 -1
- package/Marketplace/chunk-RIYAYANU.js +1 -0
- package/Marketplace/{chunk-55OI2SUF.js → chunk-RVYGL22E.js} +1 -1
- package/Marketplace/chunk-T5ONJF63.js +7 -0
- package/Marketplace/chunk-T6QOFDEE.js +1 -0
- package/Marketplace/{chunk-HFKKITEW.js → chunk-TMFFA26Y.js} +1 -1
- package/Marketplace/chunk-U5VX6JLT.js +1 -0
- package/Marketplace/{chunk-GHBGGQNM.js → chunk-UBMI3NQH.js} +1 -1
- package/Marketplace/{chunk-5XI7HWS5.js → chunk-V2OJQHE3.js} +2 -2
- package/Marketplace/{chunk-TGMCGROM.js → chunk-V5WYSCVT.js} +1 -1
- package/Marketplace/chunk-VAU6MFH7.js +1 -0
- package/Marketplace/chunk-VETHPEVU.js +1 -0
- package/Marketplace/{chunk-SH7KN2AS.js → chunk-VGXQU74M.js} +1 -1
- package/Marketplace/chunk-VJKFHBPN.js +5 -0
- package/Marketplace/chunk-VSEWXNVC.js +291 -0
- package/Marketplace/{chunk-ZBW2ISZY.js → chunk-VWFLNITX.js} +1 -1
- package/Marketplace/{chunk-OZ77CAJD.js → chunk-WAW37FIG.js} +1 -1
- package/Marketplace/chunk-X3LH2IJE.js +1 -0
- package/Marketplace/chunk-XM6GN4VF.js +1 -0
- package/Marketplace/chunk-YIUQQGOQ.js +1 -0
- package/Marketplace/{chunk-YPVYJUXS.js → chunk-YR2WEZDG.js} +1 -1
- package/Marketplace/{chunk-UPYS4A4M.js → chunk-YXFTLQ5M.js} +1 -1
- package/Marketplace/{chunk-E2CS7ZMC.js → chunk-ZD5LURJS.js} +1 -1
- package/Marketplace/chunk-ZHUHOS5T.js +1 -0
- package/Marketplace/{chunk-WHZ44BAL.js → chunk-ZZVNB72Q.js} +1 -1
- package/Marketplace/index.html +3 -3
- package/Marketplace/main-CCWBPZQH.js +1 -0
- package/Marketplace/{styles-X3FXEB7T.css → styles-NJFTKO3E.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-26ZUWPMS.js +0 -1
- package/Marketplace/chunk-2BUABOHG.js +0 -1
- package/Marketplace/chunk-2SXRC4IG.js +0 -1
- package/Marketplace/chunk-2ZTDLZVZ.js +0 -1
- package/Marketplace/chunk-33IXC6UG.js +0 -1
- package/Marketplace/chunk-42Q6LYIG.js +0 -1
- package/Marketplace/chunk-4PZ5Q3HI.js +0 -1
- package/Marketplace/chunk-54JEYTAI.js +0 -1
- package/Marketplace/chunk-57YWGJWG.js +0 -1
- package/Marketplace/chunk-5B4KSPFM.js +0 -1
- package/Marketplace/chunk-5DIRXS7I.js +0 -1
- package/Marketplace/chunk-5EQNOCXP.js +0 -1
- package/Marketplace/chunk-5QAURMZF.js +0 -222
- package/Marketplace/chunk-66YHNWRR.js +0 -1
- package/Marketplace/chunk-6IFZ2TO6.js +0 -1
- package/Marketplace/chunk-6IOVMVRS.js +0 -5
- package/Marketplace/chunk-6L2THCHF.js +0 -1
- package/Marketplace/chunk-6RJV6M56.js +0 -1
- package/Marketplace/chunk-7P65ADBU.js +0 -1
- package/Marketplace/chunk-A4F37V57.js +0 -1
- package/Marketplace/chunk-AFSORQR4.js +0 -4
- package/Marketplace/chunk-AGRVVEIR.js +0 -397
- package/Marketplace/chunk-ALKC77XL.js +0 -78
- package/Marketplace/chunk-AS2UDXSX.js +0 -5
- package/Marketplace/chunk-AVEGIEYT.js +0 -193
- package/Marketplace/chunk-AYATC6J5.js +0 -1
- package/Marketplace/chunk-B46KV6AB.js +0 -1
- package/Marketplace/chunk-BQTUAYGY.js +0 -1
- package/Marketplace/chunk-BVLV6UAF.js +0 -1
- package/Marketplace/chunk-BXFJ3LAT.js +0 -1
- package/Marketplace/chunk-CEQA4PTY.js +0 -1
- package/Marketplace/chunk-CMZW5QAE.js +0 -1
- package/Marketplace/chunk-CSSG7NAJ.js +0 -1
- package/Marketplace/chunk-CZ2CQU4Q.js +0 -1
- package/Marketplace/chunk-CZOD43PN.js +0 -1
- package/Marketplace/chunk-DBHTTLSK.js +0 -1
- package/Marketplace/chunk-DJILLV4M.js +0 -1
- package/Marketplace/chunk-DVX3M74S.js +0 -1
- package/Marketplace/chunk-EL3GM6CV.js +0 -1
- package/Marketplace/chunk-EU2KAMEK.js +0 -1
- package/Marketplace/chunk-F4GMWHYJ.js +0 -33
- package/Marketplace/chunk-FFAZ3Q3F.js +0 -1
- package/Marketplace/chunk-FSJSQVUK.js +0 -1
- package/Marketplace/chunk-GCECFUOP.js +0 -1
- package/Marketplace/chunk-GOS4RIF2.js +0 -1
- package/Marketplace/chunk-GPVSWXHS.js +0 -1
- package/Marketplace/chunk-GZXQUJKX.js +0 -1
- package/Marketplace/chunk-HNVG4QKG.js +0 -1
- package/Marketplace/chunk-HTQJCQ32.js +0 -1
- package/Marketplace/chunk-HZFWCHSY.js +0 -1
- package/Marketplace/chunk-I3LFKNW4.js +0 -3
- package/Marketplace/chunk-IL4YQGTS.js +0 -1
- package/Marketplace/chunk-IUI6TA5K.js +0 -2
- package/Marketplace/chunk-JS55A2RS.js +0 -7
- package/Marketplace/chunk-JV4MMNGD.js +0 -79
- package/Marketplace/chunk-K6YEZYU4.js +0 -5
- package/Marketplace/chunk-KOKHDU4I.js +0 -1
- package/Marketplace/chunk-KWQS4KX7.js +0 -1
- package/Marketplace/chunk-KXS76PRS.js +0 -70
- package/Marketplace/chunk-KYIY3VQ6.js +0 -141
- package/Marketplace/chunk-LR4UZ2OS.js +0 -30
- package/Marketplace/chunk-LWSRD5LF.js +0 -1
- package/Marketplace/chunk-M3OOU4DF.js +0 -1
- package/Marketplace/chunk-M7ZBU4PP.js +0 -1
- package/Marketplace/chunk-MTUIRWOB.js +0 -2
- package/Marketplace/chunk-MYLIBJND.js +0 -2
- package/Marketplace/chunk-MZI5AYCE.js +0 -1
- package/Marketplace/chunk-NJFNMUFH.js +0 -1
- package/Marketplace/chunk-NTW6FBP5.js +0 -1
- package/Marketplace/chunk-NZA4BEER.js +0 -102
- package/Marketplace/chunk-O55KM5KY.js +0 -1
- package/Marketplace/chunk-OZ7LWNOK.js +0 -15
- package/Marketplace/chunk-PE5AFID4.js +0 -1
- package/Marketplace/chunk-PEA6KVUS.js +0 -252
- package/Marketplace/chunk-PW42BQIY.js +0 -1
- package/Marketplace/chunk-REL734JM.js +0 -1
- package/Marketplace/chunk-SD7M7HOB.js +0 -1
- package/Marketplace/chunk-SLQA5QBT.js +0 -1
- package/Marketplace/chunk-SQINA5SO.js +0 -1
- package/Marketplace/chunk-TDIZT7CR.js +0 -265
- package/Marketplace/chunk-U42BDUJ6.js +0 -15
- package/Marketplace/chunk-UAVYFLCM.js +0 -1
- package/Marketplace/chunk-UF4FKEE7.js +0 -93
- package/Marketplace/chunk-UGAQVMUE.js +0 -1
- package/Marketplace/chunk-UJYSVGLV.js +0 -1
- package/Marketplace/chunk-UT7K3K63.js +0 -1
- package/Marketplace/chunk-VRI3CYGG.js +0 -1
- package/Marketplace/chunk-WCY4XEUN.js +0 -1
- package/Marketplace/chunk-XFFZDBGC.js +0 -1
- package/Marketplace/chunk-XIYHWVQR.js +0 -1
- package/Marketplace/chunk-YISSSY6C.js +0 -1
- package/Marketplace/chunk-YZ74HE2T.js +0 -1
- package/Marketplace/chunk-Z3ITXK3D.js +0 -1
- package/Marketplace/chunk-ZAVDOMSW.js +0 -1
- package/Marketplace/chunk-ZKPIENCH.js +0 -1
- package/Marketplace/chunk-ZMVP6H6B.js +0 -1
- package/Marketplace/chunk-ZNDU44GH.js +0 -51
- package/Marketplace/chunk-ZOJYBTIP.js +0 -1
- package/Marketplace/main-B54MN6EI.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as _}from"./chunk-K6YEZYU4.js";import"./chunk-R76V3PTN.js";import"./chunk-6LH7FSOW.js";import"./chunk-XEMNZHW6.js";import"./chunk-WHZ44BAL.js";import"./chunk-LHD7CYML.js";import"./chunk-DJILLV4M.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SDUUFQUI.js";import"./chunk-3RK6DDJD.js";import"./chunk-MQXPOHBV.js";import"./chunk-M5IQRAHV.js";import{a as R}from"./chunk-NJFNMUFH.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import"./chunk-I3LFKNW4.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CMZW5QAE.js";import{e as he}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import{a as ue,b as ye}from"./chunk-TNKPTRB3.js";import"./chunk-HPYTL6TX.js";import{c as d}from"./chunk-PW42BQIY.js";import{m as w,n as ge}from"./chunk-6X2OBNJQ.js";import{z as fe}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import"./chunk-UJYSVGLV.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{F as pe,H as de,J as ce,f as ae,g as F,j as le,k as P,m as me,n as se}from"./chunk-MTUIRWOB.js";import{$c as k,Gb as T,Gc as p,Hb as Z,Hc as j,Ic as J,Kc as y,Lc as g,Mb as h,Mc as C,Oa as V,Rc as re,Wc as oe,Yb as m,Z as Q,ac as $,ad as B,dc as H,ea as z,ec as ee,gc as te,hc as ie,ic as r,ja as q,jc as a,ka as X,kc as v,nc as ne,oa as Y,pb as G,rb as l,rd as U,tc as b,uc as u,xb as f,xc as K}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ce=(()=>{class n{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/order/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/order/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/order/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/order/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/order/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/order/void-invoice"},{Title:"All",Url:"/menu/sync-log/order/all"}]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-order"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),v(3,"nav-tab",2),a()()(),v(4,"router-outlet")),i&2&&(l(3),m("Tabs",t.reportTabs))},dependencies:[ue,pe],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]})}}return n})();var S=class{};var I=(()=>{class n{constructor(e){this.http=e}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(e){return new Promise((i,t)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/CreateInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncVoidInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/Void",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncConvertInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/ConvertToInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncDelivery(e){return new Promise((i,t)=>{this.http.post("/api/Report/Delivery",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncPayment(e){return new Promise((i,t)=>{this.http.post("/api/Report/Payment",JSON.stringify(e)).subscribe(s=>{i(s)})})}getAllReport(e){return this.http.post("/api/Report/all",JSON.stringify(e))}static{this.\u0275fac=function(i){return new(i||n)(Y(he))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var O=function(n){return n[n.OK=200]="OK",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.CONFLICT=409]="CONFLICT",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n}(O||{});var De=()=>["/menu/log/order"],Ee=(n,c,e,i,t)=>({responseCode:n,From:c,to:e,actionType:i,ChannelID:t});function Oe(n,c){if(n&1&&(r(0,"th",6)(1,"div",7)(2,"h4"),p(3),a(),r(4,"small",8),p(5),a()()()),n&2){let e=c.$implicit,i=u();l(3),j(e),l(),$(i.getTextBgColor(e)),l(),j(i.getHeaderStatusDesc(e))}}function Re(n,c){if(n&1&&(r(0,"a",12),p(1),k(2,"number"),a()),n&2){let e=u().$implicit,i=u().$implicit,t=u();m("routerLink",re(5,De))("queryParams",oe(6,Ee,e.Key,t.fromQueryParam,t.toQueryParam,t.type,i.ChannelID)),l(),J(" ",B(2,3,e.Value)," ")}}function Le(n,c){n&1&&(r(0,"span",13),p(1,"-"),a())}function xe(n,c){if(n&1&&(r(0,"td",11),h(1,Re,3,12,"a",12)(2,Le,2,0,"span",13),a()),n&2){let e=c.$implicit;l(),H(e.Value?1:2)}}function Me(n,c){if(n&1&&(r(0,"tr")(1,"td")(2,"a",9),v(3,"img",10),a()(),r(4,"td")(5,"div")(6,"a",9),p(7),a()(),r(8,"div"),p(9),a()(),te(10,xe,3,1,"td",11,ee),a()),n&2){let e=c.$implicit,i=u();l(2),K("href",e.Url,G),l(),m("src",i.getChannelLogo(e.Type),G),l(3),K("href",e.Url,G),l(),j(e.Name),l(2),j(e.Url),l(),ie(e.list)}}function ke(n,c){if(n&1&&(r(0,"td",11)(1,"div",17),p(2),k(3,"number"),a()()),n&2){let e=c.$implicit;l(2),J(" ",B(3,1,e.total)," ")}}function Be(n,c){if(n&1&&(r(0,"tfoot")(1,"tr")(2,"td",14)(3,"div",15),p(4,"Total"),a()(),h(5,ke,4,3,"td",16),a()()),n&2){let e=u();l(5),m("ngForOf",e.logsCalculation())}}var D=(()=>{class n{constructor(){this.header=V(),this.result=V(),this.orderedHeader=U(()=>this.header().sort((e,i)=>e-i)),this.logsOrdered=U(()=>{let e=this.result();return e=e.map(i=>(this.orderedHeader().forEach(t=>{i.list.findIndex(o=>o.Key===t)===-1&&i.list.push({Key:t,Value:0}),i.list.sort((o,A)=>o.Key-A.Key)}),i)),e}),this.logsCalculation=U(()=>{let e=this.concatStatusCode(),i=[];return this.orderedHeader().forEach(t=>{let o=e.filter(A=>A.Key===t).reduce((A,we)=>A+we.Value,0);i.push({status:t,total:o})}),i}),this.type=null,this.headerStatus=O,this.listCalculationStatusCode=[]}set from(e){e&&(this.fromQueryParam=new Date(e).toJSON().toString())}set to(e){e&&(this.toQueryParam=new Date(e).toJSON().toString())}getHeaderStatusDesc(e){let i=null;switch(e){case O.BAD_REQUEST:i="BAD REQUEST";break;case O.CONFLICT:i="CONFLICT";break;case O.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case O.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case O.OK:i="bg-success";break;case O.INTERNAL_SERVER_ERROR:i="bg-danger";break;default:i="bg-warning";break}return i}getChannelLogo(e){return d.getChannelLogoByTypeId(e)}concatStatusCode(){return this.logsOrdered().map(e=>e.list).reduce((e,i)=>[...e,...i],[])}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-table-report"]],inputs:{header:[1,"header"],result:[1,"result"],from:"from",to:"to",type:"type"},standalone:!1,decls:10,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"h3","fw-bold","ms-1"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(i,t){i&1&&(r(0,"table",0)(1,"thead",1)(2,"tr"),v(3,"th",2),r(4,"th",3),p(5,"Channel"),a(),h(6,Oe,6,4,"th",4),a()(),r(7,"tbody"),h(8,Me,12,5,"tr",5),a(),h(9,Be,6,1,"tfoot"),a()),i&2&&(l(6),m("ngForOf",t.orderedHeader()),l(2),m("ngForOf",t.logsOrdered()),l(),H(t.logsCalculation().length>0?9:-1))},dependencies:[ae,de,me],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]})}}return n})();function Ne(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",0)}}var ve=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.pageTitle="New Order";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-sales-order"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.getChannelLogs()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ne,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function We(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Te=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,We,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ae(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",3)}}var _e=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S;let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-delivery"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div",1)(3,"label",2),p(4,"From/To"),a(),r(5,"div",3)(6,"datepicker",4),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",5),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",6),h(11,Ae,3,5,"div",7),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function je(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",4)}}var Se=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Completed";let t=new Date;this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-payment"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,je,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ge(n,c){n&1&&ne(0)}function Ue(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=c.ngIf,i=u();l(2),m("result",e.Body)("header",e.Header)("from",i.filter==null?null:i.filter.From)("to",i.filter==null?null:i.filter.To)}}var be=(()=>{class n{constructor(e,i){this.reportOrderService=e,this.datePipe=i,this.filter=new S}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let e=new Date;this.minDate=d.addDays(e,6),this.filter.From=e,this.filter.To=e,this.updatePageTitle()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${e==null?"":i+"-"} ${t})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe(z(e=>{this.filter=e,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe(Q())}onFilter(){this.updatePageTitle(),this.initData()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-all"]],standalone:!1,decls:15,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ge,1,0,"ng-container",6),k(12,"async"),h(13,Ue,3,4,"div",7),k(14,"async"),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",B(12,6,t.pageLoader$)),l(2),m("ngIf",B(14,8,t.reportData$)))},dependencies:[F,w,_,D,le],encapsulation:2})}}return n})();function Ve(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Fe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Convert Sales Order To Invoice";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Convert Sales Order To Invoice (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-convert-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ve,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function He(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Pe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-void-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,He,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();var Ke=[{path:"",component:Ce,children:[{path:"",redirectTo:"all",pathMatch:"full"},{path:"sync-order",component:ve,canActivate:[R],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:Fe,canActivate:[R],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:Te,canActivate:[R],data:{title:"Sync Invoice"}},{path:"delivery",component:_e,canActivate:[R],data:{title:"Sync Delivery"}},{path:"payment",component:Se,canActivate:[R],data:{title:"Sync Payment"}},{path:"void-invoice",component:Pe,canActivate:[R],data:{title:"Sync void invoice"}},{path:"all",component:be,canActivate:[R],data:{title:"All Report"}}]}],Gt=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Z({type:n})}static{this.\u0275inj=X({imports:[se,ye,fe,ge,_,ce.forChild(Ke)]})}}return n})();export{Gt as OrderModule};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import{a as y}from"./chunk-VRI3CYGG.js";import{ba as g,ja as o}from"./chunk-AVEGIEYT.js";import{n as m}from"./chunk-MTUIRWOB.js";import{Ca as i,Gb as s,Hb as b,Kb as c,Qc as v,_b as u,ja as p,ka as r,pa as f,vc as d,wc as h}from"./chunk-JS55A2RS.js";var $=["*"],x=({dt:l})=>`
|
|
2
|
-
.p-floatlabel {
|
|
3
|
-
display: block;
|
|
4
|
-
position: relative;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.p-floatlabel label {
|
|
8
|
-
position: absolute;
|
|
9
|
-
pointer-events: none;
|
|
10
|
-
top: 50%;
|
|
11
|
-
transform: translateY(-50%);
|
|
12
|
-
transition-property: all;
|
|
13
|
-
transition-timing-function: ease;
|
|
14
|
-
line-height: 1;
|
|
15
|
-
font-weight: ${l("floatlabel.font.weight")};
|
|
16
|
-
inset-inline-start: ${l("floatlabel.position.x")};
|
|
17
|
-
color: ${l("floatlabel.color")};
|
|
18
|
-
transition-duration: ${l("floatlabel.transition.duration")};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.p-floatlabel:has(.p-textarea) label {
|
|
22
|
-
top: ${l("floatlabel.position.y")};
|
|
23
|
-
transform: translateY(0);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.p-floatlabel:has(.p-inputicon:first-child) label {
|
|
27
|
-
inset-inline-start: calc((${l("form.field.padding.x")} * 2) + ${l("icon.size")});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.p-floatlabel:has(.ng-invalid.ng-dirty) label {
|
|
31
|
-
color: ${l("floatlabel.invalid.color")};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.p-floatlabel:has(input:focus) label,
|
|
35
|
-
.p-floatlabel:has(input.p-filled) label,
|
|
36
|
-
.p-floatlabel:has(input:-webkit-autofill) label,
|
|
37
|
-
.p-floatlabel:has(textarea:focus) label,
|
|
38
|
-
.p-floatlabel:has(textarea.p-filled) label,
|
|
39
|
-
.p-floatlabel:has(.p-inputwrapper-focus) label,
|
|
40
|
-
.p-floatlabel:has(.p-inputwrapper-filled) label {
|
|
41
|
-
top: ${l("floatlabel.over.active.top")};
|
|
42
|
-
transform: translateY(0);
|
|
43
|
-
font-size: ${l("floatlabel.active.font.size")};
|
|
44
|
-
font-weight: ${l("floatlabel.label.active.font.weight")};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.p-floatlabel:has(input.p-filled) label,
|
|
48
|
-
.p-floatlabel:has(textarea.p-filled) label,
|
|
49
|
-
.p-floatlabel:has(.p-inputwrapper-filled) label {
|
|
50
|
-
color: ${l("floatlabel.active.color")};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.p-floatlabel:has(input:focus) label,
|
|
54
|
-
.p-floatlabel:has(input:-webkit-autofill) label,
|
|
55
|
-
.p-floatlabel:has(textarea:focus) label,
|
|
56
|
-
.p-floatlabel:has(.p-inputwrapper-focus) label {
|
|
57
|
-
color: ${l("floatlabel.focus.color")};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.p-floatlabel-in .p-inputtext,
|
|
61
|
-
.p-floatlabel-in .p-textarea,
|
|
62
|
-
.p-floatlabel-in .p-select-label,
|
|
63
|
-
.p-floatlabel-in .p-multiselect-label-container,
|
|
64
|
-
.p-floatlabel-in .p-autocomplete-input-multiple,
|
|
65
|
-
.p-floatlabel-in .p-cascadeselect-label,
|
|
66
|
-
.p-floatlabel-in .p-treeselect-label {
|
|
67
|
-
padding-top: ${l("floatlabel.in.input.padding.top")};
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.p-floatlabel-in:has(input:focus) label,
|
|
71
|
-
.p-floatlabel-in:has(input.p-filled) label,
|
|
72
|
-
.p-floatlabel-in:has(input:-webkit-autofill) label,
|
|
73
|
-
.p-floatlabel-in:has(textarea:focus) label,
|
|
74
|
-
.p-floatlabel-in:has(textarea.p-filled) label,
|
|
75
|
-
.p-floatlabel-in:has(.p-inputwrapper-focus) label,
|
|
76
|
-
.p-floatlabel-in:has(.p-inputwrapper-filled) label {
|
|
77
|
-
top: ${l("floatlabel.in.active.top")};
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.p-floatlabel-on:has(input:focus) label,
|
|
81
|
-
.p-floatlabel-on:has(input.p-filled) label,
|
|
82
|
-
.p-floatlabel-on:has(input:-webkit-autofill) label,
|
|
83
|
-
.p-floatlabel-on:has(textarea:focus) label,
|
|
84
|
-
.p-floatlabel-on:has(textarea.p-filled) label,
|
|
85
|
-
.p-floatlabel-on:has(.p-inputwrapper-focus) label,
|
|
86
|
-
.p-floatlabel-on:has(.p-inputwrapper-filled) label {
|
|
87
|
-
top: 0;
|
|
88
|
-
transform: translateY(-50%);
|
|
89
|
-
border-radius: ${l("floatlabel.on.border.radius")};
|
|
90
|
-
background: ${l("floatlabel.on.active.background")};
|
|
91
|
-
padding: ${l("floatlabel.on.active.padding")};
|
|
92
|
-
}
|
|
93
|
-
`,F={root:({instance:l,props:n})=>["p-floatlabel",{"p-floatlabel-over":n.variant==="over","p-floatlabel-on":n.variant==="on","p-floatlabel-in":n.variant==="in"}]},w=(()=>{class l extends g{name="floatlabel";theme=x;classes=F;static \u0275fac=(()=>{let a;return function(e){return(a||(a=i(l)))(e||l)}})();static \u0275prov=p({token:l,factory:l.\u0275fac})}return l})();var M=(()=>{class l extends y{_componentStyle=f(w);variant="over";static \u0275fac=(()=>{let a;return function(e){return(a||(a=i(l)))(e||l)}})();static \u0275cmp=s({type:l,selectors:[["p-floatlabel"],["p-floatLabel"],["p-float-label"]],hostVars:8,hostBindings:function(t,e){t&2&&u("p-floatlabel",!0)("p-floatlabel-over",e.variant==="over")("p-floatlabel-on",e.variant==="on")("p-floatlabel-in",e.variant==="in")},inputs:{variant:"variant"},features:[v([w]),c],ngContentSelectors:$,decls:1,vars:0,template:function(t,e){t&1&&(d(),h(0))},dependencies:[m,o],encapsulation:2,changeDetection:0})}return l})(),V=(()=>{class l{static \u0275fac=function(t){return new(t||l)};static \u0275mod=b({type:l});static \u0275inj=r({imports:[M,o,o]})}return l})();export{M as a,V as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as E}from"./chunk-FWG4H3QG.js";import{a as T}from"./chunk-JOBWFOGC.js";import{i as w}from"./chunk-I3LFKNW4.js";import{a as D}from"./chunk-CMZW5QAE.js";import{b as j,e as s}from"./chunk-4M63ID5T.js";import{b as i,c as m}from"./chunk-PW42BQIY.js";import{G as C}from"./chunk-MTUIRWOB.js";import{B as A,G as U,J as u,Ra as I,g as k,ja as p,pa as a,q as d,v as b}from"./chunk-JS55A2RS.js";var F=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/shopee/GetAttributesTree",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/shopee/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){return t.map(e=>({attribute_id:e.attribute_id,attribute_value_list:e.attribute_value_list.map(o=>({value_id:o.value_id,name:o.name}))})),t}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var x=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tiktok/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){let e;return t.map(o=>(o.type=="PRODUCT_PROPERTY"?e={id:o.id,name:o.name,type:o.type,values:o.values}:e={id:o.id,name:o.values[0].id,type:o.type},e))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var H=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/lazada/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/lazada/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var z=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/woo/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/woo/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var g=class{};var v=class{};var R=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tokopedia/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var G=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post("api/product/shopify/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var O=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post(D.UploadPlugoProduct,t).pipe(u(e=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Vt=(()=>{class r{constructor(){this.authService=a(w),this.productService=a(T),this.shoppeUploadService=a(F),this.tiktokUploadService=a(x),this.lazadaUploadService=a(H),this.tokopediaUploadService=a(R),this.wooUploadService=a(z),this.shopifyUploadService=a(G),this.plugoUploadService=a(O),this.toastrHandlingService=a(E),this.toastr=a(j),this.router=a(C),this.httpService=a(s),this._selectedProduct=new k(this.getStoredProducts()),this.selectedProduct$=this._selectedProduct.asObservable().pipe(U(t=>t&&t.length>0))}getStoredProducts(){let t=localStorage.getItem("productsUpload");if(t){let e=JSON.parse(t);return e&&e.length>0?e:[]}else return[]}setSelectedProduct(t){localStorage.setItem("productsUpload",JSON.stringify(t)),this._selectedProduct.next(t)}clearSelectedProduct(){localStorage.removeItem("productsUpload"),this._selectedProduct.next([])}getUnselectedChannels(){let t=this.authService.getChannels(),e=this._selectedProduct.getValue();return this.productService.filterUnselectedChannel(e,t)}getDefaultCategory(){return this.httpService.get("api/v1/Channel/ProductCategory/Default")}get channelProductUpload(){let t=this.getUnselectedChannels();return I(t.map(o=>{let c=new g;return c.id=o.ID,c.name=o.Name,c.type=o.TypeID,c.categoryId=null,c.attributes=[],c.selected=!1,c}))}onUploadProduct(t){let e=t.filter(o=>o.selected&&m.IsNotEmpty(o.categoryId)||o.selected&&(o.type==i.Shopify||o.type==i.Plugo));if(e.length>0){let o=this.generateDataForUpload(e);this.uploadProduct(o)}else this.toastr.warning("Please select a channel and category to upload the product.","Warning!")}uploadProduct(t){let e=this.generateObservableForUpload(t);A(e).pipe(b(o=>{let c=[];return o.forEach(f=>{c=[...c,...f]}),c})).subscribe({next:(o=[])=>{m.IsNotEmpty(o)&&this.toastrHandlingService.showToastrUploadMultiple(o),this.hasSuccessRes(o)&&this.onSuccessUpload()}})}hasSuccessRes(t){let e=!1;return t.forEach(o=>{o?.Response.Success_list?.length>0&&m.IsNotEmpty(o)&&(e=!0)}),e}onSuccessUpload(){this.router.navigate(["/menu/products/status/sold-in-channel"]),this.clearSelectedProduct()}generateObservableForUpload(t){let e=[],o=[],c=[],f=[],S=[],y=[],P=[];t.forEach(l=>{switch(l.ChannelType){case i.Shopee:o.push(l);break;case i.Tiktok:e.push(l);break;case i.Lazada:c.push(l);break;case i.Tokopedia:f.push(l);break;case i.WooCommerce:S.push(l);break;case i.Shopify:y.push(l);break;case i.Plugo:P.push(l);break}});let n=[];return[{type:i.Shopee,data:o},{type:i.Tiktok,data:e},{type:i.Lazada,data:c},{type:i.Tokopedia,data:f},{type:i.WooCommerce,data:S},{type:i.Shopify,data:y},{type:i.Plugo,data:P}].filter(l=>l.data.length>0).forEach(l=>{switch(l.type){case i.Shopee:n.push(this.shoppeUploadService.uploadProduct(o));break;case i.Tiktok:n.push(this.tiktokUploadService.uploadProduct(e));break;case i.Lazada:n.push(this.lazadaUploadService.uploadProduct(c));break;case i.Tokopedia:n.push(this.tokopediaUploadService.uploadProduct(f));break;case i.WooCommerce:n.push(this.wooUploadService.uploadProduct(S));break;case i.Shopify:n.push(this.shopifyUploadService.uploadProduct(y));break;case i.Plugo:n.push(this.plugoUploadService.uploadProduct(P));break}}),n}generateDataForUpload(t){let e=[];return t.forEach(o=>{let c=new v;c.ChannelID=o.id,c.ChannelType=o.type,c.Products=this._selectedProduct.getValue(),o.type==i.Shopify?delete c.CategoryID:c.CategoryID=o.categoryId,o.type==i.WooCommerce||o.type==i.Shopify?c.Attribute=o.attributes[0]:c.Attributes=this.formatAttributes(o.type,o.attributes),e.push(c)}),e}formatAttributes(t,e){let o;switch(t){case i.Shopee:o=this.shoppeUploadService.generateAttribute(e);break;case i.Tiktok:o=this.tiktokUploadService.generateAttribute(e);break;case i.WooCommerce:o=this.tiktokUploadService.generateAttribute(e);break;case i.Tokopedia:o=e;break;case i.Shopify:o=e;break;default:o=[];break}return o}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{F as a,x as b,H as c,z as d,Vt as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{G as Z}from"./chunk-MTUIRWOB.js";import{B as b,F as I,Hb as q,Ib as Q,J as M,Ka as C,O as H,R as G,T as P,_ as z,aa as F,ea as j,g as l,ja as m,jd as X,ka as L,ma as v,oa as u,p as d,pa as f,q as a,tb as J,v as y,x as g,xa as K,y as w,zb as Y}from"./chunk-JS55A2RS.js";import{a as c,b as x}from"./chunk-66YHNWRR.js";var O={REMOVE:"remove",SHOW:"show"},ee=(()=>{class t{constructor(){this.strategiesSource=new l({}),this.strategies$=this.strategiesSource.asObservable()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})(),N=new v("USE_CONFIGURATION_STORE"),k=(()=>{class t{constructor(e=!1,i){this.isolate=e,this.configurationStore=i,this.strategiesSource=this.isolate?new l({}):this.configurationStore.strategiesSource,this.strategies$=this.strategiesSource.asObservable(),this.onAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onAuthorisedDefaultStrategy,this.onUnAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onUnAuthorisedDefaultStrategy}setDefaultOnAuthorizedStrategy(e){this.isolate?this.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onAuthorisedDefaultStrategy=this.configurationStore.onAuthorisedDefaultStrategy)}setDefaultOnUnauthorizedStrategy(e){this.isolate?this.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onUnAuthorisedDefaultStrategy=this.configurationStore.onUnAuthorisedDefaultStrategy)}addPermissionStrategy(e,i){this.strategiesSource.value[e]=i}getStrategy(e){return this.strategiesSource.value[e]}getAllStrategies(){return this.strategiesSource.value}getDefinedStrategy(e){if(this.strategiesSource.value[e]||this.isPredefinedStrategy(e))return e;throw new Error(`No ' ${e} ' strategy is found please define one`)}isPredefinedStrategy(e){return e===O.SHOW||e===O.REMOVE}static{this.\u0275fac=function(i){return new(i||t)(u(N),u(ee))}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})();function h(t){return typeof t=="function"}function V(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;{let W=Object.getPrototypeOf(t);return W===null||W===Object.prototype}}function ie(t){return!!t&&typeof t=="string"}function A(t){return typeof t=="boolean"}function te(t){return Object.prototype.toString.call(t)==="[object Promise]"}function E(t){return Array.isArray(t)?t.length>0:!!t}function T(t){return ie(t)?[t]:t}var se=(()=>{class t{constructor(){this.permissionsSource=new l({}),this.permissions$=this.permissionsSource.asObservable()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})(),B=new v("USE_PERMISSIONS_STORE"),S=(()=>{class t{constructor(e=!1,i){this.isolate=e,this.permissionsStore=i,this.permissionsSource=this.isolate?new l({}):this.permissionsStore.permissionsSource,this.permissions$=this.permissionsSource.asObservable()}flushPermissions(){this.permissionsSource.next({})}hasPermission(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=T(e),this.hasArrayPermission(e))}loadPermissions(e,i){let s=e.reduce((n,r)=>this.reducePermission(n,r,i),{});this.permissionsSource.next(s)}addPermission(e,i){if(Array.isArray(e)){let s=e.reduce((n,r)=>this.reducePermission(n,r,i),this.permissionsSource.value);this.permissionsSource.next(s)}else{let s=this.reducePermission(this.permissionsSource.value,e,i);this.permissionsSource.next(s)}}removePermission(e){let i=c({},this.permissionsSource.value);delete i[e],this.permissionsSource.next(i)}getPermission(e){return this.permissionsSource.value[e]}getPermissions(){return this.permissionsSource.value}reducePermission(e,i,s){return s&&h(s)?x(c({},e),{[i]:{name:i,validationFunction:s}}):x(c({},e),{[i]:{name:i}})}hasArrayPermission(e){let i=e.map(s=>{if(this.hasPermissionValidationFunction(s)){let n=this.permissionsSource.value[s].validationFunction,r=c({},this.permissionsSource.value);return a(null).pipe(y(()=>n(s,r)),F(o=>A(o)?a(o):o),M(()=>a(!1)))}return a(!!this.permissionsSource.value[s])});return d(i).pipe(w(),P(s=>s!==!1,!1),y(s=>s!==!1)).toPromise().then(s=>s)}hasPermissionValidationFunction(e){return!!this.permissionsSource.value[e]&&!!this.permissionsSource.value[e].validationFunction&&h(this.permissionsSource.value[e].validationFunction)}static{this.\u0275fac=function(i){return new(i||t)(u(B),u(se))}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})(),R=class{constructor(){this.rolesSource=new l({}),this.roles$=this.rolesSource.asObservable()}},$=new v("USE_ROLES_STORE"),D=(()=>{class t{constructor(e=!1,i,s){this.isolate=e,this.rolesStore=i,this.permissionsService=s,this.rolesSource=this.isolate?new l({}):this.rolesStore.rolesSource,this.roles$=this.rolesSource.asObservable()}addRole(e,i){let s=x(c({},this.rolesSource.value),{[e]:{name:e,validationFunction:i}});this.rolesSource.next(s)}addRoleWithPermissions(e,i){this.permissionsService.addPermission(i),this.addRole(e,i)}addRoles(e){Object.keys(e).forEach((i,s)=>{this.addRole(i,e[i])})}addRolesWithPermissions(e){Object.keys(e).forEach((i,s)=>{this.addRoleWithPermissions(i,e[i])})}flushRoles(){this.rolesSource.next({})}flushRolesAndPermissions(){this.flushRoles(),this.permissionsService.flushPermissions()}removeRole(e){let i=c({},this.rolesSource.value);delete i[e],this.rolesSource.next(i)}getRoles(){return this.rolesSource.value}getRole(e){return this.rolesSource.value[e]}hasOnlyRoles(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=T(e),Promise.all([this.hasRoleKey(e),this.hasRolePermission(this.rolesSource.value,e)]).then(([s,n])=>s||n))}hasRoleKey(e){let i=e.map(s=>{if(!!this.rolesSource.value[s]&&!!this.rolesSource.value[s].validationFunction&&h(this.rolesSource.value[s].validationFunction)&&!te(this.rolesSource.value[s].validationFunction)){let r=this.rolesSource.value[s].validationFunction,o=c({},this.rolesSource.value);return a(null).pipe(y(()=>r(s,o)),F(p=>A(p)?a(p):p),M(()=>a(!1)))}return a(!1)});return d(i).pipe(w(),P(s=>s!==!1,!1),y(s=>s!==!1)).toPromise().then(s=>s)}hasRolePermission(e,i){return d(i).pipe(g(s=>e[s]&&Array.isArray(e[s].validationFunction)?d(e[s].validationFunction).pipe(g(n=>this.permissionsService.hasPermission(n)),G(n=>n===!0)):a(!1)),P(s=>s===!0,!1)).toPromise()}static{this.\u0275fac=function(i){return new(i||t)(u($),u(R),u(S))}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})(),Pe=(()=>{class t{constructor(){this.permissionsAuthorized=new C,this.permissionsUnauthorized=new C,this.firstMergeUnusedRun=1,this.permissionsService=f(S),this.configurationService=f(k),this.rolesService=f(D),this.viewContainer=f(Y),this.changeDetector=f(X),this.templateRef=f(J)}ngOnInit(){this.viewContainer.clear(),this.initPermissionSubscription=this.validateExceptOnlyPermissions()}ngOnChanges(e){let i=e.ngxPermissionsOnly,s=e.ngxPermissionsExcept;if(i||s){if(i&&i.firstChange||s&&s.firstChange)return;I(this.permissionsService.permissions$,this.rolesService.roles$).pipe(z(this.firstMergeUnusedRun),H(1)).subscribe(()=>{if(E(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(E(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}}ngOnDestroy(){this.initPermissionSubscription&&this.initPermissionSubscription.unsubscribe()}validateExceptOnlyPermissions(){return I(this.permissionsService.permissions$,this.rolesService.roles$).pipe(z(this.firstMergeUnusedRun)).subscribe(()=>{if(E(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(E(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}validateExceptAndOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsExcept),this.rolesService.hasOnlyRoles(this.ngxPermissionsExcept)]).then(([e,i])=>{if(e||i){this.handleUnauthorisedPermission(this.ngxPermissionsExceptElse||this.ngxPermissionsElse);return}if(this.ngxPermissionsOnly)throw!1;this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)}).catch(()=>{this.ngxPermissionsOnly?this.validateOnlyPermissions():this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)})}validateOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsOnly),this.rolesService.hasOnlyRoles(this.ngxPermissionsOnly)]).then(([e,i])=>{e||i?this.handleAuthorisedPermission(this.ngxPermissionsOnlyThen||this.ngxPermissionsThen||this.templateRef):this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)}).catch(()=>{this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)})}handleUnauthorisedPermission(e){if(!(A(this.currentAuthorizedState)&&!this.currentAuthorizedState)){if(this.currentAuthorizedState=!1,this.permissionsUnauthorized.emit(),this.getUnAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getUnAuthorizedStrategyInput());return}this.configurationService.onUnAuthorisedDefaultStrategy&&!this.elseBlockDefined()?this.applyStrategy(this.configurationService.onUnAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}handleAuthorisedPermission(e){if(!(A(this.currentAuthorizedState)&&this.currentAuthorizedState)){if(this.currentAuthorizedState=!0,this.permissionsAuthorized.emit(),this.getAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getAuthorizedStrategyInput());return}this.configurationService.onAuthorisedDefaultStrategy&&!this.thenBlockDefined()?this.applyStrategy(this.configurationService.onAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}applyStrategyAccordingToStrategyType(e){if(ie(e)){this.applyStrategy(e);return}if(h(e)){this.showTemplateBlockInView(this.templateRef),e(this.templateRef);return}}showTemplateBlockInView(e){this.viewContainer.clear(),e&&(this.viewContainer.createEmbeddedView(e),this.changeDetector.markForCheck())}getAuthorisedTemplates(){return this.ngxPermissionsOnlyThen||this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef}elseBlockDefined(){return!!this.ngxPermissionsExceptElse||!!this.ngxPermissionsElse}thenBlockDefined(){return!!this.ngxPermissionsExceptThen||!!this.ngxPermissionsThen}getAuthorizedStrategyInput(){return this.ngxPermissionsOnlyAuthorisedStrategy||this.ngxPermissionsExceptAuthorisedStrategy||this.ngxPermissionsAuthorisedStrategy}getUnAuthorizedStrategyInput(){return this.ngxPermissionsOnlyUnauthorisedStrategy||this.ngxPermissionsExceptUnauthorisedStrategy||this.ngxPermissionsUnauthorisedStrategy}applyStrategy(e){if(e===O.SHOW){this.showTemplateBlockInView(this.templateRef);return}if(e===O.REMOVE){this.viewContainer.clear();return}let i=this.configurationService.getStrategy(e);this.showTemplateBlockInView(this.templateRef),i(this.templateRef)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=Q({type:t,selectors:[["","ngxPermissionsOnly",""],["","ngxPermissionsExcept",""]],inputs:{ngxPermissionsOnly:"ngxPermissionsOnly",ngxPermissionsOnlyThen:"ngxPermissionsOnlyThen",ngxPermissionsOnlyElse:"ngxPermissionsOnlyElse",ngxPermissionsExcept:"ngxPermissionsExcept",ngxPermissionsExceptElse:"ngxPermissionsExceptElse",ngxPermissionsExceptThen:"ngxPermissionsExceptThen",ngxPermissionsThen:"ngxPermissionsThen",ngxPermissionsElse:"ngxPermissionsElse",ngxPermissionsOnlyAuthorisedStrategy:"ngxPermissionsOnlyAuthorisedStrategy",ngxPermissionsOnlyUnauthorisedStrategy:"ngxPermissionsOnlyUnauthorisedStrategy",ngxPermissionsExceptUnauthorisedStrategy:"ngxPermissionsExceptUnauthorisedStrategy",ngxPermissionsExceptAuthorisedStrategy:"ngxPermissionsExceptAuthorisedStrategy",ngxPermissionsUnauthorisedStrategy:"ngxPermissionsUnauthorisedStrategy",ngxPermissionsAuthorisedStrategy:"ngxPermissionsAuthorisedStrategy"},outputs:{permissionsAuthorized:"permissionsAuthorized",permissionsUnauthorized:"permissionsUnauthorized"},standalone:!1,features:[K]})}}return t})(),re="default";var _=(()=>{class t{constructor(e,i,s){this.permissionsService=e,this.rolesService=i,this.router=s}canActivate(e,i){return this.hasPermissions(e,i)}canActivateChild(e,i){return this.hasPermissions(e,i)}canLoad(e){return this.hasPermissions(e)}canMatch(e){return this.hasPermissions(e)}hasPermissions(e,i){let s=e&&e.data?e.data.permissions:{},n=this.transformPermission(s,e,i);return this.isParameterAvailable(n.except)?this.passingExceptPermissionsValidation(n,e,i):this.isParameterAvailable(n.only)?this.passingOnlyPermissionsValidation(n,e,i):!0}transformPermission(e,i,s){let n=h(e.only)?e.only(i,s):T(e.only),r=h(e.except)?e.except(i,s):T(e.except),o=e.redirectTo;return{only:n,except:r,redirectTo:o}}isParameterAvailable(e){return!!e&&e.length>0}passingExceptPermissionsValidation(e,i,s){if(e.redirectTo&&(h(e.redirectTo)||V(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo))){let n="";return d(e.except).pipe(g(r=>b([this.permissionsService.hasPermission(r),this.rolesService.hasOnlyRoles(r)]).pipe(j(o=>{o.every(U=>U===!1)||(n=r)}))),P(r=>r.some(o=>o===!0),!1),g(r=>n?(this.handleRedirectOfFailedPermission(e,n,i,s),a(!1)):!r&&e.only?this.onlyRedirectCheck(e,i,s):a(!r))).toPromise()}return Promise.all([this.permissionsService.hasPermission(e.except),this.rolesService.hasOnlyRoles(e.except)]).then(([n,r])=>n||r?(e.redirectTo&&this.redirectToAnotherRoute(e.redirectTo,i,s),!1):e.only?this.checkOnlyPermissions(e,i,s):!0)}redirectToAnotherRoute(e,i,s,n){let r=h(e)?e(n,i,s):e;if(this.isRedirectionWithParameters(r)){r.navigationCommands=this.transformNavigationCommands(r.navigationCommands,i,s),r.navigationExtras=this.transformNavigationExtras(r.navigationExtras,i,s),this.router.navigate(r.navigationCommands,r.navigationExtras);return}Array.isArray(r)?this.router.navigate(r):this.router.navigate([r])}isRedirectionWithParameters(e){return V(e)&&(!!e.navigationCommands||!!e.navigationExtras)}transformNavigationCommands(e,i,s){return h(e)?e(i,s):e}transformNavigationExtras(e,i,s){return h(e)?e(i,s):e}onlyRedirectCheck(e,i,s){let n="";return d(e.only).pipe(g(r=>b([this.permissionsService.hasPermission(r),this.rolesService.hasOnlyRoles(r)]).pipe(j(o=>{o.every(U=>U===!1)&&(n=r)}))),P(r=>h(e.redirectTo)?r.some(o=>o===!0):r.every(o=>o===!1),!1),g(r=>h(e.redirectTo)?r?a(!0):(this.handleRedirectOfFailedPermission(e,n,i,s),a(!1)):(n&&this.handleRedirectOfFailedPermission(e,n,i,s),a(!r)))).toPromise()}handleRedirectOfFailedPermission(e,i,s,n){this.isFailedPermissionPropertyOfRedirectTo(e,i)?this.redirectToAnotherRoute(e.redirectTo[i],s,n,i):h(e.redirectTo)?this.redirectToAnotherRoute(e.redirectTo,s,n,i):this.redirectToAnotherRoute(e.redirectTo[re],s,n,i)}isFailedPermissionPropertyOfRedirectTo(e,i){return!!e.redirectTo&&e.redirectTo[i]}checkOnlyPermissions(e,i,s){let n=c({},e);return Promise.all([this.permissionsService.hasPermission(n.only),this.rolesService.hasOnlyRoles(n.only)]).then(([r,o])=>r||o?!0:(n.redirectTo&&this.redirectToAnotherRoute(n.redirectTo,i,s),!1))}passingOnlyPermissionsValidation(e,i,s){return h(e.redirectTo)||V(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo)?this.onlyRedirectCheck(e,i,s):this.checkOnlyPermissions(e,i,s)}static{this.\u0275fac=function(i){return new(i||t)(u(S),u(D),u(Z))}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})();var pe=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[se,R,ee,S,_,D,k,{provide:B,useValue:e.permissionsIsolate},{provide:$,useValue:e.rolesIsolate},{provide:N,useValue:e.configurationIsolate}]}}static forChild(e={}){return{ngModule:t,providers:[{provide:B,useValue:e.permissionsIsolate},{provide:$,useValue:e.rolesIsolate},{provide:N,useValue:e.configurationIsolate},k,S,D,_]}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=q({type:t})}static{this.\u0275inj=L({})}}return t})();export{S as a,Pe as b,pe as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as x}from"./chunk-PE5AFID4.js";import{h as u}from"./chunk-I3LFKNW4.js";import{b as h,d as C,i as M,j as v,k as S}from"./chunk-6X2OBNJQ.js";import{G as p,n as g}from"./chunk-MTUIRWOB.js";import{Gb as s,Gc as t,Yb as f,ic as o,ja as m,jc as n,kc as d,pa as i,tc as c}from"./chunk-JS55A2RS.js";var y=(()=>{class e{constructor(){this.dialogRef=i(h),this.route=i(p),this.modalConfig=new v,this.modalConfig.title="Setup to modern authorization",this.modalConfig.customWidth="450px",this.modalConfig.hideCancel=!0,this.modalConfig.headerType=M.Warning,this.modalConfig.okText="Setup"}onClose(){this.dialogRef.close()}onOk(){this.dialogRef.close(),this.route.navigate(["/menu/users"])}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=s({type:e,selectors:[["app-modal-user-migration-confirmation"]],decls:19,vars:1,consts:[[3,"onOk","onCancel","config"],["content",""],[1,"d-flex","align-items-center","justify-content-between","gap-6"],[1,"text-center",2,"width","300px"],[1,"fa-solid","fa-users-gear","fa-6x"],[1,"lh-base"],["href","#","target","_blank"]],template:function(r,l){r&1&&(o(0,"modal-material",0),c("onOk",function(){return l.onOk()})("onCancel",function(){return l.onClose()}),o(1,"div",1)(2,"div",2)(3,"div",3),d(4,"i",4),n(),o(5,"div",5)(6,"p"),t(7," We have introduced a new Modern Authorization, Please switch from "),o(8,"b"),t(9,"legacy"),n(),t(10," to "),o(11,"b"),t(12,"modern"),n(),t(13," authorization by inviting your users. "),n(),o(14,"div"),t(15," Please refer to this "),o(16,"a",6),t(17,"article"),n(),t(18," for more information "),n()()()()()),r&2&&f("config",l.modalConfig)},dependencies:[g,S],encapsulation:2})}}return e})();var R=(()=>{class e{constructor(){this.dialog=i(C),this.tokenService=i(u),this.dialogRef=null}openDialogMigrationConfirmation(){this.tokenService.getUser()?.AuthorizationMode===x.Legacy&&!this.dialogRef&&(this.dialogRef=this.dialog.open(y),this.dialogRef.afterClosed().subscribe(()=>{this.dialogRef=null}))}resetDialogState(){this.dialogRef&&(this.dialogRef.close(),this.dialogRef=null)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=m({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var B=(e,b)=>(i(R).openDialogMigrationConfirmation(),!0);export{B as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as a,T as v,Y as L,_ as m,aa as l,ba as r,ma as O}from"./chunk-AVEGIEYT.js";import{a as C,p as _}from"./chunk-MTUIRWOB.js";import{Ca as d,Ea as y,Ib as u,Pa as p,Qc as g,Wa as S,ja as h,jd as b,pa as i,wb as f,xa as c}from"./chunk-JS55A2RS.js";import{a as n}from"./chunk-66YHNWRR.js";var T=(()=>{class o extends r{name="common";static \u0275fac=(()=>{let e;return function(s){return(e||(e=d(o)))(s||o)}})();static \u0275prov=h({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),B=(()=>{class o{document=i(C);platformId=i(S);el=i(p);injector=i(y);cd=i(b);renderer=i(f);config=i(O);baseComponentStyle=i(T);baseStyle=i(r);scopedStyleEl;rootEl;dt;get styleOptions(){return{nonce:this.config?.csp().nonce}}get _name(){return this.constructor.name.replace(/^_/,"").toLowerCase()}get componentStyle(){return this._componentStyle}attrSelector=L("pc");themeChangeListeners=[];_getHostInstance(e){if(e)return e?this.hostName?e.name===this.hostName?e:this._getHostInstance(e.parentInstance):e.parentInstance:void 0}_getOptionValue(e,t="",s={}){return v(e,t,s)}ngOnInit(){this.document&&this._loadStyles()}ngAfterViewInit(){this.rootEl=this.el?.nativeElement,this.rootEl&&this.rootEl?.setAttribute(this.attrSelector,"")}ngOnChanges(e){if(this.document&&!_(this.platformId)){let{dt:t}=e;t&&t.currentValue&&(this._loadScopedThemeStyles(t.currentValue),this._themeChangeListener(()=>this._loadScopedThemeStyles(t.currentValue)))}}ngOnDestroy(){this._unloadScopedThemeStyles(),this.themeChangeListeners.forEach(e=>m.off("theme:change",e))}_loadStyles(){let e=()=>{l.isStyleNameLoaded("base")||(this.baseStyle.loadGlobalCSS(this.styleOptions),l.setLoadedStyleName("base")),this._loadThemeStyles()};e(),this._themeChangeListener(()=>e())}_loadCoreStyles(){!l.isStyleNameLoaded("base")&&this._name&&(this.baseComponentStyle.loadCSS(this.styleOptions),this.componentStyle&&this.componentStyle?.loadCSS(this.styleOptions),l.setLoadedStyleName(this.componentStyle?.name))}_loadThemeStyles(){if(!a.isStyleNameLoaded("common")){let{primitive:e,semantic:t,global:s,style:I}=this.componentStyle?.getCommonTheme?.()||{};this.baseStyle.load(e?.css,n({name:"primitive-variables"},this.styleOptions)),this.baseStyle.load(t?.css,n({name:"semantic-variables"},this.styleOptions)),this.baseStyle.load(s?.css,n({name:"global-variables"},this.styleOptions)),this.baseStyle.loadGlobalTheme(n({name:"global-style"},this.styleOptions),I),a.setLoadedStyleName("common")}if(!a.isStyleNameLoaded(this.componentStyle?.name)&&this.componentStyle?.name){let{css:e,style:t}=this.componentStyle?.getComponentTheme?.()||{};this.componentStyle?.load(e,n({name:`${this.componentStyle?.name}-variables`},this.styleOptions)),this.componentStyle?.loadTheme(n({name:`${this.componentStyle?.name}-style`},this.styleOptions),t),a.setLoadedStyleName(this.componentStyle?.name)}if(!a.isStyleNameLoaded("layer-order")){let e=this.componentStyle?.getLayerOrderThemeCSS?.();this.baseStyle.load(e,n({name:"layer-order",first:!0},this.styleOptions)),a.setLoadedStyleName("layer-order")}this.dt&&(this._loadScopedThemeStyles(this.dt),this._themeChangeListener(()=>this._loadScopedThemeStyles(this.dt)))}_loadScopedThemeStyles(e){let{css:t}=this.componentStyle?.getPresetTheme?.(e,`[${this.attrSelector}]`)||{},s=this.componentStyle?.load(t,n({name:`${this.attrSelector}-${this.componentStyle?.name}`},this.styleOptions));this.scopedStyleEl=s?.el}_unloadScopedThemeStyles(){this.scopedStyleEl?.remove()}_themeChangeListener(e=()=>{}){l.clearLoadedStyleNames(),m.on("theme:change",e),this.themeChangeListeners.push(e)}cx(e,t){let s=this.parent?this.parent.componentStyle?.classes?.[e]:this.componentStyle?.classes?.[e];return typeof s=="function"?s({instance:this}):typeof s=="string"?s:e}sx(e){let t=this.componentStyle?.inlineStyles?.[e];return typeof t=="function"?t({instance:this}):typeof t=="string"?t:n({},t)}get parent(){return this.parentInstance}static \u0275fac=function(t){return new(t||o)};static \u0275dir=u({type:o,inputs:{dt:"dt"},features:[g([T,r]),c]})}return o})();export{B as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as M}from"./chunk-PBGDP6XV.js";import{a as E}from"./chunk-XHAXYWZ7.js";import{a as De,b as Ee,c as Me,d as U}from"./chunk-GOS4RIF2.js";import{a as Ve,b as Te}from"./chunk-GPC4DECX.js";import"./chunk-SIYMMMKQ.js";import"./chunk-WHZ44BAL.js";import{a as be,b as Fe}from"./chunk-UPYS4A4M.js";import{a as ve}from"./chunk-JOBWFOGC.js";import"./chunk-PO7JVKK3.js";import"./chunk-LHD7CYML.js";import"./chunk-DJILLV4M.js";import{a as ye}from"./chunk-SH7KN2AS.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SDUUFQUI.js";import"./chunk-3RK6DDJD.js";import"./chunk-MQXPOHBV.js";import"./chunk-M5IQRAHV.js";import{a as se}from"./chunk-5DIRXS7I.js";import{a as Ce,b as ue,d as xe,e as fe}from"./chunk-SYENQYR7.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import{i as he}from"./chunk-I3LFKNW4.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CMZW5QAE.js";import{b as _e,e as me}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import"./chunk-HPYTL6TX.js";import{c as pe}from"./chunk-PW42BQIY.js";import{d as Pe,l as Se,m as Ie,n as we}from"./chunk-6X2OBNJQ.js";import{b as ie,c as oe,h as ae,m as re,o as le,z as ce}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import{b as de,c as ge}from"./chunk-UJYSVGLV.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{d as X,g as Y,j as ee,m as D,n as te,q as ne}from"./chunk-MTUIRWOB.js";import{$c as y,Fc as H,G as W,Gb as z,Gc as d,Hc as R,Ic as b,Kc as I,Lc as w,Mb as h,Mc as v,Qc as J,Sc as T,Yb as m,Z as A,ad as F,bd as Z,cd as Q,dc as P,ea as $,ec as N,gc as k,hc as L,ic as a,jc as c,kc as S,lc as G,mc as q,oc as x,pa as j,pb as V,rb as l,tc as C,uc as r,xb as u,xc as K,ya as p,za as _}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var B=i=>[i],Re=i=>({"text-decoration-line-through":i}),Ue=i=>({"bg-gradient-warning":i});function Be(i,s){if(i&1&&(a(0,"span",10),S(1,"img",11),c(),d(2)),i&2){let e=s.item;l(),m("src",e==null?null:e.Img,V),l(),b(" ",e.Name," ")}}function Oe(i,s){if(i&1){let e=x();a(0,"button",16),C("click",function(){p(e);let t=r().ngIf,o=r(2);return _(o.updateStock(t))}),S(1,"i",17),d(2," Update "),c()}}function We(i,s){if(i&1){let e=x();a(0,"actions")(1,"div",12),h(2,Oe,3,0,"button",13),a(3,"button",14),C("click",function(){p(e);let t=r(2);return _(t.openExportDialog())}),S(4,"i",15),a(5,"span"),d(6,"Export"),c()()()()}if(i&2){let e=s.ngIf,n=r(2);l(2),m("ngIf",n.productService.hasSelectionVariant(e))}}function Ae(i,s){if(i&1){let e=x();a(0,"th")(1,"input",32),C("change",function(t){p(e);let o=r().ngIf,g=r(2);return _(g.onSelectAllSKU(t.target.checked,o))}),c()()}}function $e(i,s){if(i&1){let e=x();a(0,"input",49),v("ngModelChange",function(t){p(e);let o=r(4).$implicit;return w(o.selected,t)||(o.selected=t),_(t)}),C("ngModelChange",function(){p(e);let t=r(4).$implicit,o=r(3);return _(o.onCheckboxStateProduct(t))}),c()}if(i&2){let e=r(4).$implicit;I("ngModel",e.selected)}}function je(i,s){if(i&1&&h(0,$e,1,1,"ng-template",26),i&2){let e=r(6);m("ngxPermissionsOnly",T(1,B,e.rolePriceEdit))}}function ze(i,s){if(i&1){let e=x();G(0),a(1,"img",50),C("click",function(t){p(e);let o=r(3).$implicit,g=r(3);return _(g.onZoomImage(t,o==null?null:o.ImageUrl))}),c(),q()}if(i&2){let e=r(3).$implicit;l(),K("src",e.ThumbnailUrl,V)}}function Ge(i,s){i&1&&S(0,"img",51)}function qe(i,s){if(i&1&&(a(0,"small",48),d(1),c()),i&2){let e=r(3).$implicit;l(),b("(",e.Category,")")}}function Ke(i,s){if(i&1&&(a(0,"td",44)(1,"div",35),h(2,je,1,3,null,26),a(3,"div"),h(4,ze,2,1,"ng-container",45)(5,Ge,1,0,"ng-template",null,0,Q),c()()(),a(7,"td",46)(8,"span",47),d(9),c(),h(10,qe,2,1,"small",48),c()),i&2){let e=H(6),n=r(2).$implicit;m("rowSpan",n.Variants.length),l(2),P((n.Variants==null?null:n.Variants.length)>1?2:-1),l(2),m("ngIf",n.ThumbnailUrl)("ngIfElse",e),l(3),m("rowSpan",n.Variants.length),l(2),R(n.Name),l(),P(n.Category?10:-1)}}function He(i,s){if(i&1){let e=x();a(0,"input",54),v("ngModelChange",function(t){p(e);let o=r(2).$implicit;return w(o.selected,t)||(o.selected=t),_(t)}),c()}if(i&2){let e=r(2).$implicit;I("ngModel",e.selected)}}function Je(i,s){if(i&1&&(a(0,"td",52),h(1,He,1,1,"input",53),c()),i&2){let e=r().$implicit;l(),P(e.UnitPrice>=0?1:-1)}}function Ze(i,s){i&1&&(a(0,"div",36),d(1," Not Found "),c())}function Qe(i,s){if(i&1&&(a(0,"div"),d(1),y(2,"number"),c()),i&2){let e=r().$implicit;l(),b(" ",F(2,1,e.UnitPrice)," ")}}function Xe(i,s){if(i&1&&(a(0,"div",37)(1,"a",40),S(2,"i",55),c()()),i&2){let e=r().$implicit,n=r(4);l(),m("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),V)}}function Ye(i,s){if(i&1){let e=x();a(0,"div",56),C("click",function(){p(e);let t=r().$implicit,o=r().$implicit,g=r(2).ngIf,f=r();return _(f.openTableDialog(t,o,g))}),d(1),y(2,"number"),c()}if(i&2){let e=r().$implicit;l(),b(" ",F(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function et(i,s){if(i&1){let e=x();a(0,"tr",33),h(1,Ke,11,7),a(2,"td",24),d(3),c(),a(4,"td",27)(5,"span",34),d(6),c()(),h(7,Je,2,1,"ng-template",26),a(8,"td",27)(9,"div",35),h(10,Ze,2,0,"div",36)(11,Qe,3,3,"div")(12,Xe,3,1,"div",37),c()(),a(13,"td",38)(14,"div",35),h(15,Ye,3,3,"div",39),a(16,"div",37)(17,"a",40),S(18,"i",41),c()(),a(19,"div",37)(20,"div",42),C("click",function(){let t=p(e).$implicit,o=r(4);return _(o.refreshPrice(t))}),S(21,"i",43),c()()()()()}if(i&2){let e=s.$implicit,n=s.$index,t=r(4);l(),P(n==0?1:-1),l(2),R(e.Model),l(2),m("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",T(12,Re,e.Discontinued)),l(),b(" ",e.Code," "),l(),m("ngxPermissionsOnly",T(14,B,t.rolePriceEdit)),l(3),P((e.Channel[0]==null?null:e.Channel[0].Description)!=null?10:-1),l(),P((e.Channel[0]==null?null:e.Channel[0].Description)==null?11:-1),l(),P((e.Channel[0]==null?null:e.Channel[0].Description)==null?12:-1),l(),m("ngClass",T(16,Ue,e.UnitPrice!=(e.Channel[0]==null?null:e.Channel[0].Price))),l(2),P(e.Channel.length>0?15:-1),l(2),m("href",e.Channel[0]==null?null:e.Channel[0].Url,V)}}function tt(i,s){if(i&1&&k(0,et,22,18,"tr",33,N),i&2){let e=s.$implicit;L(e.Variants)}}function nt(i,s){if(i&1){let e=x();a(0,"content")(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr")(6,"th",22),d(7," Product "),a(8,"div")(9,"mat-slide-toggle",23),v("ngModelChange",function(t){p(e);let o=r(2);return w(o.toggleDifferentInventory,t)||(o.toggleDifferentInventory=t),_(t)}),C("toggleChange",function(){p(e);let t=r(2);return _(t.onToggleDifferentInventory())}),a(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),a(12,"th",24),d(13,"Variant"),c(),a(14,"th",25),d(15,"SKU"),c(),h(16,Ae,2,0,"ng-template",26),a(17,"th",27),d(18,"POS"),c(),a(19,"th",27)(20,"div",28),C("click",function(){p(e);let t=r(2);return _(t.openModalFilter())}),S(21,"img",29),a(22,"span",30),d(23),y(24,"stringLimit"),c()()()()(),a(25,"tbody"),k(26,tt,2,0,null,null,N),c()(),a(28,"infinite-paginator",31),y(29,"async"),C("onNextPage",function(){p(e);let t=r(2);return _(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){p(e);let t=r(2);return _(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){p(e);let t=r(2);return _(t.infinitePagination.getRowCount(t.searchFilter))}),c()()()()}if(i&2){let e=s.ngIf,n=r(2);l(9),I("ngModel",n.toggleDifferentInventory),l(7),m("ngxPermissionsOnly",T(16,B,n.rolePriceEdit)),l(4),m("matTooltip",(n.selectedChannel==null||n.selectedChannel.Name==null?null:n.selectedChannel.Name.length)>=20?n.selectedChannel==null?null:n.selectedChannel.Name:""),l(),m("src",n.selectedChannel==null?null:n.selectedChannel.Img,V),l(2),b(" ",Z(24,11,n.selectedChannel==null?null:n.selectedChannel.Name,20)," "),l(3),L(e),l(2),m("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",F(29,14,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage())}}function it(i,s){if(i&1){let e=x();a(0,"mainpanel",2),v("textChange",function(t){p(e);let o=r();return w(o.searchFilter.text,t)||(o.searchFilter.text=t),_(t)}),C("onSubmit",function(){p(e);let t=r();return _(t.onSearch())}),a(1,"filters")(2,"div")(3,"label",3),d(4,"Channel"),c(),a(5,"ng-select",4),v("ngModelChange",function(t){p(e);let o=r();return w(o.searchFilter.ChannelID,t)||(o.searchFilter.ChannelID=t),_(t)}),h(6,Be,3,2,"ng-template",5),c()(),a(7,"div",6)(8,"label",7),d(9,"Page Number"),c(),a(10,"input",8),v("ngModelChange",function(t){p(e);let o=r();return w(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),_(t)}),c()(),a(11,"div",6)(12,"label",7),d(13,"Page Size"),c(),a(14,"input",8),v("ngModelChange",function(t){p(e);let o=r();return w(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),_(t)}),c()()(),h(15,We,7,1,"actions",9),y(16,"async"),h(17,nt,30,18,"content",9),y(18,"async"),c()}if(i&2){let e=r();m("headerTitle",e.pageTitle),I("text",e.searchFilter.text),l(5),m("clearable",!1)("items",e.channelOptions),I("ngModel",e.searchFilter.ChannelID),l(5),I("ngModel",e.searchFilter.PageNumber),l(4),I("ngModel",e.searchFilter.RowCount),l(),m("ngIf",F(16,9,e.data$)),l(2),m("ngIf",F(18,11,e.data$))}}var Wt=(()=>{class i{constructor(e,n,t,o,g,f,O,Ne,ke,Le){this.http=e,this.toastr=n,this.dialog=t,this.productService=o,this.biggerPictureService=g,this.inventoryService=f,this.authService=O,this.mainPanelService=Ne,this.exportService=ke,this.decimalPipe=Le,this.infinitePagination=j(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=se.PriceUpdate,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe(A(1)),this.channelOptions=O.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe($(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=E.ALL,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=E.ALL:this.searchFilter.filterModel=E.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let t=this.productService.selectedVariantProduct(e).map(g=>({ID:g.ID,ChannelID:g.Channel[0].ChannelID,Code:g.Code,Price:g.UnitPrice})),o={ListChannelID:[this.searchFilter.ChannelID],ListPrice:t};this.http.post("/api/Price/UpdateChannel",o).subscribe(g=>{this.onSearch(),this.handlingUpdateStock(g.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let n=e.failure_list,t=e.success_list;this.inventoryService.showToastrUpdateInventory("Price",t,n)}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(t=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openTableDialog(e,n,t){let o=JSON.parse(JSON.stringify(e));this.dialog.open(De,{data:{Name:n.Name,Variant:o,ChannelID:o?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:o?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(W(f=>pe.IsNotEmpty(f))).subscribe(f=>{this.updateItemAfterDialog(f,e)})}updateItemAfterDialog(e,n){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(o=>{let g=this.productService.findChannelById(t.ID,this.channelOptions),f=t.Price?this.decimalPipe.transform(t.Price):t.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${g.Name} to ${f}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=t.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(t=>(t.Variants=t.Variants.map(o=>(o.selected=e,o)),t))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}openExportDialog(){this.dialog.open(Te,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}static{this.\u0275fac=function(n){return new(n||i)(u(me),u(_e),u(Pe),u(ve),u(ye),u(M),u(he),u(Se),u(Ve),u(D))}}static{this.\u0275cmp=z({type:i,selectors:[["app-price-single-channel"]],features:[J([U,M,ne("https://res.cloudinary.com/"),D])],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[4,"ngIf","ngIfElse"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","8px"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(n,t){n&1&&(h(0,it,19,13,"mainpanel",1),y(1,"async")),n&2&&m("ngIf",F(1,1,t.loader$))},dependencies:[te,X,Y,ee,D,we,Ie,fe,xe,Ce,ue,ce,oe,le,ie,ae,re,Ee,Me,ge,de,Fe,be],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0})}}return i})();export{Wt as PriceSingleChannelComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as se,b as ce,c as ue}from"./chunk-2BUABOHG.js";import{a as _e}from"./chunk-CZOD43PN.js";import{a as pe}from"./chunk-K6YEZYU4.js";import{a as de}from"./chunk-5ANFGKBV.js";import{a as me}from"./chunk-E2CS7ZMC.js";import"./chunk-R76V3PTN.js";import{a as ae}from"./chunk-5EQNOCXP.js";import"./chunk-6LH7FSOW.js";import"./chunk-XEMNZHW6.js";import"./chunk-WHZ44BAL.js";import"./chunk-LHD7CYML.js";import"./chunk-DJILLV4M.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SDUUFQUI.js";import"./chunk-3RK6DDJD.js";import"./chunk-MQXPOHBV.js";import"./chunk-M5IQRAHV.js";import"./chunk-SYENQYR7.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import"./chunk-I3LFKNW4.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as ne}from"./chunk-CMZW5QAE.js";import{e as ie}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import"./chunk-HPYTL6TX.js";import"./chunk-PW42BQIY.js";import{m as le,n as oe}from"./chunk-6X2OBNJQ.js";import{c as Y,h as Z,m as $,o as ee,z as te}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import"./chunk-UJYSVGLV.js";import{s as re}from"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{j as J,k as K,m as Q,n as X}from"./chunk-MTUIRWOB.js";import{$c as w,Gb as I,Gc as a,Hc as v,Ic as k,Kc as g,Lc as C,Mb as x,Mc as h,Nc as z,Oc as j,Pc as H,Qc as R,Ra as O,Rc as U,Sc as G,Yb as c,Z as T,ac as W,ad as b,bd as q,dc as A,ec as N,gc as B,hc as D,ic as i,ja as L,jc as n,kc as f,oc as E,pa as y,pb as F,rb as l,tc as M,uc as u,v as P,ya as d,za as s}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var V=(()=>{class t{constructor(){this.httpService=y(ie)}getAllOrders(e){return this.httpService.post(ne.GetAll,e).pipe(P(m=>m.Data))}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=L({token:t,factory:t.\u0275fac})}}return t})();var ge=()=>[],Ce=t=>({"td-cell-hover":t});function he(t,_){if(t&1&&f(0,"variants-dropdown",25),t&2){let e=u().$implicit;c("variants",e==null?null:e.Variants)}}function Se(t,_){if(t&1&&f(0,"variant-with-image",26),t&2){let e=u().$implicit;c("variant",e==null?null:e.Variants[0])}}function ve(t,_){if(t&1&&(i(0,"span"),a(1),n()),t&2){let e=u().$implicit;l(),v(e.LogisticService==null?null:e.LogisticService.Option)}}function we(t,_){if(t&1&&(i(0,"tr")(1,"td")(2,"div",21)(3,"div",22)(4,"div"),f(5,"img",23),w(6,"channelImage"),n(),i(7,"div"),f(8,"order-link",24),n()(),i(9,"small"),a(10),w(11,"date"),n()()(),i(12,"td"),a(13),n(),i(14,"td"),x(15,he,1,1,"variants-dropdown",25)(16,Se,1,1,"variant-with-image",26),n(),i(17,"td"),a(18),w(19,"number"),n(),i(20,"td")(21,"span"),a(22),n(),x(23,ve,2,1,"span"),n()()),t&2){let e=_.$implicit;l(5),c("src",b(6,11,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(3),c("order",e),l(2),k(" ",q(11,13,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(3),v(e.Customer),l(),W(G(18,Ce,(e.Variants==null?null:e.Variants.length)>1)),l(),A((e.Variants==null?null:e.Variants.length)>1?15:16),l(3),v(b(19,16,e.Amount)),l(4),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),A(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?23:-1)}}function ye(t,_){if(t&1){let e=E();i(0,"div",13)(1,"table",15)(2,"thead",16)(3,"tr",17)(4,"th",18),a(5,"Number"),n(),i(6,"th",18),a(7,"Customer"),n(),i(8,"th"),a(9,"Items"),n(),i(10,"th",19),a(11,"Amount"),n(),i(12,"th",19),a(13,"Shipping"),n()()(),i(14,"tbody"),B(15,we,24,20,"tr",null,N),n()(),i(17,"app-custom-paginator",20),M("next",function(){d(e);let r=u();return s(r.initAllOrders())})("previous",function(){d(e);let r=u();return s(r.initAllOrders())}),n()()}if(t&2){let e=u(),m=H(0);l(15),D(m),l(2),c("filter",e.filter())("totaldata",m==null?null:m.length)}}function xe(t,_){t&1&&(i(0,"div",14),f(1,"app-empty-state"),n())}var Xe=(()=>{class t{constructor(){this.allService=y(V),this.filter=O({PageNumber:1,PageSize:100,ListChannelID:[],From:null,To:null})}ngOnInit(){this.initAllOrders()}initAllOrders(){this.allOrders$=this.allService.getAllOrders(this.filter()).pipe(T(1))}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=I({type:t,selectors:[["app-all"]],features:[R([V])],decls:29,vars:12,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Search Orders...",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],["rowCountApi","/api/orders/allcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[3,"order"],[3,"variants"],[3,"variant"]],template:function(m,r){if(m&1){let p=E();z(0),w(1,"async"),i(2,"mainpanel",0),M("onSubmit",function(){return d(p),s(r.initAllOrders())}),i(3,"filters")(4,"div")(5,"label",1),a(6,"From/To"),n(),i(7,"channel-select-options",2),h("ngModelChange",function(o){return d(p),C(r.filter().ListChannelID,o)||(r.filter().ListChannelID=o),s(o)}),n()(),i(8,"div",3)(9,"label",1),a(10,"From/To"),n(),i(11,"div",4)(12,"datepicker",5),h("dateChange",function(o){return d(p),C(r.filter().From,o)||(r.filter().From=o),s(o)}),n()(),i(13,"div")(14,"datepicker",6),h("dateChange",function(o){return d(p),C(r.filter().To,o)||(r.filter().To=o),s(o)}),n()()(),i(15,"div",3)(16,"label",7),a(17,"Page Number"),n(),i(18,"input",8),h("ngModelChange",function(o){return d(p),C(r.filter().PageNumber,o)||(r.filter().PageNumber=o),s(o)}),n()(),i(19,"div",3)(20,"label",7),a(21,"Page Size"),n(),i(22,"input",9),h("ngModelChange",function(o){return d(p),C(r.filter().PageSize,o)||(r.filter().PageSize=o),s(o)}),n()()(),i(23,"content")(24,"div",10)(25,"div",11)(26,"div",12),x(27,ye,18,2,"div",13)(28,xe,2,0,"div",14),n()()()()()}if(m&2){let p=j(b(1,8,r.allOrders$)||U(11,ge));l(2),c("hideSearchBox",!0),l(5),c("multiple",!0),g("ngModel",r.filter().ListChannelID),l(5),g("date",r.filter().From),l(2),g("date",r.filter().To),l(4),g("ngModel",r.filter().PageNumber),l(4),g("ngModel",r.filter().PageSize),l(5),A((p==null?null:p.length)>0?27:28)}},dependencies:[X,J,Q,K,oe,le,me,ae,te,Y,ee,Z,$,se,ce,ue,pe,de,re,_e],encapsulation:2})}}return t})();export{Xe as AllComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Gt,b as ke}from"./chunk-ZIUDNFYT.js";import{a as Ce}from"./chunk-ZMVP6H6B.js";import"./chunk-MS4AQ6UA.js";import{a as z}from"./chunk-E2CS7ZMC.js";import{e as ft}from"./chunk-UGAQVMUE.js";import{d as be,k as De,l as Te,m as Oe,n as Fe,o as Ee}from"./chunk-R76V3PTN.js";import{a as $t}from"./chunk-XQGRC7V2.js";import{a as st}from"./chunk-UT7K3K63.js";import"./chunk-PE5AFID4.js";import{b as Re}from"./chunk-ZR5IXNXB.js";import{a as Ie,b as we}from"./chunk-LSXUXG54.js";import{a as X}from"./chunk-5EQNOCXP.js";import{a as ot}from"./chunk-O55KM5KY.js";import{c as ve,f as ye}from"./chunk-6LH7FSOW.js";import"./chunk-XEMNZHW6.js";import{a as fe,b as Se}from"./chunk-5QAURMZF.js";import"./chunk-FWG4H3QG.js";import"./chunk-NZA4BEER.js";import"./chunk-JV4MMNGD.js";import"./chunk-GZXQUJKX.js";import"./chunk-ALKC77XL.js";import"./chunk-NTW6FBP5.js";import"./chunk-LR4UZ2OS.js";import"./chunk-F4GMWHYJ.js";import{a as Ve}from"./chunk-JRWFZQ5K.js";import{a as it}from"./chunk-7KG3DC5J.js";import{a as jt,b as Wt,c as Pe}from"./chunk-ZIOAOUAM.js";import{b as Ne}from"./chunk-GPC4DECX.js";import"./chunk-SIYMMMKQ.js";import"./chunk-WHZ44BAL.js";import"./chunk-UPYS4A4M.js";import{a as $}from"./chunk-JOBWFOGC.js";import"./chunk-PO7JVKK3.js";import"./chunk-LHD7CYML.js";import"./chunk-DJILLV4M.js";import{a as Me}from"./chunk-SH7KN2AS.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SDUUFQUI.js";import"./chunk-3RK6DDJD.js";import{a as Bt}from"./chunk-MQXPOHBV.js";import{f as xe}from"./chunk-M5IQRAHV.js";import{a as R}from"./chunk-5DIRXS7I.js";import"./chunk-KXS76PRS.js";import"./chunk-OZ7LWNOK.js";import"./chunk-VRI3CYGG.js";import"./chunk-AVEGIEYT.js";import{a as _t,b as Vt,d as nt,e as ue}from"./chunk-SYENQYR7.js";import{a as ct}from"./chunk-NJFNMUFH.js";import"./chunk-2ZTDLZVZ.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import{i as W}from"./chunk-I3LFKNW4.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CMZW5QAE.js";import{b as Y,e as Z}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import{a as he,b as _e}from"./chunk-TNKPTRB3.js";import"./chunk-HPYTL6TX.js";import{b as w,c as g}from"./chunk-PW42BQIY.js";import{b as kt,c as Rt,d as Q,i as Ut,j as At,k as Lt,m as G,n as ge}from"./chunk-6X2OBNJQ.js";import{b as de,c as ut,h as L,m as B,z as ht}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import{a as pe,b as q,c as me}from"./chunk-UJYSVGLV.js";import{r as gt,s as Ct}from"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{E as Et,F as ce,G as et,H as Nt,J as se,f as U,g as A,j as pt,k as le,m as Ft,n as mt}from"./chunk-MTUIRWOB.js";import{$c as N,Fc as J,G as F,Gb as E,Gc as p,Hb as ae,Hc as K,Ic as b,Kc as D,Lc as T,Mb as h,Mc as O,Ra as vt,Rc as lt,Sc as I,Yb as c,Z as ne,aa as Ot,ad as k,bd as re,ca as qt,cd as H,dc as V,ea as ie,f as ee,ic as a,jc as r,ka as oe,kc as C,lc as P,mc as v,oc as x,pa as rt,pb as M,rb as o,tc as f,uc as s,v as Tt,xb as S,ya as m,za as u}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ye=()=>["/menu/products/download/by-url"],Ue=(()=>{class i{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=E({type:i,selectors:[["app-status"]],standalone:!1,decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(n,e){n&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),r()(),a(4,"div")(5,"div",3)(6,"a",4),C(7,"i",5),r(),a(8,"div",6)(9,"div",7)(10,"a",8),p(11,"Download Product By Url"),r()()()()()(),C(12,"router-outlet")),n&2&&(o(3),c("Tabs",e.productTabs),o(7),c("routerLink",lt(2,Ye)))},dependencies:[he,ce,Nt],encapsulation:2})}}return i})();function Ze(i,d){if(i&1&&(a(0,"div",10),C(1,"img",11),a(2,"span"),p(3),r()()),i&2){let t=d.$implicit;c("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),o(),c("src",t.Img,M),o(2),K(t.Name)}}function qe(i,d){if(i&1&&(a(0,"div",10),C(1,"img",11),a(2,"span"),p(3),r()()),i&2){let t=d.$implicit;c("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),o(),c("src",t.Img,M),o(2),K(t.Name)}}function Qe(i,d){if(i&1&&(a(0,"div",10),C(1,"img",11),a(2,"span"),p(3),r()()),i&2){let t=d.$implicit;c("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),o(),c("src",t.Img,M),o(2),K(t.Name)}}function Xe(i,d){if(i&1){let t=x();a(0,"div",12)(1,"label",13),p(2,"Scan Type"),r(),a(3,"mat-radio-group",14),O("ngModelChange",function(e){m(t);let l=s();return T(l.filter.ScanFull,e)||(l.filter.ScanFull=e),u(e)}),a(4,"mat-radio-button",15),p(5," Full (Include Inactive Products) "),r(),a(6,"mat-radio-button",16),p(7," Active "),r()()()}if(i&2){let t=s();o(3),D("ngModel",t.filter.ScanFull),o(),c("value",!0),o(2),c("value",!1)}}function tn(i,d){i&1&&(a(0,"span"),p(1,"Never"),r())}function en(i,d){if(i&1&&(a(0,"span"),p(1),N(2,"async"),r()),i&2){let t=s(2);o(),K(k(2,1,t.lastSync$))}}function nn(i,d){if(i&1){let t=x();a(0,"div",8)(1,"label",5)(2,"span",17),p(3,"Last Scan:"),r(),h(4,tn,2,0,"span"),N(5,"async"),h(6,en,3,3,"span"),r(),a(7,"mat-radio-group",18),O("ngModelChange",function(e){m(t);let l=s();return T(l.filter.UpdatedProduct,e)||(l.filter.UpdatedProduct=e),u(e)}),a(8,"mat-radio-button",19),p(9," Scan All Products "),r(),a(10,"mat-radio-button",20),p(11),r()()()}if(i&2){let t=s();o(4),V(k(5,6,t.lastSync$)==null?4:6),o(3),D("ngModel",t.filter.UpdatedProduct),o(),c("value",!1),o(2),c("value",!0)("matTooltip",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Use Tokopedia URL for mapping SKU between POS and Tokopedia":"Scan only products that have been updated since the last channel scan"),o(),b(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function on(i,d){if(i&1){let t=x();a(0,"div",8)(1,"label",5),p(2," Scan Option "),r(),a(3,"mat-radio-group",21),O("ngModelChange",function(e){m(t);let l=s();return T(l.filter.Async,e)||(l.filter.Async=e),u(e)}),a(4,"mat-radio-button",22),p(5," Asynchronous (Get Notified when Complete) "),r(),a(6,"mat-radio-button",23),p(7," Synchronous (Wait until Complete) "),r()()()}if(i&2){let t=s();o(3),D("ngModel",t.filter.Async),o(),c("value",!0),o(2),c("value",!1)}}var j=(()=>{class i{constructor(t,n,e){this.dialogRef=t,this.data=n,this.router=e,this.channelService=rt(Ce),this.channelType=w,this.disabledChannelOption=!1,this.filter={ChannelID:g.GuidEMpty,ScanFull:!1,UpdatedProduct:!1,Async:!1},this.isSingleChannel=g.IsNotEmpty(n.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=g.IsEmpty(n.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new At,this.modalConfig.title=this.isSingleChannel?"Scan Single Product":"Scan Channel Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(t=>(t.disabled=!0,(t.TypeID==w.Tiktok||t.TypeID==w.Tokopedia||t.TypeID==w.Lazada||t.TypeID==w.WooCommerce)&&(t.disabled=!1),t)).sort(t=>t.disabled?1:-1))}onSelectChannel(t){let n=this.filterChannelById(t);this.selectedChannel=n,this.filter.Async=!0,this.iniHasScanUpdate(),this.getLastSync(t)}getLastSync(t){this.lastSync$=this.channelService.getLastSync(t).pipe(Tt(n=>(this.selectedChannel.LastSync=n.LastSync,this.setDefaultConfigUpdate(),g.IsNotEmpty(n.LastSync)?g.convertToReadableDate(n.LastSync):null)),ne(1))}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&g.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==w.Shopee||this.selectedChannel.TypeID==w.Tiktok||this.selectedChannel.TypeID==w.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=w.WooCommerce&&this.selectedChannel?.TypeID!=w.KalCare&&this.selectedChannel?.TypeID!=w.None&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(t){let n;return this.channelOptions&&(n=this.channelOptions.find(e=>e.ID==t)),n}submit(){this.selectedChannel.TypeID==w.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):this.dialogRef.close(this.filter)}isNotEmpty(t){return g.IsNotEmpty(t)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(n){return new(n||i)(S(kt),S(Rt),S(et))}}static{this.\u0275cmp=E({type:i,selectors:[["app-scan-dialog"]],decls:15,vars:8,consts:[["selectedItem",""],["item",""],[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["optionLabel","Name","optionValue","ID","placeholder","Select a Channel","appendTo","body","filterBy","Name",1,"w-100",2,"--p-select-padding-y","0.75rem",3,"ngModelChange","options","ngModel","filter"],["class","mt-4",4,"ngIf"],[1,"mt-8"],["class","mt-8",4,"ngIf"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mt-4"],[1,"mb-2","fw-bold","mt-3"],["name","scanType",1,"form-control","h-100","rounded-1",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Full Scan Product",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Only Active Product",1,"me-5",3,"value"],[1,"me-2"],["name","ScanFull",1,"form-control","h-100","rounded-1",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above",1,"me-5",3,"value","matTooltip"],["name","Async",1,"form-control","h-100","rounded-1",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(n,e){if(n&1){let l=x();a(0,"modal-material",2),f("onOk",function(){return m(l),u(e.submit())})("onClose",function(){return m(l),u(e.onClose())})("onCancel",function(){return m(l),u(e.onClose())}),a(1,"div",3)(2,"div",4)(3,"label",5),p(4,"Select a Channel"),r(),a(5,"p-select",6),O("ngModelChange",function(y){return m(l),T(e.filter.ChannelID,y)||(e.filter.ChannelID=y),u(y)}),f("ngModelChange",function(y){return m(l),u(e.onSelectChannel(y))}),h(6,Ze,4,3,"ng-template",null,0,H)(8,qe,4,3,"ng-template",null,1,H)(10,Qe,4,3,"ng-template",null,1,H),r(),h(12,Xe,8,3,"div",7)(13,nn,12,8,"div",8)(14,on,8,3,"div",9),r()()()}n&2&&(c("dynamicValidated",e.isNotEmpty(e.filter.ChannelID))("config",e.modalConfig),o(5),c("options",e.channelOptions),D("ngModel",e.filter.ChannelID),c("filter",!0),o(7),c("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)),o(),V(e.hasScanUpdate&&e.selectedChannel?13:-1),o(),c("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)))},dependencies:[mt,A,pt,Se,fe,ht,L,B,Lt,Bt,Wt,Ct,gt,ye,jt],encapsulation:2})}}return i})();function an(i,d){if(i&1&&(a(0,"mat-option",6)(1,"div"),C(2,"img",7),a(3,"span"),p(4),r()()()),i&2){let t=d.$implicit;c("value",t.ChannelID),o(2),c("src",t.logo,M),o(2),K(t.Title)}}var Pt=(()=>{class i{constructor(){this.dialogRef=rt(kt),this.channels=rt(Rt),this.channelIds=vt([]),this.channelOptions=vt([])}ngOnInit(){this.initModalConfig();let t=this.channels.filter((n,e,l)=>l.findIndex(_=>_.ChannelID===n.ChannelID)===e);this.channelOptions.set(t)}initModalConfig(){this.modalConfig=new At,this.modalConfig.title="Detach Product",this.modalConfig.okText="Save"}onClose(){this.dialogRef.close()}onSave(){let t=this.channels.filter(n=>this.channelIds().includes(n.ChannelID)).map(n=>({ChannelID:n.ChannelID,ChannelItemID:n.ChannelItemID}));this.dialogRef.close(t)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=E({type:i,selectors:[["app-modal-detach-product"]],decls:8,vars:5,consts:[[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"ngModelChange","ngModel","multiple"],["class","channel-option",3,"value",4,"ngFor","ngForOf"],[1,"channel-option",3,"value"],[2,"width","18px","margin-right","10px",3,"src"]],template:function(n,e){n&1&&(a(0,"modal-material",0),f("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSave()}),a(1,"div",1)(2,"div")(3,"label",2),p(4,"Select a Channel"),r(),a(5,"mat-form-field",3)(6,"mat-select",4),O("ngModelChange",function(_){return T(e.channelIds,_)||(e.channelIds=_),_}),h(7,an,5,3,"mat-option",5),r()()()()()),n&2&&(c("dynamicValidated",e.channelIds().length>0)("config",e.modalConfig),o(6),D("ngModel",e.channelIds),c("multiple",!0),o(),c("ngForOf",e.channelOptions()))},dependencies:[mt,U,Lt,Bt,xe,we,Ie,ve,ht,L,B,Ct],encapsulation:2})}}return i})();var zt=i=>[i];function rn(i,d){if(i&1){let t=x();a(0,"button",14),f("click",function(){m(t);let e=s(2);return u(e.onDetachMultipleProduct())}),C(1,"i",15),p(2),r()}if(i&2){let t,n=s(2);o(2),b("Detach (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function ln(i,d){if(i&1&&(P(0),h(1,rn,3,1,"button",13),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?1:-1)}}function cn(i,d){if(i&1){let t=x();a(0,"button",18),f("click",function(){m(t);let e=s(3);return u(e.onOpenScanDialog())}),C(1,"i",19),p(2," Scan Channel "),r()}}function sn(i,d){if(i&1&&h(0,cn,3,0,"button",17),i&2){let t=s(2);c("ngIf",!t.productService.hasSelection(t.products))}}function dn(i,d){if(i&1&&(P(0),h(1,sn,1,1,"button",16),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?-1:1)}}function pn(i,d){if(i&1){let t=x();a(0,"button",21),f("click",function(){m(t);let e=s(2);return u(e.onScanMultipleProduct())}),C(1,"i",19),p(2),r()}if(i&2){let t,n=s(2);o(2),b(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function mn(i,d){if(i&1&&(P(0),h(1,pn,3,1,"button",20),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)&&t.multipeScanChannels.length>0?1:-1)}}function un(i,d){if(i&1){let t=x();a(0,"button",23),f("click",function(){m(t);let e=s(2);return u(e.onUploadMultipleProduct())}),C(1,"i",24),p(2),r()}if(i&2){let t,n=s(2);o(2),b(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function hn(i,d){if(i&1&&(P(0),h(1,un,3,1,"button",22),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?1:-1)}}function _n(i,d){if(i&1){let t=x();a(0,"div",25)(1,"app-product-card",26),f("onUpload",function(){let e=m(t).$implicit,l=s();return u(l.onUploadToMultipleChannel(e))})("onScan",function(){let e=m(t).$implicit,l=s();return u(l.onScanSingleProduct(e))})("onDescEvent",function(){let e=m(t).index,l=s();return u(l.onOpenDialogVariant(e))})("onCheckBoxChange",function(e){let l=m(t).$implicit;return u(l.selected=e)})("onDetach",function(){let e=m(t).$implicit,l=s();return u(l.onDetachProduct([e]))}),r()()}if(i&2){let t=d.$implicit,n=s();o(),c("productId",t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",n.productService.getChannelProduct(t))("code",n.getVariantCode(t==null?null:t.Variants))("showCheckBox",(t==null?null:t.Channel.length)<n.channelOptions.length)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function gn(i,d){i&1&&(P(0),a(1,"div",27),C(2,"app-empty-state"),r(),v())}function Cn(i,d){if(i&1){let t=x();P(0),a(1,"div",28)(2,"div",29)(3,"app-custom-paginator",30),f("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),r()()(),v()}if(i&2){let t=s();o(3),c("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}var je=(()=>{class i{constructor(t,n,e,l,_,y,at){this.http=t,this.toastr=n,this.dialog=e,this.productService=l,this.authService=_,this.uploadProductService=y,this.route=at,this.searchFilter=new it,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.scanProductRole=R.ProductScan,this.uploadProductRole=R.ProductUpload,this.detachProductRole=R.ProductDetach,this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[w.Tokopedia,w.Tiktok])}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(n=>{this.products=n.Data,this.rowCount=n.Total==null?this.searchFilter.RowCount:n.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(j,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.Async=e.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,n,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){let n=this.products[t]?.Variants||[];this.dialog.open(Gt,{data:{title:this.products[t].Name,variants:n},width:"800px"})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions,[w.Tokopedia,w.Tiktok]);this.dialog.open(j,{data:{filter:t,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(l=>g.IsNotEmpty(l))).subscribe(l=>{this.searchFilter.ChannelID=l.ChannelID,this.searchFilter.ScanFull=l.ScanFull,this.searchFilter.UpdatedProduct=l.UpdatedProduct;let _=this.productService.selectedProduct(this.products),y=this.productService.getVariantCodesProducts(_);this.scanSingleProduct(y)})}onScanSingleProduct(t){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=g.GuidEMpty,this.dialog.open(j,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID;let l=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(l)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${e?.Name} `,"Error")}this.searchFilter.ChannelID=g.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=g.GuidEMpty}})}getVariantCode(t=[]){let n;return t?.length>1&&(n=(t[0].model?t[0].model:"")+t[0].Code),t?.length==1&&(n=t[0].Code),n}onDetachProduct(t){let n=[];t.forEach(e=>{e.Channel=g.assignChannelLogo(e.Channel),n.push(...e.Channel)}),this.dialog.open(Pt,{width:"600px",data:[...n]}).afterClosed().pipe(F(e=>g.IsNotEmpty(e)),Ot(e=>this.productService.detachProduct(e))).subscribe(e=>{this.toastr.success(e.Message,Ut.Success),this.getProducts()})}onDetachMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.onDetachProduct(t)}static{this.\u0275fac=function(n){return new(n||i)(S(Z),S(Y),S(Q),S($),S(W),S(ft),S(et))}}static{this.\u0275cmp=E({type:i,selectors:[["app-in-pos"]],standalone:!1,decls:23,vars:22,consts:[["picker",""],["description","All products which is already available in POS",3,"onSubmit","headerTitle"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"mt-5"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"]],template:function(n,e){if(n&1){let l=x();a(0,"mainpanel",1),f("onSubmit",function(y){return m(l),u(e.searchProduct(y))}),a(1,"actions"),h(2,ln,2,1,"ng-container",2)(3,dn,2,1,"ng-container",2)(4,mn,2,1,"ng-container",2)(5,hn,2,1,"ng-container",2),r(),a(6,"filters")(7,"div")(8,"label",3),p(9,"Category"),r(),a(10,"ng-select",4),f("ngModelChange",function(y){return m(l),u(e.searchFilter.Category=y)}),r()(),a(11,"div",5)(12,"mat-date-range-input",6)(13,"input",7),O("ngModelChange",function(y){return m(l),T(e.startDate,y)||(e.startDate=y),u(y)}),f("click",function(){m(l);let y=J(16);return u(y.open())}),r(),a(14,"input",8),O("ngModelChange",function(y){return m(l),T(e.endDate,y)||(e.endDate=y),u(y)}),f("click",function(){m(l);let y=J(16);return u(y.open())}),r()(),C(15,"mat-date-range-picker",null,0),r()(),a(17,"content")(18,"div",9)(19,"div",10),h(20,_n,2,11,"div",11)(21,gn,3,0,"ng-container",12),r(),h(22,Cn,4,5,"ng-container",12),r()()()}if(n&2){let l=J(16);c("headerTitle","In POS ("+e.rowCount+")"),o(2),c("ngxPermissionsOnly",I(14,zt,e.detachProductRole)),o(),c("ngxPermissionsOnly",I(16,zt,e.scanProductRole)),o(),c("ngxPermissionsOnly",I(18,zt,e.scanProductRole)),o(),c("ngxPermissionsOnly",I(20,zt,e.scanProductRole)),o(5),c("clearable",!0)("items",e.Categories)("ngModel",e.searchFilter.Category),o(2),c("rangePicker",l),o(),D("ngModel",e.startDate),o(),D("ngModel",e.endDate),o(6),c("ngForOf",e.products),o(),c("ngIf",e.products.length==0),o(),c("ngIf",e.products.length>0)}},dependencies:[U,A,ut,L,B,G,nt,X,ot,z,De,Te,Oe,Fe,q],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]})}}return i})();var Yt=i=>[i];function fn(i,d){if(i&1){let t=x();a(0,"button",12),f("click",function(){m(t);let e=s(2);return u(e.onDetachMultipleProduct())}),C(1,"i",13),p(2),r()}if(i&2){let t,n=s(2);o(2),b("Detach (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function Sn(i,d){if(i&1&&(P(0),h(1,fn,3,1,"button",11),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?1:-1)}}function xn(i,d){if(i&1){let t=x();a(0,"button",15),f("click",function(){m(t);let e=s(2);return u(e.onOpenScanDialog())}),C(1,"i",16),p(2," Scan Channel "),r()}}function Pn(i,d){if(i&1&&(P(0),h(1,xn,3,0,"button",14),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?-1:1)}}function vn(i,d){if(i&1){let t=x();a(0,"button",18),f("click",function(){m(t);let e=s(2);return u(e.onScanMultipleProduct())}),C(1,"i",16),p(2),r()}if(i&2){let t=s(2);o(2),b(" Scan (",t.productService.selectedProduct(t.products).length,") ")}}function yn(i,d){if(i&1&&(P(0),h(1,vn,3,1,"button",17),v()),i&2){let t=s();o(),V(t.multipeScanChannels.length>0&&t.productService.hasSelection(t.products)?1:-1)}}function bn(i,d){if(i&1){let t=x();a(0,"button",20),f("click",function(){m(t);let e=s(2);return u(e.onUploadMultipleProduct())}),C(1,"i",21),p(2),r()}if(i&2){let t=s(2);o(2),b(" Upload (",t.productService.selectedProduct(t.products).length,") ")}}function In(i,d){if(i&1&&(P(0),h(1,bn,3,1,"button",19),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?1:-1)}}function wn(i,d){if(i&1&&(a(0,"span",22),C(1,"img",23),r(),p(2)),i&2){let t=d.item;o(),c("src",t.Img,M)("alt",t.Name),o(),b(" ",t.Name," ")}}function Mn(i,d){if(i&1){let t=x();a(0,"div",24)(1,"label",25),p(2,"Item ID"),r(),a(3,"input",26),O("ngModelChange",function(e){m(t);let l=s();return T(l.searchFilter.Item_id,e)||(l.searchFilter.Item_id=e),u(e)}),r()()}if(i&2){let t=s();o(3),D("ngModel",t.searchFilter.Item_id)}}function Dn(i,d){if(i&1){let t=x();a(0,"div",27)(1,"app-product-card",28),f("onUpload",function(){let e=m(t).$implicit,l=s();return u(l.onUploadToMultipleChannel(e))})("onDescEvent",function(){let e=m(t).index,l=s();return u(l.onOpenVariantDetail(e))})("onScan",function(){let e=m(t).$implicit,l=s();return u(l.onScanSingleProduct(e))})("onCheckBoxChange",function(e){let l=m(t).$implicit;return u(l.selected=e)})("onDetach",function(){let e=m(t).$implicit,l=s();return u(l.onDetachProduct([e]))}),r()()}if(i&2){let t=d.$implicit,n=s();o(),c("productId",t==null?null:t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",n.productService.getChannelProduct(t))("code",n.getVariantCode(t==null?null:t.Variants))("showCheckBox",t==null?null:t.hasScan)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function Tn(i,d){i&1&&(P(0),a(1,"div",29),C(2,"app-empty-state"),r(),v())}function On(i,d){if(i&1){let t=x();a(0,"div",30)(1,"div",31)(2,"app-custom-paginator",32),f("total",function(){m(t);let e=s();return u(e.getRowCount())})("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),r()()()}if(i&2){let t=s();o(2),c("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var We=(()=>{class i{constructor(t,n,e,l,_,y,at,Dt){this.http=t,this.dialog=n,this.toastr=e,this.productService=l,this.activateRouter=_,this.authService=y,this.route=at,this.uploadProductService=Dt,this.searchFilter=new it,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=g.GuidEMpty,this.multipeScanChannels=[],this.scanProductRole=R.ProductScan,this.uploadProductRole=R.ProductUpload,this.detachProductRole=R.ProductDetach,this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(g.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(n=>{this.searchFilter=n.Filter,n.Filter.ChannelID!=g.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(n.Filter.ChannelID)),this.searchFilter.PageSize=n.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[w.Tokopedia,w.Tiktok])}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(n=>{this.products=n.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let n=this.products[t].Variants;this.dialog.open(Gt,{data:{variants:n,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(j,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.Async=e.Async,this.scanAllProduct()})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(F(n=>n)).subscribe(n=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(n,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(g.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(j,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID;let l=this.productService.getVariantCodesProduct(t);this.scanProducts(l)})}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}onScanMultipleProduct(){this.searchFilter.ChannelID=g.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(j,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct;let l=this.productService.selectedProduct(this.products),_=this.productService.getVariantCodesProducts(l);this.scanProducts(_)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:n=>{let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);n?this.toastr.success(`Product Successfully scan with ${e?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${e?.Name} `,"Error"),this.searchFilter.ChannelID=g.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=g.GuidEMpty}})}getVariantCode(t){let n;return t.length>1&&(n=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(n=t[0].Code),n}onClearFilterChannel(){this.searchFilter.ChannelID=g.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Total})}onDetachProduct(t){let n=[];t.forEach(e=>{e.Channel=g.assignChannelLogo(e.Channel),n.push(...e.Channel)}),this.dialog.open(Pt,{width:"600px",data:[...n]}).afterClosed().pipe(F(e=>g.IsNotEmpty(e)),Ot(e=>this.productService.detachProduct(e))).subscribe(e=>{this.toastr.success(e.Message,Ut.Success),this.getProducts()})}onDetachMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.onDetachProduct(t)}static{this.\u0275fac=function(n){return new(n||i)(S(Z),S(Q),S(Y),S($),S(Et),S(W),S(et),S(ft))}}static{this.\u0275cmp=E({type:i,selectors:[["app-sold-in-channel"]],standalone:!1,decls:19,vars:21,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"onSubmit","headerTitle"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],["class","mt-5",4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["class","row",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"mt-5"],[1,"fw-bold"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onDescEvent","onScan","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(a(0,"mainpanel",0),f("onSubmit",function(_){return e.searchProduct(_)}),a(1,"actions"),h(2,Sn,2,1,"ng-container",1)(3,Pn,2,1,"ng-container",1)(4,yn,2,1,"ng-container",1)(5,In,2,1,"ng-container",1),r(),a(6,"filters")(7,"div")(8,"label",2),p(9,"Channel"),r(),a(10,"ng-select",3),f("ngModelChange",function(_){return e.searchFilter.ListChannelID=_})("clear",function(){return e.onClearFilterChannel()}),h(11,wn,3,3,"ng-template",4),r()(),h(12,Mn,4,1,"div",5),r(),a(13,"content")(14,"div",6)(15,"div",7),h(16,Dn,2,11,"div",8)(17,Tn,3,0,"ng-container",9),r(),h(18,On,3,4,"div",10),r()()()),n&2&&(c("headerTitle","Sold in Channel"),o(2),c("ngxPermissionsOnly",I(13,Yt,e.detachProductRole)),o(),c("ngxPermissionsOnly",I(15,Yt,e.scanProductRole)),o(),c("ngxPermissionsOnly",I(17,Yt,e.scanProductRole)),o(),c("ngxPermissionsOnly",I(19,Yt,e.uploadProductRole)),o(5),c("clearable",!0)("multiple",!0)("items",e.channelOptions)("ngModel",e.searchFilter.ListChannelID),o(2),c("ngIf",e.searchFilter.ListChannelID!=null),o(4),c("ngForOf",e.products),o(),c("ngIf",e.products.length==0),o(),c("ngIf",e.products==null?null:e.products.length))},dependencies:[U,A,ut,L,B,G,nt,_t,Vt,X,ot,z,q],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]})}}return i})();var Zt=i=>[i];function Fn(i,d){if(i&1){let t=x();a(0,"button",12),f("click",function(){m(t);let e=s(3);return u(e.uploadMultipleProduct())}),C(1,"i",13),p(2),r()}if(i&2){let t=s(3);o(2),b(" upload (",t.selectedProducts==null?null:t.selectedProducts.length,") ")}}function En(i,d){if(i&1&&(P(0),h(1,Fn,3,1,"button",11),v()),i&2){let t=s(2);o(),c("ngIf",t.hasSelectionProduct)}}function Nn(i,d){if(i&1){let t=x();P(0),a(1,"button",14),f("click",function(){m(t);let e=s(2);return u(e.openScanDialog())}),C(2,"i",15),p(3," Scan Channel "),r(),v()}}function Vn(i,d){i&1&&(P(0),C(1,"th",23),v())}function kn(i,d){if(i&1){let t=x();P(0),a(1,"td",30)(2,"input",31),O("ngModelChange",function(e){m(t);let l=s(3).$implicit;return T(l.selected,e)||(l.selected=e),u(e)}),f("ngModelChange",function(){m(t);let e=s(4).ngIf,l=s(3);return u(l.onSelectProduct(e))}),r()(),v()}if(i&2){let t=s(3).$implicit;o(),c("rowSpan",t==null?null:t.Variants.length),o(),D("ngModel",t.selected)}}function Rn(i,d){if(i&1&&(P(0),h(1,kn,3,2,"ng-container",10),v()),i&2){let t=s().index;o(),c("ngIf",t==0)}}function Un(i,d){if(i&1){let t=x();P(0),a(1,"img",36),f("click",function(e){m(t);let l=s(3).$implicit,_=s(4);return u(_.onZoomImage(e,l==null?null:l.ImageUrl))}),r(),v()}if(i&2){let t=s(3).$implicit;o(),c("src",t==null?null:t.ImageUrl,M)}}function An(i,d){i&1&&C(0,"img",37)}function Ln(i,d){if(i&1&&(P(0),a(1,"td",30)(2,"div",32),h(3,Un,2,1,"ng-container",9)(4,An,1,0,"ng-template",null,1,H),r()(),a(6,"td",33)(7,"h4",34)(8,"span",35),p(9),r()()(),v()),i&2){let t=J(5),n=s(2).$implicit;o(),c("rowSpan",n==null?null:n.Variants.length),o(2),c("ngIf",n==null?null:n.ImageUrl)("ngIfElse",t),o(3),c("rowSpan",n==null?null:n.Variants.length),o(2),c("matTooltip",(n==null||n.Name==null?null:n.Name.length)>50?n==null?null:n.Name:""),o(),b(" ",n==null?null:n.Name," ")}}function Bn(i,d){if(i&1&&(a(0,"div")(1,"a",26),C(2,"img",38),r()()),i&2){let t=d.$implicit;o(),c("href",t.URL,M),o(),c("src",t.Img,M)("matTooltip",t.Name)}}function jn(i,d){if(i&1&&(a(0,"div"),C(1,"img",38),r()),i&2){let t=d.$implicit;o(),c("src",t.Img,M)("matTooltip",t.Name)}}function Wn(i,d){if(i&1&&(a(0,"tr"),h(1,Rn,2,1,"ng-container",4)(2,Ln,10,6,"ng-container",10),a(3,"td"),p(4),r(),a(5,"td")(6,"span"),p(7),r(),a(8,"span",25)(9,"a",26),C(10,"i",27),r()()(),a(11,"td",28)(12,"div",29),h(13,Bn,3,3,"div",24),r()(),a(14,"td",28)(15,"div",29),h(16,jn,2,2,"div",24),r()()()),i&2){let t=d.$implicit,n=d.index,e=s(5);o(),c("ngxPermissionsOnly",I(7,Zt,e.uploadProductRole)),o(),c("ngIf",n==0),o(2),b(" ",t.Name," "),o(3),b(" ",t.Code," "),o(2),c("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),M),o(4),c("ngForOf",t==null?null:t.Available),o(3),c("ngForOf",t==null?null:t.NotAvailable)}}function Gn(i,d){if(i&1&&(P(0),h(1,Wn,17,9,"tr",24),v()),i&2){let t=d.$implicit;o(),c("ngForOf",t.Variants)}}function $n(i,d){if(i&1&&(a(0,"tbody"),h(1,Gn,2,1,"ng-container",24),r()),i&2){let t=d.ngIf;o(),c("ngForOf",t)}}function zn(i,d){if(i&1&&(P(0),a(1,"div",16)(2,"table",17)(3,"thead",18)(4,"tr"),h(5,Vn,2,0,"ng-container",4),a(6,"th",19),p(7," Product "),r(),a(8,"th",20),p(9,"Variant"),r(),a(10,"th",20),p(11,"SKU"),r(),a(12,"th",21),p(13,"Available In"),r(),a(14,"th",22),p(15,"Not Available In"),r()()(),h(16,$n,2,1,"tbody",10),N(17,"async"),r()(),v()),i&2){let t=s(2);o(5),c("ngxPermissionsOnly",I(4,Zt,t.uploadProductRole)),o(11),c("ngIf",k(17,2,t.data$))}}function Kn(i,d){i&1&&(a(0,"div",39),C(1,"app-empty-state"),r())}function Jn(i,d){if(i&1){let t=x();a(0,"span",47),f("click",function(){m(t);let e=s(4);return u(e.getRowCount())}),a(1,"i",48),p(2,"?"),r()()}}function Hn(i,d){if(i&1&&(a(0,"span"),p(1),N(2,"number"),r()),i&2){let t=d.ngIf;o(),K(k(2,1,t==null?null:t.Count))}}function Yn(i,d){if(i&1){let t=x();a(0,"a",49),f("click",function(){m(t);let e=s(4);return u(e.onNextPage())}),C(1,"i",50),p(2," Next"),r()}}function Zn(i,d){if(i&1){let t=x();a(0,"a",51),f("click",function(){m(t);let e=s(4);return u(e.onLastPage())}),C(1,"i",52),p(2," Last"),r()}}function qn(i,d){if(i&1&&(P(0),a(1,"div",40)(2,"div",41)(3,"div",42),p(4),N(5,"number"),h(6,Jn,3,0,"span",43)(7,Hn,3,3,"span",10),N(8,"async"),p(9),r()(),a(10,"div",44),h(11,Yn,3,0,"a",45)(12,Zn,3,0,"a",46),r()(),v()),i&2){let t=s().ngIf,n=s(2);o(4),b(" Showing 1 - ",k(5,6,t==null?null:t.length)," of "),o(2),c("ngIf",n.paginationService.hideCount),o(),c("ngIf",!n.paginationService.hideCount&&k(8,8,n.rowCount$)),o(2),b(" records ~ ",n.paginationService.footerPageNumber," Page "),o(2),c("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage),o(),c("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage)}}function Qn(i,d){if(i&1&&(P(0),h(1,qn,13,10,"ng-container",10),v()),i&2){let t=d.ngIf;o(),c("ngIf",(t==null?null:t.length)>0)}}function Xn(i,d){if(i&1){let t=x();a(0,"mainpanel",3),f("onSubmit",function(e){m(t);let l=s();return u(l.searchProduct(e))}),a(1,"actions"),h(2,En,2,1,"ng-container",4)(3,Nn,4,0,"ng-container",4),a(4,"button",5),f("click",function(){m(t);let e=s();return u(e.openExportDialog())}),C(5,"i",6),a(6,"span"),p(7,"Export"),r()()(),a(8,"content")(9,"div",7)(10,"div",8),h(11,zn,18,6,"ng-container",9),N(12,"async"),h(13,Kn,2,0,"ng-template",null,0,H),r(),h(15,Qn,2,1,"ng-container",10),N(16,"async"),r()()()}if(i&2){let t,n=J(14),e=s();c("hideSearchDropdown",!0),o(2),c("ngxPermissionsOnly",I(10,Zt,e.uploadProductRole)),o(),c("ngxPermissionsOnly",I(12,Zt,e.scanProductRole)),o(8),c("ngIf",((t=k(12,6,e.data$))==null?null:t.length)>0)("ngIfElse",n),o(4),c("ngIf",k(16,8,e.data$))}}var Ge=(()=>{class i{constructor(t,n,e,l,_,y,at,Dt,He){this.http=t,this.dialog=n,this.toastr=e,this.route=l,this.productService=_,this.paginationService=y,this.biggerPictureService=at,this.authService=Dt,this.uploadProductService=He,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.scanProductRole=R.ProductScan,this.uploadProductRole=R.ProductUpload,this.channelOptions=Dt.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(ie(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Tt(t=>(t=t.map(n=>(n.Variants=n.Variants.map(e=>(e.Available=this.productService.sortChannel(e.Available),e.NotAvailable=this.productService.sortChannel(e.NotAvailable),e.Available=this.assignLogoChannel(e.Available),e.NotAvailable=this.assignLogoChannel(e.NotAvailable),e)),n.Channel=n?.Variants[0]?.Available,n)),t)))}assignLogoChannel(t){return t=t.map(n=>(n.Img=g.getChannelLogoByTypeId(n.TypeID),n)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(){let t=this.productService.findChannelById(this.filterSearch.ChannelID,this.channelOptions);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(n=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(n,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=g.GuidEMpty,this.dialog.open(j,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.filterSearch.ChannelID=e.ChannelID,this.filterSearch.ScanFull=e.ScanFull,this.filterSearch.UpdatedProduct=e.UpdatedProduct,this.filterSearch.Async=e.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,n){this.biggerPictureService.openBiggerPicture(t,n)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(Ne,{data:{title:"Export Not In Channel",pageNumber:this.filterSearch.PageNumber,rowCount:this.filterSearch.RowCount,filterExport:this.filterSearch,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}static{this.\u0275fac=function(n){return new(n||i)(S(Z),S(Q),S(Y),S(et),S($),S(Ve),S(Me),S(W),S(ft))}}static{this.\u0275cmp=E({type:i,selectors:[["app-not-in-channel"]],standalone:!1,decls:2,vars:3,consts:[["EMPTY",""],["elsePic",""],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","hideSearchDropdown"],[4,"ngxPermissionsOnly"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[2,"width","10px"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(n,e){n&1&&(h(0,Xn,17,14,"mainpanel",2),N(1,"async")),n&2&&c("ngIf",k(1,1,e.loader$))},dependencies:[U,A,de,L,B,G,gt,z,q,pt,Ft],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]})}}return i})();var te=i=>[i],ti=()=>[];function ei(i,d){if(i&1){let t=x();a(0,"button",16),f("click",function(){m(t);let e=s(2);return u(e.openScanDialog())}),C(1,"i",17),p(2," Scan Channel "),r()}}function ni(i,d){if(i&1&&(P(0),h(1,ei,3,0,"button",15),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?-1:1)}}function ii(i,d){if(i&1){let t=x();a(0,"button",19),f("click",function(){m(t);let e=s(2);return u(e.onDownloadAllProduct("SELECTED"))}),C(1,"i",20),p(2),r()}if(i&2){let t,n=s(2);o(2),b(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function oi(i,d){if(i&1&&(P(0),h(1,ii,3,1,"button",18),v()),i&2){let t=s();o(),V(t.productService.hasSelection(t.products)?1:-1)}}function ai(i,d){if(i&1&&(a(0,"span",21),C(1,"img",22),r(),p(2)),i&2){let t=d.item;o(),c("src",t.Img,M)("alt",t.Name),o(),b(" ",t.Name," ")}}function ri(i,d){if(i&1){let t=x();a(0,"div",23)(1,"app-product-card",24),f("onCheckBoxChange",function(e){let l=m(t).index,_=s();return u(_.onSelectProduct(e,l))})("onDescEvent",function(){let e=m(t).index,l=s();return u(l.onShowVariantDetail(e))})("onDownload",function(){let e=m(t).$implicit,l=s();return u(l.onDownloadProduct(e))})("onScan",function(){let e=m(t).$implicit,l=s();return u(l.onScanChannel(e))}),r()()}if(i&2){let t=d.$implicit,n=s();o(),c("showRedirectIcon",!1)("title",t==null?null:t.Name)("image",t==null?null:t.Image)("imageForZoom",t==null?null:t.Image)("code",t==null?null:t.SKU)("description",(t==null||t.Variant==null?null:t.Variant.length)>0?(t==null||t.Variant==null?null:t.Variant.length)+" Variants":null)("downloadButton",!0)("channels",t!=null&&t.Channel?I(10,te,t==null?null:t.Channel):lt(12,ti))("showCheckBox",n.hasDownloadRole())("scanButton",!0)}}function li(i,d){i&1&&(P(0),a(1,"div",25),C(2,"app-empty-state"),r(),v())}function ci(i,d){if(i&1){let t=x();a(0,"div",26)(1,"div",27)(2,"app-custom-paginator",28),f("total",function(){m(t);let e=s();return u(e.getRowCount())})("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),r()()()}if(i&2){let t=s();o(2),c("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var $e=(()=>{class i{constructor(t,n,e,l,_,y){this.http=t,this.dialog=n,this.productService=e,this.toastrService=l,this.activateRouter=_,this.authService=y,this.permissionService=rt(pe),this.searchFilter=new it,this.products=[],this.hasClickRowCount=!1,this.scanProductRole=R.ProductScan,this.downloadProductRole=R.ProductDownload,this.hasDownloadRole=vt(!0),this.channelOptions=this.authService.getChannels(),this.permissionService.hasPermission(this.downloadProductRole).then(at=>{this.hasDownloadRole.set(at)})}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(g.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(n=>{this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(n=>(t=this.channelOptions.find(e=>e.ID==n.ChannelID),t?n.Channel=JSON.parse(JSON.stringify(t)):n.Channel=null,n)).map(n=>(n.Channel&&(n.Channel.Url=n.Url),n))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?g.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=g.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(g.GuidEMpty),this.productService.successToastrScanAllProduct(n,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=g.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=g.GuidEMpty,this.dialog.open(j,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>g.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.Async=e.Async,this.onScanAll()})}onDownloadAllProduct(t){let n;t=="ALL"?n=this.products:n=this.productService.selectedProduct(this.products),n.length>0&&this.productService.downloadMultipleProduct(n).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,n){this.products[n].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let n=JSON.parse(JSON.stringify(t));delete n.Channel,this.productService.scanCompareToPos([n]).subscribe(e=>{e.Status?(this.initPageLoader(g.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let n=this.products[t].Variant;n.length>0&&this.dialog.open(ke,{data:{title:this.products[t].Name,variants:n},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Count})}static{this.\u0275fac=function(n){return new(n||i)(S(Z),S(Q),S($),S(Y),S(Et),S(W))}}static{this.\u0275cmp=E({type:i,selectors:[["app-not-in-pos"]],standalone:!1,decls:30,vars:17,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp",""],[1,"mt-5"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(a(0,"mainpanel",0),f("onSubmit",function(_){return e.onSearch(_)}),a(1,"actions"),h(2,ni,2,1,"ng-container",1)(3,oi,2,1,"ng-container",1),r(),a(4,"filters")(5,"div")(6,"label",2),p(7,"Channel"),r(),a(8,"ng-select",3),O("ngModelChange",function(_){return T(e.searchFilter.ChannelID,_)||(e.searchFilter.ChannelID=_),_}),h(9,ai,3,3,"ng-template",4),r()(),a(10,"div",5)(11,"label",6),p(12,"SKU Assigned"),r(),a(13,"mat-radio-group",7),O("ngModelChange",function(_){return T(e.searchFilter.HaveSku,_)||(e.searchFilter.HaveSku=_),_}),a(14,"mat-radio-button",8),p(15," All "),r(),a(16,"mat-radio-button",8),p(17," Yes "),r(),a(18,"mat-radio-button",8),p(19," No "),r()()(),a(20,"div",5)(21,"label",6),p(22,"Item ID"),r(),a(23,"input",9),O("ngModelChange",function(_){return T(e.searchFilter.Item_id,_)||(e.searchFilter.Item_id=_),_}),r()()(),a(24,"content")(25,"div",10)(26,"div",11),h(27,ri,2,13,"div",12)(28,li,3,0,"ng-container",13),r(),h(29,ci,3,4,"div",14),r()()()),n&2&&(o(2),c("ngxPermissionsOnly",I(13,te,e.scanProductRole)),o(),c("ngxPermissionsOnly",I(15,te,e.downloadProductRole)),o(5),c("clearable",!0)("items",e.channelOptions),D("ngModel",e.searchFilter.ChannelID),o(5),D("ngModel",e.searchFilter.HaveSku),o(),c("value",0),o(2),c("value",1),o(2),c("value",2),o(5),D("ngModel",e.searchFilter.Item_id),o(4),c("ngForOf",e.products),o(),c("ngIf",e.products.length==0),o(),c("ngIf",(e.products==null?null:e.products.length)>0))},dependencies:[U,A,ut,L,B,G,nt,_t,jt,Wt,X,ot,z,q],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]})}}return i})();function si(i,d){if(i&1&&(a(0,"span",9),C(1,"img",10),r(),p(2)),i&2){let t=d.item,n=s();o(),c("src",n.getChannelLogo(t.TypeID),M),o(),b(" ",t.Name," ")}}function di(i,d){if(i&1&&(a(0,"div",11),C(1,"app-duplicate-product-card",12),r()),i&2){let t=d.$implicit,n=d.index;o(),c("imageForZoom",t.ImageUrl)("title",t.Name)("code",t.Code)("id",n)("image",t.ThumbnailURL)("channels",t.Channels)}}function pi(i,d){i&1&&(P(0),a(1,"div",13),C(2,"app-empty-state"),r(),v())}function mi(i,d){if(i&1){let t=x();P(0),a(1,"div",14)(2,"div",15)(3,"app-custom-paginator",16),f("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())})("total",function(){m(t);let e=s();return u(e.getRowCount())}),r()()(),v()}if(i&2){let t=s();o(3),c("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickedRowCount)}}var ze=(()=>{class i{constructor(t,n,e){this.httpService=t,this.productService=n,this.authService=e,this.searchFilter=new it,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=e.getChannels()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(n=>{this.products=n.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=g.GuidEMpty}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}static{this.\u0275fac=function(n){return new(n||i)(S(Z),S($),S(W))}}static{this.\u0275cmp=E({type:i,selectors:[["app-duplicate-sku"]],standalone:!1,decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","multiple","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(a(0,"mainpanel",0),f("onSubmit",function(_){return e.onSearch(_)}),a(1,"filters")(2,"div",1)(3,"div")(4,"h6",2),p(5,"Channel"),r(),a(6,"ng-select",3),O("ngModelChange",function(_){return T(e.searchFilter.ListChannelID,_)||(e.searchFilter.ListChannelID=_),_}),f("clear",function(){return e.onClearFilter()}),h(7,si,3,2,"ng-template",4),r()()()(),a(8,"content")(9,"div",5)(10,"div",6),h(11,di,2,6,"div",7)(12,pi,3,0,"ng-container",8),r(),h(13,mi,4,4,"ng-container",8),r()()()),n&2&&(o(6),c("multiple",!0)("clearable",!0)("items",e.channelOptions),D("ngModel",e.searchFilter.ListChannelID),o(5),c("ngForOf",e.products),o(),c("ngIf",(e.products==null?null:e.products.length)==0),o(),c("ngIf",(e.products==null?null:e.products.length)>0))},dependencies:[U,A,L,B,G,nt,_t,Vt,$t,X,z],encapsulation:2})}}return i})();var ui=()=>["/menu/products/status/sold-in-channel"],Ke=i=>({ID:i}),hi=()=>["/menu/products/status/not-in-pos"],_i=i=>[i];function gi(i,d){if(i&1&&(P(0),p(1),v()),i&2){let t=s().$implicit;o(),b(" ",t.Count," ")}}function Ci(i,d){if(i&1){let t=x();a(0,"span",25),f("click",function(){m(t);let e=s().$implicit,l=s(2);return u(l.getLiveProductCount(e.ID,e))}),C(1,"i",26),r()}}function fi(i,d){if(i&1){let t=x();P(0),a(1,"button",27),f("click",function(){m(t);let e=s().$implicit,l=s(2);return u(l.onScanChannel(e))}),C(2,"i",28),p(3," Scan "),r(),v()}}function Si(i,d){if(i&1){let t=x();a(0,"tr")(1,"td"),C(2,"img",17),a(3,"span",18),p(4),r()(),a(5,"td",19),h(6,gi,2,1,"ng-container",6)(7,Ci,2,0,"ng-template",null,1,H),r(),a(9,"td",19)(10,"a",20),p(11),N(12,"number"),r()(),a(13,"td",19)(14,"a",20),p(15),N(16,"number"),r()(),a(17,"td"),p(18),N(19,"date"),r(),a(20,"td")(21,"div",21),h(22,fi,4,0,"ng-container",22),a(23,"button",23),f("click",function(){let e=m(t).$implicit,l=s(2);return u(l.onClearCache(e.ID))}),C(24,"i",24),p(25," Clear "),r()()()()}if(i&2){let t=d.$implicit,n=J(8),e=s(2);o(2),c("src",e.getChannelLogo(t.TypeID),M),o(2),K(t.Name),o(2),c("ngIf",t.Count!==void 0)("ngIfElse",n),o(4),c("routerLink",lt(19,ui))("queryParams",I(20,Ke,t.ID)),o(),b(" ",k(12,12,t.SoldInChannel)," "),o(3),c("routerLink",lt(22,hi))("queryParams",I(23,Ke,t.ID)),o(),b(" ",k(16,14,t.NotInPOS)," "),o(3),b(" ",t.LastSync?re(19,16,t.LastSync,"dd MMM yyyy HH:mm"):"Never"," "),o(4),c("ngxPermissionsOnly",I(25,_i,e.scanProductRole))}}function xi(i,d){if(i&1&&(P(0),a(1,"div",7)(2,"table",8)(3,"thead",9)(4,"tr",10)(5,"th"),p(6,"Channel"),r(),a(7,"th",11),p(8," Live Product "),r(),a(9,"th",12),p(10," Sold In Channel "),r(),a(11,"th",13),p(12," Product Not in POS "),r(),a(13,"th",14),p(14,"Last Sync"),r(),C(15,"th",15),r()(),a(16,"tbody"),h(17,Si,26,27,"tr",16),N(18,"async"),r()()(),v()),i&2){let t,n=s();o(17),c("ngForOf",(t=k(18,1,n.channels$))==null?null:t.Data)}}function Pi(i,d){i&1&&(a(0,"div",29),C(1,"app-empty-state"),r())}var Je=(()=>{class i{constructor(t,n,e,l){this.productService=t,this.toastr=n,this.dialog=e,this.authService=l,this.scanProductRole=R.ProductScan,this.destroy$=new ee,this.channelOptions=l.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,n){this.productService.getTotalProductLive(t).pipe(qt(this.destroy$)).subscribe(e=>{n.Count=e.Count})}onScanChannel(t){this.dialog.open(j,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(F(n=>g.IsNotEmpty(n))).subscribe(n=>{this.scanAllProduct(t.ID,n)})}scanAllProduct(t,n){let e=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async).pipe(F(l=>l)).subscribe(l=>{n.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(l,e,!n.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(qt(this.destroy$)).subscribe(e=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return g.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(n){return new(n||i)(S($),S(Y),S(Q),S(W))}}static{this.\u0275cmp=E({type:i,selectors:[["app-channel-statistic"]],standalone:!1,decls:9,vars:6,consts:[["EMPTY",""],["QUESTION",""],["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngxPermissionsOnly"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,e){if(n&1&&(a(0,"mainpanel",2)(1,"content")(2,"div",3)(3,"div",4)(4,"div",5),h(5,xi,19,3,"ng-container",6),N(6,"async"),h(7,Pi,2,0,"ng-template",null,0,H),r()()()()()),n&2){let l,_=J(8);c("hideSearchBox",!0)("hideSearchDropdown",!0),o(5),c("ngIf",((l=k(6,4,e.channels$))==null||l.Data==null?null:l.Data.length)>0)("ngIfElse",_)}},dependencies:[U,A,G,gt,Nt,z,q,pt,Ft,le],encapsulation:2})}}return i})();var vi=[{component:Ue,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:je,canActivate:[ct,st],data:{title:"Products in POS"}},{path:"sold-in-channel",component:We,canActivate:[ct,st],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:Ge,canActivate:[ct,st],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:$e,canActivate:[ct,st],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:ze,canActivate:[ct,st],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:Je,canActivate:[ct,st],data:{title:"Channel Statistic"}}]}],Ma=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ae({type:i})}static{this.\u0275inj=oe({imports:[mt,ht,ge,Ct,ue,Re,Pe,_e,$t,X,ot,se.forChild(vi),Ee,be,Pt,me]})}}return i})();export{Ma as StatusModule};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as C}from"./chunk-4CTORK4F.js";import{a as r}from"./chunk-NJFNMUFH.js";import"./chunk-I3LFKNW4.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CMZW5QAE.js";import"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import{a as h,b as y}from"./chunk-TNKPTRB3.js";import"./chunk-PW42BQIY.js";import"./chunk-MZI5AYCE.js";import"./chunk-UJYSVGLV.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{F as v,J as o,n}from"./chunk-MTUIRWOB.js";import{Gb as l,Hb as s,Qc as f,Yb as u,ic as c,jc as d,ka as m,kc as i,rb as p}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var M=(()=>{class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"},{Title:"Different Inventory",Url:"/menu/inventory/channel_summary"}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["app-inventory"]],features:[f([C])],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,b){t&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),d()()(),i(4,"router-outlet")),t&2&&(p(3),u("Tabs",b.inventoryTabs))},dependencies:[n,y,h,o,v],encapsulation:2})}}return e})();var g=[{path:"",component:M,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-YZ74HE2T.js").then(e=>e.MultiChannelComparison)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-IUI6TA5K.js").then(e=>e.SingleChannelComparisonComponent)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-OH6LACWK.js").then(e=>e.ChannelSummaryComponent)},canActivate:[r],data:{title:"Different Inventory"}}]}],E=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=s({type:e})}static{this.\u0275inj=m({imports:[n,o.forChild(g)]})}}return e})();export{E as InventoryRoutingModule};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as de}from"./chunk-BQTUAYGY.js";import"./chunk-AGRVVEIR.js";import"./chunk-ZNDU44GH.js";import"./chunk-5XI7HWS5.js";import"./chunk-WGXUKTYP.js";import"./chunk-4CTORK4F.js";import{a as he}from"./chunk-54JEYTAI.js";import{a as D}from"./chunk-XHAXYWZ7.js";import{a as pe}from"./chunk-YPVYJUXS.js";import"./chunk-6MPSYC77.js";import{c as me,d as R}from"./chunk-GOS4RIF2.js";import"./chunk-NZA4BEER.js";import"./chunk-JV4MMNGD.js";import"./chunk-GZXQUJKX.js";import"./chunk-ALKC77XL.js";import"./chunk-NTW6FBP5.js";import"./chunk-LR4UZ2OS.js";import"./chunk-F4GMWHYJ.js";import"./chunk-UPYS4A4M.js";import{a as ce}from"./chunk-JOBWFOGC.js";import"./chunk-PO7JVKK3.js";import"./chunk-LHD7CYML.js";import"./chunk-DJILLV4M.js";import"./chunk-SH7KN2AS.js";import"./chunk-OKAPL3YZ.js";import"./chunk-SDUUFQUI.js";import"./chunk-3RK6DDJD.js";import"./chunk-MQXPOHBV.js";import"./chunk-M5IQRAHV.js";import{a as ee}from"./chunk-5DIRXS7I.js";import"./chunk-OZ7LWNOK.js";import"./chunk-VRI3CYGG.js";import"./chunk-AVEGIEYT.js";import"./chunk-2TZBEYNY.js";import"./chunk-SXLKJLAE.js";import{i as w}from"./chunk-I3LFKNW4.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CMZW5QAE.js";import{b as te,e as ne}from"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import"./chunk-HPYTL6TX.js";import{c as C}from"./chunk-PW42BQIY.js";import{d as oe,l as re,m as le,n as se}from"./chunk-6X2OBNJQ.js";import{c as K,h as q,m as X,o as Y,z as Z}from"./chunk-CSSG7NAJ.js";import"./chunk-MZI5AYCE.js";import{b as ie,c as ae}from"./chunk-UJYSVGLV.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{g as $,j as Q,n as J}from"./chunk-MTUIRWOB.js";import{$c as I,G as U,Gb as A,Gc as v,Kc as T,Lc as E,Mb as u,Mc as x,Qc as H,Ra as M,Sc as z,Yb as h,ad as y,ea as k,ic as s,ja as j,jc as p,kc as G,lc as N,mc as F,nc as W,oc as L,pa as S,rb as c,tc as g,uc as m,xb as d,ya as b,za as P}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import{a as V,b as B}from"./chunk-66YHNWRR.js";var O=(()=>{class o{constructor(){this.authService=S(w),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(t,i){let e=Object.assign([],this.channelOptions),n=[],a;return t.forEach(r=>{a=e.find(l=>l.ID==r?.parent?.id),a&&(a=B(V({},a),{Name:`${r?.parent?.label} - ${r?.label}`,LocationID:r?.id}),n.push(a))}),i.forEach(r=>{a=e.find(l=>l.ID==r.id),a&&n.push(a)}),n}generateFilterLocation(t,i){let e=[],n=[],a=[];return t.length>0?(e=t.map(r=>r.id),n=t.filter(r=>C.IsNotEmpty(r?.parent?.id)).map(r=>r?.parent?.id).filter((r,l,_)=>_.indexOf(r)===l)):(e=[],n=[]),a=i.map(r=>r.id),a=a.concat(n).filter((r,l,_)=>_.indexOf(r)===l),{locationIds:e,channelIds:a}}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275prov=j({token:o,factory:o.\u0275fac})}}return o})();var ge=o=>[o];function Ce(o,f){if(o&1){let t=L();s(0,"button",16),g("click",function(){b(t);let e=m(2).ngIf,n=m();return P(n.onUpdateItems(e))}),G(1,"i",17),v(2," Update "),p()}}function fe(o,f){if(o&1&&(N(0),u(1,Ce,3,0,"button",15),F()),o&2){let t=m().ngIf,i=m();c(),h("ngIf",i.productService.hasSelectionVariant(t))}}function _e(o,f){if(o&1&&(s(0,"actions")(1,"div",13),u(2,fe,2,1,"ng-container",14),p()()),o&2){let t=m();c(2),h("ngxPermissionsOnly",z(1,ge,t.inventoryUpdateRole))}}function Se(o,f){o&1&&W(0)}function ve(o,f){if(o&1){let t=L();N(0),s(1,"app-table",18),g("onToggle",function(e){b(t);let n=m();return P(n.onShowDifferenceStock(e))})("onSubmit",function(e){b(t);let n=m();return P(n.updateStockByVariant(e))}),p(),F()}if(o&2){let t=f.ngIf,i=m();c(),h("data",t)("channel",i.channels())("showProductToggle",!0)("hiddenIPOSInventory",i.searchFilter.HiddenIPOSInventory)}}var et=(()=>{class o{constructor(t,i,e,n,a,r){this.http=t,this.toastr=i,this.dialog=e,this.productService=n,this.authService=a,this.mainPanelService=r,this.paginationService=S(R),this.multiChannelService=S(O),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=M([]),this.selectedChannels=M([]),this.channels=M([]),this.inventoryUpdateRole=ee.InventoryUpdate,this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(k(t=>{t.Filter={PageNumber:t.Filter.PageNumber,filterModel:D.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.mainPanelService.openModalFilter()}))}onChannelChange(t=[]){let i=t.filter(n=>C.isValidGUID(n.id)==!1),e=t.filter(n=>C.isValidGUID(n.id));this.selectedLocations.set(i),this.selectedChannels.set(e)}onSearch(t){let i=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(i);let e=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=e.channelIds,this.searchFilter.ListLocationID=e.locationIds,this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t,i){let e=this.productService.selectedVariantProduct(t);if(e.length>0){let n=[];e.forEach(l=>{l.Channel?.forEach(_=>{n.push({ID:l.ID,Code:l.Code,Inventory:l.Inventory,LocationID:_.LocationID})})});let r={ListChannelID:i.filter(l=>l.selected).map(l=>l.ID),List:n};this.http.post("/api/Inventory/UpdateChannel",r).subscribe(l=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+r.List.length+" variants in "+r.ListChannelID.length+" channels","Success")})}}updateStockByVariant(t){let i={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku,LocationID:t.LocationID};this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(e=>{this.paginationService.reloadPagination(this.searchFilter);let n=this.productService.findChannelById(i.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+n.Name+" to "+i.NewQuantity,"Success")})}onShowDifferenceStock(t){t?this.searchFilter.filterModel=D.DIFFERENCE:this.searchFilter.filterModel=D.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(t){let i=this.productService.selectedVariantProduct(t),e=this.channelOptions.filter(n=>this.channels()?.find(a=>a.ID===n.ID));this.dialog.open(pe,{data:{selectedItems:i,channels:JSON.parse(JSON.stringify(e))},width:"400px"}).afterClosed().pipe(U(n=>C.IsNotEmpty(n))).subscribe(n=>{this.updateStock(t,n)})}static{this.\u0275fac=function(i){return new(i||o)(d(ne),d(te),d(oe),d(ce),d(w),d(re))}}static{this.\u0275cmp=A({type:o,selectors:[["app-multi-channel-comparison"]],features:[H([R,O])],decls:26,vars:22,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","pageData","hideSearchBox"],[4,"ngIf"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(i,e){i&1&&(s(0,"mainpanel",0),g("onSubmit",function(a){return e.onSearch(a)}),u(1,_e,3,3,"actions",1),I(2,"async"),s(3,"filters"),u(4,Se,1,0,"ng-container",1),I(5,"async"),s(6,"div")(7,"label",2),v(8,"Channel"),p(),s(9,"multiwarehouse-tree-select",3),g("onChannelChange",function(a){return e.onChannelChange(a)}),p()(),s(10,"div",4)(11,"label",5),v(12,"PageNumber"),p(),s(13,"input",6),x("ngModelChange",function(a){return E(e.searchFilter.PageNumber,a)||(e.searchFilter.PageNumber=a),a}),p()(),s(14,"div",4)(15,"label",7),v(16,"Page Size"),p(),s(17,"input",8),x("ngModelChange",function(a){return E(e.searchFilter.RowCount,a)||(e.searchFilter.RowCount=a),a}),p()()(),s(18,"content")(19,"div",9)(20,"div",10)(21,"div",11),u(22,ve,2,4,"ng-container",1),I(23,"async"),s(24,"infinite-paginator",12),I(25,"async"),g("onNextPage",function(){return e.paginationService.onNextPage(e.searchFilter)})("onLastPage",function(){return e.paginationService.onLastPage(e.searchFilter)})("onGetRowCount",function(){return e.paginationService.getRowCount(e.searchFilter)}),p()()()()()()),i&2&&(h("pageData",e.pageData)("hideSearchBox",!1),c(),h("ngIf",y(2,14,e.paginationService.data$)),c(3),h("ngIf",y(5,16,e.loader$)),c(5),h("multiple",!0),c(4),T("ngModel",e.searchFilter.PageNumber),c(4),T("ngModel",e.searchFilter.RowCount),c(5),h("ngIf",y(23,18,e.paginationService.data$)),c(2),h("totalData",e.paginationService.totalData())("hideCount",e.paginationService.hideCount())("rowCount",y(25,20,e.paginationService.totalRowCount$))("pageNumber",e.paginationService.pageNumber())("disableNextButton",e.paginationService.disableNextButton())("goToLastPage",e.paginationService.isLastPage()))},dependencies:[J,$,Q,se,le,he,Z,K,Y,q,X,me,de,ae,ie],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]})}}return o})();export{et as MultiChannelComparison};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var u=function(n){return n.USER="user",n.CHANNELS="channels",n.AUTHORIZATION="Authorization",n.INTERCOM="Intercom",n}(u||{});export{u as a};
|