marketplacepos 3.13.1 → 3.13.2
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/{chunk-7Q56WDU6.js → chunk-4VJSS2RP.js} +1 -1
- package/Marketplace/{chunk-ISHKU4HS.js → chunk-5TLAX43C.js} +1 -1
- package/Marketplace/{chunk-IXXBZERD.js → chunk-AATQG55J.js} +1 -1
- package/Marketplace/{chunk-DIUAKNJ7.js → chunk-ABGYQNLC.js} +1 -1
- package/Marketplace/{chunk-O7ORKR43.js → chunk-ARA3PK2O.js} +1 -1
- package/Marketplace/{chunk-44NPBPWD.js → chunk-CS5AGUUI.js} +1 -1
- package/Marketplace/{chunk-VTTUEN2J.js → chunk-ENMVK7WN.js} +1 -1
- package/Marketplace/{chunk-7GGXFJTH.js → chunk-FG5CLZ6F.js} +1 -1
- package/Marketplace/{chunk-IOH6ZWW2.js → chunk-FON6ZRGN.js} +1 -1
- package/Marketplace/{chunk-O2A46B27.js → chunk-FQUPOWRE.js} +1 -1
- package/Marketplace/{chunk-JAFFZL32.js → chunk-GEEAZIV4.js} +1 -1
- package/Marketplace/{chunk-4IP4M4HU.js → chunk-KK2VCYNM.js} +1 -1
- package/Marketplace/{chunk-TZKWQXOG.js → chunk-KRNA3GN5.js} +1 -1
- package/Marketplace/{chunk-RVULTBBA.js → chunk-LCOFOENF.js} +1 -1
- package/Marketplace/{chunk-JODEGY3A.js → chunk-M67NQISG.js} +1 -1
- package/Marketplace/{chunk-OQANLBWC.js → chunk-MFCHLZW7.js} +1 -1
- package/Marketplace/{chunk-Y4G6RN56.js → chunk-MUFSHB3B.js} +1 -1
- package/Marketplace/{chunk-KYHILYCS.js → chunk-NUHOGS4I.js} +1 -1
- package/Marketplace/{chunk-CBQON7JZ.js → chunk-OOBUECHW.js} +1 -1
- package/Marketplace/{chunk-WBRE5DAH.js → chunk-PMOYSZXY.js} +1 -1
- package/Marketplace/{chunk-CJTMR3XH.js → chunk-TOGKMWQK.js} +1 -1
- package/Marketplace/{chunk-T6ZAW4FG.js → chunk-VOVI2B6O.js} +1 -1
- package/Marketplace/{chunk-GIZWO6Z7.js → chunk-VXKEHQ73.js} +1 -1
- package/Marketplace/{chunk-Y7E7FG5M.js → chunk-WMVEBC4Z.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-A3GNL4C4.js → main-6U2BHS4K.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as J}from"./chunk-BMPACBBM.js";import{a as U}from"./chunk-FCVAME75.js";import"./chunk-7GNI4BOW.js";import"./chunk-OFRBPREK.js";import{a as Ye,b as Je}from"./chunk-7CEWM7GE.js";import{a as Y,b as Ke}from"./chunk-7NWB2VB2.js";import"./chunk-IP2WADIR.js";import"./chunk-MEGPKKGI.js";import{a as ae,b as le,d as de,e as qe}from"./chunk-2Y4N4NSS.js";import{a as k}from"./chunk-RVULTBBA.js";import"./chunk-M4VGME5L.js";import"./chunk-AAIK6JQ3.js";import{g as oe}from"./chunk-IOH6ZWW2.js";import{e as M}from"./chunk-IPX66YIX.js";import"./chunk-HBHGO2RV.js";import{l as L,m as Ue}from"./chunk-PIDUM6XT.js";import{t as ze,u as Ge}from"./chunk-43TMSPFC.js";import"./chunk-4TYJR476.js";import{c as te,h as ie,k as ne,m as re,p as Fe,q as Ae,u as je,v as He}from"./chunk-F5YRASNU.js";import{c as Se}from"./chunk-2UXFUEON.js";import{$ as me,Eb as z,Fb as l,Gb as g,Ha as W,Hb as x,Ia as d,Ja as f,Jb as y,Kb as S,Lb as C,Ob as ee,Pa as Ne,Pb as q,Q as De,Wb as b,X as he,Xb as B,Ya as _,Yb as T,Zb as G,_a as s,aa as pe,ba as Me,bd as A,ca as fe,cb as Re,cd as Be,ed as V,ga as E,gd as ye,ha as se,ia as Le,kb as e,lb as t,mb as I,nb as j,nc as Ve,oa as u,ob as H,pa as h,pc as We,q as ue,qb as R,rc as F,sc as N,tb as P,vb as w,vc as ve,wc as D,xc as ce,yb as Oe,yc as ke,za as Pe,zc as _e}from"./chunk-77JORVC2.js";import"./chunk-CRRJCY55.js";var Ze=(()=>{let n=class n{constructor(){this.ObjectlogTabs=[{Title:"Sync Order",Url:"/menu/log/order"},{Title:"Sync Inventory",Url:"/menu/log/inventory"},{Title:"Async Inventory ",Url:"/menu/log/inventory-async"},{Title:"Channel Webhook",Url:"/menu/log/rawlog"},{Title:"Channel Webhook Exception ",Url:"/menu/log/exception"},{Title:"Download Order ",Url:"/menu/log/order-log"}]}ngOnInit(){}};n.\u0275fac=function(a){return new(a||n)},n.\u0275cmp=E({type:n,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(a,i){a&1&&(e(0,"nav",0)(1,"div",1)(2,"div"),I(3,"nav-tab",2),t()()(),I(4,"router-outlet")),a&2&&(d(3),s("Tabs",i.ObjectlogTabs))},dependencies:[Be,Ye]});let r=n;return r})();var Z=(()=>{let n=class n{constructor(){}get Data(){return this._Data}set Data(m){this._Data=m}Fill(m){return this._Data.find(a=>a._id==m)}};n.\u0275fac=function(a){return new(a||n)},n.\u0275prov=me({token:n,factory:n.\u0275fac,providedIn:"root"});let r=n;return r})();var ct=()=>["/menu/log/order/detail"],gt=r=>({ID:r}),ut=r=>({"bg-warning":r});function ht(r,n){if(r&1&&(e(0,"span",22),I(1,"img",23),t(),l(2)),r&2){let o=n.item;d(),s("src",o.Img,W)("alt",o.Name),d(),x(" ",o.Name," ")}}function ft(r,n){r&1&&(e(0,"th",27)(1,"span",33),l(2," Response Body Warning "),t()())}function vt(r,n){r&1&&(e(0,"th")(1,"span",33),l(2," Number Override "),t()())}function _t(r,n){if(r&1&&(e(0,"td",27)(1,"span",36),l(2),t()()),r&2){let o=w().$implicit;d(),s("ngClass",q(2,ut,o.responseBodyWarning!=null)),d(),g(o.responseBodyWarning)}}function yt(r,n){if(r&1&&(e(0,"td"),l(1),t()),r&2){let o=w().$implicit;d(),x(" ",o.ResponseBodyWarningReference," ")}}function St(r,n){if(r&1&&(e(0,"tr")(1,"td")(2,"a",34),l(3),b(4,"date"),t()(),e(5,"td"),l(6),t(),e(7,"td"),l(8),t(),e(9,"td"),l(10),t(),e(11,"td",27)(12,"span",35),l(13),t()(),_(14,_t,3,4,"td",29)(15,yt,2,1,"td",30),t()),r&2){let o=n.$implicit,m=w(2);d(2),s("routerLink",ee(14,ct))("queryParams",q(15,gt,o.ID)),d(),x(" ",T(4,11,o.Created,"dd MMM yyyy HH:mm:ss")," "),d(3),g(o.MarketTypeString),d(2),g(o.POSActionTypeString),d(2),g(o.Number),d(2),Re(o.ResponseCode===200||o.ResponseCode===202?"bg-success":"bg-warning"),d(),x(" ",o.ResponseCode," "),d(),s("ngIf",m.responseBodyWarningVisible),d(),s("ngIf",m.responseBodyWarningVisible)}}function Ct(r,n){if(r&1){let o=R();j(0),e(1,"div",24)(2,"table",25)(3,"thead")(4,"tr",26)(5,"th"),l(6,"Date"),t(),e(7,"th"),l(8,"Channel"),t(),e(9,"th"),l(10,"Actions"),t(),e(11,"th"),l(12,"Number"),t(),e(13,"th",27)(14,"span",28),l(15," Response Code "),t()(),_(16,ft,3,0,"th",29)(17,vt,3,0,"th",30),t()(),e(18,"tbody"),_(19,St,16,17,"tr",31),t()(),e(20,"mat-paginator",32),P("page",function(a){u(o);let i=w();return h(i.changePage(a))}),t()(),H()}if(r&2){let o=w();d(16),s("ngIf",o.responseBodyWarningVisible),d(),s("ngIf",o.responseBodyWarningVisible),d(2),s("ngForOf",o.Result),d(),s("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function bt(r,n){r&1&&(e(0,"div",37),I(1,"app-empty-state"),t())}var Qe=(()=>{let n=class n{constructor(m,a,i,c){this.http=m,this._RawLogService=a,this.route=i,this.authService=c,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""},this.responseBodyWarningVisible=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.route.queryParams.subscribe(m=>{this.responseCode=m.responseCode,this.responseCode!=null?this.Load(m):this.Load()})}Load(m={}){this.http.post("/api/OrdersLoader/Get",m).subscribe(a=>{this.filter=a.Filter,this.ActionTypeList=a.Options.ActionTypeList,this.Get()})}Get(m){this.filter.Number=m,this.http.post("/api/Orders/Get",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let i of a.hits){i._source.log.responseBodyWarning!=null&&(this.responseBodyWarningVisible=!0);let c={ID:i._id,Created:i._source["@timestamp_received"],shopId:i._source.shopId,MarketTypeString:i._source.log.type,POSActionTypeString:i._source.message,Number:i._source.log.number,ResponseCode:i._source.log.responseCode,responseBodyWarning:i._source.log.responseBodyWarning,ResponseBodyWarningReference:i._source.log.ResponseBodyWarningReference};this.Result.push(c)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(m){this.filter.PageNumber=m.pageIndex+1,this.Get()}};n.\u0275fac=function(a){return new(a||n)(f(M),f(Z),f(A),f(oe))},n.\u0275cmp=E({type:n,selectors:[["app-order"]],decls:43,vars:15,consts:[["EMPTY_STATE",""],["headerTitle","Order Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["id","listresponseBodyWarning"],["value","number-override"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],["class","text-center",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"],[1,"text-white","p-2","rounded","response-desc",3,"ngClass"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,i){if(a&1){let c=R();e(0,"mainpanel",1),C("textChange",function(p){return u(c),S(i.Number,p)||(i.Number=p),h(p)}),P("onSubmit",function(p){return u(c),h(i.Get(p))}),e(1,"filters")(2,"div")(3,"label",2),l(4,"Channel"),t(),e(5,"ng-select",3),C("ngModelChange",function(p){return u(c),S(i.filter.ChannelID,p)||(i.filter.ChannelID=p),h(p)}),_(6,ht,3,3,"ng-template",4),t()(),e(7,"div",5)(8,"label",2),l(9,"Action"),t(),e(10,"ng-select",6),C("ngModelChange",function(p){return u(c),S(i.filter.ActionType,p)||(i.filter.ActionType=p),h(p)}),t()(),e(11,"div",5)(12,"label",7),l(13,"From/To"),t(),e(14,"div",8)(15,"datepicker",9),C("dateChange",function(p){return u(c),S(i.filter.From,p)||(i.filter.From=p),h(p)}),t()(),e(16,"div")(17,"datepicker",10),C("dateChange",function(p){return u(c),S(i.filter.To,p)||(i.filter.To=p),h(p)}),t()()(),e(18,"div",5)(19,"label",11),l(20,"Response Code"),t(),e(21,"input",12),C("ngModelChange",function(p){return u(c),S(i.filter.StatusCode,p)||(i.filter.StatusCode=p),h(p)}),t()(),e(22,"div",5)(23,"label",11),l(24,"Response Body Warning"),t(),e(25,"input",13),C("ngModelChange",function(p){return u(c),S(i.filter.responseBodyWarning,p)||(i.filter.responseBodyWarning=p),h(p)}),t(),e(26,"datalist",14),I(27,"option",15),t()(),e(28,"div",5)(29,"label",11),l(30,"Page Number"),t(),e(31,"input",16),C("ngModelChange",function(p){return u(c),S(i.filter.PageNumber,p)||(i.filter.PageNumber=p),h(p)}),t()(),e(32,"div",5)(33,"label",11),l(34,"Page Size"),t(),e(35,"input",17),C("ngModelChange",function(p){return u(c),S(i.filter.RowCount,p)||(i.filter.RowCount=p),h(p)}),t()()(),e(36,"content")(37,"div",18)(38,"div",19)(39,"div",20),_(40,Ct,21,6,"ng-container",21)(41,bt,2,0,"ng-template",null,0,G),t()()()()()}if(a&2){let c=z(42);y("text",i.Number),d(5),s("clearable",!0)("items",i.channelOptions),y("ngModel",i.filter.ChannelID),d(5),s("clearable",!0)("items",i.ActionTypeList),y("ngModel",i.filter.ActionType),d(5),y("date",i.filter.From),d(2),y("date",i.filter.To),d(4),y("ngModel",i.filter.StatusCode),d(4),y("ngModel",i.filter.responseBodyWarning),d(6),y("ngModel",i.filter.PageNumber),d(4),y("ngModel",i.filter.RowCount),d(5),s("ngIf",(i.Result==null?null:i.Result.length)>0)("ngIfElse",c)}},dependencies:[We,F,N,Fe,Ae,te,re,ie,ne,V,L,Y,de,ae,le,J,U,ze,D]});let r=n;return r})();var wt=()=>["/menu/log/inventory/detail"],xt=r=>({ID:r});function It(r,n){if(r&1&&(e(0,"span",18),I(1,"img",19),t(),l(2)),r&2){let o=n.item;d(),s("src",o.Img,W)("alt",o.Name),d(),x(" ",o.Name," ")}}function Et(r,n){if(r&1&&(e(0,"tr")(1,"td")(2,"a",25),l(3),b(4,"date"),t()(),e(5,"td"),l(6),t(),e(7,"td"),l(8),t(),e(9,"td"),l(10),t(),e(11,"td"),l(12),t()()),r&2){let o=n.$implicit;d(2),s("routerLink",ee(10,wt))("queryParams",q(11,xt,o.ID)),d(),x(" ",T(4,7,o.Created,"dd MMM yyyy HH:mm")," "),d(3),g(o.channelName),d(2),g(o.Sku),d(2),g(o.Stock),d(2),g(o.ResponseCode)}}function Tt(r,n){if(r&1){let o=R();j(0),e(1,"div",20)(2,"table",21)(3,"thead")(4,"tr",22)(5,"th"),l(6,"Created"),t(),e(7,"th"),l(8,"Channel"),t(),e(9,"th"),l(10,"SKU"),t(),e(11,"th"),l(12,"Stock"),t(),e(13,"th"),l(14,"Response code"),t()()(),e(15,"tbody"),_(16,Et,13,13,"tr",23),t()(),e(17,"mat-paginator",24),P("page",function(a){u(o);let i=w();return h(i.changePage(a))}),t()(),H()}if(r&2){let o=w();d(16),s("ngForOf",o.Result),d(),s("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function Dt(r,n){r&1&&(e(0,"div",26),I(1,"app-empty-state"),t())}var Xe=(()=>{let n=class n{constructor(m,a,i){this.http=m,this._RawLogService=a,this.authService=i,this.Result=Array(),this.filter={PageNumber:0,RowCount:20,Sku:null,ChannelID:"",StatusCode:"",From:"",To:""},this.Load(),this.channelOptions=this.authService.getChannels()}Load(){this.http.post("/api/OrdersLoader/Get",{}).subscribe(m=>{this.filter=m.Filter,this.ActionTypeList=m.Options.ActionTypeList,this.Get()})}Get(m){m!=null&&(this.filter.Sku=m),this.http.post("api/Inventory/GetLog",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let i of a.hits){let c={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.Result.push(c)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(m){this.filter.PageNumber=m.pageIndex+1,this.Get()}};n.\u0275fac=function(a){return new(a||n)(f(M),f(Z),f(oe))},n.\u0275cmp=E({type:n,selectors:[["app-inventory-log"]],decls:30,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Inventory Log","searchBoxPlaceHolder","Enter SKU...",3,"textChange","onSubmit","text"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,i){if(a&1){let c=R();e(0,"mainpanel",1),C("textChange",function(p){return u(c),S(i.filter.Sku,p)||(i.filter.Sku=p),h(p)}),P("onSubmit",function(p){return u(c),h(i.Get(p))}),e(1,"filters")(2,"div",2)(3,"div")(4,"label",3),l(5,"Channel"),t(),e(6,"ng-select",4),C("ngModelChange",function(p){return u(c),S(i.filter.ChannelID,p)||(i.filter.ChannelID=p),h(p)}),_(7,It,3,3,"ng-template",5),t()(),e(8,"div",6)(9,"label",7),l(10,"From/To"),t(),e(11,"div",8)(12,"datepicker",9),C("dateChange",function(p){return u(c),S(i.filter.From,p)||(i.filter.From=p),h(p)}),t()(),e(13,"div")(14,"datepicker",10),C("dateChange",function(p){return u(c),S(i.filter.To,p)||(i.filter.To=p),h(p)}),t()()(),e(15,"div",6)(16,"label",11),l(17,"Page Number"),t(),e(18,"input",12),C("ngModelChange",function(p){return u(c),S(i.filter.PageNumber,p)||(i.filter.PageNumber=p),h(p)}),t()(),e(19,"div",6)(20,"label",11),l(21,"Page Size"),t(),e(22,"input",13),C("ngModelChange",function(p){return u(c),S(i.filter.RowCount,p)||(i.filter.RowCount=p),h(p)}),t()()()(),e(23,"content")(24,"div",14)(25,"div",15)(26,"div",16),_(27,Tt,18,4,"ng-container",17)(28,Dt,2,0,"ng-template",null,0,G),t()()()()()}if(a&2){let c=z(29);y("text",i.filter.Sku),d(6),s("clearable",!0)("items",i.channelOptions),y("ngModel",i.filter.ChannelID),d(6),y("date",i.filter.From),d(2),y("date",i.filter.To),d(4),y("ngModel",i.filter.PageNumber),d(4),y("ngModel",i.filter.RowCount),d(5),s("ngIf",(i.Result==null?null:i.Result.length)>0)("ngIfElse",c)}},dependencies:[F,N,te,re,ie,ne,V,L,Y,de,ae,le,J,U,D]});let r=n;return r})();var Mt=()=>["/menu/log/order/detail"],Lt=r=>({ID:r});function Pt(r,n){if(r&1&&(e(0,"span",17),I(1,"img",18),t(),l(2)),r&2){let o=n.item;d(),s("src",o.Img,W)("alt",o.Name),d(),x(" ",o.Name," ")}}function Nt(r,n){if(r&1&&(e(0,"tr")(1,"td")(2,"a",25),l(3),b(4,"date"),t()(),e(5,"td"),l(6),t(),e(7,"td"),l(8),t(),e(9,"td"),l(10),t()()),r&2){let o=n.$implicit;d(2),s("routerLink",ee(9,Mt))("queryParams",q(10,Lt,o.id)),d(),x(" ",T(4,6,o.Created,"dd MMM yyyy HH:mm:ss")," "),d(3),g(o.type),d(2),g(o.number),d(2),g(o.message)}}function Rt(r,n){if(r&1){let o=R();j(0),e(1,"div",19)(2,"table",20)(3,"thead",21)(4,"tr")(5,"th",22),l(6,"Date"),t(),e(7,"th"),l(8,"Type"),t(),e(9,"th"),l(10,"Number"),t(),e(11,"th"),l(12,"Message"),t()()(),e(13,"tbody"),_(14,Nt,11,12,"tr",23),t()(),e(15,"mat-paginator",24),P("page",function(a){u(o);let i=w();return h(i.changePage(a))}),t()(),H()}if(r&2){let o=w();d(14),s("ngForOf",o.Result),d(),s("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function Ot(r,n){r&1&&(e(0,"div",26),I(1,"app-empty-state"),t())}var $e=(()=>{let n=class n{constructor(m,a,i){this.http=m,this._RawLogService=a,this.authService=i,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"}],this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(m={}){this.http.post("/api/OrdersLoader/Get",m).subscribe(a=>{this.filter=a.Filter,this.ActionTypeList=a.Options.ActionTypeList,this.Get()})}Get(m){this.filter.Number=m,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let i of a.hits){let c={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.Result.push(c)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(m){this.filter.PageNumber=m.pageIndex+1,this.Get()}};n.\u0275fac=function(a){return new(a||n)(f(M),f(Z),f(oe))},n.\u0275cmp=E({type:n,selectors:[["app-raw-log"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Channel Webhook Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,i){if(a&1){let c=R();e(0,"mainpanel",1),C("textChange",function(p){return u(c),S(i.filter.Number,p)||(i.filter.Number=p),h(p)}),P("onSubmit",function(p){return u(c),h(i.Get(p))}),e(1,"filters")(2,"div")(3,"label",2),l(4,"Channel"),t(),e(5,"ng-select",3),C("ngModelChange",function(p){return u(c),S(i.filter.ChannelID,p)||(i.filter.ChannelID=p),h(p)}),_(6,Pt,3,3,"ng-template",4),t()(),e(7,"div",5)(8,"label",6),l(9,"From/To"),t(),e(10,"div",7)(11,"datepicker",8),C("dateChange",function(p){return u(c),S(i.filter.From,p)||(i.filter.From=p),h(p)}),t()(),e(12,"div")(13,"datepicker",9),C("dateChange",function(p){return u(c),S(i.filter.To,p)||(i.filter.To=p),h(p)}),t()()(),e(14,"div",5)(15,"label",10),l(16,"Page Number"),t(),e(17,"input",11),C("ngModelChange",function(p){return u(c),S(i.filter.PageNumber,p)||(i.filter.PageNumber=p),h(p)}),t()(),e(18,"div",5)(19,"label",10),l(20,"Page Size"),t(),e(21,"input",12),C("ngModelChange",function(p){return u(c),S(i.filter.RowCount,p)||(i.filter.RowCount=p),h(p)}),t()()(),e(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),_(26,Rt,16,4,"ng-container",16)(27,Ot,2,0,"ng-template",null,0,G),t()()()()()}if(a&2){let c=z(28);y("text",i.filter.Number),d(5),s("clearable",!0)("items",i.channelOptions),y("ngModel",i.filter.ChannelID),d(6),y("date",i.filter.From),d(2),y("date",i.filter.To),d(4),y("ngModel",i.filter.PageNumber),d(4),y("ngModel",i.filter.RowCount),d(5),s("ngIf",(i.Result==null?null:i.Result.length)>0)("ngIfElse",c)}},dependencies:[F,N,te,re,ie,ne,V,L,Y,de,ae,le,J,U,D]});let r=n;return r})();var Te=class{constructor(n,o){this._document=o;let m=this._textarea=this._document.createElement("textarea"),a=m.style;a.position="fixed",a.top=a.opacity="0",a.left="-999em",m.setAttribute("aria-hidden","true"),m.value=n,m.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(m)}copy(){let n=this._textarea,o=!1;try{if(n){let m=this._document.activeElement;n.select(),n.setSelectionRange(0,n.value.length),o=this._document.execCommand("copy"),m&&m.focus()}}catch{}return o}destroy(){let n=this._textarea;n&&(n.remove(),this._textarea=void 0)}},Vt=(()=>{let n=class n{constructor(m){this._document=m}copy(m){let a=this.beginCopy(m),i=a.copy();return a.destroy(),i}beginCopy(m){return new Te(m,this._document)}};n.\u0275fac=function(a){return new(a||n)(fe(Ve))},n.\u0275prov=me({token:n,factory:n.\u0275fac,providedIn:"root"});let r=n;return r})(),Wt=new Me("CDK_COPY_TO_CLIPBOARD_CONFIG"),et=(()=>{let n=class n{constructor(m,a,i){this._clipboard=m,this._ngZone=a,this.text="",this.attempts=1,this.copied=new Pe,this._pending=new Set,i&&i.attempts!=null&&(this.attempts=i.attempts)}copy(m=this.attempts){if(m>1){let a=m,i=this._clipboard.beginCopy(this.text);this._pending.add(i);let c=()=>{let v=i.copy();!v&&--a&&!this._destroyed?this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(c,1)):(this._currentTimeout=null,this._pending.delete(i),i.destroy(),this.copied.emit(v))};c()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(m=>m.destroy()),this._pending.clear(),this._destroyed=!0}};n.\u0275fac=function(a){return new(a||n)(f(Vt),f(Ne),f(Wt,8))},n.\u0275dir=Le({type:n,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(a,i){a&1&&P("click",function(){return i.copy()})},inputs:{text:[0,"cdkCopyToClipboard","text"],attempts:[0,"cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"},standalone:!0});let r=n;return r})(),tt=(()=>{let n=class n{};n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=se({type:n}),n.\u0275inj=pe({});let r=n;return r})();function Bt(r,n){r&1&&I(0,"img",21)}function Ft(r,n){r&1&&I(0,"img",22)}function At(r,n){if(r&1&&(e(0,"div",4)(1,"div",5)(2,"div",6)(3,"h5"),l(4,"General"),t()(),e(5,"div",7)(6,"div",2)(7,"div",8)(8,"div",9)(9,"label"),l(10,"Date"),t(),e(11,"div")(12,"span"),l(13),b(14,"date"),t()()()(),e(15,"div",10)(16,"div",9)(17,"label"),l(18,"Market Place Type"),t(),_(19,Bt,1,0,"img",11)(20,Ft,1,0,"img",12),e(21,"a",13)(22,"span",14),l(23),t(),I(24,"br"),e(25,"small",15),l(26),t()()()(),e(27,"div",10)(28,"div",9)(29,"label"),l(30,"Number"),t(),e(31,"div")(32,"span"),l(33),t()()()(),e(34,"div",8)(35,"div",9)(36,"label"),l(37,"Process Type"),t(),e(38,"div")(39,"span"),l(40),t()()()(),e(41,"div",4)(42,"div",9)(43,"label"),l(44,"Authorization Header"),t(),e(45,"div")(46,"span"),l(47),t()()()(),e(48,"div",16)(49,"div",5)(50,"div",17)(51,"div",18)(52,"h3"),l(53,"Request"),t()(),e(54,"div",19)(55,"button",20),l(56,"Copy to clipboard"),t()()(),e(57,"div",7),l(58),t()()()()()()()),r&2){let o=w();d(13),g(T(14,11,o.data.Created,"dd MMM yyyy HH:mm:ss")),d(6),s("ngIf",o.data.TypeID==1),d(),s("ngIf",o.data.TypeID==0),d(),Oe("href",o.data.ShopLink,W),d(2),g(o.data.ShopName),d(3),g(o.data.ShopLink),d(7),g(o.data._source.log.number),d(7),g(o.data._source.log.processType),d(7),g(o.data._source.log.authorizationHeader),d(8),s("cdkCopyToClipboard",o.data._source.log.request),d(3),x(" ",o.data._source.log.request," ")}}var it=(()=>{let n=class n{constructor(m,a,i){this.route=m,this.http=a,this._RawLogService=i,this.route.queryParams.subscribe(c=>{let v=JSON.parse(localStorage.getItem("channel"));if(this.ID=c.ID,this.data=this._RawLogService.Fill(this.ID),this.data.Created=this.data._source["@timestamp_received"],v.length>0){let p=v.find(st=>st.ShopID==this.data._source.shopId);p?(this.data.TypeID=p.TypeID,this.data.ShopName=p.Name,this.data.ShopLink=p.URL):(this.data.TypeID=null,this.data.ShopName=null,this.data.ShopLink=null)}})}ngOnInit(){}};n.\u0275fac=function(a){return new(a||n)(f(A),f(M),f(Z))},n.\u0275cmp=E({type:n,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(a,i){a&1&&(e(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2),_(4,At,59,14,"div",3),t()()()()),a&2&&(s("headerTitle","Request Raw Log Detail")("hideSearchBox",!0)("hideSearchDropdown",!0),d(4),s("ngIf",i.data))},dependencies:[N,L,et,D]});let r=n;return r})();function jt(r,n){if(r&1&&(e(0,"div",10)(1,"div",7)(2,"div",8)(3,"h5"),l(4,"General"),t()(),e(5,"div",9)(6,"div",3)(7,"div",6)(8,"div",12)(9,"label"),l(10,"Date"),t(),e(11,"div")(12,"span"),l(13),b(14,"date"),t()()()(),e(15,"div",6)(16,"div",12)(17,"label"),l(18,"SKU"),t(),e(19,"div")(20,"span"),l(21),t()()()(),e(22,"div",6)(23,"div",12)(24,"label"),l(25,"Channel"),t(),e(26,"div")(27,"span"),l(28),t()()()(),e(29,"div",6)(30,"div",12)(31,"label"),l(32,"Response Code"),t(),e(33,"div")(34,"span"),l(35),t()()()()()()()()),r&2){let o=w();d(13),g(T(14,4,o.data.Created,"dd MMM yyyy")),d(8),g(o.data.Sku),d(7),g(o.data.ChannelName),d(7),g(o.data.ResponseCode)}}var nt=(()=>{let n=class n{constructor(m,a,i){this.route=m,this.http=a,this._RawLogService=i,this.data={Created:"",Sku:"",ChannelName:"",ResponseCode:""},this.route.queryParams.subscribe(c=>{this.ID=c.ID,this.Load()})}ngOnInit(){}Load(){var m={ID:this.ID};this.http.post("/api/Inventory/GetInventoryLogDeatil",m).subscribe(a=>{this.data.Created=a.hits[0]._source["@timestamp_received"],this.data.Sku=a.hits[0]._source.log.sku,this.data.ChannelName=a.hits[0]._source.log.channelName,this.data.ResponseCode=a.hits[0]._source.log.responseCode,this.request=JSON.parse(a.hits[0]._source.log.request),this.response=a.hits[0]._source.log.response})}};n.\u0275fac=function(a){return new(a||n)(f(A),f(M),f(Z))},n.\u0275cmp=E({type:n,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(a,i){a&1&&(e(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Back"),t()(),e(4,"content")(5,"div",2)(6,"div",3),_(7,jt,36,7,"div",4),t(),e(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h5"),l(13,"Request"),t()(),e(14,"div",9)(15,"div",10)(16,"div",11)(17,"pre"),l(18),b(19,"json"),t()()()()()(),e(20,"div",6)(21,"div",7)(22,"div",8)(23,"h5"),l(24,"Response"),t()(),e(25,"div",9)(26,"div",10)(27,"div",11)(28,"pre"),l(29),t()()()()()()()()()()),a&2&&(s("headerTitle","Inventory Detail")("pageData","Inventory Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),d(7),s("ngIf",i.data),d(11),g(B(19,7,i.request)),d(11),g(i.response))},dependencies:[N,V,L,ce,D]});let r=n;return r})();function Ht(r,n){if(r&1&&(e(0,"div",9)(1,"div",10)(2,"label"),l(3,"Process Code"),t(),e(4,"div")(5,"span"),l(6),t()()()()),r&2){let o=w();d(6),g(o.ProcessedCode)}}function qt(r,n){if(r&1){let o=R();e(0,"a",16),P("click",function(){u(o);let a=w();return h(a.Retry())}),l(1,"Retry"),t()}}var rt=(()=>{let n=class n{constructor(m,a){this.route=m,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(i=>{this.ID=i.ID,this.Load()})}ngOnInit(){}Retry(){var m={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",m).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var m={ID:this.ID};this.http.post("/api/Orders/GetDetail",m).subscribe(a=>{for(let i of a.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})}};n.\u0275fac=function(a){return new(a||n)(f(A),f(M))},n.\u0275cmp=E({type:n,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(a,i){a&1&&(e(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Back"),t()(),e(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),l(11,"General"),t()(),e(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),l(17,"Date"),t(),e(18,"div")(19,"span"),l(20),b(21,"date"),t()()()(),e(22,"div",9)(23,"div",10)(24,"label"),l(25,"Number"),t(),e(26,"div")(27,"span"),l(28),t()()()(),e(29,"div",9)(30,"div",10)(31,"label"),l(32,"Type"),t(),e(33,"div")(34,"span"),l(35),t()()()(),e(36,"div",9)(37,"div",10)(38,"label"),l(39,"Response Code"),t(),e(40,"div")(41,"span"),l(42),t()()()(),e(43,"div",9)(44,"div",10)(45,"label"),l(46,"ShopID"),t(),e(47,"div")(48,"span"),l(49),t()()()(),_(50,Ht,7,1,"div",11),e(51,"div",9)(52,"div",10)(53,"label"),l(54,"Action"),t(),e(55,"div")(56,"span"),l(57),t()()()()()()()()(),e(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),l(63,"Request"),t()(),e(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),l(68),b(69,"json"),t()()(),e(70,"actions",14),_(71,qt,2,0,"a",15),t()()()(),e(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),l(76,"Response"),t()(),e(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),l(81),b(82,"json"),t()()()()()()()()()()),a&2&&(s("headerTitle","Order #"+i.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),d(20),g(T(21,14,i.Created,"dd MMM yyyy HH:mm:ss")),d(8),g(i.Number),d(7),g(i.MarketTypeString),d(7),g(i.ResponseCode),d(7),g(i.shopId),d(),s("ngIf",i.ProcessedCode!=null),d(7),g(i.POSActionTypeString),d(11),g(B(69,17,i.request)),d(3),s("ngIf",i.ResponseCode!="200"&&i.ResponseCode!="201"),d(10),g(B(82,19,i.response)))},dependencies:[N,V,L,ce,D]});let r=n;return r})();var zt=()=>["/menu/log/exception/detail"],Gt=r=>({ID:r});function Ut(r,n){if(r&1&&(e(0,"tr")(1,"td",12),I(2,"img",13),t(),e(3,"td"),l(4),b(5,"date"),t(),e(6,"td")(7,"a",14),l(8),t()(),e(9,"td")(10,"div",15),l(11),t(),e(12,"div"),l(13),t()()()),r&2){let o=n.$implicit;d(2),s("src",o.logo,W),d(2),g(T(5,7,o.date,"dd-MM-yyyy hh:mm:ss")),d(3),s("routerLink",ee(10,zt))("queryParams",q(11,Gt,o.id)),d(),x(" ",o.number," "),d(3),g(o.message),d(2),g(o.stackTrace)}}function Yt(r,n){if(r&1){let o=R();j(0),e(1,"mat-paginator",16),P("page",function(a){u(o);let i=w(2);return h(i.onPaginationChange(a))}),t(),H()}if(r&2){let o=w(2);d(),s("length",o.pageTotal)("pageSize",o.pageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function Jt(r,n){if(r&1&&(j(0),e(1,"div",6)(2,"table",7)(3,"thead")(4,"tr",8)(5,"th"),l(6,"Channel"),t(),e(7,"th",9),l(8,"Date"),t(),e(9,"th"),l(10,"Number"),t(),e(11,"th"),l(12,"Exception"),t()()(),e(13,"tbody"),_(14,Ut,14,13,"tr",10),t()(),_(15,Yt,2,3,"ng-container",11),t(),H()),r&2){let o=w();d(14),s("ngForOf",o.exceptions),d(),s("ngIf",(o.exceptions==null?null:o.exceptions.length)>0)}}function Kt(r,n){r&1&&(e(0,"div",17),I(1,"app-empty-state"),t())}var ot=(()=>{let n=class n{constructor(m){this.http=m,this.exceptions=[],this.filter={RowCount:50,PageNumber:1},this.getData()}getData(){this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(m=>{this.exceptions=m.hits.map(a=>({id:a._id,logo:Se.getChannelLogoByName(a._source.error?.Type),number:a._source.error.number,date:a._source["@timestamp_received"],stackTrace:a._source.error.stackTrace,message:a._source.message,requestJSON:a._source?.error?.requestJSON})),this.pageTotal=m.total.value,this.pageSize=this.filter.RowCount>this.pageTotal?this.pageTotal:this.filter.RowCount})}onPaginationChange(m){this.filter.PageNumber=m.pageIndex+1,this.getData()}};n.\u0275fac=function(a){return new(a||n)(f(M))},n.\u0275cmp=E({type:n,selectors:[["app-exception-log"]],decls:8,vars:2,consts:[["EMPTY_STATE",""],["headerTitle","Exception Log","searchBoxPlaceHolder","Enter Number...","hideSearchBox","true","hideSearchDropdown","true"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[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,"page","length","pageSize","pageIndex"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,i){if(a&1&&(e(0,"mainpanel",1)(1,"content")(2,"div",2)(3,"div",3)(4,"div",4),_(5,Jt,16,2,"ng-container",5)(6,Kt,2,0,"ng-template",null,0,G),t()()()()()),a&2){let c=z(7);d(5),s("ngIf",i.exceptions.length>0)("ngIfElse",c)}},dependencies:[F,N,V,L,Y,U,D]});let r=n;return r})();var Zt=r=>({ID:r});function Qt(r,n){if(r&1&&(e(0,"span",17),I(1,"img",18),t(),l(2)),r&2){let o=n.item;d(),s("src",o.Img,W)("alt",o.Name),d(),x(" ",o.Name," ")}}function Xt(r,n){if(r&1&&(e(0,"tr")(1,"td"),l(2),t(),e(3,"td"),I(4,"img",28),t(),e(5,"td"),l(6),t(),e(7,"td",29)(8,"a",30),l(9),b(10,"number"),t()(),e(11,"td"),l(12),t(),e(13,"td"),l(14),b(15,"date"),t()()),r&2){let o=n.$implicit;d(2),g(o._source.ChannelName),d(2),s("src",o.logo,W),d(2),g(o._source.DateRange),d(2),s("queryParams",q(12,Zt,o._source.ID)),d(),x(" ",B(10,7,o._source.CountOrder)," "),d(3),g(o._source.UserLogin),d(2),x(" ",T(15,9,o._source["@timestamp_received"],"dd MMM yyyy hh:mm")," ")}}function $t(r,n){if(r&1){let o=R();j(0),e(1,"div",19)(2,"table",20)(3,"thead")(4,"tr",21)(5,"th",22),l(6,"Channel"),t(),e(7,"th",23),l(8,"Type"),t(),e(9,"th",24),l(10,"Download Date Range"),t(),e(11,"th",25),l(12,"Count"),t(),e(13,"th"),l(14,"User Login"),t(),e(15,"th"),l(16,"Created"),t()()(),e(17,"tbody"),_(18,Xt,16,14,"tr",26),t()(),e(19,"mat-paginator",27),P("page",function(a){u(o);let i=w();return h(i.onPaginationChange(a))}),t()(),H()}if(r&2){let o=w();d(18),s("ngForOf",o.downloadOrders),d(),s("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function ei(r,n){r&1&&(e(0,"div",31),I(1,"app-empty-state"),t())}var at=(()=>{let n=class n{constructor(m,a){this.http=m,this.authService=a,this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(m=>{this.filter=m.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(m=>{this.downloadOrders=m.hits,this.setChannelLogo(),this.paginationTotal=m.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(m=>(m.logo=Se.getChannelLogoByTypeId(m._source.TypeID),m))}onPaginationChange(m){this.filter.PageNumber=m.pageIndex+1,this.getDownloadOrders()}};n.\u0275fac=function(a){return new(a||n)(f(M),f(oe))},n.\u0275cmp=E({type:n,selectors:[["app-manual-order-log"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[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,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/log/order-log/order-log-detail",3,"queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,i){if(a&1){let c=R();e(0,"mainpanel",1),P("onSubmit",function(){return u(c),h(i.getDownloadOrders())}),e(1,"filters")(2,"div")(3,"label",2),l(4,"Channel"),t(),e(5,"ng-select",3),C("ngModelChange",function(p){return u(c),S(i.filter.ChannelID,p)||(i.filter.ChannelID=p),h(p)}),_(6,Qt,3,3,"ng-template",4),t()(),e(7,"div",5)(8,"label",6),l(9,"From/To"),t(),e(10,"div",7)(11,"datepicker",8),C("dateChange",function(p){return u(c),S(i.filter.From,p)||(i.filter.From=p),h(p)}),t()(),e(12,"div")(13,"datepicker",9),C("dateChange",function(p){return u(c),S(i.filter.To,p)||(i.filter.To=p),h(p)}),t()()(),e(14,"div",5)(15,"label",10),l(16,"Page Number"),t(),e(17,"input",11),C("ngModelChange",function(p){return u(c),S(i.filter.PageNumber,p)||(i.filter.PageNumber=p),h(p)}),t()(),e(18,"div",5)(19,"label",10),l(20,"Page Size"),t(),e(21,"input",12),C("ngModelChange",function(p){return u(c),S(i.filter.RowCount,p)||(i.filter.RowCount=p),h(p)}),t()()(),e(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),_(26,$t,20,4,"ng-container",16)(27,ei,2,0,"ng-template",null,0,G),t()()()()()}if(a&2){let c=z(28);s("hideSearchBox",!0),d(5),s("clearable",!0)("items",i.channelOptions),y("ngModel",i.filter.ChannelID),d(6),y("date",i.filter.From),d(2),y("date",i.filter.To),d(4),y("ngModel",i.filter.PageNumber),d(4),y("ngModel",i.filter.RowCount),d(5),s("ngIf",(i.downloadOrders==null?null:i.downloadOrders.length)>0)("ngIfElse",c)}},dependencies:[F,N,te,re,ie,ne,V,L,Y,de,ae,le,J,U,ke,D]});let r=n;return r})();var lt=(()=>{let n=class n{constructor(m){this.httpService=m}getExceptionDetail(m){return this.httpService.post("/api/Orders/GetDetailException",{ID:m}).pipe(ue(i=>i?.hits[0]?._source))}};n.\u0275fac=function(a){return new(a||n)(fe(M))},n.\u0275prov=me({token:n,factory:n.\u0275fac,providedIn:"root"});let r=n;return r})();function ii(r,n){if(r&1&&(e(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"h5"),l(6,"General"),t()(),e(7,"div",7)(8,"div",8)(9,"div",9)(10,"div",10)(11,"label"),l(12,"Date"),t(),e(13,"div")(14,"span"),l(15),b(16,"date"),t()()()(),e(17,"div",9)(18,"div",10)(19,"label"),l(20,"Number"),t(),e(21,"div")(22,"span"),l(23),t()()()(),e(24,"div",9)(25,"div",10)(26,"label"),l(27,"Type"),t(),e(28,"div")(29,"span"),l(30),t()()()(),e(31,"div",9)(32,"div",10)(33,"label"),l(34,"ShopID"),t(),e(35,"div")(36,"span"),l(37),t()()()()()()()()(),e(38,"div",11)(39,"div",9)(40,"div",5)(41,"div",6)(42,"h5"),l(43,"Request"),t()(),e(44,"div",7)(45,"div",12)(46,"div",13)(47,"pre"),l(48),b(49,"json"),t()()()()()(),e(50,"div",9)(51,"div",5)(52,"div",6)(53,"h5"),l(54,"Exception"),t()(),e(55,"div",7)(56,"div",14)(57,"div",13)(58,"div",15),l(59),t(),e(60,"pre"),l(61),t()()()()()()()()),r&2){let o=n.ngIf;d(15),g(T(16,7,o["@timestamp"],"dd MMM yyyy HH:mm:ss")),d(8),g(o==null||o.error==null?null:o.error.number),d(7),g(o==null||o.error==null?null:o.error.Type),d(7),g(o==null?null:o.shopId),d(11),g(B(49,10,o==null||o.error==null?null:o.error.requestJSON)),d(11),g(o==null?null:o.message),d(2),g(o==null||o.error==null?null:o.error.stackTrace)}}var dt=(()=>{let n=class n{constructor(m,a){this.activatedRoute=m,this.exceptionService=a,this.invoiceNumber=""}ngOnInit(){let m=this.activatedRoute.snapshot.queryParams;this.getExceptionDetail(m?.ID)}getExceptionDetail(m){this.exceptionDetail$=this.exceptionService.getExceptionDetail(m).pipe(he(a=>{this.invoiceNumber=a?.error?.number}),De(1))}};n.\u0275fac=function(a){return new(a||n)(f(A),f(lt))},n.\u0275cmp=E({type:n,selectors:[["app-exception-detail"]],decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["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(a,i){a&1&&(e(0,"mainpanel",0)(1,"content"),_(2,ii,62,12,"div",1),b(3,"async"),t()()),a&2&&(s("headerTitle","Order #"+i.invoiceNumber)("hideSearchBox",!0)("hideSearchDropdown",!0),d(2),s("ngIf",B(3,4,i.exceptionDetail$)))},dependencies:[N,L,ve,ce,D]});let r=n;return r})();function ni(r,n){if(r&1&&(e(0,"tr")(1,"td"),l(2),t(),e(3,"td"),l(4),t(),e(5,"td"),l(6),b(7,"date"),t(),e(8,"td"),l(9),b(10,"date"),t(),e(11,"td"),l(12),t()()),r&2){let o=n.$implicit;d(2),x(" ",o.Number," "),d(2),x(" ",o.Status," "),d(2),x(" ",T(7,5,o.Start,"HH:mm:ss:SSS")," "),d(3),x(" ",T(10,8,o.End,"HH:mm:ss:SSS")," "),d(3),x(" ",o.Exception," ")}}var mt=(()=>{let n=class n{constructor(m,a){this.route=m,this.httpService=a}ngOnInit(){this.initOrderDetails()}initOrderDetails(){let m=this.route.snapshot.queryParams;this.orderDetails$=this.httpService.post("/api/Orders/DownloadOrderLogsDetail",{ID:m.ID}).pipe(he(a=>{let i=a?.hits[0]?._source;this.headerTitle=`${i?.ChannelName} (${i?.DateRange})`}),ue(a=>a?.hits[0]._source?.Detail))}};n.\u0275fac=function(a){return new(a||n)(f(A),f(M))},n.\u0275cmp=E({type:n,selectors:[["app-download-order-detail"]],decls:22,vars:7,consts:[[3,"headerTitle","description","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","200px"],[2,"width","150px"],[2,"width","100px"],[4,"ngFor","ngForOf"]],template:function(a,i){a&1&&(e(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"table",5)(7,"thead")(8,"tr",6)(9,"th",7),l(10,"Number"),t(),e(11,"th",8),l(12,"Status"),t(),e(13,"th",9),l(14,"Start Time"),t(),e(15,"th",9),l(16,"End Time"),t(),e(17,"th"),l(18,"Exception"),t()()(),e(19,"tbody"),_(20,ni,13,11,"tr",10),b(21,"async"),t()()()()()()()()),a&2&&(s("headerTitle",i.headerTitle)("description",i.headerTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),d(20),s("ngForOf",B(21,5,i.orderDetails$)))},dependencies:[F,L,ve,D]});let r=n;return r})();var ri=[{path:"",component:Ze,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",component:Qe,canActivate:[k],data:{title:"Order Log"}},{path:"inventory",component:Xe,canActivate:[k],data:{title:"Inventory Log"}},{path:"rawlog",component:$e,canActivate:[k],data:{title:"Raw Log"}},{path:"rawlog/detail",component:it,canActivate:[k],data:{title:"Raw Log Detail"}},{path:"inventory/detail",component:nt,canActivate:[k],data:{title:"Inventory Details"}},{path:"order/detail",component:rt,canActivate:[k],data:{title:"Order Details"}},{path:"exception",component:ot,canActivate:[k],data:{title:"Exception Log"}},{path:"exception/detail",component:dt,canActivate:[k],data:{title:"Exception Log Detail"}},{path:"order-log",component:at,canActivate:[k],data:{title:"order Log"}},{path:"order-log/order-log-detail",component:mt,canActivate:[k],data:{title:"Order Log Detail"}},{path:"inventory-async",loadComponent:()=>import("./chunk-L536HOP7.js").then(r=>r.InventoryAsyncLogComponent),canActivate:[k],data:{title:"Sync Inventory Async"}},{path:"inventory-async/detail",loadComponent:()=>import("./chunk-GP3CFNYA.js").then(r=>r.InventoryAsyncDetailComponent),canActivate:[k],data:{title:"Sync Inventory Async Detail"}}]}],pt=(()=>{let n=class n{};n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=se({type:n}),n.\u0275inj=pe({imports:[_e,ye.forChild(ri)]});let r=n;return r})();var Mn=(()=>{let n=class n{};n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=se({type:n}),n.\u0275inj=pe({imports:[_e,je,He,pt,ye,Ue,tt,Ke,qe,Je,J,Ge]});let r=n;return r})();export{Mn as LogsModule};
|
|
1
|
+
import{a as J}from"./chunk-BMPACBBM.js";import{a as U}from"./chunk-FCVAME75.js";import"./chunk-7GNI4BOW.js";import"./chunk-OFRBPREK.js";import{a as Ye,b as Je}from"./chunk-7CEWM7GE.js";import{a as Y,b as Ke}from"./chunk-7NWB2VB2.js";import"./chunk-IP2WADIR.js";import"./chunk-MEGPKKGI.js";import{a as ae,b as le,d as de,e as qe}from"./chunk-2Y4N4NSS.js";import{a as k}from"./chunk-LCOFOENF.js";import"./chunk-M4VGME5L.js";import"./chunk-AAIK6JQ3.js";import{g as oe}from"./chunk-FON6ZRGN.js";import{e as M}from"./chunk-IPX66YIX.js";import"./chunk-HBHGO2RV.js";import{l as L,m as Ue}from"./chunk-PIDUM6XT.js";import{t as ze,u as Ge}from"./chunk-43TMSPFC.js";import"./chunk-4TYJR476.js";import{c as te,h as ie,k as ne,m as re,p as Fe,q as Ae,u as je,v as He}from"./chunk-F5YRASNU.js";import{c as Se}from"./chunk-2UXFUEON.js";import{$ as me,Eb as z,Fb as l,Gb as g,Ha as W,Hb as x,Ia as d,Ja as f,Jb as y,Kb as S,Lb as C,Ob as ee,Pa as Ne,Pb as q,Q as De,Wb as b,X as he,Xb as B,Ya as _,Yb as T,Zb as G,_a as s,aa as pe,ba as Me,bd as A,ca as fe,cb as Re,cd as Be,ed as V,ga as E,gd as ye,ha as se,ia as Le,kb as e,lb as t,mb as I,nb as j,nc as Ve,oa as u,ob as H,pa as h,pc as We,q as ue,qb as R,rc as F,sc as N,tb as P,vb as w,vc as ve,wc as D,xc as ce,yb as Oe,yc as ke,za as Pe,zc as _e}from"./chunk-77JORVC2.js";import"./chunk-CRRJCY55.js";var Ze=(()=>{let n=class n{constructor(){this.ObjectlogTabs=[{Title:"Sync Order",Url:"/menu/log/order"},{Title:"Sync Inventory",Url:"/menu/log/inventory"},{Title:"Async Inventory ",Url:"/menu/log/inventory-async"},{Title:"Channel Webhook",Url:"/menu/log/rawlog"},{Title:"Channel Webhook Exception ",Url:"/menu/log/exception"},{Title:"Download Order ",Url:"/menu/log/order-log"}]}ngOnInit(){}};n.\u0275fac=function(a){return new(a||n)},n.\u0275cmp=E({type:n,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(a,i){a&1&&(e(0,"nav",0)(1,"div",1)(2,"div"),I(3,"nav-tab",2),t()()(),I(4,"router-outlet")),a&2&&(d(3),s("Tabs",i.ObjectlogTabs))},dependencies:[Be,Ye]});let r=n;return r})();var Z=(()=>{let n=class n{constructor(){}get Data(){return this._Data}set Data(m){this._Data=m}Fill(m){return this._Data.find(a=>a._id==m)}};n.\u0275fac=function(a){return new(a||n)},n.\u0275prov=me({token:n,factory:n.\u0275fac,providedIn:"root"});let r=n;return r})();var ct=()=>["/menu/log/order/detail"],gt=r=>({ID:r}),ut=r=>({"bg-warning":r});function ht(r,n){if(r&1&&(e(0,"span",22),I(1,"img",23),t(),l(2)),r&2){let o=n.item;d(),s("src",o.Img,W)("alt",o.Name),d(),x(" ",o.Name," ")}}function ft(r,n){r&1&&(e(0,"th",27)(1,"span",33),l(2," Response Body Warning "),t()())}function vt(r,n){r&1&&(e(0,"th")(1,"span",33),l(2," Number Override "),t()())}function _t(r,n){if(r&1&&(e(0,"td",27)(1,"span",36),l(2),t()()),r&2){let o=w().$implicit;d(),s("ngClass",q(2,ut,o.responseBodyWarning!=null)),d(),g(o.responseBodyWarning)}}function yt(r,n){if(r&1&&(e(0,"td"),l(1),t()),r&2){let o=w().$implicit;d(),x(" ",o.ResponseBodyWarningReference," ")}}function St(r,n){if(r&1&&(e(0,"tr")(1,"td")(2,"a",34),l(3),b(4,"date"),t()(),e(5,"td"),l(6),t(),e(7,"td"),l(8),t(),e(9,"td"),l(10),t(),e(11,"td",27)(12,"span",35),l(13),t()(),_(14,_t,3,4,"td",29)(15,yt,2,1,"td",30),t()),r&2){let o=n.$implicit,m=w(2);d(2),s("routerLink",ee(14,ct))("queryParams",q(15,gt,o.ID)),d(),x(" ",T(4,11,o.Created,"dd MMM yyyy HH:mm:ss")," "),d(3),g(o.MarketTypeString),d(2),g(o.POSActionTypeString),d(2),g(o.Number),d(2),Re(o.ResponseCode===200||o.ResponseCode===202?"bg-success":"bg-warning"),d(),x(" ",o.ResponseCode," "),d(),s("ngIf",m.responseBodyWarningVisible),d(),s("ngIf",m.responseBodyWarningVisible)}}function Ct(r,n){if(r&1){let o=R();j(0),e(1,"div",24)(2,"table",25)(3,"thead")(4,"tr",26)(5,"th"),l(6,"Date"),t(),e(7,"th"),l(8,"Channel"),t(),e(9,"th"),l(10,"Actions"),t(),e(11,"th"),l(12,"Number"),t(),e(13,"th",27)(14,"span",28),l(15," Response Code "),t()(),_(16,ft,3,0,"th",29)(17,vt,3,0,"th",30),t()(),e(18,"tbody"),_(19,St,16,17,"tr",31),t()(),e(20,"mat-paginator",32),P("page",function(a){u(o);let i=w();return h(i.changePage(a))}),t()(),H()}if(r&2){let o=w();d(16),s("ngIf",o.responseBodyWarningVisible),d(),s("ngIf",o.responseBodyWarningVisible),d(2),s("ngForOf",o.Result),d(),s("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function bt(r,n){r&1&&(e(0,"div",37),I(1,"app-empty-state"),t())}var Qe=(()=>{let n=class n{constructor(m,a,i,c){this.http=m,this._RawLogService=a,this.route=i,this.authService=c,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""},this.responseBodyWarningVisible=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.route.queryParams.subscribe(m=>{this.responseCode=m.responseCode,this.responseCode!=null?this.Load(m):this.Load()})}Load(m={}){this.http.post("/api/OrdersLoader/Get",m).subscribe(a=>{this.filter=a.Filter,this.ActionTypeList=a.Options.ActionTypeList,this.Get()})}Get(m){this.filter.Number=m,this.http.post("/api/Orders/Get",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let i of a.hits){i._source.log.responseBodyWarning!=null&&(this.responseBodyWarningVisible=!0);let c={ID:i._id,Created:i._source["@timestamp_received"],shopId:i._source.shopId,MarketTypeString:i._source.log.type,POSActionTypeString:i._source.message,Number:i._source.log.number,ResponseCode:i._source.log.responseCode,responseBodyWarning:i._source.log.responseBodyWarning,ResponseBodyWarningReference:i._source.log.ResponseBodyWarningReference};this.Result.push(c)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(m){this.filter.PageNumber=m.pageIndex+1,this.Get()}};n.\u0275fac=function(a){return new(a||n)(f(M),f(Z),f(A),f(oe))},n.\u0275cmp=E({type:n,selectors:[["app-order"]],decls:43,vars:15,consts:[["EMPTY_STATE",""],["headerTitle","Order Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["id","listresponseBodyWarning"],["value","number-override"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],["class","text-center",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"],[1,"text-white","p-2","rounded","response-desc",3,"ngClass"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,i){if(a&1){let c=R();e(0,"mainpanel",1),C("textChange",function(p){return u(c),S(i.Number,p)||(i.Number=p),h(p)}),P("onSubmit",function(p){return u(c),h(i.Get(p))}),e(1,"filters")(2,"div")(3,"label",2),l(4,"Channel"),t(),e(5,"ng-select",3),C("ngModelChange",function(p){return u(c),S(i.filter.ChannelID,p)||(i.filter.ChannelID=p),h(p)}),_(6,ht,3,3,"ng-template",4),t()(),e(7,"div",5)(8,"label",2),l(9,"Action"),t(),e(10,"ng-select",6),C("ngModelChange",function(p){return u(c),S(i.filter.ActionType,p)||(i.filter.ActionType=p),h(p)}),t()(),e(11,"div",5)(12,"label",7),l(13,"From/To"),t(),e(14,"div",8)(15,"datepicker",9),C("dateChange",function(p){return u(c),S(i.filter.From,p)||(i.filter.From=p),h(p)}),t()(),e(16,"div")(17,"datepicker",10),C("dateChange",function(p){return u(c),S(i.filter.To,p)||(i.filter.To=p),h(p)}),t()()(),e(18,"div",5)(19,"label",11),l(20,"Response Code"),t(),e(21,"input",12),C("ngModelChange",function(p){return u(c),S(i.filter.StatusCode,p)||(i.filter.StatusCode=p),h(p)}),t()(),e(22,"div",5)(23,"label",11),l(24,"Response Body Warning"),t(),e(25,"input",13),C("ngModelChange",function(p){return u(c),S(i.filter.responseBodyWarning,p)||(i.filter.responseBodyWarning=p),h(p)}),t(),e(26,"datalist",14),I(27,"option",15),t()(),e(28,"div",5)(29,"label",11),l(30,"Page Number"),t(),e(31,"input",16),C("ngModelChange",function(p){return u(c),S(i.filter.PageNumber,p)||(i.filter.PageNumber=p),h(p)}),t()(),e(32,"div",5)(33,"label",11),l(34,"Page Size"),t(),e(35,"input",17),C("ngModelChange",function(p){return u(c),S(i.filter.RowCount,p)||(i.filter.RowCount=p),h(p)}),t()()(),e(36,"content")(37,"div",18)(38,"div",19)(39,"div",20),_(40,Ct,21,6,"ng-container",21)(41,bt,2,0,"ng-template",null,0,G),t()()()()()}if(a&2){let c=z(42);y("text",i.Number),d(5),s("clearable",!0)("items",i.channelOptions),y("ngModel",i.filter.ChannelID),d(5),s("clearable",!0)("items",i.ActionTypeList),y("ngModel",i.filter.ActionType),d(5),y("date",i.filter.From),d(2),y("date",i.filter.To),d(4),y("ngModel",i.filter.StatusCode),d(4),y("ngModel",i.filter.responseBodyWarning),d(6),y("ngModel",i.filter.PageNumber),d(4),y("ngModel",i.filter.RowCount),d(5),s("ngIf",(i.Result==null?null:i.Result.length)>0)("ngIfElse",c)}},dependencies:[We,F,N,Fe,Ae,te,re,ie,ne,V,L,Y,de,ae,le,J,U,ze,D]});let r=n;return r})();var wt=()=>["/menu/log/inventory/detail"],xt=r=>({ID:r});function It(r,n){if(r&1&&(e(0,"span",18),I(1,"img",19),t(),l(2)),r&2){let o=n.item;d(),s("src",o.Img,W)("alt",o.Name),d(),x(" ",o.Name," ")}}function Et(r,n){if(r&1&&(e(0,"tr")(1,"td")(2,"a",25),l(3),b(4,"date"),t()(),e(5,"td"),l(6),t(),e(7,"td"),l(8),t(),e(9,"td"),l(10),t(),e(11,"td"),l(12),t()()),r&2){let o=n.$implicit;d(2),s("routerLink",ee(10,wt))("queryParams",q(11,xt,o.ID)),d(),x(" ",T(4,7,o.Created,"dd MMM yyyy HH:mm")," "),d(3),g(o.channelName),d(2),g(o.Sku),d(2),g(o.Stock),d(2),g(o.ResponseCode)}}function Tt(r,n){if(r&1){let o=R();j(0),e(1,"div",20)(2,"table",21)(3,"thead")(4,"tr",22)(5,"th"),l(6,"Created"),t(),e(7,"th"),l(8,"Channel"),t(),e(9,"th"),l(10,"SKU"),t(),e(11,"th"),l(12,"Stock"),t(),e(13,"th"),l(14,"Response code"),t()()(),e(15,"tbody"),_(16,Et,13,13,"tr",23),t()(),e(17,"mat-paginator",24),P("page",function(a){u(o);let i=w();return h(i.changePage(a))}),t()(),H()}if(r&2){let o=w();d(16),s("ngForOf",o.Result),d(),s("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function Dt(r,n){r&1&&(e(0,"div",26),I(1,"app-empty-state"),t())}var Xe=(()=>{let n=class n{constructor(m,a,i){this.http=m,this._RawLogService=a,this.authService=i,this.Result=Array(),this.filter={PageNumber:0,RowCount:20,Sku:null,ChannelID:"",StatusCode:"",From:"",To:""},this.Load(),this.channelOptions=this.authService.getChannels()}Load(){this.http.post("/api/OrdersLoader/Get",{}).subscribe(m=>{this.filter=m.Filter,this.ActionTypeList=m.Options.ActionTypeList,this.Get()})}Get(m){m!=null&&(this.filter.Sku=m),this.http.post("api/Inventory/GetLog",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let i of a.hits){let c={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.Result.push(c)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(m){this.filter.PageNumber=m.pageIndex+1,this.Get()}};n.\u0275fac=function(a){return new(a||n)(f(M),f(Z),f(oe))},n.\u0275cmp=E({type:n,selectors:[["app-inventory-log"]],decls:30,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Inventory Log","searchBoxPlaceHolder","Enter SKU...",3,"textChange","onSubmit","text"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,i){if(a&1){let c=R();e(0,"mainpanel",1),C("textChange",function(p){return u(c),S(i.filter.Sku,p)||(i.filter.Sku=p),h(p)}),P("onSubmit",function(p){return u(c),h(i.Get(p))}),e(1,"filters")(2,"div",2)(3,"div")(4,"label",3),l(5,"Channel"),t(),e(6,"ng-select",4),C("ngModelChange",function(p){return u(c),S(i.filter.ChannelID,p)||(i.filter.ChannelID=p),h(p)}),_(7,It,3,3,"ng-template",5),t()(),e(8,"div",6)(9,"label",7),l(10,"From/To"),t(),e(11,"div",8)(12,"datepicker",9),C("dateChange",function(p){return u(c),S(i.filter.From,p)||(i.filter.From=p),h(p)}),t()(),e(13,"div")(14,"datepicker",10),C("dateChange",function(p){return u(c),S(i.filter.To,p)||(i.filter.To=p),h(p)}),t()()(),e(15,"div",6)(16,"label",11),l(17,"Page Number"),t(),e(18,"input",12),C("ngModelChange",function(p){return u(c),S(i.filter.PageNumber,p)||(i.filter.PageNumber=p),h(p)}),t()(),e(19,"div",6)(20,"label",11),l(21,"Page Size"),t(),e(22,"input",13),C("ngModelChange",function(p){return u(c),S(i.filter.RowCount,p)||(i.filter.RowCount=p),h(p)}),t()()()(),e(23,"content")(24,"div",14)(25,"div",15)(26,"div",16),_(27,Tt,18,4,"ng-container",17)(28,Dt,2,0,"ng-template",null,0,G),t()()()()()}if(a&2){let c=z(29);y("text",i.filter.Sku),d(6),s("clearable",!0)("items",i.channelOptions),y("ngModel",i.filter.ChannelID),d(6),y("date",i.filter.From),d(2),y("date",i.filter.To),d(4),y("ngModel",i.filter.PageNumber),d(4),y("ngModel",i.filter.RowCount),d(5),s("ngIf",(i.Result==null?null:i.Result.length)>0)("ngIfElse",c)}},dependencies:[F,N,te,re,ie,ne,V,L,Y,de,ae,le,J,U,D]});let r=n;return r})();var Mt=()=>["/menu/log/order/detail"],Lt=r=>({ID:r});function Pt(r,n){if(r&1&&(e(0,"span",17),I(1,"img",18),t(),l(2)),r&2){let o=n.item;d(),s("src",o.Img,W)("alt",o.Name),d(),x(" ",o.Name," ")}}function Nt(r,n){if(r&1&&(e(0,"tr")(1,"td")(2,"a",25),l(3),b(4,"date"),t()(),e(5,"td"),l(6),t(),e(7,"td"),l(8),t(),e(9,"td"),l(10),t()()),r&2){let o=n.$implicit;d(2),s("routerLink",ee(9,Mt))("queryParams",q(10,Lt,o.id)),d(),x(" ",T(4,6,o.Created,"dd MMM yyyy HH:mm:ss")," "),d(3),g(o.type),d(2),g(o.number),d(2),g(o.message)}}function Rt(r,n){if(r&1){let o=R();j(0),e(1,"div",19)(2,"table",20)(3,"thead",21)(4,"tr")(5,"th",22),l(6,"Date"),t(),e(7,"th"),l(8,"Type"),t(),e(9,"th"),l(10,"Number"),t(),e(11,"th"),l(12,"Message"),t()()(),e(13,"tbody"),_(14,Nt,11,12,"tr",23),t()(),e(15,"mat-paginator",24),P("page",function(a){u(o);let i=w();return h(i.changePage(a))}),t()(),H()}if(r&2){let o=w();d(14),s("ngForOf",o.Result),d(),s("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function Ot(r,n){r&1&&(e(0,"div",26),I(1,"app-empty-state"),t())}var $e=(()=>{let n=class n{constructor(m,a,i){this.http=m,this._RawLogService=a,this.authService=i,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"}],this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(m={}){this.http.post("/api/OrdersLoader/Get",m).subscribe(a=>{this.filter=a.Filter,this.ActionTypeList=a.Options.ActionTypeList,this.Get()})}Get(m){this.filter.Number=m,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let i of a.hits){let c={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.Result.push(c)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(m){this.filter.PageNumber=m.pageIndex+1,this.Get()}};n.\u0275fac=function(a){return new(a||n)(f(M),f(Z),f(oe))},n.\u0275cmp=E({type:n,selectors:[["app-raw-log"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Channel Webhook Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,i){if(a&1){let c=R();e(0,"mainpanel",1),C("textChange",function(p){return u(c),S(i.filter.Number,p)||(i.filter.Number=p),h(p)}),P("onSubmit",function(p){return u(c),h(i.Get(p))}),e(1,"filters")(2,"div")(3,"label",2),l(4,"Channel"),t(),e(5,"ng-select",3),C("ngModelChange",function(p){return u(c),S(i.filter.ChannelID,p)||(i.filter.ChannelID=p),h(p)}),_(6,Pt,3,3,"ng-template",4),t()(),e(7,"div",5)(8,"label",6),l(9,"From/To"),t(),e(10,"div",7)(11,"datepicker",8),C("dateChange",function(p){return u(c),S(i.filter.From,p)||(i.filter.From=p),h(p)}),t()(),e(12,"div")(13,"datepicker",9),C("dateChange",function(p){return u(c),S(i.filter.To,p)||(i.filter.To=p),h(p)}),t()()(),e(14,"div",5)(15,"label",10),l(16,"Page Number"),t(),e(17,"input",11),C("ngModelChange",function(p){return u(c),S(i.filter.PageNumber,p)||(i.filter.PageNumber=p),h(p)}),t()(),e(18,"div",5)(19,"label",10),l(20,"Page Size"),t(),e(21,"input",12),C("ngModelChange",function(p){return u(c),S(i.filter.RowCount,p)||(i.filter.RowCount=p),h(p)}),t()()(),e(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),_(26,Rt,16,4,"ng-container",16)(27,Ot,2,0,"ng-template",null,0,G),t()()()()()}if(a&2){let c=z(28);y("text",i.filter.Number),d(5),s("clearable",!0)("items",i.channelOptions),y("ngModel",i.filter.ChannelID),d(6),y("date",i.filter.From),d(2),y("date",i.filter.To),d(4),y("ngModel",i.filter.PageNumber),d(4),y("ngModel",i.filter.RowCount),d(5),s("ngIf",(i.Result==null?null:i.Result.length)>0)("ngIfElse",c)}},dependencies:[F,N,te,re,ie,ne,V,L,Y,de,ae,le,J,U,D]});let r=n;return r})();var Te=class{constructor(n,o){this._document=o;let m=this._textarea=this._document.createElement("textarea"),a=m.style;a.position="fixed",a.top=a.opacity="0",a.left="-999em",m.setAttribute("aria-hidden","true"),m.value=n,m.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(m)}copy(){let n=this._textarea,o=!1;try{if(n){let m=this._document.activeElement;n.select(),n.setSelectionRange(0,n.value.length),o=this._document.execCommand("copy"),m&&m.focus()}}catch{}return o}destroy(){let n=this._textarea;n&&(n.remove(),this._textarea=void 0)}},Vt=(()=>{let n=class n{constructor(m){this._document=m}copy(m){let a=this.beginCopy(m),i=a.copy();return a.destroy(),i}beginCopy(m){return new Te(m,this._document)}};n.\u0275fac=function(a){return new(a||n)(fe(Ve))},n.\u0275prov=me({token:n,factory:n.\u0275fac,providedIn:"root"});let r=n;return r})(),Wt=new Me("CDK_COPY_TO_CLIPBOARD_CONFIG"),et=(()=>{let n=class n{constructor(m,a,i){this._clipboard=m,this._ngZone=a,this.text="",this.attempts=1,this.copied=new Pe,this._pending=new Set,i&&i.attempts!=null&&(this.attempts=i.attempts)}copy(m=this.attempts){if(m>1){let a=m,i=this._clipboard.beginCopy(this.text);this._pending.add(i);let c=()=>{let v=i.copy();!v&&--a&&!this._destroyed?this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(c,1)):(this._currentTimeout=null,this._pending.delete(i),i.destroy(),this.copied.emit(v))};c()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(m=>m.destroy()),this._pending.clear(),this._destroyed=!0}};n.\u0275fac=function(a){return new(a||n)(f(Vt),f(Ne),f(Wt,8))},n.\u0275dir=Le({type:n,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(a,i){a&1&&P("click",function(){return i.copy()})},inputs:{text:[0,"cdkCopyToClipboard","text"],attempts:[0,"cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"},standalone:!0});let r=n;return r})(),tt=(()=>{let n=class n{};n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=se({type:n}),n.\u0275inj=pe({});let r=n;return r})();function Bt(r,n){r&1&&I(0,"img",21)}function Ft(r,n){r&1&&I(0,"img",22)}function At(r,n){if(r&1&&(e(0,"div",4)(1,"div",5)(2,"div",6)(3,"h5"),l(4,"General"),t()(),e(5,"div",7)(6,"div",2)(7,"div",8)(8,"div",9)(9,"label"),l(10,"Date"),t(),e(11,"div")(12,"span"),l(13),b(14,"date"),t()()()(),e(15,"div",10)(16,"div",9)(17,"label"),l(18,"Market Place Type"),t(),_(19,Bt,1,0,"img",11)(20,Ft,1,0,"img",12),e(21,"a",13)(22,"span",14),l(23),t(),I(24,"br"),e(25,"small",15),l(26),t()()()(),e(27,"div",10)(28,"div",9)(29,"label"),l(30,"Number"),t(),e(31,"div")(32,"span"),l(33),t()()()(),e(34,"div",8)(35,"div",9)(36,"label"),l(37,"Process Type"),t(),e(38,"div")(39,"span"),l(40),t()()()(),e(41,"div",4)(42,"div",9)(43,"label"),l(44,"Authorization Header"),t(),e(45,"div")(46,"span"),l(47),t()()()(),e(48,"div",16)(49,"div",5)(50,"div",17)(51,"div",18)(52,"h3"),l(53,"Request"),t()(),e(54,"div",19)(55,"button",20),l(56,"Copy to clipboard"),t()()(),e(57,"div",7),l(58),t()()()()()()()),r&2){let o=w();d(13),g(T(14,11,o.data.Created,"dd MMM yyyy HH:mm:ss")),d(6),s("ngIf",o.data.TypeID==1),d(),s("ngIf",o.data.TypeID==0),d(),Oe("href",o.data.ShopLink,W),d(2),g(o.data.ShopName),d(3),g(o.data.ShopLink),d(7),g(o.data._source.log.number),d(7),g(o.data._source.log.processType),d(7),g(o.data._source.log.authorizationHeader),d(8),s("cdkCopyToClipboard",o.data._source.log.request),d(3),x(" ",o.data._source.log.request," ")}}var it=(()=>{let n=class n{constructor(m,a,i){this.route=m,this.http=a,this._RawLogService=i,this.route.queryParams.subscribe(c=>{let v=JSON.parse(localStorage.getItem("channel"));if(this.ID=c.ID,this.data=this._RawLogService.Fill(this.ID),this.data.Created=this.data._source["@timestamp_received"],v.length>0){let p=v.find(st=>st.ShopID==this.data._source.shopId);p?(this.data.TypeID=p.TypeID,this.data.ShopName=p.Name,this.data.ShopLink=p.URL):(this.data.TypeID=null,this.data.ShopName=null,this.data.ShopLink=null)}})}ngOnInit(){}};n.\u0275fac=function(a){return new(a||n)(f(A),f(M),f(Z))},n.\u0275cmp=E({type:n,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(a,i){a&1&&(e(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2),_(4,At,59,14,"div",3),t()()()()),a&2&&(s("headerTitle","Request Raw Log Detail")("hideSearchBox",!0)("hideSearchDropdown",!0),d(4),s("ngIf",i.data))},dependencies:[N,L,et,D]});let r=n;return r})();function jt(r,n){if(r&1&&(e(0,"div",10)(1,"div",7)(2,"div",8)(3,"h5"),l(4,"General"),t()(),e(5,"div",9)(6,"div",3)(7,"div",6)(8,"div",12)(9,"label"),l(10,"Date"),t(),e(11,"div")(12,"span"),l(13),b(14,"date"),t()()()(),e(15,"div",6)(16,"div",12)(17,"label"),l(18,"SKU"),t(),e(19,"div")(20,"span"),l(21),t()()()(),e(22,"div",6)(23,"div",12)(24,"label"),l(25,"Channel"),t(),e(26,"div")(27,"span"),l(28),t()()()(),e(29,"div",6)(30,"div",12)(31,"label"),l(32,"Response Code"),t(),e(33,"div")(34,"span"),l(35),t()()()()()()()()),r&2){let o=w();d(13),g(T(14,4,o.data.Created,"dd MMM yyyy")),d(8),g(o.data.Sku),d(7),g(o.data.ChannelName),d(7),g(o.data.ResponseCode)}}var nt=(()=>{let n=class n{constructor(m,a,i){this.route=m,this.http=a,this._RawLogService=i,this.data={Created:"",Sku:"",ChannelName:"",ResponseCode:""},this.route.queryParams.subscribe(c=>{this.ID=c.ID,this.Load()})}ngOnInit(){}Load(){var m={ID:this.ID};this.http.post("/api/Inventory/GetInventoryLogDeatil",m).subscribe(a=>{this.data.Created=a.hits[0]._source["@timestamp_received"],this.data.Sku=a.hits[0]._source.log.sku,this.data.ChannelName=a.hits[0]._source.log.channelName,this.data.ResponseCode=a.hits[0]._source.log.responseCode,this.request=JSON.parse(a.hits[0]._source.log.request),this.response=a.hits[0]._source.log.response})}};n.\u0275fac=function(a){return new(a||n)(f(A),f(M),f(Z))},n.\u0275cmp=E({type:n,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(a,i){a&1&&(e(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Back"),t()(),e(4,"content")(5,"div",2)(6,"div",3),_(7,jt,36,7,"div",4),t(),e(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h5"),l(13,"Request"),t()(),e(14,"div",9)(15,"div",10)(16,"div",11)(17,"pre"),l(18),b(19,"json"),t()()()()()(),e(20,"div",6)(21,"div",7)(22,"div",8)(23,"h5"),l(24,"Response"),t()(),e(25,"div",9)(26,"div",10)(27,"div",11)(28,"pre"),l(29),t()()()()()()()()()()),a&2&&(s("headerTitle","Inventory Detail")("pageData","Inventory Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),d(7),s("ngIf",i.data),d(11),g(B(19,7,i.request)),d(11),g(i.response))},dependencies:[N,V,L,ce,D]});let r=n;return r})();function Ht(r,n){if(r&1&&(e(0,"div",9)(1,"div",10)(2,"label"),l(3,"Process Code"),t(),e(4,"div")(5,"span"),l(6),t()()()()),r&2){let o=w();d(6),g(o.ProcessedCode)}}function qt(r,n){if(r&1){let o=R();e(0,"a",16),P("click",function(){u(o);let a=w();return h(a.Retry())}),l(1,"Retry"),t()}}var rt=(()=>{let n=class n{constructor(m,a){this.route=m,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(i=>{this.ID=i.ID,this.Load()})}ngOnInit(){}Retry(){var m={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",m).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var m={ID:this.ID};this.http.post("/api/Orders/GetDetail",m).subscribe(a=>{for(let i of a.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})}};n.\u0275fac=function(a){return new(a||n)(f(A),f(M))},n.\u0275cmp=E({type:n,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(a,i){a&1&&(e(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Back"),t()(),e(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),l(11,"General"),t()(),e(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),l(17,"Date"),t(),e(18,"div")(19,"span"),l(20),b(21,"date"),t()()()(),e(22,"div",9)(23,"div",10)(24,"label"),l(25,"Number"),t(),e(26,"div")(27,"span"),l(28),t()()()(),e(29,"div",9)(30,"div",10)(31,"label"),l(32,"Type"),t(),e(33,"div")(34,"span"),l(35),t()()()(),e(36,"div",9)(37,"div",10)(38,"label"),l(39,"Response Code"),t(),e(40,"div")(41,"span"),l(42),t()()()(),e(43,"div",9)(44,"div",10)(45,"label"),l(46,"ShopID"),t(),e(47,"div")(48,"span"),l(49),t()()()(),_(50,Ht,7,1,"div",11),e(51,"div",9)(52,"div",10)(53,"label"),l(54,"Action"),t(),e(55,"div")(56,"span"),l(57),t()()()()()()()()(),e(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),l(63,"Request"),t()(),e(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),l(68),b(69,"json"),t()()(),e(70,"actions",14),_(71,qt,2,0,"a",15),t()()()(),e(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),l(76,"Response"),t()(),e(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),l(81),b(82,"json"),t()()()()()()()()()()),a&2&&(s("headerTitle","Order #"+i.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),d(20),g(T(21,14,i.Created,"dd MMM yyyy HH:mm:ss")),d(8),g(i.Number),d(7),g(i.MarketTypeString),d(7),g(i.ResponseCode),d(7),g(i.shopId),d(),s("ngIf",i.ProcessedCode!=null),d(7),g(i.POSActionTypeString),d(11),g(B(69,17,i.request)),d(3),s("ngIf",i.ResponseCode!="200"&&i.ResponseCode!="201"),d(10),g(B(82,19,i.response)))},dependencies:[N,V,L,ce,D]});let r=n;return r})();var zt=()=>["/menu/log/exception/detail"],Gt=r=>({ID:r});function Ut(r,n){if(r&1&&(e(0,"tr")(1,"td",12),I(2,"img",13),t(),e(3,"td"),l(4),b(5,"date"),t(),e(6,"td")(7,"a",14),l(8),t()(),e(9,"td")(10,"div",15),l(11),t(),e(12,"div"),l(13),t()()()),r&2){let o=n.$implicit;d(2),s("src",o.logo,W),d(2),g(T(5,7,o.date,"dd-MM-yyyy hh:mm:ss")),d(3),s("routerLink",ee(10,zt))("queryParams",q(11,Gt,o.id)),d(),x(" ",o.number," "),d(3),g(o.message),d(2),g(o.stackTrace)}}function Yt(r,n){if(r&1){let o=R();j(0),e(1,"mat-paginator",16),P("page",function(a){u(o);let i=w(2);return h(i.onPaginationChange(a))}),t(),H()}if(r&2){let o=w(2);d(),s("length",o.pageTotal)("pageSize",o.pageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function Jt(r,n){if(r&1&&(j(0),e(1,"div",6)(2,"table",7)(3,"thead")(4,"tr",8)(5,"th"),l(6,"Channel"),t(),e(7,"th",9),l(8,"Date"),t(),e(9,"th"),l(10,"Number"),t(),e(11,"th"),l(12,"Exception"),t()()(),e(13,"tbody"),_(14,Ut,14,13,"tr",10),t()(),_(15,Yt,2,3,"ng-container",11),t(),H()),r&2){let o=w();d(14),s("ngForOf",o.exceptions),d(),s("ngIf",(o.exceptions==null?null:o.exceptions.length)>0)}}function Kt(r,n){r&1&&(e(0,"div",17),I(1,"app-empty-state"),t())}var ot=(()=>{let n=class n{constructor(m){this.http=m,this.exceptions=[],this.filter={RowCount:50,PageNumber:1},this.getData()}getData(){this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(m=>{this.exceptions=m.hits.map(a=>({id:a._id,logo:Se.getChannelLogoByName(a._source.error?.Type),number:a._source.error.number,date:a._source["@timestamp_received"],stackTrace:a._source.error.stackTrace,message:a._source.message,requestJSON:a._source?.error?.requestJSON})),this.pageTotal=m.total.value,this.pageSize=this.filter.RowCount>this.pageTotal?this.pageTotal:this.filter.RowCount})}onPaginationChange(m){this.filter.PageNumber=m.pageIndex+1,this.getData()}};n.\u0275fac=function(a){return new(a||n)(f(M))},n.\u0275cmp=E({type:n,selectors:[["app-exception-log"]],decls:8,vars:2,consts:[["EMPTY_STATE",""],["headerTitle","Exception Log","searchBoxPlaceHolder","Enter Number...","hideSearchBox","true","hideSearchDropdown","true"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[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,"page","length","pageSize","pageIndex"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,i){if(a&1&&(e(0,"mainpanel",1)(1,"content")(2,"div",2)(3,"div",3)(4,"div",4),_(5,Jt,16,2,"ng-container",5)(6,Kt,2,0,"ng-template",null,0,G),t()()()()()),a&2){let c=z(7);d(5),s("ngIf",i.exceptions.length>0)("ngIfElse",c)}},dependencies:[F,N,V,L,Y,U,D]});let r=n;return r})();var Zt=r=>({ID:r});function Qt(r,n){if(r&1&&(e(0,"span",17),I(1,"img",18),t(),l(2)),r&2){let o=n.item;d(),s("src",o.Img,W)("alt",o.Name),d(),x(" ",o.Name," ")}}function Xt(r,n){if(r&1&&(e(0,"tr")(1,"td"),l(2),t(),e(3,"td"),I(4,"img",28),t(),e(5,"td"),l(6),t(),e(7,"td",29)(8,"a",30),l(9),b(10,"number"),t()(),e(11,"td"),l(12),t(),e(13,"td"),l(14),b(15,"date"),t()()),r&2){let o=n.$implicit;d(2),g(o._source.ChannelName),d(2),s("src",o.logo,W),d(2),g(o._source.DateRange),d(2),s("queryParams",q(12,Zt,o._source.ID)),d(),x(" ",B(10,7,o._source.CountOrder)," "),d(3),g(o._source.UserLogin),d(2),x(" ",T(15,9,o._source["@timestamp_received"],"dd MMM yyyy hh:mm")," ")}}function $t(r,n){if(r&1){let o=R();j(0),e(1,"div",19)(2,"table",20)(3,"thead")(4,"tr",21)(5,"th",22),l(6,"Channel"),t(),e(7,"th",23),l(8,"Type"),t(),e(9,"th",24),l(10,"Download Date Range"),t(),e(11,"th",25),l(12,"Count"),t(),e(13,"th"),l(14,"User Login"),t(),e(15,"th"),l(16,"Created"),t()()(),e(17,"tbody"),_(18,Xt,16,14,"tr",26),t()(),e(19,"mat-paginator",27),P("page",function(a){u(o);let i=w();return h(i.onPaginationChange(a))}),t()(),H()}if(r&2){let o=w();d(18),s("ngForOf",o.downloadOrders),d(),s("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function ei(r,n){r&1&&(e(0,"div",31),I(1,"app-empty-state"),t())}var at=(()=>{let n=class n{constructor(m,a){this.http=m,this.authService=a,this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(m=>{this.filter=m.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(m=>{this.downloadOrders=m.hits,this.setChannelLogo(),this.paginationTotal=m.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(m=>(m.logo=Se.getChannelLogoByTypeId(m._source.TypeID),m))}onPaginationChange(m){this.filter.PageNumber=m.pageIndex+1,this.getDownloadOrders()}};n.\u0275fac=function(a){return new(a||n)(f(M),f(oe))},n.\u0275cmp=E({type:n,selectors:[["app-manual-order-log"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[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,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/log/order-log/order-log-detail",3,"queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,i){if(a&1){let c=R();e(0,"mainpanel",1),P("onSubmit",function(){return u(c),h(i.getDownloadOrders())}),e(1,"filters")(2,"div")(3,"label",2),l(4,"Channel"),t(),e(5,"ng-select",3),C("ngModelChange",function(p){return u(c),S(i.filter.ChannelID,p)||(i.filter.ChannelID=p),h(p)}),_(6,Qt,3,3,"ng-template",4),t()(),e(7,"div",5)(8,"label",6),l(9,"From/To"),t(),e(10,"div",7)(11,"datepicker",8),C("dateChange",function(p){return u(c),S(i.filter.From,p)||(i.filter.From=p),h(p)}),t()(),e(12,"div")(13,"datepicker",9),C("dateChange",function(p){return u(c),S(i.filter.To,p)||(i.filter.To=p),h(p)}),t()()(),e(14,"div",5)(15,"label",10),l(16,"Page Number"),t(),e(17,"input",11),C("ngModelChange",function(p){return u(c),S(i.filter.PageNumber,p)||(i.filter.PageNumber=p),h(p)}),t()(),e(18,"div",5)(19,"label",10),l(20,"Page Size"),t(),e(21,"input",12),C("ngModelChange",function(p){return u(c),S(i.filter.RowCount,p)||(i.filter.RowCount=p),h(p)}),t()()(),e(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),_(26,$t,20,4,"ng-container",16)(27,ei,2,0,"ng-template",null,0,G),t()()()()()}if(a&2){let c=z(28);s("hideSearchBox",!0),d(5),s("clearable",!0)("items",i.channelOptions),y("ngModel",i.filter.ChannelID),d(6),y("date",i.filter.From),d(2),y("date",i.filter.To),d(4),y("ngModel",i.filter.PageNumber),d(4),y("ngModel",i.filter.RowCount),d(5),s("ngIf",(i.downloadOrders==null?null:i.downloadOrders.length)>0)("ngIfElse",c)}},dependencies:[F,N,te,re,ie,ne,V,L,Y,de,ae,le,J,U,ke,D]});let r=n;return r})();var lt=(()=>{let n=class n{constructor(m){this.httpService=m}getExceptionDetail(m){return this.httpService.post("/api/Orders/GetDetailException",{ID:m}).pipe(ue(i=>i?.hits[0]?._source))}};n.\u0275fac=function(a){return new(a||n)(fe(M))},n.\u0275prov=me({token:n,factory:n.\u0275fac,providedIn:"root"});let r=n;return r})();function ii(r,n){if(r&1&&(e(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"h5"),l(6,"General"),t()(),e(7,"div",7)(8,"div",8)(9,"div",9)(10,"div",10)(11,"label"),l(12,"Date"),t(),e(13,"div")(14,"span"),l(15),b(16,"date"),t()()()(),e(17,"div",9)(18,"div",10)(19,"label"),l(20,"Number"),t(),e(21,"div")(22,"span"),l(23),t()()()(),e(24,"div",9)(25,"div",10)(26,"label"),l(27,"Type"),t(),e(28,"div")(29,"span"),l(30),t()()()(),e(31,"div",9)(32,"div",10)(33,"label"),l(34,"ShopID"),t(),e(35,"div")(36,"span"),l(37),t()()()()()()()()(),e(38,"div",11)(39,"div",9)(40,"div",5)(41,"div",6)(42,"h5"),l(43,"Request"),t()(),e(44,"div",7)(45,"div",12)(46,"div",13)(47,"pre"),l(48),b(49,"json"),t()()()()()(),e(50,"div",9)(51,"div",5)(52,"div",6)(53,"h5"),l(54,"Exception"),t()(),e(55,"div",7)(56,"div",14)(57,"div",13)(58,"div",15),l(59),t(),e(60,"pre"),l(61),t()()()()()()()()),r&2){let o=n.ngIf;d(15),g(T(16,7,o["@timestamp"],"dd MMM yyyy HH:mm:ss")),d(8),g(o==null||o.error==null?null:o.error.number),d(7),g(o==null||o.error==null?null:o.error.Type),d(7),g(o==null?null:o.shopId),d(11),g(B(49,10,o==null||o.error==null?null:o.error.requestJSON)),d(11),g(o==null?null:o.message),d(2),g(o==null||o.error==null?null:o.error.stackTrace)}}var dt=(()=>{let n=class n{constructor(m,a){this.activatedRoute=m,this.exceptionService=a,this.invoiceNumber=""}ngOnInit(){let m=this.activatedRoute.snapshot.queryParams;this.getExceptionDetail(m?.ID)}getExceptionDetail(m){this.exceptionDetail$=this.exceptionService.getExceptionDetail(m).pipe(he(a=>{this.invoiceNumber=a?.error?.number}),De(1))}};n.\u0275fac=function(a){return new(a||n)(f(A),f(lt))},n.\u0275cmp=E({type:n,selectors:[["app-exception-detail"]],decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["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(a,i){a&1&&(e(0,"mainpanel",0)(1,"content"),_(2,ii,62,12,"div",1),b(3,"async"),t()()),a&2&&(s("headerTitle","Order #"+i.invoiceNumber)("hideSearchBox",!0)("hideSearchDropdown",!0),d(2),s("ngIf",B(3,4,i.exceptionDetail$)))},dependencies:[N,L,ve,ce,D]});let r=n;return r})();function ni(r,n){if(r&1&&(e(0,"tr")(1,"td"),l(2),t(),e(3,"td"),l(4),t(),e(5,"td"),l(6),b(7,"date"),t(),e(8,"td"),l(9),b(10,"date"),t(),e(11,"td"),l(12),t()()),r&2){let o=n.$implicit;d(2),x(" ",o.Number," "),d(2),x(" ",o.Status," "),d(2),x(" ",T(7,5,o.Start,"HH:mm:ss:SSS")," "),d(3),x(" ",T(10,8,o.End,"HH:mm:ss:SSS")," "),d(3),x(" ",o.Exception," ")}}var mt=(()=>{let n=class n{constructor(m,a){this.route=m,this.httpService=a}ngOnInit(){this.initOrderDetails()}initOrderDetails(){let m=this.route.snapshot.queryParams;this.orderDetails$=this.httpService.post("/api/Orders/DownloadOrderLogsDetail",{ID:m.ID}).pipe(he(a=>{let i=a?.hits[0]?._source;this.headerTitle=`${i?.ChannelName} (${i?.DateRange})`}),ue(a=>a?.hits[0]._source?.Detail))}};n.\u0275fac=function(a){return new(a||n)(f(A),f(M))},n.\u0275cmp=E({type:n,selectors:[["app-download-order-detail"]],decls:22,vars:7,consts:[[3,"headerTitle","description","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","200px"],[2,"width","150px"],[2,"width","100px"],[4,"ngFor","ngForOf"]],template:function(a,i){a&1&&(e(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"table",5)(7,"thead")(8,"tr",6)(9,"th",7),l(10,"Number"),t(),e(11,"th",8),l(12,"Status"),t(),e(13,"th",9),l(14,"Start Time"),t(),e(15,"th",9),l(16,"End Time"),t(),e(17,"th"),l(18,"Exception"),t()()(),e(19,"tbody"),_(20,ni,13,11,"tr",10),b(21,"async"),t()()()()()()()()),a&2&&(s("headerTitle",i.headerTitle)("description",i.headerTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),d(20),s("ngForOf",B(21,5,i.orderDetails$)))},dependencies:[F,L,ve,D]});let r=n;return r})();var ri=[{path:"",component:Ze,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",component:Qe,canActivate:[k],data:{title:"Order Log"}},{path:"inventory",component:Xe,canActivate:[k],data:{title:"Inventory Log"}},{path:"rawlog",component:$e,canActivate:[k],data:{title:"Raw Log"}},{path:"rawlog/detail",component:it,canActivate:[k],data:{title:"Raw Log Detail"}},{path:"inventory/detail",component:nt,canActivate:[k],data:{title:"Inventory Details"}},{path:"order/detail",component:rt,canActivate:[k],data:{title:"Order Details"}},{path:"exception",component:ot,canActivate:[k],data:{title:"Exception Log"}},{path:"exception/detail",component:dt,canActivate:[k],data:{title:"Exception Log Detail"}},{path:"order-log",component:at,canActivate:[k],data:{title:"order Log"}},{path:"order-log/order-log-detail",component:mt,canActivate:[k],data:{title:"Order Log Detail"}},{path:"inventory-async",loadComponent:()=>import("./chunk-L536HOP7.js").then(r=>r.InventoryAsyncLogComponent),canActivate:[k],data:{title:"Sync Inventory Async"}},{path:"inventory-async/detail",loadComponent:()=>import("./chunk-GP3CFNYA.js").then(r=>r.InventoryAsyncDetailComponent),canActivate:[k],data:{title:"Sync Inventory Async Detail"}}]}],pt=(()=>{let n=class n{};n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=se({type:n}),n.\u0275inj=pe({imports:[_e,ye.forChild(ri)]});let r=n;return r})();var Mn=(()=>{let n=class n{};n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=se({type:n}),n.\u0275inj=pe({imports:[_e,je,He,pt,ye,Ue,tt,Ke,qe,Je,J,Ge]});let r=n;return r})();export{Mn as LogsModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as _e}from"./chunk-2Y4N4NSS.js";import{a as ue}from"./chunk-662E5VTA.js";import{b as fe,g as be}from"./chunk-IOH6ZWW2.js";import{b as te,e as y}from"./chunk-IPX66YIX.js";import"./chunk-HBHGO2RV.js";import{c as ne,h as ie,i as oe,j as re,k as ae,l as se,o as de,p as ce,q as le,r as pe,u as me}from"./chunk-F5YRASNU.js";import{a as M,c as ge,d as he,f as xe}from"./chunk-2UXFUEON.js";import{$ as R,Bb as W,Cb as q,Db as H,Eb as P,Fb as a,Gb as C,Ha as w,Hb as B,Ia as c,Ib as Y,Ja as p,Jb as I,Kb as L,Lb as T,Q as F,Qb as G,Wb as Q,Xb as K,Ya as f,Zb as $,_a as m,aa as A,bd as S,cb as U,dd as v,ga as x,gd as j,ha as N,kb as i,lb as r,mb as l,nb as k,oa as b,ob as E,pa as _,pc as J,qb as z,rc as D,sc as X,tb as u,vb as g,vc as Z,zc as ee}from"./chunk-77JORVC2.js";import"./chunk-CRRJCY55.js";var ve=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code})}addChannelLazada(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(S),p(y),p(v))},t.\u0275cmp=x({type:t,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,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addChannelLazada()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code))}});let o=t;return o})();var we=(()=>{let t=class t{constructor(){}getBrowserName(){let n=window.navigator.userAgent.toLowerCase();switch(!0){case(n.indexOf("edge")>-1||n.indexOf("edg")>-1):return"edge";case n.indexOf("opr")>-1:return"opera";case n.indexOf("chrome")>-1:return"chrome";case n.indexOf("trident")>-1:return"ie";case n.indexOf("firefox")>-1:return"firefox";case n.indexOf("safari")>-1:return"safari";default:return"other"}}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function Le(o,t){if(o&1&&(i(0,"swiper-slide")(1,"div")(2,"a",2),l(3,"img",3),r()(),i(4,"a",4),a(5),r(),i(6,"p",5),a(7),r()()),o&2){let d=t.$implicit;c(2),m("href",d.href,w),c(),m("src",d.imgSrc,w),c(),m("href",d.href,w),c(),C(d.title),c(2),C(d.description)}}var Me=(()=>{let t=class t{constructor(){this.newsList=[]}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=x({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:"newsList"},decls:2,vars:1,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(e,s){e&1&&(i(0,"swiper-container",0),f(1,Le,8,5,"swiper-slide",1),r()),e&2&&(c(),m("ngForOf",s.newsList))},dependencies:[D],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let o=t;return o})();var Ae=["subdomainEl"],Ne=(o,t)=>({"rounded-end":o,"border-end-0":t});function ze(o,t){if(o&1&&(k(0),i(1,"div",36),l(2,"img",37),r(),E()),o&2){let d=t.$implicit;c(2),m("src",d.img,w)("title",d.title)("alt",d.title)}}function De(o,t){if(o&1){let d=z();k(0),i(1,"div",17)(2,"h3",18),a(3," DealPOS Omnichannel "),r(),i(4,"small",19),a(5," Multichannel Inventory Management Software "),r()(),i(6,"form",20)(7,"div",21)(8,"div",22)(9,"div",23)(10,"span"),l(11,"i",24),r()(),i(12,"input",25,1),T("ngModelChange",function(e){b(d);let s=g();return L(s.subdomain,e)||(s.subdomain=e),_(e)}),r(),i(14,"div")(15,"select",26),T("ngModelChange",function(e){b(d);let s=g();return L(s.domain,e)||(s.domain=e),_(e)}),i(16,"option",27),a(17,".dealpos.co.id"),r(),i(18,"option",28),a(19,".dealpos.net"),r(),i(20,"option",29),a(21,".dealpos.com"),r(),i(22,"option",30),a(23,".dealpos.app"),r()()()(),i(24,"div",31)(25,"button",32),u("click",function(){b(d);let e=g();return _(e.onNextState())}),a(26," Next "),r()(),i(27,"div",33)(28,"div",34),f(29,ze,3,3,"ng-container",35),r()()()(),E()}if(o&2){let d=g();c(12),I("ngModel",d.subdomain),c(3),I("ngModel",d.domain),c(14),m("ngForOf",d.channels)}}function je(o,t){o&1&&(i(0,"p"),a(1," Username is required "),r())}function Ve(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,je,2,0,"p",47),r()(),E()),o&2){g();let d=P(14);c(4),m("ngIf",d.errors.required)}}function Fe(o,t){if(o&1){let d=z();i(0,"i",62),u("click",function(){b(d);let e=g(3);return _(e.hideShowPassword())}),r()}if(o&2){let d=g(3);U("fa "+d.passwordIcon)}}function Re(o,t){if(o&1&&(i(0,"span",60),f(1,Fe,1,2,"i",61),r()),o&2){let d=g(2);c(),m("ngIf",d.password)}}function Ue(o,t){o&1&&(i(0,"p"),a(1," Password is required "),r())}function We(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,Ue,2,0,"p",47),r()(),E()),o&2){g();let d=P(21);c(4),m("ngIf",d.errors.required)}}function qe(o,t){if(o&1){let d=z();i(0,"div",38)(1,"h3",39),a(2,"Sign in"),r(),i(3,"h3",40),a(4," to "),i(5,"h6",41),a(6),r(),i(7,"i",42),u("click",function(){b(d);let e=g();return _(e.onEditDomain())}),r()()(),i(8,"form",43)(9,"div",44)(10,"div",23)(11,"span"),l(12,"i",45),r()(),i(13,"input",46,2),T("ngModelChange",function(e){b(d);let s=g();return L(s.username,e)||(s.username=e),_(e)}),r()(),f(15,Ve,5,1,"ng-container",47),i(16,"div",22)(17,"div",23)(18,"span"),l(19,"i",48),r()(),i(20,"input",49,3),T("ngModelChange",function(e){b(d);let s=g();return L(s.password,e)||(s.password=e),_(e)}),r(),f(22,Re,2,1,"span",50),r(),f(23,We,5,1,"ng-container",47),i(24,"div",51)(25,"button",52),u("click",function(){b(d);let e=g();return _(e.onLogin())}),a(26," Log in "),r()(),i(27,"div",53),l(28,"hr"),i(29,"span",54),a(30,"or"),r(),l(31,"hr"),r(),i(32,"div")(33,"button",55),u("click",function(e){b(d);let s=g();return _(s.onLoginByGoogle(e))}),l(34,"i",56),a(35," Sign In with Google "),r()()()}if(o&2){let d=P(14),n=P(21),e=g();c(6),Y(" (",e.subdomain,"",e.domain,") "),c(7),I("ngModel",e.username),c(2),m("ngIf",d.invalid&&(d.dirty||d.touched)),c(5),m("type",e.passwordType)("ngClass",G(9,Ne,e.browser=="edge",e.browser!="edge")),I("ngModel",e.password),c(2),m("ngIf",e.browser!="edge"),c(),m("ngIf",n.invalid&&(n.dirty||n.touched))}}var Oe=(()=>{let t=class t{constructor(n,e,s,h,ke){this._router=n,this.toastr=e,this.checkBrowser=s,this.authService=h,this.ngxPermission=ke,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:M.SHOOPE},{title:"Tokopedia",img:M.TOKOPEDIA},{title:"Tiktok",img:M.TIKTOK},{title:"Woocommerce",img:M.WOOCOMMERCE},{title:"Lazada",img:M.LAZADA},{title:"Shopify",img:M.SHOPIFY}],this.version=fe.version,this.news$=h.getNews().pipe(F(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let n=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=n}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let n=JSON.parse(localStorage.getItem("Authorization"));if(n){this.username=n?.username,this.subdomain=n?.Host?.split(".")[0];let e=n?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ge.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let n=this.subdomain.indexOf(".dealpos");n!=-1&&(this.subdomain=this.subdomain.substring(0,n))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let n={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(n).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(n){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(n,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(n){this.ngxPermission.hasPermission([ue.dashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):n?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}};t.\u0275fac=function(e){return new(e||t)(p(v),p(te),p(we),p(be),p(he))},t.\u0275cmp=x({type:t,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&W(Ae,5),e&2){let h;q(h=H())&&(s.subdomainEl=h.first)}},decls:19,vars:7,consts:[["USERNAME_PASSWORD",""],["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[4,"ngIf","ngIfElse"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[4,"ngFor","ngForOf"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","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-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[2,"width","52px"],[1,"text-danger","ps-1"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(e,s){if(e&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),a(4,"New Features"),r(),l(5,"POS-news-swiper",8),Q(6,"async"),r(),i(7,"div",9),f(8,De,30,3,"ng-container",10)(9,qe,36,12,"ng-template",null,0,$),r()(),i(11,"div",11)(12,"span",12),a(13,"powered by :"),r(),l(14,"a",13),r(),i(15,"div",14)(16,"a",15),a(17),l(18,"i",16),r()()()),e&2){let h=P(10);c(5),m("newsList",K(6,5,s.news$)),c(3),m("ngIf",s.loginState=="FORM_DOMAIN")("ngIfElse",h),c(8),m("href",s.changelogUrl,w),c(),B("version ",s.version,"")}},dependencies:[J,D,X,se,ce,le,ne,de,ie,oe,pe,ae,re,Me,Z],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}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%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.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}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]});let o=t;return o})();var Pe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.shopID=n.shop_id,this.code=n.code})}addShopee(){let n={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",n).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(S),p(y),p(v))},t.\u0275cmp=x({type:t,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,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),i(13,"div"),a(14," Your shopID is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addShopee()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}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%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.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}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.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}"]});let o=t;return o})();var ye=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code,this.state=n.state})}addChannelTiktok(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(S),p(y),p(v))},t.\u0275cmp=x({type:t,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,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"div"),a(18," Your State is "),i(19,"span",8),a(20),r()(),i(21,"button",9),u("click",function(){return s.addChannelTiktok()}),l(22,"i",10),a(23," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code),c(4),C(s.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}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%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.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}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.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}"]});let o=t;return o})();var He=[{path:"",component:Oe,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Pe,data:{title:"Success"}},{path:"tiktok",component:ye,data:{title:"Success"}},{path:"lazada",component:ve,data:{title:"Success"}}],Se=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[j.forChild(He),j]});let o=t;return o})();var yt=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[ee,me,Se,_e,xe]});let o=t;return o})();export{yt as LoginModule};
|
|
1
|
+
import{e as _e}from"./chunk-2Y4N4NSS.js";import{a as ue}from"./chunk-662E5VTA.js";import{b as fe,g as be}from"./chunk-FON6ZRGN.js";import{b as te,e as y}from"./chunk-IPX66YIX.js";import"./chunk-HBHGO2RV.js";import{c as ne,h as ie,i as oe,j as re,k as ae,l as se,o as de,p as ce,q as le,r as pe,u as me}from"./chunk-F5YRASNU.js";import{a as M,c as ge,d as he,f as xe}from"./chunk-2UXFUEON.js";import{$ as R,Bb as W,Cb as q,Db as H,Eb as P,Fb as a,Gb as C,Ha as w,Hb as B,Ia as c,Ib as Y,Ja as p,Jb as I,Kb as L,Lb as T,Q as F,Qb as G,Wb as Q,Xb as K,Ya as f,Zb as $,_a as m,aa as A,bd as S,cb as U,dd as v,ga as x,gd as j,ha as N,kb as i,lb as r,mb as l,nb as k,oa as b,ob as E,pa as _,pc as J,qb as z,rc as D,sc as X,tb as u,vb as g,vc as Z,zc as ee}from"./chunk-77JORVC2.js";import"./chunk-CRRJCY55.js";var ve=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code})}addChannelLazada(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(S),p(y),p(v))},t.\u0275cmp=x({type:t,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,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addChannelLazada()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code))}});let o=t;return o})();var we=(()=>{let t=class t{constructor(){}getBrowserName(){let n=window.navigator.userAgent.toLowerCase();switch(!0){case(n.indexOf("edge")>-1||n.indexOf("edg")>-1):return"edge";case n.indexOf("opr")>-1:return"opera";case n.indexOf("chrome")>-1:return"chrome";case n.indexOf("trident")>-1:return"ie";case n.indexOf("firefox")>-1:return"firefox";case n.indexOf("safari")>-1:return"safari";default:return"other"}}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function Le(o,t){if(o&1&&(i(0,"swiper-slide")(1,"div")(2,"a",2),l(3,"img",3),r()(),i(4,"a",4),a(5),r(),i(6,"p",5),a(7),r()()),o&2){let d=t.$implicit;c(2),m("href",d.href,w),c(),m("src",d.imgSrc,w),c(),m("href",d.href,w),c(),C(d.title),c(2),C(d.description)}}var Me=(()=>{let t=class t{constructor(){this.newsList=[]}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=x({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:"newsList"},decls:2,vars:1,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(e,s){e&1&&(i(0,"swiper-container",0),f(1,Le,8,5,"swiper-slide",1),r()),e&2&&(c(),m("ngForOf",s.newsList))},dependencies:[D],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let o=t;return o})();var Ae=["subdomainEl"],Ne=(o,t)=>({"rounded-end":o,"border-end-0":t});function ze(o,t){if(o&1&&(k(0),i(1,"div",36),l(2,"img",37),r(),E()),o&2){let d=t.$implicit;c(2),m("src",d.img,w)("title",d.title)("alt",d.title)}}function De(o,t){if(o&1){let d=z();k(0),i(1,"div",17)(2,"h3",18),a(3," DealPOS Omnichannel "),r(),i(4,"small",19),a(5," Multichannel Inventory Management Software "),r()(),i(6,"form",20)(7,"div",21)(8,"div",22)(9,"div",23)(10,"span"),l(11,"i",24),r()(),i(12,"input",25,1),T("ngModelChange",function(e){b(d);let s=g();return L(s.subdomain,e)||(s.subdomain=e),_(e)}),r(),i(14,"div")(15,"select",26),T("ngModelChange",function(e){b(d);let s=g();return L(s.domain,e)||(s.domain=e),_(e)}),i(16,"option",27),a(17,".dealpos.co.id"),r(),i(18,"option",28),a(19,".dealpos.net"),r(),i(20,"option",29),a(21,".dealpos.com"),r(),i(22,"option",30),a(23,".dealpos.app"),r()()()(),i(24,"div",31)(25,"button",32),u("click",function(){b(d);let e=g();return _(e.onNextState())}),a(26," Next "),r()(),i(27,"div",33)(28,"div",34),f(29,ze,3,3,"ng-container",35),r()()()(),E()}if(o&2){let d=g();c(12),I("ngModel",d.subdomain),c(3),I("ngModel",d.domain),c(14),m("ngForOf",d.channels)}}function je(o,t){o&1&&(i(0,"p"),a(1," Username is required "),r())}function Ve(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,je,2,0,"p",47),r()(),E()),o&2){g();let d=P(14);c(4),m("ngIf",d.errors.required)}}function Fe(o,t){if(o&1){let d=z();i(0,"i",62),u("click",function(){b(d);let e=g(3);return _(e.hideShowPassword())}),r()}if(o&2){let d=g(3);U("fa "+d.passwordIcon)}}function Re(o,t){if(o&1&&(i(0,"span",60),f(1,Fe,1,2,"i",61),r()),o&2){let d=g(2);c(),m("ngIf",d.password)}}function Ue(o,t){o&1&&(i(0,"p"),a(1," Password is required "),r())}function We(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,Ue,2,0,"p",47),r()(),E()),o&2){g();let d=P(21);c(4),m("ngIf",d.errors.required)}}function qe(o,t){if(o&1){let d=z();i(0,"div",38)(1,"h3",39),a(2,"Sign in"),r(),i(3,"h3",40),a(4," to "),i(5,"h6",41),a(6),r(),i(7,"i",42),u("click",function(){b(d);let e=g();return _(e.onEditDomain())}),r()()(),i(8,"form",43)(9,"div",44)(10,"div",23)(11,"span"),l(12,"i",45),r()(),i(13,"input",46,2),T("ngModelChange",function(e){b(d);let s=g();return L(s.username,e)||(s.username=e),_(e)}),r()(),f(15,Ve,5,1,"ng-container",47),i(16,"div",22)(17,"div",23)(18,"span"),l(19,"i",48),r()(),i(20,"input",49,3),T("ngModelChange",function(e){b(d);let s=g();return L(s.password,e)||(s.password=e),_(e)}),r(),f(22,Re,2,1,"span",50),r(),f(23,We,5,1,"ng-container",47),i(24,"div",51)(25,"button",52),u("click",function(){b(d);let e=g();return _(e.onLogin())}),a(26," Log in "),r()(),i(27,"div",53),l(28,"hr"),i(29,"span",54),a(30,"or"),r(),l(31,"hr"),r(),i(32,"div")(33,"button",55),u("click",function(e){b(d);let s=g();return _(s.onLoginByGoogle(e))}),l(34,"i",56),a(35," Sign In with Google "),r()()()}if(o&2){let d=P(14),n=P(21),e=g();c(6),Y(" (",e.subdomain,"",e.domain,") "),c(7),I("ngModel",e.username),c(2),m("ngIf",d.invalid&&(d.dirty||d.touched)),c(5),m("type",e.passwordType)("ngClass",G(9,Ne,e.browser=="edge",e.browser!="edge")),I("ngModel",e.password),c(2),m("ngIf",e.browser!="edge"),c(),m("ngIf",n.invalid&&(n.dirty||n.touched))}}var Oe=(()=>{let t=class t{constructor(n,e,s,h,ke){this._router=n,this.toastr=e,this.checkBrowser=s,this.authService=h,this.ngxPermission=ke,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:M.SHOOPE},{title:"Tokopedia",img:M.TOKOPEDIA},{title:"Tiktok",img:M.TIKTOK},{title:"Woocommerce",img:M.WOOCOMMERCE},{title:"Lazada",img:M.LAZADA},{title:"Shopify",img:M.SHOPIFY}],this.version=fe.version,this.news$=h.getNews().pipe(F(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let n=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=n}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let n=JSON.parse(localStorage.getItem("Authorization"));if(n){this.username=n?.username,this.subdomain=n?.Host?.split(".")[0];let e=n?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ge.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let n=this.subdomain.indexOf(".dealpos");n!=-1&&(this.subdomain=this.subdomain.substring(0,n))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let n={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(n).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(n){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(n,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(n){this.ngxPermission.hasPermission([ue.dashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):n?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}};t.\u0275fac=function(e){return new(e||t)(p(v),p(te),p(we),p(be),p(he))},t.\u0275cmp=x({type:t,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&W(Ae,5),e&2){let h;q(h=H())&&(s.subdomainEl=h.first)}},decls:19,vars:7,consts:[["USERNAME_PASSWORD",""],["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[4,"ngIf","ngIfElse"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[4,"ngFor","ngForOf"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","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-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[2,"width","52px"],[1,"text-danger","ps-1"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(e,s){if(e&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),a(4,"New Features"),r(),l(5,"POS-news-swiper",8),Q(6,"async"),r(),i(7,"div",9),f(8,De,30,3,"ng-container",10)(9,qe,36,12,"ng-template",null,0,$),r()(),i(11,"div",11)(12,"span",12),a(13,"powered by :"),r(),l(14,"a",13),r(),i(15,"div",14)(16,"a",15),a(17),l(18,"i",16),r()()()),e&2){let h=P(10);c(5),m("newsList",K(6,5,s.news$)),c(3),m("ngIf",s.loginState=="FORM_DOMAIN")("ngIfElse",h),c(8),m("href",s.changelogUrl,w),c(),B("version ",s.version,"")}},dependencies:[J,D,X,se,ce,le,ne,de,ie,oe,pe,ae,re,Me,Z],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}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%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.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}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]});let o=t;return o})();var Pe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.shopID=n.shop_id,this.code=n.code})}addShopee(){let n={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",n).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(S),p(y),p(v))},t.\u0275cmp=x({type:t,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,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),i(13,"div"),a(14," Your shopID is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addShopee()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}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%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.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}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.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}"]});let o=t;return o})();var ye=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code,this.state=n.state})}addChannelTiktok(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(p(S),p(y),p(v))},t.\u0275cmp=x({type:t,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,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"div"),a(18," Your State is "),i(19,"span",8),a(20),r()(),i(21,"button",9),u("click",function(){return s.addChannelTiktok()}),l(22,"i",10),a(23," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code),c(4),C(s.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}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%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.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}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.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}"]});let o=t;return o})();var He=[{path:"",component:Oe,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Pe,data:{title:"Success"}},{path:"tiktok",component:ye,data:{title:"Success"}},{path:"lazada",component:ve,data:{title:"Success"}}],Se=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[j.forChild(He),j]});let o=t;return o})();var yt=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[ee,me,Se,_e,xe]});let o=t;return o})();export{yt as LoginModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _}from"./chunk-BMPACBBM.js";import"./chunk-7GNI4BOW.js";import"./chunk-OFRBPREK.js";import{a as de,b as ce}from"./chunk-7CEWM7GE.js";import"./chunk-MEGPKKGI.js";import{a as R}from"./chunk-RVULTBBA.js";import"./chunk-M4VGME5L.js";import"./chunk-AAIK6JQ3.js";import"./chunk-IOH6ZWW2.js";import{e as oe}from"./chunk-IPX66YIX.js";import"./chunk-HBHGO2RV.js";import{l as D,m as pe}from"./chunk-PIDUM6XT.js";import"./chunk-43TMSPFC.js";import"./chunk-4TYJR476.js";import{u as se}from"./chunk-F5YRASNU.js";import{c as f}from"./chunk-2UXFUEON.js";import{$ as J,Fb as c,Gb as N,Ha as G,Hb as Z,Ia as m,Ja as h,Jb as u,Kb as y,Lb as g,Ob as $,Q as V,Tb as ee,Wb as A,X as H,Xb as j,Ya as v,_a as p,aa as Q,ca as K,cb as X,cd as ae,ed as le,ga as S,gd as me,ha as z,kb as o,lb as a,mb as C,na as q,pb as Y,rc as te,sc as P,tb as b,vb as T,vc as ie,wc as w,yb as U,yc as re,zc as ne}from"./chunk-77JORVC2.js";import"./chunk-CRRJCY55.js";var fe=(()=>{let r=class r{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/order/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/order/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/order/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/order/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/order/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/order/void-invoice"},{Title:"All",Url:"/menu/sync-log/order/all"}]}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=S({type:r,selectors:[["app-order"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),a()()(),C(4,"router-outlet")),i&2&&(m(3),p("Tabs",t.reportTabs))},dependencies:[de,ae],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]});let n=r;return n})();var F=class{};var I=(()=>{let r=class r{constructor(e){this.http=e}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(e){return new Promise((i,t)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/CreateInvoice",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncVoidInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/Void",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncConvertInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/ConvertToInvoice",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncDelivery(e){return new Promise((i,t)=>{this.http.post("/api/Report/Delivery",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncPayment(e){return new Promise((i,t)=>{this.http.post("/api/Report/Payment",JSON.stringify(e)).subscribe(d=>{i(d)})})}getAllReport(e){return this.http.post("/api/Report/all",JSON.stringify(e))}};r.\u0275fac=function(i){return new(i||r)(K(oe))},r.\u0275prov=J({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var L=function(n){return n[n.OK=200]="OK",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.CONFLICT=409]="CONFLICT",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n}(L||{});var _e=()=>["/menu/log/order"],Fe=(n,r,s,e,i)=>({responseCode:n,From:r,to:s,actionType:e,ChannelID:i});function be(n,r){if(n&1&&(o(0,"th",9)(1,"div",10)(2,"h4"),c(3),a(),o(4,"small",11),c(5),a()()()),n&2){let s=r.$implicit,e=T();m(3),N(s),m(),X(e.getTextBgColor(s)),m(),N(e.getHeaderStatusDesc(s))}}function Pe(n,r){if(n&1&&(o(0,"td",14)(1,"a",15),c(2),a()()),n&2){let s=r.$implicit,e=T().$implicit,i=T();m(),p("routerLink",$(3,_e))("queryParams",ee(4,Fe,s.Key,i.fromQueryParam,i.toQueryParam,i.type,e.ChannelID)),m(),Z(" ",s.Value," ")}}function we(n,r){if(n&1&&(o(0,"tr")(1,"td")(2,"a",12),C(3,"img",13),a()(),o(4,"td")(5,"div")(6,"a",12),c(7),a()(),o(8,"div"),c(9),a()(),v(10,Pe,3,10,"td",8),a()),n&2){let s=r.$implicit,e=T();m(2),U("href",s.Url,G),m(),p("src",e.getChannelLogo(s.Type),G),m(3),U("href",s.Url,G),m(),N(s.Name),m(2),N(s.Url),m(),p("ngForOf",s.list)}}function De(n,r){if(n&1&&(o(0,"td",14)(1,"div",16),c(2),A(3,"number"),a()()),n&2){let s=r.$implicit;m(2),N(j(3,1,s.total))}}var E=(()=>{let r=class r{constructor(){this.type=null,this.headerStatus=L,this.listCalculationStatusCode=[]}set from(e){e&&(this.fromQueryParam=new Date(e).toJSON().toString())}set to(e){e&&(this.toQueryParam=new Date(e).toJSON().toString())}ngOnChanges(e){e.result&&this.calculateStatusCode()}getHeaderStatusDesc(e){let i=null;switch(e){case L.BAD_REQUEST:i="BAD REQUEST";break;case L.CONFLICT:i="CONFLICT";break;case L.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case L.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case L.OK:i="bg-success";break;case L.INTERNAL_SERVER_ERROR:i="bg-danger";break;default:i="bg-warning";break}return i}getChannelLogo(e){return f.getChannelLogoByTypeId(e)}calculateStatusCode(){if(this.listCalculationStatusCode=[],this.result){let e,i;this.concatStatusCode().forEach(t=>{e=this.listCalculationStatusCode.findIndex(d=>d.status==t.Key),i=e!==-1,i?this.listCalculationStatusCode[e].total+=t.Value:this.listCalculationStatusCode=[...this.listCalculationStatusCode,{status:t.Key,total:t.Value}]})}}concatStatusCode(){return this.result.map(e=>e.list).reduce((e,i)=>[...e,...i])}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=S({type:r,selectors:[["app-table-report"]],inputs:{header:"header",result:"result",from:"from",to:"to",type:"type"},features:[q],decls:15,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%;",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(i,t){i&1&&(o(0,"table",0)(1,"thead",1)(2,"tr"),C(3,"th",2),o(4,"th",3),c(5,"Channel"),a(),v(6,be,6,4,"th",4),a()(),o(7,"tbody"),v(8,we,11,6,"tr",5),a(),o(9,"tfoot")(10,"tr")(11,"td",6)(12,"div",7),c(13,"Total"),a()(),v(14,De,4,3,"td",8),a()()()),i&2&&(m(6),p("ngForOf",t.header),m(2),p("ngForOf",t.result),m(6),p("ngForOf",t.listCalculationStatusCode))},dependencies:[te,le,re],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]});let n=r;return n})();function Ie(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",0)}}var he=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.pageTitle="New Order";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-sales-order"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.getChannelLogs()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Ie,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.pageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Ee(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var ue=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Ee,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Oe(n,r){if(n&1&&(o(0,"div",8)(1,"div",9),C(2,"app-table-report",10),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",3)}}var ye=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F;let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-delivery"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div",1)(3,"label",2),c(4,"From/To"),a(),o(5,"div",3)(6,"datepicker",4),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",5),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",6),v(11,Oe,3,5,"div",7),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Le(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",4)}}var ge=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Completed";let t=new Date;this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-payment"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Le,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Re(n,r){n&1&&Y(0)}function Me(n,r){if(n&1&&(o(0,"div",8)(1,"div",9),C(2,"app-table-report",10),a()()),n&2){let s=r.ngIf,e=T();m(2),p("result",s.Body)("header",s.Header)("from",e.filter==null?null:e.filter.From)("to",e.filter==null?null:e.filter.To)}}var ve=(()=>{let r=class r{constructor(e,i){this.reportOrderService=e,this.datePipe=i,this.filter=new F}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let e=new Date;this.minDate=f.addDays(e,6),this.filter.From=e,this.filter.To=e,this.updatePageTitle()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${e==null?"":i+"-"} ${t})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe(H(e=>{this.filter=e,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe(V())}onFilter(){this.updatePageTitle(),this.initData()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-all"]],decls:15,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Re,1,0,"ng-container",6),A(12,"async"),v(13,Me,3,4,"div",7),A(14,"async"),a()()()),i&2&&(p("headerTitle",t.pageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",j(12,6,t.pageLoader$)),m(2),p("ngIf",j(14,8,t.reportData$)))},dependencies:[P,D,_,E,ie]});let n=r;return n})();function ke(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var Ce=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Convert Sales Order To Invoice";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Convert Sales Order To Invoice (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-convert-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,ke,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function xe(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var Te=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-void-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,xe,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();var Ne=[{path:"",component:fe,children:[{path:"",redirectTo:"sync-order",pathMatch:"full"},{path:"sync-order",component:he,canActivate:[R],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:Ce,canActivate:[R],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:ue,canActivate:[R],data:{title:"Sync Invoice"}},{path:"delivery",component:ye,canActivate:[R],data:{title:"Sync Delivery"}},{path:"payment",component:ge,canActivate:[R],data:{title:"Sync Payment"}},{path:"void-invoice",component:Te,canActivate:[R],data:{title:"Sync void invoice"}},{path:"all",component:ve,canActivate:[R],data:{title:"All Report"}}]}],Et=(()=>{let r=class r{};r.\u0275fac=function(i){return new(i||r)},r.\u0275mod=z({type:r}),r.\u0275inj=Q({imports:[ne,ce,se,pe,_,me.forChild(Ne)]});let n=r;return n})();export{Et as OrderModule};
|
|
1
|
+
import{a as _}from"./chunk-BMPACBBM.js";import"./chunk-7GNI4BOW.js";import"./chunk-OFRBPREK.js";import{a as de,b as ce}from"./chunk-7CEWM7GE.js";import"./chunk-MEGPKKGI.js";import{a as R}from"./chunk-LCOFOENF.js";import"./chunk-M4VGME5L.js";import"./chunk-AAIK6JQ3.js";import"./chunk-FON6ZRGN.js";import{e as oe}from"./chunk-IPX66YIX.js";import"./chunk-HBHGO2RV.js";import{l as D,m as pe}from"./chunk-PIDUM6XT.js";import"./chunk-43TMSPFC.js";import"./chunk-4TYJR476.js";import{u as se}from"./chunk-F5YRASNU.js";import{c as f}from"./chunk-2UXFUEON.js";import{$ as J,Fb as c,Gb as N,Ha as G,Hb as Z,Ia as m,Ja as h,Jb as u,Kb as y,Lb as g,Ob as $,Q as V,Tb as ee,Wb as A,X as H,Xb as j,Ya as v,_a as p,aa as Q,ca as K,cb as X,cd as ae,ed as le,ga as S,gd as me,ha as z,kb as o,lb as a,mb as C,na as q,pb as Y,rc as te,sc as P,tb as b,vb as T,vc as ie,wc as w,yb as U,yc as re,zc as ne}from"./chunk-77JORVC2.js";import"./chunk-CRRJCY55.js";var fe=(()=>{let r=class r{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/order/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/order/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/order/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/order/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/order/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/order/void-invoice"},{Title:"All",Url:"/menu/sync-log/order/all"}]}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=S({type:r,selectors:[["app-order"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),a()()(),C(4,"router-outlet")),i&2&&(m(3),p("Tabs",t.reportTabs))},dependencies:[de,ae],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]});let n=r;return n})();var F=class{};var I=(()=>{let r=class r{constructor(e){this.http=e}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(e){return new Promise((i,t)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/CreateInvoice",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncVoidInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/Void",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncConvertInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/ConvertToInvoice",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncDelivery(e){return new Promise((i,t)=>{this.http.post("/api/Report/Delivery",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncPayment(e){return new Promise((i,t)=>{this.http.post("/api/Report/Payment",JSON.stringify(e)).subscribe(d=>{i(d)})})}getAllReport(e){return this.http.post("/api/Report/all",JSON.stringify(e))}};r.\u0275fac=function(i){return new(i||r)(K(oe))},r.\u0275prov=J({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var L=function(n){return n[n.OK=200]="OK",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.CONFLICT=409]="CONFLICT",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n}(L||{});var _e=()=>["/menu/log/order"],Fe=(n,r,s,e,i)=>({responseCode:n,From:r,to:s,actionType:e,ChannelID:i});function be(n,r){if(n&1&&(o(0,"th",9)(1,"div",10)(2,"h4"),c(3),a(),o(4,"small",11),c(5),a()()()),n&2){let s=r.$implicit,e=T();m(3),N(s),m(),X(e.getTextBgColor(s)),m(),N(e.getHeaderStatusDesc(s))}}function Pe(n,r){if(n&1&&(o(0,"td",14)(1,"a",15),c(2),a()()),n&2){let s=r.$implicit,e=T().$implicit,i=T();m(),p("routerLink",$(3,_e))("queryParams",ee(4,Fe,s.Key,i.fromQueryParam,i.toQueryParam,i.type,e.ChannelID)),m(),Z(" ",s.Value," ")}}function we(n,r){if(n&1&&(o(0,"tr")(1,"td")(2,"a",12),C(3,"img",13),a()(),o(4,"td")(5,"div")(6,"a",12),c(7),a()(),o(8,"div"),c(9),a()(),v(10,Pe,3,10,"td",8),a()),n&2){let s=r.$implicit,e=T();m(2),U("href",s.Url,G),m(),p("src",e.getChannelLogo(s.Type),G),m(3),U("href",s.Url,G),m(),N(s.Name),m(2),N(s.Url),m(),p("ngForOf",s.list)}}function De(n,r){if(n&1&&(o(0,"td",14)(1,"div",16),c(2),A(3,"number"),a()()),n&2){let s=r.$implicit;m(2),N(j(3,1,s.total))}}var E=(()=>{let r=class r{constructor(){this.type=null,this.headerStatus=L,this.listCalculationStatusCode=[]}set from(e){e&&(this.fromQueryParam=new Date(e).toJSON().toString())}set to(e){e&&(this.toQueryParam=new Date(e).toJSON().toString())}ngOnChanges(e){e.result&&this.calculateStatusCode()}getHeaderStatusDesc(e){let i=null;switch(e){case L.BAD_REQUEST:i="BAD REQUEST";break;case L.CONFLICT:i="CONFLICT";break;case L.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case L.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case L.OK:i="bg-success";break;case L.INTERNAL_SERVER_ERROR:i="bg-danger";break;default:i="bg-warning";break}return i}getChannelLogo(e){return f.getChannelLogoByTypeId(e)}calculateStatusCode(){if(this.listCalculationStatusCode=[],this.result){let e,i;this.concatStatusCode().forEach(t=>{e=this.listCalculationStatusCode.findIndex(d=>d.status==t.Key),i=e!==-1,i?this.listCalculationStatusCode[e].total+=t.Value:this.listCalculationStatusCode=[...this.listCalculationStatusCode,{status:t.Key,total:t.Value}]})}}concatStatusCode(){return this.result.map(e=>e.list).reduce((e,i)=>[...e,...i])}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=S({type:r,selectors:[["app-table-report"]],inputs:{header:"header",result:"result",from:"from",to:"to",type:"type"},features:[q],decls:15,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%;",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(i,t){i&1&&(o(0,"table",0)(1,"thead",1)(2,"tr"),C(3,"th",2),o(4,"th",3),c(5,"Channel"),a(),v(6,be,6,4,"th",4),a()(),o(7,"tbody"),v(8,we,11,6,"tr",5),a(),o(9,"tfoot")(10,"tr")(11,"td",6)(12,"div",7),c(13,"Total"),a()(),v(14,De,4,3,"td",8),a()()()),i&2&&(m(6),p("ngForOf",t.header),m(2),p("ngForOf",t.result),m(6),p("ngForOf",t.listCalculationStatusCode))},dependencies:[te,le,re],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]});let n=r;return n})();function Ie(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",0)}}var he=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.pageTitle="New Order";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-sales-order"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.getChannelLogs()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Ie,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.pageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Ee(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var ue=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Ee,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Oe(n,r){if(n&1&&(o(0,"div",8)(1,"div",9),C(2,"app-table-report",10),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",3)}}var ye=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F;let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-delivery"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div",1)(3,"label",2),c(4,"From/To"),a(),o(5,"div",3)(6,"datepicker",4),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",5),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",6),v(11,Oe,3,5,"div",7),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Le(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",4)}}var ge=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Completed";let t=new Date;this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-payment"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Le,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Re(n,r){n&1&&Y(0)}function Me(n,r){if(n&1&&(o(0,"div",8)(1,"div",9),C(2,"app-table-report",10),a()()),n&2){let s=r.ngIf,e=T();m(2),p("result",s.Body)("header",s.Header)("from",e.filter==null?null:e.filter.From)("to",e.filter==null?null:e.filter.To)}}var ve=(()=>{let r=class r{constructor(e,i){this.reportOrderService=e,this.datePipe=i,this.filter=new F}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let e=new Date;this.minDate=f.addDays(e,6),this.filter.From=e,this.filter.To=e,this.updatePageTitle()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${e==null?"":i+"-"} ${t})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe(H(e=>{this.filter=e,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe(V())}onFilter(){this.updatePageTitle(),this.initData()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-all"]],decls:15,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Re,1,0,"ng-container",6),A(12,"async"),v(13,Me,3,4,"div",7),A(14,"async"),a()()()),i&2&&(p("headerTitle",t.pageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",j(12,6,t.pageLoader$)),m(2),p("ngIf",j(14,8,t.reportData$)))},dependencies:[P,D,_,E,ie]});let n=r;return n})();function ke(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var Ce=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Convert Sales Order To Invoice";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Convert Sales Order To Invoice (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-convert-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,ke,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function xe(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var Te=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-void-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,xe,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();var Ne=[{path:"",component:fe,children:[{path:"",redirectTo:"sync-order",pathMatch:"full"},{path:"sync-order",component:he,canActivate:[R],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:Ce,canActivate:[R],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:ue,canActivate:[R],data:{title:"Sync Invoice"}},{path:"delivery",component:ye,canActivate:[R],data:{title:"Sync Delivery"}},{path:"payment",component:ge,canActivate:[R],data:{title:"Sync Payment"}},{path:"void-invoice",component:Te,canActivate:[R],data:{title:"Sync void invoice"}},{path:"all",component:ve,canActivate:[R],data:{title:"All Report"}}]}],Et=(()=>{let r=class r{};r.\u0275fac=function(i){return new(i||r)},r.\u0275mod=z({type:r}),r.\u0275inj=Q({imports:[ne,ce,se,pe,_,me.forChild(Ne)]});let n=r;return n})();export{Et as OrderModule};
|