marketplacepos 2.9.2 → 2.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/213.d00d0a3f05c831f7.js +1 -0
- package/Marketplace/{369.be88af4326c1a287.js → 369.a12060880985ee8f.js} +1 -1
- package/Marketplace/378.7f743ac9660ec6e6.js +1 -0
- package/Marketplace/379.aad8784dbdb3dd33.js +1 -0
- package/Marketplace/395.2943aa5a44308399.js +1 -0
- package/Marketplace/397.8ba047b91801962d.js +1 -0
- package/Marketplace/53.3655b31ecb37ade9.js +1 -0
- package/Marketplace/655.ae475c8285604367.js +1 -0
- package/Marketplace/{767.aef1dd980b626ef7.js → 767.d939ac65d1cb16fb.js} +1 -1
- package/Marketplace/common.af67cc08f47a8d44.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/main.6966bb7fcafbe0e4.js +1 -0
- package/Marketplace/runtime.5db60124bb5bf7cb.js +1 -0
- package/package.json +1 -1
- package/Marketplace/213.cb4351cfb44ca3bf.js +0 -1
- package/Marketplace/379.611029ed9b632dca.js +0 -1
- package/Marketplace/397.482996341e2502bf.js +0 -1
- package/Marketplace/408.c94b4441303091c4.js +0 -1
- package/Marketplace/53.8cb269bb04087434.js +0 -1
- package/Marketplace/655.c3fe092dbd4ce86c.js +0 -1
- package/Marketplace/72.d59410fd71caf119.js +0 -1
- package/Marketplace/common.7ce512ca9d1674b7.js +0 -1
- package/Marketplace/main.daad5e6622008ab4.js +0 -1
- package/Marketplace/runtime.67fa2c46977dc458.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[72],{5072:(wn,T,r)=>{r.r(T),r.d(T,{InventoryModule:()=>m});var p=r(6895),n=r(4650),y=r(284),Z=r(2937);class d{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}}d.\u0275fac=function(e){return new(e||d)},d.\u0275cmp=n.Xpm({type:d,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(e,t){1&e&&(n.TgZ(0,"nav",0)(1,"div",1)(2,"div"),n._UZ(3,"nav-tab",2),n.qZA()()(),n._UZ(4,"router-outlet")),2&e&&(n.xp6(3),n.Q6J("Tabs",t.inventoryTabs))},dependencies:[y.lC,Z.e]});var w=r(8231),L=r(6304),F=r(8505),v=r(9300),h=r(1889),C=r(8705),A=r(1318),S=r(7185),M=r(5412),N=r(9425),D=r(6082),I=r(7481),P=r(6114);function Q(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"button",17),n.NdJ("click",function(){n.CHM(t);const o=n.oxw(3);return n.KtG(o.openScanDialog())}),n._UZ(1,"i",18),n._uU(2," Scan Channel "),n.qZA()}}function E(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"button",19),n.NdJ("click",function(){n.CHM(t);const o=n.oxw().ngIf,l=n.oxw(2);return n.KtG(l.onUpdateItems(o))}),n._UZ(1,"i",20),n._uU(2," Update "),n.qZA()}}function O(a,e){if(1&a&&(n.TgZ(0,"actions")(1,"div",14)(2,"div"),n.YNc(3,Q,3,0,"button",15),n.YNc(4,E,3,0,"button",16),n.qZA()()()),2&a){const t=e.ngIf,i=n.oxw(2);n.xp6(3),n.Q6J("ngIf",!i.productService.hasSelectionVariant(t)),n.xp6(1),n.Q6J("ngIf",i.productService.hasSelectionVariant(t))}}function Y(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"app-table",21),n.NdJ("onToggle",function(o){n.CHM(t);const l=n.oxw(2);return n.KtG(l.onShowDifferenceStock(o))})("onSubmit",function(o){const s=n.CHM(t).ngIf,c=n.oxw(2);return n.KtG(c.updateStockByVariant(o,s))}),n.qZA()}if(2&a){const t=e.ngIf,i=n.oxw(2);n.Q6J("data",t)("channel",i.channelOptions)("showProductToggle",!0)("filter",i.searchFilter)}}function $(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"span",22),n.NdJ("click",function(){n.CHM(t);const o=n.oxw(2);return n.KtG(o.getRowCount())}),n.TgZ(1,"i",23),n._uU(2,"?"),n.qZA()()}}function q(a,e){if(1&a&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"number"),n.qZA()),2&a){const t=e.ngIf;n.xp6(1),n.Oqu(n.lcZ(2,1,t))}}function H(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"a",24),n.NdJ("click",function(){n.CHM(t);const o=n.oxw(2);return n.KtG(o.nextPage())}),n._UZ(1,"i",25),n._uU(2," Next"),n.qZA()}}function V(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"a",26),n.NdJ("click",function(){n.CHM(t);const o=n.oxw(2);return n.KtG(o.getAllData())}),n._UZ(1,"i",27),n._uU(2," Last"),n.qZA()}}function R(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"mainpanel",1),n.NdJ("onSubmit",function(o){n.CHM(t);const l=n.oxw();return n.KtG(l.onSearch(o))}),n.YNc(1,O,5,2,"actions",2),n.ALo(2,"async"),n.TgZ(3,"content")(4,"div",3)(5,"div",4)(6,"div",5),n.YNc(7,Y,1,4,"app-table",6),n.ALo(8,"async"),n.ynx(9),n.TgZ(10,"div",7)(11,"div",8)(12,"div",9),n._uU(13),n.ALo(14,"number"),n.ALo(15,"async"),n.YNc(16,$,3,0,"span",10),n.YNc(17,q,3,3,"span",2),n.ALo(18,"async"),n._uU(19),n.qZA()(),n.TgZ(20,"div",11),n.YNc(21,H,3,0,"a",12),n.YNc(22,V,3,0,"a",13),n.qZA()(),n.BQk(),n.qZA()()()()()}if(2&a){const t=n.oxw();let i;n.Q6J("pageData",t.pageData)("hideSearchBox",!1)("hideSearchDropdown",!0)("textButton","Search"),n.xp6(1),n.Q6J("ngIf",n.lcZ(2,12,t.paginationService.data$)),n.xp6(6),n.Q6J("ngIf",n.lcZ(8,14,t.paginationService.data$)),n.xp6(6),n.hij(" Showing 1 - ",n.lcZ(14,16,null==(i=n.lcZ(15,18,t.paginationService.data$))?null:i.length)," of "),n.xp6(3),n.Q6J("ngIf",t.paginationService.hideCount),n.xp6(1),n.Q6J("ngIf",n.lcZ(18,20,!t.paginationService.hideCount&&t.allDataCount$)),n.xp6(2),n.hij(" records ~ ",t.paginationService.footerPageNumber," Page "),n.xp6(2),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),n.xp6(1),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}class f{constructor(e,t,i,o,l){this.http=e,this.toastr=t,this.dialog=i,this.paginationService=o,this.productService=l,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((0,F.b)(e=>{this.channelOptions=e.Options.Channel,e.Filter={PageNumber:e.Filter.PageNumber,filterModel:C.v.ALL,RowCount:e.Filter.PageSize,HiddenIPOSInventory:e.Filter.HiddenIPOSInventory},this.searchFilter=e.Filter,this.paginationService.resetToFirstPage(this.searchFilter)}))}onSearch(e){this.searchFilter.text=e,this.paginationService.resetToFirstPage(this.searchFilter)}updateStock(e,t){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let l=i.map(c=>({ID:c.ID,Code:c.Code,Inventory:c.Inventory})),s={ListChannelID:t.filter(c=>c.selected).map(c=>c.ID),List:l};this.http.post("/api/Inventory/UpdateChannel",s).subscribe(c=>{this.paginationService.resetToFirstPage(this.searchFilter),this.toastr.success("Successfully updated "+s.List.length+" variants in "+s.ListChannelID.length+" channels","Success")})}}openScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(w.j,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,v.h)(i=>h.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.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.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader()}this.searchFilter.ChannelID=h.g.GuidEMpty})}updateStockByVariant(e,t){let i={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(o=>{let l=this.productService.findChannelById(i.ID,this.channelOptions);this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") inventory in "+l.Name+" to "+i.NewQuantity,"Success")})}onShowDifferenceStock(e){this.searchFilter.filterModel=e?C.v.DIFFERENCE:C.v.ALL,this.paginationService.resetToFirstPage(this.searchFilter)}onUpdateItems(e){const t=this.productService.selectedVariantProduct(e);this.dialog.open(L.j,{data:{selectedItems:t,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"600px"}).afterClosed().pipe((0,v.h)(i=>h.g.IsNotEmpty(i))).subscribe(i=>{this.updateStock(e,i)})}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,{text:this.searchFilter.text})}nextPage(){this.paginationService.onNextPage(this.searchFilter)}getAllData(){this.http.post(`/API/${this.allDataCountEndpoint}`,{}).subscribe({next:e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e)}})}ngOnDestroy(){this.paginationService.destroy()}}f.\u0275fac=function(e){return new(e||f)(n.Y36(A.O),n.Y36(S._W),n.Y36(M.uw),n.Y36(N.b),n.Y36(D.M))},f.\u0275cmp=n.Xpm({type:f,selectors:[["app-multi-channel-comparison"]],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit"],[4,"ngIf"],[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"],[1,"d-flex"],["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(e,t){1&e&&(n.YNc(0,R,23,22,"mainpanel",0),n.ALo(1,"async")),2&e&&n.Q6J("ngIf",n.lcZ(1,1,t.loader$))},dependencies:[p.O5,I.p,P.a,p.Ov,p.JJ],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});var G=r(7945),K=r(1739);class _{constructor(e){this.toastrService=e}showToastrUpdateInventory(e,t){const i=e.length>0,o=t.length>0;if(!o&&i&&this.toastrService.success(`${this.generateSuccessMessage(e.length)}`,"Success",{enableHtml:!0}),o&&i){const l=`<li>${this.generateSuccessMessage(e.length)}</li>`,s=this.generateErrorMessage(t);this.toastrService.warning(`<ol>${l} ${s}</ol>`,"Warning",{enableHtml:!0})}if(o&&!i){const l=`<ol>${this.generateErrorMessage(t)}</ol>`;this.toastrService.error(l,"Error",{enableHtml:!0})}}generateSuccessMessage(e){return`<span class="fw-bold">Successfully</span> updated ${e} variants in 1 channels`}generateErrorMessage(e=[]){let t="";return e.forEach((i,o)=>{t+=`<li><span class="fw-bold">Error</span> Updating stock for [${i.Name}] - <b>${i.Message}</b></li>`}),t}}_.\u0275fac=function(e){return new(e||_)(n.LFG(S._W))},_.\u0275prov=n.Yz7({token:_,factory:_.\u0275fac});var u=r(4006),b=r(8796),U=r(455),J=r(266);function B(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"button",33),n.NdJ("click",function(){n.CHM(t);const o=n.oxw(2).ngIf,l=n.oxw();return n.KtG(l.openScanDialog(o))}),n._UZ(1,"i",34),n._uU(2," Scan Channel "),n.qZA()}}function j(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"button",35),n.NdJ("click",function(){n.CHM(t);const o=n.oxw().ngIf,l=n.oxw(2);return n.KtG(l.updateStock(o))}),n._UZ(1,"i",36),n._uU(2," Update"),n.qZA()}}function z(a,e){if(1&a&&(n.TgZ(0,"div"),n.YNc(1,B,3,0,"button",31),n.YNc(2,j,3,0,"button",32),n.qZA()),2&a){const t=e.ngIf,i=n.oxw(2);n.xp6(1),n.Q6J("ngIf",!i.productService.hasSelectionVariant(t)),n.xp6(1),n.Q6J("ngIf",i.productService.hasSelectionVariant(t))}}function W(a,e){1&a&&(n.TgZ(0,"div",37)(1,"span"),n._uU(2," showing only different stock, please press next to populate more data "),n.qZA()())}function X(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"th")(1,"input",38),n.NdJ("ngModelChange",function(o){n.CHM(t);const l=n.oxw(2);return n.KtG(l.checkboxState=o)})("ngModelChange",function(){const l=n.CHM(t).ngIf,s=n.oxw(2);return n.KtG(s.onCheckboxStateChange(l))}),n.qZA()()}if(2&a){const t=n.oxw(2);n.xp6(1),n.Q6J("ngModel",t.checkboxState)}}function nn(a,e){if(1&a&&(n.TgZ(0,"ng-option",39),n._UZ(1,"img",40),n._uU(2),n.qZA()),2&a){const t=e.$implicit;n.Q6J("value",t.ID),n.xp6(1),n.s9C("src",t.Img,n.LSH),n.xp6(1),n.hij("",t.Name," ")}}function tn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"input",64),n.NdJ("ngModelChange",function(o){n.CHM(t);const l=n.oxw(3).$implicit;return n.KtG(l.selected=o)})("ngModelChange",function(){n.CHM(t);const o=n.oxw(3).$implicit,l=n.oxw(2);return n.KtG(l.onCheckboxStateProduct(o))}),n.qZA()}if(2&a){const t=n.oxw(3).$implicit;n.Q6J("ngModel",t.selected)}}function en(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"img",65),n.NdJ("click",function(o){n.CHM(t);const l=n.oxw(3).$implicit,s=n.oxw(2);return n.KtG(s.onZoomImage(o,null==l?null:l.ImageUrl))}),n.qZA()}if(2&a){const t=n.oxw(3).$implicit;n.s9C("src",null==t?null:t.ThumbnailUrl,n.LSH)}}function an(a,e){1&a&&n._UZ(0,"img",66)}function on(a,e){if(1&a&&(n.ynx(0),n.TgZ(1,"td",55)(2,"div",56),n.YNc(3,tn,1,1,"input",57),n.YNc(4,en,1,1,"img",58),n.YNc(5,an,1,0,"ng-template",null,59,n.W1O),n.qZA()(),n.TgZ(7,"td",60)(8,"span",61),n._uU(9),n.qZA(),n._UZ(10,"br"),n.TgZ(11,"div",62),n._UZ(12,"i",63),n.TgZ(13,"small"),n._uU(14),n.qZA()()(),n.BQk()),2&a){const t=n.MAs(6),i=n.oxw().$implicit,o=n.oxw().$implicit;n.xp6(1),n.Q6J("rowSpan",null==o?null:o.Variants.length),n.xp6(2),n.Q6J("ngIf",(null==i?null:i.Inventory)>=0||o.Variants.length>1),n.xp6(1),n.Q6J("ngIf",null==o?null:o.ThumbnailUrl)("ngIfElse",t),n.xp6(3),n.Q6J("rowSpan",null==o?null:o.Variants.length),n.xp6(2),n.Oqu(null==o?null:o.Name),n.xp6(5),n.hij("(",null==o?null:o.Category,")")}}function ln(a,e){if(1&a){const t=n.EpF();n.ynx(0),n.TgZ(1,"input",38),n.NdJ("ngModelChange",function(o){n.CHM(t);const l=n.oxw(2).$implicit;return n.KtG(l.selected=o)}),n.qZA(),n.BQk()}if(2&a){const t=n.oxw(2).$implicit;n.xp6(1),n.Q6J("ngModel",t.selected)}}function rn(a,e){if(1&a&&(n.ynx(0),n.YNc(1,ln,2,1,"ng-container",3),n.BQk()),2&a){const t=n.oxw().$implicit;n.xp6(1),n.Q6J("ngIf",(null==t?null:t.Inventory)<=1e5)}}function sn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"input",38),n.NdJ("ngModelChange",function(o){n.CHM(t);const l=n.oxw(2).$implicit;return n.KtG(l.selected=o)}),n.qZA()}if(2&a){const t=n.oxw(2).$implicit;n.Q6J("ngModel",t.selected)}}function cn(a,e){if(1&a&&n.YNc(0,sn,1,1,"input",67),2&a){const t=n.oxw().$implicit;n.Q6J("ngIf",(null==t?null:t.Inventory)>=0)}}function pn(a,e){if(1&a&&(n.TgZ(0,"span")(1,"span",68),n._uU(2),n.ALo(3,"number"),n.qZA(),n._uU(4," => "),n.TgZ(5,"span",69),n._uU(6),n.ALo(7,"number"),n.qZA()()),2&a){const t=n.oxw().$implicit;n.xp6(2),n.hij(" ",n.lcZ(3,2,null==t||null==t.I?null:t.I.Available),""),n.xp6(4),n.Oqu(n.lcZ(7,4,null==t?null:t.Inventory))}}function hn(a,e){if(1&a&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"number"),n.qZA()),2&a){const t=n.oxw().$implicit;n.xp6(1),n.hij(" ",n.lcZ(2,1,null==t?null:t.Inventory)," ")}}function _n(a,e){if(1&a&&(n.ynx(0),n.TgZ(1,"span",72),n._uU(2),n.ALo(3,"number"),n.qZA(),n.BQk()),2&a){const t=n.oxw(2).$implicit;n.xp6(2),n.hij(" (",n.lcZ(3,1,null==t||null==t.Channel[0]?null:t.Channel[0].InventoryReserved),") ")}}const un=function(a){return{"bg-gradient-warning":a}};function gn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"td",70),n.YNc(1,_n,4,3,"ng-container",3),n.TgZ(2,"span",71),n.NdJ("click",function(){n.CHM(t);const o=n.oxw().$implicit,l=n.oxw(),s=l.$implicit,c=l.ngForOf,Zn=n.oxw(2);return n.KtG(Zn.openTableDialog(s,o,c))}),n._uU(3),n.ALo(4,"number"),n.qZA()()}if(2&a){const t=n.oxw().$implicit;n.Q6J("ngClass",n.VKq(5,un,(null==t?null:t.Inventory)!=(null==t||null==t.Channel[0]?null:t.Channel[0].Inventory))),n.xp6(1),n.Q6J("ngIf",null==t||null==t.Channel[0]?null:t.Channel[0].InventoryReserved),n.xp6(2),n.hij(" ",n.lcZ(4,3,null==t||null==t.Channel[0]?null:t.Channel[0].Inventory)," ")}}function mn(a,e){1&a&&(n.ynx(0),n._uU(1," - "),n.BQk())}function dn(a,e){if(1&a&&(n.TgZ(0,"span",73),n.ALo(1,"date"),n._uU(2),n.ALo(3,"date"),n.qZA()),2&a){const t=n.oxw().$implicit;n.Q6J("matTooltip",n.xi3(1,2,null==t||null==t.Channel[0]?null:t.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),n.xp6(2),n.hij(" ",n.xi3(3,5,null==t||null==t.Channel[0]?null:t.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function Cn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"tr"),n.YNc(1,on,15,7,"ng-container",3),n.TgZ(2,"td",41),n._uU(3),n.qZA(),n.TgZ(4,"td",42)(5,"div",43)(6,"span"),n._uU(7),n.qZA(),n.TgZ(8,"span",44)(9,"a",45),n._UZ(10,"i",46),n.qZA()()()(),n.TgZ(11,"td",47),n.YNc(12,rn,2,1,"ng-container",48),n.YNc(13,cn,1,1,"ng-template",null,49,n.W1O),n.qZA(),n.TgZ(15,"td",42),n.YNc(16,pn,8,6,"span",3),n.YNc(17,hn,3,3,"span",3),n.qZA(),n.YNc(18,gn,5,7,"td",50),n.TgZ(19,"td",23),n.YNc(20,mn,2,0,"ng-container",48),n.YNc(21,dn,4,8,"ng-template",null,51,n.W1O),n.qZA(),n.TgZ(23,"td")(24,"div",10)(25,"div",52)(26,"a",45),n._UZ(27,"i",46),n.qZA(),n._uU(28," \xa0\xa0 "),n.TgZ(29,"span",53),n.NdJ("click",function(){const l=n.CHM(t).$implicit,s=n.oxw(3);return n.KtG(s.refreshInventory(null==l||null==l.Channel[0]?null:l.Channel[0].ChannelItemID,null==l||null==l.Channel[0]?null:l.Channel[0].ChannelVariationID,null==l||null==l.Channel[0]?null:l.Channel[0].ChannelID,null==l?null:l.ID))}),n._UZ(30,"i",54),n.qZA()()()()()}if(2&a){const t=e.$implicit,i=e.index,o=n.MAs(14),l=n.MAs(22),s=n.oxw(3);n.xp6(1),n.Q6J("ngIf",0==i),n.xp6(2),n.Oqu(null==t?null:t.Model),n.xp6(4),n.Oqu(null==t?null:t.Code),n.xp6(2),n.Q6J("href","https://"+s.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==t?null:t.ID),n.LSH),n.xp6(3),n.Q6J("ngIf",1==(null==t?null:t.Channel[0].TypeID))("ngIfElse",o),n.xp6(4),n.Q6J("ngIf",(null==t?null:t.Inventory)!=(null==t||null==t.I?null:t.I.Available)),n.xp6(1),n.Q6J("ngIf",(null==t?null:t.Inventory)==(null==t||null==t.I?null:t.I.Available)),n.xp6(1),n.Q6J("ngIf",null==t?null:t.Channel),n.xp6(2),n.Q6J("ngIf",(null==t||null==t.Channel[0]?null:t.Channel[0].LastInventorySync)==s.minDate)("ngIfElse",l),n.xp6(6),n.Q6J("href",null==t||null==t.Channel[0]?null:t.Channel[0].Url,n.LSH)}}function fn(a,e){if(1&a&&(n.TgZ(0,"tbody"),n.YNc(1,Cn,31,12,"tr",25),n.qZA()),2&a){const t=e.$implicit;n.xp6(1),n.Q6J("ngForOf",t.Variants)}}function xn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"span",74),n.NdJ("click",function(){n.CHM(t);const o=n.oxw(2);return n.KtG(o.getRowCount())}),n.TgZ(1,"i",75),n._uU(2,"?"),n.qZA()()}}function vn(a,e){if(1&a&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"number"),n.qZA()),2&a){const t=e.ngIf;n.xp6(1),n.Oqu(n.lcZ(2,1,null==t?null:t.Total))}}function yn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"a",79),n.NdJ("click",function(){n.CHM(t);const o=n.oxw(3);return n.KtG(o.onNextPage())}),n._UZ(1,"i",80),n._uU(2," Next"),n.qZA()}}function Sn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"a",81),n.NdJ("click",function(){n.CHM(t);const o=n.oxw(3);return n.KtG(o.onLastPage())}),n._UZ(1,"i",82),n._uU(2," Last"),n.qZA()}}function In(a,e){if(1&a&&(n.TgZ(0,"div",76),n.YNc(1,yn,3,0,"a",77),n.YNc(2,Sn,3,0,"a",78),n.qZA()),2&a){const t=n.oxw(2);n.xp6(1),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),n.xp6(1),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function bn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"mainpanel",1),n.NdJ("onSubmit",function(o){n.CHM(t);const l=n.oxw();return n.KtG(l.onSearch(o))}),n.TgZ(1,"actions")(2,"div",2),n.YNc(3,z,3,2,"div",3),n.ALo(4,"async"),n.qZA()(),n.TgZ(5,"filters")(6,"div",2)(7,"div",4)(8,"div")(9,"label",5),n._uU(10,"PageNumber"),n.qZA(),n.TgZ(11,"input",6),n.NdJ("ngModelChange",function(o){n.CHM(t);const l=n.oxw();return n.KtG(l.searchFilter.PageNumber=o)}),n.qZA()(),n.TgZ(12,"div")(13,"label",7),n._uU(14,"Page Size"),n.qZA(),n.TgZ(15,"input",8),n.NdJ("ngModelChange",function(o){n.CHM(t);const l=n.oxw();return n.KtG(l.searchFilter.RowCount=o)}),n.qZA()()()()(),n.TgZ(16,"content")(17,"div",9)(18,"div",10)(19,"div",11),n.YNc(20,W,3,0,"div",12),n.TgZ(21,"table",13)(22,"thead",14)(23,"tr")(24,"th",15),n._uU(25,"Product "),n._UZ(26,"br"),n.TgZ(27,"mat-slide-toggle",16),n.NdJ("toggleChange",function(){n.CHM(t);const o=n.oxw();return o.showDifferenceStock=!o.showDifferenceStock,n.KtG(o.onShowDifferenceStock())}),n.TgZ(28,"small",17),n._uU(29,"FILTER DIFFERENT INVENTORY"),n.qZA()()(),n.TgZ(30,"th",18),n._uU(31,"Variant"),n.qZA(),n.TgZ(32,"th",19),n._uU(33,"SKU"),n.qZA(),n.YNc(34,X,2,1,"th",3),n.ALo(35,"async"),n.TgZ(36,"th",20),n._uU(37,"POS"),n.qZA(),n.TgZ(38,"th")(39,"ng-select",21),n.NdJ("change",function(o){n.CHM(t);const l=n.oxw();return n.KtG(l.onFilterChannel(o))})("ngModelChange",function(o){n.CHM(t);const l=n.oxw();return n.KtG(l.searchFilter.ChannelID=o)}),n.YNc(40,nn,3,3,"ng-option",22),n.qZA()(),n.TgZ(41,"th",23),n._uU(42,"Last Sync"),n.qZA(),n._UZ(43,"th",24),n.qZA()(),n.YNc(44,fn,2,1,"tbody",25),n.ALo(45,"async"),n.qZA(),n.TgZ(46,"div",26)(47,"div",27)(48,"div",28),n._uU(49),n.ALo(50,"number"),n.ALo(51,"async"),n.YNc(52,xn,3,0,"span",29),n.YNc(53,vn,3,3,"span",3),n.ALo(54,"async"),n._uU(55),n.qZA()(),n.YNc(56,In,3,2,"div",30),n.ALo(57,"async"),n.qZA()()()()()()}if(2&a){const t=e.ngIf,i=n.oxw();let o,l;n.Q6J("headerTitle","Inventory Comparison")("pageData",i.pageData)("hideSearchBox",!1),n.xp6(3),n.Q6J("ngIf",n.lcZ(4,17,i.paginationService.data$)),n.xp6(8),n.Q6J("ngModel",i.searchFilter.PageNumber),n.xp6(4),n.Q6J("ngModel",i.searchFilter.RowCount),n.xp6(5),n.Q6J("ngIf",3==(null==i.searchFilter?null:i.searchFilter.filterModel)),n.xp6(14),n.Q6J("ngIf",n.lcZ(35,19,i.paginationService.data$)),n.xp6(5),n.Q6J("clearable",!1)("ngModel",i.searchFilter.ChannelID),n.xp6(1),n.Q6J("ngForOf",t.Options.Channel),n.xp6(4),n.Q6J("ngForOf",n.lcZ(45,21,i.paginationService.data$)),n.xp6(5),n.hij(" Showing 1 - ",n.lcZ(50,23,null==(o=n.lcZ(51,25,i.paginationService.data$))?null:o.length)," of "),n.xp6(3),n.Q6J("ngIf",i.paginationService.hideCount),n.xp6(1),n.Q6J("ngIf",n.lcZ(54,27,!i.paginationService.hideCount&&i.rowCount$)),n.xp6(2),n.hij(" records ~ ",i.paginationService.footerPageNumber," Page "),n.xp6(1),n.Q6J("ngIf",(null==(l=n.lcZ(57,29,i.paginationService.data$))?null:l.length)>0)}}class x{constructor(e,t,i,o,l,s,c){this.http=e,this.toastr=t,this.dialog=i,this.paginationService=o,this.productService=l,this.biggerPictureService=s,this.inventoryService=c,this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="/api/InventoryLoader/Load",this.rowCountApi="/api/Inventory/GetInventoryByChannelRowCount",this.minDate=h.g.MinDate,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=l.getHostName()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint="Inventory/GetSingleChannelComparison",this.loader$=this.http.post(this.loaderApi,{}).pipe((0,F.b)(e=>{this.channelOptions=e.Options.Channel,this.searchFilter={RowCount:e.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:e.Filter.ChannelID},this.paginationService.resetToFirstPage(this.searchFilter),e.Filter.IsMarketplaceAppActive||this.toastr.warning("Automatic inventory sync disabled.\n Please enable Dealpos X Marketplace Apps integration in POS Configuration","Warning")}))}onSearch(e){this.searchFilter.text=e,this.paginationService.resetToFirstPage(this.searchFilter)}onFilterChannel(e){this.searchFilter.ChannelID=e,this.searchFilter.PageNumber=1,this.paginationService.resetToFirstPage(this.searchFilter)}updateStock(e){const t=this.productService.selectedVariantProduct(e);if(t.length>0){let i=t.map(l=>({ID:l.ID,Code:l.Code,Inventory:l.Inventory}));this.http.post("/api/Inventory/UpdateChannel",{ListChannelID:[this.searchFilter.ChannelID],List:i}).subscribe(l=>{this.searchFilter.PageNumber=1,this.paginationService.resetToFirstPage(this.searchFilter),this.checkboxState=!1,this.handlingUpdateStock(l)})}}handlingUpdateStock(e){e[0]?.StatusProduct?this.inventoryService.showToastrUpdateInventory(e[0].StatusProduct.Success_list,e[0].StatusProduct.Fail_list):this.toastr.error(e[0]?.Exception,"Error")}openScanDialog(e){const t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=h.g.GuidEMpty,this.dialog.open(w.j,{data:{filter:t,channelOptions:e.Options.Channel},width:"600px"}).afterClosed().pipe((0,v.h)(o=>h.g.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.scannALl(e)})}scannALl(e){const 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(i=>{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 "+t?.Name,"Success"))})}refreshInventory(e,t,i,o){this.http.post("/api/Inventory/RefreshInventoryChannel",{ChannelItemID:e,ChannelVariationID:t,ChannelID:i,VariantID:o}).subscribe(s=>{this.toastr.success("Successfully updated","Success"),this.paginationService.resetToFirstPage(this.searchFilter)})}onCheckboxStateProduct(e){e.Variants=e.Variants.map(t=>(t.Inventory>=0&&(t.selected=e.selected),t))}onCheckboxStateChange(e){e=e.map(t=>(t.Variants=t.Variants.map(i=>(i.selected=this.checkboxState,i)),t))}openTableDialog(e,t,i){this.dialog.open(G.k,{data:{Name:e.Name,Variant:t,ChannelID:t?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:e.ChannelItemID}}).afterClosed().pipe((0,v.h)(l=>h.g.IsNotEmpty(l))).subscribe(l=>{this.updateItemAfterDialog(l,i)})}updateItemAfterDialog(e,t){let i={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku};const o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(l=>{this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") inventory in "+o?.Name+" to "+i.NewQuantity,"Success")})}onShowDifferenceStock(){this.searchFilter.filterModel=this.showDifferenceStock?C.v.DIFFERENCE:C.v.ALL,this.paginationService.resetToFirstPage(this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}getRowCount(){const e={ChannelID:this.searchFilter.ChannelID,PageNumber:1,text:this.searchFilter.text};this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`${this.rowCountApi}`,e)}onLastPage(){this.http.post(`${this.rowCountApi}`,{ChannelID:this.searchFilter.ChannelID,PageNumber:1}).subscribe({next:t=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,t.Total)}})}onZoomImage(e,t){this.biggerPictureService.openBiggerPicture(e,t)}ngOnDestroy(){this.paginationService.destroy()}}x.\u0275fac=function(e){return new(e||x)(n.Y36(A.O),n.Y36(S._W),n.Y36(M.uw),n.Y36(N.b),n.Y36(D.M),n.Y36(K.k),n.Y36(_))},x.\u0275cmp=n.Xpm({type:x,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"],[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%"],[3,"clearable","ngModel","change","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[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"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"text-start"],[1,"text-end"],[1,"d-flex","align-items-center","justify-content-end"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"align-middle"],[4,"ngIf","ngIfElse"],["OTHER_CHANNEL",""],["class","text-end",3,"ngClass",4,"ngIf"],["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"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["title","Allocated"],["title","Inventory below minimum inventory"],[1,"text-end",3,"ngClass"],[1,"cursor",3,"click"],["matTooltip","Reserved Stock","matTooltipPosition","above",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(e,t){1&e&&(n.YNc(0,bn,58,31,"mainpanel",0),n.ALo(1,"async")),2&e&&n.Q6J("ngIf",n.lcZ(1,1,t.loader$))},dependencies:[p.mk,p.sg,p.O5,u.Fj,u.wV,u.Wl,u.JJ,u.On,b.w9,b.jq,U.Rr,I.p,J.gM,p.Ov,p.JJ,p.uU],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}"]});var k=r(8063);const Tn=[{path:"",component:d,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",component:f,canActivate:[k.a],data:{title:"Inventory Comparison"}},{path:"bychannel",component:x,canActivate:[k.a],data:{title:"Inventory Comparison"}}]}];class g{}g.\u0275fac=function(e){return new(e||g)},g.\u0275mod=n.oAB({type:g}),g.\u0275inj=n.cJS({imports:[p.ez,y.Bz.forChild(Tn)]});class m{}m.\u0275fac=function(e){return new(e||m)},m.\u0275mod=n.oAB({type:m}),m.\u0275inj=n.cJS({providers:[_],imports:[p.ez,g,y.Bz,Z.Z,u.u5,b.A0,U.rP,I.R,P.a,J.AV]})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[592],{2428:(m,c,n)=>{n.d(c,{T:()=>o});var a=n(8505),e=n(1889),i=n(4650),p=n(1318),s=n(7185);class o{constructor(t,l){this.httpService=t,this.toastr=l}getChannel(t){return this.httpService.post("/api/Channel/GetChannel",t)}getChannelLoader(){return this.httpService.get("/api/ChannelLoader/GetChannelLoader")}testShopID(t){return this.httpService.post("/api/Channel/TestShopID",t).pipe((0,a.b)(l=>{this.showTostrSuccessTestShopID(l)}))}updateChannelIndex(t){return this.httpService.post("/api/Channel/UpdateChannelIndex",t)}deleteChannel(t){return this.httpService.post("/api/Channel/DeleteChannel",t)}mapChannelImage(t){return t.map(l=>(l.img=e.g.getChannelLogoByTypeId(l.TypeID),l))}showTostrSuccessTestShopID(t){let l="";for(var d in t)l+=d+" : "+t[d]+"<br/>";this.toastr.success(l,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}}o.\u0275fac=function(t){return new(t||o)(i.LFG(p.O),i.LFG(s._W))},o.\u0275prov=i.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"})},1290:(m,c,n)=>{n.d(c,{k:()=>a});class a{}},1108:(m,c,n)=>{n.d(c,{f:()=>i});var a=n(6895),e=n(4650);class i{}i.\u0275fac=function(s){return new(s||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[a.ez]})},6732:(m,c,n)=>{n.d(c,{y:()=>s});var a=n(6895),e=n(4650);function i(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"span",10),e.NdJ("click",function(){e.CHM(t);const d=e.oxw();return e.KtG(d.getTotal())}),e.TgZ(1,"i",11),e._uU(2,"?"),e.qZA()()}}function p(o,r){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&o){const t=e.oxw();e.xp6(1),e.Oqu(e.lcZ(2,1,t.paginationTotal))}}class s{constructor(){this.get=new e.vpe,this.change=new e.vpe,this.next=new e.vpe,this.previous=new e.vpe,this.total=new e.vpe,this.hasClicked=!1}changePage(r){this.filter.PageNumber=r.pageIndex+1,this.change.emit(this.filter)}getTotal(){this.total.emit()}PreviousPage(){this.previous.emit()}NextPage(){this.next.emit()}}s.\u0275fac=function(r){return new(r||s)},s.\u0275cmp=e.Xpm({type:s,selectors:[["app-custom-paginator"]],inputs:{filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{get:"get",change:"change",next:"next",previous:"previous",total:"total"},standalone:!0,features:[e.jDz],decls:16,vars:11,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"hidden","click"],[1,"fas","fa-arrow-left"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"hidden","click"],[1,"fas","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(r,t){1&r&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._uU(3),e.ALo(4,"number"),e.ALo(5,"number"),e.YNc(6,i,3,0,"span",3),e.YNc(7,p,3,3,"span",4),e._uU(8),e.qZA()(),e.TgZ(9,"div",5)(10,"a",6),e.NdJ("click",function(){return t.PreviousPage()}),e._UZ(11,"i",7),e._uU(12," Prev"),e.qZA(),e.TgZ(13,"a",8),e.NdJ("click",function(){return t.NextPage()}),e._UZ(14,"i",9),e._uU(15," Next"),e.qZA()()()),2&r&&(e.xp6(3),e.AsE(" Showing ",e.lcZ(4,7,t.filter.PageSize*(t.filter.PageNumber-1)+1)," - ",e.lcZ(5,9,t.filter.PageSize*(t.filter.PageNumber-1)+t.totaldata)," of "),e.xp6(3),e.Q6J("ngIf",!t.hasClicked),e.xp6(1),e.Q6J("ngIf",t.hasClicked),e.xp6(1),e.hij(" records ~ ",t.filter.PageNumber," Page "),e.xp6(2),e.Q6J("hidden",1==t.filter.PageNumber),e.xp6(3),e.Q6J("hidden",t.filter.PageSize*(t.filter.PageNumber-1)+t.totaldata==t.paginationTotal||t.totaldata<t.filter.PageSize))},dependencies:[a.ez,a.O5,a.JJ]})},5585:(m,c,n)=>{n.d(c,{Q:()=>g});var a=n(4650),e=n(3238),i=n(9602),p=n(9549),s=n(4144),o=n(8277);n(5439);class g{constructor(){this.disabled=!1,this.dateChange=new a.vpe,this.width="100%",this.displayToggle=!0}ngAfterViewInit(){}change(_){console.log(_);let u=_.toDate();console.log(u),this.dateChange.emit(u)}onOpenDatepicker(){var _=new bootstrap.Dropdown(document.getElementById("dropdown-filter"));_&&(_._config.autoClose="inside")}onCloseDatepicker(){var _=new bootstrap.Dropdown(document.getElementById("dropdown-filter"));_&&(_._config.autoClose="outside")}}g.\u0275fac=function(_){return new(_||g)},g.\u0275cmp=a.Xpm({type:g,selectors:[["datepicker"]],inputs:{placeholder:"placeholder",displayToggle:"displayToggle",date:"date",disabled:"disabled",width:"width"},outputs:{dateChange:"dateChange"},standalone:!0,features:[a._Bn([i.FA,{provide:e._A,useClass:o.t7,deps:[e.Ad]},{provide:e.sG,useValue:{parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}}}]),a.jDz],decls:5,vars:6,consts:[[1,"date-picker"],["matInput","",3,"matDatepicker","placeholder","value","dateChange","click"],["matSuffix","",3,"for"],[3,"opened","closed"],["picker1",""]],template:function(_,u){if(1&_){const h=a.EpF();a.TgZ(0,"mat-form-field",0)(1,"input",1),a.NdJ("dateChange",function(C){return u.change(C.value)})("click",function(){a.CHM(h);const C=a.MAs(4);return a.KtG(C.open())}),a.qZA(),a._UZ(2,"mat-datepicker-toggle",2),a.TgZ(3,"mat-datepicker",3,4),a.NdJ("opened",function(){return u.onOpenDatepicker()})("closed",function(){return u.onCloseDatepicker()}),a.qZA()()}if(2&_){const h=a.MAs(4);a.Udp("width",u.width),a.xp6(1),a.s9C("placeholder",u.placeholder||""),a.Q6J("matDatepicker",h)("value",u.date),a.xp6(1),a.Q6J("for",h)}},dependencies:[e.XK,i.FA,i.Mq,i.hl,i.nW,p.lN,p.KE,p.R9,s.c,s.Nt],styles:["mat-form-field.date-picker.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{background-color:#fff!important;height:45px!important;font-size:14px;padding-left:4px}\n"],encapsulation:2})},9640:(m,c,n)=>{n.d(c,{s:()=>e});var a=n(4650);class e{constructor(){this.emptyStateImg="https://res.cloudinary.com/pos/image/upload/v1683772105/icons/marketplace_icons/emptyrecord.svg"}ngOnInit(){}}e.\u0275fac=function(p){return new(p||e)},e.\u0275cmp=a.Xpm({type:e,selectors:[["app-empty-state"]],standalone:!0,features:[a.jDz],decls:4,vars:1,consts:[["alt","",2,"width","225px",3,"src"],[1,"text-center","fs-2","text-secondary","mt-4"]],template:function(p,s){1&p&&(a.TgZ(0,"div"),a._UZ(1,"img",0),a.TgZ(2,"div",1),a._uU(3," No records found "),a.qZA()()),2&p&&(a.xp6(1),a.Q6J("src",s.emptyStateImg,a.LSH))}})},2594:(m,c,n)=>{n.d(c,{n:()=>s});var a=n(6895),e=n(4650);function i(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"span",10),e.NdJ("click",function(){e.CHM(t);const d=e.oxw();return d.getTotal(),e.KtG(d.hasClicked=!0)}),e.TgZ(1,"i",11),e._uU(2,"?"),e.qZA()()}}function p(o,r){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&o){const t=e.oxw();e.xp6(1),e.Oqu(e.lcZ(2,1,t.paginationTotal))}}class s{constructor(){this.get=new e.vpe,this.change=new e.vpe,this.next=new e.vpe,this.previous=new e.vpe,this.total=new e.vpe,this.hasClicked=!1}changePage(r){this.filter.PageNumber=r.pageIndex+1,this.change.emit(this.filter)}getTotal(){this.total.emit()}PreviousPage(){this.previous.emit()}NextPage(){this.next.emit()}}s.\u0275fac=function(r){return new(r||s)},s.\u0275cmp=e.Xpm({type:s,selectors:[["app-mat-paginator-no-count"]],inputs:{filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{get:"get",change:"change",next:"next",previous:"previous",total:"total"},standalone:!0,features:[e.jDz],decls:13,vars:10,consts:[[1,"d-flex","justify-content-end","mt-5"],[1,"d-sm-block","collapse","mt-3","me-5"],[1,"text-dark","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary","btn-sm","me-3","border-0",3,"disabled","click"],[1,"fas","fa-chevron-left"],["role","button",1,"btn","btn-outline-secondary","btn-sm","border-0",3,"disabled","click"],[1,"fas","fa-chevron-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(r,t){1&r&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._uU(3),e.ALo(4,"number"),e.ALo(5,"number"),e.YNc(6,i,3,0,"span",3),e.YNc(7,p,3,3,"span",4),e.qZA()(),e.TgZ(8,"div",5)(9,"button",6),e.NdJ("click",function(){return t.PreviousPage()}),e._UZ(10,"i",7),e.qZA(),e.TgZ(11,"button",8),e.NdJ("click",function(){return t.NextPage()}),e._UZ(12,"i",9),e.qZA()()()),2&r&&(e.xp6(3),e.AsE(" Showing ",e.lcZ(4,6,t.filter.PageSize*(t.filter.PageNumber-1)+1)," - ",e.lcZ(5,8,t.filter.PageSize*(t.filter.PageNumber-1)+t.totaldata)," of "),e.xp6(3),e.Q6J("ngIf",!t.hasClicked),e.xp6(1),e.Q6J("ngIf",t.hasClicked),e.xp6(2),e.Q6J("disabled",1==t.filter.PageNumber),e.xp6(2),e.Q6J("disabled",t.filter.PageSize*(t.filter.PageNumber-1)+t.totaldata==t.paginationTotal||t.totaldata<t.filter.PageSize))},dependencies:[a.ez,a.O5,a.JJ]})}}]);
|