marketplacepos 2.9.4 → 2.9.5
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/174.491c4991a4f8e404.js +1 -0
- package/Marketplace/19.124a066645320965.js +1 -0
- package/Marketplace/{213.73aa99e3f8dc5caa.js → 213.0e33a2cc7393deb2.js} +1 -1
- package/Marketplace/360.5c7b51c35e7142e7.js +1 -0
- package/Marketplace/{369.881799be1b0c0cd7.js → 369.a1e3b731aeb5243f.js} +1 -1
- package/Marketplace/379.25d1b1c637903c75.js +1 -0
- package/Marketplace/397.c1a8fad6c2ca3235.js +1 -0
- package/Marketplace/72.23b7f31fc45323cb.js +1 -0
- package/Marketplace/754.086e7f7a5377c7d9.js +1 -0
- package/Marketplace/767.64dd12e70c78eb25.js +1 -0
- package/Marketplace/835.ea5f86512592f641.js +1 -0
- package/Marketplace/874.1fbcd1001b41f18e.js +1 -0
- package/Marketplace/common.1b119d9b7a972f87.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main.4874ea507cbcab3a.js → main.cbb985d0c847641f.js} +1 -1
- package/Marketplace/runtime.8ddf6965934d46b2.js +1 -0
- package/package.json +1 -1
- package/Marketplace/360.8279e3b4ceab63e1.js +0 -1
- package/Marketplace/379.aad8784dbdb3dd33.js +0 -1
- package/Marketplace/395.2943aa5a44308399.js +0 -1
- package/Marketplace/397.13ff3d72465810f8.js +0 -1
- package/Marketplace/533.cc5ab7f3ce13770c.js +0 -1
- package/Marketplace/655.ae475c8285604367.js +0 -1
- package/Marketplace/767.eca7237ccb50aa86.js +0 -1
- package/Marketplace/835.6cfe266f3c9b5cc9.js +0 -1
- package/Marketplace/874.5b06431d2b5a1e8f.js +0 -1
- package/Marketplace/common.af67cc08f47a8d44.js +0 -1
- package/Marketplace/runtime.357a02c3b18dd5e6.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[72],{5072:(Mn,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),J=r(6304),S=r(8505),C=r(9300),h=r(1889),f=r(8705),F=r(1318),I=r(7185),A=r(5412),M=r(9425),N=r(6082),b=r(7481),D=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 i=n.oxw(3);return n.KtG(i.openScanDialog())}),n._UZ(1,"i",18),n._uU(2," Scan Channel "),n.qZA()}}function L(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"button",19),n.NdJ("click",function(){n.CHM(t);const i=n.oxw().ngIf,l=n.oxw(2);return n.KtG(l.onUpdateItems(i))}),n._UZ(1,"i",20),n._uU(2," Update "),n.qZA()}}function E(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,L,3,0,"button",16),n.qZA()()()),2&a){const t=e.ngIf,o=n.oxw(2);n.xp6(3),n.Q6J("ngIf",!o.productService.hasSelectionVariant(t)),n.xp6(1),n.Q6J("ngIf",o.productService.hasSelectionVariant(t))}}function O(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"app-table",21),n.NdJ("onToggle",function(i){n.CHM(t);const l=n.oxw(2);return n.KtG(l.onShowDifferenceStock(i))})("onSubmit",function(i){const s=n.CHM(t).ngIf,c=n.oxw(2);return n.KtG(c.updateStockByVariant(i,s))}),n.qZA()}if(2&a){const t=e.ngIf,o=n.oxw(2);n.Q6J("data",t)("channel",o.channelOptions)("showProductToggle",!0)("filter",o.searchFilter)}}function Y(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"span",22),n.NdJ("click",function(){n.CHM(t);const i=n.oxw(2);return n.KtG(i.getRowCount())}),n.TgZ(1,"i",23),n._uU(2,"?"),n.qZA()()}}function $(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 R(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"a",24),n.NdJ("click",function(){n.CHM(t);const i=n.oxw(2);return n.KtG(i.nextPage())}),n._UZ(1,"i",25),n._uU(2," Next"),n.qZA()}}function q(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"a",26),n.NdJ("click",function(){n.CHM(t);const i=n.oxw(2);return n.KtG(i.getAllData())}),n._UZ(1,"i",27),n._uU(2," Last"),n.qZA()}}function H(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"mainpanel",1),n.NdJ("onSubmit",function(i){n.CHM(t);const l=n.oxw();return n.KtG(l.onSearch(i))}),n.YNc(1,E,5,2,"actions",2),n.ALo(2,"async"),n.TgZ(3,"content")(4,"div",3)(5,"div",4)(6,"div",5),n.YNc(7,O,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,Y,3,0,"span",10),n.YNc(17,$,3,3,"span",2),n.ALo(18,"async"),n._uU(19),n.qZA()(),n.TgZ(20,"div",11),n.YNc(21,R,3,0,"a",12),n.YNc(22,q,3,0,"a",13),n.qZA()(),n.BQk(),n.qZA()()()()()}if(2&a){const t=n.oxw();let o;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==(o=n.lcZ(15,18,t.paginationService.data$))?null:o.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 x{constructor(e,t,o,i,l){this.http=e,this.toastr=t,this.dialog=o,this.paginationService=i,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,S.b)(e=>{this.channelOptions=e.Options.Channel,e.Filter={PageNumber:e.Filter.PageNumber,filterModel:f.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 o=this.productService.selectedVariantProduct(e);if(o.length>0){let l=o.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,C.h)(o=>h.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.ChannelID=o.ChannelID,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.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader()}this.searchFilter.ChannelID=h.g.GuidEMpty})}updateStockByVariant(e,t){let o={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",o).subscribe(i=>{let l=this.productService.findChannelById(o.ID,this.channelOptions);this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") inventory in "+l.Name+" to "+o.NewQuantity,"Success")})}onShowDifferenceStock(e){this.searchFilter.filterModel=e?f.v.DIFFERENCE:f.v.ALL,this.paginationService.resetToFirstPage(this.searchFilter)}onUpdateItems(e){const t=this.productService.selectedVariantProduct(e);this.dialog.open(J.j,{data:{selectedItems:t,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"600px"}).afterClosed().pipe((0,C.h)(o=>h.g.IsNotEmpty(o))).subscribe(o=>{this.updateStock(e,o)})}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()}}x.\u0275fac=function(e){return new(e||x)(n.Y36(F.O),n.Y36(I._W),n.Y36(A.uw),n.Y36(M.b),n.Y36(N.M))},x.\u0275cmp=n.Xpm({type:x,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,H,23,22,"mainpanel",0),n.ALo(1,"async")),2&e&&n.Q6J("ngIf",n.lcZ(1,1,t.loader$))},dependencies:[p.O5,b.p,D.a,p.Ov,p.JJ],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});var V=r(7945),B=r(8512),G=r(1739);class _{constructor(e){this.toastrService=e}showToastrUpdateInventory(e,t){const o=e.length>0,i=t.length>0;if(!i&&o&&this.toastrService.success(`${this.generateSuccessMessage(e.length)}`,"Success",{enableHtml:!0}),i&&o){const l=`<li>${this.generateSuccessMessage(e.length)}</li>`,s=this.generateErrorMessage(t);this.toastrService.warning(`<ol>${l} ${s}</ol>`,"Warning",{enableHtml:!0})}if(i&&!o){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((o,i)=>{t+=`<li><span class="fw-bold">Error</span> Updating stock for [${o.Name}] - <b>${o.Message}</b></li>`}),t}}_.\u0275fac=function(e){return new(e||_)(n.LFG(I._W))},_.\u0275prov=n.Yz7({token:_,factory:_.\u0275fac});var u=r(4006),P=r(455),U=r(266);function K(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"button",36),n.NdJ("click",function(){n.CHM(t);const i=n.oxw(2).ngIf,l=n.oxw();return n.KtG(l.openScanDialog(i))}),n._UZ(1,"i",37),n._uU(2," Scan Channel "),n.qZA()}}function j(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"button",38),n.NdJ("click",function(){n.CHM(t);const i=n.oxw().ngIf,l=n.oxw(2);return n.KtG(l.updateStock(i))}),n._UZ(1,"i",39),n._uU(2," Update"),n.qZA()}}function z(a,e){if(1&a&&(n.TgZ(0,"div"),n.YNc(1,K,3,0,"button",34),n.YNc(2,j,3,0,"button",35),n.qZA()),2&a){const t=e.ngIf,o=n.oxw(2);n.xp6(1),n.Q6J("ngIf",!o.productService.hasSelectionVariant(t)),n.xp6(1),n.Q6J("ngIf",o.productService.hasSelectionVariant(t))}}function W(a,e){1&a&&(n.TgZ(0,"div",40)(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",41),n.NdJ("ngModelChange",function(i){n.CHM(t);const l=n.oxw(2);return n.KtG(l.checkboxState=i)})("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){1&a&&(n.ynx(0),n.TgZ(1,"th",42),n._uU(2," Reserved "),n.qZA(),n.BQk())}function tn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"input",66),n.NdJ("ngModelChange",function(i){n.CHM(t);const l=n.oxw(3).$implicit;return n.KtG(l.selected=i)})("ngModelChange",function(){n.CHM(t);const i=n.oxw(3).$implicit,l=n.oxw(2);return n.KtG(l.onCheckboxStateProduct(i))}),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",67),n.NdJ("click",function(i){n.CHM(t);const l=n.oxw(3).$implicit,s=n.oxw(2);return n.KtG(s.onZoomImage(i,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",68)}function on(a,e){if(1&a&&(n.ynx(0),n.TgZ(1,"td",57)(2,"div",58),n.YNc(3,tn,1,1,"input",59),n.YNc(4,en,1,1,"img",60),n.YNc(5,an,1,0,"ng-template",null,61,n.W1O),n.qZA()(),n.TgZ(7,"td",62)(8,"span",63),n._uU(9),n.qZA(),n._UZ(10,"br"),n.TgZ(11,"div",64),n._UZ(12,"i",65),n.TgZ(13,"small"),n._uU(14),n.qZA()()(),n.BQk()),2&a){const t=n.MAs(6),o=n.oxw().$implicit,i=n.oxw().$implicit;n.xp6(1),n.Q6J("rowSpan",null==i?null:i.Variants.length),n.xp6(2),n.Q6J("ngIf",(null==o?null:o.Inventory)>=0||i.Variants.length>1),n.xp6(1),n.Q6J("ngIf",null==i?null:i.ThumbnailUrl)("ngIfElse",t),n.xp6(3),n.Q6J("rowSpan",null==i?null:i.Variants.length),n.xp6(2),n.Oqu(null==i?null:i.Name),n.xp6(5),n.hij("(",null==i?null:i.Category,")")}}function ln(a,e){if(1&a){const t=n.EpF();n.ynx(0),n.TgZ(1,"input",41),n.NdJ("ngModelChange",function(i){n.CHM(t);const l=n.oxw(2).$implicit;return n.KtG(l.selected=i)}),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",41),n.NdJ("ngModelChange",function(i){n.CHM(t);const l=n.oxw(2).$implicit;return n.KtG(l.selected=i)}),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",69),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",70),n._uU(2),n.ALo(3,"number"),n.qZA(),n._uU(4," => "),n.TgZ(5,"span",71),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)," ")}}const _n=function(a){return{"bg-gradient-warning":a}};function un(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"td",72)(1,"span",73),n.NdJ("click",function(){n.CHM(t);const i=n.oxw().$implicit,l=n.oxw(),s=l.$implicit,c=l.ngForOf,An=n.oxw(2);return n.KtG(An.openTableDialog(s,i,c))}),n._uU(2),n.ALo(3,"number"),n.qZA()()}if(2&a){const t=n.oxw().$implicit;n.Q6J("ngClass",n.VKq(4,_n,(null==t?null:t.Inventory)!=(null==t||null==t.Channel[0]?null:t.Channel[0].Inventory))),n.xp6(2),n.hij(" ",n.lcZ(3,2,null==t||null==t.Channel[0]?null:t.Channel[0].Inventory)," ")}}function gn(a,e){if(1&a&&(n.ynx(0),n.TgZ(1,"span",75),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),") ")}}function mn(a,e){1&a&&n._uU(0," - ")}function dn(a,e){if(1&a&&(n.ynx(0),n.TgZ(1,"td",44),n.YNc(2,gn,4,3,"ng-container",50),n.YNc(3,mn,1,0,"ng-template",null,74,n.W1O),n.qZA(),n.BQk()),2&a){const t=n.MAs(4),o=n.oxw().$implicit;n.xp6(2),n.Q6J("ngIf",null==o||null==o.Channel[0]?null:o.Channel[0].InventoryReserved)("ngIfElse",t)}}function Cn(a,e){1&a&&(n.ynx(0),n._uU(1," - "),n.BQk())}function fn(a,e){if(1&a&&(n.TgZ(0,"span",76),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 xn(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",43),n._uU(3),n.qZA(),n.TgZ(4,"td",44)(5,"div",45)(6,"span"),n._uU(7),n.qZA(),n.TgZ(8,"span",46)(9,"a",47),n._UZ(10,"i",48),n.qZA()()()(),n.TgZ(11,"td",49),n.YNc(12,rn,2,1,"ng-container",50),n.YNc(13,cn,1,1,"ng-template",null,51,n.W1O),n.qZA(),n.TgZ(15,"td",44),n.YNc(16,pn,8,6,"span",3),n.YNc(17,hn,3,3,"span",3),n.qZA(),n.YNc(18,un,4,6,"td",52),n.YNc(19,dn,5,2,"ng-container",3),n.TgZ(20,"td",26),n.YNc(21,Cn,2,0,"ng-container",50),n.YNc(22,fn,4,8,"ng-template",null,53,n.W1O),n.qZA(),n.TgZ(24,"td")(25,"div",12)(26,"div",54)(27,"a",47),n._UZ(28,"i",48),n.qZA(),n._uU(29," \xa0\xa0 "),n.TgZ(30,"span",55),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(31,"i",56),n.qZA()()()()()}if(2&a){const t=e.$implicit,o=e.index,i=n.MAs(14),l=n.MAs(23),s=n.oxw(3);n.xp6(1),n.Q6J("ngIf",0==o),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",i),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(1),n.Q6J("ngIf",s.isShowReservedColumn),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 vn(a,e){if(1&a&&(n.TgZ(0,"tbody"),n.YNc(1,xn,32,13,"tr",28),n.qZA()),2&a){const t=e.$implicit;n.xp6(1),n.Q6J("ngForOf",t.Variants)}}function yn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"span",77),n.NdJ("click",function(){n.CHM(t);const i=n.oxw(2);return n.KtG(i.getRowCount())}),n.TgZ(1,"i",78),n._uU(2,"?"),n.qZA()()}}function Sn(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 In(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"a",82),n.NdJ("click",function(){n.CHM(t);const i=n.oxw(3);return n.KtG(i.onNextPage())}),n._UZ(1,"i",83),n._uU(2," Next"),n.qZA()}}function bn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"a",84),n.NdJ("click",function(){n.CHM(t);const i=n.oxw(3);return n.KtG(i.onLastPage())}),n._UZ(1,"i",85),n._uU(2," Last"),n.qZA()}}function Tn(a,e){if(1&a&&(n.TgZ(0,"div",79),n.YNc(1,In,3,0,"a",80),n.YNc(2,bn,3,0,"a",81),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 Zn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"mainpanel",1),n.NdJ("onSubmit",function(i){n.CHM(t);const l=n.oxw();return n.KtG(l.onSearch(i))}),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(i){n.CHM(t);const l=n.oxw();return n.KtG(l.searchFilter.PageNumber=i)}),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(i){n.CHM(t);const l=n.oxw();return n.KtG(l.searchFilter.RowCount=i)}),n.qZA()(),n.TgZ(16,"div")(17,"h6"),n._uU(18,"Quantity From - To"),n.qZA(),n.TgZ(19,"input",9),n.NdJ("ngModelChange",function(i){n.CHM(t);const l=n.oxw();return n.KtG(l.searchFilter.QuantityFrom=i)}),n.qZA(),n._uU(20," - "),n.TgZ(21,"input",10),n.NdJ("ngModelChange",function(i){n.CHM(t);const l=n.oxw();return n.KtG(l.searchFilter.QuantityTo=i)}),n.qZA()()()()(),n.TgZ(22,"content")(23,"div",11)(24,"div",12)(25,"div",13),n.YNc(26,W,3,0,"div",14),n.TgZ(27,"table",15)(28,"thead",16)(29,"tr")(30,"th",17),n._uU(31,"Product "),n._UZ(32,"br"),n.TgZ(33,"mat-slide-toggle",18),n.NdJ("toggleChange",function(){n.CHM(t);const i=n.oxw();return i.showDifferenceStock=!i.showDifferenceStock,n.KtG(i.onShowDifferenceStock())}),n.TgZ(34,"small",19),n._uU(35,"FILTER DIFFERENT INVENTORY"),n.qZA()()(),n.TgZ(36,"th",20),n._uU(37,"Variant"),n.qZA(),n.TgZ(38,"th",21),n._uU(39,"SKU"),n.qZA(),n.YNc(40,X,2,1,"th",3),n.ALo(41,"async"),n.TgZ(42,"th",22),n._uU(43,"POS"),n.qZA(),n.TgZ(44,"th",23)(45,"div",24),n.NdJ("click",function(){n.CHM(t);const i=n.oxw();return n.KtG(i.onChangeChannel())}),n._UZ(46,"img",25),n._uU(47),n.qZA()(),n.YNc(48,nn,3,0,"ng-container",3),n.TgZ(49,"th",26),n._uU(50,"Last Sync"),n.qZA(),n._UZ(51,"th",27),n.qZA()(),n.YNc(52,vn,2,1,"tbody",28),n.ALo(53,"async"),n.qZA(),n.TgZ(54,"div",29)(55,"div",30)(56,"div",31),n._uU(57),n.ALo(58,"number"),n.ALo(59,"async"),n.YNc(60,yn,3,0,"span",32),n.YNc(61,Sn,3,3,"span",3),n.ALo(62,"async"),n._uU(63),n.qZA()(),n.YNc(64,Tn,3,2,"div",33),n.ALo(65,"async"),n.qZA()()()()()()}if(2&a){const t=n.oxw();let o,i;n.Q6J("headerTitle","Inventory Comparison")("pageData",t.pageData)("hideSearchBox",!1),n.xp6(3),n.Q6J("ngIf",n.lcZ(4,20,t.paginationService.data$)),n.xp6(8),n.Q6J("ngModel",t.searchFilter.PageNumber),n.xp6(4),n.Q6J("ngModel",t.searchFilter.RowCount),n.xp6(4),n.Q6J("ngModel",t.searchFilter.QuantityFrom),n.xp6(2),n.Q6J("ngModel",t.searchFilter.QuantityTo),n.xp6(5),n.Q6J("ngIf",3==(null==t.searchFilter?null:t.searchFilter.filterModel)),n.xp6(14),n.Q6J("ngIf",n.lcZ(41,22,t.paginationService.data$)),n.xp6(5),n.Q6J("matTooltip","Change "+(null==t.selectedChannel?null:t.selectedChannel.Name)),n.xp6(1),n.Q6J("src",t.selectedChannel.logo,n.LSH),n.xp6(1),n.hij(" ",null!=t.selectedChannel&&t.selectedChannel.Name?null==t.selectedChannel?null:t.selectedChannel.Name:"Choose Channel ..."," "),n.xp6(1),n.Q6J("ngIf",t.isShowReservedColumn),n.xp6(4),n.Q6J("ngForOf",n.lcZ(53,24,t.products$)),n.xp6(5),n.hij(" Showing 1 - ",n.lcZ(58,26,null==(o=n.lcZ(59,28,t.paginationService.data$))?null:o.length)," of "),n.xp6(3),n.Q6J("ngIf",t.paginationService.hideCount),n.xp6(1),n.Q6J("ngIf",n.lcZ(62,30,!t.paginationService.hideCount&&t.rowCount$)),n.xp6(2),n.hij(" records ~ ",t.paginationService.footerPageNumber," Page "),n.xp6(1),n.Q6J("ngIf",(null==(i=n.lcZ(65,32,t.paginationService.data$))?null:i.length)>0)}}class v{constructor(e,t,o,i,l,s,c){this.http=e,this.toastr=t,this.dialog=o,this.paginationService=i,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.isShowReservedColumn=!0,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(),this.products$=this.paginationService.data$.pipe((0,S.b)(e=>{this.checkShowReservedColumn(e)}))}checkShowReservedColumn(e){let o,t=0;e.forEach(i=>{o=i.Variants.find(l=>h.g.IsNotEmpty(l?.Channel[0]?.InventoryReserved)),o&&(t+=1)}),this.isShowReservedColumn=t>0}initPageLoader(){this.paginationService.fetchDataEndpoint="Inventory/GetSingleChannelComparison",this.loader$=this.http.post(this.loaderApi,{}).pipe((0,S.b)(e=>{this.channelOptions=e.Options.Channel,this.searchFilter={RowCount:e.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:e.Filter.ChannelID},this.initSelectedChannel(),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")}))}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID),this.selectedChannel&&(this.selectedChannel.logo=h.g.getChannelLogoByTypeId(this.selectedChannel.TypeID))}onChangeChannel(){this.dialog.open(B.b,{data:{channelOptions:this.channelOptions,selectedChannel:this.selectedChannel}}).afterClosed().pipe((0,C.h)(e=>h.g.IsNotEmpty(e))).subscribe(e=>{this.selectedChannel=e,this.onFilterChannel(e.ID)})}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 o=t.map(l=>({ID:l.ID,Code:l.Code,Inventory:l.Inventory}));this.http.post("/api/Inventory/UpdateChannel",{ListChannelID:[this.searchFilter.ChannelID],List:o}).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,C.h)(i=>h.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.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(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.searchFilter.ScanFull=!1,this.initPageLoader(),this.toastr.success("Successfully scanned from "+t?.Name,"Success"))})}refreshInventory(e,t,o,i){this.http.post("/api/Inventory/RefreshInventoryChannel",{ChannelItemID:e,ChannelVariationID:t,ChannelID:o,VariantID:i}).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(o=>(o.selected=this.checkboxState,o)),t))}openTableDialog(e,t,o){this.dialog.open(V.k,{data:{Name:e.Name,Variant:t,ChannelID:t?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:e.ChannelItemID}}).afterClosed().pipe((0,C.h)(l=>h.g.IsNotEmpty(l))).subscribe(l=>{this.updateItemAfterDialog(l,o)})}updateItemAfterDialog(e,t){let o={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku};const i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.http.post("/api/Inventory/UpdateQuantityByItem",o).subscribe(l=>{this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") inventory in "+i?.Name+" to "+o.NewQuantity,"Success")})}onShowDifferenceStock(){this.searchFilter.filterModel=this.showDifferenceStock?f.v.DIFFERENCE:f.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()}}v.\u0275fac=function(e){return new(e||v)(n.Y36(F.O),n.Y36(I._W),n.Y36(A.uw),n.Y36(M.b),n.Y36(N.M),n.Y36(G.k),n.Y36(_))},v.\u0275cmp=n.Xpm({type:v,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"],[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"],["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(e,t){1&e&&(n.YNc(0,Zn,66,34,"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,P.Rr,b.p,U.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 wn=[{path:"",component:d,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",component:x,canActivate:[k.a],data:{title:"Inventory Comparison"}},{path:"bychannel",component:v,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(wn)]});var Fn=r(8796);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,Fn.A0,P.rP,b.R,D.a,U.AV]})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[754],{1108:(M,S,a)=>{a.d(S,{f:()=>d});var r=a(6895),m=a(4650);class d{}d.\u0275fac=function(c){return new(c||d)},d.\u0275mod=m.oAB({type:d}),d.\u0275inj=m.cJS({imports:[r.ez]})},6308:(M,S,a)=>{a.d(S,{JX:()=>H,YE:()=>w,nU:()=>y});var r=a(4650),m=a(2693),d=a(1281),f=a(9521),c=a(3238),g=a(7579),A=a(6451),e=a(7340),p=a(6895);const b=["mat-sort-header",""];function C(i,n){if(1&i){const t=r.EpF();r.TgZ(0,"div",3),r.NdJ("@arrowPosition.start",function(){r.CHM(t);const s=r.oxw();return r.KtG(s._disableViewStateAnimation=!0)})("@arrowPosition.done",function(){r.CHM(t);const s=r.oxw();return r.KtG(s._disableViewStateAnimation=!1)}),r._UZ(1,"div",4),r.TgZ(2,"div",5),r._UZ(3,"div",6)(4,"div",7)(5,"div",8),r.qZA()()}if(2&i){const t=r.oxw();r.Q6J("@arrowOpacity",t._getArrowViewState())("@arrowPosition",t._getArrowViewState())("@allowChildren",t._getArrowDirectionState()),r.xp6(2),r.Q6J("@indicator",t._getArrowDirectionState()),r.xp6(1),r.Q6J("@leftPointer",t._getArrowDirectionState()),r.xp6(1),r.Q6J("@rightPointer",t._getArrowDirectionState())}}const E=["*"],v=new r.OlP("MAT_SORT_DEFAULT_OPTIONS"),B=(0,c.dB)((0,c.Id)(class{}));let w=(()=>{class i extends B{get direction(){return this._direction}set direction(t){this._direction=t}get disableClear(){return this._disableClear}set disableClear(t){this._disableClear=(0,d.Ig)(t)}constructor(t){super(),this._defaultOptions=t,this.sortables=new Map,this._stateChanges=new g.x,this.start="asc",this._direction="",this.sortChange=new r.vpe}register(t){this.sortables.set(t.id,t)}deregister(t){this.sortables.delete(t.id)}sort(t){this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction=this.getNextSortDirection(t),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(t){if(!t)return"";let s=function O(i,n){let t=["asc","desc"];return"desc"==i&&t.reverse(),n||t.push(""),t}(t.start||this.start,t?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear),_=s.indexOf(this.direction)+1;return _>=s.length&&(_=0),s[_]}ngOnInit(){this._markInitialized()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return i.\u0275fac=function(t){return new(t||i)(r.Y36(v,8))},i.\u0275dir=r.lG2({type:i,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],active:["matSortActive","active"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[r.qOj,r.TTD]}),i})();const h=c.mZ.ENTERING+" "+c.yN.STANDARD_CURVE,l={indicator:(0,e.X$)("indicator",[(0,e.SB)("active-asc, asc",(0,e.oB)({transform:"translateY(0px)"})),(0,e.SB)("active-desc, desc",(0,e.oB)({transform:"translateY(10px)"})),(0,e.eR)("active-asc <=> active-desc",(0,e.jt)(h))]),leftPointer:(0,e.X$)("leftPointer",[(0,e.SB)("active-asc, asc",(0,e.oB)({transform:"rotate(-45deg)"})),(0,e.SB)("active-desc, desc",(0,e.oB)({transform:"rotate(45deg)"})),(0,e.eR)("active-asc <=> active-desc",(0,e.jt)(h))]),rightPointer:(0,e.X$)("rightPointer",[(0,e.SB)("active-asc, asc",(0,e.oB)({transform:"rotate(45deg)"})),(0,e.SB)("active-desc, desc",(0,e.oB)({transform:"rotate(-45deg)"})),(0,e.eR)("active-asc <=> active-desc",(0,e.jt)(h))]),arrowOpacity:(0,e.X$)("arrowOpacity",[(0,e.SB)("desc-to-active, asc-to-active, active",(0,e.oB)({opacity:1})),(0,e.SB)("desc-to-hint, asc-to-hint, hint",(0,e.oB)({opacity:.54})),(0,e.SB)("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",(0,e.oB)({opacity:0})),(0,e.eR)("* => asc, * => desc, * => active, * => hint, * => void",(0,e.jt)("0ms")),(0,e.eR)("* <=> *",(0,e.jt)(h))]),arrowPosition:(0,e.X$)("arrowPosition",[(0,e.eR)("* => desc-to-hint, * => desc-to-active",(0,e.jt)(h,(0,e.F4)([(0,e.oB)({transform:"translateY(-25%)"}),(0,e.oB)({transform:"translateY(0)"})]))),(0,e.eR)("* => hint-to-desc, * => active-to-desc",(0,e.jt)(h,(0,e.F4)([(0,e.oB)({transform:"translateY(0)"}),(0,e.oB)({transform:"translateY(25%)"})]))),(0,e.eR)("* => asc-to-hint, * => asc-to-active",(0,e.jt)(h,(0,e.F4)([(0,e.oB)({transform:"translateY(25%)"}),(0,e.oB)({transform:"translateY(0)"})]))),(0,e.eR)("* => hint-to-asc, * => active-to-asc",(0,e.jt)(h,(0,e.F4)([(0,e.oB)({transform:"translateY(0)"}),(0,e.oB)({transform:"translateY(-25%)"})]))),(0,e.SB)("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",(0,e.oB)({transform:"translateY(0)"})),(0,e.SB)("hint-to-desc, active-to-desc, desc",(0,e.oB)({transform:"translateY(-25%)"})),(0,e.SB)("hint-to-asc, active-to-asc, asc",(0,e.oB)({transform:"translateY(25%)"}))]),allowChildren:(0,e.X$)("allowChildren",[(0,e.eR)("* <=> *",[(0,e.IO)("@*",(0,e.pV)(),{optional:!0})])])};let u=(()=>{class i{constructor(){this.changes=new g.x}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=r.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const P={provide:u,deps:[[new r.FiY,new r.tp0,u]],useFactory:function I(i){return i||new u}},T=(0,c.Id)(class{});let y=(()=>{class i extends T{get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(t){this._updateSortActionDescription(t)}get disableClear(){return this._disableClear}set disableClear(t){this._disableClear=(0,d.Ig)(t)}constructor(t,o,s,_,x,R,k,D){super(),this._intl=t,this._changeDetectorRef=o,this._sort=s,this._columnDef=_,this._focusMonitor=x,this._elementRef=R,this._ariaDescriber=k,this._showIndicatorHint=!1,this._viewState={},this._arrowDirection="",this._disableViewStateAnimation=!1,this.arrowPosition="after",this._sortActionDescription="Sort",D?.arrowPosition&&(this.arrowPosition=D?.arrowPosition),this._handleStateChanges()}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{const o=!!t;o!==this._showIndicatorHint&&(this._setIndicatorHintVisible(o),this._changeDetectorRef.markForCheck())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}_setIndicatorHintVisible(t){this._isDisabled()&&t||(this._showIndicatorHint=t,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}_setAnimationTransitionState(t){this._viewState=t||{},this._disableViewStateAnimation&&(this._viewState={toState:t.toState})}_toggleOnInteraction(){this._sort.sort(this),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0)}_handleClick(){this._isDisabled()||this._sort.sort(this)}_handleKeydown(t){!this._isDisabled()&&(t.keyCode===f.L_||t.keyCode===f.K5)&&(t.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}_getArrowDirectionState(){return`${this._isSorted()?"active-":""}${this._arrowDirection}`}_getArrowViewState(){const t=this._viewState.fromState;return(t?`${t}-to-`:"")+this._viewState.toState}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(t){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,t)),this._sortActionDescription=t}_handleStateChanges(){this._rerenderSubscription=(0,A.T)(this._sort.sortChange,this._sort._stateChanges,this._intl.changes).subscribe(()=>{this._isSorted()&&(this._updateArrowDirection(),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0),this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"active"}),this._showIndicatorHint=!1),!this._isSorted()&&this._viewState&&"active"===this._viewState.toState&&(this._disableViewStateAnimation=!1,this._setAnimationTransitionState({fromState:"active",toState:this._arrowDirection})),this._changeDetectorRef.markForCheck()})}}return i.\u0275fac=function(t){return new(t||i)(r.Y36(u),r.Y36(r.sBO),r.Y36(w,8),r.Y36("MAT_SORT_HEADER_COLUMN_DEF",8),r.Y36(m.tE),r.Y36(r.SBq),r.Y36(m.$s,8),r.Y36(v,8))},i.\u0275cmp=r.Xpm({type:i,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(t,o){1&t&&r.NdJ("click",function(){return o._handleClick()})("keydown",function(_){return o._handleKeydown(_)})("mouseenter",function(){return o._setIndicatorHintVisible(!0)})("mouseleave",function(){return o._setIndicatorHintVisible(!1)}),2&t&&(r.uIk("aria-sort",o._getAriaSortAttribute()),r.ekj("mat-sort-header-disabled",o._isDisabled()))},inputs:{disabled:"disabled",id:["mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",sortActionDescription:"sortActionDescription",disableClear:"disableClear"},exportAs:["matSortHeader"],features:[r.qOj],attrs:b,ngContentSelectors:E,decls:4,vars:7,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(t,o){1&t&&(r.F$t(),r.TgZ(0,"div",0)(1,"div",1),r.Hsn(2),r.qZA(),r.YNc(3,C,6,6,"div",2),r.qZA()),2&t&&(r.ekj("mat-sort-header-sorted",o._isSorted())("mat-sort-header-position-before","before"===o.arrowPosition),r.uIk("tabindex",o._isDisabled()?null:0)("role",o._isDisabled()?null:"button"),r.xp6(3),r.Q6J("ngIf",o._renderArrow()))},dependencies:[p.O5],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}"],encapsulation:2,data:{animation:[l.indicator,l.leftPointer,l.rightPointer,l.arrowOpacity,l.arrowPosition,l.allowChildren]},changeDetection:0}),i})(),H=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=r.oAB({type:i}),i.\u0275inj=r.cJS({providers:[P],imports:[p.ez,c.BQ]}),i})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[767],{6767:(De,M,s)=>{s.r(M),s.d(M,{LogsModule:()=>y});var r=s(6895),e=s(4650),d=s(284),R=s(2937);class b{constructor(){this.ObjectlogTabs=[{Title:"Sync Order",Url:"/menu/log/order"},{Title:"Sync Inventory",Url:"/menu/log/inventory"},{Title:"Channel Webhook",Url:"/menu/log/rawlog"},{Title:"Channel Webhook Exception ",Url:"/menu/log/exception"},{Title:"Download Order ",Url:"/menu/log/order-log"}]}ngOnInit(){}}b.\u0275fac=function(n){return new(n||b)},b.\u0275cmp=e.Xpm({type:b,selectors:[["app-logs"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,t){1&n&&(e.TgZ(0,"nav",0)(1,"div",1)(2,"div"),e._UZ(3,"nav-tab",2),e.qZA()()(),e._UZ(4,"router-outlet")),2&n&&(e.xp6(3),e.Q6J("Tabs",t.ObjectlogTabs))},dependencies:[d.lC,R.e]});var u=s(8063),T=s(1889),c=s(1318);class h{constructor(){}get Data(){return this._Data}set Data(n){this._Data=n}Fill(n){return this._Data.find(t=>t._id==n)}}h.\u0275fac=function(n){return new(n||h)},h.\u0275prov=e.Yz7({token:h,factory:h.\u0275fac,providedIn:"root"});var l=s(4006),g=s(7481),Z=s(8739),m=s(8796),A=s(5585),f=s(9640),J=s(266);function Q(o,n){if(1&o&&(e.TgZ(0,"span",18),e._UZ(1,"img",19),e.qZA(),e._uU(2)),2&o){const t=n.item;e.xp6(1),e.Q6J("src",t.logo,e.LSH),e.xp6(1),e.hij(" ",t.Name," ")}}function F(o,n){1&o&&(e.TgZ(0,"th",23)(1,"span",28),e._uU(2," Response Body Warning "),e.qZA()())}const Y=function(o){return{"bg-warning":o}};function E(o,n){if(1&o&&(e.TgZ(0,"td",23)(1,"span",31),e._uU(2),e.qZA()()),2&o){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngClass",e.VKq(2,Y,null!=t.responseBodyWarning)),e.xp6(1),e.Oqu(t.responseBodyWarning)}}const B=function(){return["/menu/log/order/detail"]},H=function(o){return{ID:o}};function z(o,n){if(1&o&&(e.TgZ(0,"tr")(1,"td")(2,"a",29),e._uU(3),e.ALo(4,"date"),e.qZA()(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td",23)(12,"span",30),e._uU(13),e.qZA()(),e.YNc(14,E,3,4,"td",25),e.qZA()),2&o){const t=n.$implicit,i=e.oxw(2);e.xp6(2),e.Q6J("routerLink",e.DdM(13,B))("queryParams",e.VKq(14,H,t.ID)),e.xp6(1),e.hij(" ",e.xi3(4,10,t.Created,"dd MMM yyyy HH:mm:ss")," "),e.xp6(3),e.Oqu(t.MarketTypeString),e.xp6(2),e.Oqu(t.POSActionTypeString),e.xp6(2),e.Oqu(t.Number),e.xp6(2),e.Tol(200===t.ResponseCode||202===t.ResponseCode?"bg-success":"bg-warning"),e.xp6(1),e.hij(" ",t.ResponseCode," "),e.xp6(1),e.Q6J("ngIf",i.responseBodyWarningVisible)}}function G(o,n){if(1&o){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",20)(2,"table",21)(3,"thead")(4,"tr",22)(5,"th"),e._uU(6,"Date"),e.qZA(),e.TgZ(7,"th"),e._uU(8,"Channel"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Actions"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"Number"),e.qZA(),e.TgZ(13,"th",23)(14,"span",24),e._uU(15," Response Code "),e.qZA()(),e.YNc(16,F,3,0,"th",25),e.qZA()(),e.TgZ(17,"tbody"),e.YNc(18,z,15,16,"tr",26),e.qZA()(),e.TgZ(19,"mat-paginator",27),e.NdJ("page",function(a){e.CHM(t);const p=e.oxw();return e.KtG(p.changePage(a))}),e.qZA()(),e.BQk()}if(2&o){const t=e.oxw();e.xp6(16),e.Q6J("ngIf",t.responseBodyWarningVisible),e.xp6(2),e.Q6J("ngForOf",t.Result),e.xp6(1),e.Q6J("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",0==(null==t.filter?null:t.filter.PageNumber)?0:(null==t.filter?null:t.filter.PageNumber)-1)}}function j(o,n){1&o&&(e.TgZ(0,"div",32),e._UZ(1,"app-empty-state"),e.qZA())}class q{constructor(n,t,i){this.http=n,this._RawLogService=t,this.route=i,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""},this.responseBodyWarningVisible=!1}ngOnInit(){this.route.queryParams.subscribe(n=>{this.responseCode=n.responseCode,null!=this.responseCode?this.Load(n):this.Load()})}Load(n={}){this.http.post("/api/OrdersLoader/Get",n).subscribe(t=>{this.filter=t.Filter,this.Channel=T.g.assignChannelLogo(t.Options.Channel),this.ActionTypeList=t.Options.ActionTypeList,this.Get()})}Get(n){this.filter.Number=n,this.http.post("/api/Orders/Get",this.filter).subscribe(t=>{this._RawLogService.Data=t.hits,this.Result=Array();for(let i of t.hits)null!=i._source.log.responseBodyWarning&&(this.responseBodyWarningVisible=!0),this.Result.push({ID:i._id,Created:i._source["@timestamp_received"],shopId:i._source.shopId,MarketTypeString:i._source.log.type,POSActionTypeString:i._source.message,Number:i._source.log.number,ResponseCode:i._source.log.responseCode,responseBodyWarning:i._source.log.responseBodyWarning});this.paginationTotal=t.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Get()}}function W(o,n){if(1&o&&(e.TgZ(0,"span",13),e._UZ(1,"img",14),e.qZA(),e._uU(2)),2&o){const t=n.item;e.xp6(1),e.Q6J("src",t.logo,e.LSH),e.xp6(1),e.hij(" ",t.Name," ")}}q.\u0275fac=function(n){return new(n||q)(e.Y36(c.O),e.Y36(h),e.Y36(d.gz))},q.\u0275cmp=e.Xpm({type:q,selectors:[["app-order"]],decls:42,vars:15,consts:[["headerTitle","Order Log","searchBoxPlaceHolder","Invoice Number..",3,"text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","name","StatusCode",1,"w-100",3,"ngModel","ngModelChange"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100",3,"ngModel","ngModelChange"],["id","listresponseBodyWarning"],["value","number-override"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],["class","text-center",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"],[1,"text-white","p-2","rounded","response-desc",3,"ngClass"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,t){if(1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(a){return t.Number=a})("onSubmit",function(a){return t.Get(a)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(a){return t.filter.ChannelID=a}),e.YNc(7,Q,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"Action"),e.qZA(),e.TgZ(11,"ng-select",4),e.NdJ("ngModelChange",function(a){return t.filter.ActionType=a}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"From/To"),e.qZA(),e.TgZ(15,"datepicker",5),e.NdJ("dateChange",function(a){return t.filter.From=a}),e.qZA(),e.TgZ(16,"datepicker",6),e.NdJ("dateChange",function(a){return t.filter.To=a}),e.qZA()(),e.TgZ(17,"div")(18,"h6"),e._uU(19,"Response Code"),e.qZA(),e.TgZ(20,"input",7),e.NdJ("ngModelChange",function(a){return t.filter.StatusCode=a}),e.qZA()(),e.TgZ(21,"div")(22,"h6"),e._uU(23,"Response Body Warning"),e.qZA(),e.TgZ(24,"input",8),e.NdJ("ngModelChange",function(a){return t.filter.responseBodyWarning=a}),e.qZA(),e.TgZ(25,"datalist",9),e._UZ(26,"option",10),e.qZA()(),e.TgZ(27,"div")(28,"h6"),e._uU(29,"Page Number"),e.qZA(),e.TgZ(30,"input",11),e.NdJ("ngModelChange",function(a){return t.filter.PageNumber=a}),e.qZA()(),e.TgZ(31,"div")(32,"h6"),e._uU(33,"Page Size"),e.qZA(),e.TgZ(34,"input",12),e.NdJ("ngModelChange",function(a){return t.filter.RowCount=a}),e.qZA()()()(),e.TgZ(35,"content")(36,"div",13)(37,"div",14)(38,"div",15),e.YNc(39,G,20,5,"ng-container",16),e.YNc(40,j,2,0,"ng-template",null,17,e.W1O),e.qZA()()()()()),2&n){const i=e.MAs(41);e.Q6J("text",t.Number),e.xp6(6),e.Q6J("clearable",!0)("items",t.Channel)("ngModel",t.filter.ChannelID),e.xp6(5),e.Q6J("clearable",!0)("items",t.ActionTypeList)("ngModel",t.filter.ActionType),e.xp6(4),e.Q6J("date",t.filter.From),e.xp6(1),e.Q6J("date",t.filter.To),e.xp6(4),e.Q6J("ngModel",t.filter.StatusCode),e.xp6(4),e.Q6J("ngModel",t.filter.responseBodyWarning),e.xp6(6),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.RowCount),e.xp6(5),e.Q6J("ngIf",(null==t.Result?null:t.Result.length)>0)("ngIfElse",i)}},dependencies:[r.mk,r.sg,r.O5,l.YN,l.Kr,l.Fj,l.wV,l.JJ,l.On,d.rH,g.p,Z.NW,m.w9,m.ir,A.Q,f.s,J.gM,r.uU]});const V=function(){return["/menu/log/inventory/detail"]},K=function(o){return{ID:o}};function X(o,n){if(1&o&&(e.TgZ(0,"tr")(1,"td")(2,"a",20),e._uU(3),e.ALo(4,"date"),e.qZA()(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.qZA()()),2&o){const t=n.$implicit;e.xp6(2),e.Q6J("routerLink",e.DdM(10,V))("queryParams",e.VKq(11,K,t.ID)),e.xp6(1),e.hij(" ",e.xi3(4,7,t.Created,"dd MMM yyyy HH:mm")," "),e.xp6(3),e.Oqu(t.channelName),e.xp6(2),e.Oqu(t.Sku),e.xp6(2),e.Oqu(t.Stock),e.xp6(2),e.Oqu(t.ResponseCode)}}function $(o,n){if(1&o){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",15)(2,"table",16)(3,"thead")(4,"tr",17)(5,"th"),e._uU(6,"Created"),e.qZA(),e.TgZ(7,"th"),e._uU(8,"Channel"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"SKU"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"Stock"),e.qZA(),e.TgZ(13,"th"),e._uU(14,"Response code"),e.qZA()()(),e.TgZ(15,"tbody"),e.YNc(16,X,13,13,"tr",18),e.qZA()(),e.TgZ(17,"mat-paginator",19),e.NdJ("page",function(a){e.CHM(t);const p=e.oxw();return e.KtG(p.changePage(a))}),e.qZA()(),e.BQk()}if(2&o){const t=e.oxw();e.xp6(16),e.Q6J("ngForOf",t.Result),e.xp6(1),e.Q6J("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",0==(null==t.filter?null:t.filter.PageNumber)?0:(null==t.filter?null:t.filter.PageNumber)-1)}}function ee(o,n){1&o&&(e.TgZ(0,"div",21),e._UZ(1,"app-empty-state"),e.qZA())}class x{constructor(n,t){this.http=n,this._RawLogService=t,this.Result=Array(),this.filter={PageNumber:0,RowCount:20,Sku:null,ChannelID:"",StatusCode:"",From:"",To:""},this.Load()}ngOnInit(){}Load(){this.http.post("/api/OrdersLoader/Get",{}).subscribe(n=>{this.filter=n.Filter,this.Channel=T.g.assignChannelLogo(n.Options.Channel),this.ActionTypeList=n.Options.ActionTypeList,this.Get()})}Get(n){null!=n&&(this.filter.Sku=n),this.http.post("api/Inventory/GetLog",this.filter).subscribe(t=>{this._RawLogService.Data=t.hits,this.Result=Array();for(let i of t.hits)this.Result.push({ID:i._source.log.id,Created:i._source["@timestamp_received"],channelName:i._source.log.channelName,Sku:i._source.log.sku,Stock:i._source.log.stock,ResponseCode:i._source.log.responseCode});this.paginationTotal=t.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount,this.paginationTotal=t.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Get()}}function te(o,n){if(1&o&&(e.TgZ(0,"span",13),e._UZ(1,"img",14),e.qZA(),e._uU(2)),2&o){const t=n.item;e.xp6(1),e.Q6J("src",t.logo,e.LSH),e.xp6(1),e.hij(" ",t.Name," ")}}x.\u0275fac=function(n){return new(n||x)(e.Y36(c.O),e.Y36(h))},x.\u0275cmp=e.Xpm({type:x,selectors:[["app-inventory-log"]],decls:28,vars:10,consts:[["headerTitle","Inventory Log","searchBoxPlaceHolder","Enter SKU...",3,"text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt=3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,t){if(1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(a){return t.filter.Sku=a})("onSubmit",function(a){return t.Get(a)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(a){return t.filter.ChannelID=a}),e.YNc(7,W,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"From/To"),e.qZA(),e.TgZ(11,"datepicker",4),e.NdJ("dateChange",function(a){return t.filter.From=a}),e.qZA(),e.TgZ(12,"datepicker",5),e.NdJ("dateChange",function(a){return t.filter.To=a}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Number"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(a){return t.filter.PageNumber=a}),e.qZA()(),e.TgZ(17,"div")(18,"h6"),e._uU(19,"Page Size"),e.qZA(),e.TgZ(20,"input",7),e.NdJ("ngModelChange",function(a){return t.filter.RowCount=a}),e.qZA()()()(),e.TgZ(21,"content")(22,"div",8)(23,"div",9)(24,"div",10),e.YNc(25,$,18,4,"ng-container",11),e.YNc(26,ee,2,0,"ng-template",null,12,e.W1O),e.qZA()()()()()),2&n){const i=e.MAs(27);e.Q6J("text",t.filter.Sku),e.xp6(6),e.Q6J("clearable",!0)("items",t.Channel)("ngModel",t.filter.ChannelID),e.xp6(5),e.Q6J("date",t.filter.From),e.xp6(1),e.Q6J("date",t.filter.To),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.RowCount),e.xp6(5),e.Q6J("ngIf",(null==t.Result?null:t.Result.length)>0)("ngIfElse",i)}},dependencies:[r.sg,r.O5,l.Fj,l.wV,l.JJ,l.On,d.rH,g.p,Z.NW,m.w9,m.ir,A.Q,f.s,r.uU]});const ne=function(){return["/menu/log/order/detail"]},oe=function(o){return{ID:o}};function ie(o,n){if(1&o&&(e.TgZ(0,"tr")(1,"td")(2,"a",21),e._uU(3),e.ALo(4,"date"),e.qZA()(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA()()),2&o){const t=n.$implicit;e.xp6(2),e.Q6J("routerLink",e.DdM(9,ne))("queryParams",e.VKq(10,oe,t.id)),e.xp6(1),e.hij(" ",e.xi3(4,6,t.Created,"dd MMM yyyy HH:mm:ss")," "),e.xp6(3),e.Oqu(t.type),e.xp6(2),e.Oqu(t.number),e.xp6(2),e.Oqu(t.message)}}function ae(o,n){if(1&o){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr")(5,"th",18),e._uU(6,"Date"),e.qZA(),e.TgZ(7,"th"),e._uU(8,"Type"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Number"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"Message"),e.qZA()()(),e.TgZ(13,"tbody"),e.YNc(14,ie,11,12,"tr",19),e.qZA()(),e.TgZ(15,"mat-paginator",20),e.NdJ("page",function(a){e.CHM(t);const p=e.oxw();return e.KtG(p.changePage(a))}),e.qZA()(),e.BQk()}if(2&o){const t=e.oxw();e.xp6(14),e.Q6J("ngForOf",t.Result),e.xp6(1),e.Q6J("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",0==(null==t.filter?null:t.filter.PageNumber)?0:(null==t.filter?null:t.filter.PageNumber)-1)}}function re(o,n){1&o&&(e.TgZ(0,"div",22),e._UZ(1,"app-empty-state"),e.qZA())}class O{constructor(n,t){this.http=n,this._RawLogService=t,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""},this.list=[],this.Types=[{Key:0,Value:"Shopee"},{Key:1,Value:"Tokopedia"}]}ngOnInit(){this.Load()}Load(n={}){this.http.post("/api/OrdersLoader/Get",n).subscribe(t=>{this.filter=t.Filter,this.Channel=T.g.assignChannelLogo(t.Options.Channel),this.ActionTypeList=t.Options.ActionTypeList,this.Get()})}Get(n){this.filter.Number=n,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(t=>{this._RawLogService.Data=t.hits,this.Result=Array();for(let i of t.hits)this.Result.push({id:i._id,message:i._source.message,responseCode:i._source.log.responseCode,processTypeString:i._source.log.processType,type:i._source.log.type,number:i._source.log.number,Created:i._source["@timestamp_received"]});this.paginationTotal=t.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Get()}}O.\u0275fac=function(n){return new(n||O)(e.Y36(c.O),e.Y36(h))},O.\u0275cmp=e.Xpm({type:O,selectors:[["app-raw-log"]],decls:28,vars:10,consts:[["headerTitle","Channel Webhook Log","searchBoxPlaceHolder","Invoice Number..",3,"text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,t){if(1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(a){return t.filter.Number=a})("onSubmit",function(a){return t.Get(a)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(a){return t.filter.ChannelID=a}),e.YNc(7,te,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"From/To"),e.qZA(),e.TgZ(11,"datepicker",4),e.NdJ("dateChange",function(a){return t.filter.From=a}),e.qZA(),e.TgZ(12,"datepicker",5),e.NdJ("dateChange",function(a){return t.filter.To=a}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Number"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(a){return t.filter.PageNumber=a}),e.qZA()(),e.TgZ(17,"div")(18,"h6"),e._uU(19,"Page Size"),e.qZA(),e.TgZ(20,"input",7),e.NdJ("ngModelChange",function(a){return t.filter.RowCount=a}),e.qZA()()()(),e.TgZ(21,"content")(22,"div",8)(23,"div",9)(24,"div",10),e.YNc(25,ae,16,4,"ng-container",11),e.YNc(26,re,2,0,"ng-template",null,12,e.W1O),e.qZA()()()()()),2&n){const i=e.MAs(27);e.Q6J("text",t.filter.Number),e.xp6(6),e.Q6J("clearable",!0)("items",t.Channel)("ngModel",t.filter.ChannelID),e.xp6(5),e.Q6J("date",t.filter.From),e.xp6(1),e.Q6J("date",t.filter.To),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.RowCount),e.xp6(5),e.Q6J("ngIf",(null==t.Result?null:t.Result.length)>0)("ngIfElse",i)}},dependencies:[r.sg,r.O5,l.Fj,l.wV,l.JJ,l.On,d.rH,g.p,Z.NW,m.w9,m.ir,A.Q,f.s,r.uU]});class le{constructor(n,t){this._document=t;const i=this._textarea=this._document.createElement("textarea"),a=i.style;a.position="fixed",a.top=a.opacity="0",a.left="-999em",i.setAttribute("aria-hidden","true"),i.value=n,i.readOnly=!0,this._document.body.appendChild(i)}copy(){const n=this._textarea;let t=!1;try{if(n){const i=this._document.activeElement;n.select(),n.setSelectionRange(0,n.value.length),t=this._document.execCommand("copy"),i&&i.focus()}}catch{}return t}destroy(){const n=this._textarea;n&&(n.remove(),this._textarea=void 0)}}let se=(()=>{class o{constructor(t){this._document=t}copy(t){const i=this.beginCopy(t),a=i.copy();return i.destroy(),a}beginCopy(t){return new le(t,this._document)}}return o.\u0275fac=function(t){return new(t||o)(e.LFG(r.K0))},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const de=new e.OlP("CDK_COPY_TO_CLIPBOARD_CONFIG");let pe=(()=>{class o{constructor(t,i,a){this._clipboard=t,this._ngZone=i,this.text="",this.attempts=1,this.copied=new e.vpe,this._pending=new Set,a&&null!=a.attempts&&(this.attempts=a.attempts)}copy(t=this.attempts){if(t>1){let i=t;const a=this._clipboard.beginCopy(this.text);this._pending.add(a);const p=()=>{const _=a.copy();_||!--i||this._destroyed?(this._currentTimeout=null,this._pending.delete(a),a.destroy(),this.copied.emit(_)):this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(p,1))};p()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(t=>t.destroy()),this._pending.clear(),this._destroyed=!0}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(se),e.Y36(e.R0b),e.Y36(de,8))},o.\u0275dir=e.lG2({type:o,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(t,i){1&t&&e.NdJ("click",function(){return i.copy()})},inputs:{text:["cdkCopyToClipboard","text"],attempts:["cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"}}),o})(),ge=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({}),o})();function ue(o,n){1&o&&e._UZ(0,"img",21)}function ce(o,n){1&o&&e._UZ(0,"img",22)}function he(o,n){if(1&o&&(e.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"h5"),e._uU(4,"General"),e.qZA()(),e.TgZ(5,"div",7)(6,"div",2)(7,"div",8)(8,"div",9)(9,"label"),e._uU(10,"Date"),e.qZA(),e.TgZ(11,"div")(12,"span"),e._uU(13),e.ALo(14,"date"),e.qZA()()()(),e.TgZ(15,"div",10)(16,"div",9)(17,"label"),e._uU(18,"Market Place Type"),e.qZA(),e.YNc(19,ue,1,0,"img",11),e.YNc(20,ce,1,0,"img",12),e.TgZ(21,"a",13)(22,"span",14),e._uU(23),e.qZA(),e._UZ(24,"br"),e.TgZ(25,"small",15),e._uU(26),e.qZA()()()(),e.TgZ(27,"div",10)(28,"div",9)(29,"label"),e._uU(30,"Number"),e.qZA(),e.TgZ(31,"div")(32,"span"),e._uU(33),e.qZA()()()(),e.TgZ(34,"div",8)(35,"div",9)(36,"label"),e._uU(37,"Process Type"),e.qZA(),e.TgZ(38,"div")(39,"span"),e._uU(40),e.qZA()()()(),e.TgZ(41,"div",4)(42,"div",9)(43,"label"),e._uU(44,"Authorization Header"),e.qZA(),e.TgZ(45,"div")(46,"span"),e._uU(47),e.qZA()()()(),e.TgZ(48,"div",16)(49,"div",5)(50,"div",17)(51,"div",18)(52,"h3"),e._uU(53,"Request"),e.qZA()(),e.TgZ(54,"div",19)(55,"button",20),e._uU(56,"Copy to clipboard"),e.qZA()()(),e.TgZ(57,"div",7),e._uU(58),e.qZA()()()()()()()),2&o){const t=e.oxw();e.xp6(13),e.Oqu(e.xi3(14,11,t.data.Created,"dd MMM yyyy HH:mm:ss")),e.xp6(6),e.Q6J("ngIf",1==t.data.TypeID),e.xp6(1),e.Q6J("ngIf",0==t.data.TypeID),e.xp6(1),e.s9C("href",t.data.ShopLink,e.LSH),e.xp6(2),e.Oqu(t.data.ShopName),e.xp6(3),e.Oqu(t.data.ShopLink),e.xp6(7),e.Oqu(t.data._source.log.number),e.xp6(7),e.Oqu(t.data._source.log.processType),e.xp6(7),e.Oqu(t.data._source.log.authorizationHeader),e.xp6(8),e.Q6J("cdkCopyToClipboard",t.data._source.log.request),e.xp6(3),e.hij(" ",t.data._source.log.request," ")}}class U{constructor(n,t,i){this.route=n,this.http=t,this._RawLogService=i,this.route.queryParams.subscribe(a=>{let p=JSON.parse(localStorage.getItem("channel"));if(this.ID=a.ID,this.data=this._RawLogService.Fill(this.ID),this.data.Created=this.data._source["@timestamp_received"],p.length>0){const _=p.find(Ie=>Ie.ShopID==this.data._source.shopId);_?(this.data.TypeID=_.TypeID,this.data.ShopName=_.Name,this.data.ShopLink=_.URL):(this.data.TypeID=null,this.data.ShopName=null,this.data.ShopLink=null)}})}ngOnInit(){}}function me(o,n){if(1&o&&(e.TgZ(0,"div",10)(1,"div",7)(2,"div",8)(3,"h5"),e._uU(4,"General"),e.qZA()(),e.TgZ(5,"div",9)(6,"div",3)(7,"div",6)(8,"div",12)(9,"label"),e._uU(10,"Date"),e.qZA(),e.TgZ(11,"div")(12,"span"),e._uU(13),e.ALo(14,"date"),e.qZA()()()(),e.TgZ(15,"div",6)(16,"div",12)(17,"label"),e._uU(18,"SKU"),e.qZA(),e.TgZ(19,"div")(20,"span"),e._uU(21),e.qZA()()()(),e.TgZ(22,"div",6)(23,"div",12)(24,"label"),e._uU(25,"Channel"),e.qZA(),e.TgZ(26,"div")(27,"span"),e._uU(28),e.qZA()()()(),e.TgZ(29,"div",6)(30,"div",12)(31,"label"),e._uU(32,"Response Code"),e.qZA(),e.TgZ(33,"div")(34,"span"),e._uU(35),e.qZA()()()()()()()()),2&o){const t=e.oxw();e.xp6(13),e.Oqu(e.xi3(14,4,t.data.Created,"dd MMM yyyy")),e.xp6(8),e.Oqu(t.data.Sku),e.xp6(7),e.Oqu(t.data.ChannelName),e.xp6(7),e.Oqu(t.data.ResponseCode)}}U.\u0275fac=function(n){return new(n||U)(e.Y36(d.gz),e.Y36(c.O),e.Y36(h))},U.\u0275cmp=e.Xpm({type:U,selectors:[["app-raw-detail"]],decls:5,vars:4,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-2"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-2"],[1,"info-label-group"],[1,"col-sm-4"],["class","me-2","src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",4,"ngIf"],["class","me-2","src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",4,"ngIf"],["target","_blank",3,"href"],[1,"fw-bold"],[1,"text-dark"],[1,"col-sm-12","mt-2"],[1,"card-header","d-lg-flex"],[1,"me-auto"],[1,"d-sm-block","mt-2"],[3,"cdkCopyToClipboard"],["src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",1,"me-2"],["src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",1,"me-2"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2),e.YNc(4,he,59,14,"div",3),e.qZA()()()()),2&n&&(e.Q6J("headerTitle","Request Raw Log Detail")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(4),e.Q6J("ngIf",t.data))},dependencies:[r.O5,g.p,pe,r.uU]});class w{constructor(n,t,i){this.route=n,this.http=t,this._RawLogService=i,this.data={Created:"",Sku:"",ChannelName:"",ResponseCode:""},this.route.queryParams.subscribe(a=>{this.ID=a.ID,this.Load()})}ngOnInit(){}Load(){this.http.post("/api/Inventory/GetInventoryLogDeatil",{ID:this.ID}).subscribe(t=>{this.data.Created=t.hits[0]._source["@timestamp_received"],this.data.Sku=t.hits[0]._source.log.sku,this.data.ChannelName=t.hits[0]._source.log.channelName,this.data.ResponseCode=t.hits[0]._source.log.responseCode,this.request=JSON.parse(t.hits[0]._source.log.request),this.response=t.hits[0]._source.log.response})}}function _e(o,n){if(1&o&&(e.TgZ(0,"div",9)(1,"div",10)(2,"label"),e._uU(3,"Process Code"),e.qZA(),e.TgZ(4,"div")(5,"span"),e._uU(6),e.qZA()()()()),2&o){const t=e.oxw();e.xp6(6),e.Oqu(t.ProcessedCode)}}function Te(o,n){if(1&o){const t=e.EpF();e.TgZ(0,"a",16),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.Retry())}),e._uU(1,"Retry"),e.qZA()}}w.\u0275fac=function(n){return new(n||w)(e.Y36(d.gz),e.Y36(c.O),e.Y36(h))},w.\u0275cmp=e.Xpm({type:w,selectors:[["app-inventory-detail"]],decls:30,vars:9,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"row","mt-2"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group"],[1,"info-label-group"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Back"),e.qZA()(),e.TgZ(4,"content")(5,"div",2)(6,"div",3),e.YNc(7,me,36,7,"div",4),e.qZA(),e.TgZ(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h5"),e._uU(13,"Request"),e.qZA()(),e.TgZ(14,"div",9)(15,"div",10)(16,"div",11)(17,"pre"),e._uU(18),e.ALo(19,"json"),e.qZA()()()()()(),e.TgZ(20,"div",6)(21,"div",7)(22,"div",8)(23,"h5"),e._uU(24,"Response"),e.qZA()(),e.TgZ(25,"div",9)(26,"div",10)(27,"div",11)(28,"pre"),e._uU(29),e.qZA()()()()()()()()()()),2&n&&(e.Q6J("headerTitle","Inventory Detail")("pageData","Inventory Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(7),e.Q6J("ngIf",t.data),e.xp6(11),e.Oqu(e.lcZ(19,7,t.request)),e.xp6(11),e.Oqu(t.response))},dependencies:[r.O5,d.rH,g.p,r.Ts,r.uU]});class L{constructor(n,t){this.route=n,this.http=t,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(i=>{this.ID=i.ID,this.Load()})}ngOnInit(){}Retry(){this.http.post("/api/Orders/Retry",{Number:this.Number,ShopID:this.shopId}).subscribe(t=>{alert(JSON.stringify(t))})}Load(){this.http.post("/api/Orders/GetDetail",{ID:this.ID}).subscribe(t=>{for(let i of t.hits)this.Number=i._source.log.number,this.MarketTypeString=i._source.log.type,this.ResponseCode=i._source.log.responseCode,this.POSActionTypeString=i._source.message,this.ProcessDuration=0,this.Created=i._source["@timestamp_received"],this.request=JSON.parse(i._source.log.request),this.response=JSON.parse(i._source.log.response),this.shopId=i._source.shopId,this.ProcessedCode=i._source.log.processedCode})}}L.\u0275fac=function(n){return new(n||L)(e.Y36(d.gz),e.Y36(c.O))},L.\u0275cmp=e.Xpm({type:L,selectors:[["app-orderdetail"]],decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Back"),e.qZA()(),e.TgZ(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),e._uU(11,"General"),e.qZA()(),e.TgZ(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),e._uU(17,"Date"),e.qZA(),e.TgZ(18,"div")(19,"span"),e._uU(20),e.ALo(21,"date"),e.qZA()()()(),e.TgZ(22,"div",9)(23,"div",10)(24,"label"),e._uU(25,"Number"),e.qZA(),e.TgZ(26,"div")(27,"span"),e._uU(28),e.qZA()()()(),e.TgZ(29,"div",9)(30,"div",10)(31,"label"),e._uU(32,"Type"),e.qZA(),e.TgZ(33,"div")(34,"span"),e._uU(35),e.qZA()()()(),e.TgZ(36,"div",9)(37,"div",10)(38,"label"),e._uU(39,"Response Code"),e.qZA(),e.TgZ(40,"div")(41,"span"),e._uU(42),e.qZA()()()(),e.TgZ(43,"div",9)(44,"div",10)(45,"label"),e._uU(46,"ShopID"),e.qZA(),e.TgZ(47,"div")(48,"span"),e._uU(49),e.qZA()()()(),e.YNc(50,_e,7,1,"div",11),e.TgZ(51,"div",9)(52,"div",10)(53,"label"),e._uU(54,"Action"),e.qZA(),e.TgZ(55,"div")(56,"span"),e._uU(57),e.qZA()()()()()()()()(),e.TgZ(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),e._uU(63,"Request"),e.qZA()(),e.TgZ(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),e._uU(68),e.ALo(69,"json"),e.qZA()()(),e.TgZ(70,"actions",14),e.YNc(71,Te,2,0,"a",15),e.qZA()()()(),e.TgZ(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),e._uU(76,"Response"),e.qZA()(),e.TgZ(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),e._uU(81),e.ALo(82,"json"),e.qZA()()()()()()()()()()),2&n&&(e.Q6J("headerTitle","Order #"+t.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(20),e.Oqu(e.xi3(21,14,t.Created,"dd MMM yyyy HH:mm:ss")),e.xp6(8),e.Oqu(t.Number),e.xp6(7),e.Oqu(t.MarketTypeString),e.xp6(7),e.Oqu(t.ResponseCode),e.xp6(7),e.Oqu(t.shopId),e.xp6(1),e.Q6J("ngIf",null!=t.ProcessedCode),e.xp6(7),e.Oqu(t.POSActionTypeString),e.xp6(11),e.Oqu(e.lcZ(69,17,t.request)),e.xp6(3),e.Q6J("ngIf","200"!=t.ResponseCode&&"201"!=t.ResponseCode),e.xp6(10),e.Oqu(e.lcZ(82,19,t.response)))},dependencies:[r.O5,d.rH,g.p,r.Ts,r.uU]});const Ze=function(){return["/menu/log/exception/detail"]},fe=function(o){return{ID:o}};function Ce(o,n){if(1&o&&(e.TgZ(0,"tr")(1,"td",12),e._UZ(2,"img",13),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.ALo(5,"date"),e.qZA(),e.TgZ(6,"td")(7,"a",14),e._uU(8),e.qZA()(),e.TgZ(9,"td")(10,"div",15),e._uU(11),e.qZA(),e.TgZ(12,"div"),e._uU(13),e.qZA()()()),2&o){const t=n.$implicit;e.xp6(2),e.Q6J("src",t.logo,e.LSH),e.xp6(2),e.Oqu(e.xi3(5,7,t.date,"dd-MM-yyyy hh:mm:ss")),e.xp6(3),e.Q6J("routerLink",e.DdM(10,Ze))("queryParams",e.VKq(11,fe,t.id)),e.xp6(1),e.hij(" ",t.number," "),e.xp6(3),e.Oqu(t.message),e.xp6(2),e.Oqu(t.stackTrace)}}function ve(o,n){if(1&o){const t=e.EpF();e.ynx(0),e.TgZ(1,"mat-paginator",16),e.NdJ("page",function(a){e.CHM(t);const p=e.oxw(2);return e.KtG(p.onPaginationChange(a))}),e.qZA(),e.BQk()}if(2&o){const t=e.oxw(2);e.xp6(1),e.Q6J("length",t.pageTotal)("pageSize",t.pageSize)("pageIndex",0==(null==t.filter?null:t.filter.PageNumber)?0:(null==t.filter?null:t.filter.PageNumber)-1)}}function ye(o,n){if(1&o&&(e.ynx(0),e.TgZ(1,"div",6)(2,"table",7)(3,"thead")(4,"tr",8)(5,"th"),e._uU(6,"Channel"),e.qZA(),e.TgZ(7,"th",9),e._uU(8,"Date"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Number"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"Exception"),e.qZA()()(),e.TgZ(13,"tbody"),e.YNc(14,Ce,14,13,"tr",10),e.qZA()(),e.YNc(15,ve,2,3,"ng-container",11),e.qZA(),e.BQk()),2&o){const t=e.oxw();e.xp6(14),e.Q6J("ngForOf",t.exceptions),e.xp6(1),e.Q6J("ngIf",(null==t.exceptions?null:t.exceptions.length)>0)}}function be(o,n){1&o&&(e.TgZ(0,"div",17),e._UZ(1,"app-empty-state"),e.qZA())}class N{constructor(n){this.http=n,this.exceptions=[],this.filter={RowCount:50,PageNumber:1},this.getData()}getData(){this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(n=>{this.exceptions=n.hits.map(t=>({id:t._id,logo:T.g.getChannelLogoByName(t._source.error?.Type),number:t._source.error.number,date:t._source["@timestamp_received"],stackTrace:t._source.error.stackTrace,message:t._source.message,requestJSON:t._source?.error?.requestJSON})),this.pageTotal=n.total.value,this.pageSize=this.filter.RowCount>this.pageTotal?this.pageTotal:this.filter.RowCount})}onPaginationChange(n){this.filter.PageNumber=n.pageIndex+1,this.getData()}}function Ae(o,n){if(1&o&&(e.TgZ(0,"span",13),e._UZ(1,"img",14),e.qZA(),e._uU(2)),2&o){const t=n.item;e.xp6(1),e.Q6J("src",t.logo,e.LSH),e.xp6(1),e.hij(" ",t.Name," ")}}N.\u0275fac=function(n){return new(n||N)(e.Y36(c.O))},N.\u0275cmp=e.Xpm({type:N,selectors:[["app-exception-log"]],decls:8,vars:2,consts:[["headerTitle","Exception Log","searchBoxPlaceHolder","Enter Number...","hideSearchBox","true","hideSearchDropdown","true"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","140px"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"text-center"],[2,"width","25px",3,"src"],[3,"routerLink","queryParams"],[1,"fw-bold"],[3,"length","pageSize","pageIndex","page"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,t){if(1&n&&(e.TgZ(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),e.YNc(5,ye,16,2,"ng-container",4),e.YNc(6,be,2,0,"ng-template",null,5,e.W1O),e.qZA()()()()()),2&n){const i=e.MAs(7);e.xp6(5),e.Q6J("ngIf",t.exceptions.length>0)("ngIfElse",i)}},dependencies:[r.sg,r.O5,d.rH,g.p,Z.NW,f.s,r.uU]});const qe=function(o){return{ID:o}};function xe(o,n){if(1&o&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._UZ(4,"img",24),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td",25)(8,"a",26),e._uU(9),e.ALo(10,"number"),e.qZA()(),e.TgZ(11,"td"),e._uU(12),e.qZA(),e.TgZ(13,"td"),e._uU(14),e.ALo(15,"date"),e.qZA()()),2&o){const t=n.$implicit;e.xp6(2),e.Oqu(t._source.ChannelName),e.xp6(2),e.Q6J("src",t.logo,e.LSH),e.xp6(2),e.Oqu(t._source.DateRange),e.xp6(2),e.Q6J("queryParams",e.VKq(12,qe,t._source.ID)),e.xp6(1),e.hij(" ",e.lcZ(10,7,t._source.CountOrder)," "),e.xp6(3),e.Oqu(t._source.UserLogin),e.xp6(2),e.hij("",e.xi3(15,9,t._source["@timestamp_received"],"dd MMM yyyy hh:mm")," ")}}function Oe(o,n){if(1&o){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",15)(2,"table",16)(3,"thead")(4,"tr",17)(5,"th",18),e._uU(6,"Channel"),e.qZA(),e.TgZ(7,"th",19),e._uU(8,"Type"),e.qZA(),e.TgZ(9,"th",20),e._uU(10,"Download Date Range"),e.qZA(),e.TgZ(11,"th",21),e._uU(12,"Count"),e.qZA(),e.TgZ(13,"th"),e._uU(14,"User Login"),e.qZA(),e.TgZ(15,"th"),e._uU(16,"Created"),e.qZA()()(),e.TgZ(17,"tbody"),e.YNc(18,xe,16,14,"tr",22),e.qZA()(),e.TgZ(19,"mat-paginator",23),e.NdJ("page",function(a){e.CHM(t);const p=e.oxw();return e.KtG(p.onPaginationChange(a))}),e.qZA()(),e.BQk()}if(2&o){const t=e.oxw();e.xp6(18),e.Q6J("ngForOf",t.downloadOrders),e.xp6(1),e.Q6J("length",t.paginationTotal)("pageSize",t.paginationPageSize)("pageIndex",0==(null==t.filter?null:t.filter.PageNumber)?0:(null==t.filter?null:t.filter.PageNumber)-1)}}function Ue(o,n){1&o&&(e.TgZ(0,"div",27),e._UZ(1,"app-empty-state"),e.qZA())}class S{constructor(n){this.http=n,this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(n=>{this.filter=n.Filter,this.channels=T.g.assignChannelLogo(n.Options.Channel),this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(n=>{this.downloadOrders=n.hits,this.setChannelLogo(),this.paginationTotal=n.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(n=>(n.logo=T.g.getChannelLogoByTypeId(n._source.TypeID),n))}onPaginationChange(n){this.filter.PageNumber=n.pageIndex+1,this.getDownloadOrders()}}S.\u0275fac=function(n){return new(n||S)(e.Y36(c.O))},S.\u0275cmp=e.Xpm({type:S,selectors:[["app-manual-order-log"]],decls:28,vars:10,consts:[["headerTitle","Download Order Log",3,"hideSearchBox","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY_STATE",""],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/log/order-log/order-log-detail",3,"queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,t){if(1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(){return t.getDownloadOrders()}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"ng-select",2),e.NdJ("ngModelChange",function(a){return t.filter.ChannelID=a}),e.YNc(7,Ae,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"From/To"),e.qZA(),e.TgZ(11,"datepicker",4),e.NdJ("dateChange",function(a){return t.filter.From=a}),e.qZA(),e.TgZ(12,"datepicker",5),e.NdJ("dateChange",function(a){return t.filter.To=a}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Number"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(a){return t.filter.PageNumber=a}),e.qZA()(),e.TgZ(17,"div")(18,"h6"),e._uU(19,"Page Size"),e.qZA(),e.TgZ(20,"input",7),e.NdJ("ngModelChange",function(a){return t.filter.RowCount=a}),e.qZA()()()(),e.TgZ(21,"content")(22,"div",8)(23,"div",9)(24,"div",10),e.YNc(25,Oe,20,4,"ng-container",11),e.YNc(26,Ue,2,0,"ng-template",null,12,e.W1O),e.qZA()()()()()),2&n){const i=e.MAs(27);e.Q6J("hideSearchBox",!0),e.xp6(6),e.Q6J("clearable",!0)("items",t.channels)("ngModel",t.filter.ChannelID),e.xp6(5),e.Q6J("date",t.filter.From),e.xp6(1),e.Q6J("date",t.filter.To),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.RowCount),e.xp6(5),e.Q6J("ngIf",(null==t.downloadOrders?null:t.downloadOrders.length)>0)("ngIfElse",i)}},dependencies:[r.sg,r.O5,l.Fj,l.wV,l.JJ,l.On,d.rH,g.p,Z.NW,m.w9,m.ir,A.Q,f.s,r.JJ,r.uU]});var P=s(8505),we=s(4782),k=s(4004);class C{constructor(n){this.httpService=n}getExceptionDetail(n){return this.httpService.post("/api/Orders/GetDetailException",{ID:n}).pipe((0,k.U)(i=>i?.hits[0]?._source))}}function Le(o,n){if(1&o&&(e.TgZ(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"h5"),e._uU(6,"General"),e.qZA()(),e.TgZ(7,"div",7)(8,"div",8)(9,"div",9)(10,"div",10)(11,"label"),e._uU(12,"Date"),e.qZA(),e.TgZ(13,"div")(14,"span"),e._uU(15),e.ALo(16,"date"),e.qZA()()()(),e.TgZ(17,"div",9)(18,"div",10)(19,"label"),e._uU(20,"Number"),e.qZA(),e.TgZ(21,"div")(22,"span"),e._uU(23),e.qZA()()()(),e.TgZ(24,"div",9)(25,"div",10)(26,"label"),e._uU(27,"Type"),e.qZA(),e.TgZ(28,"div")(29,"span"),e._uU(30),e.qZA()()()(),e.TgZ(31,"div",9)(32,"div",10)(33,"label"),e._uU(34,"ShopID"),e.qZA(),e.TgZ(35,"div")(36,"span"),e._uU(37),e.qZA()()()()()()()()(),e.TgZ(38,"div",11)(39,"div",9)(40,"div",5)(41,"div",6)(42,"h5"),e._uU(43,"Request"),e.qZA()(),e.TgZ(44,"div",7)(45,"div",12)(46,"div",13)(47,"pre"),e._uU(48),e.ALo(49,"json"),e.qZA()()()()()(),e.TgZ(50,"div",9)(51,"div",5)(52,"div",6)(53,"h5"),e._uU(54,"Exception"),e.qZA()(),e.TgZ(55,"div",7)(56,"div",14)(57,"div",13)(58,"div",15),e._uU(59),e.qZA(),e.TgZ(60,"pre"),e._uU(61),e.qZA()()()()()()()()),2&o){const t=n.ngIf;e.xp6(15),e.Oqu(e.xi3(16,7,t["@timestamp"],"dd MMM yyyy HH:mm:ss")),e.xp6(8),e.Oqu(null==t||null==t.error?null:t.error.number),e.xp6(7),e.Oqu(null==t||null==t.error?null:t.error.Type),e.xp6(7),e.Oqu(null==t?null:t.shopId),e.xp6(11),e.Oqu(e.lcZ(49,10,null==t||null==t.error?null:t.error.requestJSON)),e.xp6(11),e.Oqu(null==t?null:t.message),e.xp6(2),e.Oqu(null==t||null==t.error?null:t.error.stackTrace)}}C.\u0275fac=function(n){return new(n||C)(e.LFG(c.O))},C.\u0275prov=e.Yz7({token:C,factory:C.\u0275fac,providedIn:"root"});class I{constructor(n,t){this.activatedRoute=n,this.exceptionService=t,this.invoiceNumber=""}ngOnInit(){this.getExceptionDetail(this.activatedRoute.snapshot.queryParams?.ID)}getExceptionDetail(n){this.exceptionDetail$=this.exceptionService.getExceptionDetail(n).pipe((0,P.b)(t=>{this.invoiceNumber=t?.error?.number}),(0,we.d)(1))}}function Ne(o,n){if(1&o&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.ALo(7,"date"),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"date"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.qZA()()),2&o){const t=n.$implicit;e.xp6(2),e.hij(" ",t.Number," "),e.xp6(2),e.hij(" ",t.Status," "),e.xp6(2),e.hij(" ",e.xi3(7,5,t.Start,"HH:mm:ss:SSS")," "),e.xp6(3),e.hij(" ",e.xi3(10,8,t.End,"HH:mm:ss:SSS")," "),e.xp6(3),e.hij(" ",t.Exception," ")}}I.\u0275fac=function(n){return new(n||I)(e.Y36(d.gz),e.Y36(C))},I.\u0275cmp=e.Xpm({type:I,selectors:[["app-exception-detail"]],decls:4,vars:4,consts:[["hideSearchBox","true","hideSearchDropdown","true",3,"headerTitle"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"],[1,"fw-bold"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0)(1,"content"),e.YNc(2,Le,62,12,"div",1),e.ALo(3,"async"),e.qZA()()),2&n&&(e.Q6J("headerTitle","Order #"+t.invoiceNumber),e.xp6(2),e.Q6J("ngIf",e.lcZ(3,2,t.exceptionDetail$)))},dependencies:[r.O5,g.p,r.Ov,r.Ts,r.uU]});class D{constructor(n,t){this.route=n,this.httpService=t}ngOnInit(){this.initOrderDetails()}initOrderDetails(){this.orderDetails$=this.httpService.post("/api/Orders/DownloadOrderLogsDetail",{ID:this.route.snapshot.queryParams.ID}).pipe((0,P.b)(t=>{const i=t?.hits[0]?._source;this.headerTitle=`${i?.ChannelName} (${i?.DateRange})`}),(0,k.U)(t=>t?.hits[0]._source?.Detail))}}D.\u0275fac=function(n){return new(n||D)(e.Y36(d.gz),e.Y36(c.O))},D.\u0275cmp=e.Xpm({type:D,selectors:[["app-download-order-detail"]],decls:22,vars:7,consts:[[3,"headerTitle","description","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","200px"],[2,"width","150px"],[2,"width","100px"],[4,"ngFor","ngForOf"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"table",5)(7,"thead")(8,"tr",6)(9,"th",7),e._uU(10,"Number"),e.qZA(),e.TgZ(11,"th",8),e._uU(12,"Status"),e.qZA(),e.TgZ(13,"th",9),e._uU(14,"Start Time"),e.qZA(),e.TgZ(15,"th",9),e._uU(16,"End Time"),e.qZA(),e.TgZ(17,"th"),e._uU(18,"Exception"),e.qZA()()(),e.TgZ(19,"tbody"),e.YNc(20,Ne,13,11,"tr",10),e.ALo(21,"async"),e.qZA()()()()()()()()),2&n&&(e.Q6J("headerTitle",t.headerTitle)("description",t.headerTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(20),e.Q6J("ngForOf",e.lcZ(21,5,t.orderDetails$)))},dependencies:[r.sg,g.p,r.Ov,r.uU]});const Se=[{path:"",component:b,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",component:q,canActivate:[u.a],data:{title:"Order Log"}},{path:"inventory",component:x,canActivate:[u.a],data:{title:"Inventory Log"}},{path:"rawlog",component:O,canActivate:[u.a],data:{title:"Raw Log"}},{path:"rawlog/detail",component:U,canActivate:[u.a],data:{title:"Raw Log Detail"}},{path:"inventory/detail",component:w,canActivate:[u.a],data:{title:"Inventory Details"}},{path:"order/detail",component:L,canActivate:[u.a],data:{title:"Order Details"}},{path:"exception",component:N,canActivate:[u.a],data:{title:"Exception Log"}},{path:"exception/detail",component:I,canActivate:[u.a],data:{title:"Exception Log Detail"}},{path:"order-log",component:S,canActivate:[u.a],data:{title:"order Log"}},{path:"order-log/order-log-detail",component:D,canActivate:[u.a],data:{title:"Order Log Detail"}}]}];class v{}v.\u0275fac=function(n){return new(n||v)},v.\u0275mod=e.oAB({type:v}),v.\u0275inj=e.cJS({imports:[r.ez,d.Bz.forChild(Se)]});class y{}y.\u0275fac=function(n){return new(n||y)},y.\u0275mod=e.oAB({type:y}),y.\u0275inj=e.cJS({imports:[r.ez,l.u5,l.UX,v,d.Bz,g.R,ge,Z.TU,m.A0,R.Z,A.Q,f.s,J.AV]})}}]);
|