marketplacepos 2.9.3 → 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.0e33a2cc7393deb2.js +1 -0
- package/Marketplace/360.5c7b51c35e7142e7.js +1 -0
- package/Marketplace/{369.a12060880985ee8f.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 +3 -2
- package/Marketplace/{main.6966bb7fcafbe0e4.js → main.cbb985d0c847641f.js} +1 -1
- package/Marketplace/runtime.8ddf6965934d46b2.js +1 -0
- package/package.json +1 -1
- package/Marketplace/213.d00d0a3f05c831f7.js +0 -1
- package/Marketplace/360.8279e3b4ceab63e1.js +0 -1
- package/Marketplace/378.7f743ac9660ec6e6.js +0 -1
- package/Marketplace/379.aad8784dbdb3dd33.js +0 -1
- package/Marketplace/395.2943aa5a44308399.js +0 -1
- package/Marketplace/397.8ba047b91801962d.js +0 -1
- package/Marketplace/533.cc5ab7f3ce13770c.js +0 -1
- package/Marketplace/655.ae475c8285604367.js +0 -1
- package/Marketplace/767.d939ac65d1cb16fb.js +0 -1
- package/Marketplace/874.5b06431d2b5a1e8f.js +0 -1
- package/Marketplace/common.af67cc08f47a8d44.js +0 -1
- package/Marketplace/runtime.5db60124bb5bf7cb.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[767],{6767:(Ie,M,l)=>{l.r(M),l.d(M,{LogsModule:()=>b});var r=l(6895),e=l(4650),d=l(284),J=l(2937);class y{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(){}}y.\u0275fac=function(n){return new(n||y)},y.\u0275cmp=e.Xpm({type:y,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,J.e]});var u=l(8063),T=l(1889),c=l(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 s=l(4006),g=l(7481),f=l(8739),m=l(8796),A=l(5585),Z=l(9640);function Q(o,n){if(1&o&&(e.TgZ(0,"span",16),e._UZ(1,"img",17),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",21),e._uU(1,"Process Code"),e.qZA())}const R=function(o,n){return{"bg-warning":o,"bg-success":n}};function Y(o,n){if(1&o&&(e.TgZ(0,"td",21)(1,"span",26),e._uU(2),e.qZA()()),2&o){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngClass",e.WLB(2,R,null!=t.ProcessedCode&&200!==t.ProcessedCode,null!=t.ProcessedCode&&200===t.ProcessedCode)),e.xp6(1),e.Oqu(t.ProcessedCode)}}const E=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",25),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",21)(12,"span",26),e._uU(13),e.qZA()(),e.YNc(14,Y,3,5,"td",22),e.qZA()),2&o){const t=n.$implicit,i=e.oxw(2);e.xp6(2),e.Q6J("routerLink",e.DdM(12,E))("queryParams",e.VKq(13,H,t.ID)),e.xp6(1),e.hij(" ",e.xi3(4,9,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.Q6J("ngClass",e.WLB(15,R,200!==t.ResponseCode,200===t.ResponseCode)),e.xp6(1),e.Oqu(t.ResponseCode),e.xp6(1),e.Q6J("ngIf",i.processedCodeVisible)}}function G(o,n){if(1&o){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",18)(2,"table",19)(3,"thead")(4,"tr",20)(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",21),e._uU(14,"Response Code"),e.qZA(),e.YNc(15,F,2,0,"th",22),e.qZA()(),e.TgZ(16,"tbody"),e.YNc(17,z,15,18,"tr",23),e.qZA()(),e.TgZ(18,"mat-paginator",24),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(15),e.Q6J("ngIf",t.processedCodeVisible),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 B(o,n){1&o&&(e.TgZ(0,"div",27),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:"",ProcessedCode:""},this.processedCodeVisible=!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)i._source.log.processedCode&&(this.processedCodeVisible=!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,ProcessedCode:i._source.log.processedCode});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 j(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:40,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","number","name","StatusCode",1,"w-100",3,"ngModel","ngModelChange"],["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"],["class","text-center",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"],[1,"text-white","p-1","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,"Processed Code"),e.qZA(),e.TgZ(24,"input",8),e.NdJ("ngModelChange",function(a){return t.filter.ProcessedCode=a}),e.qZA()(),e.TgZ(25,"div")(26,"h6"),e._uU(27,"Page Number"),e.qZA(),e.TgZ(28,"input",9),e.NdJ("ngModelChange",function(a){return t.filter.PageNumber=a}),e.qZA()(),e.TgZ(29,"div")(30,"h6"),e._uU(31,"Page Size"),e.qZA(),e.TgZ(32,"input",10),e.NdJ("ngModelChange",function(a){return t.filter.RowCount=a}),e.qZA()()()(),e.TgZ(33,"content")(34,"div",11)(35,"div",12)(36,"div",13),e.YNc(37,G,19,5,"ng-container",14),e.YNc(38,B,2,0,"ng-template",null,15,e.W1O),e.qZA()()()()()),2&n){const i=e.MAs(39);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.ProcessedCode),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.mk,r.sg,r.O5,s.Fj,s.wV,s.JJ,s.On,d.rH,g.p,f.NW,m.w9,m.ir,A.Q,Z.s,r.uU]});const V=function(){return["/menu/log/inventory/detail"]},K=function(o){return{ID:o}};function W(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 X(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,W,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 $(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 ee(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,j,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,X,18,4,"ng-container",11),e.YNc(26,$,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,s.Fj,s.wV,s.JJ,s.On,d.rH,g.p,f.NW,m.w9,m.ir,A.Q,Z.s,r.uU]});const te=function(){return["/menu/log/order/detail"]},ne=function(o){return{ID:o}};function oe(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,te))("queryParams",e.VKq(10,ne,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 ie(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,oe,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 ae(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,ee,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,ie,16,4,"ng-container",11),e.YNc(26,ae,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,s.Fj,s.wV,s.JJ,s.On,d.rH,g.p,f.NW,m.w9,m.ir,A.Q,Z.s,r.uU]});class re{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 le=(()=>{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 re(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 se=new e.OlP("CDK_COPY_TO_CLIPBOARD_CONFIG");let de=(()=>{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(le),e.Y36(e.R0b),e.Y36(se,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})(),pe=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({}),o})();function ge(o,n){1&o&&e._UZ(0,"img",21)}function ue(o,n){1&o&&e._UZ(0,"img",22)}function ce(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,ge,1,0,"img",11),e.YNc(20,ue,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(Ne=>Ne.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 he(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,ce,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,de,r.uU]});class L{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 me(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 _e(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()}}L.\u0275fac=function(n){return new(n||L)(e.Y36(d.gz),e.Y36(c.O),e.Y36(h))},L.\u0275cmp=e.Xpm({type:L,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,he,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 w{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})}}w.\u0275fac=function(n){return new(n||w)(e.Y36(d.gz),e.Y36(c.O))},w.\u0275cmp=e.Xpm({type:w,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,me,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,_e,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 Te=function(){return["/menu/log/exception/detail"]},fe=function(o){return{ID:o}};function Ze(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,Te))("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 Ce(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 ve(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,Ze,14,13,"tr",10),e.qZA()(),e.YNc(15,Ce,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 S{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 ye(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," ")}}S.\u0275fac=function(n){return new(n||S)(e.Y36(c.O))},S.\u0275cmp=e.Xpm({type:S,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,ve,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,f.NW,Z.s,r.uU]});const Ae=function(o){return{ID:o}};function qe(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,Ae,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 xe(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,qe,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 Oe(o,n){1&o&&(e.TgZ(0,"div",27),e._UZ(1,"app-empty-state"),e.qZA())}class N{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()}}N.\u0275fac=function(n){return new(n||N)(e.Y36(c.O))},N.\u0275cmp=e.Xpm({type:N,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,ye,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,xe,20,4,"ng-container",11),e.YNc(26,Oe,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,s.Fj,s.wV,s.JJ,s.On,d.rH,g.p,f.NW,m.w9,m.ir,A.Q,Z.s,r.JJ,r.uU]});var P=l(8505),Ue=l(4782),k=l(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,Ue.d)(1))}}function we(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,we,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:y,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:L,canActivate:[u.a],data:{title:"Inventory Details"}},{path:"order/detail",component:w,canActivate:[u.a],data:{title:"Order Details"}},{path:"exception",component:S,canActivate:[u.a],data:{title:"Exception Log"}},{path:"exception/detail",component:I,canActivate:[u.a],data:{title:"Exception Log Detail"}},{path:"order-log",component:N,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 b{}b.\u0275fac=function(n){return new(n||b)},b.\u0275mod=e.oAB({type:b}),b.\u0275inj=e.cJS({imports:[r.ez,s.u5,s.UX,v,d.Bz,g.R,pe,f.TU,m.A0,J.Z,A.Q,Z.s]})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[874],{1874:(Ke,J,r)=>{r.r(J),r.d(J,{PriceModule:()=>m});var s=r(6895),M=r(2937),b=r(7481),I=r(284),p=r(4006),T=r(8796),e=r(4650);class C{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"},{Title:"Custom Channel Price",Url:"/menu/price/OutletPrice"}]}}C.\u0275fac=function(t){return new(t||C)},C.\u0275cmp=e.Xpm({type:C,selectors:[["app-price"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,n){1&t&&(e.TgZ(0,"nav",0)(1,"div",1)(2,"div"),e._UZ(3,"nav-tab",2),e.qZA()()(),e._UZ(4,"router-outlet")),2&t&&(e.xp6(3),e.Q6J("Tabs",n.priceTabs))},dependencies:[M.e,I.lC]});var U=r(8231),O=r(6304),k=r(8505),h=r(9300),_=r(1889),S=r(1318),v=r(7185),Z=r(5412),L=r(9425),y=r(6082),Q=r(6114);function G(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"button",16),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(3);return e.KtG(o.openScanDialog())}),e._UZ(1,"i",17),e._uU(2," Scan Channel "),e.qZA()}}function H(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"button",18),e.NdJ("click",function(){e.CHM(n);const o=e.oxw().ngIf,c=e.oxw(2);return e.KtG(c.onUpdateItems(o))}),e._UZ(1,"i",19),e._uU(2," Update "),e.qZA()}}function R(i,t){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,G,3,0,"button",14),e.YNc(2,H,3,0,"button",15),e.qZA()),2&i){const n=t.ngIf,a=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!a.productService.hasSelectionVariant(n)),e.xp6(1),e.Q6J("ngIf",a.productService.hasSelectionVariant(n))}}function B(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"div",20)(1,"app-table",21),e.NdJ("onToggle",function(o){e.CHM(n);const c=e.oxw(2);return e.KtG(c.onShowDifferencePrice(o))})("onSubmit",function(o){e.CHM(n);const c=e.oxw(2);return e.KtG(c.updatePriceByVariant(o))}),e.ALo(2,"async"),e.qZA()()}if(2&i){const n=e.oxw().ngIf,a=e.oxw();e.xp6(1),e.Q6J("showProductToggle",!0)("data",e.lcZ(2,4,a.paginationService.data$))("channel",n.Options.Channel)("filter",n.Filter)}}function j(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"span",22),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.getRowCount())}),e.TgZ(1,"i",23),e._uU(2,"?"),e.qZA()()}}function z(i,t){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&i){const n=t.ngIf;e.xp6(1),e.Oqu(e.lcZ(2,1,n))}}function W(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"a",24),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.onNextPage())}),e._UZ(1,"i",25),e._uU(2," Next"),e.qZA()}}function X(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"a",26),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.onLastPage())}),e._UZ(1,"i",27),e._uU(2," Last"),e.qZA()}}function ee(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"mainpanel",1),e.NdJ("onSubmit",function(o){e.CHM(n);const c=e.oxw();return e.KtG(c.onSearch(o))}),e.TgZ(1,"actions")(2,"div",2),e.YNc(3,R,3,2,"div",3),e.ALo(4,"async"),e.qZA()(),e.TgZ(5,"content")(6,"div",4)(7,"div",5),e.YNc(8,B,3,6,"div",6),e.ALo(9,"async"),e.qZA(),e.TgZ(10,"div",7)(11,"div",8)(12,"div",9),e._uU(13),e.ALo(14,"number"),e.ALo(15,"async"),e.YNc(16,j,3,0,"span",10),e.YNc(17,z,3,3,"span",3),e.ALo(18,"async"),e._uU(19),e.qZA()(),e.TgZ(20,"div",11),e.YNc(21,W,3,0,"a",12),e.YNc(22,X,3,0,"a",13),e.qZA()()()()()}if(2&i){const n=e.oxw();let a;e.Q6J("pageData",n.pageData)("hideSearchDropdown",!0)("textButton","Search"),e.xp6(3),e.Q6J("ngIf",e.lcZ(4,11,n.paginationService.data$)),e.xp6(5),e.Q6J("ngIf",e.lcZ(9,13,n.paginationService.data$)),e.xp6(5),e.hij(" Showing 1 - ",e.lcZ(14,15,null==(a=e.lcZ(15,17,n.paginationService.data$))?null:a.length)," of "),e.xp6(3),e.Q6J("ngIf",n.paginationService.hideCount),e.xp6(1),e.Q6J("ngIf",!n.paginationService.hideCount&&e.lcZ(18,19,n.allDataCount$)),e.xp6(2),e.hij(" records ~ ",n.paginationService.footerPageNumber," Page "),e.xp6(2),e.Q6J("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage),e.xp6(1),e.Q6J("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage)}}class f{constructor(t,n,a,o,c){this.http=t,this.toastr=n,this.dialog=a,this.paginationService=o,this.productService=c,this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.filterOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Price",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!0},{Title:"Price Realtime",Url:"/menu/price/realtime",Active:!1}]}}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.getDataAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe((0,k.b)(t=>{this.channelOptions=t.Options.Channel,t.Filter={PageNumber:t.Filter.PageNumber,RowCount:t.Filter.RowCount,filterModel:1},this.searchFilter=t.Filter,this.paginationService.resetToFirstPage(this.searchFilter)}))}onShowDifferencePrice(t){this.searchFilter.filterModel=1,t&&(this.searchFilter.filterModel=3),this.paginationService.resetToFirstPage(this.searchFilter)}onSearch(t){this.searchFilter.text=t,this.paginationService.resetToFirstPage(this.searchFilter)}openScanDialog(){this.searchFilter.ChannelID=_.g.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(U.j,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe((0,h.h)(a=>_.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.searchFilter.Async=a.Async,this.scanAll()})}scanAll(){this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.initPageLoader(),this.productService.successToastrScanAllProduct(t,n,!this.searchFilter.UpdatedProduct)}})}updatePrice(t){let n=this.productService.selectedVariantProduct(t);if(n.length>0){let o=n.map(l=>({ID:l.ID,Code:l.Code,Price:l.UnitPrice})),c={ListChannelID:this.channelOptions.filter(l=>l.selected).map(l=>l.ID),ListPrice:o};this.http.post("/api/Price/UpdateChannel",c).subscribe(l=>{this.paginationService.resetToFirstPage(this.searchFilter),this.toastr.success("Successfully updated "+c.ListPrice.length+" items in "+c.ListChannelID.length+" channels","Success")})}}updatePriceByVariant(t){let n={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:t.Price-0,VariantID:t.ID};this.http.post("/api/Price/UpdatePriceByID",n).subscribe(a=>{let o=this.productService.findChannelById(n.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") price in "+o.Name+" to "+n.Price,"Success"),this.paginationService.resetToFirstPage(this.searchFilter)})}onUpdateItems(t){const n=this.productService.selectedVariantProduct(t);this.dialog.open(O.j,{data:{selectedItems:n,channels:this.channelOptions},width:"600px"}).afterClosed().pipe((0,h.h)(a=>void 0!==a)).subscribe(a=>{this.channelOptions=a,this.updatePrice(t)})}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/api/${this.rowCountAPI}`,{})}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,t)}})}ngOnDestroy(){this.paginationService.destroy()}}f.\u0275fac=function(t){return new(t||f)(e.Y36(S.O),e.Y36(v._W),e.Y36(Z.uw),e.Y36(L.b),e.Y36(y.M))},f.\u0275cmp=e.Xpm({type:f,selectors:[["app-price-pos-channel"]],decls:2,vars:3,consts:[["headerTitle","Price Comparison",3,"pageData","hideSearchDropdown","textButton","onSubmit",4,"ngIf"],["headerTitle","Price Comparison",3,"pageData","hideSearchDropdown","textButton","onSubmit"],[1,"d-flex"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-md-12",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"showProductToggle","data","channel","filter","onToggle","onSubmit"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(t,n){1&t&&(e.YNc(0,ee,23,21,"mainpanel",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,n.loader$))},dependencies:[s.O5,b.p,Q.a,s.Ov,s.JJ],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});var g=r(8705),E=r(7945),ne=r(1290),q=r(8703),V=r(1739),w=r(1948);function te(i,t){if(1&i&&(e.TgZ(0,"mat-radio-button",3),e._uU(1),e.qZA()),2&i){const n=t.$implicit,a=t.index,o=e.oxw();e.Q6J("value",n.Key)("name",o.name)("title",o.tooltipsText[a]?o.tooltipsText[a]:""),e.xp6(1),e.hij(" ",n.Value,"")}}const ie=function(i){return{"border-0 rounded":i}};class d{constructor(){this.modelChange=new e.vpe,this.border=!1,this.tooltipsText=[]}change(t){this.modelChange.emit(t)}}d.\u0275fac=function(t){return new(t||d)},d.\u0275cmp=e.Xpm({type:d,selectors:[["radio-options"]],inputs:{model:"model",options:"options",border:"border",name:"name",tooltipsText:"tooltipsText"},outputs:{modelChange:"modelChange"},standalone:!0,features:[e.jDz],decls:3,vars:5,consts:[[1,"form-control","h-100",3,"ngClass"],[3,"ngModel","ngModelChange"],["class","me-5","data-toggle","tooltip","data-placement","right",3,"value","name","title",4,"ngFor","ngForOf"],["data-toggle","tooltip","data-placement","right",1,"me-5",3,"value","name","title"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"mat-radio-group",1),e.NdJ("ngModelChange",function(o){return n.change(o)}),e.YNc(2,te,2,4,"mat-radio-button",2),e.qZA()()),2&t&&(e.Q6J("ngClass",e.VKq(3,ie,0==n.border)),e.xp6(1),e.Q6J("ngModel",n.model),e.xp6(1),e.Q6J("ngForOf",n.options))},dependencies:[s.ez,s.mk,s.sg,w.Fk,w.VQ,w.U0,p.u5,p.JJ,p.On],styles:[".mat-radio-label{margin-top:auto;margin-bottom:auto}"]});var A=r(4954);function oe(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"button",18),e.NdJ("click",function(){e.CHM(n);const o=e.oxw();return e.KtG(o.onUpdateItems())}),e._UZ(1,"i",19),e._uU(2," Update "),e.qZA()}}function ae(i,t){if(1&i&&(e.TgZ(0,"th",20),e._uU(1),e.qZA()),2&i){const n=t.$implicit;e.xp6(1),e.Oqu(n.Name)}}function ce(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"th")(1,"input",21),e.NdJ("ngModelChange",function(o){e.CHM(n);const c=e.oxw();return e.KtG(c.checkboxState=o)})("ngModelChange",function(){e.CHM(n);const o=e.oxw();return e.KtG(o.onSelectAllData())}),e.qZA()()}if(2&i){const n=e.oxw();e.xp6(1),e.Q6J("ngModel",n.checkboxState)}}function le(i,t){1&i&&(e.ynx(0),e.TgZ(1,"th",22),e._uU(2," Expected (POS) "),e.qZA(),e.TgZ(3,"th",22),e._uU(4," Channel "),e.qZA(),e.BQk())}function re(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"img",33),e.NdJ("click",function(o){e.CHM(n);const c=e.oxw(3).$implicit,l=e.oxw();return e.KtG(l.onZoomImage(o,null==c?null:c.ImageUrl))}),e.qZA()}if(2&i){const n=e.oxw(3).$implicit;e.s9C("src",null==n?null:n.ImageUrl,e.LSH)}}function se(i,t){1&i&&e._UZ(0,"img",34)}const pe=function(i){return{"border-bottom":i}};function _e(i,t){if(1&i&&(e.ynx(0),e.TgZ(1,"td",28),e.YNc(2,re,1,1,"img",29),e.YNc(3,se,1,0,"ng-template",null,30,e.W1O),e.qZA(),e.TgZ(5,"td",31)(6,"h5",32),e._uU(7),e.qZA(),e._UZ(8,"br"),e.TgZ(9,"small"),e._uU(10),e.qZA()(),e.BQk()),2&i){const n=e.MAs(4),a=e.oxw().index,o=e.oxw().$implicit,c=e.oxw();e.xp6(1),e.Q6J("rowSpan",null==o?null:o.Variants.length)("ngClass",e.VKq(7,pe,a+1==c.products.length)),e.xp6(1),e.Q6J("ngIf",null==o?null:o.ImageUrl)("ngIfElse",n),e.xp6(3),e.Q6J("rowSpan",null==o?null:o.Variants.length),e.xp6(2),e.Oqu(null==o?null:o.Name),e.xp6(3),e.hij("(",null==o?null:o.Category,")")}}function he(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"td",35)(1,"input",21),e.NdJ("ngModelChange",function(o){e.CHM(n);const c=e.oxw().$implicit;return e.KtG(c.selected=o)}),e.qZA()()}if(2&i){const n=e.oxw().$implicit;e.xp6(1),e.Q6J("ngModel",n.selected)}}const ge=function(i){return{"bg-gradient-warning":i}};function de(i,t){if(1&i){const n=e.EpF();e.ynx(0),e.TgZ(1,"td",38),e._uU(2),e.ALo(3,"number"),e.qZA(),e.TgZ(4,"td",39),e.NdJ("click",function(){const c=e.CHM(n).$implicit,l=e.oxw(2).$implicit,N=e.oxw().$implicit,$e=e.oxw();return e.KtG($e.openTableDialog(l,N,c))}),e.TgZ(5,"span",40),e._uU(6),e.ALo(7,"number"),e.qZA(),e.TgZ(8,"a",41),e.NdJ("click",function(o){return null==o?null:o.stopPropagation()}),e._UZ(9,"i",27),e.qZA()(),e.BQk()}if(2&i){const n=t.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,4,n.PriceExpected)," "),e.xp6(2),e.Q6J("ngClass",e.VKq(8,ge,n.Price!=n.PriceExpected)),e.xp6(2),e.hij(" ",e.lcZ(7,6,n.Price)," "),e.xp6(2),e.Q6J("href",n.Url,e.LSH)}}function ue(i,t){1&i&&(e.TgZ(0,"td",42),e._uU(1,"X"),e.qZA(),e.TgZ(2,"td",42),e._uU(3,"X"),e.qZA())}function me(i,t){if(1&i&&(e.ynx(0),e.YNc(1,de,10,10,"ng-container",36),e.YNc(2,ue,4,0,"ng-template",null,37,e.W1O),e.BQk()),2&i){const n=t.$implicit,a=e.MAs(3),o=e.oxw().$implicit,c=e.oxw(2);e.xp6(1),e.Q6J("ngIf",c.getItemFromChannel(o,n.ID))("ngIfElse",a)}}const Y=function(i){return[i]};function Ce(i,t){if(1&i&&(e.TgZ(0,"tr"),e.YNc(1,_e,11,9,"ng-container",23),e.TgZ(2,"td",24),e._uU(3),e.qZA(),e.TgZ(4,"td",24)(5,"span"),e._uU(6),e.qZA(),e.TgZ(7,"span",25)(8,"a",26),e._UZ(9,"i",27),e.qZA()()(),e.YNc(10,he,2,1,"ng-template",16),e.YNc(11,me,4,2,"ng-container",17),e.qZA()),2&i){const n=t.$implicit,a=t.index,o=e.oxw(2);e.xp6(1),e.Q6J("ngIf",0==a),e.xp6(2),e.Oqu(null==n?null:n.Model),e.xp6(3),e.Oqu(null==n?null:n.Code),e.xp6(2),e.Q6J("href","https://"+o.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==n?null:n.ID),e.LSH),e.xp6(2),e.Q6J("ngxPermissionsOnly",e.VKq(6,Y,o.rolePriceEdit)),e.xp6(1),e.Q6J("ngForOf",o.channelOptions)}}function fe(i,t){if(1&i&&(e.TgZ(0,"tbody"),e.YNc(1,Ce,12,8,"tr",17),e.qZA()),2&i){const n=t.$implicit;e.xp6(1),e.Q6J("ngForOf",n.Variants)}}class x{constructor(t,n,a,o,c){this.http=t,this.toastr=n,this.dialog=a,this.productService=o,this.biggerPictureService=c,this.searchFilter=new ne.k,this.products=[],this.checkboxState=!1,this.rolePriceEdit=q.G.price,this.initPageLoader(),this.filterTypeOptions=[{Key:g.v.ALL,Value:"All"},{Key:g.v.DIFFERENCE,Value:"Difference"}],this.filterType=g.v.ALL,this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.hostName=o.getHostName()}initPageLoader(){this.http.post("/api/PriceLoader/LoadMultiple",{}).subscribe(t=>{this.channelOptions=t.Options.Channel,this.searchFilter=t.Filter,this.onFilter()})}onSelectAllData(){this.products=this.products.map(t=>(t.Variants&&(t.Variants=t.Variants.map(n=>(n.selected=this.checkboxState,n))),t))}onFilter(t){this.http.post("/api/Price/GetOutletPrice",{text:t,filterModel:this.filterType,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount}).subscribe(a=>{this.products=a.Data})}updatePrice(){let t=this.productService.selectedVariantProduct(this.products);if(t.length>0){let n=t.map(c=>c.ID),o={ListChannelID:this.channelOptions.filter(c=>c.selected).map(c=>c.ID),ListID:n};this.http.post("/api/Price/UpdateChannelOutletPrice",o).subscribe({next:c=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+o.ListID.length+" items in "+o.ListChannelID.length+" channels","Success")},error:c=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(t=>(t.selected=!1,t))}getItemFromChannel(t,n){return t.Channel.find(a=>a.ChannelID==n)}onUpdateItems(){const t=this.productService.selectedVariantProduct(this.products);this.dialog.open(O.j,{data:{selectedItems:t,channels:this.channelOptions},width:"600px"}).afterClosed().pipe((0,h.h)(n=>_.g.IsNotEmpty(n))).subscribe(n=>{this.channelOptions=n,this.updatePrice()})}openTableDialog(t,n,a){let o=JSON.parse(JSON.stringify(t));this.dialog.open(E.k,{data:{Name:n.Name,Variant:o,ChannelID:a?.ChannelID,Table:"price",ChannelItemID:a?.ChannelItemID}}).afterClosed().pipe((0,h.h)(l=>_.g.IsNotEmpty(l))).subscribe(l=>{this.updateProductPrice(l,a)})}updateProductPrice(t,n){let a={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:parseFloat(t.Price),VariantID:t.ID,SKU:t.Sku};this.http.post("/api/Price/UpdatePriceByID",a).subscribe(o=>{n.Price=a.Price;const c=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success(`Successfully updated ${t.ItemName} (${t.VarName}) inventory in ${c.Name} to ${a.Price}`,"Success")})}onZoomImage(t,n){this.biggerPictureService.openBiggerPicture(t,n)}}x.\u0275fac=function(t){return new(t||x)(e.Y36(S.O),e.Y36(v._W),e.Y36(Z.uw),e.Y36(y.M),e.Y36(V.k))},x.\u0275cmp=e.Xpm({type:x,selectors:[["app-custom-channel-price"]],decls:30,vars:14,consts:[["headerTitle","Price Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit"],["container",""],["name","filterModel",3,"model","options","border","modelChange"],[1,"d-flex"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","5"],["scope","col","colspan","2","class","text-center border-bottom-0 border w-10 text-uppercase",4,"ngFor","ngForOf"],["scope","col","colspan","2",1,"text-center","w-20"],["scope","col",1,"text-start"],["scope","col",1,"text-start","w-10"],[3,"ngxPermissionsOnly"],[4,"ngFor","ngForOf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","w-10","text-uppercase"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"text-end","border-top-0","border","w-10"],[4,"ngIf"],[1,"text-start","border-bottom"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-center","border-bottom",3,"rowSpan"],[1,"mb-0","item-name"],[1,"border","rounded","w-img","cursor-pointer",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],[4,"ngIf","ngIfElse"],["elseCol",""],[1,"text-end","border"],[1,"text-center","border","pointer","cell-hover",3,"ngClass","click"],[1,"me-2"],["target","_blank",3,"href","click"],[1,"table-white","border","text-end",2,"color","red"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return n.onFilter(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Filter by"),e.qZA(),e.TgZ(6,"radio-options",2),e.NdJ("modelChange",function(o){return n.filterType=o}),e.qZA()()()(),e.TgZ(7,"actions")(8,"div",3),e.YNc(9,oe,3,0,"button",4),e.qZA()(),e.TgZ(10,"content")(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"table",9)(16,"thead",10)(17,"tr"),e._UZ(18,"th",11),e.YNc(19,ae,2,1,"th",12),e.qZA(),e.TgZ(20,"tr")(21,"th",13),e._uU(22,"Product"),e.qZA(),e.TgZ(23,"th",14),e._uU(24,"Variant"),e.qZA(),e.TgZ(25,"th",15),e._uU(26,"SKU"),e.qZA(),e.YNc(27,ce,2,1,"ng-template",16),e.YNc(28,le,5,0,"ng-container",17),e.qZA()(),e.YNc(29,fe,2,1,"tbody",17),e.qZA()()()()()()()),2&t&&(e.Q6J("pageData",n.pageData)("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),e.xp6(6),e.Q6J("model",n.filterType)("options",n.filterTypeOptions)("border",!0),e.xp6(3),e.Q6J("ngIf",n.productService.hasSelectionVariant(n.products)),e.xp6(10),e.Q6J("ngForOf",n.channelOptions),e.xp6(8),e.Q6J("ngxPermissionsOnly",e.VKq(12,Y,n.rolePriceEdit)),e.xp6(1),e.Q6J("ngForOf",n.channelOptions),e.xp6(1),e.Q6J("ngForOf",n.products))},dependencies:[s.mk,s.sg,s.O5,p.Wl,p.JJ,p.On,b.p,d,A.gE,s.JJ],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]});var $=r(455),K=r(266);function xe(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"button",8),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2).ngIf,c=e.oxw();return e.KtG(c.openScanDialog(o))}),e._UZ(1,"i",9),e._uU(2," Scan Channel "),e.qZA()}}function Pe(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"button",10),e.NdJ("click",function(){e.CHM(n);const o=e.oxw().ngIf,c=e.oxw(2);return e.KtG(c.updateStock(o))}),e._UZ(1,"i",11),e._uU(2," Update "),e.qZA()}}function be(i,t){if(1&i&&(e.TgZ(0,"actions")(1,"div",5)(2,"div"),e.YNc(3,xe,3,0,"button",6),e.YNc(4,Pe,3,0,"button",7),e.qZA()()()),2&i){const n=t.ngIf,a=e.oxw(2);e.xp6(3),e.Q6J("ngIf",!a.productService.hasSelectionVariant(n)),e.xp6(1),e.Q6J("ngIf",a.productService.hasSelectionVariant(n))}}function Ie(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"th")(1,"input",32),e.NdJ("change",function(o){e.CHM(n);const c=e.oxw().ngIf,l=e.oxw(2);return e.KtG(l.onSelectAllSKU(o.target.checked,c))}),e.qZA()()}}function Te(i,t){if(1&i&&(e.TgZ(0,"ng-option",33),e._UZ(1,"img",34),e._uU(2),e.qZA()),2&i){const n=t.$implicit;e.Q6J("value",n.ID),e.xp6(1),e.s9C("src",n.Img,e.LSH),e.xp6(1),e.hij("",n.Name," ")}}function Se(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"input",52),e.NdJ("ngModelChange",function(o){e.CHM(n);const c=e.oxw(4).$implicit;return e.KtG(c.selected=o)})("ngModelChange",function(){e.CHM(n);const o=e.oxw(4).$implicit,c=e.oxw(3);return e.KtG(c.onCheckboxStateProduct(o))}),e.qZA()}if(2&i){const n=e.oxw(4).$implicit;e.Q6J("ngModel",n.selected)}}function ve(i,t){if(1&i&&e.YNc(0,Se,1,1,"input",51),2&i){const n=e.oxw(2).$implicit,a=e.oxw().$implicit;e.Q6J("ngIf",n.Inventory>=0||a.Variants.length>1)}}function Ze(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"img",53),e.NdJ("click",function(o){e.CHM(n);const c=e.oxw(3).$implicit,l=e.oxw(3);return e.KtG(l.onZoomImage(o,null==c?null:c.ImageUrl))}),e.qZA()}if(2&i){const n=e.oxw(3).$implicit;e.s9C("src",n.ThumbnailUrl,e.LSH)}}function ye(i,t){1&i&&e._UZ(0,"img",54)}const F=function(i){return[i]};function we(i,t){if(1&i&&(e.ynx(0),e.TgZ(1,"td",45)(2,"div",46),e.YNc(3,ve,1,1,"ng-template",21),e.YNc(4,Ze,1,1,"img",47),e.YNc(5,ye,1,0,"ng-template",null,48,e.W1O),e.qZA()(),e.TgZ(7,"td",49)(8,"span",50),e._uU(9),e.qZA(),e._UZ(10,"br"),e.TgZ(11,"small"),e._uU(12),e.qZA()(),e.BQk()),2&i){const n=e.MAs(6),a=e.oxw(2).$implicit,o=e.oxw(3);e.xp6(1),e.Q6J("rowSpan",a.Variants.length),e.xp6(2),e.Q6J("ngxPermissionsOnly",e.VKq(7,F,o.rolePriceEdit)),e.xp6(1),e.Q6J("ngIf",a.ThumbnailUrl)("ngIfElse",n),e.xp6(3),e.Q6J("rowSpan",a.Variants.length),e.xp6(2),e.Oqu(a.Name),e.xp6(3),e.hij("(",a.Category,")")}}function Ae(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"input",57),e.NdJ("ngModelChange",function(o){e.CHM(n);const c=e.oxw(2).$implicit;return e.KtG(c.selected=o)}),e.qZA()}if(2&i){const n=e.oxw(2).$implicit;e.Q6J("ngModel",n.selected)}}function Fe(i,t){if(1&i&&(e.TgZ(0,"td",55),e.YNc(1,Ae,1,1,"input",56),e.qZA()),2&i){const n=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",n.Inventory>=0)}}function De(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"div",58)(1,"div",59),e.NdJ("click",function(){e.CHM(n);const o=e.oxw().$implicit,c=e.oxw().$implicit,l=e.oxw(2).ngIf,N=e.oxw();return e.KtG(N.openTableDialog(o,c,l))}),e._uU(2),e.ALo(3,"number"),e.qZA()()}if(2&i){const n=e.oxw().$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==n.Channel[0]?null:n.Channel[0].Price)," ")}}const Ne=function(i){return{"bg-gradient-warning":i}};function Je(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"tr"),e.YNc(1,we,13,9,"ng-container",4),e.TgZ(2,"td",19),e._uU(3),e.qZA(),e.TgZ(4,"td",22)(5,"span"),e._uU(6),e.qZA(),e.TgZ(7,"span",35)(8,"a",36),e._UZ(9,"i",37),e.qZA()()(),e.YNc(10,Fe,2,1,"ng-template",21),e.TgZ(11,"td",22),e._uU(12),e.ALo(13,"number"),e.qZA(),e.TgZ(14,"td",38),e.YNc(15,De,4,3,"div",39),e.qZA(),e.TgZ(16,"td")(17,"div",40)(18,"div",41)(19,"a",36),e._UZ(20,"i",42),e.qZA(),e._uU(21," \xa0\xa0 "),e.TgZ(22,"span",43),e.NdJ("click",function(){const c=e.CHM(n).$implicit,l=e.oxw(4);return e.KtG(l.refreshPrice(c))}),e._UZ(23,"i",44),e.qZA()()()()()}if(2&i){const n=t.$implicit,a=t.index,o=e.oxw(4);e.xp6(1),e.Q6J("ngIf",0==a),e.xp6(2),e.Oqu(n.Model),e.xp6(3),e.hij(" ",n.Code," "),e.xp6(2),e.Q6J("href","https://"+o.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==n?null:n.ID),e.LSH),e.xp6(2),e.Q6J("ngxPermissionsOnly",e.VKq(11,F,o.rolePriceEdit)),e.xp6(2),e.hij(" ",e.lcZ(13,9,n.UnitPrice)," "),e.xp6(2),e.Q6J("ngClass",e.VKq(13,Ne,n.UnitPrice!=(null==n.Channel[0]?null:n.Channel[0].Price))),e.xp6(1),e.Q6J("ngIf",n.Channel.length>0),e.xp6(4),e.Q6J("href",null==n.Channel[0]?null:n.Channel[0].Url,e.LSH)}}function Me(i,t){if(1&i&&(e.ynx(0),e.YNc(1,Je,24,15,"tr",26),e.BQk()),2&i){const n=t.$implicit;e.xp6(1),e.Q6J("ngForOf",n.Variants)}}function Ue(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"span",60),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(3);return e.KtG(o.getRowCount())}),e.TgZ(1,"i",61),e._uU(2,"?"),e.qZA()()}}function Oe(i,t){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&i){const n=t.ngIf;e.xp6(1),e.Oqu(e.lcZ(2,1,n.Total))}}function ke(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"a",65),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(4);return e.KtG(o.onNextPage())}),e._UZ(1,"i",66),e._uU(2," Next"),e.qZA()}}function Le(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"a",67),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(4);return e.KtG(o.onLastPage())}),e._UZ(1,"i",68),e._uU(2," Last"),e.qZA()}}function Qe(i,t){if(1&i&&(e.TgZ(0,"div",62),e.YNc(1,ke,3,0,"a",63),e.YNc(2,Le,3,0,"a",64),e.qZA()),2&i){const n=e.oxw(3);e.xp6(1),e.Q6J("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage),e.xp6(1),e.Q6J("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage)}}function Ee(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"content")(1,"div",12)(2,"div",13)(3,"table",14)(4,"thead",15)(5,"tr")(6,"th",16),e._uU(7," Product "),e.TgZ(8,"div")(9,"mat-slide-toggle",17),e.NdJ("ngModelChange",function(o){e.CHM(n);const c=e.oxw(2);return e.KtG(c.toggleDifferentInventory=o)})("toggleChange",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.onToggleDifferentInventory())}),e.TgZ(10,"small",18),e._uU(11,"FILTER DIFFERENT PRICE"),e.qZA()()()(),e.TgZ(12,"th",19),e._uU(13,"Variant"),e.qZA(),e.TgZ(14,"th",20),e._uU(15,"SKU"),e.qZA(),e.YNc(16,Ie,2,0,"ng-template",21),e.TgZ(17,"th",22),e._uU(18,"POS"),e.qZA(),e.TgZ(19,"th")(20,"ng-select",23),e.NdJ("ngModelChange",function(o){e.CHM(n);const c=e.oxw(2);return e.KtG(c.searchFilter.ChannelID=o)})("change",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.search())}),e.YNc(21,Te,3,3,"ng-option",24),e.qZA()(),e._UZ(22,"th",25),e.qZA()(),e.TgZ(23,"tbody"),e.YNc(24,Me,2,1,"ng-container",26),e.qZA()(),e.TgZ(25,"div",27)(26,"div",28)(27,"div",29),e._uU(28),e.ALo(29,"number"),e.YNc(30,Ue,3,0,"span",30),e.YNc(31,Oe,3,3,"span",4),e.ALo(32,"async"),e._uU(33),e.qZA()(),e.YNc(34,Qe,3,2,"div",31),e.qZA()()()()}if(2&i){const n=t.ngIf,a=e.oxw().ngIf,o=e.oxw();e.xp6(9),e.Q6J("ngModel",o.toggleDifferentInventory),e.xp6(7),e.Q6J("ngxPermissionsOnly",e.VKq(15,F,o.rolePriceEdit)),e.xp6(4),e.Q6J("clearable",!1)("ngModel",o.searchFilter.ChannelID),e.xp6(1),e.Q6J("ngForOf",a.Options.Channel),e.xp6(3),e.Q6J("ngForOf",n),e.xp6(4),e.hij(" Showing 1 - ",e.lcZ(29,11,null==n?null:n.length)," of "),e.xp6(2),e.Q6J("ngIf",o.paginationService.hideCount),e.xp6(1),e.Q6J("ngIf",e.lcZ(32,13,!o.paginationService.hideCount&&o.allDataCount$)),e.xp6(2),e.hij(" records ~ ",o.paginationService.footerPageNumber," Page "),e.xp6(1),e.Q6J("ngIf",n.length>0)}}function qe(i,t){if(1&i){const n=e.EpF();e.TgZ(0,"mainpanel",1),e.NdJ("textChange",function(o){e.CHM(n);const c=e.oxw();return e.KtG(c.searchFilter.text=o)})("onSubmit",function(){e.CHM(n);const o=e.oxw();return e.KtG(o.search())}),e.TgZ(1,"filters")(2,"div",2)(3,"div")(4,"label"),e._uU(5,"Page Size"),e.qZA(),e.TgZ(6,"input",3),e.NdJ("ngModelChange",function(o){e.CHM(n);const c=e.oxw();return e.KtG(c.searchFilter.RowCount=o)}),e.qZA()()()(),e.YNc(7,be,5,2,"actions",4),e.ALo(8,"async"),e.YNc(9,Ee,35,17,"content",4),e.ALo(10,"async"),e.qZA()}if(2&i){const n=e.oxw();e.Q6J("headerTitle",n.pageTitle)("text",n.searchFilter.text),e.xp6(6),e.Q6J("ngModel",n.searchFilter.RowCount),e.xp6(1),e.Q6J("ngIf",e.lcZ(8,5,n.paginationService.data$)),e.xp6(2),e.Q6J("ngIf",e.lcZ(10,7,n.paginationService.data$))}}class P{constructor(t,n,a,o,c,l){this.http=t,this.paginationService=n,this.toastr=a,this.dialog=o,this.productService=c,this.biggerPictureService=l,this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.allDataCountEndpoint="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=q.G.price,this.hostName=this.productService.getHostName()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe((0,k.b)(t=>{this.searchFilter=t.Filter,this.searchFilter.filterModel=g.v.ALL,this.paginationService.resetToFirstPage(this.searchFilter)}))}onToggleDifferentInventory(){this.searchFilter.filterModel=this.toggleDifferentInventory?g.v.ALL:g.v.DIFFERENCE,this.search()}onCheckboxStateProduct(t){t.Variants=t.Variants.map(n=>(n.selected=t.selected,n))}openScanDialog(t){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=_.g.GuidEMpty,this.dialog.open(U.j,{data:{filter:n,channelOptions:t.Options.Channel},width:"600px"}).afterClosed().pipe((0,h.h)(a=>_.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.searchFilter.Async=a.Async,this.scanAll(t)})}scanAll(t){const n=this.productService.findChannelById(this.searchFilter.ChannelID,t.Options.Channel);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(a=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(),this.toastr.success(`Successfully scanned from ${n?.Name}`,"Success"))})}updateStock(t){let a=this.productService.selectedVariantProduct(t).map(c=>({ID:c.ID,ChannelID:c.Channel[0].ChannelID,Code:c.Code,Price:c.UnitPrice})),o={ListChannelID:[this.searchFilter.ChannelID],ListPrice:a};this.http.post("/api/Price/UpdateChannel",o).subscribe(()=>{this.search(),this.toastr.success(`Successfully updated ${o.ListPrice.length} variants in ${o.ListChannelID.length} channels`,"Success")})}refreshPrice(t){this.http.post("/api/Price/RefreshPriceChannel",{ChannelItemID:t?.Channel[0].ChannelItemID,ChannelVariationID:t?.Channel[0]?.ChannelVariationID,ChannelID:t?.Channel[0]?.ChannelID,VariantID:t.ID}).subscribe(a=>{this.toastr.success("Successfully updated","Success"),this.search()})}search(){this.paginationService.resetToFirstPage(this.searchFilter)}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){this.http.post(`/API/${this.allDataCountEndpoint}`,this.searchFilter).subscribe({next:t=>{this.paginationService.getAllData(this.searchFilter,t.Total)}})}openTableDialog(t,n,a){let o=JSON.parse(JSON.stringify(t));this.dialog.open(E.k,{data:{Name:n.Name,Variant:o,ChannelID:o?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:o?.Channel[0]?.ChannelItemID}}).afterClosed().pipe((0,h.h)(l=>_.g.IsNotEmpty(l))).subscribe(l=>{this.updateItemAfterDialog(l,a,t)})}updateItemAfterDialog(t,n,a){let o={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:parseFloat(t.Price),VariantID:t.ID,SKU:t.Sku};this.http.post("/api/Price/UpdatePriceByID",o).subscribe(c=>{const l=this.productService.findChannelById(o.ID,n.Options.Channel);this.toastr.success(`Successfully updated ${t.ItemName} (${t.VarName}) inventory in ${l.Name} to ${o.Price}`,"Success"),a.Channel[0]&&(a.Channel[0].Price=o.Price)})}onSelectAllSKU(t,n){n=n.map(a=>(a.Variants=a.Variants.map(o=>(o.selected=t,o)),a))}onZoomImage(t,n){this.biggerPictureService.openBiggerPicture(t,n)}ngOnDestroy(){this.paginationService.destroy()}}P.\u0275fac=function(t){return new(t||P)(e.Y36(S.O),e.Y36(L.b),e.Y36(v._W),e.Y36(Z.uw),e.Y36(y.M),e.Y36(V.k))},P.\u0275cmp=e.Xpm({type:P,selectors:[["app-price-single-channel"]],decls:2,vars:3,consts:[[3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[3,"headerTitle","text","textChange","onSubmit"],["container",""],["type","number",3,"ngModel","ngModelChange"],[4,"ngIf"],[1,"d-flex"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModel","ngModelChange","toggleChange"],[1,"fw-bold"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["name","channelOption",3,"clearable","ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[2,"width","4%"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],["class","btn-group",4,"ngIf"],["type","checkbox",1,"me-3",3,"change"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-external-link-alt"],[1,"text-end",3,"ngClass"],["class","row justify-content-end me-0",4,"ngIf"],[1,"row"],[1,"col-12","ps-0","d-flex","justify-content-between"],[1,"fas","external-link-custom","fa-lg","fa-external-link-alt"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],["class","border rounded w-img cursor-pointer","style","margin-left: 20px",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox","class","me-3",3,"ngModel","ngModelChange",4,"ngIf"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"row","justify-content-end","me-0"],[1,"col-8","ps-0","pe-12","text-end",2,"cursor","pointer",3,"click"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(t,n){1&t&&(e.YNc(0,qe,11,9,"mainpanel",0),e.ALo(1,"async")),2&t&&e.Q6J("ngIf",e.lcZ(1,1,n.loader$))},dependencies:[s.mk,s.sg,s.O5,p.Fj,p.wV,p.Wl,p.JJ,p.On,b.p,T.w9,T.jq,$.Rr,K.gM,A.gE,s.Ov,s.JJ],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"]});var D=r(8063);const Ve=[{path:"",component:C,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",component:f,canActivate:[D.a],data:{title:"Global Price Comparison"}},{path:"OutletPrice",component:x,canActivate:[D.a],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",component:P,canActivate:[D.a],data:{title:"Price Single Channel Comparison"}}]}];class u{}u.\u0275fac=function(t){return new(t||u)},u.\u0275mod=e.oAB({type:u}),u.\u0275inj=e.cJS({imports:[s.ez,I.Bz.forChild(Ve)]});var Ye=r(6709);class m{}m.\u0275fac=function(t){return new(t||m)},m.\u0275mod=e.oAB({type:m}),m.\u0275inj=e.cJS({imports:[s.ez,p.u5,M.Z,b.R,I.Bz,T.A0,u,p.UX,$.rP,Ye.p9,K.AV,d,Q.a,A.VI.forChild()]})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[592],{2428:(m,c,a)=>{a.d(c,{T:()=>o});var n=a(8505),t=a(1889),i=a(4650),p=a(1318),s=a(7185);class o{constructor(e,l){this.httpService=e,this.toastr=l}getChannel(e){return this.httpService.post("/api/Channel/GetChannel",e)}getChannelLoader(){return this.httpService.get("/api/ChannelLoader/GetChannelLoader")}testShopID(e){return this.httpService.post("/api/Channel/TestShopID",e).pipe((0,n.b)(l=>{this.showTostrSuccessTestShopID(l)}))}updateChannelIndex(e){return this.httpService.post("/api/Channel/UpdateChannelIndex",e)}deleteChannel(e){return this.httpService.post("/api/Channel/DeleteChannel",e)}mapChannelImage(e){return e.map(l=>(l.img=t.g.getChannelLogoByTypeId(l.TypeID),l))}showTostrSuccessTestShopID(e){let l="";for(var u in e)l+=u+" : "+e[u]+"<br/>";this.toastr.success(l,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}}o.\u0275fac=function(e){return new(e||o)(i.LFG(p.O),i.LFG(s._W))},o.\u0275prov=i.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"})},1290:(m,c,a)=>{a.d(c,{k:()=>n});class n{}},9608:(m,c,a)=>{a.d(c,{$:()=>n});class n{constructor(){this.ID="00000000-0000-0000-0000-000000000000",this.ShopID=0,this.Name="",this.TypeID=0,this.LastProductSync=new Date,this.POSOutlet="",this.POSTax="",this.POSInvoicePaymentMethod="",this.POSSalesOrderType="",this.URL="",this.POSDeliveryOutlet="",this.ProductCategoryDefault=null,this.SyncOrder=!0,this.CustomerDefaultEmail=null,this.InventoryLog=2,this.IsComplete=!1,this.OrderLog=3,this.SyncInventory=!0,this.POSInventoryOutlet="",this.POSWriteOff="",this.Register="",this.POSInventoryOutletArray=[],this.MinimumInventory="",this.Additionalitem="",this.ConsumerKey="",this.ConsumerSecret="",this.ShopIDString="",this.Index=0,this.ServiceFeeWriteOffReason="",this.ServiceFeeWriteOff=!1}}},1108:(m,c,a)=>{a.d(c,{f:()=>i});var n=a(6895),t=a(4650);class i{}i.\u0275fac=function(s){return new(s||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[n.ez]})},6732:(m,c,a)=>{a.d(c,{y:()=>s});var n=a(6895),t=a(4650);function i(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"span",10),t.NdJ("click",function(){t.CHM(e);const u=t.oxw();return t.KtG(u.getTotal())}),t.TgZ(1,"i",11),t._uU(2,"?"),t.qZA()()}}function p(o,r){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&o){const e=t.oxw();t.xp6(1),t.Oqu(t.lcZ(2,1,e.paginationTotal))}}class s{constructor(){this.get=new t.vpe,this.change=new t.vpe,this.next=new t.vpe,this.previous=new t.vpe,this.total=new t.vpe,this.hasClicked=!1}changePage(r){this.filter.PageNumber=r.pageIndex+1,this.change.emit(this.filter)}getTotal(){this.total.emit()}PreviousPage(){this.previous.emit()}NextPage(){this.next.emit()}}s.\u0275fac=function(r){return new(r||s)},s.\u0275cmp=t.Xpm({type:s,selectors:[["app-custom-paginator"]],inputs:{filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{get:"get",change:"change",next:"next",previous:"previous",total:"total"},standalone:!0,features:[t.jDz],decls:16,vars:11,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"hidden","click"],[1,"fas","fa-arrow-left"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"hidden","click"],[1,"fas","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(r,e){1&r&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._uU(3),t.ALo(4,"number"),t.ALo(5,"number"),t.YNc(6,i,3,0,"span",3),t.YNc(7,p,3,3,"span",4),t._uU(8),t.qZA()(),t.TgZ(9,"div",5)(10,"a",6),t.NdJ("click",function(){return e.PreviousPage()}),t._UZ(11,"i",7),t._uU(12," Prev"),t.qZA(),t.TgZ(13,"a",8),t.NdJ("click",function(){return e.NextPage()}),t._UZ(14,"i",9),t._uU(15," Next"),t.qZA()()()),2&r&&(t.xp6(3),t.AsE(" Showing ",t.lcZ(4,7,e.filter.PageSize*(e.filter.PageNumber-1)+1)," - ",t.lcZ(5,9,e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata)," of "),t.xp6(3),t.Q6J("ngIf",!e.hasClicked),t.xp6(1),t.Q6J("ngIf",e.hasClicked),t.xp6(1),t.hij(" records ~ ",e.filter.PageNumber," Page "),t.xp6(2),t.Q6J("hidden",1==e.filter.PageNumber),t.xp6(3),t.Q6J("hidden",e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata==e.paginationTotal||e.totaldata<e.filter.PageSize))},dependencies:[n.ez,n.O5,n.JJ]})},5585:(m,c,a)=>{a.d(c,{Q:()=>g});var n=a(4650),t=a(3238),i=a(9602),p=a(9549),s=a(4144),o=a(8277);a(5439);class g{constructor(){this.disabled=!1,this.dateChange=new n.vpe,this.width="100%",this.displayToggle=!0}ngAfterViewInit(){}change(d){console.log(d);let _=d.toDate();console.log(_),this.dateChange.emit(_)}onOpenDatepicker(){var d=new bootstrap.Dropdown(document.getElementById("dropdown-filter"));d&&(d._config.autoClose="inside")}onCloseDatepicker(){var d=new bootstrap.Dropdown(document.getElementById("dropdown-filter"));d&&(d._config.autoClose="outside")}}g.\u0275fac=function(d){return new(d||g)},g.\u0275cmp=n.Xpm({type:g,selectors:[["datepicker"]],inputs:{placeholder:"placeholder",displayToggle:"displayToggle",date:"date",disabled:"disabled",width:"width"},outputs:{dateChange:"dateChange"},standalone:!0,features:[n._Bn([i.FA,{provide:t._A,useClass:o.t7,deps:[t.Ad]},{provide:t.sG,useValue:{parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}}}]),n.jDz],decls:5,vars:6,consts:[[1,"date-picker"],["matInput","",3,"matDatepicker","placeholder","value","dateChange","click"],["matSuffix","",3,"for"],[3,"opened","closed"],["picker1",""]],template:function(d,_){if(1&d){const h=n.EpF();n.TgZ(0,"mat-form-field",0)(1,"input",1),n.NdJ("dateChange",function(C){return _.change(C.value)})("click",function(){n.CHM(h);const C=n.MAs(4);return n.KtG(C.open())}),n.qZA(),n._UZ(2,"mat-datepicker-toggle",2),n.TgZ(3,"mat-datepicker",3,4),n.NdJ("opened",function(){return _.onOpenDatepicker()})("closed",function(){return _.onCloseDatepicker()}),n.qZA()()}if(2&d){const h=n.MAs(4);n.Udp("width",_.width),n.xp6(1),n.s9C("placeholder",_.placeholder||""),n.Q6J("matDatepicker",h)("value",_.date),n.xp6(1),n.Q6J("for",h)}},dependencies:[t.XK,i.FA,i.Mq,i.hl,i.nW,p.lN,p.KE,p.R9,s.c,s.Nt],styles:["mat-form-field.date-picker.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{background-color:#fff!important;height:45px!important;font-size:14px;padding-left:4px}\n"],encapsulation:2})},9640:(m,c,a)=>{a.d(c,{s:()=>t});var n=a(4650);class t{constructor(){this.emptyStateImg="https://res.cloudinary.com/pos/image/upload/v1683772105/icons/marketplace_icons/emptyrecord.svg"}ngOnInit(){}}t.\u0275fac=function(p){return new(p||t)},t.\u0275cmp=n.Xpm({type:t,selectors:[["app-empty-state"]],standalone:!0,features:[n.jDz],decls:4,vars:1,consts:[["alt","",2,"width","225px",3,"src"],[1,"text-center","fs-2","text-secondary","mt-4"]],template:function(p,s){1&p&&(n.TgZ(0,"div"),n._UZ(1,"img",0),n.TgZ(2,"div",1),n._uU(3," No records found "),n.qZA()()),2&p&&(n.xp6(1),n.Q6J("src",s.emptyStateImg,n.LSH))}})},2594:(m,c,a)=>{a.d(c,{n:()=>s});var n=a(6895),t=a(4650);function i(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"span",10),t.NdJ("click",function(){t.CHM(e);const u=t.oxw();return u.getTotal(),t.KtG(u.hasClicked=!0)}),t.TgZ(1,"i",11),t._uU(2,"?"),t.qZA()()}}function p(o,r){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&o){const e=t.oxw();t.xp6(1),t.Oqu(t.lcZ(2,1,e.paginationTotal))}}class s{constructor(){this.get=new t.vpe,this.change=new t.vpe,this.next=new t.vpe,this.previous=new t.vpe,this.total=new t.vpe,this.hasClicked=!1}changePage(r){this.filter.PageNumber=r.pageIndex+1,this.change.emit(this.filter)}getTotal(){this.total.emit()}PreviousPage(){this.previous.emit()}NextPage(){this.next.emit()}}s.\u0275fac=function(r){return new(r||s)},s.\u0275cmp=t.Xpm({type:s,selectors:[["app-mat-paginator-no-count"]],inputs:{filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{get:"get",change:"change",next:"next",previous:"previous",total:"total"},standalone:!0,features:[t.jDz],decls:13,vars:10,consts:[[1,"d-flex","justify-content-end","mt-5"],[1,"d-sm-block","collapse","mt-3","me-5"],[1,"text-dark","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary","btn-sm","me-3","border-0",3,"disabled","click"],[1,"fas","fa-chevron-left"],["role","button",1,"btn","btn-outline-secondary","btn-sm","border-0",3,"disabled","click"],[1,"fas","fa-chevron-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(r,e){1&r&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._uU(3),t.ALo(4,"number"),t.ALo(5,"number"),t.YNc(6,i,3,0,"span",3),t.YNc(7,p,3,3,"span",4),t.qZA()(),t.TgZ(8,"div",5)(9,"button",6),t.NdJ("click",function(){return e.PreviousPage()}),t._UZ(10,"i",7),t.qZA(),t.TgZ(11,"button",8),t.NdJ("click",function(){return e.NextPage()}),t._UZ(12,"i",9),t.qZA()()()),2&r&&(t.xp6(3),t.AsE(" Showing ",t.lcZ(4,6,e.filter.PageSize*(e.filter.PageNumber-1)+1)," - ",t.lcZ(5,8,e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata)," of "),t.xp6(3),t.Q6J("ngIf",!e.hasClicked),t.xp6(1),t.Q6J("ngIf",e.hasClicked),t.xp6(2),t.Q6J("disabled",1==e.filter.PageNumber),t.xp6(2),t.Q6J("disabled",e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata==e.paginationTotal||e.totaldata<e.filter.PageSize))},dependencies:[n.ez,n.O5,n.JJ]})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";var e,h={},v={};function r(e){var n=v[e];if(void 0!==n)return n.exports;var t=v[e]={id:e,loaded:!1,exports:{}};return h[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=h,e=[],r.O=(n,t,f,o)=>{if(!t){var a=1/0;for(c=0;c<e.length;c++){for(var[t,f,o]=e[c],b=!0,d=0;d<t.length;d++)(!1&o||a>=o)&&Object.keys(r.O).every(u=>r.O[u](t[d]))?t.splice(d--,1):(b=!1,o<a&&(a=o));if(b){e.splice(c--,1);var s=f();void 0!==s&&(n=s)}}return n}o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[t,f,o]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},(()=>{var n,e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;r.t=function(t,f){if(1&f&&(t=this(t)),8&f||"object"==typeof t&&t&&(4&f&&t.__esModule||16&f&&"function"==typeof t.then))return t;var o=Object.create(null);r.r(o);var c={};n=n||[null,e({}),e([]),e(e)];for(var a=2&f&&t;"object"==typeof a&&!~n.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach(b=>c[b]=()=>t[b]);return c.default=()=>t,r.d(o,c),o}})(),r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>(592===e?"common":e)+"."+{46:"40ebac81bd0fb91b",53:"3655b31ecb37ade9",213:"d00d0a3f05c831f7",277:"e644e3531765ce65",360:"8279e3b4ceab63e1",369:"a12060880985ee8f",378:"7f743ac9660ec6e6",379:"aad8784dbdb3dd33",392:"f4537160149f627a",395:"2943aa5a44308399",397:"8ba047b91801962d",425:"03f8f97da7452806",455:"c9dd08adf08a1b65",481:"64ffd74d20798f93",501:"7645c32a140dd7f8",512:"52dc49022c04fa43",533:"cc5ab7f3ce13770c",545:"4809f373cc63f3b4",592:"af67cc08f47a8d44",655:"ae475c8285604367",717:"5d253da5bb63552f",739:"0de1f18deac0ed90",767:"d939ac65d1cb16fb",859:"3a4d26983bbb5254",874:"5b06431d2b5a1e8f",913:"ec8155bc121fb0a6",993:"5c22ca4b00b8c459",997:"1e5281aa64540dee"}[e]+".js",r.miniCssF=e=>{},r.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="pos-marketplace:";r.l=(t,f,o,c)=>{if(e[t])e[t].push(f);else{var a,b;if(void 0!==o)for(var d=document.getElementsByTagName("script"),s=0;s<d.length;s++){var i=d[s];if(i.getAttribute("src")==t||i.getAttribute("data-webpack")==n+o){a=i;break}}a||(b=!0,(a=document.createElement("script")).type="module",a.charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",n+o),a.src=r.tu(t)),e[t]=[f];var p=(g,u)=>{a.onerror=a.onload=null,clearTimeout(l);var _=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),_&&_.forEach(y=>y(u)),g)return g(u)},l=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),b&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="https://cdn.jsdelivr.net/npm/marketplacepos@2.9.3/Marketplace/",(()=>{var e={666:0};r.f.j=(f,o)=>{var c=r.o(e,f)?e[f]:void 0;if(0!==c)if(c)o.push(c[2]);else if(666!=f){var a=new Promise((i,p)=>c=e[f]=[i,p]);o.push(c[2]=a);var b=r.p+r.u(f),d=new Error;r.l(b,i=>{if(r.o(e,f)&&(0!==(c=e[f])&&(e[f]=void 0),c)){var p=i&&("load"===i.type?"missing":i.type),l=i&&i.target&&i.target.src;d.message="Loading chunk "+f+" failed.\n("+p+": "+l+")",d.name="ChunkLoadError",d.type=p,d.request=l,c[1](d)}},"chunk-"+f,f)}else e[f]=0},r.O.j=f=>0===e[f];var n=(f,o)=>{var d,s,[c,a,b]=o,i=0;if(c.some(l=>0!==e[l])){for(d in a)r.o(a,d)&&(r.m[d]=a[d]);if(b)var p=b(r)}for(f&&f(o);i<c.length;i++)r.o(e,s=c[i])&&e[s]&&e[s][0](),e[s]=0;return r.O(p)},t=self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))})()})();
|