marketplacepos 2.8.2 → 2.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/3.8bcc67645faedceb.js +1 -0
- package/Marketplace/{369.8c9ca2ecf6f3a760.js → 369.00fa5850755b564c.js} +1 -1
- package/Marketplace/397.ca5b2d31b8a43c67.js +1 -0
- package/Marketplace/{408.c73edfe24695a688.js → 408.4699157318f765d5.js} +1 -1
- package/Marketplace/53.0935a71a693bcaa6.js +1 -0
- package/Marketplace/72.d59410fd71caf119.js +1 -0
- package/Marketplace/884.d556fd68d978ebbf.js +1 -0
- package/Marketplace/common.7ce512ca9d1674b7.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main.f21ded8d313b0b60.js → main.1f9360e329df45f0.js} +1 -1
- package/Marketplace/runtime.f47a01fcff98d816.js +1 -0
- package/package.json +1 -1
- package/Marketplace/397.c6768a042e8257c0.js +0 -1
- package/Marketplace/53.ab0f83f4bba76774.js +0 -1
- package/Marketplace/72.a5fd86c341c782ab.js +0 -1
- package/Marketplace/877.bab93e3da1ff1928.js +0 -1
- package/Marketplace/884.06eb48b1f2379d09.js +0 -1
- package/Marketplace/common.29d2fb726f28cde8.js +0 -1
- package/Marketplace/runtime.2d126c69c13cad80.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[3],{9003:(we,S,l)=>{l.r(S),l.d(S,{LogsModule:()=>y});var r=l(6895),e=l(4650),p=l(284),D=l(2937);class b{constructor(){this.ObjectlogTabs=[{Title:"Sync Order",Url:"/menu/log/order"},{Title:"Sync Inventory",Url:"/menu/log/inventory"},{Title:"Channel Webhook",Url:"/menu/log/rawlog"},{Title:"Channel Webhook Exception ",Url:"/menu/log/exception"},{Title:"Download Order ",Url:"/menu/log/order-log"}]}ngOnInit(){}}b.\u0275fac=function(n){return new(n||b)},b.\u0275cmp=e.Xpm({type:b,selectors:[["app-logs"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,t){1&n&&(e.TgZ(0,"nav",0)(1,"div",1)(2,"div"),e._UZ(3,"nav-tab",2),e.qZA()()(),e._UZ(4,"router-outlet")),2&n&&(e.xp6(3),e.Q6J("Tabs",t.ObjectlogTabs))},dependencies:[p.lC,D.e]});var c=l(8063),f=l(1889),m=l(1318);class g{constructor(){}get Data(){return this._Data}set Data(n){this._Data=n}Fill(n){return this._Data.find(t=>t._id==n)}}g.\u0275fac=function(n){return new(n||g)},g.\u0275prov=e.Yz7({token:g,factory:g.\u0275fac,providedIn:"root"});var s=l(4006),u=l(7481),T=l(8739),h=l(8796),A=l(5585),Z=l(9640);function R(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 P(o,n){1&o&&(e.TgZ(0,"th",21),e._uU(1,"Process Code"),e.qZA())}const J=function(o,n){return{"bg-warning":o,"bg-success":n}};function k(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,J,null!=t.ProcessedCode&&200!==t.ProcessedCode,null!=t.ProcessedCode&&200===t.ProcessedCode)),e.xp6(1),e.Oqu(t.ProcessedCode)}}const Q=function(){return["/menu/log/order/detail"]},F=function(o){return{ID:o}};function Y(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,k,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,Q))("queryParams",e.VKq(13,F,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,J,200!==t.ResponseCode,200===t.ResponseCode)),e.xp6(1),e.Oqu(t.ResponseCode),e.xp6(1),e.Q6J("ngIf",i.processedCodeVisible)}}function E(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,P,2,0,"th",22),e.qZA()(),e.TgZ(16,"tbody"),e.YNc(17,Y,15,18,"tr",23),e.qZA()(),e.TgZ(18,"mat-paginator",24),e.NdJ("page",function(a){e.CHM(t);const d=e.oxw();return e.KtG(d.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 H(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=f.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 z(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(m.O),e.Y36(g),e.Y36(p.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,R,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,E,19,5,"ng-container",14),e.YNc(38,H,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,p.rH,u.p,T.NW,h.w9,h.ir,A.Q,Z.s,r.uU]});const G=function(){return["/menu/log/inventory/detail"]},B=function(o){return{ID:o}};function j(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,G))("queryParams",e.VKq(11,B,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 V(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,j,13,13,"tr",18),e.qZA()(),e.TgZ(17,"mat-paginator",19),e.NdJ("page",function(a){e.CHM(t);const d=e.oxw();return e.KtG(d.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 K(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=f.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 W(o,n){if(1&o&&(e.TgZ(0,"span",13),e._UZ(1,"img",14),e.qZA(),e._uU(2)),2&o){const t=n.item;e.xp6(1),e.Q6J("src",t.logo,e.LSH),e.xp6(1),e.hij(" ",t.Name," ")}}x.\u0275fac=function(n){return new(n||x)(e.Y36(m.O),e.Y36(g))},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,z,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,V,18,4,"ng-container",11),e.YNc(26,K,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,p.rH,u.p,T.NW,h.w9,h.ir,A.Q,Z.s,r.uU]});const X=function(){return["/menu/log/order/detail"]},$=function(o){return{ID:o}};function ee(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,X))("queryParams",e.VKq(10,$,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 te(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,ee,11,12,"tr",19),e.qZA()(),e.TgZ(15,"mat-paginator",20),e.NdJ("page",function(a){e.CHM(t);const d=e.oxw();return e.KtG(d.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 ne(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=f.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(m.O),e.Y36(g))},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,W,3,2,"ng-template",3),e.qZA()(),e.TgZ(8,"div")(9,"h6"),e._uU(10,"From/To"),e.qZA(),e.TgZ(11,"datepicker",4),e.NdJ("dateChange",function(a){return t.filter.From=a}),e.qZA(),e.TgZ(12,"datepicker",5),e.NdJ("dateChange",function(a){return t.filter.To=a}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Number"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(a){return t.filter.PageNumber=a}),e.qZA()(),e.TgZ(17,"div")(18,"h6"),e._uU(19,"Page Size"),e.qZA(),e.TgZ(20,"input",7),e.NdJ("ngModelChange",function(a){return t.filter.RowCount=a}),e.qZA()()()(),e.TgZ(21,"content")(22,"div",8)(23,"div",9)(24,"div",10),e.YNc(25,te,16,4,"ng-container",11),e.YNc(26,ne,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,p.rH,u.p,T.NW,h.w9,h.ir,A.Q,Z.s,r.uU]});class oe{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 ie=(()=>{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 oe(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 ae=new e.OlP("CDK_COPY_TO_CLIPBOARD_CONFIG");let re=(()=>{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 d=()=>{const _=a.copy();_||!--i||this._destroyed?(this._currentTimeout=null,this._pending.delete(a),a.destroy(),this.copied.emit(_)):this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(d,1))};d()}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(ie),e.Y36(e.R0b),e.Y36(ae,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})(),le=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({}),o})();function se(o,n){1&o&&e._UZ(0,"img",21)}function de(o,n){1&o&&e._UZ(0,"img",22)}function pe(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,se,1,0,"img",11),e.YNc(20,de,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 L{constructor(n,t,i){this.route=n,this.http=t,this._RawLogService=i,this.route.queryParams.subscribe(a=>{let d=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"],d.length>0){const _=d.find(Ue=>Ue.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 ge(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)}}L.\u0275fac=function(n){return new(n||L)(e.Y36(p.gz),e.Y36(m.O),e.Y36(g))},L.\u0275cmp=e.Xpm({type:L,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,pe,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,u.p,re,r.uU]});class U{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 ue(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 ce(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()}}U.\u0275fac=function(n){return new(n||U)(e.Y36(p.gz),e.Y36(m.O),e.Y36(g))},U.\u0275cmp=e.Xpm({type:U,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,ge,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,p.rH,u.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(p.gz),e.Y36(m.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,ue,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,ce,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,p.rH,u.p,r.Ts,r.uU]});const me=function(){return["/menu/log/exception/detail"]},he=function(o){return{ID:o}};function _e(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,me))("queryParams",e.VKq(11,he,t.id)),e.xp6(1),e.hij(" ",t.number," "),e.xp6(3),e.Oqu(t.message),e.xp6(2),e.Oqu(t.stackTrace)}}function fe(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 d=e.oxw(2);return e.KtG(d.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 Te(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,_e,14,13,"tr",10),e.qZA()(),e.YNc(15,fe,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 Ze(o,n){1&o&&(e.TgZ(0,"div",17),e._UZ(1,"app-empty-state"),e.qZA())}class M{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:f.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 Ce(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," ")}}function ve(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.ALo(7,"date"),e.ALo(8,"date"),e.qZA(),e.TgZ(9,"td",25),e._uU(10),e.ALo(11,"number"),e.qZA(),e.TgZ(12,"td"),e._uU(13),e.qZA(),e.TgZ(14,"td"),e._uU(15),e.ALo(16,"date"),e.qZA()()),2&o){const t=n.$implicit;e.xp6(2),e.Oqu(t.ChannelName),e.xp6(2),e.Q6J("src",t.logo,e.LSH),e.xp6(2),e.AsE("",e.xi3(7,7,t.Daterange_from,"dd MMM yyyy")," - ",e.xi3(8,10,t.Daterange_to,"dd MMM yyyy"),""),e.xp6(4),e.Oqu(e.lcZ(11,13,t.ResponseCountOrder)),e.xp6(3),e.Oqu(t.UserLogin),e.xp6(2),e.hij("",e.xi3(16,15,t.Created,"dd MMM yyyy")," ")}}function ye(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 Order"),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,ve,17,18,"tr",22),e.qZA()(),e.TgZ(19,"mat-paginator",23),e.NdJ("page",function(a){e.CHM(t);const d=e.oxw();return e.KtG(d.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 be(o,n){1&o&&(e.TgZ(0,"div",26),e._UZ(1,"app-empty-state"),e.qZA())}M.\u0275fac=function(n){return new(n||M)(e.Y36(m.O))},M.\u0275cmp=e.Xpm({type:M,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,Te,16,2,"ng-container",4),e.YNc(6,Ze,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,p.rH,u.p,T.NW,Z.s,r.uU]});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=f.g.assignChannelLogo(n.Options.Channel),this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(n=>{this.downloadOrders=n.Data,this.setChannelLogo(),this.paginationTotal=n.Total,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(n=>(n.logo=f.g.getChannelLogoByTypeId(n.TypeID),n))}onPaginationChange(n){this.filter.PageNumber=n.pageIndex+1,this.getDownloadOrders()}}N.\u0275fac=function(n){return new(n||N)(e.Y36(m.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"],[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,Ce,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,ye,20,4,"ng-container",11),e.YNc(26,be,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,u.p,T.NW,h.w9,h.ir,A.Q,Z.s,r.JJ,r.uU]});var Ae=l(8505),qe=l(4782),xe=l(4004);class C{constructor(n){this.httpService=n}getExceptionDetail(n){return this.httpService.post("/api/Orders/GetDetailException",{ID:n}).pipe((0,xe.U)(i=>i?.hits[0]?._source))}}function Oe(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(m.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,Ae.b)(t=>{this.invoiceNumber=t?.error?.number}),(0,qe.d)(1))}}I.\u0275fac=function(n){return new(n||I)(e.Y36(p.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,Oe,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,u.p,r.Ov,r.Ts,r.uU]});const Le=[{path:"",component:b,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",component:q,canActivate:[c.a],data:{title:"Order Log"}},{path:"inventory",component:x,canActivate:[c.a],data:{title:"Inventory Log"}},{path:"rawlog",component:O,canActivate:[c.a],data:{title:"Raw Log"}},{path:"rawlog/detail",component:L,canActivate:[c.a],data:{title:"Raw Log Detail"}},{path:"inventory/detail",component:U,canActivate:[c.a],data:{title:"Inventory Details"}},{path:"order/detail",component:w,canActivate:[c.a],data:{title:"Order Details"}},{path:"exception",component:M,canActivate:[c.a],data:{title:"Exception Log"}},{path:"exception/detail",component:I,canActivate:[c.a],data:{title:"Exception Log Detail"}},{path:"order-log",component:N,canActivate:[c.a],data:{title:"order Log"}}]}];class v{}v.\u0275fac=function(n){return new(n||v)},v.\u0275mod=e.oAB({type:v}),v.\u0275inj=e.cJS({imports:[r.ez,p.Bz.forChild(Le)]});class y{}y.\u0275fac=function(n){return new(n||y)},y.\u0275mod=e.oAB({type:y}),y.\u0275inj=e.cJS({imports:[r.ez,s.u5,s.UX,v,p.Bz,u.R,le,T.TU,h.A0,D.Z,A.Q,Z.s]})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[369],{9369:(Y,x,a)=>{a.r(x),a.d(x,{LoginModule:()=>p});var _=a(6895),s=a(4006),t=a(4650),c=a(284),b=a(1318);class m{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code})}addChannelLazada(){this.http.post("/api/ChannelAdd/AddLazada",{Code:this.code}).subscribe(o=>{this.service.navigate(["/menu/channel"])})}}m.\u0275fac=function(e){return new(e||m)(t.Y36(c.gz),t.Y36(b.O),t.Y36(c.F0))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Lazada"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your Code is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"button",9),t.NdJ("click",function(){return o.addChannelLazada()}),t._UZ(18,"i",10),t._uU(19," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.code))}});var v=a(1889),w=a(8703),Z=a(7185);class l{constructor(){}getBrowserName(){const e=window.navigator.userAgent.toLowerCase();switch(!0){case e.indexOf("edge")>-1||e.indexOf("edg")>-1:return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}}l.\u0275fac=function(e){return new(e||l)},l.\u0275prov=t.Yz7({token:l,factory:l.\u0275fac,providedIn:"root"});var M=a(501),C=a(4954);const O=["subdomainEl"];function y(n,e){if(1&n){const o=t.EpF();t.ynx(0),t.TgZ(1,"div",18)(2,"div",19)(3,"form")(4,"div",20)(5,"h2",21),t._uU(6,"Sign in"),t.qZA(),t.TgZ(7,"div",22)(8,"div",23)(9,"div",24)(10,"span",25),t._UZ(11,"i",26),t.qZA(),t.TgZ(12,"input",27,28),t.NdJ("ngModelChange",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.subdomain=r)}),t.qZA()()(),t.TgZ(14,"select",29),t.NdJ("ngModelChange",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.domain=r)}),t.TgZ(15,"option",30),t._uU(16,".dealpos.co.id"),t.qZA(),t.TgZ(17,"option",31),t._uU(18,".dealpos.net"),t.qZA(),t.TgZ(19,"option",32),t._uU(20,".dealpos.com"),t.qZA()()()(),t.TgZ(21,"div",33)(22,"button",34),t.NdJ("click",function(){t.CHM(o);const r=t.oxw();return t.KtG(r.onNextState())}),t._uU(23," Next "),t.qZA()()()()(),t.BQk()}if(2&n){const o=t.oxw();t.xp6(12),t.Q6J("ngModel",o.subdomain),t.xp6(2),t.Q6J("ngModel",o.domain)}}function A(n,e){1&n&&(t.TgZ(0,"p"),t._uU(1," Username is required "),t.qZA())}function T(n,e){if(1&n&&(t.TgZ(0,"div",58),t.YNc(1,A,2,0,"p",59),t.qZA()),2&n){t.oxw();const o=t.MAs(13);t.xp6(1),t.Q6J("ngIf",o.errors.required)}}const P=function(n,e){return{"fa-eye":n,"fa-eye-slash":e}};function k(n,e){if(1&n){const o=t.EpF();t.TgZ(0,"i",60),t.NdJ("click",function(){t.CHM(o);const r=t.oxw(2);return t.KtG(r.hideShowPassword())}),t.qZA()}if(2&n){const o=t.oxw(2);t.Q6J("ngClass",t.WLB(1,P,"eye-off"==o.passwordIcon,"eye"==o.passwordIcon))}}function U(n,e){1&n&&(t.TgZ(0,"p"),t._uU(1," Password is required "),t.qZA())}function S(n,e){if(1&n&&(t.TgZ(0,"div",58),t.YNc(1,U,2,0,"p",59),t.qZA()),2&n){t.oxw();const o=t.MAs(19);t.xp6(1),t.Q6J("ngIf",o.errors.required)}}function q(n,e){if(1&n){const o=t.EpF();t.TgZ(0,"div",18)(1,"div",19)(2,"div",35)(3,"h2",21),t._uU(4,"Sign in"),t.qZA(),t.TgZ(5,"div",36),t._uU(6," to "),t.TgZ(7,"h6",37),t._uU(8),t.qZA(),t.TgZ(9,"i",38),t.NdJ("click",function(){t.CHM(o);const r=t.oxw();return t.KtG(r.onEditDomain())}),t.qZA()()(),t.TgZ(10,"form",39)(11,"div",40)(12,"input",41,42),t.NdJ("ngModelChange",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.username=r)}),t.qZA(),t.TgZ(14,"label",43),t._uU(15,"Username"),t.qZA(),t.YNc(16,T,2,1,"div",44),t.qZA(),t.TgZ(17,"div",45)(18,"input",46,47),t.NdJ("ngModelChange",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.password=r)}),t.qZA(),t.TgZ(20,"label",48),t._uU(21,"Password"),t.qZA(),t.YNc(22,k,1,4,"i",49),t.YNc(23,S,2,1,"div",44),t.qZA(),t.TgZ(24,"div",50)(25,"a",51),t._uU(26,"Forgot Password?"),t.qZA()(),t.TgZ(27,"div",52)(28,"button",53),t.NdJ("click",function(){t.CHM(o);const r=t.oxw();return t.KtG(r.onLogin())}),t._uU(29," Log in "),t.qZA()(),t.TgZ(30,"div",54),t._UZ(31,"hr"),t.TgZ(32,"span",55),t._uU(33,"or"),t.qZA(),t._UZ(34,"hr"),t.qZA(),t.TgZ(35,"div")(36,"button",56),t.NdJ("click",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.onLoginByGoogle(r))}),t._UZ(37,"i",57),t._uU(38," Sign In with Google "),t.qZA()()()()()}if(2&n){const o=t.MAs(13),i=t.MAs(19),r=t.oxw();t.xp6(8),t.AsE(" (",r.subdomain,"",r.domain,") "),t.xp6(4),t.Q6J("ngModel",r.username),t.xp6(4),t.Q6J("ngIf",o.invalid&&(o.dirty||o.touched)),t.xp6(2),t.Q6J("type",r.passwordType)("ngModel",r.password),t.xp6(4),t.Q6J("ngIf",""!=r.password&&"edge"!=r.browser),t.xp6(1),t.Q6J("ngIf",i.invalid&&(i.dirty||i.touched)),t.xp6(2),t.Q6J("href","https://"+r.subdomain+r.domain+"/ForgotPassword",t.LSH)}}class u{constructor(e,o,i,r,d,I){this._router=e,this.elementRef=o,this.toastr=i,this.checkBrowser=r,this.authService=d,this.ngxPermission=I,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="eye-off"}ngOnInit(){this.initLogin(),this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="#dfeffc",this.browser=this.checkBrowser.getBrowserName()}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){const e=JSON.parse(localStorage.getItem("Authorization"));console.log(e),this.username=e.username,this.subdomain=e.Host.split(".dealpos")[0];const o=e.Host.split(".dealpos")[1];this.domain=".co.id"==o?".dealpos.co.id":".net"==o?".dealpos.net":".dealpos.com",this.authService.isActiveToken()&&this._router.navigate(["menu"])}onNextState(){v.g.IsEmpty(this.subdomain)?this.toastr.warning("Account Domain is required","Warning"):(this.parseSubdomain(),this.loginState="FORM_AUTH")}parseSubdomain(){let e=this.subdomain.indexOf(".dealpos");-1!=e&&(this.subdomain=this.subdomain.substring(0,e))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){this.authService.login({Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password}).subscribe(o=>{this.onSuccessLogin(o)})}onLoginByGoogle(e){this.authService.loginWithGoogle(e,`${this.subdomain}${this.domain}`).subscribe(i=>{this.onSuccessLogin(i)})}onSuccessLogin(e){this.ngxPermission.hasPermission([w.G.dashboardView]).then(o=>{this._router.navigate(o?["menu/dashboard"]:e.Channel.length<1?["menu/channel"]:["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType="text"===this.passwordType?"password":"text",this.passwordIcon="eye-off"===this.passwordIcon?"eye":"eye-off"}ngOnDestroy(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="white"}}u.\u0275fac=function(e){return new(e||u)(t.Y36(c.F0),t.Y36(t.SBq),t.Y36(Z._W),t.Y36(l),t.Y36(M.e),t.Y36(C.YI))},u.\u0275cmp=t.Xpm({type:u,selectors:[["app-login"]],viewQuery:function(e,o){if(1&e&&t.Gf(O,5),2&e){let i;t.iGM(i=t.CRH())&&(o.subdomainEl=i.first)}},decls:30,vars:8,consts:[[1,"container"],[1,"row","mt-md-0","align-self-center"],[1,"col-12","col-md-7","text-center"],[1,"big-display","robotoslab","d-none","d-sm-block"],["ngSrc","https://res.cloudinary.com/pos/image/upload/v1657855612/Apps/Login/Omnichannel.png","alt","integration-image",1,"img-fluid",3,"width","height"],[1,"col-12","col-md-5","order-first","order-md-last","mt-12"],[1,"big-display","text-center","my-5","py-5","robotoslab","d-block","d-sm-none"],[4,"ngIf","ngIfElse"],["USR_PASS",""],[1,"col-12","d-block","d-md-none","text-center"],[1,"pt-8","me-3"],["target","_blank","href","https://www.dealpos.com"],["ngSrc","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid",3,"width","height"],["target","_blank","href","https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete",1,"pt-8","font-italic"],[1,"mx-5","pb-5","mb-5","d-none","d-md-block"],[1,"row","justify-content-between","align-items-center"],[1,"col-auto","d-inline-flex"],[1,"col-auto"],[1,"card"],[1,"card-body","p-8"],[1,"card-title"],[1,"fw-normal","font-xl","robotoslab"],[1,"d-flex","align-items-center","mt-6"],[1,"mt-7","w-75","rounded-end-0"],[1,"input-group","mb-3"],["id","basic-addon1",1,"input-group-text","border-end-0","rounded-start"],[1,"fa-solid","fa-cloud"],["type","text","required","","name","subdomain","id","inputHost","placeholder","Store Address",1,"form-control","text-start","subdomain-input","border-start-0",2,"padding-left","0px",3,"ngModel","ngModelChange"],["subdomainEl",""],["name","domainOption",1,"form-select","form-control","border-start-0","mt-4","rounded-end","rounded-start-0","domain-option",3,"ngModel","ngModelChange"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],[1,"w-100","mt-10"],["name","next","data-cy","next","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"card-title","d-flex","align-items-center"],[1,"pt-2","ms-2"],[1,"fw-bold","me-2","robotoslab","d-inline-block","text-primary"],[1,"fa-solid","fa-edit","link-primary","fs-5","pointer",3,"click"],[1,"mt-10"],[1,"form-label-group"],["autofocus","","type","text","name","Username","id","inputUsername","placeholder","Username","required","",1,"form-control","text-start",3,"ngModel","ngModelChange"],["usernameCtrl","ngModel"],["for","inputUsername",1,"text-start"],["class","text-danger",4,"ngIf"],[1,"form-label-group","mb-5","mb-sm-1"],["name","Password","id","inputPassword","placeholder","Password","required","",1,"form-control","text-start",3,"type","ngModel","ngModelChange"],["passwordCtrl","ngModel"],["for","inputPassword",1,"text-start"],["class","passwordIcon fas fa-lg",3,"ngClass","click",4,"ngIf"],[1,"text-end","mt-3"],[3,"href"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-primary","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"text-danger"],[4,"ngIf"],[1,"passwordIcon","fas","fa-lg",3,"ngClass","click"]],template:function(e,o){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),t._uU(4," DealPOS Omnichannel "),t.qZA(),t._UZ(5,"img",4),t.qZA(),t.TgZ(6,"div",5)(7,"h1",6),t._uU(8," DealPOS Omnichannel "),t.qZA(),t.YNc(9,y,24,2,"ng-container",7),t.YNc(10,q,39,9,"ng-template",null,8,t.W1O),t.qZA(),t.TgZ(12,"div",9)(13,"p",10),t._uU(14,"Powered by :"),t.qZA(),t.TgZ(15,"a",11),t._UZ(16,"img",12),t.qZA(),t._UZ(17,"br"),t.TgZ(18,"a",13),t._uU(19,"Version 2.8.2"),t.qZA()()()(),t.TgZ(20,"footer",14)(21,"div",15)(22,"div",16)(23,"p",10),t._uU(24,"Powered by :"),t.qZA(),t.TgZ(25,"a",11),t._UZ(26,"img",12),t.qZA()(),t.TgZ(27,"div",17)(28,"a",13),t._uU(29,"Version 2.8.2"),t.qZA()()()()),2&e){const i=t.MAs(11);t.xp6(5),t.Q6J("width",500)("height",273),t.xp6(4),t.Q6J("ngIf","FORM_DOMAIN"==o.loginState)("ngIfElse",i),t.xp6(7),t.Q6J("width",130)("height",73),t.xp6(10),t.Q6J("width",130)("height",73)}},dependencies:[_.mk,_.O5,s._Y,s.YN,s.Kr,s.Fj,s.EJ,s.JJ,s.JL,s.Q7,s.On,s.F,_.Zd],styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}"]});class h{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.shopID=e.shop_id,this.code=e.code})}addShopee(){let e={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}}h.\u0275fac=function(e){return new(e||h)(t.Y36(c.gz),t.Y36(b.O),t.Y36(c.F0))},h.\u0275cmp=t.Xpm({type:h,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Shopee"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your shopID is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"button",9),t.NdJ("click",function(){return o.addShopee()}),t._UZ(18,"i",10),t._uU(19," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.shopID))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});class f{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code,this.state=e.state})}addChannelTiktok(){this.http.post("/api/ChannelAdd/AddTiktok",{Code:this.code}).subscribe(o=>{this.service.navigate(["/menu/channel"])})}}f.\u0275fac=function(e){return new(e||f)(t.Y36(c.gz),t.Y36(b.O),t.Y36(c.F0))},f.\u0275cmp=t.Xpm({type:f,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Tiktok"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your Code is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"div"),t._uU(18," Your State is "),t.TgZ(19,"span",8),t._uU(20),t.qZA()(),t.TgZ(21,"button",9),t.NdJ("click",function(){return o.addChannelTiktok()}),t._UZ(22,"i",10),t._uU(23," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.code),t.xp6(4),t.Oqu(o.state))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});const L=[{path:"",component:u,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:h,data:{title:"Success"}},{path:"tiktok",component:f,data:{title:"Success"}},{path:"lazada",component:m,data:{title:"Success"}}];class g{}g.\u0275fac=function(e){return new(e||g)},g.\u0275mod=t.oAB({type:g}),g.\u0275inj=t.cJS({imports:[c.Bz.forChild(L),c.Bz]});var z=a(8796);class p{}p.\u0275fac=function(e){return new(e||p)},p.\u0275mod=t.oAB({type:p}),p.\u0275inj=t.cJS({imports:[_.ez,s.u5,g,z.A0,C.VI]})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[369],{9369:(Y,x,a)=>{a.r(x),a.d(x,{LoginModule:()=>p});var _=a(6895),s=a(4006),t=a(4650),c=a(284),b=a(1318);class m{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code})}addChannelLazada(){this.http.post("/api/ChannelAdd/AddLazada",{Code:this.code}).subscribe(o=>{this.service.navigate(["/menu/channel"])})}}m.\u0275fac=function(e){return new(e||m)(t.Y36(c.gz),t.Y36(b.O),t.Y36(c.F0))},m.\u0275cmp=t.Xpm({type:m,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Lazada"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your Code is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"button",9),t.NdJ("click",function(){return o.addChannelLazada()}),t._UZ(18,"i",10),t._uU(19," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.code))}});var v=a(1889),w=a(8703),Z=a(7185);class l{constructor(){}getBrowserName(){const e=window.navigator.userAgent.toLowerCase();switch(!0){case e.indexOf("edge")>-1||e.indexOf("edg")>-1:return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}}l.\u0275fac=function(e){return new(e||l)},l.\u0275prov=t.Yz7({token:l,factory:l.\u0275fac,providedIn:"root"});var M=a(501),C=a(4954);const O=["subdomainEl"];function y(n,e){if(1&n){const o=t.EpF();t.ynx(0),t.TgZ(1,"div",18)(2,"div",19)(3,"form")(4,"div",20)(5,"h2",21),t._uU(6,"Sign in"),t.qZA(),t.TgZ(7,"div",22)(8,"div",23)(9,"div",24)(10,"span",25),t._UZ(11,"i",26),t.qZA(),t.TgZ(12,"input",27,28),t.NdJ("ngModelChange",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.subdomain=r)}),t.qZA()()(),t.TgZ(14,"select",29),t.NdJ("ngModelChange",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.domain=r)}),t.TgZ(15,"option",30),t._uU(16,".dealpos.co.id"),t.qZA(),t.TgZ(17,"option",31),t._uU(18,".dealpos.net"),t.qZA(),t.TgZ(19,"option",32),t._uU(20,".dealpos.com"),t.qZA()()()(),t.TgZ(21,"div",33)(22,"button",34),t.NdJ("click",function(){t.CHM(o);const r=t.oxw();return t.KtG(r.onNextState())}),t._uU(23," Next "),t.qZA()()()()(),t.BQk()}if(2&n){const o=t.oxw();t.xp6(12),t.Q6J("ngModel",o.subdomain),t.xp6(2),t.Q6J("ngModel",o.domain)}}function A(n,e){1&n&&(t.TgZ(0,"p"),t._uU(1," Username is required "),t.qZA())}function T(n,e){if(1&n&&(t.TgZ(0,"div",58),t.YNc(1,A,2,0,"p",59),t.qZA()),2&n){t.oxw();const o=t.MAs(13);t.xp6(1),t.Q6J("ngIf",o.errors.required)}}const P=function(n,e){return{"fa-eye":n,"fa-eye-slash":e}};function k(n,e){if(1&n){const o=t.EpF();t.TgZ(0,"i",60),t.NdJ("click",function(){t.CHM(o);const r=t.oxw(2);return t.KtG(r.hideShowPassword())}),t.qZA()}if(2&n){const o=t.oxw(2);t.Q6J("ngClass",t.WLB(1,P,"eye-off"==o.passwordIcon,"eye"==o.passwordIcon))}}function U(n,e){1&n&&(t.TgZ(0,"p"),t._uU(1," Password is required "),t.qZA())}function S(n,e){if(1&n&&(t.TgZ(0,"div",58),t.YNc(1,U,2,0,"p",59),t.qZA()),2&n){t.oxw();const o=t.MAs(19);t.xp6(1),t.Q6J("ngIf",o.errors.required)}}function q(n,e){if(1&n){const o=t.EpF();t.TgZ(0,"div",18)(1,"div",19)(2,"div",35)(3,"h2",21),t._uU(4,"Sign in"),t.qZA(),t.TgZ(5,"div",36),t._uU(6," to "),t.TgZ(7,"h6",37),t._uU(8),t.qZA(),t.TgZ(9,"i",38),t.NdJ("click",function(){t.CHM(o);const r=t.oxw();return t.KtG(r.onEditDomain())}),t.qZA()()(),t.TgZ(10,"form",39)(11,"div",40)(12,"input",41,42),t.NdJ("ngModelChange",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.username=r)}),t.qZA(),t.TgZ(14,"label",43),t._uU(15,"Username"),t.qZA(),t.YNc(16,T,2,1,"div",44),t.qZA(),t.TgZ(17,"div",45)(18,"input",46,47),t.NdJ("ngModelChange",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.password=r)}),t.qZA(),t.TgZ(20,"label",48),t._uU(21,"Password"),t.qZA(),t.YNc(22,k,1,4,"i",49),t.YNc(23,S,2,1,"div",44),t.qZA(),t.TgZ(24,"div",50)(25,"a",51),t._uU(26,"Forgot Password?"),t.qZA()(),t.TgZ(27,"div",52)(28,"button",53),t.NdJ("click",function(){t.CHM(o);const r=t.oxw();return t.KtG(r.onLogin())}),t._uU(29," Log in "),t.qZA()(),t.TgZ(30,"div",54),t._UZ(31,"hr"),t.TgZ(32,"span",55),t._uU(33,"or"),t.qZA(),t._UZ(34,"hr"),t.qZA(),t.TgZ(35,"div")(36,"button",56),t.NdJ("click",function(r){t.CHM(o);const d=t.oxw();return t.KtG(d.onLoginByGoogle(r))}),t._UZ(37,"i",57),t._uU(38," Sign In with Google "),t.qZA()()()()()}if(2&n){const o=t.MAs(13),i=t.MAs(19),r=t.oxw();t.xp6(8),t.AsE(" (",r.subdomain,"",r.domain,") "),t.xp6(4),t.Q6J("ngModel",r.username),t.xp6(4),t.Q6J("ngIf",o.invalid&&(o.dirty||o.touched)),t.xp6(2),t.Q6J("type",r.passwordType)("ngModel",r.password),t.xp6(4),t.Q6J("ngIf",""!=r.password&&"edge"!=r.browser),t.xp6(1),t.Q6J("ngIf",i.invalid&&(i.dirty||i.touched)),t.xp6(2),t.Q6J("href","https://"+r.subdomain+r.domain+"/ForgotPassword",t.LSH)}}class u{constructor(e,o,i,r,d,I){this._router=e,this.elementRef=o,this.toastr=i,this.checkBrowser=r,this.authService=d,this.ngxPermission=I,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="eye-off"}ngOnInit(){this.initLogin(),this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="#dfeffc",this.browser=this.checkBrowser.getBrowserName()}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){const e=JSON.parse(localStorage.getItem("Authorization"));console.log(e),this.username=e.username,this.subdomain=e.Host.split(".dealpos")[0];const o=e.Host.split(".dealpos")[1];this.domain=".co.id"==o?".dealpos.co.id":".net"==o?".dealpos.net":".dealpos.com",this.authService.isActiveToken()&&this._router.navigate(["menu"])}onNextState(){v.g.IsEmpty(this.subdomain)?this.toastr.warning("Account Domain is required","Warning"):(this.parseSubdomain(),this.loginState="FORM_AUTH")}parseSubdomain(){let e=this.subdomain.indexOf(".dealpos");-1!=e&&(this.subdomain=this.subdomain.substring(0,e))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){this.authService.login({Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password}).subscribe(o=>{this.onSuccessLogin(o)})}onLoginByGoogle(e){this.authService.loginWithGoogle(e,`${this.subdomain}${this.domain}`).subscribe(i=>{this.onSuccessLogin(i)})}onSuccessLogin(e){this.ngxPermission.hasPermission([w.G.dashboardView]).then(o=>{this._router.navigate(o?["menu/dashboard"]:e.Channel.length<1?["menu/channel"]:["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType="text"===this.passwordType?"password":"text",this.passwordIcon="eye-off"===this.passwordIcon?"eye":"eye-off"}ngOnDestroy(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="white"}}u.\u0275fac=function(e){return new(e||u)(t.Y36(c.F0),t.Y36(t.SBq),t.Y36(Z._W),t.Y36(l),t.Y36(M.e),t.Y36(C.YI))},u.\u0275cmp=t.Xpm({type:u,selectors:[["app-login"]],viewQuery:function(e,o){if(1&e&&t.Gf(O,5),2&e){let i;t.iGM(i=t.CRH())&&(o.subdomainEl=i.first)}},decls:30,vars:8,consts:[[1,"container"],[1,"row","mt-md-0","align-self-center"],[1,"col-12","col-md-7","text-center"],[1,"big-display","robotoslab","d-none","d-sm-block"],["ngSrc","https://res.cloudinary.com/pos/image/upload/v1657855612/Apps/Login/Omnichannel.png","alt","integration-image",1,"img-fluid",3,"width","height"],[1,"col-12","col-md-5","order-first","order-md-last","mt-12"],[1,"big-display","text-center","my-5","py-5","robotoslab","d-block","d-sm-none"],[4,"ngIf","ngIfElse"],["USR_PASS",""],[1,"col-12","d-block","d-md-none","text-center"],[1,"pt-8","me-3"],["target","_blank","href","https://www.dealpos.com"],["ngSrc","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid",3,"width","height"],["target","_blank","href","https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete",1,"pt-8","font-italic"],[1,"mx-5","pb-5","mb-5","d-none","d-md-block"],[1,"row","justify-content-between","align-items-center"],[1,"col-auto","d-inline-flex"],[1,"col-auto"],[1,"card"],[1,"card-body","p-8"],[1,"card-title"],[1,"fw-normal","font-xl","robotoslab"],[1,"d-flex","align-items-center","mt-6"],[1,"mt-7","w-75","rounded-end-0"],[1,"input-group","mb-3"],["id","basic-addon1",1,"input-group-text","border-end-0","rounded-start"],[1,"fa-solid","fa-cloud"],["type","text","required","","name","subdomain","id","inputHost","placeholder","Store Address",1,"form-control","text-start","subdomain-input","border-start-0",2,"padding-left","0px",3,"ngModel","ngModelChange"],["subdomainEl",""],["name","domainOption",1,"form-select","form-control","border-start-0","mt-4","rounded-end","rounded-start-0","domain-option",3,"ngModel","ngModelChange"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],[1,"w-100","mt-10"],["name","next","data-cy","next","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"card-title","d-flex","align-items-center"],[1,"pt-2","ms-2"],[1,"fw-bold","me-2","robotoslab","d-inline-block","text-primary"],[1,"fa-solid","fa-edit","link-primary","fs-5","pointer",3,"click"],[1,"mt-10"],[1,"form-label-group"],["autofocus","","type","text","name","Username","id","inputUsername","placeholder","Username","required","",1,"form-control","text-start",3,"ngModel","ngModelChange"],["usernameCtrl","ngModel"],["for","inputUsername",1,"text-start"],["class","text-danger",4,"ngIf"],[1,"form-label-group","mb-5","mb-sm-1"],["name","Password","id","inputPassword","placeholder","Password","required","",1,"form-control","text-start",3,"type","ngModel","ngModelChange"],["passwordCtrl","ngModel"],["for","inputPassword",1,"text-start"],["class","passwordIcon fas fa-lg",3,"ngClass","click",4,"ngIf"],[1,"text-end","mt-3"],[3,"href"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-primary","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"text-danger"],[4,"ngIf"],[1,"passwordIcon","fas","fa-lg",3,"ngClass","click"]],template:function(e,o){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),t._uU(4," DealPOS Omnichannel "),t.qZA(),t._UZ(5,"img",4),t.qZA(),t.TgZ(6,"div",5)(7,"h1",6),t._uU(8," DealPOS Omnichannel "),t.qZA(),t.YNc(9,y,24,2,"ng-container",7),t.YNc(10,q,39,9,"ng-template",null,8,t.W1O),t.qZA(),t.TgZ(12,"div",9)(13,"p",10),t._uU(14,"Powered by :"),t.qZA(),t.TgZ(15,"a",11),t._UZ(16,"img",12),t.qZA(),t._UZ(17,"br"),t.TgZ(18,"a",13),t._uU(19,"Version 2.8.3"),t.qZA()()()(),t.TgZ(20,"footer",14)(21,"div",15)(22,"div",16)(23,"p",10),t._uU(24,"Powered by :"),t.qZA(),t.TgZ(25,"a",11),t._UZ(26,"img",12),t.qZA()(),t.TgZ(27,"div",17)(28,"a",13),t._uU(29,"Version 2.8.3"),t.qZA()()()()),2&e){const i=t.MAs(11);t.xp6(5),t.Q6J("width",500)("height",273),t.xp6(4),t.Q6J("ngIf","FORM_DOMAIN"==o.loginState)("ngIfElse",i),t.xp6(7),t.Q6J("width",130)("height",73),t.xp6(10),t.Q6J("width",130)("height",73)}},dependencies:[_.mk,_.O5,s._Y,s.YN,s.Kr,s.Fj,s.EJ,s.JJ,s.JL,s.Q7,s.On,s.F,_.Zd],styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}"]});class h{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.shopID=e.shop_id,this.code=e.code})}addShopee(){let e={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}}h.\u0275fac=function(e){return new(e||h)(t.Y36(c.gz),t.Y36(b.O),t.Y36(c.F0))},h.\u0275cmp=t.Xpm({type:h,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Shopee"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your shopID is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"button",9),t.NdJ("click",function(){return o.addShopee()}),t._UZ(18,"i",10),t._uU(19," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.shopID))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});class f{constructor(e,o,i){this.route=e,this.http=o,this.service=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code,this.state=e.state})}addChannelTiktok(){this.http.post("/api/ChannelAdd/AddTiktok",{Code:this.code}).subscribe(o=>{this.service.navigate(["/menu/channel"])})}}f.\u0275fac=function(e){return new(e||f)(t.Y36(c.gz),t.Y36(b.O),t.Y36(c.F0))},f.\u0275cmp=t.Xpm({type:f,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"i",5),t.TgZ(6,"div",6),t._uU(7,"Success !"),t.qZA()(),t.TgZ(8,"div",7)(9,"div"),t._uU(10,"You have successfully authorized "),t.qZA(),t.TgZ(11,"div"),t._uU(12,"DEALPOS to manage your Tiktok"),t.qZA(),t.TgZ(13,"div"),t._uU(14," Your Code is "),t.TgZ(15,"span",8),t._uU(16),t.qZA()(),t.TgZ(17,"div"),t._uU(18," Your State is "),t.TgZ(19,"span",8),t._uU(20),t.qZA()(),t.TgZ(21,"button",9),t.NdJ("click",function(){return o.addChannelTiktok()}),t._UZ(22,"i",10),t._uU(23," Add to my Channel"),t.qZA()()()()()()),2&e&&(t.xp6(16),t.Oqu(o.code),t.xp6(4),t.Oqu(o.state))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-primary)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});const L=[{path:"",component:u,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:h,data:{title:"Success"}},{path:"tiktok",component:f,data:{title:"Success"}},{path:"lazada",component:m,data:{title:"Success"}}];class g{}g.\u0275fac=function(e){return new(e||g)},g.\u0275mod=t.oAB({type:g}),g.\u0275inj=t.cJS({imports:[c.Bz.forChild(L),c.Bz]});var z=a(8796);class p{}p.\u0275fac=function(e){return new(e||p)},p.\u0275mod=t.oAB({type:p}),p.\u0275inj=t.cJS({imports:[_.ez,s.u5,g,z.A0,C.VI]})}}]);
|