marketplacepos 2.6.0 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[832],{1832:(ie,Z,d)=>{d.r(Z),d.d(Z,{LogsModule:()=>ne});var s=d(6895),e=d(4650),p=d(6806),v=d(7398);let y=(()=>{class o{constructor(){this.ObjectlogTabs=[{Title:"Sync Orders",Url:"/menu/log/order"},{Title:"Inventory Log ",Url:"/menu/log/inventory"},{Title:"Marketplace Webhook ",Url:"/menu/log/rawlog"},{Title:"Application Exception ",Url:"/menu/log/exception"}]}ngOnInit(){}}return o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=e.Xpm({type:o,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(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.ObjectlogTabs))},dependencies:[p.lC,v.e]}),o})();var g=d(8063),c=d(1318);let h=(()=>{class o{constructor(){}get Data(){return this._Data}set Data(t){this._Data=t}Fill(t){return this._Data.find(n=>n._id==t)}}return o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var l=d(4006),u=d(7481),m=d(8739),T=d(8796),f=d(5585);const b=function(){return["/menu/log/order/detail"]},A=function(o){return{ID:o}},q=function(o,r){return{"bg-warning":o,"bg-success":r}};function O(o,r){if(1&o&&(e.TgZ(0,"tr")(1,"td")(2,"a",17),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")(12,"span",18),e._uU(13),e.qZA()()()),2&o){const t=r.$implicit;e.xp6(2),e.Q6J("routerLink",e.DdM(11,b))("queryParams",e.VKq(12,A,t.ID)),e.xp6(1),e.hij(" ",e.xi3(4,8,t.Created,"dd MMM yyyy HH:mm")," "),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(14,q,200!==t.ResponseCode,200===t.ResponseCode)),e.xp6(1),e.Oqu(t.ResponseCode)}}let L=(()=>{class o{constructor(t,n,i){this.http=t,this._RawLogService=n,this.route=i,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""}}ngOnInit(){this.route.queryParams.subscribe(t=>{this.responseCode=t.responseCode,null!=this.responseCode?this.Load(t):this.Load()})}Load(t={}){this.http.post("/api/OrdersLoader/Get",t).subscribe(n=>{this.filter=n.Filter,this.Channel=n.Options.Channel,this.ActionTypeList=n.Options.ActionTypeList,this.Get()})}Get(t){this.filter.Number=t,this.http.post("/api/Orders/Get",this.filter).subscribe(n=>{this._RawLogService.Data=n.hits,this.Result=Array();for(let i of n.hits)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});this.paginationTotal=n.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(c.O),e.Y36(h),e.Y36(p.gz))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-order"]],decls:49,vars:17,consts:[["searchBoxPlaceHolder","Invoice Number..",3,"headerTitle","text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["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","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"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"],[1,"text-white","p-1","rounded","response-desc",3,"ngClass"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(a){return n.Number=a})("onSubmit",function(a){return n.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 n.filter.ChannelID=a}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"Action"),e.qZA(),e.TgZ(10,"ng-select",3),e.NdJ("ngModelChange",function(a){return n.filter.ActionType=a}),e.qZA()(),e.TgZ(11,"div")(12,"h6"),e._uU(13,"From/To"),e.qZA(),e.TgZ(14,"datepicker",4),e.NdJ("dateChange",function(a){return n.filter.From=a}),e.qZA(),e.TgZ(15,"datepicker",5),e.NdJ("dateChange",function(a){return n.filter.To=a}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"Response Code"),e.qZA(),e.TgZ(19,"input",6),e.NdJ("ngModelChange",function(a){return n.filter.StatusCode=a}),e.qZA()(),e.TgZ(20,"div")(21,"h6"),e._uU(22,"Page Number"),e.qZA(),e.TgZ(23,"input",7),e.NdJ("ngModelChange",function(a){return n.filter.PageNumber=a}),e.qZA()(),e.TgZ(24,"div")(25,"h6"),e._uU(26,"Page Size"),e.qZA(),e.TgZ(27,"input",8),e.NdJ("ngModelChange",function(a){return n.filter.RowCount=a}),e.qZA()()()(),e.TgZ(28,"content")(29,"div",9)(30,"div",10)(31,"div",11)(32,"div",12)(33,"table",13)(34,"thead")(35,"tr",14)(36,"th"),e._uU(37,"Date"),e.qZA(),e.TgZ(38,"th"),e._uU(39,"Channel"),e.qZA(),e.TgZ(40,"th"),e._uU(41,"Actions"),e.qZA(),e.TgZ(42,"th"),e._uU(43,"Number"),e.qZA(),e.TgZ(44,"th"),e._uU(45,"Code"),e.qZA()()(),e.TgZ(46,"tbody"),e.YNc(47,O,14,17,"tr",15),e.qZA()(),e.TgZ(48,"mat-paginator",16),e.NdJ("page",function(a){return n.changePage(a)}),e.qZA()()()()()()()),2&t&&(e.Q6J("headerTitle","Order Log")("text",n.Number),e.xp6(6),e.Q6J("clearable",!0)("items",n.Channel)("ngModel",n.filter.ChannelID),e.xp6(4),e.Q6J("clearable",!0)("items",n.ActionTypeList)("ngModel",n.filter.ActionType),e.xp6(4),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(4),e.Q6J("ngModel",n.filter.StatusCode),e.xp6(4),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.RowCount),e.xp6(20),e.Q6J("ngForOf",n.Result),e.xp6(1),e.Q6J("length",n.paginationTotal)("pageSize",n.paginationPageSize)("pageIndex",0==(null==n.filter?null:n.filter.PageNumber)?0:(null==n.filter?null:n.filter.PageNumber)-1))},dependencies:[s.mk,s.sg,l.Fj,l.wV,l.JJ,l.On,p.yS,u.p,m.NW,T.w9,f.QB,s.uU]}),o})();const U=function(){return["/menu/log/inventory/detail"]},S=function(o){return{ID:o}};function I(o,r){if(1&o&&(e.TgZ(0,"tr")(1,"td")(2,"a",15),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=r.$implicit;e.xp6(2),e.Q6J("routerLink",e.DdM(10,U))("queryParams",e.VKq(11,S,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)}}let w=(()=>{class o{constructor(t,n){this.http=t,this._RawLogService=n,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(t=>{this.filter=t.Filter,this.Channel=t.Options.Channel,this.ActionTypeList=t.Options.ActionTypeList,this.Get()})}Get(t){null!=t&&(this.filter.Sku=t),this.http.post("api/Inventory/GetLog",this.filter).subscribe(n=>{this._RawLogService.Data=n.hits,this.Result=Array();for(let i of n.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=n.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount,this.paginationTotal=n.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(c.O),e.Y36(h))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-inventory-log"]],decls:41,vars:13,consts:[["searchBoxPlaceHolder","Enter SKU...",3,"headerTitle","text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["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"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(a){return n.filter.Sku=a})("onSubmit",function(a){return n.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 n.filter.ChannelID=a}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"From/To"),e.qZA(),e.TgZ(10,"datepicker",3),e.NdJ("dateChange",function(a){return n.filter.From=a}),e.qZA(),e.TgZ(11,"datepicker",4),e.NdJ("dateChange",function(a){return n.filter.To=a}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Number"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(a){return n.filter.PageNumber=a}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"Page Size"),e.qZA(),e.TgZ(19,"input",6),e.NdJ("ngModelChange",function(a){return n.filter.RowCount=a}),e.qZA()()()(),e.TgZ(20,"content")(21,"div",7)(22,"div",8)(23,"div",9)(24,"div",10)(25,"table",11)(26,"thead")(27,"tr",12)(28,"th"),e._uU(29,"Created"),e.qZA(),e.TgZ(30,"th"),e._uU(31,"Channel"),e.qZA(),e.TgZ(32,"th"),e._uU(33,"SKU"),e.qZA(),e.TgZ(34,"th"),e._uU(35,"Stock"),e.qZA(),e.TgZ(36,"th"),e._uU(37,"Response code"),e.qZA()()(),e.TgZ(38,"tbody"),e.YNc(39,I,13,13,"tr",13),e.qZA()(),e.TgZ(40,"mat-paginator",14),e.NdJ("page",function(a){return n.changePage(a)}),e.qZA()()()()()()()),2&t&&(e.Q6J("headerTitle","Inventory Log")("text",n.filter.Sku),e.xp6(6),e.Q6J("clearable",!0)("items",n.Channel)("ngModel",n.filter.ChannelID),e.xp6(4),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(4),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.RowCount),e.xp6(20),e.Q6J("ngForOf",n.Result),e.xp6(1),e.Q6J("length",n.paginationTotal)("pageSize",n.paginationPageSize)("pageIndex",0==(null==n.filter?null:n.filter.PageNumber)?0:(null==n.filter?null:n.filter.PageNumber)-1))},dependencies:[s.sg,l.Fj,l.wV,l.JJ,l.On,p.yS,u.p,m.NW,T.w9,f.QB,s.uU]}),o})();const N=function(){return["/menu/log/order/detail"]},R=function(o){return{ID:o}};function D(o,r){if(1&o&&(e.TgZ(0,"tr")(1,"td")(2,"a",16),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=r.$implicit;e.xp6(2),e.Q6J("routerLink",e.DdM(9,N))("queryParams",e.VKq(10,R,t.id)),e.xp6(1),e.hij(" ",e.xi3(4,6,t.Created,"dd MMM yyyy HH:mm")," "),e.xp6(3),e.Oqu(t.type),e.xp6(2),e.Oqu(t.number),e.xp6(2),e.Oqu(t.message)}}function M(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"div",8)(1,"div",9)(2,"div",10)(3,"table",11)(4,"thead",12)(5,"tr")(6,"th",13),e._uU(7,"Date"),e.qZA(),e.TgZ(8,"th"),e._uU(9,"Type"),e.qZA(),e.TgZ(10,"th"),e._uU(11,"Number"),e.qZA(),e.TgZ(12,"th"),e._uU(13,"Message"),e.qZA()()(),e.TgZ(14,"tbody"),e.YNc(15,D,11,12,"tr",14),e.qZA()(),e.TgZ(16,"mat-paginator",15),e.NdJ("page",function(i){e.CHM(t);const a=e.oxw();return e.KtG(a.changePage(i))}),e.qZA()()()()}if(2&o){const t=e.oxw();e.xp6(15),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)}}let x=(()=>{class o{constructor(t,n){this.http=t,this._RawLogService=n,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(t={}){this.http.post("/api/OrdersLoader/Get",t).subscribe(n=>{this.filter=n.Filter,this.Channel=n.Options.Channel,this.ActionTypeList=n.Options.ActionTypeList,this.Get()})}Get(t){this.filter.Number=t,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(n=>{this._RawLogService.Data=n.hits,this.Result=Array();for(let i of n.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=n.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Get()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(c.O),e.Y36(h))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-raw-log"]],decls:22,vars:10,consts:[["searchBoxPlaceHolder","Invoice Number..",3,"headerTitle","text","textChange","onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["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"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e.NdJ("textChange",function(a){return n.filter.Number=a})("onSubmit",function(a){return n.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 n.filter.ChannelID=a}),e.qZA()(),e.TgZ(7,"div")(8,"h6"),e._uU(9,"From/To"),e.qZA(),e.TgZ(10,"datepicker",3),e.NdJ("dateChange",function(a){return n.filter.From=a}),e.qZA(),e.TgZ(11,"datepicker",4),e.NdJ("dateChange",function(a){return n.filter.To=a}),e.qZA()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Number"),e.qZA(),e.TgZ(15,"input",5),e.NdJ("ngModelChange",function(a){return n.filter.PageNumber=a}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"Page Size"),e.qZA(),e.TgZ(19,"input",6),e.NdJ("ngModelChange",function(a){return n.filter.RowCount=a}),e.qZA()()()(),e.TgZ(20,"content"),e.YNc(21,M,17,4,"div",7),e.qZA()()),2&t&&(e.Q6J("headerTitle","Marketplace Webhook")("text",n.filter.Number),e.xp6(6),e.Q6J("clearable",!0)("items",n.Channel)("ngModel",n.filter.ChannelID),e.xp6(4),e.Q6J("date",n.filter.From),e.xp6(1),e.Q6J("date",n.filter.To),e.xp6(4),e.Q6J("ngModel",n.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",n.filter.RowCount),e.xp6(2),e.Q6J("ngIf",n.Result.length>0))},dependencies:[s.sg,s.O5,l.Fj,l.wV,l.JJ,l.On,p.yS,u.p,m.NW,T.w9,f.QB,s.uU]}),o})();class J{constructor(r,t){this._document=t;const n=this._textarea=this._document.createElement("textarea"),i=n.style;i.position="fixed",i.top=i.opacity="0",i.left="-999em",n.setAttribute("aria-hidden","true"),n.value=r,this._document.body.appendChild(n)}copy(){const r=this._textarea;let t=!1;try{if(r){const n=this._document.activeElement;r.select(),r.setSelectionRange(0,r.value.length),t=this._document.execCommand("copy"),n&&n.focus()}}catch{}return t}destroy(){const r=this._textarea;r&&(r.remove(),this._textarea=void 0)}}let k=(()=>{class o{constructor(t){this._document=t}copy(t){const n=this.beginCopy(t),i=n.copy();return n.destroy(),i}beginCopy(t){return new J(t,this._document)}}return o.\u0275fac=function(t){return new(t||o)(e.LFG(s.K0))},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();const P=new e.OlP("CDK_COPY_TO_CLIPBOARD_CONFIG");let F=(()=>{class o{constructor(t,n,i){this._clipboard=t,this._ngZone=n,this.text="",this.attempts=1,this.copied=new e.vpe,this._pending=new Set,i&&null!=i.attempts&&(this.attempts=i.attempts)}copy(t=this.attempts){if(t>1){let n=t;const i=this._clipboard.beginCopy(this.text);this._pending.add(i);const a=()=>{const _=i.copy();_||!--n||this._destroyed?(this._currentTimeout=null,this._pending.delete(i),i.destroy(),this.copied.emit(_)):this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(a,1))};a()}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(k),e.Y36(e.R0b),e.Y36(P,8))},o.\u0275dir=e.lG2({type:o,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(t,n){1&t&&e.NdJ("click",function(){return n.copy()})},inputs:{text:["cdkCopyToClipboard","text"],attempts:["cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"}}),o})(),Q=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({}),o})();function Y(o,r){1&o&&e._UZ(0,"img",21)}function z(o,r){1&o&&e._UZ(0,"img",22)}function G(o,r){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,Y,1,0,"img",11),e.YNc(20,z,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," ")}}function H(o,r){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)}}function j(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"a",15),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.Retry())}),e._uU(1,"Retry"),e.qZA()}}function V(o,r){1&o&&e._UZ(0,"img",12)}function X(o,r){1&o&&e._UZ(0,"img",13)}function W(o,r){if(1&o&&(e.TgZ(0,"tr")(1,"td"),e.YNc(2,V,1,0,"img",9),e.YNc(3,X,1,0,"img",10),e.qZA(),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td")(9,"div",11),e._uU(10),e.qZA(),e.TgZ(11,"div"),e._uU(12),e.qZA()()()),2&o){const t=r.$implicit;e.xp6(2),e.Q6J("ngIf",1==t.TypeID),e.xp6(1),e.Q6J("ngIf",0==t.TypeID),e.xp6(2),e.Oqu(t.Date),e.xp6(2),e.Oqu(t.Number),e.xp6(3),e.Oqu(t.message),e.xp6(2),e.Oqu(t.stackTrace)}}const ee=[{path:"",component:y,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",component:L,canActivate:[g.a],data:{title:"Orders Log"}},{path:"inventory",component:w,canActivate:[g.a],data:{title:"Inventory Log"}},{path:"rawlog",component:x,canActivate:[g.a],data:{title:"Raw Log"}},{path:"rawlog/detail",component:(()=>{class o{constructor(t,n,i){this.route=t,this.http=n,this._RawLogService=i,this.route.queryParams.subscribe(a=>{let _=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"],_.length>0){const C=_.find(oe=>oe.ShopID==this.data._source.shopId);C?(this.data.TypeID=C.TypeID,this.data.ShopName=C.Name,this.data.ShopLink=C.URL):(this.data.TypeID=null,this.data.ShopName=null,this.data.ShopLink=null)}})}ngOnInit(){}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.gz),e.Y36(c.O),e.Y36(h))},o.\u0275cmp=e.Xpm({type:o,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(t,n){1&t&&(e.TgZ(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2),e.YNc(4,G,59,14,"div",3),e.qZA()()()()),2&t&&(e.Q6J("headerTitle","Request Raw Log Detail")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(4),e.Q6J("ngIf",n.data))},dependencies:[s.O5,u.p,F,s.uU]}),o})(),canActivate:[g.a],data:{title:"Raw Log Detail"}},{path:"inventory/detail",component:(()=>{class o{constructor(t,n,i){this.route=t,this.http=n,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(n=>{this.data.Created=n.hits[0]._source["@timestamp_received"],this.data.Sku=n.hits[0]._source.log.sku,this.data.ChannelName=n.hits[0]._source.log.channelName,this.data.ResponseCode=n.hits[0]._source.log.responseCode,this.request=JSON.parse(n.hits[0]._source.log.request),this.response=n.hits[0]._source.log.response})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.gz),e.Y36(c.O),e.Y36(h))},o.\u0275cmp=e.Xpm({type:o,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(t,n){1&t&&(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,H,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&t&&(e.Q6J("headerTitle","Inventory Detail")("pageData","Inventory Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(7),e.Q6J("ngIf",n.data),e.xp6(11),e.Oqu(e.lcZ(19,7,n.request)),e.xp6(11),e.Oqu(n.response))},dependencies:[s.O5,p.yS,u.p,s.Ts,s.uU]}),o})(),canActivate:[g.a],data:{title:"Inventory Details"}},{path:"order/detail",component:(()=>{class o{constructor(t,n){this.route=t,this.http=n,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",{ID:this.ID}).subscribe(n=>{alert(JSON.stringify(n))})}Load(){this.http.post("/api/Orders/GetDetail",{ID:this.ID}).subscribe(n=>{for(let i of n.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})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(p.gz),e.Y36(c.O))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-orderdetail"]],decls:82,vars:20,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"],[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(t,n){1&t&&(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.TgZ(50,"div",9)(51,"div",10)(52,"label"),e._uU(53,"Action"),e.qZA(),e.TgZ(54,"div")(55,"span"),e._uU(56),e.qZA()()()()()()()()(),e.TgZ(57,"div",11)(58,"div",9)(59,"div",5)(60,"div",6)(61,"h5"),e._uU(62,"Request"),e.qZA()(),e.TgZ(63,"div",7)(64,"div",4)(65,"div",12)(66,"pre"),e._uU(67),e.ALo(68,"json"),e.qZA()()(),e.TgZ(69,"actions",13),e.YNc(70,j,2,0,"a",14),e.qZA()()()(),e.TgZ(71,"div",9)(72,"div",5)(73,"div",6)(74,"h5"),e._uU(75,"Response"),e.qZA()(),e.TgZ(76,"div",7)(77,"div",4)(78,"div",12)(79,"pre"),e._uU(80),e.ALo(81,"json"),e.qZA()()()()()()()()()()),2&t&&(e.Q6J("headerTitle","Order #"+n.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(20),e.Oqu(e.xi3(21,13,n.Created,"dd MMM yyyy HH:mm:ss")),e.xp6(8),e.Oqu(n.Number),e.xp6(7),e.Oqu(n.MarketTypeString),e.xp6(7),e.Oqu(n.ResponseCode),e.xp6(7),e.Oqu(n.shopId),e.xp6(7),e.Oqu(n.POSActionTypeString),e.xp6(11),e.Oqu(e.lcZ(68,16,n.request)),e.xp6(3),e.Q6J("ngIf","200"!=n.ResponseCode&&"201"!=n.ResponseCode),e.xp6(10),e.Oqu(e.lcZ(81,18,n.response)))},dependencies:[s.O5,p.yS,u.p,s.Ts,s.uU]}),o})(),canActivate:[g.a],data:{title:"Order Details"}},{path:"exception",component:(()=>{class o{constructor(t){this.http=t,this.Result=Array(),this.filter={RowCount:50,PageNumber:1},this.Load()}ngOnInit(){}Load(){this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(t=>{this.Result=Array();for(let n of t.hits)this.Result.push({TypeID:"Shopee"==n._source.error.type?0:1,Number:n._source.error.number,Date:n._source["@timestamp_received"],stackTrace:n._source.error.stackTrace,message:n._source.message});this.paginationTotal=t.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(t){this.filter.PageNumber=t.pageIndex+1,this.Load()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(c.O))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-exception-log"]],decls:21,vars:5,consts:[["searchBoxPlaceHolder","Enter Number...","hideSearchBox","true","hideSearchDropdown","true",3,"headerTitle"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],["src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",4,"ngIf"],["src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",4,"ngIf"],[1,"fw-bold"],["src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png"],["src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png"]],template:function(t,n){1&t&&(e.TgZ(0,"mainpanel",0),e._UZ(1,"filters"),e.TgZ(2,"content")(3,"div",1)(4,"div",2)(5,"div",3)(6,"div",4)(7,"table",5)(8,"thead")(9,"tr",6)(10,"th"),e._uU(11,"Channel"),e.qZA(),e.TgZ(12,"th"),e._uU(13,"Date"),e.qZA(),e.TgZ(14,"th"),e._uU(15,"Number"),e.qZA(),e.TgZ(16,"th"),e._uU(17,"Exception"),e.qZA()()(),e.TgZ(18,"tbody"),e.YNc(19,W,13,6,"tr",7),e.qZA()(),e.TgZ(20,"mat-paginator",8),e.NdJ("page",function(a){return n.changePage(a)}),e.qZA()()()()()()()),2&t&&(e.Q6J("headerTitle","Exception Log"),e.xp6(19),e.Q6J("ngForOf",n.Result),e.xp6(1),e.Q6J("length",n.paginationTotal)("pageSize",n.paginationPageSize)("pageIndex",0==(null==n.filter?null:n.filter.PageNumber)?0:(null==n.filter?null:n.filter.PageNumber)-1))},dependencies:[s.sg,s.O5,u.p,m.NW]}),o})(),canActivate:[g.a],data:{title:"Exception Log"}}]}];let te=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[s.ez,p.Bz.forChild(ee)]}),o})(),ne=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[s.ez,l.u5,l.UX,te,p.Bz,u.R,Q,m.TU,T.A0,f.ZU,v.Z]}),o})()}}]);