marketplacepos 5.38.2 → 5.38.4
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 +8 -8
- package/Marketplace/chunk-2ESOTQPW.js +1 -0
- package/Marketplace/chunk-2JKSMF3I.js +1 -0
- package/Marketplace/chunk-2OL4XZXJ.js +1 -0
- package/Marketplace/chunk-3C4M544Q.js +1 -0
- package/Marketplace/{chunk-TCRZNHID.js → chunk-3LQNSF7T.js} +1 -1
- package/Marketplace/chunk-3NDNZO2L.js +2 -0
- package/Marketplace/{chunk-FMXSAVJ5.js → chunk-3SDQ2PXY.js} +1 -1
- package/Marketplace/chunk-4ASUM4N5.js +1 -0
- package/Marketplace/chunk-4RXCRDWF.js +2 -0
- package/Marketplace/chunk-54RFAHSK.js +1 -0
- package/Marketplace/{chunk-YNZOWISG.js → chunk-5MRT2EFE.js} +1 -1
- package/Marketplace/chunk-5X6GYYIM.js +1 -0
- package/Marketplace/chunk-5XVUQWLZ.js +2 -0
- package/Marketplace/{chunk-LWDDTE3V.js → chunk-62PFQNHJ.js} +1 -1
- package/Marketplace/chunk-662ELWF5.js +1 -0
- package/Marketplace/chunk-6ALHX2I4.js +1 -0
- package/Marketplace/{chunk-LIQRQYKZ.js → chunk-6IAGGRZN.js} +1 -1
- package/Marketplace/{chunk-4BKQVHMV.js → chunk-7477X7LJ.js} +1 -1
- package/Marketplace/{chunk-ACIMXBIC.js → chunk-77IUCPIQ.js} +1 -1
- package/Marketplace/{chunk-ZX5YQUYQ.js → chunk-7AVVOGZA.js} +1 -1
- package/Marketplace/{chunk-FZDXTSZF.js → chunk-7TWBIV3T.js} +1 -1
- package/Marketplace/{chunk-67IT7XVS.js → chunk-AL3REAHH.js} +1 -1
- package/Marketplace/{chunk-XMUA7ACY.js → chunk-BUFEIJAI.js} +1 -1
- package/Marketplace/chunk-BXKAE7Z3.js +1 -0
- package/Marketplace/{chunk-4YVLPJDF.js → chunk-CH2MLZU7.js} +1 -1
- package/Marketplace/{chunk-3SYZKYR6.js → chunk-CLKCSTGQ.js} +1 -1
- package/Marketplace/{chunk-THCM5TEN.js → chunk-COBHWPGI.js} +1 -1
- package/Marketplace/{chunk-I5QRFRRD.js → chunk-CRC6ZWYT.js} +1 -1
- package/Marketplace/{chunk-S4HBPSOW.js → chunk-CVQMAWML.js} +1 -1
- package/Marketplace/{chunk-RXP4QJHL.js → chunk-CZWNWUW2.js} +1 -1
- package/Marketplace/{chunk-CHBBBCQU.js → chunk-DP3Z5OLA.js} +1 -1
- package/Marketplace/{chunk-5JWYKH72.js → chunk-DPLEMBB4.js} +1 -1
- package/Marketplace/chunk-DYBAGP7P.js +1 -0
- package/Marketplace/{chunk-DWDTKK42.js → chunk-E6HA2AGS.js} +1 -1
- package/Marketplace/chunk-EA52MAWA.js +1 -0
- package/Marketplace/{chunk-K7HUCVG7.js → chunk-EGTYAIU5.js} +1 -1
- package/Marketplace/{chunk-CDAB4RAT.js → chunk-EOPCFNMW.js} +1 -1
- package/Marketplace/chunk-EU6PHSKS.js +1 -0
- package/Marketplace/{chunk-SG52OFBZ.js → chunk-G35YVLFO.js} +1 -1
- package/Marketplace/{chunk-JNXIAVS4.js → chunk-G6EG5QJS.js} +1 -1
- package/Marketplace/{chunk-634DNHPF.js → chunk-GBABJLPQ.js} +1 -1
- package/Marketplace/{chunk-HPX77FXZ.js → chunk-GBD4FIF3.js} +1 -1
- package/Marketplace/{chunk-MFZLTVCS.js → chunk-GHQH62TZ.js} +1 -1
- package/Marketplace/chunk-GPEVUTDI.js +2 -0
- package/Marketplace/{chunk-UX7JCPZZ.js → chunk-GQZES4UF.js} +1 -1
- package/Marketplace/chunk-GZIXVRJT.js +1 -0
- package/Marketplace/chunk-H55YXRO5.js +1 -0
- package/Marketplace/chunk-HQL6WPF6.js +1 -0
- package/Marketplace/chunk-HTVSJFUP.js +5 -0
- package/Marketplace/chunk-IIJMZKPL.js +1 -0
- package/Marketplace/{chunk-5SXUJ5XH.js → chunk-ITTRZMEX.js} +4 -4
- package/Marketplace/{chunk-2UZPOENK.js → chunk-IYYVZ6B6.js} +1 -1
- package/Marketplace/{chunk-RTUTYVTE.js → chunk-J3P46Z53.js} +1 -1
- package/Marketplace/chunk-JTZJTXCN.js +1 -0
- package/Marketplace/{chunk-V6IICLFE.js → chunk-JYLQJCDT.js} +1 -1
- package/Marketplace/chunk-K2H6WANG.js +1 -0
- package/Marketplace/{chunk-WAGDS532.js → chunk-KHWTOD6H.js} +1 -1
- package/Marketplace/{chunk-PQZGUDGJ.js → chunk-KXZCGKQW.js} +1 -1
- package/Marketplace/chunk-KZTPUAO4.js +1 -0
- package/Marketplace/{chunk-EAU6FVQT.js → chunk-LEHTNMIE.js} +1 -1
- package/Marketplace/{chunk-IPYYFOPE.js → chunk-LLZSSV5A.js} +1 -1
- package/Marketplace/chunk-LMYPSQJN.js +1 -0
- package/Marketplace/{chunk-SZ22GHDY.js → chunk-LOJPRXKZ.js} +1 -1
- package/Marketplace/chunk-LQQ67QXG.js +2 -0
- package/Marketplace/{chunk-NB5JKHKF.js → chunk-MNFHFW3E.js} +1 -1
- package/Marketplace/{chunk-KP7SEM5B.js → chunk-OAS72QB2.js} +1 -1
- package/Marketplace/{chunk-HCZDLZLY.js → chunk-OE2JYQHN.js} +1 -1
- package/Marketplace/{chunk-I44JKLRE.js → chunk-OLSC6KHB.js} +1 -1
- package/Marketplace/{chunk-GJLXEA4Q.js → chunk-PPDHTO44.js} +1 -1
- package/Marketplace/chunk-PUJ4JVT2.js +4 -0
- package/Marketplace/chunk-PXB4YEY3.js +1 -0
- package/Marketplace/{chunk-7Q6UDUDK.js → chunk-PXU3DWYL.js} +1 -1
- package/Marketplace/chunk-PZTMYAA7.js +1 -0
- package/Marketplace/{chunk-V27YSSV4.js → chunk-Q2OEJFVT.js} +1 -1
- package/Marketplace/{chunk-ZUFLZMHT.js → chunk-Q72ZXPDP.js} +1 -1
- package/Marketplace/{chunk-LLXJSB37.js → chunk-QCZIDOKW.js} +1 -1
- package/Marketplace/{chunk-JAC62SW3.js → chunk-QRJDRFNS.js} +1 -1
- package/Marketplace/{chunk-NQV7LHIV.js → chunk-RGR34QZ3.js} +1 -1
- package/Marketplace/{chunk-PRVOIBMJ.js → chunk-RIHLYYZU.js} +1 -1
- package/Marketplace/{chunk-APOFECEW.js → chunk-RVYGL22E.js} +1 -1
- package/Marketplace/chunk-SA573BZL.js +1 -0
- package/Marketplace/{chunk-LHKT5TT3.js → chunk-SVCUTNSP.js} +2 -2
- package/Marketplace/chunk-T3VPBK5Q.js +1 -0
- package/Marketplace/chunk-T5ONJF63.js +7 -0
- package/Marketplace/chunk-T6QOFDEE.js +1 -0
- package/Marketplace/{chunk-ELDNUVIH.js → chunk-TB6SAKPJ.js} +1 -1
- package/Marketplace/{chunk-3S7C3CCV.js → chunk-TMFFA26Y.js} +1 -1
- package/Marketplace/chunk-TTKPJA6M.js +1 -0
- package/Marketplace/chunk-TZXF4K2V.js +1 -0
- package/Marketplace/{chunk-3FCJ4HSW.js → chunk-U2ZMUFQ6.js} +1 -1
- package/Marketplace/{chunk-HSHDGVNA.js → chunk-UBMI3NQH.js} +1 -1
- package/Marketplace/{chunk-IZCEOKBE.js → chunk-UDOCTVWA.js} +1 -1
- package/Marketplace/chunk-UIM3W5B7.js +1 -0
- package/Marketplace/{chunk-TGMCGROM.js → chunk-V5WYSCVT.js} +1 -1
- package/Marketplace/{chunk-FFM752SB.js → chunk-VGXQU74M.js} +1 -1
- package/Marketplace/{chunk-PHCYCYXH.js → chunk-WAW37FIG.js} +1 -1
- package/Marketplace/chunk-WCAHHXUG.js +1 -0
- package/Marketplace/{chunk-BTW46HYC.js → chunk-XDUYDX35.js} +2 -2
- package/Marketplace/{chunk-IQEG7SF6.js → chunk-XFCMKJV6.js} +1 -1
- package/Marketplace/chunk-YCXXSKHC.js +1 -0
- package/Marketplace/chunk-YIUQQGOQ.js +1 -0
- package/Marketplace/chunk-YSHR4I3P.js +5 -0
- package/Marketplace/{chunk-ZEAT7ZWR.js → chunk-YXFTLQ5M.js} +1 -1
- package/Marketplace/{chunk-CXIBIPS5.js → chunk-ZD5LURJS.js} +1 -1
- package/Marketplace/chunk-ZGL7PBN6.js +8 -0
- package/Marketplace/{chunk-YOGRCIUI.js → chunk-ZZVNB72Q.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/main-DFBPCCHZ.js +1 -0
- package/Marketplace/{styles-FQFG5OHY.css → styles-6IZYQNTO.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-2FSWKVW2.js +0 -5
- package/Marketplace/chunk-2WX4KRTS.js +0 -1
- package/Marketplace/chunk-3H6MA53M.js +0 -1
- package/Marketplace/chunk-66YHNWRR.js +0 -1
- package/Marketplace/chunk-6BGGLLB3.js +0 -1
- package/Marketplace/chunk-7SLPBFFW.js +0 -1
- package/Marketplace/chunk-AHLRE6UG.js +0 -1
- package/Marketplace/chunk-B2EMWVNF.js +0 -1
- package/Marketplace/chunk-BLEP5X4N.js +0 -1
- package/Marketplace/chunk-CDNNFRZK.js +0 -1
- package/Marketplace/chunk-D7HXHNZ2.js +0 -1
- package/Marketplace/chunk-E7PTAPC2.js +0 -1
- package/Marketplace/chunk-ECT4LXWX.js +0 -1
- package/Marketplace/chunk-EU2KAMEK.js +0 -1
- package/Marketplace/chunk-F7GZCBBK.js +0 -1
- package/Marketplace/chunk-FDTSK7U4.js +0 -1
- package/Marketplace/chunk-FZZFKUA6.js +0 -1
- package/Marketplace/chunk-GCECFUOP.js +0 -1
- package/Marketplace/chunk-GJ35EMJI.js +0 -1
- package/Marketplace/chunk-GQH7OSVY.js +0 -1
- package/Marketplace/chunk-HP3XWVNT.js +0 -1
- package/Marketplace/chunk-IFLSHEST.js +0 -1
- package/Marketplace/chunk-ISBNY3BW.js +0 -1
- package/Marketplace/chunk-IURGBAYA.js +0 -1
- package/Marketplace/chunk-KEJE3NY3.js +0 -2
- package/Marketplace/chunk-KESNVJB4.js +0 -1
- package/Marketplace/chunk-KFBOPHX3.js +0 -1
- package/Marketplace/chunk-KLK56V5W.js +0 -5
- package/Marketplace/chunk-L532YTS3.js +0 -1
- package/Marketplace/chunk-LWGJZHI6.js +0 -1
- package/Marketplace/chunk-LXSQIECO.js +0 -1
- package/Marketplace/chunk-N5FUA6YZ.js +0 -8
- package/Marketplace/chunk-N5J4Q6XU.js +0 -1
- package/Marketplace/chunk-NLMYFEYT.js +0 -1
- package/Marketplace/chunk-ODYALJ4L.js +0 -1
- package/Marketplace/chunk-OQ6GAJZC.js +0 -1
- package/Marketplace/chunk-OQCIFQ6E.js +0 -1
- package/Marketplace/chunk-PW42BQIY.js +0 -1
- package/Marketplace/chunk-RH3MWQCS.js +0 -1
- package/Marketplace/chunk-RP5BC3NS.js +0 -1
- package/Marketplace/chunk-S6JH7OX2.js +0 -1
- package/Marketplace/chunk-SNSUFM3F.js +0 -1
- package/Marketplace/chunk-T2QY5RTH.js +0 -1
- package/Marketplace/chunk-TO3EP6I2.js +0 -1
- package/Marketplace/chunk-U5FRJVIW.js +0 -2
- package/Marketplace/chunk-UPA7TFVG.js +0 -2
- package/Marketplace/chunk-VFLAHRB4.js +0 -7
- package/Marketplace/chunk-VHIGKLLN.js +0 -5
- package/Marketplace/chunk-VQIOJJQU.js +0 -1
- package/Marketplace/chunk-WLZKVYHT.js +0 -1
- package/Marketplace/chunk-YZTAHFSS.js +0 -1
- package/Marketplace/chunk-ZBQYXB3O.js +0 -1
- package/Marketplace/chunk-ZJ33U67R.js +0 -1
- package/Marketplace/chunk-ZNZULA6U.js +0 -1
- package/Marketplace/main-NTODVC3B.js +0 -1
|
@@ -618,7 +618,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
618
618
|
THE SOFTWARE.
|
|
619
619
|
|
|
620
620
|
--------------------------------------------------------------------------------
|
|
621
|
-
Package:
|
|
621
|
+
Package: ngx-permissions
|
|
622
|
+
License: "MIT"
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
--------------------------------------------------------------------------------
|
|
626
|
+
Package: @angular/common
|
|
622
627
|
License: "MIT"
|
|
623
628
|
|
|
624
629
|
The MIT License
|
|
@@ -644,12 +649,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
644
649
|
THE SOFTWARE.
|
|
645
650
|
|
|
646
651
|
--------------------------------------------------------------------------------
|
|
647
|
-
Package:
|
|
648
|
-
License: "MIT"
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
--------------------------------------------------------------------------------
|
|
652
|
-
Package: @angular/common
|
|
652
|
+
Package: @angular/router
|
|
653
653
|
License: "MIT"
|
|
654
654
|
|
|
655
655
|
The MIT License
|
|
@@ -675,7 +675,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
675
675
|
THE SOFTWARE.
|
|
676
676
|
|
|
677
677
|
--------------------------------------------------------------------------------
|
|
678
|
-
Package: @angular/
|
|
678
|
+
Package: @angular/core
|
|
679
679
|
License: "MIT"
|
|
680
680
|
|
|
681
681
|
The MIT License
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as h,b as f}from"./chunk-OE2JYQHN.js";import{a as i}from"./chunk-7AVVOGZA.js";import"./chunk-XDUYDX35.js";import"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import"./chunk-PXB4YEY3.js";import{F as C,J as n,n as o}from"./chunk-GPEVUTDI.js";import{Eb as l,Fb as c,Wb as s,gc as u,hc as d,ic as r,ka as p,qb as m}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var v=(()=>{class e{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"},{Title:"Custom Channel Price",Url:"/menu/price/OutletPrice"}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["app-price"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,P){t&1&&(u(0,"nav",0)(1,"div",1)(2,"div"),r(3,"nav-tab",2),d()()(),r(4,"router-outlet")),t&2&&(m(3),s("Tabs",P.priceTabs))},dependencies:[o,f,h,n,C],encapsulation:2})}}return e})();var M=[{path:"",component:v,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-5X6GYYIM.js").then(e=>e.PricePosChannelComponent)},canActivate:[i],data:{title:"Global Price Comparison"}},{path:"OutletPrice",loadComponent(){return import("./chunk-2OL4XZXJ.js").then(e=>e.CustomChannelPriceComponent)},canActivate:[i],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-54RFAHSK.js").then(e=>e.PriceSingleChannelComponent)},canActivate:[i],data:{title:"Price Single Channel Comparison"}}]}],j=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=c({type:e})}static{this.\u0275inj=p({imports:[o,n.forChild(M)]})}}return e})();export{j as PriceRoutingModule};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as O}from"./chunk-UBMI3NQH.js";import{a as P}from"./chunk-J3P46Z53.js";import{a as M}from"./chunk-4ASUM4N5.js";import{b as h}from"./chunk-CVQMAWML.js";import"./chunk-LEHTNMIE.js";import{c as f}from"./chunk-GHQH62TZ.js";import"./chunk-CH2MLZU7.js";import{a}from"./chunk-7AVVOGZA.js";import{a as C}from"./chunk-62PFQNHJ.js";import"./chunk-Q72ZXPDP.js";import"./chunk-MNFHFW3E.js";import"./chunk-ZZVNB72Q.js";import"./chunk-VGXQU74M.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import{e as u}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import"./chunk-XDUYDX35.js";import"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{n as g}from"./chunk-ITTRZMEX.js";import{s}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{y as l}from"./chunk-DPLEMBB4.js";import"./chunk-PXB4YEY3.js";import{F as c,J as i,n as r}from"./chunk-GPEVUTDI.js";import{Eb as p,Fb as e,ic as d,ka as n}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var x=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=p({type:t,selectors:[["app-products"]],standalone:!1,decls:1,vars:0,template:function(o,y){o&1&&d(0,"router-outlet")},dependencies:[c],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 t})();var w=[{path:"",component:x,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-KZTPUAO4.js").then(t=>t.StatusModule),canActivate:[a]},{path:"download",loadChildren:()=>import("./chunk-YSHR4I3P.js").then(t=>t.DownloadModule),canActivate:[a]},{path:"upload",loadComponent:()=>import("./chunk-WCAHHXUG.js").then(t=>t.ProductUploadComponent),data:{title:"Upload Product"},canActivate:[a]}]}],_=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=e({type:t})}static{this.\u0275inj=n({imports:[r,i.forChild(w)]})}}return t})();var V=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=e({type:t})}static{this.\u0275inj=n({imports:[r,l,i,_,s,g,u,h,M,f,C,P,O]})}}return t})();export{V as ProductModule};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ke}from"./chunk-G35YVLFO.js";import{a as De}from"./chunk-OAS72QB2.js";import{a as W}from"./chunk-XHAXYWZ7.js";import{a as Oe,b as Ve,c as Ne,d as J}from"./chunk-UIM3W5B7.js";import{a as ue}from"./chunk-BVIRHZTZ.js";import{a as Te}from"./chunk-PPDHTO44.js";import{a as we}from"./chunk-7KG3DC5J.js";import{b as Ee}from"./chunk-3LQNSF7T.js";import"./chunk-YXFTLQ5M.js";import"./chunk-OLSC6KHB.js";import"./chunk-7TWBIV3T.js";import{a as Fe}from"./chunk-EGTYAIU5.js";import"./chunk-LOJPRXKZ.js";import"./chunk-6ALHX2I4.js";import"./chunk-3RK6DDJD.js";import{a as ve,b as Ie,c as ye}from"./chunk-GHQH62TZ.js";import"./chunk-CH2MLZU7.js";import"./chunk-ZZVNB72Q.js";import{a as Me}from"./chunk-VGXQU74M.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{j as xe}from"./chunk-XDUYDX35.js";import{b as he,e as ge}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{d as Pe,m as be,n as Se}from"./chunk-ITTRZMEX.js";import{r as A,s as j}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{b as _e,h as R,m as L,y as $}from"./chunk-DPLEMBB4.js";import{c as U,e as Ce,f as fe}from"./chunk-PXB4YEY3.js";import{d as se,f as k,g as me,j as pe,m as de,n as B}from"./chunk-GPEVUTDI.js";import{$c as ce,Dc as z,Eb as N,Ec as p,Fc as re,G as K,Gc as f,Ic as D,Jc as O,Ka as ee,Kb as u,Kc as V,Oc as ae,Qa as te,Qc as w,Rc as le,Wb as s,Z as G,Zb as ne,Zc as b,_c as y,ad as H,bc as ie,cc as M,ea as Y,ec as E,fc as T,gc as o,hc as a,ic as P,jc as S,kc as v,mc as I,ob as F,pa as Q,qb as r,rc as h,sc as m,v as q,vc as oe,wb as x,ya as g,za as C}from"./chunk-T5ONJF63.js";import{a as X,b as Z}from"./chunk-K2H6WANG.js";var We=(n,c)=>({color:n,"font-weight":c});function Ke(n,c){if(n&1&&(o(0,"mat-radio-button",2),p(1),a()),n&2){let e=c.$implicit,i=c.index,t=m();ne(le(7,We,t.model==e.Key&&t.activeBold?"#0976b4":"",t.model==e.Key&&t.activeBold?"700":"")),s("disabled",t.exception==e.Value)("matTooltip",t.title.length>0?t.title[i]:"")("value",e.Key)("name",t.name),r(),f("",e.Value," ")}}var Be=(()=>{class n{constructor(){this.disabled=!1,this.modelChange=new ee,this.options=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"}],this.border=!1,this.name="",this.title=[],this.exception="",this.activeBold=""}change(e){this.modelChange.emit(e)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=N({type:n,selectors:[["lib-radio-options"]],inputs:{model:"model",disabled:"disabled",options:"options",border:"border",name:"name",title:"title",exception:"exception",activeBold:"activeBold"},outputs:{modelChange:"modelChange"},decls:2,vars:3,consts:[["color","primary",3,"ngModelChange","disabled","ngModel"],["matTooltipPosition","above","class","me-4 mt-1",3,"style","disabled","matTooltip","value","name",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"me-4","mt-1",3,"disabled","matTooltip","value","name"]],template:function(i,t){i&1&&(o(0,"mat-radio-group",0),h("ngModelChange",function(d){return t.change(d)}),u(1,Ke,2,10,"mat-radio-button",1),a()),i&2&&(s("disabled",t.disabled)("ngModel",t.model),r(),s("ngForOf",t.options))},dependencies:[B,k,ye,ve,Ie,$,R,L,j,A],styles:["html[_ngcontent-%COMP%]{--mdc-radio-state-layer-size: 36px}html[_ngcontent-%COMP%]{--mat-radio-touch-target-display: block}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled:checked + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__outer-circle[_ngcontent-%COMP%]{border-color:#0976b4!important}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__inner-circle[_ngcontent-%COMP%]{background-color:#0976b4!important;border-color:#0976b4!important}"]})}}return n})();var Re=n=>[n],Ge=n=>({"text-decoration-line-through":n}),ze=n=>({"border-bottom":n}),He=n=>({"bg-gradient-warning":n});function Je(n,c){if(n&1){let e=I();S(0),o(1,"div")(2,"label",21),p(3,"Channel"),a(),o(4,"channel-select-options",22),V("ngModelChange",function(t){g(e);let l=m();return O(l.searchFilter.ListChannelID,t)||(l.searchFilter.ListChannelID=t),C(t)}),a()(),o(5,"div",23)(6,"label",24),p(7,"Filter by"),a(),o(8,"lib-radio-options",25),V("modelChange",function(t){g(e);let l=m();return O(l.searchFilter.filterModel,t)||(l.searchFilter.filterModel=t),C(t)}),a()(),v()}if(n&2){let e=m();r(4),s("multiple",!0),D("ngModel",e.searchFilter.ListChannelID),r(4),D("model",e.searchFilter.filterModel),s("options",e.filterTypeOptions)}}function Xe(n,c){if(n&1){let e=I();o(0,"button",27),h("click",function(){g(e);let t=m().ngIf,l=m();return C(l.onUpdateItems(t))}),P(1,"i",28),p(2," Update "),a()}}function Ze(n,c){if(n&1&&(S(0),o(1,"div",4),u(2,Xe,3,0,"button",26),a(),v()),n&2){let e=c.ngIf,i=m();r(2),s("ngIf",i.productService.hasSelectionVariant(e))}}function qe(n,c){if(n&1&&(o(0,"th",15)(1,"div",29),P(2,"img",30),o(3,"div",31),p(4),b(5,"stringLimit"),a()()()),n&2){let e=c.$implicit;r(),s("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),r(),s("src",e==null?null:e.Img,F),r(2),f(" ",ce(5,3,e.Name,20)," ")}}function Ye(n,c){if(n&1){let e=I();o(0,"th")(1,"input",32),V("ngModelChange",function(t){g(e);let l=m();return O(l.checkboxState,t)||(l.checkboxState=t),C(t)}),h("ngModelChange",function(){g(e);let t=m();return C(t.onSelectAllData())}),a()()}if(n&2){let e=m();r(),D("ngModel",e.checkboxState)}}function Qe(n,c){n&1&&(o(0,"th",33)(1,"span"),p(2,"Expected"),a(),o(3,"span",34),p(4,"(POS)"),a()(),o(5,"th",33),p(6,"Channel"),a())}function et(n,c){if(n&1){let e=I();o(0,"img",47),h("click",function(t){g(e);let l=m(3).$implicit,d=m(2);return C(d.onZoomImage(t,l==null?null:l.ImageUrl))}),a()}if(n&2){let e=m(3).$implicit;oe("src",e==null?null:e.ImageUrl,F)}}function tt(n,c){n&1&&P(0,"img",48)}function nt(n,c){if(n&1&&(o(0,"small",46),p(1),a()),n&2){let e=m(3).$implicit;r(),f("(",e==null?null:e.Category,")")}}function it(n,c){if(n&1&&(S(0),o(1,"td",42),u(2,et,1,1,"img",43)(3,tt,1,0,"ng-template",null,0,H),a(),o(5,"td",44)(6,"h5",45),p(7),a(),u(8,nt,2,1,"small",46),a(),v()),n&2){let e=z(4),i=m().$index,t=m().$implicit,l=m().ngIf;r(),s("rowSpan",t==null?null:t.Variants.length)("ngClass",w(7,ze,i+1==l.length)),r(),s("ngIf",t==null?null:t.ImageUrl)("ngIfElse",e),r(3),s("rowSpan",t==null?null:t.Variants.length),r(2),re(t==null?null:t.Name),r(),ie(t!=null&&t.Category?8:-1)}}function ot(n,c){if(n&1){let e=I();o(0,"td",49)(1,"input",32),V("ngModelChange",function(t){g(e);let l=m().$implicit;return O(l.selected,t)||(l.selected=t),C(t)}),a()()}if(n&2){let e=m().$implicit;r(),D("ngModel",e.selected)}}function rt(n,c){if(n&1){let e=I();S(0),o(1,"td",51),p(2),b(3,"number"),a(),o(4,"td",52),h("click",function(){let t=g(e).$implicit,l=m(2).$implicit,d=m().$implicit,_=m(2);return C(_.openTableDialog(l,d,t))}),o(5,"div",53)(6,"div",54),p(7),b(8,"number"),a(),o(9,"a",55),h("click",function(t){return g(e),C(t==null?null:t.stopPropagation())}),P(10,"i",40),a()()(),v()}if(n&2){let e=c.$implicit;r(2),f(" ",y(3,4,e.PriceExpected)," "),r(2),s("ngClass",w(8,He,e.Price!=e.PriceExpected)),r(3),f(" ",y(8,6,e.Price)," "),r(2),s("href",e.Url,F)}}function at(n,c){n&1&&(o(0,"td",56),p(1," X "),a(),o(2,"td",56),p(3," X "),a())}function lt(n,c){if(n&1&&(S(0),u(1,rt,11,10,"ng-container",50)(2,at,4,0,"ng-template",null,1,H),v()),n&2){let e=c.$implicit,i=z(3),t=m().$implicit,l=m(3);r(),s("ngIf",l.getItemFromChannel(t,e.ID))("ngIfElse",i)}}function ct(n,c){if(n&1&&(o(0,"tr"),u(1,it,9,9,"ng-container",3),o(2,"td",35),p(3),a(),o(4,"td",36)(5,"div",37)(6,"div",38),p(7),a(),o(8,"div",31)(9,"a",39),P(10,"i",40),a()()()(),u(11,ot,2,1,"ng-template",19)(12,lt,4,2,"ng-container",41),a()),n&2){let e=c.$implicit,i=c.$index,t=m(3);r(),s("ngIf",i==0),r(2),f(" ",e==null?null:e.Model," "),r(),s("matTooltip",e.Discontinued?t.discontinuedVariantMsg:""),r(2),s("ngClass",w(8,Ge,e.Discontinued)),r(),f(" ",e==null?null:e.Code," "),r(2),s("href",t.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),F),r(2),s("ngxPermissionsOnly",w(10,Re,t.rolePriceEdit)),r(),s("ngForOf",t.channels())}}function st(n,c){if(n&1&&(o(0,"tbody"),E(1,ct,13,12,"tr",null,M),a()),n&2){let e=c.$implicit;r(),T(e.Variants)}}function mt(n,c){if(n&1&&(S(0),E(1,st,3,0,"tbody",null,M),v()),n&2){let e=c.ngIf;r(),T(e)}}var qt=(()=>{class n{constructor(e,i,t,l,d,_,Le){this.http=e,this.toastr=i,this.dialog=t,this.productService=l,this.authService=d,this.biggerPictureService=_,this.paginationService=Le,this.infinitePagination=Q(J),this.searchFilter=new we,this.checkboxState=!1,this.rolePriceEdit=ue.price,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.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.channels=te([]),this.filterTypeOptions=[{Key:W.ALL,Value:"All"},{Key:W.DIFFERENCE,Value:"Difference"}],this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPagination(),this.initChannelTable()}initChannelTable(){let e=this.searchFilter.ListChannelID,i=[];U.IsEmpty(e)||e?.length==0?i=this.channelOptions:i=this.channelOptions.filter(t=>e.findIndex(l=>l==t.ID)>-1),this.channels.update(()=>i)}initPagination(){this.infinitePagination.fetchDataEndpoint="Price/GetOutletPrice",this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.infinitePagination.data$.pipe(G(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe(Y(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=W.ALL,this.infinitePagination.reloadPagination(this.searchFilter)}),G(1))}onSelectAllData(){this.data$=this.data$.pipe(q(e=>(e.map(i=>(i.Variants&&(i.Variants=i.Variants.map(t=>(t.selected=this.checkboxState,t))),i)),e)))}onFilter(e){this.searchFilter.text=e;let i=Z(X({},this.searchFilter),{text:e,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount});this.initChannelTable(),this.infinitePagination.reloadPagination(i)}updatePrice(e){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let t=i.map(_=>_.ID),d={ListChannelID:this.channelOptions.filter(_=>_.selected).map(_=>_.ID),ListID:t};this.http.post("/api/Price/UpdateChannelOutletPrice",d).subscribe({next:_=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+d.ListID.length+" items in "+d.ListChannelID.length+" channels","Success")},error:_=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(e=>(e.selected=!1,e))}getItemFromChannel(e,i){return e.Channel.find(t=>t.ChannelID==i)}onUpdateItems(e){let i=this.productService.selectedVariantProduct(e);this.dialog.open(De,{data:{title:"Updating Price",selectedItems:i,channels:this.channelOptions},width:"400px"}).afterClosed().pipe(K(t=>U.IsNotEmpty(t))).subscribe(t=>{this.channelOptions=t,this.updatePrice(e)})}openTableDialog(e,i,t){let l=JSON.parse(JSON.stringify(e));this.dialog.open(Oe,{data:{Name:i.Name,Variant:l,ChannelID:t?.ChannelID,Table:"price",ChannelItemID:t?.ChannelItemID}}).afterClosed().pipe(K(_=>U.IsNotEmpty(_))).subscribe(_=>{this.updateProductPrice(_,t)})}updateProductPrice(e,i){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(l=>{i.Price=t.Price;let d=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) inventory in ${d.Name} to ${t.Price}`,"Success")})}openExportDialog(){this.dialog.open(Ee,{data:{title:"Export Custom Channel Price",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportOutletPrice"}}).afterClosed().subscribe()}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}static{this.\u0275fac=function(i){return new(i||n)(x(ge),x(he),x(Pe),x(Fe),x(xe),x(Me),x(Te))}}static{this.\u0275cmp=N({type:n,selectors:[["app-custom-channel-price"]],features:[ae([J])],decls:38,vars:23,consts:[["elsePic",""],["elseCol",""],["headerTitle","Price Comparison",3,"onSubmit","hideSearchBox","hideSearchDropdown","textButton"],[4,"ngIf"],[1,"d-flex"],[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"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"channel-column"],["colspan","5"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","text-uppercase"],["scope","col","colspan","2",1,"text-center","w-25"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5",2,"height","46px"],[1,"fw-bold","mb-2","d-block"],["name","filterModel",3,"modelChange","model","options"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-end","border-bottom",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[4,"ngFor","ngForOf"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],[1,"text-start","border-bottom",2,"padding-left","0px",3,"rowSpan"],[1,"mb-0","item-name"],[1,"mt-1"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],[4,"ngIf","ngIfElse"],[1,"text-end","border"],[1,"text-center","border","pointer","cell-hover",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2"],["target","_blank",3,"click","href"],[1,"table-white","border","text-end",2,"color","red"]],template:function(i,t){i&1&&(o(0,"mainpanel",2),h("onSubmit",function(d){return t.onFilter(d)}),o(1,"filters"),u(2,Je,9,4,"ng-container",3),b(3,"async"),a(),o(4,"actions")(5,"div",4),u(6,Ze,3,1,"ng-container",3),b(7,"async"),o(8,"button",5),h("click",function(){return t.openExportDialog()}),P(9,"i",6),o(10,"span"),p(11,"Export"),a()()()(),o(12,"content")(13,"div",7)(14,"div",8)(15,"div",9)(16,"div",10)(17,"table",11)(18,"thead",12)(19,"tr",13),P(20,"th",14),E(21,qe,6,6,"th",15,M),a(),o(23,"tr")(24,"th",16)(25,"span"),p(26," Product "),a()(),o(27,"th",17),p(28,"Variant"),a(),o(29,"th",18),p(30,"SKU"),a(),u(31,Ye,2,1,"ng-template",19),E(32,Qe,7,0,null,null,M),a()(),u(34,mt,3,0,"ng-container",3),b(35,"async"),a(),o(36,"infinite-paginator",20),b(37,"async"),h("onNextPage",function(){return t.infinitePagination.onNextPage(t.searchFilter)})("onLastPage",function(){return t.infinitePagination.onLastPage(t.searchFilter)})("onGetRowCount",function(){return t.infinitePagination.getRowCount(t.searchFilter)}),a()()()()()()()),i&2&&(s("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),r(2),s("ngIf",y(3,13,t.loader$)),r(4),s("ngIf",y(7,15,t.data$)),r(15),T(t.channels()),r(10),s("ngxPermissionsOnly",w(21,Re,t.rolePriceEdit)),r(),T(t.channels()),r(2),s("ngIf",y(35,17,t.data$)),r(2),s("totalData",t.infinitePagination.totalData())("hideCount",t.infinitePagination.hideCount())("rowCount",y(37,19,t.infinitePagination.totalRowCount$))("pageNumber",t.infinitePagination.pageNumber())("disableNextButton",t.infinitePagination.disableNextButton())("goToLastPage",t.infinitePagination.isLastPage()))},dependencies:[B,se,k,me,pe,de,Se,be,$,_e,R,L,Ne,Be,j,A,Ve,fe,Ce,ke],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]})}}return n})();export{qt as CustomChannelPriceComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as C}from"./chunk-7477X7LJ.js";import{a as h,b as y}from"./chunk-OE2JYQHN.js";import{a as r}from"./chunk-7AVVOGZA.js";import"./chunk-XDUYDX35.js";import"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import"./chunk-PXB4YEY3.js";import{F as v,J as o,n}from"./chunk-GPEVUTDI.js";import{Eb as l,Fb as s,Oc as f,Wb as u,gc as c,hc as d,ic as i,ka as m,qb as p}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.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-GZIXVRJT.js").then(e=>e.MultiChannelComparison)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-4RXCRDWF.js").then(e=>e.SingleChannelComparisonComponent)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-EOPCFNMW.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,2 +1,2 @@
|
|
|
1
|
-
import{b as Ft}from"./chunk-ZEAT7ZWR.js";import{a as Lt}from"./chunk-FZDXTSZF.js";import{b as Nt}from"./chunk-SZ22GHDY.js";import{b as Gt}from"./chunk-4YVLPJDF.js";import{a as Vt}from"./chunk-YOGRCIUI.js";import{a as Dt}from"./chunk-PRVOIBMJ.js";import{a as Ot}from"./chunk-T2QY5RTH.js";import{d as At}from"./chunk-LLXJSB37.js";import{e as I}from"./chunk-XMUA7ACY.js";import{a as Et}from"./chunk-WAGDS532.js";import{b as Ct,c as St,h as It,j as Rt,k as Bt}from"./chunk-5SXUJ5XH.js";import{s as Tt}from"./chunk-3S7C3CCV.js";import{E as wt,M as U,k as xt,m as Mt,v as j}from"./chunk-PHCYCYXH.js";import{a as ht,c as ft,h as vt,m as _t,y as yt}from"./chunk-5JWYKH72.js";import{c as kt}from"./chunk-GQH7OSVY.js";import{j as pt,m as mt,n as bt}from"./chunk-UPA7TFVG.js";import{$c as S,Ac as F,Bc as L,Ec as rt,Fa as Y,Fb as y,Fc as u,Gb as tt,Gc as lt,Hb as et,Ic as st,Jc as dt,Ka as _,Kc as gt,Lb as k,Lc as ct,Pa as Z,Pc as ut,Ra as p,Wb as x,Xa as K,Xb as m,Z as W,Zb as V,_c as C,cc as M,ea as Q,hc as l,ia as X,ic as s,id as P,ja as $,jc as b,ka as q,ma as D,nc as w,nd as d,oa as J,pa as r,rb as g,sc as c,tc as T,uc as ot,v as O,vc as at,xb as N,ya as f,yc as nt,za as v,zc as it}from"./chunk-VFLAHRB4.js";import{a as G,b as A}from"./chunk-66YHNWRR.js";var z=function(n){return n[n.CSV=0]="CSV",n[n.XLSX=1]="XLSX",n}(z||{}),jt=(()=>{class n{constructor(t){this.http=t}exportCSV(t,o){let e=A(G({},o),{Export:!0,FormatType:z.CSV});this.downloadFile(t,e)}exportCSVIds(t,o){this.downloadFile(t,o)}exportXlsx(t,o){let e=A(G({},o),{FormatType:z.XLSX});this.downloadFile(t,e)}downloadFile(t,o){this.http.postFile(`/api/${t}`,o).subscribe(e=>{let a=window.URL.createObjectURL(e.file),i=document.createElement("a");i.download=this.getFilenameFromContentDisposition(e.title),i.href=a,i.click(),URL.revokeObjectURL(a),i.remove()})}getFilenameFromContentDisposition(t){let e=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(t);return e!=null&&e[1]?e[1].replace(/['"]/g,""):""}exportJSON(t,o,e){this.http.post(`/api/${t}`,e).subscribe(a=>{var i=JSON.stringify(a,null," ");this.downloadJSON(i,o+".json")})}downloadJSON(t,o){var e=new Blob([t],{type:"data:application/json;charset=utf-8"}),a=document.createElement("a");a.setAttribute("href",window.URL.createObjectURL(e)),a.setAttribute("download",o),document.body.appendChild(a),a.click(),document.body.removeChild(a)}static{this.\u0275fac=function(o){return new(o||n)(J(I))}}static{this.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Wt=["button"],Qt=["*"];function Xt(n,E){if(n&1&&(l(0,"div",2),b(1,"mat-pseudo-checkbox",6),s()),n&2){let t=T();g(),m("disabled",t.disabled)}}var Ut=new D("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:$t});function $t(){return{hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1}}var zt=new D("MatButtonToggleGroup"),qt={provide:ht,useExisting:X(()=>H),multi:!0},R=class{source;value;constructor(E,t){this.source=E,this.value=t}},H=(()=>{class n{_changeDetector=r(P);_dir=r(wt,{optional:!0});_multiple=!1;_disabled=!1;_disabledInteractive=!1;_selectionModel;_rawValue;_controlValueAccessorChangeFn=()=>{};_onTouched=()=>{};_buttonToggles;appearance;get name(){return this._name}set name(t){this._name=t,this._markButtonsForCheck()}_name=r(j).getId("mat-button-toggle-group-");vertical;get value(){let t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(o=>o.value):t[0]?t[0].value:void 0}set value(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}valueChange=new _;get selected(){let t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}get multiple(){return this._multiple}set multiple(t){this._multiple=t,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}change=new _;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._markButtonsForCheck()}_hideSingleSelectionIndicator;get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(t){this._hideMultipleSelectionIndicator=t,this._markButtonsForCheck()}_hideMultipleSelectionIndicator;constructor(){let t=r(Ut,{optional:!0});this.appearance=t&&t.appearance?t.appearance:"standard",this.hideSingleSelectionIndicator=t?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=t?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new Gt(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(t=>t.checked)),this.multiple||this._initializeTabIndex()}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_keydown(t){if(this.multiple||this.disabled)return;let e=t.target.id,a=this._buttonToggles.toArray().findIndex(h=>h.buttonId===e),i=null;switch(t.keyCode){case 32:case 13:i=this._buttonToggles.get(a)||null;break;case 38:i=this._getNextButton(a,-1);break;case 37:i=this._getNextButton(a,this.dir==="ltr"?-1:1);break;case 40:i=this._getNextButton(a,1);break;case 39:i=this._getNextButton(a,this.dir==="ltr"?1:-1);break;default:return}i&&(t.preventDefault(),i._onButtonClick(),i.focus())}_emitChangeEvent(t){let o=new R(t,this.value);this._rawValue=o.value,this._controlValueAccessorChangeFn(o.value),this.change.emit(o)}_syncButtonToggle(t,o,e=!1,a=!1){!this.multiple&&this.selected&&!t.checked&&(this.selected.checked=!1),this._selectionModel?o?this._selectionModel.select(t):this._selectionModel.deselect(t):a=!0,a?Promise.resolve().then(()=>this._updateModelValue(t,e)):this._updateModelValue(t,e)}_isSelected(t){return this._selectionModel&&this._selectionModel.isSelected(t)}_isPrechecked(t){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(o=>t.value!=null&&o===t.value):t.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(t=>{t.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let t=0;t<this._buttonToggles.length;t++){let o=this._buttonToggles.get(t);if(!o.disabled){o.tabIndex=0;break}}this._markButtonsForCheck()}_getNextButton(t,o){let e=this._buttonToggles;for(let a=1;a<=e.length;a++){let i=(t+o*a+e.length)%e.length,h=e.get(i);if(h&&!h.disabled)return h}return null}_setSelectionByValue(t){if(this._rawValue=t,!this._buttonToggles)return;let o=this._buttonToggles.toArray();if(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach(e=>this._selectValue(e,o))):(this._clearSelection(),this._selectValue(t,o)),!this.multiple&&o.every(e=>e.tabIndex===-1)){for(let e of o)if(!e.disabled){e.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(t=>{t.checked=!1,this.multiple||(t.tabIndex=-1)})}_selectValue(t,o){for(let e of o)if(e.value===t){e.checked=!0,this._selectionModel.select(e),this.multiple||(e.tabIndex=0);break}}_updateModelValue(t,o){o&&this._emitChangeEvent(t),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(t=>t._markForCheck())}static \u0275fac=function(o){return new(o||n)};static \u0275dir=et({type:n,selectors:[["mat-button-toggle-group"]],contentQueries:function(o,e,a){if(o&1&&nt(a,B,5),o&2){let i;F(i=L())&&(e._buttonToggles=i)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(o,e){o&1&&c("keydown",function(i){return e._keydown(i)}),o&2&&(x("role",e.multiple?"group":"radiogroup")("aria-disabled",e.disabled),V("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard",e.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",d],value:"value",multiple:[2,"multiple","multiple",d],disabled:[2,"disabled","disabled",d],disabledInteractive:[2,"disabledInteractive","disabledInteractive",d],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",d],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",d]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[ut([qt,{provide:zt,useExisting:n}])]})}return n})(),B=(()=>{class n{_changeDetectorRef=r(P);_elementRef=r(Z);_focusMonitor=r(xt);_idGenerator=r(j);_animationMode=r(K,{optional:!0});_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex}set tabIndex(t){t!==this._tabIndex&&(this._tabIndex=t,this._markForCheck())}_tabIndex;disableRipple;get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(t){this._appearance=t}_appearance;get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(t){t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(t){this._disabled=t}_disabled=!1;get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t}_disabledInteractive;change=new _;constructor(){r(Mt).load(Et);let t=r(zt,{optional:!0}),o=r(new Y("tabindex"),{optional:!0})||"",e=r(Ut,{optional:!0});this._tabIndex=parseInt(o)||0,this.buttonToggleGroup=t,this.appearance=e&&e.appearance?e.appearance:"standard",this.disabledInteractive=e?.disabledInteractive??!1}ngOnInit(){let t=this.buttonToggleGroup;this.id=this.id||this._idGenerator.getId("mat-button-toggle-"),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._animationMode!=="NoopAnimations"&&this._elementRef.nativeElement.classList.add("mat-button-toggle-animations-enabled"),this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}focus(t){this._buttonElement.nativeElement.focus(t)}_onButtonClick(){if(this.disabled)return;let t=this.isSingleSelector()?!0:!this._checked;if(t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let o=this.buttonToggleGroup._buttonToggles.find(e=>e.tabIndex===0);o&&(o.tabIndex=-1),this.tabIndex=0}this.change.emit(new R(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=y({type:n,selectors:[["mat-button-toggle"]],viewQuery:function(o,e){if(o&1&&it(Wt,5),o&2){let a;F(a=L())&&(e._buttonElement=a.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(o,e){o&1&&c("focus",function(){return e.focus()}),o&2&&(x("aria-label",null)("aria-labelledby",null)("id",e.id)("name",null),V("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-disabled-interactive",e.disabledInteractive)("mat-button-toggle-appearance-standard",e.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",d],appearance:"appearance",checked:[2,"checked","checked",d],disabled:[2,"disabled","disabled",d],disabledInteractive:[2,"disabledInteractive","disabledInteractive",d]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:Qt,decls:7,vars:13,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-checkbox-wrapper"],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"],["state","checked","aria-hidden","true","appearance","minimal",3,"disabled"]],template:function(o,e){if(o&1){let a=w();ot(),l(0,"button",1,0),c("click",function(){return f(a),v(e._onButtonClick())}),k(2,Xt,2,1,"div",2),l(3,"span",3),at(4),s()(),b(5,"span",4)(6,"span",5)}if(o&2){let a=rt(1);m("id",e.buttonId)("disabled",e.disabled&&!e.disabledInteractive||null),x("role",e.isSingleSelector()?"radio":"button")("tabindex",e.disabled&&!e.disabledInteractive?-1:e.tabIndex)("aria-pressed",e.isSingleSelector()?null:e.checked)("aria-checked",e.isSingleSelector()?e.checked:null)("name",e._getButtonName())("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby)("aria-disabled",e.disabled&&e.disabledInteractive?"true":null),g(2),M(e.buttonToggleGroup&&(!e.buttonToggleGroup.multiple&&!e.buttonToggleGroup.hideSingleSelectionIndicator||e.buttonToggleGroup.multiple&&!e.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),g(4),m("matRippleTrigger",a)("matRippleDisabled",e.disableRipple||e.disabled)}},dependencies:[At,Vt],styles:[`.mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);border-radius:var(--mat-legacy-button-toggle-shape)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-standard-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-legacy-button-toggle-text-color);font-family:var(--mat-legacy-button-toggle-label-text-font);font-size:var(--mat-legacy-button-toggle-label-text-size);line-height:var(--mat-legacy-button-toggle-label-text-line-height);font-weight:var(--mat-legacy-button-toggle-label-text-weight);letter-spacing:var(--mat-legacy-button-toggle-label-text-tracking);--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-legacy-button-toggle-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-legacy-button-toggle-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-legacy-button-toggle-selected-state-text-color);background-color:var(--mat-legacy-button-toggle-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-legacy-button-toggle-disabled-state-text-color);background-color:var(--mat-legacy-button-toggle-disabled-state-background-color);--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-legacy-button-toggle-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-legacy-button-toggle-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-standard-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-standard-button-toggle-background-color, transparent);font-family:var(--mat-standard-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-standard-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-standard-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-standard-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-standard-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-standard-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-standard-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-standard-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-standard-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-standard-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-standard-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-legacy-button-toggle-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-standard-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-legacy-button-toggle-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}
|
|
1
|
+
import{b as Ft}from"./chunk-YXFTLQ5M.js";import{a as Lt}from"./chunk-7TWBIV3T.js";import{b as Nt}from"./chunk-LOJPRXKZ.js";import{b as Gt}from"./chunk-CH2MLZU7.js";import{a as Vt}from"./chunk-ZZVNB72Q.js";import{a as Dt}from"./chunk-RIHLYYZU.js";import{a as Ot}from"./chunk-T6QOFDEE.js";import{d as At}from"./chunk-QCZIDOKW.js";import{e as I}from"./chunk-BUFEIJAI.js";import{a as Et}from"./chunk-KHWTOD6H.js";import{b as Ct,c as St,h as It,j as Rt,k as Bt}from"./chunk-ITTRZMEX.js";import{s as Tt}from"./chunk-TMFFA26Y.js";import{E as wt,M as U,k as xt,m as Mt,v as j}from"./chunk-WAW37FIG.js";import{a as ht,c as ft,h as vt,m as _t,y as yt}from"./chunk-DPLEMBB4.js";import{f as kt}from"./chunk-PXB4YEY3.js";import{j as pt,m as mt,n as bt}from"./chunk-GPEVUTDI.js";import{Ac as L,Dc as rt,Eb as y,Ec as u,Fa as Y,Fb as tt,Fc as lt,Gb as et,Hc as st,Ic as dt,Jc as gt,Ka as _,Kb as k,Kc as ct,Oa as Z,Oc as ut,Qa as p,Vb as x,Wa as K,Wb as m,Yb as V,Z as W,Zc as C,_c as S,bc as M,ea as Q,gc as l,hc as s,hd as P,ia as X,ic as b,ja as $,ka as q,ma as D,mc as w,md as d,oa as J,pa as r,qb as g,rc as c,sc as T,tc as ot,uc as at,v as O,wb as N,xc as nt,ya as f,yc as it,za as v,zc as F}from"./chunk-T5ONJF63.js";import{a as G,b as A}from"./chunk-K2H6WANG.js";var z=function(n){return n[n.CSV=0]="CSV",n[n.XLSX=1]="XLSX",n}(z||{}),jt=(()=>{class n{constructor(t){this.http=t}exportCSV(t,o){let e=A(G({},o),{Export:!0,FormatType:z.CSV});this.downloadFile(t,e)}exportCSVIds(t,o){this.downloadFile(t,o)}exportXlsx(t,o){let e=A(G({},o),{FormatType:z.XLSX});this.downloadFile(t,e)}downloadFile(t,o){this.http.postFile(`/api/${t}`,o).subscribe(e=>{let a=window.URL.createObjectURL(e.file),i=document.createElement("a");i.download=this.getFilenameFromContentDisposition(e.title),i.href=a,i.click(),URL.revokeObjectURL(a),i.remove()})}getFilenameFromContentDisposition(t){let e=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(t);return e!=null&&e[1]?e[1].replace(/['"]/g,""):""}exportJSON(t,o,e){this.http.post(`/api/${t}`,e).subscribe(a=>{var i=JSON.stringify(a,null," ");this.downloadJSON(i,o+".json")})}downloadJSON(t,o){var e=new Blob([t],{type:"data:application/json;charset=utf-8"}),a=document.createElement("a");a.setAttribute("href",window.URL.createObjectURL(e)),a.setAttribute("download",o),document.body.appendChild(a),a.click(),document.body.removeChild(a)}static{this.\u0275fac=function(o){return new(o||n)(J(I))}}static{this.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Wt=["button"],Qt=["*"];function Xt(n,E){if(n&1&&(l(0,"div",2),b(1,"mat-pseudo-checkbox",6),s()),n&2){let t=T();g(),m("disabled",t.disabled)}}var Ut=new D("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:$t});function $t(){return{hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1}}var zt=new D("MatButtonToggleGroup"),qt={provide:ht,useExisting:X(()=>H),multi:!0},R=class{source;value;constructor(E,t){this.source=E,this.value=t}},H=(()=>{class n{_changeDetector=r(P);_dir=r(wt,{optional:!0});_multiple=!1;_disabled=!1;_disabledInteractive=!1;_selectionModel;_rawValue;_controlValueAccessorChangeFn=()=>{};_onTouched=()=>{};_buttonToggles;appearance;get name(){return this._name}set name(t){this._name=t,this._markButtonsForCheck()}_name=r(j).getId("mat-button-toggle-group-");vertical;get value(){let t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(o=>o.value):t[0]?t[0].value:void 0}set value(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}valueChange=new _;get selected(){let t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}get multiple(){return this._multiple}set multiple(t){this._multiple=t,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}change=new _;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._markButtonsForCheck()}_hideSingleSelectionIndicator;get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(t){this._hideMultipleSelectionIndicator=t,this._markButtonsForCheck()}_hideMultipleSelectionIndicator;constructor(){let t=r(Ut,{optional:!0});this.appearance=t&&t.appearance?t.appearance:"standard",this.hideSingleSelectionIndicator=t?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=t?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new Gt(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(t=>t.checked)),this.multiple||this._initializeTabIndex()}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_keydown(t){if(this.multiple||this.disabled)return;let e=t.target.id,a=this._buttonToggles.toArray().findIndex(h=>h.buttonId===e),i=null;switch(t.keyCode){case 32:case 13:i=this._buttonToggles.get(a)||null;break;case 38:i=this._getNextButton(a,-1);break;case 37:i=this._getNextButton(a,this.dir==="ltr"?-1:1);break;case 40:i=this._getNextButton(a,1);break;case 39:i=this._getNextButton(a,this.dir==="ltr"?1:-1);break;default:return}i&&(t.preventDefault(),i._onButtonClick(),i.focus())}_emitChangeEvent(t){let o=new R(t,this.value);this._rawValue=o.value,this._controlValueAccessorChangeFn(o.value),this.change.emit(o)}_syncButtonToggle(t,o,e=!1,a=!1){!this.multiple&&this.selected&&!t.checked&&(this.selected.checked=!1),this._selectionModel?o?this._selectionModel.select(t):this._selectionModel.deselect(t):a=!0,a?Promise.resolve().then(()=>this._updateModelValue(t,e)):this._updateModelValue(t,e)}_isSelected(t){return this._selectionModel&&this._selectionModel.isSelected(t)}_isPrechecked(t){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(o=>t.value!=null&&o===t.value):t.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(t=>{t.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let t=0;t<this._buttonToggles.length;t++){let o=this._buttonToggles.get(t);if(!o.disabled){o.tabIndex=0;break}}this._markButtonsForCheck()}_getNextButton(t,o){let e=this._buttonToggles;for(let a=1;a<=e.length;a++){let i=(t+o*a+e.length)%e.length,h=e.get(i);if(h&&!h.disabled)return h}return null}_setSelectionByValue(t){if(this._rawValue=t,!this._buttonToggles)return;let o=this._buttonToggles.toArray();if(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach(e=>this._selectValue(e,o))):(this._clearSelection(),this._selectValue(t,o)),!this.multiple&&o.every(e=>e.tabIndex===-1)){for(let e of o)if(!e.disabled){e.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(t=>{t.checked=!1,this.multiple||(t.tabIndex=-1)})}_selectValue(t,o){for(let e of o)if(e.value===t){e.checked=!0,this._selectionModel.select(e),this.multiple||(e.tabIndex=0);break}}_updateModelValue(t,o){o&&this._emitChangeEvent(t),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(t=>t._markForCheck())}static \u0275fac=function(o){return new(o||n)};static \u0275dir=et({type:n,selectors:[["mat-button-toggle-group"]],contentQueries:function(o,e,a){if(o&1&&nt(a,B,5),o&2){let i;F(i=L())&&(e._buttonToggles=i)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(o,e){o&1&&c("keydown",function(i){return e._keydown(i)}),o&2&&(x("role",e.multiple?"group":"radiogroup")("aria-disabled",e.disabled),V("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard",e.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",d],value:"value",multiple:[2,"multiple","multiple",d],disabled:[2,"disabled","disabled",d],disabledInteractive:[2,"disabledInteractive","disabledInteractive",d],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",d],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",d]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[ut([qt,{provide:zt,useExisting:n}])]})}return n})(),B=(()=>{class n{_changeDetectorRef=r(P);_elementRef=r(Z);_focusMonitor=r(xt);_idGenerator=r(j);_animationMode=r(K,{optional:!0});_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex}set tabIndex(t){t!==this._tabIndex&&(this._tabIndex=t,this._markForCheck())}_tabIndex;disableRipple;get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(t){this._appearance=t}_appearance;get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(t){t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(t){this._disabled=t}_disabled=!1;get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t}_disabledInteractive;change=new _;constructor(){r(Mt).load(Et);let t=r(zt,{optional:!0}),o=r(new Y("tabindex"),{optional:!0})||"",e=r(Ut,{optional:!0});this._tabIndex=parseInt(o)||0,this.buttonToggleGroup=t,this.appearance=e&&e.appearance?e.appearance:"standard",this.disabledInteractive=e?.disabledInteractive??!1}ngOnInit(){let t=this.buttonToggleGroup;this.id=this.id||this._idGenerator.getId("mat-button-toggle-"),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._animationMode!=="NoopAnimations"&&this._elementRef.nativeElement.classList.add("mat-button-toggle-animations-enabled"),this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}focus(t){this._buttonElement.nativeElement.focus(t)}_onButtonClick(){if(this.disabled)return;let t=this.isSingleSelector()?!0:!this._checked;if(t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let o=this.buttonToggleGroup._buttonToggles.find(e=>e.tabIndex===0);o&&(o.tabIndex=-1),this.tabIndex=0}this.change.emit(new R(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=y({type:n,selectors:[["mat-button-toggle"]],viewQuery:function(o,e){if(o&1&&it(Wt,5),o&2){let a;F(a=L())&&(e._buttonElement=a.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(o,e){o&1&&c("focus",function(){return e.focus()}),o&2&&(x("aria-label",null)("aria-labelledby",null)("id",e.id)("name",null),V("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-disabled-interactive",e.disabledInteractive)("mat-button-toggle-appearance-standard",e.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",d],appearance:"appearance",checked:[2,"checked","checked",d],disabled:[2,"disabled","disabled",d],disabledInteractive:[2,"disabledInteractive","disabledInteractive",d]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:Qt,decls:7,vars:13,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-checkbox-wrapper"],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"],["state","checked","aria-hidden","true","appearance","minimal",3,"disabled"]],template:function(o,e){if(o&1){let a=w();ot(),l(0,"button",1,0),c("click",function(){return f(a),v(e._onButtonClick())}),k(2,Xt,2,1,"div",2),l(3,"span",3),at(4),s()(),b(5,"span",4)(6,"span",5)}if(o&2){let a=rt(1);m("id",e.buttonId)("disabled",e.disabled&&!e.disabledInteractive||null),x("role",e.isSingleSelector()?"radio":"button")("tabindex",e.disabled&&!e.disabledInteractive?-1:e.tabIndex)("aria-pressed",e.isSingleSelector()?null:e.checked)("aria-checked",e.isSingleSelector()?e.checked:null)("name",e._getButtonName())("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby)("aria-disabled",e.disabled&&e.disabledInteractive?"true":null),g(2),M(e.buttonToggleGroup&&(!e.buttonToggleGroup.multiple&&!e.buttonToggleGroup.hideSingleSelectionIndicator||e.buttonToggleGroup.multiple&&!e.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),g(4),m("matRippleTrigger",a)("matRippleDisabled",e.disableRipple||e.disabled)}},dependencies:[At,Vt],styles:[`.mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);border-radius:var(--mat-legacy-button-toggle-shape)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-standard-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-legacy-button-toggle-text-color);font-family:var(--mat-legacy-button-toggle-label-text-font);font-size:var(--mat-legacy-button-toggle-label-text-size);line-height:var(--mat-legacy-button-toggle-label-text-line-height);font-weight:var(--mat-legacy-button-toggle-label-text-weight);letter-spacing:var(--mat-legacy-button-toggle-label-text-tracking);--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-legacy-button-toggle-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-legacy-button-toggle-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-legacy-button-toggle-selected-state-text-color);background-color:var(--mat-legacy-button-toggle-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-legacy-button-toggle-disabled-state-text-color);background-color:var(--mat-legacy-button-toggle-disabled-state-background-color);--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-legacy-button-toggle-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-legacy-button-toggle-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-standard-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-standard-button-toggle-background-color, transparent);font-family:var(--mat-standard-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-standard-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-standard-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-standard-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-standard-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-standard-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-standard-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-standard-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-standard-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-standard-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-standard-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-legacy-button-toggle-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-standard-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-legacy-button-toggle-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return n})(),Ht=(()=>{class n{static \u0275fac=function(o){return new(o||n)};static \u0275mod=tt({type:n});static \u0275inj=q({imports:[U,Ot,B,U]})}return n})();function Yt(n,E){if(n&1){let t=w();l(0,"i",18),c("click",function(){f(t);let e=T();return v(e.getTotalRowCount())}),s()}}var $e=(()=>{class n{constructor(t,o){this.dialogRef=t,this.item=o,this.exportService=r(jt),this.httpService=r(I),this.displayedMinRangeRow=p(1),this.displayedMaxRangeRow=p(1e4),this.pageNumber=p(1),this.rowCount=p(1e4),this.isShowTotalRowCount=p(!1),this.filter=p({}),this.filter.set(this.item.filterExport)}ngOnInit(){this.initModalConfig()}getTotalRowCount(){this.totalRowCount$=this.httpService.post(`/api/${this.item.getRowCountApi}`,this.item.filterExport).pipe(O(t=>t.Total!=null?t.Total:t.Count||0),Q(t=>{this.isShowTotalRowCount.set(!0),t<this.displayedMaxRangeRow()&&this.setMinMaxRangeDisplayedRow(t)}),O(t=>Math.floor(t/this.rowCount())+(t%this.rowCount()>0?1:0)),W(1))}initModalConfig(){this.modalConfig=new Rt,this.modalConfig.title=`${this.item?.title}`,this.modalConfig.customWidth="450px",this.modalConfig.hideCancel=!0}onSubmit(){this.filter.update(t=>(t.RowCount=this.rowCount(),t.PageNumber=this.pageNumber(),t)),this.exportService.exportCSV(this.item.exportApi,this.filter()),this.dialogRef.close()}onClose(){this.dialogRef.close()}onPageNumberChange(t){this.pageNumber.set(t),this.setDisplayedMinMaxRangeRow()}setMinMaxRangeDisplayedRow(t){for(;this.displayedMaxRangeRow()>t&&this.pageNumber()>1;)this.pageNumber.update(o=>(o-=1,o)),this.setDisplayedMinMaxRangeRow();this.displayedMaxRangeRow.set(t)}setDisplayedMinMaxRangeRow(){let t=this.pageNumber()*this.rowCount()-this.rowCount()+1;this.displayedMinRangeRow.set(t),this.displayedMaxRangeRow.set(this.pageNumber()*this.rowCount())}static{this.\u0275fac=function(o){return new(o||n)(N(Ct),N(St))}}static{this.\u0275cmp=y({type:n,selectors:[["app-modal-export"]],decls:30,vars:13,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"container-fluid"],[1,"row"],[1,"col-3","fw-bold",2,"display","flex","align-items","center"],[1,"col-9"],["value","CSV",3,"checked"],[1,"fa-solid","fa-file-csv","me-3","mb-1"],[1,"row","mt-8"],[1,"col-3","d-flex","align-items-center","fw-bold"],[1,"col-auto","d-flex","align-items-center"],["type","text","autoNum","","name","pageNumber","id","pageNumber",1,"form-control","text-center",2,"width","50px",3,"ngModelChange","ngModel"],[1,"ms-3"],[1,"fa-solid","fa-circle-question","mx-3"],[1,"fw-bold"],[1,"col-12","mt-8"],[1,"p-5",2,"background-color","#add8e6","border-radius","4px"],[1,"fa-solid","fa-circle-exclamation","mx-3"],[1,"fa-solid","fa-circle-question","mx-3",3,"click"]],template:function(o,e){o&1&&(l(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),l(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),u(5," Format "),s(),l(6,"div",5)(7,"mat-button-toggle-group")(8,"mat-button-toggle",6),b(9,"i",7),u(10,"CSV "),s()()()(),l(11,"div",8)(12,"div",9),u(13,"Page"),s(),l(14,"div",10)(15,"input",11),ct("ngModelChange",function(i){return gt(e.item.pageNumber,i)||(e.item.pageNumber=i),i}),c("ngModelChange",function(i){return e.onPageNumberChange(i)}),s(),l(16,"span",12),u(17,"of "),k(18,Yt,1,0,"i",13),l(19,"span",14),u(20),C(21,"async"),s(),u(22," page(s)"),s()()(),l(23,"div",3)(24,"div",15)(25,"div",16),b(26,"i",17),u(27),C(28,"number"),C(29,"number"),s()()()()()()),o&2&&(m("config",e.modalConfig),g(8),m("checked",!0),g(7),dt("ngModel",e.item.pageNumber),g(3),M(e.isShowTotalRowCount()==!1?18:-1),g(2),lt(S(21,7,e.totalRowCount$)),g(7),st(" Exporting data from ",S(28,9,e.displayedMinRangeRow())," - ",S(29,11,e.displayedMaxRangeRow())," "))},dependencies:[bt,pt,mt,yt,ft,vt,_t,Ft,It,Dt,Nt,Lt,Bt,kt,Tt,Ht,H,B],encapsulation:2})}}return n})();export{jt as a,$e as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as se}from"./chunk-PUJ4JVT2.js";import{a as E}from"./chunk-LLZSSV5A.js";import{a as ne,b as S,c as re,d as de,e as le,f as H,g as ce,h as pe,m as f}from"./chunk-CRC6ZWYT.js";import{a as ae,b as T}from"./chunk-LOJPRXKZ.js";import{b as oe,d as x}from"./chunk-MNFHFW3E.js";import{a as I}from"./chunk-RIHLYYZU.js";import{a as ee,b as te,f as ie}from"./chunk-Q2OEJFVT.js";import{a as X}from"./chunk-DPLEMBB4.js";import{c as Z}from"./chunk-PXB4YEY3.js";import{g as v,j as W,n as w}from"./chunk-GPEVUTDI.js";import{Dc as A,Eb as b,Ec as U,Fb as D,Fc as G,Ka as N,Kb as h,Oc as q,Vb as P,Wb as n,Xb as V,Zc as J,_c as K,ca as Y,f as F,g as B,gc as d,hc as s,hd as Q,ic as g,ja as j,jc as R,ka as y,kc as z,mc as _,qb as r,rc as m,sc as C,vc as $,wb as p,xa as L,ya as l,za as c}from"./chunk-T5ONJF63.js";var O=(()=>{class t{constructor(){this._calendarHeaderConfig=new B({hideBtnClear:!1,hideBtnToday:!1}),this.calendarConfig=this._calendarHeaderConfig.value}setHeaderConfig(e){this._calendarHeaderConfig.next(e)}getHeaderConfig$(){return this._calendarHeaderConfig.asObservable()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ce=["class","component ts"];function ke(t,k){if(t&1){let e=_();d(0,"button",3),m("click",function(){l(e);let a=C(2);return c(a.todayClicked())}),g(1,"i",4),s()}}function Me(t,k){if(t&1){let e=_();d(0,"button",5),m("click",function(){l(e);let a=C(2);return c(a.clearClicked())}),g(1,"i",6),s()}}function ye(t,k){if(t&1&&(R(0),h(1,ke,2,0,"button",1)(2,Me,2,0,"button",2),z()),t&2){let e=k.ngIf;r(),n("ngIf",!e.hideBtnToday),r(),n("ngIf",!e.hideBtnClear)}}var ue=(()=>{class t{constructor(e,i,a,o,u){this._datePicker=e,this._calendar=i,this._dateAdapter=a,this.calendarService=o,this._destroyed=new F,i.stateChanges.pipe(Y(this._destroyed)).subscribe(M=>u.markForCheck()),this.calendarConfig$=this.calendarService.getHeaderConfig$()}todayClicked(){this._calendar.activeDate=this._dateAdapter.today(),this._datePicker.select(this._dateAdapter.today()),this._datePicker.close()}clearClicked(){this._datePicker.select(null),this._datePicker.close()}ngOnChanges(e){this._calendar.ngOnChanges(e)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}static{this.\u0275fac=function(i){return new(i||t)(p(H),p(le),p(S),p(O),p(Q))}}static{this.\u0275cmp=b({type:t,selectors:[["POS-DatepickerHeader",8,"component","ts"]],standalone:!1,features:[L],attrs:Ce,decls:3,vars:3,consts:[[4,"ngIf"],["mat-icon-button","","title","Today",3,"click",4,"ngIf"],["mat-icon-button","","title","Clear",3,"click",4,"ngIf"],["mat-icon-button","","title","Today",3,"click"],[1,"far","fa-clock",2,"font-size","18px"],["mat-icon-button","","title","Clear",3,"click"],[1,"far","fa-xmark-circle",2,"font-size","18px"]],template:function(i,a){i&1&&(d(0,"mat-calendar-header"),h(1,ye,3,2,"ng-container",0),J(2,"async"),s()),i&2&&(r(),n("ngIf",K(2,1,a.calendarConfig$)))},dependencies:[v,oe,de,W],encapsulation:2})}}return t})(),he=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=D({type:t})}static{this.\u0275inj=y({providers:[f],imports:[w,x,E,f,I,T]})}}return t})();function be(t,k){if(t&1&&(d(0,"mat-label",6)(1,"span"),U(2),s()()),t&2){let e=C();n("show",e.placeholder),r(2),G(e.placeholder)}}var De={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},et=(()=>{class t{set hidelClearBtn(e){this.calendarService.setHeaderConfig({hideBtnClear:e,hideBtnToday:this.calendarService.calendarConfig.hideBtnToday})}change(e){let i=null;e&&(i=e.toDate(),i.setHours(0,0,0,0)),this.onChange(i),this.dateChange.emit(i)}constructor(e){this.calendarService=e,this.headerComponent=ue,this.appearance="outline",this.isFloatingLabel=!0,this.disabled=!1,this.readOnly=!1,this.dateChange=new N,this.minDate=Z.MinDate,this.onChange=i=>{},this.displayToggle=!0}writeValue(e){this.date=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){this.disabled=e}onOpenDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="inside")}}onCloseDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="outside")}}ngOnDestroy(){this.calendarService.setHeaderConfig({hideBtnClear:!1,hideBtnToday:!1})}static{this.\u0275fac=function(i){return new(i||t)(p(O))}}static{this.\u0275cmp=b({type:t,selectors:[["datepicker"]],inputs:{data_cy:"data_cy",placeholder:"placeholder",displayToggle:"displayToggle",appearance:"appearance",width:"width",isFloatingLabel:"isFloatingLabel",date:"date",disabled:"disabled",readOnly:"readOnly",minDateValidation:"minDateValidation",maxDateValidation:"maxDateValidation",hidelClearBtn:"hidelClearBtn"},outputs:{dateChange:"dateChange"},standalone:!1,features:[q([{provide:S,useClass:se,deps:[ne]},{provide:re,useValue:De},{provide:X,multi:!0,useExisting:t}])],decls:6,vars:17,consts:[["picker1",""],[1,"datepicker",3,"disabled","appearance"],[3,"show",4,"ngIf"],["matInput","",3,"dateChange","click","matDatepicker","min","max","placeholder","value","disabled","readonly"],["matSuffix","",3,"for"],[3,"opened","closed","calendarHeaderComponent"],[3,"show"]],template:function(i,a){if(i&1){let o=_();d(0,"mat-form-field",1),h(1,be,3,2,"mat-label",2),d(2,"input",3),m("dateChange",function(M){return l(o),c(a.change(M.value))})("click",function(){l(o);let M=A(5);return c(M.open())}),s(),g(3,"mat-datepicker-toggle",4),d(4,"mat-datepicker",5,0),m("opened",function(){return l(o),c(a.onOpenDatepicker())})("closed",function(){return l(o),c(a.onCloseDatepicker())}),s()()}if(i&2){let o=A(5);V("width",a.width||100,"%"),n("disabled",a.disabled)("appearance",a.appearance),r(),n("ngIf",a.isFloatingLabel&&a.placeholder),r(),$("placeholder",a.placeholder||""),n("matDatepicker",o)("min",a.minDateValidation)("max",a.maxDateValidation)("value",a.date==a.minDate?null:a.date)("disabled",a.disabled)("readonly",a.readOnly),P("data-cy",a.data_cy),r(),V("display",a.displayToggle?"unset":"none"),n("for",o),r(),n("calendarHeaderComponent",a.headerComponent)}},dependencies:[v,H,ce,pe,ie,ee,te,ae],styles:[`.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline{background-color:#e9ecef!important;opacity:1!important}.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline input{color:#00000061!important}.datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{min-height:33px;padding-top:18px;padding-bottom:13px}.datepicker .mat-mdc-icon-button.mat-mdc-button-base{padding:0}.datepicker .mat-mdc-form-field-subscript-wrapper{display:none}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{padding:0!important}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important;font-size:16px;color:#9da2a6}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:23px!important;font-size:.875rem;color:#ccc}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#fff}
|
|
2
|
+
`],encapsulation:2})}}return t})(),tt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=D({type:t})}static{this.\u0275inj=y({providers:[f],imports:[w,x,E,f,I,T,he]})}}return t})();export{et as a,tt as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ue,c as ht,d as Be,f as pe,g as _t,h as mt,i as bt,j as gt,m as De,n as ft,p as He}from"./chunk-
|
|
1
|
+
import{a as ue,c as ht,d as Be,f as pe,g as _t,h as mt,i as bt,j as gt,m as De,n as ft,p as He}from"./chunk-UDOCTVWA.js";import{C as dt,G as ut,H as we,J as xe,P as Ce,S as Re,W as pt,Y as Oe,Z as j,_ as K,a as U,b as ve,c as ot,da as de,e as rt,i as at,j as st,k as ke,l as lt,m as ct,o as X,p as F,r as Ne,u as ye}from"./chunk-GBD4FIF3.js";import{c as it,d as ge,f as ie,g as nt,i as fe}from"./chunk-K5XRGNWG.js";import{a as tt}from"./chunk-DPLEMBB4.js";import{d as Ve,f as et,g as Pe,h as Ee,i as Fe,n as te}from"./chunk-GPEVUTDI.js";import{Aa as se,Ac as $,Ca as L,Dc as Je,Eb as A,Ec as D,Fb as le,Fc as Y,Gc as G,Hc as Xe,Ib as N,Ka as O,Kb as h,La as qe,Na as ee,Oc as ce,Qc as R,Rc as be,Vb as C,Wb as c,Xb as Ze,Zb as Ge,_b as H,gc as m,hc as _,ia as We,ic as I,ja as oe,jc as P,ka as re,kc as E,lc as Z,mc as B,md as k,nd as J,pa as ae,pd as Ae,qb as l,rc as T,sc as s,tc as $e,uc as me,wb as Le,xa as ze,xc as V,ya as d,yc as Me,za as u,zc as S}from"./chunk-T5ONJF63.js";var Mt=({dt:t})=>`
|
|
2
2
|
.p-badge {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
border-radius: ${t("badge.border.radius")};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as y,m as k,n as N}from"./chunk-GPEVUTDI.js";import{Eb as b,Ec as a,Fc as v,Gc as w,Hc as x,Ka as s,Kb as P,Na as C,Wb as p,Zc as u,_c as d,gc as n,hc as o,ic as f,mc as _,qb as i,rc as m,sc as c,ya as g,za as h}from"./chunk-T5ONJF63.js";function I(t,S){if(t&1){let r=_();n(0,"span",10),m("click",function(){g(r);let e=c();return h(e.onShowTotal())}),n(1,"i",11),a(2,"?"),o()()}}function B(t,S){if(t&1&&(n(0,"span"),a(1),u(2,"number"),o()),t&2){let r=c();i(),v(d(2,1,r.paginationTotal))}}var j=(()=>{class t{constructor(){this.nextButtonAlwaysVisible=C(!1),this.next=new s,this.filterChange=new s,this.previous=new s,this.total=new s,this.hasClicked=!1}onShowTotal(){this.total.emit()}onPreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.filterChange.emit(this.filter),this.previous.emit()}onNextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.filterChange.emit(this.filter),this.next.emit()}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=b({type:t,selectors:[["app-custom-paginator"]],inputs:{nextButtonAlwaysVisible:[1,"nextButtonAlwaysVisible"],filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{next:"next",filterChange:"filterChange",previous:"previous",total:"total"},decls:16,vars:11,consts:[[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"],[4,"ngIf"],[1,"btn-group"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click","hidden"],[1,"fas","fa-arrow-left"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click","hidden"],[1,"fas","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(l,e){l&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),a(3),u(4,"number"),u(5,"number"),P(6,I,3,0,"span",3)(7,B,3,3,"span",4),a(8),o()(),n(9,"div",5)(10,"a",6),m("click",function(){return e.onPreviousPage()}),f(11,"i",7),a(12," Prev"),o(),n(13,"a",8),m("click",function(){return e.onNextPage()}),f(14,"i",9),a(15," Next"),o()()()),l&2&&(i(3),x(" Showing ",d(4,7,e.filter.PageSize*(e.filter.PageNumber-1)+1)," - ",d(5,9,e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata)," of "),i(3),p("ngIf",!e.hasClicked),i(),p("ngIf",e.hasClicked),i(),w(" records ~ ",e.filter.PageNumber," Page "),i(2),p("hidden",e.filter.PageNumber==1),i(3),p("hidden",(e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata==e.paginationTotal||e.totaldata<e.filter.PageSize)&&!e.nextButtonAlwaysVisible()))},dependencies:[N,y,k],encapsulation:2})}}return t})();export{j as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as ke}from"./chunk-H55YXRO5.js";import"./chunk-7477X7LJ.js";import{a as N}from"./chunk-QRJDRFNS.js";import{a as H}from"./chunk-XHAXYWZ7.js";import{a as Me,b as Pe,c as De,d as G}from"./chunk-UIM3W5B7.js";import"./chunk-BVIRHZTZ.js";import{a as ye,b as Ie,c as we}from"./chunk-RGR34QZ3.js";import{b as Ve}from"./chunk-3LQNSF7T.js";import{a as Te,b as Ee}from"./chunk-YXFTLQ5M.js";import"./chunk-PXU3DWYL.js";import"./chunk-AL3REAHH.js";import"./chunk-UDOCTVWA.js";import"./chunk-GBD4FIF3.js";import"./chunk-7TWBIV3T.js";import{a as be}from"./chunk-EGTYAIU5.js";import"./chunk-LOJPRXKZ.js";import"./chunk-6ALHX2I4.js";import"./chunk-3RK6DDJD.js";import"./chunk-CH2MLZU7.js";import"./chunk-ZZVNB72Q.js";import{a as Fe}from"./chunk-VGXQU74M.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import{e as he}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{j as ue}from"./chunk-XDUYDX35.js";import{b as me,e as _e}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{d as xe,l as fe,m as Se,n as ve}from"./chunk-ITTRZMEX.js";import{r as Ce,s as ge}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{b as ae,c as le,h as re,m as se,o as ce,y as pe}from"./chunk-DPLEMBB4.js";import{c as f,f as de}from"./chunk-PXB4YEY3.js";import{d as J,g as ee,j as te,k as ne,m as ie,n as oe}from"./chunk-GPEVUTDI.js";import{$c as R,Dc as Q,Eb as Z,Ec as c,Fc as D,G as Y,Gc as E,Ic as b,Jc as F,Kb as h,Kc as T,Oc as X,Qa as W,Qc as k,Wb as d,Z as B,Zc as g,_c as v,ad as z,bc as y,cc as O,ea as $,ec as U,fc as j,gc as a,hc as r,ic as x,jc as M,kc as P,mc as S,ob as V,pa as K,qb as s,rc as C,sc as l,v as A,vc as q,wb as w,ya as m,za as _}from"./chunk-T5ONJF63.js";import{a as L}from"./chunk-K2H6WANG.js";var Le=i=>({"text-decoration-line-through":i}),Ae=i=>({"ms-10":i}),Be=i=>({"bg-gradient-warning":i});function $e(i,p){if(i&1){let e=S();a(0,"button",38),C("click",function(){m(e);let t=l().ngIf,n=l(2);return _(n.onScanInventory(t))}),x(1,"i",39),c(2,"Refresh "),r()}}function We(i,p){if(i&1){let e=S();a(0,"div",36)(1,"button",40),C("click",function(){m(e);let t=l().ngIf,n=l(2);return _(n.updateStock(t))}),x(2,"i",41),c(3," Update "),r(),x(4,"button",42),a(5,"ul",43)(6,"a",44),C("click",function(){m(e);let t=l(3);return _(t.openExportDialog())}),x(7,"i",45),a(8,"span"),c(9,"Export"),r()()()()}}function Oe(i,p){if(i&1){let e=S();a(0,"button",46),C("click",function(){m(e);let t=l(3);return _(t.openExportDialog())}),x(1,"i",45),a(2,"span"),c(3,"Export"),r()()}}function Ue(i,p){if(i&1&&(a(0,"div"),h(1,$e,3,0,"button",35)(2,We,10,0,"div",36)(3,Oe,4,0,"button",37),r()),i&2){let e=p.ngIf,o=l(2);s(),d("ngIf",o.productService.hasSelectionVariant(e)),s(),y(o.productService.hasSelectionVariant(e)?2:3)}}function je(i,p){i&1&&(a(0,"div",47)(1,"span"),c(2," showing only different stock, please press next to populate more data "),r()())}function Qe(i,p){if(i&1){let e=S();a(0,"th")(1,"input",48),T("ngModelChange",function(t){m(e);let n=l(2);return F(n.checkboxState,t)||(n.checkboxState=t),_(t)}),C("ngModelChange",function(){let t=m(e).ngIf,n=l(2);return _(n.onCheckboxStateChange(t))}),r()()}if(i&2){let e=l(2);s(),b("ngModel",e.checkboxState)}}function ze(i,p){i&1&&(a(0,"th",32),c(1," Reserved "),r())}function Ge(i,p){if(i&1){let e=S();a(0,"input",66),T("ngModelChange",function(t){m(e);let n=l(3).$implicit;return F(n.selected,t)||(n.selected=t),_(t)}),C("ngModelChange",function(){m(e);let t=l(3).$implicit,n=l(2);return _(n.onCheckboxStateProduct(t))}),r()}if(i&2){let e=l(3).$implicit;b("ngModel",e.selected)}}function He(i,p){if(i&1){let e=S();a(0,"img",67),C("click",function(t){m(e);let n=l(3).$implicit,u=l(2);return _(u.onZoomImage(t,n==null?null:n.ImageUrl))}),r()}if(i&2){let e=l(3).$implicit;q("src",e==null?null:e.ThumbnailUrl,V)}}function Ye(i,p){i&1&&x(0,"img",63)}function Ke(i,p){if(i&1&&(x(0,"br"),a(1,"div",68),x(2,"i",69),a(3,"small"),c(4),r()()),i&2){let e=l(3).$implicit;s(4),E("(",e==null?null:e.Category,")")}}function Ze(i,p){if(i&1&&(a(0,"td",59)(1,"div",14),h(2,Ge,1,1,"input",60),a(3,"div",61),h(4,He,1,1,"img",62)(5,Ye,1,0,"img",63),r()()(),a(6,"td",64)(7,"span",65),c(8),r(),h(9,Ke,5,1),r()),i&2){let e=l(2).$implicit,o=l(2);d("rowSpan",e==null?null:e.Variants.length),s(2),y(e.Variants.length>1?2:-1),s(),d("ngClass",k(7,Ae,e.Variants.length<=1)),s(),y(e!=null&&e.ThumbnailUrl?4:5),s(2),d("rowSpan",e==null?null:e.Variants.length),s(2),D(e==null?null:e.Name),s(),y(e.CategoryID!==null&&e.CategoryID!=o.guidEmpty?9:-1)}}function qe(i,p){if(i&1){let e=S();a(0,"input",48),T("ngModelChange",function(t){m(e);let n=l(2).$implicit;return F(n.selected,t)||(n.selected=t),_(t)}),r()}if(i&2){let e=l(2).$implicit;b("ngModel",e.selected)}}function Xe(i,p){if(i&1&&h(0,qe,1,1,"input",53),i&2){let e=l().$implicit;y((e==null?null:e.Inventory)<=1e5?0:-1)}}function Je(i,p){if(i&1){let e=S();a(0,"input",48),T("ngModelChange",function(t){m(e);let n=l().$implicit;return F(n.selected,t)||(n.selected=t),_(t)}),r()}if(i&2){let e=l().$implicit;b("ngModel",e.selected)}}function et(i,p){i&1&&(a(0,"div",70),c(1," Not Found "),r())}function tt(i,p){if(i&1&&(a(0,"div")(1,"span",71),c(2),g(3,"number"),r(),c(4," => "),a(5,"span",72),c(6),g(7,"number"),r()()),i&2){let e=l().$implicit;s(2),E(" ",v(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),D(v(7,4,e==null?null:e.Inventory))}}function nt(i,p){if(i&1&&(c(0),g(1,"number")),i&2){let e=l().$implicit;E(" ",v(1,1,e==null?null:e.Inventory)," ")}}function it(i,p){if(i&1&&(M(0),a(1,"div",73)(2,"a",74),x(3,"i",75),r()(),P()),i&2){let e=l().$implicit,o=l(3);s(2),d("href",o.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),V)}}function ot(i,p){if(i&1){let e=S();a(0,"span",80),C("click",function(){let t=m(e).ngIf,n=l(2).$implicit,u=l().$implicit,I=l(2);return _(I.openTableDialog(u,n,t))}),c(1),g(2,"number"),r()}if(i&2){let e=l(2).$implicit;s(),E(" ",v(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function at(i,p){if(i&1){let e=S();a(0,"td",76)(1,"div",54)(2,"div"),h(3,ot,3,3,"span",77),g(4,"async"),r(),a(5,"div",73)(6,"a",74),x(7,"i",75),r()(),a(8,"div",73)(9,"span",78),C("click",function(){m(e);let t=l().$implicit,n=l(3);return _(n.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),x(10,"i",79),r()()()()}if(i&2){let e=l().$implicit,o=l(3);d("ngClass",k(5,Be,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),d("ngIf",v(4,3,o.products$)),s(3),d("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,V)}}function lt(i,p){if(i&1&&(M(0),a(1,"span",81),c(2),g(3,"number"),r(),P()),i&2){let e=l(2).$implicit;s(2),E(" (",v(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function rt(i,p){i&1&&c(0," - ")}function st(i,p){if(i&1&&(M(0),a(1,"td",50),h(2,lt,4,3,"ng-container",58)(3,rt,1,0,"ng-template",null,1,z),r(),P()),i&2){let e=Q(4),o=l().$implicit;s(2),d("ngIf",o==null||o.Channel[0]==null?null:o.Channel[0].InventoryReserved)("ngIfElse",e)}}function ct(i,p){i&1&&(M(0),c(1," - "),P())}function pt(i,p){if(i&1&&(a(0,"span",82),g(1,"date"),c(2),g(3,"date"),r()),i&2){let e=l().$implicit;d("matTooltip",R(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),E(" ",R(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function mt(i,p){if(i&1&&(a(0,"tr"),h(1,Ze,10,9),a(2,"td",49),c(3),r(),a(4,"td",50)(5,"span",51),c(6),r()(),a(7,"td",52),h(8,Xe,1,1)(9,Je,1,1,"input",53),r(),a(10,"td")(11,"div",54),h(12,et,2,0,"div",55)(13,tt,8,6,"div")(14,nt,2,3)(15,it,4,1,"ng-container",5),r()(),h(16,at,11,7,"td",56)(17,st,5,2,"ng-container",5),a(18,"td",57),h(19,ct,2,0,"ng-container",58)(20,pt,4,8,"ng-template",null,0,z),r()()),i&2){let e=p.$implicit,o=p.$index,t=Q(21),n=l(3);s(),y(o==0?1:-1),s(2),D(e==null?null:e.Model),s(2),d("matTooltip",e.Discontinued?n.discontinuedVariantMsg:"")("ngClass",k(14,Le,e.Discontinued)),s(),D(e==null?null:e.Code),s(2),y((e==null?null:e.Channel[0].TypeID)==1?8:(e==null?null:e.Inventory)>=0?9:-1),s(4),d("ngIf",(e==null?null:e.I)==null),s(),y((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?13:-1),s(),y((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?14:-1),s(),d("ngIf",(e==null?null:e.I)!=null),s(),d("ngIf",e==null?null:e.Channel),s(),d("ngIf",n.isShowReservedColumn),s(2),d("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==n.minDate)("ngIfElse",t)}}function _t(i,p){if(i&1&&(a(0,"tbody"),U(1,mt,22,16,"tr",null,O),r()),i&2){let e=p.$implicit;s(),j(e.Variants)}}function dt(i,p){if(i&1){let e=S();a(0,"mainpanel",3),C("onSubmit",function(t){m(e);let n=l();return _(n.onSearch(t))}),a(1,"actions")(2,"div",4),h(3,Ue,4,2,"div",5),g(4,"async"),r()(),a(5,"filters")(6,"div")(7,"label",6),c(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",7),C("onChannelChange",function(t){m(e);let n=l();return _(n.onChannelChange(t))}),r()(),a(10,"div",8)(11,"label",9),c(12,"PageNumber"),r(),a(13,"input",10),T("ngModelChange",function(t){m(e);let n=l();return F(n.searchFilter.PageNumber,t)||(n.searchFilter.PageNumber=t),_(t)}),r()(),a(14,"div",8)(15,"label",11),c(16,"Page Size"),r(),a(17,"input",12),T("ngModelChange",function(t){m(e);let n=l();return F(n.searchFilter.RowCount,t)||(n.searchFilter.RowCount=t),_(t)}),r()(),a(18,"div",8)(19,"label",13),c(20,"Quantity From - To"),r(),a(21,"div",14)(22,"input",15),T("ngModelChange",function(t){m(e);let n=l();return F(n.searchFilter.QuantityFrom,t)||(n.searchFilter.QuantityFrom=t),_(t)}),r(),c(23," - "),a(24,"input",16),T("ngModelChange",function(t){m(e);let n=l();return F(n.searchFilter.QuantityTo,t)||(n.searchFilter.QuantityTo=t),_(t)}),r()()()(),a(25,"content")(26,"div",17)(27,"div",18)(28,"div",19),h(29,je,3,0,"div",20),a(30,"table",21),C("matSortChange",function(t){m(e);let n=l();return _(n.onSortVariant(t))}),a(31,"thead",22)(32,"tr")(33,"th",23),c(34," Product "),x(35,"br"),a(36,"mat-slide-toggle",24),C("toggleChange",function(){m(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,_(t.onShowDifferenceStock())}),a(37,"small",13),c(38,"FILTER DIFFERENT INVENTORY"),r()()(),a(39,"th",25),c(40,"Variant"),r(),a(41,"th",26),c(42,"SKU"),r(),h(43,Qe,2,1,"th",5),g(44,"async"),a(45,"th",27),c(46," POS "),r(),a(47,"th",28)(48,"div",29),C("click",function(){m(e);let t=l();return _(t.openModalFilter())}),x(49,"img",30),a(50,"span",31),c(51),g(52,"stringLimit"),r()()(),h(53,ze,2,0,"th",32),a(54,"th",33),c(55,"Last Sync"),r()()(),U(56,_t,3,0,"tbody",null,O),g(58,"async"),r(),a(59,"infinite-paginator",34),g(60,"async"),C("onNextPage",function(){m(e);let t=l();return _(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){m(e);let t=l();return _(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){m(e);let t=l();return _(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(i&2){let e,o,t,n=l();d("headerTitle","Inventory Comparison")("pageData",n.pageData)("hideSearchBox",!1),s(3),d("ngIf",v(4,21,n.products$)),s(6),d("ngModel",(n.searchFilter==null?null:n.searchFilter.LocationID)||(n.searchFilter==null?null:n.searchFilter.ChannelID)),s(4),b("ngModel",n.searchFilter.PageNumber),s(4),b("ngModel",n.searchFilter.RowCount),s(5),b("ngModel",n.searchFilter.QuantityFrom),s(2),b("ngModel",n.searchFilter.QuantityTo),s(5),d("ngIf",(n.searchFilter==null?null:n.searchFilter.filterModel)==3),s(14),d("ngIf",v(44,23,n.products$)),s(5),d("matTooltip",((e=n.channelIdentity())==null||e.label==null?null:e.label.length)>13?(e=n.channelIdentity())==null?null:e.label:""),s(),d("src",(o=n.channelIdentity())==null?null:o.img,V),s(2),E(" ",R(52,25,(t=n.channelIdentity())==null?null:t.label,13)," "),s(2),y(n.isShowReservedColumn?53:-1),s(3),j(v(58,28,n.products$)),s(3),d("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",v(60,30,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage())}}var Zt=(()=>{class i{constructor(e,o,t,n,u,I,Re,Ne){this.http=e,this.toastr=o,this.dialog=t,this.productService=n,this.authService=u,this.biggerPictureService=I,this.inventoryService=Re,this.mainPanelService=Ne,this.infinitePagination=K(G),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=f.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=f.GuidEMpty,this.selectedChannel=W(null),this.channelIdentity=W({img:null,label:null}),this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe($(e=>{this.checkShowReservedColumn(e)}),A(e=>(e=this.calculateAvailableStock(e),e)),B(1)),this.products$=this.sourceObs$}calculateAvailableStock(e){return e.map(t=>(t.totalAvailable=t.Variants.reduce((n,u)=>(n+=u.I?.Available||0,n),0),t))}checkShowReservedColumn(e){let o=0,t;e.forEach(n=>{t=n.Variants.find(u=>f.IsNotEmpty(u?.Channel[0]?.InventoryReserved)),t&&(o+=1)}),this.isShowReservedColumn=o>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(B(1),$(e=>{this.searchFilter={RowCount:e.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:e.Filter.ChannelID,LocationID:e.Filter.LocationID},this.initReloadData(),this.showToastrMarketplaceInactive(!e.Filter.IsMarketplaceAppActive)}))}onChannelChange(e){let o=Object.assign({},e);this.selectedChannel.set(o),f.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let e=Object.assign({},this.selectedChannel());f.IsNotEmpty(e.parent)?(this.searchFilter.LocationID=e.id,this.searchFilter.ChannelID=e?.parent?.id,e.label=e?.parent?.label+" - "+e?.label,e.img=f.getChannelLogoByTypeId(e?.parent?.typeid)):(this.searchFilter.LocationID=null,e.img=f.getChannelLogoByTypeId(e?.typeid),this.searchFilter.ChannelID=e?.id,this.selectedChannel.set(e)),this.channelIdentity.update(()=>({img:e.img,label:e.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(e){e&&this.toastr.warning(`Automatic inventory sync disabled.
|
|
2
|
+
Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}onSearch(e){this.searchFilter.text=e,this.setChannelFilter(),this.initReloadData()}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let o=this.productService.selectedVariantProduct(e);if(o.length>0){let t=this.searchFilter.LocationID,n=o.map(I=>L({ID:I.ID,Code:I.Code,Inventory:I.Inventory},f.IsNotEmpty(t)&&{LocationID:t})),u={ListChannelID:[this.searchFilter.ChannelID],List:n};this.http.post("/api/Inventory/UpdateChannel",u).subscribe(I=>{this.initReloadData(),this.checkboxState=!1,this.handlingUpdateStock(I)})}}handlingUpdateStock(e){if(e[0]?.Response){let o=e[0]?.Response?.Fail_list,t=e[0]?.Response?.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",t,o)}else this.toastr.error(e[0]?.Exception,"Error")}refreshInventory(e,o,t,n){let u={ChannelItemID:e,ChannelVariationID:o,ChannelID:t,VariantID:n};this.http.post("/api/Inventory/RefreshInventoryChannel",u).subscribe(I=>{this.toastr.success("Successfully updated","Success"),this.initReloadData()})}onCheckboxStateProduct(e){e.Variants=e.Variants.map(o=>(o.Inventory>=0&&(o.selected=e.selected),o))}onCheckboxStateChange(e){e=e.map(o=>(o.Variants=o.Variants.map(t=>(t.selected=this.checkboxState,t)),o))}openTableDialog(e,o,t){this.dialog.open(Me,{data:{Name:e.Name,Variant:o,ChannelID:o?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:e.ChannelItemID}}).afterClosed().pipe(Y(u=>f.IsNotEmpty(u))).subscribe(u=>{this.updateItemAfterDialog(u)})}updateItemAfterDialog(e){let o=this.searchFilter.LocationID,t=L({ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku},f.IsNotEmpty(o)&&{LocationID:o});this.http.post("/api/Inventory/UpdateQuantityByItem",t).subscribe(n=>{this.searchFilter.PageNumber=1,this.initReloadData(),this.handlingUpdateStock([n])})}onScanInventory(e){let o=this.productService.selectedVariantProduct(e);this.inventoryService.refreshInventory(o).subscribe(()=>{this.initReloadData(),this.toastr.success("Inventory refreshed successfully","Success")})}openExportDialog(){this.dialog.open(Ve,{data:{title:"Export Inventory Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,QuantityFrom:this.searchFilter.QuantityFrom,QuantityTo:this.searchFilter.QuantityTo,exportApi:"Inventory/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=H.DIFFERENCE:this.searchFilter.filterModel=H.ALL,this.initReloadData()}onZoomImage(e,o){this.biggerPictureService.openBiggerPicture(e,o)}onSortVariant(e){if(e.direction==""){this.products$=this.sourceObs$;return}this.products$=this.products$.pipe(A(o=>o.map(t=>(t.Variants=t.Variants.sort((n,u)=>f.compare(n.I?.Available,u.I?.Available,e.direction==="asc")),t)).sort((t,n)=>f.compare(t.totalAvailable,n.totalAvailable,e.direction==="asc"))))}static{this.\u0275fac=function(o){return new(o||i)(w(_e),w(me),w(xe),w(be),w(ue),w(Fe),w(N),w(fe))}}static{this.\u0275cmp=Z({type:i,selectors:[["app-single-channel-comparison"]],features:[X([G,N])],decls:2,vars:3,consts:[["SYNCDATE",""],["EMPTY_RESERVED",""],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"onSubmit","headerTitle","pageData","hideSearchBox"],[1,"d-flex"],[4,"ngIf"],["for","channelOptions",1,"fw-bold","mb-2"],["id","channelOptions",3,"onChannelChange","ngModel"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],["matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],["scope","col","mat-sort-header","Available","arrowPosition","before",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-center",2,"width","145px"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["class","btn btn-outline-dark me-3","matTooltip","Fetch the latest stock directly from the channel",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary","shadow","rounded"],["matTooltip","Fetch the latest stock directly from the channel",1,"btn","btn-outline-dark","me-3",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-success","btn-sm","dropdown-toggle","border-start"],[1,"dropdown-menu","dropdown-menu-end","pointer"],["role","button",1,"dropdown-item","cursor-pointer","fs-5",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"align-middle"],["type","checkbox",3,"ngModel"],[1,"d-flex","align-items-center","justify-content-end"],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"text-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"width","0%",3,"rowSpan"],["type","checkbox",1,"me-3",3,"ngModel"],[3,"ngClass"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],["title","Stock Available"],["title","Inventory below minimum inventory"],[1,"ms-3"],["target","_blank",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"text-end",3,"ngClass"],["class","cursor",3,"click",4,"ngIf"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom","pt-1"],[1,"cursor",3,"click"],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"]],template:function(o,t){o&1&&(h(0,dt,61,32,"mainpanel",2),g(1,"async")),o&2&&d("ngIf",v(1,1,t.loader$))},dependencies:[oe,J,ee,te,ie,ne,ve,Se,he,pe,le,ce,ae,re,se,Pe,De,de,Ee,Te,ge,Ce,we,ye,Ie,ke],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]})}}return i})();export{Zt as SingleChannelComparisonComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as M}from"./chunk-QRJDRFNS.js";import{a as E}from"./chunk-XHAXYWZ7.js";import{a as De,b as Ee,c as Me,d as B}from"./chunk-UIM3W5B7.js";import{a as se}from"./chunk-BVIRHZTZ.js";import{a as Ve,b as Te}from"./chunk-3LQNSF7T.js";import{a as be,b as Fe}from"./chunk-YXFTLQ5M.js";import"./chunk-7TWBIV3T.js";import{a as ye}from"./chunk-EGTYAIU5.js";import"./chunk-LOJPRXKZ.js";import"./chunk-6ALHX2I4.js";import"./chunk-3RK6DDJD.js";import"./chunk-CH2MLZU7.js";import"./chunk-ZZVNB72Q.js";import{a as ve}from"./chunk-VGXQU74M.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import{a as Ce,b as ue,d as fe,e as xe}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{j as he}from"./chunk-XDUYDX35.js";import{b as _e,e as me}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{d as Se,l as Pe,m as Ie,n as we}from"./chunk-ITTRZMEX.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{b as ie,c as oe,h as ae,m as re,o as le,y as ce}from"./chunk-DPLEMBB4.js";import{c as pe,e as de,f as ge}from"./chunk-PXB4YEY3.js";import{d as X,g as Y,j as ee,m as D,n as te,q as ne}from"./chunk-GPEVUTDI.js";import{$c as Z,Dc as H,Eb as z,Ec as d,Fc as R,G as W,Gc as b,Ic as I,Jc as w,Kb as h,Kc as y,Oc as J,Qc as F,Wb as p,Z as A,Zc as v,_c as V,ad as Q,bc as S,cc as N,ea as $,ec as k,fc as L,gc as a,hc as c,ic as P,jc as G,kc as q,mc as f,ob as T,pa as j,qb as l,rc as C,sc as r,vc as K,wb as u,ya as _,za as m}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var U=i=>[i],Re=i=>({"text-decoration-line-through":i}),Be=i=>({"bg-gradient-warning":i}),Ue=i=>({"ms-10":i});function Oe(i,s){if(i&1&&(a(0,"span",10),P(1,"img",11),c(),d(2)),i&2){let e=s.item;l(),p("src",e==null?null:e.Img,T),l(),b(" ",e.Name," ")}}function We(i,s){if(i&1){let e=f();a(0,"button",16),C("click",function(){_(e);let t=r().ngIf,o=r(2);return m(o.updateStock(t))}),P(1,"i",17),d(2," Update "),c()}}function Ae(i,s){if(i&1){let e=f();a(0,"actions")(1,"div",12),h(2,We,3,0,"button",13),a(3,"button",14),C("click",function(){_(e);let t=r(2);return m(t.openExportDialog())}),P(4,"i",15),a(5,"span"),d(6,"Export"),c()()()()}if(i&2){let e=s.ngIf,n=r(2);l(2),p("ngIf",n.productService.hasSelectionVariant(e))}}function $e(i,s){if(i&1){let e=f();a(0,"th")(1,"input",32),C("change",function(t){_(e);let o=r().ngIf,g=r(2);return m(g.onSelectAllSKU(t.target.checked,o))}),c()()}}function je(i,s){if(i&1){let e=f();a(0,"input",51),y("ngModelChange",function(t){_(e);let o=r(4).$implicit;return w(o.selected,t)||(o.selected=t),m(t)}),C("ngModelChange",function(){_(e);let t=r(4).$implicit,o=r(3);return m(o.onCheckboxStateProduct(t))}),c()}if(i&2){let e=r(4).$implicit;I("ngModel",e.selected)}}function ze(i,s){if(i&1&&h(0,je,1,1,"ng-template",26),i&2){let e=r(6);p("ngxPermissionsOnly",F(1,U,e.rolePriceEdit))}}function Ge(i,s){if(i&1){let e=f();G(0),a(1,"img",52),C("click",function(t){_(e);let o=r(3).$implicit,g=r(3);return m(g.onZoomImage(t,o==null?null:o.ImageUrl))}),c(),q()}if(i&2){let e=r(3).$implicit;l(),K("src",e.ThumbnailUrl,T)}}function qe(i,s){i&1&&P(0,"img",53)}function Ke(i,s){if(i&1&&(a(0,"small",50),d(1),c()),i&2){let e=r(3).$implicit;l(),b("(",e.Category,")")}}function He(i,s){if(i&1&&(a(0,"td",44)(1,"div",45),h(2,ze,1,3,null,26),a(3,"div",46),h(4,Ge,2,1,"ng-container",47)(5,qe,1,0,"ng-template",null,0,Q),c()()(),a(7,"td",48)(8,"span",49),d(9),c(),h(10,Ke,2,1,"small",50),c()),i&2){let e=H(6),n=r(2).$implicit;p("rowSpan",n.Variants.length),l(2),S((n.Variants==null?null:n.Variants.length)>1?2:-1),l(),p("ngClass",F(8,Ue,(n.Variants==null?null:n.Variants.length)<=1)),l(),p("ngIf",n.ThumbnailUrl)("ngIfElse",e),l(3),p("rowSpan",n.Variants.length),l(2),R(n.Name),l(),S(n.Category?10:-1)}}function Je(i,s){if(i&1){let e=f();a(0,"input",56),y("ngModelChange",function(t){_(e);let o=r(2).$implicit;return w(o.selected,t)||(o.selected=t),m(t)}),c()}if(i&2){let e=r(2).$implicit;I("ngModel",e.selected)}}function Ze(i,s){if(i&1&&(a(0,"td",54),h(1,Je,1,1,"input",55),c()),i&2){let e=r().$implicit;l(),S(e.UnitPrice>=0?1:-1)}}function Qe(i,s){i&1&&(a(0,"div",36),d(1," Not Found "),c())}function Xe(i,s){if(i&1&&(a(0,"div"),d(1),v(2,"number"),c()),i&2){let e=r().$implicit;l(),b(" ",V(2,1,e.UnitPrice)," ")}}function Ye(i,s){if(i&1&&(a(0,"div",37)(1,"a",40),P(2,"i",57),c()()),i&2){let e=r().$implicit,n=r(4);l(),p("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),T)}}function et(i,s){if(i&1){let e=f();a(0,"div",58),C("click",function(){_(e);let t=r().$implicit,o=r().$implicit,g=r(2).ngIf,x=r();return m(x.openTableDialog(t,o,g))}),d(1),v(2,"number"),c()}if(i&2){let e=r().$implicit;l(),b(" ",V(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function tt(i,s){if(i&1){let e=f();a(0,"tr",33),h(1,He,11,10),a(2,"td",24),d(3),c(),a(4,"td",27)(5,"span",34),d(6),c()(),h(7,Ze,2,1,"ng-template",26),a(8,"td",27)(9,"div",35),h(10,Qe,2,0,"div",36)(11,Xe,3,3,"div")(12,Ye,3,1,"div",37),c()(),a(13,"td",38)(14,"div",35),h(15,et,3,3,"div",39),a(16,"div",37)(17,"a",40),P(18,"i",41),c()(),a(19,"div",37)(20,"div",42),C("click",function(){let t=_(e).$implicit,o=r(4);return m(o.refreshPrice(t))}),P(21,"i",43),c()()()()()}if(i&2){let e=s.$implicit,n=s.$index,t=r(4);l(),S(n==0?1:-1),l(2),R(e.Model),l(2),p("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",F(12,Re,e.Discontinued)),l(),b(" ",e.Code," "),l(),p("ngxPermissionsOnly",F(14,U,t.rolePriceEdit)),l(3),S((e.Channel[0]==null?null:e.Channel[0].Description)!=null?10:-1),l(),S((e.Channel[0]==null?null:e.Channel[0].Description)==null?11:-1),l(),S((e.Channel[0]==null?null:e.Channel[0].Description)==null?12:-1),l(),p("ngClass",F(16,Be,e.UnitPrice!=(e.Channel[0]==null?null:e.Channel[0].Price))),l(2),S(e.Channel.length>0?15:-1),l(2),p("href",e.Channel[0]==null?null:e.Channel[0].Url,T)}}function nt(i,s){if(i&1&&k(0,tt,22,18,"tr",33,N),i&2){let e=s.$implicit;L(e.Variants)}}function it(i,s){if(i&1){let e=f();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),y("ngModelChange",function(t){_(e);let o=r(2);return w(o.toggleDifferentInventory,t)||(o.toggleDifferentInventory=t),m(t)}),C("toggleChange",function(){_(e);let t=r(2);return m(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,$e,2,0,"ng-template",26),a(17,"th",27),d(18,"POS"),c(),a(19,"th",27)(20,"div",28),C("click",function(){_(e);let t=r(2);return m(t.openModalFilter())}),P(21,"img",29),a(22,"span",30),d(23),v(24,"stringLimit"),c()()()()(),a(25,"tbody"),k(26,nt,2,0,null,null,N),c()(),a(28,"infinite-paginator",31),v(29,"async"),C("onNextPage",function(){_(e);let t=r(2);return m(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=r(2);return m(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=r(2);return m(t.infinitePagination.getRowCount(t.searchFilter))}),c()()()()}if(i&2){let e=s.ngIf,n=r(2);l(9),I("ngModel",n.toggleDifferentInventory),l(7),p("ngxPermissionsOnly",F(16,U,n.rolePriceEdit)),l(4),p("matTooltip",(n.selectedChannel==null||n.selectedChannel.Name==null?null:n.selectedChannel.Name.length)>=20?n.selectedChannel==null?null:n.selectedChannel.Name:""),l(),p("src",n.selectedChannel==null?null:n.selectedChannel.Img,T),l(2),b(" ",Z(24,11,n.selectedChannel==null?null:n.selectedChannel.Name,20)," "),l(3),L(e),l(2),p("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",V(29,14,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage())}}function ot(i,s){if(i&1){let e=f();a(0,"mainpanel",2),y("textChange",function(t){_(e);let o=r();return w(o.searchFilter.text,t)||(o.searchFilter.text=t),m(t)}),C("onSubmit",function(){_(e);let t=r();return m(t.onSearch())}),a(1,"filters")(2,"div")(3,"label",3),d(4,"Channel"),c(),a(5,"ng-select",4),y("ngModelChange",function(t){_(e);let o=r();return w(o.searchFilter.ChannelID,t)||(o.searchFilter.ChannelID=t),m(t)}),h(6,Oe,3,2,"ng-template",5),c()(),a(7,"div",6)(8,"label",7),d(9,"Page Number"),c(),a(10,"input",8),y("ngModelChange",function(t){_(e);let o=r();return w(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),m(t)}),c()(),a(11,"div",6)(12,"label",7),d(13,"Page Size"),c(),a(14,"input",8),y("ngModelChange",function(t){_(e);let o=r();return w(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),m(t)}),c()()(),h(15,Ae,7,1,"actions",9),v(16,"async"),h(17,it,30,18,"content",9),v(18,"async"),c()}if(i&2){let e=r();p("headerTitle",e.pageTitle),I("text",e.searchFilter.text),l(5),p("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(),p("ngIf",V(16,9,e.data$)),l(2),p("ngIf",V(18,11,e.data$))}}var At=(()=>{class i{constructor(e,n,t,o,g,x,O,Ne,ke,Le){this.http=e,this.toastr=n,this.dialog=t,this.productService=o,this.biggerPictureService=g,this.inventoryService=x,this.authService=O,this.mainPanelService=Ne,this.exportService=ke,this.decimalPipe=Le,this.infinitePagination=j(B),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=se.price,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(x=>pe.IsNotEmpty(x))).subscribe(x=>{this.updateItemAfterDialog(x,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),x=t.Price?this.decimalPipe.transform(t.Price):t.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${g.Name} to ${x}`,"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(Se),u(ye),u(ve),u(M),u(he),u(Pe),u(Ve),u(D))}}static{this.\u0275cmp=z({type:i,selectors:[["app-price-single-channel"]],features:[J([B,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"],[1,"d-flex","align-items-center","justify-content-start"],[3,"ngClass"],[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","20px",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","20px"],[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,ot,19,13,"mainpanel",1),v(1,"async")),n&2&&p("ngIf",V(1,1,t.loader$))},dependencies:[te,X,Y,ee,D,we,Ie,xe,fe,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{At as PriceSingleChannelComponent};
|