marketplacepos 3.5.1 → 3.6.1
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 +5 -5
- package/Marketplace/{chunk-5ZN2BVWB.js → chunk-2RLPLX7Y.js} +1 -1
- package/Marketplace/{chunk-ZP6L6END.js → chunk-3BUKJ3GE.js} +1 -1
- package/Marketplace/chunk-3HICANYR.js +1 -0
- package/Marketplace/chunk-3IPEE6XU.js +1 -0
- package/Marketplace/{chunk-RWRP376T.js → chunk-3TYJJ4PH.js} +7 -7
- package/Marketplace/chunk-4CWATSUN.js +1 -0
- package/Marketplace/{chunk-BZKS3OOQ.js → chunk-57VLIKXW.js} +1 -1
- package/Marketplace/chunk-5UQ6DL4O.js +2 -0
- package/Marketplace/chunk-5YXFGJWF.js +1 -0
- package/Marketplace/chunk-62X5EPZO.js +1 -0
- package/Marketplace/{chunk-QKOBK5RO.js → chunk-65GLFXG6.js} +1 -1
- package/Marketplace/chunk-6HV56KCT.js +1 -0
- package/Marketplace/chunk-7ECA4R7M.js +2 -0
- package/Marketplace/{chunk-GSRXSBIM.js → chunk-BM333QLQ.js} +1 -1
- package/Marketplace/{chunk-HI7WYFPY.js → chunk-CB4N4KBQ.js} +1 -1
- package/Marketplace/{chunk-PFX4CZVM.js → chunk-CN572N3D.js} +1 -1
- package/Marketplace/{chunk-DLMJHJC2.js → chunk-DIKDR4YZ.js} +1 -1
- package/Marketplace/{chunk-LWKBNKVO.js → chunk-DIZIHPEZ.js} +1 -1
- package/Marketplace/chunk-DM4BNQ56.js +1 -0
- package/Marketplace/chunk-DOLAZVBK.js +2 -0
- package/Marketplace/{chunk-L5URITG7.js → chunk-E2YL3IRQ.js} +1 -1
- package/Marketplace/chunk-EBCG45QS.js +1 -0
- package/Marketplace/chunk-EM7B4QFY.js +1 -0
- package/Marketplace/chunk-ESASEBJL.js +2 -0
- package/Marketplace/{chunk-H6D6Q2L2.js → chunk-F6CH4W4K.js} +1 -1
- package/Marketplace/chunk-FBFTM65H.js +5 -0
- package/Marketplace/chunk-FTADFHBJ.js +1 -0
- package/Marketplace/{chunk-OYMJWISR.js → chunk-ID64YY33.js} +1 -1
- package/Marketplace/{chunk-KRXW5FTG.js → chunk-IFNRKVC7.js} +1 -1
- package/Marketplace/chunk-IQE4BJBW.js +1 -0
- package/Marketplace/{chunk-475WOA53.js → chunk-IWJP53WS.js} +1 -1
- package/Marketplace/chunk-IZUH3SMQ.js +1 -0
- package/Marketplace/chunk-JHMIIA36.js +1 -0
- package/Marketplace/{chunk-IHM35ILL.js → chunk-JVBBWG5A.js} +2 -2
- package/Marketplace/chunk-JWHHOF7N.js +1 -0
- package/Marketplace/{chunk-URBKK5K6.js → chunk-K3FE6RKY.js} +1 -1
- package/Marketplace/chunk-KH5TJAAO.js +1 -0
- package/Marketplace/{chunk-XEVR4BVC.js → chunk-MH5CTSJJ.js} +2 -2
- package/Marketplace/chunk-MQ5HS343.js +1 -0
- package/Marketplace/{chunk-OULCNSCZ.js → chunk-NR7MA7GM.js} +1 -1
- package/Marketplace/chunk-OJCFIUAX.js +1 -0
- package/Marketplace/chunk-OPU2YPBG.js +1 -0
- package/Marketplace/{chunk-NB75ACST.js → chunk-PB2YK3UZ.js} +1 -1
- package/Marketplace/{chunk-LDVARU5U.js → chunk-PBKWYSXQ.js} +1 -1
- package/Marketplace/{chunk-5ANLTFUN.js → chunk-PSCYH4CH.js} +1 -1
- package/Marketplace/chunk-PX3OVSRI.js +1 -0
- package/Marketplace/chunk-Q3NI4SVW.js +3 -0
- package/Marketplace/{chunk-AG7HK2U3.js → chunk-RNJKRELB.js} +1 -1
- package/Marketplace/chunk-S3Y5M733.js +1 -0
- package/Marketplace/chunk-SLBDXT7U.js +1 -0
- package/Marketplace/{chunk-RPMRAFUY.js → chunk-SS2IUYMS.js} +11 -11
- package/Marketplace/{chunk-TP2HONHJ.js → chunk-TVWXXVHW.js} +1 -1
- package/Marketplace/{chunk-APUQGD5I.js → chunk-TWJIQ2V4.js} +1 -1
- package/Marketplace/chunk-TZXECYID.js +1 -0
- package/Marketplace/{chunk-Q5ZWBTZ2.js → chunk-UI3GOMJ2.js} +1 -1
- package/Marketplace/chunk-UX7T6RMC.js +1 -0
- package/Marketplace/chunk-V3FRKQJE.js +1 -0
- package/Marketplace/chunk-VQDYKADM.js +1 -0
- package/Marketplace/{chunk-GYBKA75Z.js → chunk-VZVPXWTV.js} +1 -1
- package/Marketplace/chunk-WQRVB6GT.js +1 -0
- package/Marketplace/chunk-X5D5XIEG.js +1 -0
- package/Marketplace/chunk-XC47PR7D.js +5 -0
- package/Marketplace/chunk-YXUQSGJI.js +1 -0
- package/Marketplace/chunk-ZBHZ3ASR.js +1 -0
- package/Marketplace/chunk-ZJLKBG2A.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/main-I4YQBPAL.js +1 -0
- package/Marketplace/{styles-ISUUHHCL.css → styles-WYF4ASPA.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-4KXF5ZA2.js +0 -1
- package/Marketplace/chunk-4PT4476L.js +0 -1
- package/Marketplace/chunk-4TMYOD6O.js +0 -1
- package/Marketplace/chunk-5XDVKUH7.js +0 -2
- package/Marketplace/chunk-7K45EX2D.js +0 -1
- package/Marketplace/chunk-AFXFMUBY.js +0 -1
- package/Marketplace/chunk-BHYFVY4A.js +0 -1
- package/Marketplace/chunk-E6VM4GK2.js +0 -1
- package/Marketplace/chunk-EI6G5GIB.js +0 -1
- package/Marketplace/chunk-HUCFUCCO.js +0 -1
- package/Marketplace/chunk-IEBL2FLF.js +0 -1
- package/Marketplace/chunk-IM76S6ZZ.js +0 -1
- package/Marketplace/chunk-IMXSLLAA.js +0 -1
- package/Marketplace/chunk-IU6HPLQ3.js +0 -1
- package/Marketplace/chunk-J6UEWWQX.js +0 -2
- package/Marketplace/chunk-JF3MRSX7.js +0 -1
- package/Marketplace/chunk-KKKJRBXL.js +0 -2
- package/Marketplace/chunk-LBMDUJHZ.js +0 -1
- package/Marketplace/chunk-MGOWDXUM.js +0 -1
- package/Marketplace/chunk-MZEDRDUX.js +0 -1
- package/Marketplace/chunk-NLTXIY5M.js +0 -1
- package/Marketplace/chunk-NWCS6OKR.js +0 -1
- package/Marketplace/chunk-NXHVARCF.js +0 -1
- package/Marketplace/chunk-OVPZBBEC.js +0 -2
- package/Marketplace/chunk-RKNA2RX4.js +0 -5
- package/Marketplace/chunk-RWEMXJWP.js +0 -1
- package/Marketplace/chunk-TRRI6HFB.js +0 -3
- package/Marketplace/chunk-UCSWGVFE.js +0 -1
- package/Marketplace/chunk-UFNZF4K5.js +0 -1
- package/Marketplace/chunk-USCL6HQE.js +0 -1
- package/Marketplace/chunk-WB4KZY2I.js +0 -1
- package/Marketplace/chunk-XTLLDXB7.js +0 -1
- package/Marketplace/chunk-Y2IG7JAU.js +0 -1
- package/Marketplace/chunk-YIPITET7.js +0 -1
- package/Marketplace/chunk-YN7U2IRK.js +0 -5
- package/Marketplace/chunk-ZJHL6VDX.js +0 -1
- package/Marketplace/chunk-ZPR2KAKZ.js +0 -1
- package/Marketplace/main-WKNVNRPA.js +0 -1
- /package/Marketplace/{chunk-F7MYTDP3.js → chunk-FRY56U37.js} +0 -0
- /package/Marketplace/{chunk-OKO7WTOG.js → chunk-GLK7UGZJ.js} +0 -0
- /package/Marketplace/{chunk-KSBVZVMH.js → chunk-KIP3CH3J.js} +0 -0
- /package/Marketplace/{chunk-GV43X5PS.js → chunk-NFCTGNSM.js} +0 -0
- /package/Marketplace/{polyfills-STQSWRUI.js → polyfills-FX2Y3WMH.js} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as P,b as Ie,c as ie}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-RKNA2RX4.js";import{a as be,b as Me}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-ZP6L6END.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-USCL6HQE.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-F7MYTDP3.js";import{a as we,b as Te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-IM76S6ZZ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-NXHVARCF.js";import{a as ne}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-Q5ZWBTZ2.js";import{a as ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-APUQGD5I.js";import{a as te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-475WOA53.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-H6D6Q2L2.js";import{c as X}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-YIPITET7.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-MGOWDXUM.js";import{a as Se,b as ve}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-MZEDRDUX.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-IEBL2FLF.js";import{b as k,e as Q}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-ZPR2KAKZ.js";import{a as ye}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-5ANLTFUN.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-ZJHL6VDX.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-E6VM4GK2.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-DLMJHJC2.js";import{d as Ce}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-5XDVKUH7.js";import{a as le}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-GYBKA75Z.js";import{t as Z,u as fe,v as q,w as xe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-J6UEWWQX.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-NWCS6OKR.js";import{b as ue,c as K,h as J,k as Y,m as W,u as ge}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-BHYFVY4A.js";import{c as w}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-GV43X5PS.js";import{$ as O,$a as T,B as V,Bb as f,Cb as x,Db as re,Ea as s,Fa as y,Gc as he,Kb as $,Kc as G,Na as c,Ta as C,W as N,Wb as me,Ya as r,Yb as de,Za as l,Zb as U,_ as se,_a as S,ab as M,ac as j,ba as ce,bc as _e,cb as v,da as F,dc as H,ea as L,ec as z,gb as g,ia as _,ib as p,ja as h,lb as pe,nb as R,ob as m,pb as E,qb as b,vb as oe,ya as A}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-RWRP376T.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-OKO7WTOG.js";var De=(()=>{let o=class o{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=F({type:o,selectors:[["app-inventory"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,a){n&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),S(3,"nav-tab",2),l()()(),S(4,"router-outlet")),n&2&&(s(3),c("Tabs",a.inventoryTabs))},dependencies:[he,Se]});let i=o;return i})();function Ue(i,o){if(i&1){let e=v();r(0,"button",22),g("click",function(){_(e);let n=p(3);return h(n.openScanDialog())}),S(1,"i",23),m(2," Scan Channel "),l()}}function je(i,o){if(i&1){let e=v();r(0,"button",24),g("click",function(){_(e);let n=p().ngIf,a=p(2);return h(a.onUpdateItems(n))}),S(1,"i",25),m(2," Update "),l()}}function He(i,o){if(i&1&&(r(0,"actions")(1,"div",3)(2,"div"),C(3,Ue,3,0,"button",20)(4,je,3,0,"button",21),l()()()),i&2){let e=o.ngIf,t=p(2);s(3),c("ngIf",!t.productService.hasSelectionVariant(e)),s(1),c("ngIf",t.productService.hasSelectionVariant(e))}}function ze(i,o){if(i&1){let e=v();r(0,"app-table",26),g("onToggle",function(n){_(e);let a=p(2);return h(a.onShowDifferenceStock(n))})("onSubmit",function(n){let d=_(e).ngIf,u=p(2);return h(u.updateStockByVariant(n,d))}),l()}if(i&2){let e=o.ngIf,t=p(2);c("data",e)("channel",t.channelOptions)("showProductToggle",!0)("filter",t.searchFilter)}}function Qe(i,o){if(i&1){let e=v();r(0,"span",27),g("click",function(){_(e);let n=p(2);return h(n.getRowCount())}),r(1,"i",28),m(2,"?"),l()()}}function Ge(i,o){if(i&1&&(r(0,"span"),m(1),f(2,"number"),l()),i&2){let e=o.ngIf;s(1),E(x(2,1,e))}}function Ke(i,o){if(i&1){let e=v();r(0,"a",29),g("click",function(){_(e);let n=p(2);return h(n.nextPage())}),S(1,"i",30),m(2," Next"),l()}}function Je(i,o){if(i&1){let e=v();r(0,"a",31),g("click",function(){_(e);let n=p(2);return h(n.getAllData())}),S(1,"i",32),m(2," Last"),l()}}function Ye(i,o){if(i&1){let e=v();r(0,"mainpanel",1),g("onSubmit",function(n){_(e);let a=p();return h(a.onSearch(n))}),C(1,He,5,2,"actions",2),f(2,"async"),r(3,"filters")(4,"div",3)(5,"div",4)(6,"div")(7,"label",5),m(8,"PageNumber"),l(),r(9,"input",6),g("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.PageNumber=n)}),l()(),r(10,"div")(11,"label",7),m(12,"Page Size"),l(),r(13,"input",8),g("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.RowCount=n)}),l()()()()(),r(14,"content")(15,"div",9)(16,"div",10)(17,"div",11),C(18,ze,1,4,"app-table",12),f(19,"async"),T(20),r(21,"div",13)(22,"div",14)(23,"div",15),m(24),f(25,"number"),f(26,"async"),C(27,Qe,3,0,"span",16)(28,Ge,3,3,"span",2),f(29,"async"),m(30),l()(),r(31,"div",17),C(32,Ke,3,0,"a",18)(33,Je,3,0,"a",19),l()(),M(),l()()()()()}if(i&2){let e=p(),t;c("pageData",e.pageData)("hideSearchBox",!1)("textButton","Search"),s(1),c("ngIf",x(2,13,e.paginationService.data$)),s(8),c("ngModel",e.searchFilter.PageNumber),s(4),c("ngModel",e.searchFilter.RowCount),s(5),c("ngIf",x(19,15,e.paginationService.data$)),s(6),b(" Showing 1 - ",x(25,17,(t=x(26,19,e.paginationService.data$))==null?null:t.length)," of "),s(3),c("ngIf",e.paginationService.hideCount),s(1),c("ngIf",x(29,21,!e.paginationService.hideCount&&e.allDataCount$)),s(2),b(" records ~ ",e.paginationService.footerPageNumber," Page "),s(2),c("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage),s(1),c("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage)}}var Ve=(()=>{let o=class o{constructor(t,n,a,d,u){this.http=t,this.toastr=n,this.dialog=a,this.paginationService=d,this.productService=u,this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]}}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(N(t=>{this.channelOptions=t.Options.Channel,t.Filter={PageNumber:t.Filter.PageNumber,filterModel:P.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onSearch(t){this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t,n){let a=this.productService.selectedVariantProduct(t);if(a.length>0){let u=a.map(I=>({ID:I.ID,Code:I.Code,Inventory:I.Inventory}));var d=n.filter(I=>I.selected).map(I=>I.ID);let D={ListChannelID:d,List:u};this.http.post("/api/Inventory/UpdateChannel",D).subscribe(I=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+D.List.length+" variants in "+D.ListChannelID.length+" channels","Success")})}}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(ee,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(V(a=>w.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.searchFilter.Async=a.Async,this.scanAll()})}scanAll(){this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,n,!this.searchFilter.UpdatedProduct),this.initPageLoader()}this.searchFilter.ChannelID=w.GuidEMpty})}updateStockByVariant(t,n){let a={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(d=>{let u=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+u.Name+" to "+a.NewQuantity,"Success")})}onShowDifferenceStock(t){t?this.searchFilter.filterModel=P.DIFFERENCE:this.searchFilter.filterModel=P.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(t){let n=this.productService.selectedVariantProduct(t);this.dialog.open(be,{data:{selectedItems:n,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"600px"}).afterClosed().pipe(V(a=>w.IsNotEmpty(a))).subscribe(a=>{this.updateStock(t,a)})}getRowCount(){this.paginationService.hideCount=!1;let t={text:this.searchFilter.text};this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,t)}nextPage(){this.paginationService.onNextPage(this.searchFilter)}getAllData(){this.http.post(`/API/${this.allDataCountEndpoint}`,{}).subscribe({next:t=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,t)}})}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(y(Q),y(k),y(X),y(ne),y(te))},o.\u0275cmp=F({type:o,selectors:[["app-multi-channel-comparison"]],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit"],[4,"ngIf"],[1,"d-flex"],["container",""],["for","PageNumber"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control",3,"ngModel","ngModelChange"],["for","RowCount"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(n,a){n&1&&(C(0,Ye,34,23,"mainpanel",0),f(1,"async")),n&2&&c("ngIf",x(1,1,a.loader$))},dependencies:[U,K,W,J,Y,q,ie,Z,j,H],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let i=o;return i})();var ae=(()=>{let o=class o{constructor(t){this.toastrService=t}showToastrUpdateInventory(t,n){let a=t.length>0,d=n.length>0;if(!d&&a&&this.toastrService.success(`${this.generateSuccessMessage(t.length)}`,"Success",{enableHtml:!0}),d&&a){let u=`<li>${this.generateSuccessMessage(t.length)}</li>`,D=this.generateErrorMessage(n),I=`<ol>${u} ${D}</ol>`;this.toastrService.warning(I,"Warning",{enableHtml:!0})}if(d&&!a){let u=`<ol>${this.generateErrorMessage(n)}</ol>`;this.toastrService.error(u,"Error",{enableHtml:!0})}}generateSuccessMessage(t){return`<span class="fw-bold">Successfully</span> updated ${t} variants in 1 channels`}generateErrorMessage(t=[]){let n="";return t.forEach((a,d)=>{n+=`<li><span class="fw-bold">Error</span> Updating stock for [${a.Name}] - <b>${a.Message}</b></li>`}),n}};o.\u0275fac=function(n){return new(n||o)(ce(k))},o.\u0275prov=se({token:o,factory:o.\u0275fac});let i=o;return i})();function Ze(i,o){if(i&1){let e=v();r(0,"button",36),g("click",function(){_(e);let n=p(2).ngIf,a=p();return h(a.openScanDialog(n))}),S(1,"i",37),m(2," Scan Channel "),l()}}function qe(i,o){if(i&1){let e=v();r(0,"button",38),g("click",function(){_(e);let n=p().ngIf,a=p(2);return h(a.updateStock(n))}),S(1,"i",39),m(2," Update"),l()}}function Xe(i,o){if(i&1&&(r(0,"div"),C(1,Ze,3,0,"button",34)(2,qe,3,0,"button",35),l()),i&2){let e=o.ngIf,t=p(2);s(1),c("ngIf",!t.productService.hasSelectionVariant(e)),s(1),c("ngIf",t.productService.hasSelectionVariant(e))}}function et(i,o){i&1&&(r(0,"div",40)(1,"span"),m(2," showing only different stock, please press next to populate more data "),l()())}function tt(i,o){if(i&1){let e=v();r(0,"th")(1,"input",41),g("ngModelChange",function(n){_(e);let a=p(2);return h(a.checkboxState=n)})("ngModelChange",function(){let a=_(e).ngIf,d=p(2);return h(d.onCheckboxStateChange(a))}),l()()}if(i&2){let e=p(2);s(1),c("ngModel",e.checkboxState)}}function nt(i,o){i&1&&(T(0),r(1,"th",42),m(2," Reserved "),l(),M())}function it(i,o){if(i&1){let e=v();r(0,"input",67),g("ngModelChange",function(n){_(e);let a=p(3).$implicit;return h(a.selected=n)})("ngModelChange",function(){_(e);let n=p(3).$implicit,a=p(2);return h(a.onCheckboxStateProduct(n))}),l()}if(i&2){let e=p(3).$implicit;c("ngModel",e.selected)}}function at(i,o){if(i&1){let e=v();r(0,"img",68),g("click",function(n){_(e);let a=p(3).$implicit,d=p(2);return h(d.onZoomImage(n,a==null?null:a.ImageUrl))}),l()}if(i&2){let e=p(3).$implicit;pe("src",e==null?null:e.ThumbnailUrl,A)}}function ot(i,o){i&1&&S(0,"img",69)}function rt(i,o){if(i&1&&(T(0),r(1,"td",58)(2,"div",59),C(3,it,1,1,"input",60)(4,at,1,1,"img",61)(5,ot,1,0,"ng-template",null,62,$),l()(),r(7,"td",63)(8,"span",64),m(9),l(),S(10,"br"),r(11,"div",65),S(12,"i",66),r(13,"small"),m(14),l()()(),M()),i&2){let e=R(6),t=p().$implicit,n=p().$implicit;s(1),c("rowSpan",n==null?null:n.Variants.length),s(2),c("ngIf",(t==null?null:t.Inventory)>=0||n.Variants.length>1),s(1),c("ngIf",n==null?null:n.ThumbnailUrl)("ngIfElse",e),s(3),c("rowSpan",n==null?null:n.Variants.length),s(2),E(n==null?null:n.Name),s(5),b("(",n==null?null:n.Category,")")}}function lt(i,o){if(i&1){let e=v();T(0),r(1,"input",41),g("ngModelChange",function(n){_(e);let a=p(3).$implicit;return h(a.selected=n)}),l(),M()}if(i&2){let e=p(3).$implicit;s(1),c("ngModel",e.selected)}}function st(i,o){if(i&1&&(T(0),C(1,lt,2,1,"ng-container",3),M()),i&2){let e=p(2).$implicit;s(1),c("ngIf",(e==null?null:e.Inventory)<=1e5)}}function ct(i,o){if(i&1){let e=v();r(0,"input",41),g("ngModelChange",function(n){_(e);let a=p(3).$implicit;return h(a.selected=n)}),l()}if(i&2){let e=p(3).$implicit;c("ngModel",e.selected)}}function pt(i,o){if(i&1&&C(0,ct,1,1,"input",71),i&2){let e=p(2).$implicit;c("ngIf",(e==null?null:e.Inventory)>=0)}}function mt(i,o){if(i&1&&(T(0),C(1,st,2,1,"ng-container",53)(2,pt,1,1,"ng-template",null,70,$),M()),i&2){let e=R(3),t=p().$implicit;s(1),c("ngIf",(t==null?null:t.Channel[0].TypeID)==1)("ngIfElse",e)}}function dt(i,o){if(i&1&&(r(0,"span")(1,"span",72),m(2),f(3,"number"),l(),m(4," => "),r(5,"span",73),m(6),f(7,"number"),l()()),i&2){let e=p().$implicit;s(2),b(" ",x(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),E(x(7,4,e==null?null:e.Inventory))}}function _t(i,o){if(i&1&&(r(0,"span"),m(1),f(2,"number"),l()),i&2){let e=p().$implicit;s(1),b(" ",x(2,1,e==null?null:e.Inventory)," ")}}var ht=i=>({"bg-gradient-warning":i});function ut(i,o){if(i&1){let e=v();r(0,"td",74)(1,"span",75),g("click",function(){_(e);let n=p().$implicit,a=p(),d=a.$implicit,u=a.ngForOf,D=p(2);return h(D.openTableDialog(d,n,u))}),m(2),f(3,"number"),l()()}if(i&2){let e=p().$implicit;c("ngClass",oe(4,ht,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(2),b(" ",x(3,2,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function gt(i,o){if(i&1&&(T(0),r(1,"span",77),m(2),f(3,"number"),l(),M()),i&2){let e=p(2).$implicit;s(2),b(" (",x(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function Ct(i,o){i&1&&m(0," - ")}function ft(i,o){if(i&1&&(T(0),r(1,"td",51),C(2,gt,4,3,"ng-container",53)(3,Ct,1,0,"ng-template",null,76,$),l(),M()),i&2){let e=R(4),t=p().$implicit;s(2),c("ngIf",t==null||t.Channel[0]==null?null:t.Channel[0].InventoryReserved)("ngIfElse",e)}}function xt(i,o){i&1&&(T(0),m(1," - "),M())}function St(i,o){if(i&1&&(r(0,"span",78),f(1,"date"),m(2),f(3,"date"),l()),i&2){let e=p().$implicit;c("matTooltip",re(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),b(" ",re(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}var vt=i=>({"text-decoration-line-through":i});function yt(i,o){if(i&1){let e=v();r(0,"tr"),C(1,rt,15,7,"ng-container",3),r(2,"td",43),m(3),l(),r(4,"td",44)(5,"div",45)(6,"span",46),m(7),l(),r(8,"span",47)(9,"a",48),S(10,"i",49),l()()()(),r(11,"td",50),C(12,mt,4,2,"ng-container",3),l(),r(13,"td",51),C(14,dt,8,6,"span",3)(15,_t,3,3,"span",3),l(),C(16,ut,4,6,"td",52)(17,ft,5,2,"ng-container",3),r(18,"td",26),C(19,xt,2,0,"ng-container",53)(20,St,4,8,"ng-template",null,54,$),l(),r(22,"td")(23,"div",12)(24,"div",55)(25,"a",48),S(26,"i",49),l(),m(27," \xA0\xA0 "),r(28,"span",56),g("click",function(){let a=_(e).$implicit,d=p(3);return h(d.refreshInventory(a==null||a.Channel[0]==null?null:a.Channel[0].ChannelItemID,a==null||a.Channel[0]==null?null:a.Channel[0].ChannelVariationID,a==null||a.Channel[0]==null?null:a.Channel[0].ChannelID,a==null?null:a.ID))}),S(29,"i",57),l()()()()()}if(i&2){let e=o.$implicit,t=o.index,n=R(21),a=p(3);s(1),c("ngIf",t==0),s(2),E(e==null?null:e.Model),s(1),c("matTooltip",e.Discontinued?a.discontinuedVariantMsg:""),s(2),c("ngClass",oe(14,vt,e.Discontinued)),s(1),E(e==null?null:e.Code),s(2),c("href","https://"+a.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),A),s(3),c("ngIf",!e.Discontinued),s(2),c("ngIf",(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)),s(1),c("ngIf",(e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)),s(1),c("ngIf",e==null?null:e.Channel),s(1),c("ngIf",a.isShowReservedColumn),s(2),c("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==a.minDate)("ngIfElse",n),s(6),c("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,A)}}function bt(i,o){if(i&1&&(r(0,"tbody"),C(1,yt,30,16,"tr",28),l()),i&2){let e=o.$implicit;s(1),c("ngForOf",e.Variants)}}function It(i,o){if(i&1){let e=v();r(0,"span",79),g("click",function(){_(e);let n=p(2);return h(n.getRowCount())}),r(1,"i",80),m(2,"?"),l()()}}function wt(i,o){if(i&1&&(r(0,"span"),m(1),f(2,"number"),l()),i&2){let e=o.ngIf;s(1),E(x(2,1,e==null?null:e.Total))}}function Tt(i,o){if(i&1){let e=v();r(0,"a",84),g("click",function(){_(e);let n=p(3);return h(n.onNextPage())}),S(1,"i",85),m(2," Next"),l()}}function Mt(i,o){if(i&1){let e=v();r(0,"a",86),g("click",function(){_(e);let n=p(3);return h(n.onLastPage())}),S(1,"i",87),m(2," Last"),l()}}function Dt(i,o){if(i&1&&(r(0,"div",81),C(1,Tt,3,0,"a",82)(2,Mt,3,0,"a",83),l()),i&2){let e=p(2);s(1),c("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage),s(1),c("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage)}}function Et(i,o){if(i&1){let e=v();r(0,"mainpanel",1),g("onSubmit",function(n){_(e);let a=p();return h(a.onSearch(n))}),r(1,"actions")(2,"div",2),C(3,Xe,3,2,"div",3),f(4,"async"),l()(),r(5,"filters")(6,"div",2)(7,"div",4)(8,"div")(9,"label",5),m(10,"PageNumber"),l(),r(11,"input",6),g("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.PageNumber=n)}),l()(),r(12,"div")(13,"label",7),m(14,"Page Size"),l(),r(15,"input",8),g("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.RowCount=n)}),l()(),r(16,"div")(17,"h6"),m(18,"Quantity From - To"),l(),r(19,"input",9),g("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.QuantityFrom=n)}),l(),m(20," - "),r(21,"input",10),g("ngModelChange",function(n){_(e);let a=p();return h(a.searchFilter.QuantityTo=n)}),l()()()()(),r(22,"content")(23,"div",11)(24,"div",12)(25,"div",13),C(26,et,3,0,"div",14),r(27,"table",15)(28,"thead",16)(29,"tr")(30,"th",17),m(31,"Product "),S(32,"br"),r(33,"mat-slide-toggle",18),g("toggleChange",function(){_(e);let n=p();return n.showDifferenceStock=!n.showDifferenceStock,h(n.onShowDifferenceStock())}),r(34,"small",19),m(35,"FILTER DIFFERENT INVENTORY"),l()()(),r(36,"th",20),m(37,"Variant"),l(),r(38,"th",21),m(39,"SKU"),l(),C(40,tt,2,1,"th",3),f(41,"async"),r(42,"th",22),m(43,"POS"),l(),r(44,"th",23)(45,"div",24),g("click",function(){_(e);let n=p();return h(n.onChangeChannel())}),S(46,"img",25),m(47),l()(),C(48,nt,3,0,"ng-container",3),r(49,"th",26),m(50,"Last Sync"),l(),S(51,"th",27),l()(),C(52,bt,2,1,"tbody",28),f(53,"async"),l(),r(54,"div",29)(55,"div",30)(56,"div",31),m(57),f(58,"number"),f(59,"async"),C(60,It,3,0,"span",32)(61,wt,3,3,"span",3),f(62,"async"),m(63),l()(),C(64,Dt,3,2,"div",33),f(65,"async"),l()()()()()()}if(i&2){let e=p(),t,n;c("headerTitle","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1),s(3),c("ngIf",x(4,20,e.paginationService.data$)),s(8),c("ngModel",e.searchFilter.PageNumber),s(4),c("ngModel",e.searchFilter.RowCount),s(4),c("ngModel",e.searchFilter.QuantityFrom),s(2),c("ngModel",e.searchFilter.QuantityTo),s(5),c("ngIf",(e.searchFilter==null?null:e.searchFilter.filterModel)==3),s(14),c("ngIf",x(41,22,e.paginationService.data$)),s(5),c("matTooltip","Change "+(e.selectedChannel==null?null:e.selectedChannel.Name)),s(1),c("src",e.selectedChannel.logo,A),s(1),b(" ",e.selectedChannel!=null&&e.selectedChannel.Name?e.selectedChannel==null?null:e.selectedChannel.Name:"Choose Channel ..."," "),s(1),c("ngIf",e.isShowReservedColumn),s(4),c("ngForOf",x(53,24,e.products$)),s(5),b(" Showing 1 - ",x(58,26,(t=x(59,28,e.paginationService.data$))==null?null:t.length)," of "),s(3),c("ngIf",e.paginationService.hideCount),s(1),c("ngIf",x(62,30,!e.paginationService.hideCount&&e.rowCount$)),s(2),b(" records ~ ",e.paginationService.footerPageNumber," Page "),s(1),c("ngIf",((n=x(65,32,e.paginationService.data$))==null?null:n.length)>0)}}var Pe=(()=>{let o=class o{constructor(t,n,a,d,u,D,I){this.http=t,this.toastr=n,this.dialog=a,this.paginationService=d,this.productService=u,this.biggerPictureService=D,this.inventoryService=I,this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="/api/InventoryLoader/Load",this.rowCountApi="/api/Inventory/GetInventoryByChannelRowCount",this.minDate=w.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.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]},this.hostName=u.getHostName()}ngOnInit(){this.initPageLoader(),this.products$=this.paginationService.data$.pipe(N(t=>{this.checkShowReservedColumn(t)}))}checkShowReservedColumn(t){let n=0,a;t.forEach(d=>{a=d.Variants.find(u=>w.IsNotEmpty(u?.Channel[0]?.InventoryReserved)),a&&(n+=1)}),this.isShowReservedColumn=n>0}initPageLoader(){this.paginationService.fetchDataEndpoint="Inventory/GetSingleChannelComparison",this.loader$=this.http.post(this.loaderApi,{}).pipe(N(t=>{if(this.channelOptions=t.Options.Channel,this.searchFilter={RowCount:t.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:t.Filter.ChannelID},this.initSelectedChannel(),this.paginationService.reloadPagination(this.searchFilter),!t.Filter.IsMarketplaceAppActive){let n=`Automatic inventory sync disabled.
|
|
2
|
-
Please enable Dealpos X Marketplace Apps integration in POS Configuration`;this.toastr.warning(n,"Warning")}}))}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(t=>t.ID==this.searchFilter.ChannelID),this.selectedChannel&&(this.selectedChannel.logo=w.getChannelLogoByTypeId(this.selectedChannel.TypeID))}onChangeChannel(){this.dialog.open(Me,{data:{channelOptions:this.channelOptions,selectedChannel:this.selectedChannel}}).afterClosed().pipe(V(t=>w.IsNotEmpty(t))).subscribe(t=>{this.selectedChannel=t,this.onFilterChannel(t.ID)})}onSearch(t){this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}onFilterChannel(t){this.searchFilter.ChannelID=t,this.searchFilter.PageNumber=1,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t){let n=this.productService.selectedVariantProduct(t);if(n.length>0){let a=n.map(u=>({ID:u.ID,Code:u.Code,Inventory:u.Inventory})),d={ListChannelID:[this.searchFilter.ChannelID],List:a};this.http.post("/api/Inventory/UpdateChannel",d).subscribe(u=>{this.searchFilter.PageNumber=1,this.paginationService.reloadPagination(this.searchFilter),this.checkboxState=!1,this.handlingUpdateStock(u)})}}handlingUpdateStock(t){if(t[0]?.StatusProduct){let n=t[0].StatusProduct.Fail_list,a=t[0].StatusProduct.Success_list;this.inventoryService.showToastrUpdateInventory(a,n)}else this.toastr.error(t[0]?.Exception,"Error")}openScanDialog(t){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=w.GuidEMpty,this.dialog.open(ee,{data:{filter:n,channelOptions:t.Options.Channel},width:"600px"}).afterClosed().pipe(V(d=>w.IsNotEmpty(d))).subscribe(d=>{this.searchFilter.ChannelID=d.ChannelID,this.searchFilter.ScanFull=d.ScanFull,this.searchFilter.UpdatedProduct=d.UpdatedProduct,this.searchFilter.Async=d.Async,this.scannALl(t)})}scannALl(t){let n=this.productService.findChannelById(this.searchFilter.ChannelID,t.Options.Channel);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(a=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.searchFilter.ScanFull=!1,this.initPageLoader(),this.toastr.success("Successfully scanned from "+n?.Name,"Success"))})}refreshInventory(t,n,a,d){let u={ChannelItemID:t,ChannelVariationID:n,ChannelID:a,VariantID:d};this.http.post("/api/Inventory/RefreshInventoryChannel",u).subscribe(D=>{this.toastr.success("Successfully updated","Success"),this.paginationService.reloadPagination(this.searchFilter)})}onCheckboxStateProduct(t){t.Variants=t.Variants.map(n=>(n.Inventory>=0&&(n.selected=t.selected),n))}onCheckboxStateChange(t){t=t.map(n=>(n.Variants=n.Variants.map(a=>(a.selected=this.checkboxState,a)),n))}openTableDialog(t,n,a){this.dialog.open(Ie,{data:{Name:t.Name,Variant:n,ChannelID:n?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:t.ChannelItemID}}).afterClosed().pipe(V(u=>w.IsNotEmpty(u))).subscribe(u=>{this.updateItemAfterDialog(u,a)})}updateItemAfterDialog(t,n){let a={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku},d=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(u=>{this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+d?.Name+" to "+a.NewQuantity,"Success")})}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=P.DIFFERENCE:this.searchFilter.filterModel=P.ALL,this.paginationService.reloadPagination(this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,PageNumber:1,text:this.searchFilter.text};this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`${this.rowCountApi}`,t)}onLastPage(){let t={ChannelID:this.searchFilter.ChannelID,PageNumber:1};this.http.post(`${this.rowCountApi}`,t).subscribe({next:n=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,n.Total)}})}onZoomImage(t,n){this.biggerPictureService.openBiggerPicture(t,n)}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(y(Q),y(k),y(X),y(ne),y(te),y(ye),y(ae))},o.\u0275cmp=F({type:o,selectors:[["app-single-channel-comparison"]],decls:2,vars:3,consts:[["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit"],[1,"d-flex"],[4,"ngIf"],["container",""],["for","PageNumber"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control",3,"ngModel","ngModelChange"],["for","RowCount"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control",3,"ngModel","ngModelChange"],["type","number","name","QuantityFrom",1,"w-25","me-2",3,"ngModel","ngModelChange"],["type","number","name","QuantityTo",1,"w-25","ms-2",3,"ngModel","ngModelChange"],[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"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],[1,"fw-bold"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],["scope","col",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","100px"],["matTooltipPosition","above",1,"d-inline-block","text-truncate","mt-3","cursor-pointer",2,"max-width","114px",3,"matTooltip","click"],[2,"width","16px",3,"src"],[1,"text-center"],[2,"width","4%"],[4,"ngFor","ngForOf"],[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"],["class","btn-group",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModel","ngModelChange"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-start"],["matTooltipPosition","above",1,"text-end",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"align-middle"],[1,"text-end"],["class","text-end",3,"ngClass",4,"ngIf"],[4,"ngIf","ngIfElse"],["SYNCDATE",""],[1,"col-12","ps-0","d-flex","justify-content-between"],["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"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],["type","checkbox","class","me-3",3,"ngModel","ngModelChange",4,"ngIf"],["class","border rounded w-img cursor-pointer","style","margin-left: 20px",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],["OTHER_CHANNEL",""],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["title","Allocated"],["title","Inventory below minimum inventory"],[1,"text-end",3,"ngClass"],[1,"cursor",3,"click"],["EMPTY_RESERVED",""],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(n,a){n&1&&(C(0,Et,66,34,"mainpanel",0),f(1,"async")),n&2&&c("ngIf",x(1,1,a.loader$))},dependencies:[me,de,U,K,W,ue,J,Y,we,q,Z,j,H,_e],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}"]});let i=o;return i})();var Vt=[{path:"",component:De,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",component:Ve,canActivate:[le],data:{title:"Inventory Comparison"}},{path:"bychannel",component:Pe,canActivate:[le],data:{title:"Inventory Comparison"}}]}],Fe=(()=>{let o=class o{};o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=L({type:o}),o.\u0275inj=O({imports:[z,G.forChild(Vt)]});let i=o;return i})();var vn=(()=>{let o=class o{};o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=L({type:o}),o.\u0275inj=O({providers:[ae],imports:[z,Fe,G,ve,ge,Ce,Te,xe,ie,fe]});let i=o;return i})();export{vn as InventoryModule};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Ve}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-KSBVZVMH.js";import{a as O,b as _e,c as he}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-RKNA2RX4.js";import{a as de,b as $e}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-ZP6L6END.js";import{b as ke}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-USCL6HQE.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-F7MYTDP3.js";import{a as Ne,b as Oe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-IM76S6ZZ.js";import{a as ae}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-NXHVARCF.js";import{a as me}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-Q5ZWBTZ2.js";import{a as se}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-APUQGD5I.js";import{a as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-475WOA53.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-H6D6Q2L2.js";import{c as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-YIPITET7.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-MGOWDXUM.js";import{a as Te,b as De}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-MZEDRDUX.js";import{b as re,c as be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-IEBL2FLF.js";import{b as B,e as j}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-ZPR2KAKZ.js";import{a as pe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-5ANLTFUN.js";import{a as Ee,b as Fe,c as Me}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-ZJHL6VDX.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-E6VM4GK2.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-DLMJHJC2.js";import{d as Ie}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-5XDVKUH7.js";import{a as le}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-GYBKA75Z.js";import{t as ce,u as ye,v as z,w as we}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-J6UEWWQX.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-NWCS6OKR.js";import{b as te,c as ne,h as k,k as N,m as ie,u as oe,v as ve}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-BHYFVY4A.js";import{c as w}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-GV43X5PS.js";import{$ as X,$a as E,B as D,Bb as P,Cb as v,Ea as l,Fa as b,Gc as Pe,Ia as xe,Kb as Z,Kc as ee,Na as s,Ta as u,W as q,Wb as $,Ya as r,Yb as A,Za as c,Zb as L,_a as x,ab as F,ac as W,cb as f,da as V,dc as U,ea as Y,ec as R,gb as g,ia as _,ib as p,ja as h,lb as Q,nb as H,ob as m,pb as T,qb as I,tb as Se,vb as y,ya as M}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-RWRP376T.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-OKO7WTOG.js";function qe(i,a){if(i&1){let n=f();r(0,"button",18),g("click",function(){_(n);let t=p(3);return h(t.openScanDialog())}),x(1,"i",19),m(2," Scan Channel "),c()}}function Xe(i,a){if(i&1){let n=f();r(0,"button",20),g("click",function(){_(n);let t=p().ngIf,o=p(2);return h(o.onUpdateItems(t))}),x(1,"i",21),m(2," Update "),c()}}function Ye(i,a){if(i&1&&(r(0,"div"),u(1,qe,3,0,"button",16)(2,Xe,3,0,"button",17),c()),i&2){let n=a.ngIf,e=p(2);l(1),s("ngIf",!e.productService.hasSelectionVariant(n)),l(1),s("ngIf",e.productService.hasSelectionVariant(n))}}function Qe(i,a){if(i&1){let n=f();r(0,"div",22)(1,"app-table",23),g("onToggle",function(t){_(n);let o=p(2);return h(o.onShowDifferencePrice(t))})("onSubmit",function(t){_(n);let o=p(2);return h(o.updatePriceByVariant(t))}),P(2,"async"),c()()}if(i&2){let n=p().ngIf,e=p();l(1),s("showProductToggle",!0)("data",v(2,4,e.paginationService.data$))("channel",n.Options.Channel)("filter",n.Filter)}}function We(i,a){if(i&1){let n=f();r(0,"span",24),g("click",function(){_(n);let t=p(2);return h(t.getRowCount())}),r(1,"i",25),m(2,"?"),c()()}}function et(i,a){if(i&1&&(r(0,"span"),m(1),P(2,"number"),c()),i&2){let n=a.ngIf;l(1),T(v(2,1,n))}}function tt(i,a){if(i&1){let n=f();r(0,"a",26),g("click",function(){_(n);let t=p(2);return h(t.onNextPage())}),x(1,"i",27),m(2," Next"),c()}}function nt(i,a){if(i&1){let n=f();r(0,"a",28),g("click",function(){_(n);let t=p(2);return h(t.onLastPage())}),x(1,"i",29),m(2," Last"),c()}}function it(i,a){if(i&1){let n=f();r(0,"mainpanel",1),g("onSubmit",function(t){_(n);let o=p();return h(o.onSearch(t))}),r(1,"actions")(2,"div",2),u(3,Ye,3,2,"div",3),P(4,"async"),c()(),r(5,"filters")(6,"div",4)(7,"div")(8,"label"),m(9,"Page Number"),c(),r(10,"input",5),g("ngModelChange",function(t){_(n);let o=p();return h(o.searchFilter.PageNumber=t)}),c()(),r(11,"div")(12,"label"),m(13,"Page Size"),c(),r(14,"input",5),g("ngModelChange",function(t){_(n);let o=p();return h(o.searchFilter.RowCount=t)}),c()()()(),r(15,"content")(16,"div",6)(17,"div",7),u(18,Qe,3,6,"div",8),P(19,"async"),c(),r(20,"div",9)(21,"div",10)(22,"div",11),m(23),P(24,"number"),P(25,"async"),u(26,We,3,0,"span",12)(27,et,3,3,"span",3),P(28,"async"),m(29),c()(),r(30,"div",13),u(31,tt,3,0,"a",14)(32,nt,3,0,"a",15),c()()()()()}if(i&2){let n=p(),e;s("pageData",n.pageData)("textButton","Search"),l(3),s("ngIf",v(4,12,n.paginationService.data$)),l(7),s("ngModel",n.searchFilter.PageNumber),l(4),s("ngModel",n.searchFilter.RowCount),l(4),s("ngIf",v(19,14,n.paginationService.data$)),l(5),I(" Showing 1 - ",v(24,16,(e=v(25,18,n.paginationService.data$))==null?null:e.length)," of "),l(3),s("ngIf",n.paginationService.hideCount),l(1),s("ngIf",!n.paginationService.hideCount&&v(28,20,n.allDataCount$)),l(2),I(" records ~ ",n.paginationService.footerPageNumber," Page "),l(2),s("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage),l(1),s("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage)}}var je=(()=>{let a=class a{constructor(e,t,o,d,C){this.http=e,this.toastr=t,this.dialog=o,this.paginationService=d,this.productService=C,this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.filterOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Price",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!0},{Title:"Price Realtime",Url:"/menu/price/realtime",Active:!1}]}}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.getDataAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(q(e=>{this.channelOptions=e.Options.Channel,e.Filter={PageNumber:e.Filter.PageNumber,RowCount:e.Filter.RowCount,filterModel:1},this.searchFilter=e.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onShowDifferencePrice(e){this.searchFilter.filterModel=1,e&&(this.searchFilter.filterModel=3),this.paginationService.reloadPagination(this.searchFilter)}onSearch(e){this.searchFilter.text=e,this.paginationService.reloadPagination(this.searchFilter)}openScanDialog(){this.searchFilter.ChannelID=w.GuidEMpty;let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(se,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(D(o=>w.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAll()})}scanAll(){this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.initPageLoader(),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)}})}updatePrice(e){let t=this.productService.selectedVariantProduct(e);if(t.length>0){let d=t.map(S=>({ID:S.ID,Code:S.Code,Price:S.UnitPrice}));var o=this.channelOptions.filter(S=>S.selected).map(S=>S.ID);let C={ListChannelID:o,ListPrice:d};this.http.post("/api/Price/UpdateChannel",C).subscribe(S=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+C.ListPrice.length+" items in "+C.ListChannelID.length+" channels","Success")})}}updatePriceByVariant(e){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:e.Price-0,VariantID:e.ID};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(o=>{let d=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") price in "+d.Name+" to "+t.Price,"Success"),this.paginationService.reloadPagination(this.searchFilter)})}onUpdateItems(e){let t=this.productService.selectedVariantProduct(e);this.dialog.open(de,{data:{selectedItems:t,channels:this.channelOptions},width:"600px"}).afterClosed().pipe(D(o=>o!==void 0)).subscribe(o=>{this.channelOptions=o,this.updatePrice(e)})}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/api/${this.rowCountAPI}`,{})}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e)}})}ngOnDestroy(){this.paginationService.destroy()}};a.\u0275fac=function(t){return new(t||a)(b(j),b(B),b(K),b(me),b(G))},a.\u0275cmp=V({type:a,selectors:[["app-price-pos-channel"]],decls:2,vars:3,consts:[["headerTitle","Price Comparison",3,"pageData","textButton","onSubmit",4,"ngIf"],["headerTitle","Price Comparison",3,"pageData","textButton","onSubmit"],[1,"d-flex"],[4,"ngIf"],["container",""],["type","number",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-md-12",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"showProductToggle","data","channel","filter","onToggle","onSubmit"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(t,o){t&1&&(u(0,it,33,22,"mainpanel",0),P(1,"async")),t&2&&s("ngIf",v(1,1,o.loader$))},dependencies:[L,ne,ie,k,N,z,he,W,U],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let i=a;return i})();function ot(i,a){if(i&1&&(r(0,"mat-radio-button",3),m(1),c()),i&2){let n=a.$implicit,e=a.index,t=p();s("value",n.Key)("name",t.name)("title",t.tooltipsText[e]?t.tooltipsText[e]:""),l(1),I(" ",n.Value,"")}}var at=i=>({"border-0 rounded":i}),ue=(()=>{let a=class a{constructor(){this.modelChange=new xe,this.border=!1,this.tooltipsText=[]}change(e){this.modelChange.emit(e)}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=V({type:a,selectors:[["radio-options"]],inputs:{model:"model",options:"options",border:"border",name:"name",tooltipsText:"tooltipsText"},outputs:{modelChange:"modelChange"},standalone:!0,features:[Se],decls:3,vars:5,consts:[[1,"form-control","h-100",3,"ngClass"],[3,"ngModel","ngModelChange"],["class","me-5","data-toggle","tooltip","data-placement","right",3,"value","name","title",4,"ngFor","ngForOf"],["data-toggle","tooltip","data-placement","right",1,"me-5",3,"value","name","title"]],template:function(t,o){t&1&&(r(0,"div",0)(1,"mat-radio-group",1),g("ngModelChange",function(C){return o.change(C)}),u(2,ot,2,4,"mat-radio-button",2),c()()),t&2&&(s("ngClass",y(3,at,o.border==!1)),l(1),s("ngModel",o.model),l(1),s("ngForOf",o.options))},dependencies:[R,$,A,Me,Ee,Fe,oe,k,N],styles:[".mat-radio-label{margin-top:auto;margin-bottom:auto}"]});let i=a;return i})();function pt(i,a){if(i&1){let n=f();r(0,"button",18),g("click",function(){_(n);let t=p();return h(t.onUpdateItems())}),x(1,"i",19),m(2," Update "),c()}}function mt(i,a){if(i&1&&(r(0,"th",20),m(1),c()),i&2){let n=a.$implicit;l(1),T(n.Name)}}function dt(i,a){if(i&1){let n=f();r(0,"th")(1,"input",21),g("ngModelChange",function(t){_(n);let o=p();return h(o.checkboxState=t)})("ngModelChange",function(){_(n);let t=p();return h(t.onSelectAllData())}),c()()}if(i&2){let n=p();l(1),s("ngModel",n.checkboxState)}}function _t(i,a){i&1&&(E(0),r(1,"th",22),m(2," Expected (POS) "),c(),r(3,"th",22),m(4," Channel "),c(),F())}function ht(i,a){if(i&1){let n=f();r(0,"img",35),g("click",function(t){_(n);let o=p(3).$implicit,d=p();return h(d.onZoomImage(t,o==null?null:o.ImageUrl))}),c()}if(i&2){let n=p(3).$implicit;Q("src",n==null?null:n.ImageUrl,M)}}function ut(i,a){i&1&&x(0,"img",36)}var gt=i=>({"border-bottom":i});function Ct(i,a){if(i&1&&(E(0),r(1,"td",30),u(2,ht,1,1,"img",31)(3,ut,1,0,"ng-template",null,32,Z),c(),r(5,"td",33)(6,"h5",34),m(7),c(),x(8,"br"),r(9,"small"),m(10),c()(),F()),i&2){let n=H(4),e=p().index,t=p().$implicit,o=p();l(1),s("rowSpan",t==null?null:t.Variants.length)("ngClass",y(7,gt,e+1==o.products.length)),l(1),s("ngIf",t==null?null:t.ImageUrl)("ngIfElse",n),l(3),s("rowSpan",t==null?null:t.Variants.length),l(2),T(t==null?null:t.Name),l(3),I("(",t==null?null:t.Category,")")}}function ft(i,a){if(i&1){let n=f();E(0),r(1,"input",21),g("ngModelChange",function(t){_(n);let o=p(2).$implicit;return h(o.selected=t)}),c(),F()}if(i&2){let n=p(2).$implicit;l(1),s("ngModel",n.selected)}}function xt(i,a){if(i&1&&(r(0,"td",37),u(1,ft,2,1,"ng-container",23),c()),i&2){let n=p().$implicit;l(1),s("ngIf",!n.Discontinued)}}var St=i=>({"bg-gradient-warning":i});function Pt(i,a){if(i&1){let n=f();E(0),r(1,"td",40),m(2),P(3,"number"),c(),r(4,"td",41),g("click",function(){let o=_(n).$implicit,d=p(2).$implicit,C=p().$implicit,S=p();return h(S.openTableDialog(d,C,o))}),r(5,"span",42),m(6),P(7,"number"),c(),r(8,"a",43),g("click",function(t){return t==null?null:t.stopPropagation()}),x(9,"i",29),c()(),F()}if(i&2){let n=a.$implicit;l(2),I(" ",v(3,4,n.PriceExpected)," "),l(2),s("ngClass",y(8,St,n.Price!=n.PriceExpected)),l(2),I(" ",v(7,6,n.Price)," "),l(2),s("href",n.Url,M)}}function vt(i,a){i&1&&(r(0,"td",44),m(1,"X"),c(),r(2,"td",44),m(3,"X"),c())}function bt(i,a){if(i&1&&(E(0),u(1,Pt,10,10,"ng-container",38)(2,vt,4,0,"ng-template",null,39,Z),F()),i&2){let n=a.$implicit,e=H(3),t=p().$implicit,o=p(2);l(1),s("ngIf",o.getItemFromChannel(t,n.ID))("ngIfElse",e)}}var It=i=>({"text-decoration-line-through":i}),ze=i=>[i];function yt(i,a){if(i&1&&(r(0,"tr"),u(1,Ct,11,9,"ng-container",23),r(2,"td",24),m(3),c(),r(4,"td",25)(5,"span",26),m(6),c(),r(7,"span",27)(8,"a",28),x(9,"i",29),c()()(),u(10,xt,2,1,"ng-template",16)(11,bt,4,2,"ng-container",17),c()),i&2){let n=a.$implicit,e=a.index,t=p(2);l(1),s("ngIf",e==0),l(2),T(n==null?null:n.Model),l(1),s("matTooltip",n.Discontinued?t.discontinuedVariantMsg:""),l(1),s("ngClass",y(8,It,n.Discontinued)),l(1),T(n==null?null:n.Code),l(2),s("href","https://"+t.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),M),l(2),s("ngxPermissionsOnly",y(10,ze,t.rolePriceEdit)),l(1),s("ngForOf",t.channelOptions)}}function wt(i,a){if(i&1&&(r(0,"tbody"),u(1,yt,12,12,"tr",17),c()),i&2){let n=a.$implicit;l(1),s("ngForOf",n.Variants)}}var Ke=(()=>{let a=class a{constructor(e,t,o,d,C){this.http=e,this.toastr=t,this.dialog=o,this.productService=d,this.biggerPictureService=C,this.searchFilter=new Ve,this.products=[],this.checkboxState=!1,this.rolePriceEdit=ae.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.initPageLoader(),this.filterTypeOptions=[{Key:O.ALL,Value:"All"},{Key:O.DIFFERENCE,Value:"Difference"}],this.filterType=O.ALL,this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.hostName=d.getHostName()}initPageLoader(){this.http.post("/api/PriceLoader/LoadMultiple",{}).subscribe(e=>{this.channelOptions=e.Options.Channel,this.searchFilter=e.Filter,this.onFilter()})}onSelectAllData(){this.products=this.products.map(e=>(e.Variants&&(e.Variants=e.Variants.map(t=>(t.selected=this.checkboxState,t))),e))}onFilter(e){let t={text:e,filterModel:this.filterType,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount};this.http.post("/api/Price/GetOutletPrice",t).subscribe(o=>{this.products=o.Data})}updatePrice(){let e=this.productService.selectedVariantProduct(this.products);if(e.length>0){let t=e.map(C=>C.ID),d={ListChannelID:this.channelOptions.filter(C=>C.selected).map(C=>C.ID),ListID:t};this.http.post("/api/Price/UpdateChannelOutletPrice",d).subscribe({next:C=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+d.ListID.length+" items in "+d.ListChannelID.length+" channels","Success")},error:C=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(e=>(e.selected=!1,e))}getItemFromChannel(e,t){return e.Channel.find(o=>o.ChannelID==t)}onUpdateItems(){let e=this.productService.selectedVariantProduct(this.products);this.dialog.open(de,{data:{selectedItems:e,channels:this.channelOptions},width:"600px"}).afterClosed().pipe(D(t=>w.IsNotEmpty(t))).subscribe(t=>{this.channelOptions=t,this.updatePrice()})}openTableDialog(e,t,o){let d=JSON.parse(JSON.stringify(e));this.dialog.open(_e,{data:{Name:t.Name,Variant:d,ChannelID:o?.ChannelID,Table:"price",ChannelItemID:o?.ChannelItemID}}).afterClosed().pipe(D(S=>w.IsNotEmpty(S))).subscribe(S=>{this.updateProductPrice(S,o)})}updateProductPrice(e,t){let o={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",o).subscribe(d=>{t.Price=o.Price;let C=this.productService.findChannelById(o.ID,this.channelOptions);this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) inventory in ${C.Name} to ${o.Price}`,"Success")})}onZoomImage(e,t){this.biggerPictureService.openBiggerPicture(e,t)}};a.\u0275fac=function(t){return new(t||a)(b(j),b(B),b(K),b(G),b(pe))},a.\u0275cmp=V({type:a,selectors:[["app-custom-channel-price"]],decls:30,vars:14,consts:[["headerTitle","Price Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit"],["container",""],["name","filterModel",3,"model","options","border","modelChange"],[1,"d-flex"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","5"],["scope","col","colspan","2","class","text-center border-bottom-0 border w-10 text-uppercase",4,"ngFor","ngForOf"],["scope","col","colspan","2",1,"text-center","w-20"],["scope","col",1,"text-start"],["scope","col",1,"text-start","w-10"],[3,"ngxPermissionsOnly"],[4,"ngFor","ngForOf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","w-10","text-uppercase"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"text-end","border-top-0","border","w-10"],[4,"ngIf"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-start","border-bottom",3,"matTooltip"],[3,"ngClass"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-center","border-bottom",3,"rowSpan"],[1,"mb-0","item-name"],[1,"border","rounded","w-img","cursor-pointer",3,"src","click"],["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"],["elseCol",""],[1,"text-end","border"],[1,"text-center","border","pointer","cell-hover",3,"ngClass","click"],[1,"me-2"],["target","_blank",3,"href","click"],[1,"table-white","border","text-end",2,"color","red"]],template:function(t,o){t&1&&(r(0,"mainpanel",0),g("onSubmit",function(C){return o.onFilter(C)}),r(1,"filters")(2,"div",1)(3,"div")(4,"h6"),m(5,"Filter by"),c(),r(6,"radio-options",2),g("modelChange",function(C){return o.filterType=C}),c()()()(),r(7,"actions")(8,"div",3),u(9,pt,3,0,"button",4),c()(),r(10,"content")(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"table",9)(16,"thead",10)(17,"tr"),x(18,"th",11),u(19,mt,2,1,"th",12),c(),r(20,"tr")(21,"th",13),m(22,"Product"),c(),r(23,"th",14),m(24,"Variant"),c(),r(25,"th",15),m(26,"SKU"),c(),u(27,dt,2,1,"ng-template",16)(28,_t,5,0,"ng-container",17),c()(),u(29,wt,2,1,"tbody",17),c()()()()()()()),t&2&&(s("pageData",o.pageData)("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),l(6),s("model",o.filterType)("options",o.filterTypeOptions)("border",!0),l(3),s("ngIf",o.productService.hasSelectionVariant(o.products)),l(10),s("ngForOf",o.channelOptions),l(8),s("ngxPermissionsOnly",y(12,ze,o.rolePriceEdit)),l(1),s("ngForOf",o.channelOptions),l(1),s("ngForOf",o.products))},dependencies:[$,A,L,te,k,N,z,ce,ue,re,U],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}"]});let i=a;return i})();function Tt(i,a){if(i&1){let n=f();r(0,"button",8),g("click",function(){_(n);let t=p(2).ngIf,o=p();return h(o.openScanDialog(t))}),x(1,"i",9),m(2," Scan Channel "),c()}}function Dt(i,a){if(i&1){let n=f();r(0,"button",10),g("click",function(){_(n);let t=p().ngIf,o=p(2);return h(o.updateStock(t))}),x(1,"i",11),m(2," Update "),c()}}function Vt(i,a){if(i&1&&(r(0,"actions")(1,"div",5)(2,"div"),u(3,Tt,3,0,"button",6)(4,Dt,3,0,"button",7),c()()()),i&2){let n=a.ngIf,e=p(2);l(3),s("ngIf",!e.productService.hasSelectionVariant(n)),l(1),s("ngIf",e.productService.hasSelectionVariant(n))}}function Et(i,a){if(i&1){let n=f();r(0,"th")(1,"input",32),g("change",function(t){_(n);let o=p().ngIf,d=p(2);return h(d.onSelectAllSKU(t.target.checked,o))}),c()()}}function Ft(i,a){if(i&1){let n=f();r(0,"input",52),g("ngModelChange",function(t){_(n);let o=p(4).$implicit;return h(o.selected=t)})("ngModelChange",function(){_(n);let t=p(4).$implicit,o=p(3);return h(o.onCheckboxStateProduct(t))}),c()}if(i&2){let n=p(4).$implicit;s("ngModel",n.selected)}}function Mt(i,a){if(i&1&&u(0,Ft,1,1,"input",51),i&2){let n=p(2).$implicit,e=p().$implicit;s("ngIf",n.Inventory>=0||e.Variants.length>1)}}function kt(i,a){if(i&1){let n=f();r(0,"img",53),g("click",function(t){_(n);let o=p(3).$implicit,d=p(3);return h(d.onZoomImage(t,o==null?null:o.ImageUrl))}),c()}if(i&2){let n=p(3).$implicit;Q("src",n.ThumbnailUrl,M)}}function Nt(i,a){i&1&&x(0,"img",54)}var fe=i=>[i];function Ot(i,a){if(i&1&&(E(0),r(1,"td",45)(2,"div",46),u(3,Mt,1,1,"ng-template",21)(4,kt,1,1,"img",47)(5,Nt,1,0,"ng-template",null,48,Z),c()(),r(7,"td",49)(8,"span",50),m(9),c(),x(10,"br"),r(11,"small"),m(12),c()(),F()),i&2){let n=H(6),e=p(2).$implicit,t=p(3);l(1),s("rowSpan",e.Variants.length),l(2),s("ngxPermissionsOnly",y(7,fe,t.rolePriceEdit)),l(1),s("ngIf",e.ThumbnailUrl)("ngIfElse",n),l(3),s("rowSpan",e.Variants.length),l(2),T(e.Name),l(3),I("(",e.Category,")")}}function $t(i,a){if(i&1){let n=f();r(0,"input",57),g("ngModelChange",function(t){_(n);let o=p(3).$implicit;return h(o.selected=t)}),c()}if(i&2){let n=p(3).$implicit;s("ngModel",n.selected)}}function At(i,a){if(i&1&&(E(0),u(1,$t,1,1,"input",56),F()),i&2){let n=p(2).$implicit;l(1),s("ngIf",n.Inventory>=0)}}function Lt(i,a){if(i&1&&(r(0,"td",55),u(1,At,2,1,"ng-container",4),c()),i&2){let n=p().$implicit;l(1),s("ngIf",!n.Discontinued)}}function Ut(i,a){if(i&1){let n=f();r(0,"div",58),g("click",function(){_(n);let t=p().$implicit,o=p().$implicit,d=p(2).ngIf,C=p();return h(C.openTableDialog(t,o,d))}),m(1),P(2,"number"),c()}if(i&2){let n=p().$implicit;l(1),I(" ",v(2,1,n.Channel[0]==null?null:n.Channel[0].Price)," ")}}var Rt=i=>({"text-decoration-line-through":i}),Bt=i=>({"bg-gradient-warning":i});function jt(i,a){if(i&1){let n=f();r(0,"tr"),u(1,Ot,13,9,"ng-container",4),r(2,"td",19),m(3),c(),r(4,"td",33)(5,"span",34),m(6),c(),r(7,"span",35)(8,"a",36),x(9,"i",37),c()()(),u(10,Lt,2,1,"ng-template",21),r(11,"td",22),m(12),P(13,"number"),c(),r(14,"td",38),u(15,Ut,3,3,"div",39),c(),r(16,"td")(17,"div",40)(18,"div",41)(19,"a",36),x(20,"i",42),c(),m(21," \xA0\xA0 "),r(22,"span",43),g("click",function(){let o=_(n).$implicit,d=p(4);return h(d.refreshPrice(o))}),x(23,"i",44),c()()()()()}if(i&2){let n=a.$implicit,e=a.index,t=p(4);l(1),s("ngIf",e==0),l(2),T(n.Model),l(1),s("matTooltip",n.Discontinued?t.discontinuedVariantMsg:""),l(1),s("ngClass",y(13,Rt,n.Discontinued)),l(1),I(" ",n.Code," "),l(2),s("href","https://"+t.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),M),l(2),s("ngxPermissionsOnly",y(15,fe,t.rolePriceEdit)),l(2),I(" ",v(13,11,n.UnitPrice)," "),l(2),s("ngClass",y(17,Bt,n.UnitPrice!=(n.Channel[0]==null?null:n.Channel[0].Price))),l(1),s("ngIf",n.Channel.length>0),l(4),s("href",n.Channel[0]==null?null:n.Channel[0].Url,M)}}function zt(i,a){if(i&1&&(E(0),u(1,jt,24,19,"tr",26),F()),i&2){let n=a.$implicit;l(1),s("ngForOf",n.Variants)}}function Kt(i,a){if(i&1){let n=f();r(0,"span",58),g("click",function(){_(n);let t=p(3);return h(t.getRowCount())}),r(1,"i",59),m(2,"?"),c()()}}function Gt(i,a){if(i&1&&(r(0,"span"),m(1),P(2,"number"),c()),i&2){let n=a.ngIf;l(1),T(v(2,1,n.Total))}}function Jt(i,a){if(i&1){let n=f();r(0,"a",63),g("click",function(){_(n);let t=p(4);return h(t.onNextPage())}),x(1,"i",64),m(2," Next"),c()}}function Ht(i,a){if(i&1){let n=f();r(0,"a",65),g("click",function(){_(n);let t=p(4);return h(t.onLastPage())}),x(1,"i",66),m(2," Last"),c()}}function Zt(i,a){if(i&1&&(r(0,"div",60),u(1,Jt,3,0,"a",61)(2,Ht,3,0,"a",62),c()),i&2){let n=p(3);l(1),s("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage),l(1),s("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage)}}function qt(i,a){if(i&1){let n=f();r(0,"content")(1,"div",12)(2,"div",13)(3,"table",14)(4,"thead",15)(5,"tr")(6,"th",16),m(7," Product "),r(8,"div")(9,"mat-slide-toggle",17),g("ngModelChange",function(t){_(n);let o=p(2);return h(o.toggleDifferentInventory=t)})("toggleChange",function(){_(n);let t=p(2);return h(t.onToggleDifferentInventory())}),r(10,"small",18),m(11,"FILTER DIFFERENT PRICE"),c()()()(),r(12,"th",19),m(13,"Variant"),c(),r(14,"th",20),m(15,"SKU"),c(),u(16,Et,2,0,"ng-template",21),r(17,"th",22),m(18,"POS"),c(),r(19,"th",22)(20,"div",23),g("click",function(){_(n);let t=p(2);return h(t.onChangeChannel())}),x(21,"img",24),m(22),c()(),x(23,"th",25),c()(),r(24,"tbody"),u(25,zt,2,1,"ng-container",26),c()(),r(26,"div",27)(27,"div",28)(28,"div",29),m(29),P(30,"number"),u(31,Kt,3,0,"span",30)(32,Gt,3,3,"span",4),P(33,"async"),m(34),c()(),u(35,Zt,3,2,"div",31),c()()()()}if(i&2){let n=a.ngIf,e=p(2);l(9),s("ngModel",e.toggleDifferentInventory),l(7),s("ngxPermissionsOnly",y(15,fe,e.rolePriceEdit)),l(4),s("matTooltip","Change "+(e.selectedChannel==null?null:e.selectedChannel.Name)),l(1),s("src",e.selectedChannel.logo,M),l(1),I(" ",e.selectedChannel!=null&&e.selectedChannel.Name?e.selectedChannel==null?null:e.selectedChannel.Name:"Choose Channel ..."," "),l(3),s("ngForOf",n),l(4),I(" Showing 1 - ",v(30,11,n==null?null:n.length)," of "),l(2),s("ngIf",e.paginationService.hideCount),l(1),s("ngIf",v(33,13,!e.paginationService.hideCount&&e.allDataCount$)),l(2),I(" records ~ ",e.paginationService.footerPageNumber," Page "),l(1),s("ngIf",n.length>0)}}function Xt(i,a){if(i&1){let n=f();r(0,"mainpanel",1),g("textChange",function(t){_(n);let o=p();return h(o.searchFilter.text=t)})("onSubmit",function(){_(n);let t=p();return h(t.search())}),r(1,"filters")(2,"div",2)(3,"div")(4,"label"),m(5,"Page Number"),c(),r(6,"input",3),g("ngModelChange",function(t){_(n);let o=p();return h(o.searchFilter.PageNumber=t)}),c()(),r(7,"div")(8,"label"),m(9,"Page Size"),c(),r(10,"input",3),g("ngModelChange",function(t){_(n);let o=p();return h(o.searchFilter.RowCount=t)}),c()()()(),u(11,Vt,5,2,"actions",4),P(12,"async"),u(13,qt,36,17,"content",4),P(14,"async"),c()}if(i&2){let n=p();s("headerTitle",n.pageTitle)("text",n.searchFilter.text),l(6),s("ngModel",n.searchFilter.PageNumber),l(4),s("ngModel",n.searchFilter.RowCount),l(1),s("ngIf",v(12,6,n.paginationService.data$)),l(2),s("ngIf",v(14,8,n.paginationService.data$))}}var Ge=(()=>{let a=class a{constructor(e,t,o,d,C,S){this.http=e,this.paginationService=t,this.toastr=o,this.dialog=d,this.productService=C,this.biggerPictureService=S,this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.allDataCountEndpoint="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=ae.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.productService.getHostName()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(q(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=O.ALL,this.paginationService.reloadPagination(this.searchFilter),this.channelOptions=e.Options.Channel,this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=O.ALL:this.searchFilter.filterModel=O.DIFFERENCE,this.search()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(t=>(t.selected=e.selected,t))}openScanDialog(e){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=w.GuidEMpty,this.dialog.open(se,{data:{filter:t,channelOptions:e.Options.Channel},width:"600px"}).afterClosed().pipe(D(o=>w.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAll(e)})}scanAll(e){let t=this.productService.findChannelById(this.searchFilter.ChannelID,e.Options.Channel);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(o=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(),this.toastr.success(`Successfully scanned from ${t?.Name}`,"Success"))})}updateStock(e){let o=this.productService.selectedVariantProduct(e).map(C=>({ID:C.ID,ChannelID:C.Channel[0].ChannelID,Code:C.Code,Price:C.UnitPrice})),d={ListChannelID:[this.searchFilter.ChannelID],ListPrice:o};this.http.post("/api/Price/UpdateChannel",d).subscribe(()=>{this.search(),this.toastr.success(`Successfully updated ${d.ListPrice.length} variants in ${d.ListChannelID.length} channels`,"Success")})}refreshPrice(e){let t={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",t).subscribe(o=>{this.toastr.success("Successfully updated","Success"),this.search()})}search(){this.paginationService.reloadPagination(this.searchFilter)}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){this.http.post(`/API/${this.allDataCountEndpoint}`,this.searchFilter).subscribe({next:e=>{this.paginationService.getAllData(this.searchFilter,e.Total)}})}openTableDialog(e,t,o){let d=JSON.parse(JSON.stringify(e));this.dialog.open(_e,{data:{Name:t.Name,Variant:d,ChannelID:d?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:d?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(D(S=>w.IsNotEmpty(S))).subscribe(S=>{this.updateItemAfterDialog(S,o,e)})}updateItemAfterDialog(e,t,o){let d={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",d).subscribe(C=>{let S=this.productService.findChannelById(d.ID,t.Options.Channel);this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) inventory in ${S.Name} to ${d.Price}`,"Success"),o.Channel[0]&&(o.Channel[0].Price=d.Price)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID),this.selectedChannel&&(this.selectedChannel.logo=w.getChannelLogoByTypeId(this.selectedChannel.TypeID))}onChangeChannel(){this.dialog.open($e,{data:{channelOptions:this.channelOptions,selectedChannel:this.selectedChannel}}).afterClosed().pipe(D(e=>w.IsNotEmpty(e))).subscribe(e=>{this.selectedChannel=e,this.searchFilter.ChannelID=e.ID,this.search()})}onSelectAllSKU(e,t){t=t.map(o=>(o.Variants=o.Variants.map(d=>(d.selected=e,d)),o))}onZoomImage(e,t){this.biggerPictureService.openBiggerPicture(e,t)}ngOnDestroy(){this.paginationService.destroy()}};a.\u0275fac=function(t){return new(t||a)(b(j),b(me),b(B),b(K),b(G),b(pe))},a.\u0275cmp=V({type:a,selectors:[["app-price-single-channel"]],decls:2,vars:3,consts:[[3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[3,"headerTitle","text","textChange","onSubmit"],["container",""],["type","number",3,"ngModel","ngModelChange"],[4,"ngIf"],[1,"d-flex"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[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,"ngModel","ngModelChange","toggleChange"],[1,"fw-bold"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["matTooltipPosition","above",1,"d-inline-block","text-truncate","mt-3","cursor-pointer",2,"max-width","114px",3,"matTooltip","click"],[2,"width","16px",3,"src"],[2,"width","4%"],[4,"ngFor","ngForOf"],[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"],["class","btn-group",4,"ngIf"],["type","checkbox",1,"me-3",3,"change"],["matTooltipPosition","above",1,"text-end",3,"matTooltip"],[3,"ngClass"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-external-link-alt"],[1,"text-end",3,"ngClass"],["style","cursor: pointer;",3,"click",4,"ngIf"],[1,"row"],[1,"col-12","ps-0","d-flex","justify-content-between"],[1,"fas","external-link-custom","fa-lg","fa-external-link-alt"],["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"],["class","border rounded w-img cursor-pointer","style","margin-left: 20px",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox","class","me-3",3,"ngModel","ngModelChange",4,"ngIf"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src","click"],["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,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(t,o){t&1&&(u(0,Xt,15,10,"mainpanel",0),P(1,"async")),t&2&&s("ngIf",v(1,1,o.loader$))},dependencies:[$,A,L,ne,ie,te,k,N,z,Ne,ce,re,W,U],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}"]});let i=a;return i})();var Je=(()=>{let a=class a{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"}]}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=V({type:a,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,o){t&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),x(3,"nav-tab",2),c()()(),x(4,"router-outlet")),t&2&&(l(3),s("Tabs",o.priceTabs))},dependencies:[Te,Pe]});let i=a;return i})();var Yt=[{path:"",component:Je,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",component:je,canActivate:[le],data:{title:"Global Price Comparison"}},{path:"OutletPrice",component:Ke,canActivate:[le],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",component:Ge,canActivate:[le],data:{title:"Price Single Channel Comparison"}}]}],He=(()=>{let a=class a{};a.\u0275fac=function(t){return new(t||a)},a.\u0275mod=Y({type:a}),a.\u0275inj=X({imports:[R,ee.forChild(Yt)]});let i=a;return i})();var ci=(()=>{let a=class a{};a.\u0275fac=function(t){return new(t||a)},a.\u0275mod=Y({type:a}),a.\u0275inj=X({imports:[R,oe,De,we,ee,Ie,He,ve,Oe,ke,ye,ue,he,be.forChild()]});let i=a;return i})();export{ci as PriceModule};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as Z,e as $,h as C}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-DLMJHJC2.js";import{J as M,O as q,U,a as _,e as b,h as p,i as w,j as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-NWCS6OKR.js";import{e as P,g as O,j as B,n as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-BHYFVY4A.js";import{$ as u,Aa as x,Fa as r,Ja as f,Ka as N,Ma as L,Pa as D,_ as A,aa as T,ba as y,c as d,db as j,ea as m,fa as E,gb as I,ha as S,j as F,sb as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-RWRP376T.js";var K=z({passive:!0}),G=(()=>{let i=class i{constructor(e,t){this._platform=e,this._ngZone=t,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return F;let t=b(e),s=this._monitoredElements.get(t);if(s)return s.subject;let o=new d,a="cdk-text-field-autofilled",c=l=>{l.animationName==="cdk-text-field-autofill-start"&&!t.classList.contains(a)?(t.classList.add(a),this._ngZone.run(()=>o.next({target:l.target,isAutofilled:!0}))):l.animationName==="cdk-text-field-autofill-end"&&t.classList.contains(a)&&(t.classList.remove(a),this._ngZone.run(()=>o.next({target:l.target,isAutofilled:!1})))};return this._ngZone.runOutsideAngular(()=>{t.addEventListener("animationstart",c,K),t.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(t,{subject:o,unlisten:()=>{t.removeEventListener("animationstart",c,K)}}),o}stopMonitoring(e){let t=b(e),s=this._monitoredElements.get(t);s&&(s.unlisten(),s.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t))}ngOnDestroy(){this._monitoredElements.forEach((e,t)=>this.stopMonitoring(t))}};i.\u0275fac=function(t){return new(t||i)(y(p),y(f))},i.\u0275prov=A({token:i,factory:i.\u0275fac,providedIn:"root"});let n=i;return n})();var W=(()=>{let i=class i{};i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=m({type:i}),i.\u0275inj=u({});let n=i;return n})();var ie=new T("MAT_INPUT_VALUE_ACCESSOR"),se=["button","checkbox","file","hidden","image","radio","range","reset","submit"],ne=0,re=q(class{constructor(n,i,Y,e){this._defaultErrorStateMatcher=n,this._parentForm=i,this._parentFormGroup=Y,this.ngControl=e,this.stateChanges=new d}}),He=(()=>{let i=class i extends re{get disabled(){return this._disabled}set disabled(e){this._disabled=_(e),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(e){this._id=e||this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(P.required)??!1}set required(e){this._required=_(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&w().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get value(){return this._inputValueAccessor.value}set value(e){e!==this.value&&(this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=_(e)}constructor(e,t,s,o,a,c,l,X,J,R){super(c,o,a,s),this._elementRef=e,this._platform=t,this._autofillMonitor=X,this._formField=R,this._uid=`mat-input-${ne++}`,this.focused=!1,this.stateChanges=new d,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(v=>w().has(v)),this._iOSKeyupListener=v=>{let h=v.target;!h.value&&h.selectionStart===0&&h.selectionEnd===0&&(h.setSelectionRange(1,1),h.setSelectionRange(0,0))};let g=this._elementRef.nativeElement,H=g.nodeName.toLowerCase();this._inputValueAccessor=l||g,this._previousNativeValue=this.value,this.id=this.id,t.IOS&&J.runOutsideAngular(()=>{e.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._isServer=!this._platform.isBrowser,this._isNativeSelect=H==="select",this._isTextarea=H==="textarea",this._isInFormField=!!R,this._isNativeSelect&&(this.controlType=g.multiple?"mat-native-select-multiple":"mat-native-select")}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._platform.IOS&&this._elementRef.nativeElement.removeEventListener("keyup",this._iOSKeyupListener)}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}_focusChanged(e){e!==this.focused&&(this.focused=e,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let t=this._elementRef.nativeElement;this._previousPlaceholder=e,e?t.setAttribute("placeholder",e):t.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){se.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,t=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&t&&t.label)}else return this.focused||!this.empty}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}};i.\u0275fac=function(t){return new(t||i)(r(x),r(p),r(O,10),r(B,8),r(V,8),r(U),r(ie,10),r(G),r(f),r($,8))},i.\u0275dir=E({type:i,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:18,hostBindings:function(t,s){t&1&&I("focus",function(){return s._focusChanged(!0)})("blur",function(){return s._focusChanged(!1)})("input",function(){return s._onInput()}),t&2&&(j("id",s.id)("disabled",s.disabled)("required",s.required),L("name",s.name||null)("readonly",s.readonly&&!s._isNativeSelect||null)("aria-invalid",s.empty&&s.required?null:s.errorState)("aria-required",s.required)("id",s.id),D("mat-input-server",s._isServer)("mat-mdc-form-field-textarea-control",s._isInFormField&&s._isTextarea)("mat-mdc-form-field-input-control",s._isInFormField)("mdc-text-field__input",s._isInFormField)("mat-mdc-native-select-inline",s._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly"},exportAs:["matInput"],features:[k([{provide:Z,useExisting:i}]),N,S]});let n=i;return n})(),Fe=(()=>{let i=class i{};i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=m({type:i}),i.\u0275inj=u({imports:[M,C,C,W,M]});let n=i;return n})();export{ie as a,He as b,Fe as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as P,c as S}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-IEBL2FLF.js";import{u as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-J6UEWWQX.js";import{$ as v,$a as p,Ea as n,Ic as E,Jc as M,Kb as C,Kc as N,Na as o,Ta as a,Ya as s,Yb as b,Za as m,Zb as y,ab as c,da as g,ea as x,ec as I,ib as l,lb as f,nb as T,ob as u,qb as _}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-RWRP376T.js";function D(e,t){if(e&1&&(p(0),s(1,"a",6),u(2),m(),c()),e&2){let i=l().$implicit;n(1),f("routerLink",i.Url),o("title",i.Description?i.Description:""),n(1),_(" ",i.Title," ")}}function F(e,t){if(e&1&&(s(0,"li",4),a(1,D,3,3,"ng-container",5),m()),e&2){let i=t.$implicit;n(1),o("ngxPermissionsOnly",i.Permissions)}}function L(e,t){if(e&1&&(p(0),a(1,F,2,1,"li",3),c()),e&2){let i=l();n(1),o("ngForOf",i.Tabs)}}function R(e,t){if(e&1&&(s(0,"li",4)(1,"a",6),u(2),m()()),e&2){let i=t.$implicit;n(1),f("routerLink",i.Url),o("title",i.Description?i.Description:""),n(1),_(" ",i.Title," ")}}function w(e,t){if(e&1&&a(0,R,3,3,"li",3),e&2){let i=l();o("ngForOf",i.Tabs)}}var H=(()=>{let t=class t{constructor(){this.usePermissions=!1}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=g({type:t,selectors:[["nav-tab"]],inputs:{Tabs:"Tabs",usePermissions:"usePermissions"},decls:4,vars:2,consts:[[1,"nav","navbar-nav","navbar-left","nav-tab-arrow"],[4,"ngIf","ngIfElse"],["NOT_USE_PERMISSIONS",""],["routerLinkActive","active","class","nav-item me-6",4,"ngFor","ngForOf"],["routerLinkActive","active",1,"nav-item","me-6"],[4,"ngxPermissionsOnly"],[1,"nav-link","nav-link-arrow","mb-0",3,"routerLink","title"]],template:function(r,O){if(r&1&&(s(0,"ul",0),a(1,L,2,1,"ng-container",1)(2,w,1,1,"ng-template",null,2,C),m()),r&2){let h=T(3);n(1),o("ngIf",O.usePermissions)("ngIfElse",h)}},dependencies:[b,y,E,M,P]});let e=t;return e})(),J=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=x({type:t}),t.\u0275inj=v({imports:[I,N,k,S.forChild()]});let e=t;return e})();export{H as a,J as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Ke,b as We}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-HUCFUCCO.js";import{h as Qe,j as Be,k as $e}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-J6UEWWQX.js";import{C as je,F as ee,G as Ve,J as _e,L as Ue,U as B,W as qe,X as Ge,g as Le,m as Ne,v as He}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-NWCS6OKR.js";import{$ as U,$b as pe,Aa as O,Ac as fe,Ea as s,Eb as Q,Fa as l,Fb as M,Gb as f,Ha as L,Hb as X,Ia as z,Ib as v,J as Se,Jb as _,Ka as N,Kb as Fe,La as re,Ma as H,Na as m,Pa as x,R as E,Ra as ze,Rb as R,S as De,Sa as Re,Sb as Pe,Ta as u,U as S,Ua as g,Va as G,Wa as K,Xa as W,Y as $,Ya as c,Za as h,_ as Me,_a as ae,a as xe,aa as Te,bb as D,c as F,cb as Y,da as k,ea as q,ec as Ae,fa as y,gb as j,ha as we,ia as P,ib as p,ja as A,jb as Z,kb as J,ma as Ee,n as Ie,nb as oe,oa as ke,ob as I,pa as Oe,pb as C,q as Ce,rc as ce,sb as se,sc as de,tc as he,vb as le,vc as T,wb as V,wc as w,yc as me,zc as ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.5.1/Marketplace/chunk-RWRP376T.js";function pt(n,i){n&1&&J(0)}var ct=["*"],ge=(()=>{let i=class i{constructor(e){this._elementRef=e}focus(){this._elementRef.nativeElement.focus()}};i.\u0275fac=function(t){return new(t||i)(l(O))},i.\u0275dir=y({type:i,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"]});let n=i;return n})(),ve=(()=>{let i=class i{constructor(e){this.template=e}};i.\u0275fac=function(t){return new(t||i)(l(M))},i.\u0275dir=y({type:i,selectors:[["","cdkStepLabel",""]]});let n=i;return n})(),dt=0;var b={NUMBER:"number",EDIT:"edit",DONE:"done",ERROR:"error"},be=new Te("STEPPER_GLOBAL_OPTIONS"),te=(()=>{let i=class i{get completed(){return this._completedOverride==null?this._getDefaultCompleted():this._completedOverride}set completed(e){this._completedOverride=e}_getDefaultCompleted(){return this.stepControl?this.stepControl.valid&&this.interacted:this.interacted}get hasError(){return this._customError==null?this._getDefaultError():this._customError}set hasError(e){this._customError=e}_getDefaultError(){return this.stepControl&&this.stepControl.invalid&&this.interacted}constructor(e,t){this._stepper=e,this.interacted=!1,this.interactedStream=new z,this.editable=!0,this.optional=!1,this._completedOverride=null,this._customError=null,this._stepperOptions=t||{},this._displayDefaultIndicatorType=this._stepperOptions.displayDefaultIndicatorType!==!1}select(){this._stepper.selected=this}reset(){this.interacted=!1,this._completedOverride!=null&&(this._completedOverride=!1),this._customError!=null&&(this._customError=!1),this.stepControl&&this.stepControl.reset()}ngOnChanges(){this._stepper._stateChanged()}_markAsInteracted(){this.interacted||(this.interacted=!0,this.interactedStream.emit(this))}_showError(){return this._stepperOptions.showError??this._customError!=null}};i.\u0275fac=function(t){return new(t||i)(l($(()=>ie)),l(be,8))},i.\u0275cmp=k({type:i,selectors:[["cdk-step"]],contentQueries:function(t,r,o){if(t&1&&v(o,ve,5),t&2){let d;f(d=_())&&(r.stepLabel=d.first)}},viewQuery:function(t,r){if(t&1&&X(M,7),t&2){let o;f(o=_())&&(r.content=o.first)}},inputs:{stepControl:"stepControl",label:"label",errorMessage:"errorMessage",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],state:"state",editable:["editable","editable",R],optional:["optional","optional",R],completed:["completed","completed",R],hasError:["hasError","hasError",R]},outputs:{interactedStream:"interacted"},exportAs:["cdkStep"],features:[re,we],ngContentSelectors:ct,decls:1,vars:0,template:function(t,r){t&1&&(Z(),u(0,pt,1,0,"ng-template"))},encapsulation:2,changeDetection:0});let n=i;return n})(),ie=(()=>{let i=class i{get selectedIndex(){return this._selectedIndex}set selectedIndex(e){this.steps&&this._steps?(this._isValidIndex(e),this.selected?._markAsInteracted(),this._selectedIndex!==e&&!this._anyControlsInvalidOrPending(e)&&(e>=this._selectedIndex||this.steps.toArray()[e].editable)&&this._updateSelectedItemIndex(e)):this._selectedIndex=e}get selected(){return this.steps?this.steps.toArray()[this.selectedIndex]:void 0}set selected(e){this.selectedIndex=e&&this.steps?this.steps.toArray().indexOf(e):-1}get orientation(){return this._orientation}set orientation(e){this._orientation=e,this._keyManager&&this._keyManager.withVerticalOrientation(e==="vertical")}constructor(e,t,r){this._dir=e,this._changeDetectorRef=t,this._elementRef=r,this._destroyed=new F,this.steps=new Q,this._sortedHeaders=new Q,this.linear=!1,this._selectedIndex=0,this.selectionChange=new z,this.selectedIndexChange=new z,this._orientation="horizontal",this._groupId=dt++}ngAfterContentInit(){this._steps.changes.pipe(E(this._steps),S(this._destroyed)).subscribe(e=>{this.steps.reset(e.filter(t=>t._stepper===this)),this.steps.notifyOnChanges()})}ngAfterViewInit(){this._stepHeader.changes.pipe(E(this._stepHeader),S(this._destroyed)).subscribe(e=>{this._sortedHeaders.reset(e.toArray().sort((t,r)=>t._elementRef.nativeElement.compareDocumentPosition(r._elementRef.nativeElement)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),this._sortedHeaders.notifyOnChanges()}),this._keyManager=new He(this._sortedHeaders).withWrap().withHomeAndEnd().withVerticalOrientation(this._orientation==="vertical"),(this._dir?this._dir.change:Ie()).pipe(E(this._layoutDirection()),S(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e)),this._keyManager.updateActiveItem(this._selectedIndex),this.steps.changes.subscribe(()=>{this.selected||(this._selectedIndex=Math.max(this._selectedIndex-1,0))}),this._isValidIndex(this._selectedIndex)||(this._selectedIndex=0)}ngOnDestroy(){this._keyManager?.destroy(),this.steps.destroy(),this._sortedHeaders.destroy(),this._destroyed.next(),this._destroyed.complete()}next(){this.selectedIndex=Math.min(this._selectedIndex+1,this.steps.length-1)}previous(){this.selectedIndex=Math.max(this._selectedIndex-1,0)}reset(){this._updateSelectedItemIndex(0),this.steps.forEach(e=>e.reset()),this._stateChanged()}_getStepLabelId(e){return`cdk-step-label-${this._groupId}-${e}`}_getStepContentId(e){return`cdk-step-content-${this._groupId}-${e}`}_stateChanged(){this._changeDetectorRef.markForCheck()}_getAnimationDirection(e){let t=e-this._selectedIndex;return t<0?this._layoutDirection()==="rtl"?"next":"previous":t>0?this._layoutDirection()==="rtl"?"previous":"next":"current"}_getIndicatorType(e,t=b.NUMBER){let r=this.steps.toArray()[e],o=this._isCurrentStep(e);return r._displayDefaultIndicatorType?this._getDefaultIndicatorLogic(r,o):this._getGuidelineLogic(r,o,t)}_getDefaultIndicatorLogic(e,t){return e._showError()&&e.hasError&&!t?b.ERROR:!e.completed||t?b.NUMBER:e.editable?b.EDIT:b.DONE}_getGuidelineLogic(e,t,r=b.NUMBER){return e._showError()&&e.hasError&&!t?b.ERROR:e.completed&&!t?b.DONE:e.completed&&t?r:e.editable&&t?b.EDIT:r}_isCurrentStep(e){return this._selectedIndex===e}_getFocusIndex(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex}_updateSelectedItemIndex(e){let t=this.steps.toArray();this.selectionChange.emit({selectedIndex:e,previouslySelectedIndex:this._selectedIndex,selectedStep:t[e],previouslySelectedStep:t[this._selectedIndex]}),this._containsFocus()?this._keyManager.setActiveItem(e):this._keyManager.updateActiveItem(e),this._selectedIndex=e,this.selectedIndexChange.emit(this._selectedIndex),this._stateChanged()}_onKeydown(e){let t=Le(e),r=e.keyCode,o=this._keyManager;o.activeItemIndex!=null&&!t&&(r===32||r===13)?(this.selectedIndex=o.activeItemIndex,e.preventDefault()):o.setFocusOrigin("keyboard").onKeydown(e)}_anyControlsInvalidOrPending(e){return this.linear&&e>=0?this.steps.toArray().slice(0,e).some(t=>{let r=t.stepControl;return(r?r.invalid||r.pending||!t.interacted:!t.completed)&&!t.optional&&!t._completedOverride}):!1}_layoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_containsFocus(){let e=this._elementRef.nativeElement,t=Ne();return e===t||e.contains(t)}_isValidIndex(e){return e>-1&&(!this.steps||e<this.steps.length)}};i.\u0275fac=function(t){return new(t||i)(l(ee,8),l(L),l(O))},i.\u0275dir=y({type:i,selectors:[["","cdkStepper",""]],contentQueries:function(t,r,o){if(t&1&&(v(o,te,5),v(o,ge,5)),t&2){let d;f(d=_())&&(r._steps=d),f(d=_())&&(r._stepHeader=d)}},inputs:{linear:["linear","linear",R],selectedIndex:["selectedIndex","selectedIndex",Pe],selected:"selected",orientation:"orientation"},outputs:{selectionChange:"selectionChange",selectedIndexChange:"selectedIndexChange"},exportAs:["cdkStepper"],features:[re]});let n=i;return n})();var Ye=(()=>{let i=class i{};i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=q({type:i}),i.\u0275inj=U({imports:[Ve]});let n=i;return n})();function ht(n,i){if(n&1&&D(0,2),n&2){let a=p();m("ngTemplateOutlet",a.iconOverrides[a.state])("ngTemplateOutletContext",a._getIconContext())}}function mt(n,i){if(n&1&&(c(0,"span",7),I(1),h()),n&2){let a=p(2);s(1),C(a._getDefaultTextForState(a.state))}}function ut(n,i){if(n&1&&(c(0,"span",9),I(1),h()),n&2){let a=p(3);s(1),C(a._intl.completedLabel)}}function ft(n,i){if(n&1&&(c(0,"span",9),I(1),h()),n&2){let a=p(3);s(1),C(a._intl.editableLabel)}}function _t(n,i){if(n&1&&(u(0,ut,2,1,"span",8)(1,ft,2,1),c(2,"mat-icon",7),I(3),h()),n&2){let a=p(2);g(0,a.state==="done"?0:a.state==="edit"?1:-1),s(3),C(a._getDefaultTextForState(a.state))}}function gt(n,i){if(n&1&&u(0,mt,2,1)(1,_t,4,2),n&2){let a=p(),e;g(0,(e=a.state)==="number"?0:1)}}function vt(n,i){n&1&&(c(0,"div",10),D(1,11),h()),n&2&&(s(1),m("ngTemplateOutlet",i.template))}function bt(n,i){if(n&1&&(c(0,"div",10),I(1),h()),n&2){let a=p();s(1),C(a.label)}}function yt(n,i){if(n&1&&(c(0,"div",12),I(1),h()),n&2){let a=p();s(1),C(a._intl.optionalLabel)}}function xt(n,i){if(n&1&&(c(0,"div",13),I(1),h()),n&2){let a=p();s(1),C(a.errorMessage)}}function It(n,i){}function Ct(n,i){if(n&1&&(J(0),u(1,It,0,0,"ng-template",0)),n&2){let a=p();s(1),m("cdkPortalOutlet",a._portal)}}var St=["*"];function Dt(n,i){n&1&&ae(0,"div",6)}var Xe=(n,i)=>({step:n,i});function Mt(n,i){if(n&1&&(D(0,4),u(1,Dt,1,0,"div",5)),n&2){let a=i.$implicit,e=i.$index,t=i.$count;p(2);let r=oe(3);m("ngTemplateOutlet",r)("ngTemplateOutletContext",V(3,Xe,a,e)),s(1),g(1,e!==t-1?1:-1)}}var et=n=>({animationDuration:n}),tt=(n,i)=>({value:n,params:i});function Tt(n,i){if(n&1){let a=Y();c(0,"div",7),j("@horizontalStepTransition.done",function(t){P(a);let r=p(2);return A(r._animationDone.next(t))}),D(1,8),h()}if(n&2){let a=i.$implicit,e=i.$index,t=p(2);x("mat-horizontal-stepper-content-inactive",t.selectedIndex!==e),m("@horizontalStepTransition",V(8,tt,t._getAnimationDirection(e),le(6,et,t._getAnimationDuration())))("id",t._getStepContentId(e)),H("aria-labelledby",t._getStepLabelId(e)),s(1),m("ngTemplateOutlet",a.content)}}function wt(n,i){if(n&1&&(c(0,"div",1)(1,"div",2),K(2,Mt,2,6,null,null,G),h(),c(4,"div",3),K(5,Tt,2,11,"div",9,G),h()()),n&2){let a=p();s(2),W(a.steps),s(3),W(a.steps)}}function Et(n,i){if(n&1){let a=Y();c(0,"div",10),D(1,4),c(2,"div",11)(3,"div",12),j("@verticalStepTransition.done",function(t){P(a);let r=p(2);return A(r._animationDone.next(t))}),c(4,"div",13),D(5,8),h()()()()}if(n&2){let a=i.$implicit,e=i.$index,t=i.$count,r=p(2),o=oe(3);s(1),m("ngTemplateOutlet",o)("ngTemplateOutletContext",V(10,Xe,a,e)),s(1),x("mat-stepper-vertical-line",e!==t-1),s(1),x("mat-vertical-stepper-content-inactive",r.selectedIndex!==e),m("@verticalStepTransition",V(15,tt,r._getAnimationDirection(e),le(13,et,r._getAnimationDuration())))("id",r._getStepContentId(e)),H("aria-labelledby",r._getStepLabelId(e)),s(2),m("ngTemplateOutlet",a.content)}}function kt(n,i){if(n&1&&K(0,Et,6,18,"div",14,G),n&2){let a=p();W(a.steps)}}function Ot(n,i){if(n&1){let a=Y();c(0,"mat-step-header",15),j("click",function(){let r=P(a).step;return A(r.select())})("keydown",function(t){P(a);let r=p();return A(r._onKeydown(t))}),h()}if(n&2){let a=i.step,e=i.i,t=p();x("mat-horizontal-stepper-header",t.orientation==="horizontal")("mat-vertical-stepper-header",t.orientation==="vertical"),m("tabIndex",t._getFocusIndex()===e?0:-1)("id",t._getStepLabelId(e))("index",e)("state",t._getIndicatorType(e,a.state))("label",a.stepLabel||a.label)("selected",t.selectedIndex===e)("active",t._stepIsNavigable(e,a))("optional",a.optional)("errorMessage",a.errorMessage)("iconOverrides",t._iconOverrides)("disableRipple",t.disableRipple||!t._stepIsNavigable(e,a))("color",a.color||t.color),H("aria-posinset",e+1)("aria-setsize",t.steps.length)("aria-controls",t._getStepContentId(e))("aria-selected",t.selectedIndex==e)("aria-label",a.ariaLabel||null)("aria-labelledby",!a.ariaLabel&&a.ariaLabelledby?a.ariaLabelledby:null)("aria-disabled",t._stepIsNavigable(e,a)?null:!0)}}var ye=(()=>{let i=class i extends ve{};i.\u0275fac=(()=>{let e;return function(r){return(e||(e=Ee(i)))(r||i)}})(),i.\u0275dir=y({type:i,selectors:[["","matStepLabel",""]],features:[N]});let n=i;return n})(),ne=(()=>{let i=class i{constructor(){this.changes=new F,this.optionalLabel="Optional",this.completedLabel="Completed",this.editableLabel="Editable"}};i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=Me({token:i,factory:i.\u0275fac,providedIn:"root"});let n=i;return n})();function zt(n){return n||new ne}var Rt={provide:ne,deps:[[new ke,new Oe,ne]],useFactory:zt},Ft=Ue(class extends ge{constructor(i){super(i)}},"primary"),Ze=(()=>{let i=class i extends Ft{constructor(e,t,r,o){super(r),this._intl=e,this._focusMonitor=t,this._intlSubscription=e.changes.subscribe(()=>o.markForCheck())}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._intlSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._elementRef)}focus(e,t){e?this._focusMonitor.focusVia(this._elementRef,e,t):this._elementRef.nativeElement.focus(t)}_stringLabel(){return this.label instanceof ye?null:this.label}_templateLabel(){return this.label instanceof ye?this.label:null}_getHostElement(){return this._elementRef.nativeElement}_getIconContext(){return{index:this.index,active:this.active,optional:this.optional}}_getDefaultTextForState(e){return e=="number"?`${this.index+1}`:e=="edit"?"create":e=="error"?"warning":e}};i.\u0275fac=function(t){return new(t||i)(l(ne),l(je),l(O),l(L))},i.\u0275cmp=k({type:i,selectors:[["mat-step-header"]],hostAttrs:["role","tab",1,"mat-step-header"],inputs:{color:"color",state:"state",label:"label",errorMessage:"errorMessage",iconOverrides:"iconOverrides",index:"index",selected:"selected",active:"active",optional:"optional",disableRipple:"disableRipple"},features:[N],decls:10,vars:17,consts:[["matRipple","",1,"mat-step-header-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-step-icon-content"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"mat-step-label"],["class","mat-step-text-label"],["class","mat-step-optional"],["class","mat-step-sub-label-error"],["aria-hidden","true"],["class","cdk-visually-hidden"],[1,"cdk-visually-hidden"],[1,"mat-step-text-label"],[3,"ngTemplateOutlet"],[1,"mat-step-optional"],[1,"mat-step-sub-label-error"]],template:function(t,r){if(t&1&&(ae(0,"div",0),c(1,"div")(2,"div",1),u(3,ht,1,2,"ng-container",2)(4,gt,2,1),h()(),c(5,"div",3),u(6,vt,2,1,"div",4)(7,bt,2,1)(8,yt,2,1,"div",5)(9,xt,2,1,"div",6),h()),t&2){let o;m("matRippleTrigger",r._getHostElement())("matRippleDisabled",r.disableRipple),s(1),ze("mat-step-icon-state-",r.state," mat-step-icon"),x("mat-step-icon-selected",r.selected),s(2),g(3,r.iconOverrides&&r.iconOverrides[r.state]?3:4),s(2),x("mat-step-label-active",r.active)("mat-step-label-selected",r.selected)("mat-step-label-error",r.state=="error"),s(1),g(6,(o=r._templateLabel())?6:r._stringLabel()?7:-1,o),s(2),g(8,r.optional&&r.state!="error"?8:-1),s(1),g(9,r.state==="error"?9:-1)}},dependencies:[pe,Ke,qe],styles:['.mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-step-header:focus .mat-focus-indicator::before{content:""}.mat-step-header:hover[aria-disabled=true]{cursor:default}.mat-step-header:hover:not([aria-disabled]),.mat-step-header:hover[aria-disabled=false]{background-color:var(--mat-stepper-header-hover-state-layer-color)}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused{background-color:var(--mat-stepper-header-focus-state-layer-color)}@media(hover: none){.mat-step-header:hover{background:none}}.cdk-high-contrast-active .mat-step-header{outline:solid 1px}.cdk-high-contrast-active .mat-step-header[aria-selected=true] .mat-step-label{text-decoration:underline}.cdk-high-contrast-active .mat-step-header[aria-disabled=true]{outline-color:GrayText}.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-label,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-icon,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-optional{color:GrayText}.mat-step-optional{font-size:12px;color:var(--mat-stepper-header-optional-label-text-color)}.mat-step-sub-label-error{font-size:12px;font-weight:normal}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative;color:var(--mat-stepper-header-icon-foreground-color);background-color:var(--mat-stepper-header-icon-background-color)}.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error{background-color:var(--mat-stepper-header-error-state-icon-background-color);color:var(--mat-stepper-header-error-state-icon-foreground-color)}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle;font-family:var(--mat-stepper-header-label-text-font);font-size:var(--mat-stepper-header-label-text-size);font-weight:var(--mat-stepper-header-label-text-weight);color:var(--mat-stepper-header-label-text-color)}.mat-step-label.mat-step-label-active{color:var(--mat-stepper-header-selected-state-label-text-color)}.mat-step-label.mat-step-label-error{color:var(--mat-stepper-header-error-state-label-text-color);font-size:var(--mat-stepper-header-error-state-label-text-size)}.mat-step-label.mat-step-label-selected{font-size:var(--mat-stepper-header-selected-state-label-text-size);font-weight:var(--mat-stepper-header-selected-state-label-text-weight)}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-step-icon-selected{background-color:var(--mat-stepper-header-selected-state-icon-background-color);color:var(--mat-stepper-header-selected-state-icon-foreground-color)}.mat-step-icon-state-done{background-color:var(--mat-stepper-header-done-state-icon-background-color);color:var(--mat-stepper-header-done-state-icon-foreground-color)}.mat-step-icon-state-edit{background-color:var(--mat-stepper-header-edit-state-icon-background-color);color:var(--mat-stepper-header-edit-state-icon-foreground-color)}'],encapsulation:2,changeDetection:0});let n=i;return n})(),it="500ms",nt="225ms",Je={horizontalStepTransition:ce("horizontalStepTransition",[w("previous",T({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"})),w("current",T({transform:"none",visibility:"inherit"})),w("next",T({transform:"translate3d(100%, 0, 0)",visibility:"hidden"})),me("* => *",he([de("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)"),fe("@*",ue(),{optional:!0})]),{params:{animationDuration:it}})]),verticalStepTransition:ce("verticalStepTransition",[w("previous",T({height:"0px",visibility:"hidden"})),w("next",T({height:"0px",visibility:"hidden"})),w("current",T({height:"*",visibility:"inherit"})),me("* <=> current",he([de("{{animationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)"),fe("@*",ue(),{optional:!0})]),{params:{animationDuration:nt}})])},Pt=(()=>{let i=class i{constructor(e){this.templateRef=e}};i.\u0275fac=function(t){return new(t||i)(l(M))},i.\u0275dir=y({type:i,selectors:[["ng-template","matStepperIcon",""]],inputs:{name:["matStepperIcon","name"]}});let n=i;return n})(),At=(()=>{let i=class i{constructor(e){this._template=e}};i.\u0275fac=function(t){return new(t||i)(l(M))},i.\u0275dir=y({type:i,selectors:[["ng-template","matStepContent",""]]});let n=i;return n})(),Lt=(()=>{let i=class i extends te{constructor(e,t,r,o){super(e,o),this._errorStateMatcher=t,this._viewContainerRef=r,this._isSelected=xe.EMPTY,this.stepLabel=void 0}ngAfterContentInit(){this._isSelected=this._stepper.steps.changes.pipe(De(()=>this._stepper.selectionChange.pipe(Ce(e=>e.selectedStep===this),E(this._stepper.selected===this)))).subscribe(e=>{e&&this._lazyContent&&!this._portal&&(this._portal=new Qe(this._lazyContent._template,this._viewContainerRef))})}ngOnDestroy(){this._isSelected.unsubscribe()}isErrorState(e,t){let r=this._errorStateMatcher.isErrorState(e,t),o=!!(e&&e.invalid&&this.interacted);return r||o}};i.\u0275fac=function(t){return new(t||i)(l($(()=>Nt)),l(B,4),l(Re),l(be,8))},i.\u0275cmp=k({type:i,selectors:[["mat-step"]],contentQueries:function(t,r,o){if(t&1&&(v(o,ye,5),v(o,At,5)),t&2){let d;f(d=_())&&(r.stepLabel=d.first),f(d=_())&&(r._lazyContent=d.first)}},inputs:{color:"color"},exportAs:["matStep"],features:[se([{provide:B,useExisting:i},{provide:te,useExisting:i}]),N],ngContentSelectors:St,decls:1,vars:0,consts:[[3,"cdkPortalOutlet"]],template:function(t,r){t&1&&(Z(),u(0,Ct,2,1,"ng-template"))},dependencies:[Be],encapsulation:2,changeDetection:0});let n=i;return n})(),Nt=(()=>{let i=class i extends ie{get animationDuration(){return this._animationDuration}set animationDuration(e){this._animationDuration=/^\d+$/.test(e)?e+"ms":e}constructor(e,t,r){super(e,t,r),this._stepHeader=void 0,this._steps=void 0,this.steps=new Q,this.animationDone=new z,this.labelPosition="end",this.headerPosition="top",this._iconOverrides={},this._animationDone=new F,this._animationDuration="";let o=r.nativeElement.nodeName.toLowerCase();this.orientation=o==="mat-vertical-stepper"?"vertical":"horizontal"}ngAfterContentInit(){super.ngAfterContentInit(),this._icons.forEach(({name:e,templateRef:t})=>this._iconOverrides[e]=t),this.steps.changes.pipe(S(this._destroyed)).subscribe(()=>{this._stateChanged()}),this._animationDone.pipe(Se((e,t)=>e.fromState===t.fromState&&e.toState===t.toState),S(this._destroyed)).subscribe(e=>{e.toState==="current"&&this.animationDone.emit()})}_stepIsNavigable(e,t){return t.completed||this.selectedIndex===e||!this.linear}_getAnimationDuration(){return this.animationDuration?this.animationDuration:this.orientation==="horizontal"?it:nt}};i.\u0275fac=function(t){return new(t||i)(l(ee,8),l(L),l(O))},i.\u0275cmp=k({type:i,selectors:[["mat-stepper"],["mat-vertical-stepper"],["mat-horizontal-stepper"],["","matStepper",""]],contentQueries:function(t,r,o){if(t&1&&(v(o,Lt,5),v(o,Pt,5)),t&2){let d;f(d=_())&&(r._steps=d),f(d=_())&&(r._icons=d)}},viewQuery:function(t,r){if(t&1&&X(Ze,5),t&2){let o;f(o=_())&&(r._stepHeader=o)}},hostAttrs:["role","tablist","ngSkipHydration",""],hostVars:11,hostBindings:function(t,r){t&2&&(H("aria-orientation",r.orientation),x("mat-stepper-horizontal",r.orientation==="horizontal")("mat-stepper-vertical",r.orientation==="vertical")("mat-stepper-label-position-end",r.orientation==="horizontal"&&r.labelPosition=="end")("mat-stepper-label-position-bottom",r.orientation==="horizontal"&&r.labelPosition=="bottom")("mat-stepper-header-position-bottom",r.headerPosition==="bottom"))},inputs:{selectedIndex:"selectedIndex",disableRipple:"disableRipple",color:"color",labelPosition:"labelPosition",headerPosition:"headerPosition",animationDuration:"animationDuration"},outputs:{animationDone:"animationDone"},exportAs:["matStepper","matVerticalStepper","matHorizontalStepper"],features:[se([{provide:ie,useExisting:i}]),N],decls:4,vars:1,consts:[["stepTemplate",""],[1,"mat-horizontal-stepper-wrapper"],[1,"mat-horizontal-stepper-header-container"],[1,"mat-horizontal-content-container"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","mat-stepper-horizontal-line"],[1,"mat-stepper-horizontal-line"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id"],[3,"ngTemplateOutlet"],["class","mat-horizontal-stepper-content","role","tabpanel",3,"id","mat-horizontal-stepper-content-inactive"],[1,"mat-step"],[1,"mat-vertical-content-container"],["role","tabpanel",1,"mat-vertical-stepper-content",3,"id"],[1,"mat-vertical-content"],["class","mat-step"],[3,"tabIndex","id","index","state","label","selected","active","optional","errorMessage","iconOverrides","disableRipple","color","click","keydown"]],template:function(t,r){if(t&1&&u(0,wt,7,0)(1,kt,2,0)(2,Ot,1,23,"ng-template",null,0,Fe),t&2){let o;g(0,(o=r.orientation)==="horizontal"?0:o==="vertical"?1:-1)}},dependencies:[pe,Ze],styles:['.mat-stepper-vertical,.mat-stepper-horizontal{display:block;font-family:var(--mat-stepper-container-text-font);background:var(--mat-stepper-container-color)}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-header-position-bottom .mat-horizontal-stepper-header-container{order:1}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px;border-top-color:var(--mat-stepper-line-color)}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative;top:calc(calc((var(--mat-stepper-header-height) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{border-top-width:1px;border-top-style:solid;content:"";display:inline-block;height:0;position:absolute;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px;height:var(--mat-stepper-header-height)}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-horizontal-stepper-header::before,.mat-horizontal-stepper-header::after{border-top-color:var(--mat-stepper-line-color)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{padding:calc((var(--mat-stepper-header-height) - 24px) / 2) 24px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::after{top:calc(calc((var(--mat-stepper-header-height) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;height:24px;padding:calc((var(--mat-stepper-header-height) - 24px) / 2) 24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-wrapper{display:flex;flex-direction:column}.mat-horizontal-stepper-content{outline:0}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-inactive{height:0;overflow:hidden}.mat-horizontal-stepper-content:not(.mat-horizontal-stepper-content-inactive){visibility:inherit !important}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.cdk-high-contrast-active .mat-horizontal-content-container{outline:solid 1px}.mat-stepper-header-position-bottom .mat-horizontal-content-container{padding:24px 24px 0 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}.cdk-high-contrast-active .mat-vertical-content-container{outline:solid 1px}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:"";position:absolute;left:0;border-left-width:1px;border-left-style:solid;border-left-color:var(--mat-stepper-line-color);top:calc(8px - calc((var(--mat-stepper-header-height) - 24px) / 2));bottom:calc(8px - calc((var(--mat-stepper-header-height) - 24px) / 2))}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0}.mat-vertical-stepper-content:not(.mat-vertical-stepper-content-inactive){visibility:inherit !important}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}'],encapsulation:2,data:{animation:[Je.horizontalStepTransition,Je.verticalStepTransition]},changeDetection:0});let n=i;return n})();var Fi=(()=>{let i=class i{};i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=q({type:i}),i.\u0275inj=U({providers:[Rt,B],imports:[_e,Ae,$e,Ye,We,Ge,_e]});let n=i;return n})();export{be as a,ye as b,Pt as c,Lt as d,Nt as e,Fi as f};
|