marketplacepos 3.11.6 → 3.11.7
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-JGXFH32F.js → chunk-5OSUE6B3.js} +1 -1
- package/Marketplace/{chunk-5DJHCNOC.js → chunk-7QECCYLR.js} +1 -1
- package/Marketplace/{chunk-CMKSEIUM.js → chunk-7TDQZKQC.js} +1 -1
- package/Marketplace/{chunk-W6KTDTXB.js → chunk-CDAAQO6A.js} +1 -1
- package/Marketplace/{chunk-SZAOPIAL.js → chunk-H5P5BX43.js} +1 -1
- package/Marketplace/{chunk-W57W62AZ.js → chunk-JJ4ZOCSD.js} +1 -1
- package/Marketplace/{chunk-UC57IYQT.js → chunk-L4Q4FQFW.js} +1 -1
- package/Marketplace/{chunk-PPLACGQI.js → chunk-LHJXLBHB.js} +1 -1
- package/Marketplace/{chunk-BFB7MXXJ.js → chunk-LHLYIKEW.js} +1 -1
- package/Marketplace/{chunk-2O6KYIFC.js → chunk-NQ3TJQ5O.js} +1 -1
- package/Marketplace/{chunk-BD5SMP3B.js → chunk-PTYBFE3S.js} +1 -1
- package/Marketplace/{chunk-HJDBNMZS.js → chunk-QBA3X367.js} +1 -1
- package/Marketplace/{chunk-NSXGLHYH.js → chunk-QBVEDLRG.js} +1 -1
- package/Marketplace/{chunk-OKEA4W2I.js → chunk-T4Y427M7.js} +1 -1
- package/Marketplace/{chunk-RZ64BVFI.js → chunk-THNYE3KI.js} +1 -1
- package/Marketplace/{chunk-RKDI7CIB.js → chunk-UUPUVGXL.js} +1 -1
- package/Marketplace/{chunk-JQO7P26T.js → chunk-WVXTWIP3.js} +1 -1
- package/Marketplace/{chunk-3QAMTLNB.js → chunk-XJNFT56V.js} +3 -3
- package/Marketplace/{chunk-UKSDL7LF.js → chunk-ZU7YBWGM.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-AFNJEGW2.js → main-MFYZJGET.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as fe}from"./chunk-YZ67XPSX.js";import{b as _}from"./chunk-GSSZWMCP.js";import"./chunk-XDNW2F3I.js";import"./chunk-TDHJ34QP.js";import"./chunk-INNTQ5YN.js";import{a as de,b as ce}from"./chunk-SRYGE2HW.js";import"./chunk-DT3B54LD.js";import{a as L}from"./chunk-OKEA4W2I.js";import"./chunk-5DJHCNOC.js";import{e as oe}from"./chunk-K3G6FMDF.js";import"./chunk-JM3LERUP.js";import{C as D,D as pe}from"./chunk-ZKBLXGXT.js";import"./chunk-6B64VOO7.js";import{u as me}from"./chunk-SP6QPE3M.js";import{c as f}from"./chunk-6F6NSBIF.js";import{$ as J,$a as X,Ab as c,Bb as N,Cb as Z,Eb as u,Fb as y,Gb as g,Ha as G,Ia as s,Ja as h,Jb as $,Ob as ee,Q as V,Rb as A,Sb as j,Wa as C,Wc as ae,X as H,Ya as p,Yc as le,_c as se,aa as Q,ca as K,fb as o,gb as a,ha as S,hb as T,ia as z,kb as Y,kc as te,lc as w,oa as q,ob as P,oc as ie,pc as b,qb as v,rc as re,sc as ne,tb as U}from"./chunk-6DRNAUKE.js";import"./chunk-GRMIXZTT.js";var he=(()=>{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"),T(3,"nav-tab",2),a()()(),T(4,"router-outlet")),i&2&&(s(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 R=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}(R||{});var Fe=()=>["/menu/log/order"],Pe=(n,r,m,e,i)=>({responseCode:n,From:r,to:m,actionType:e,ChannelID:i});function we(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 m=r.$implicit,e=v();s(3),N(m),s(),X(e.getTextBgColor(m)),s(),N(e.getHeaderStatusDesc(m))}}function be(n,r){if(n&1&&(o(0,"td",14)(1,"a",15),c(2),a()()),n&2){let m=r.$implicit,e=v().$implicit,i=v();s(),p("routerLink",$(3,Fe))("queryParams",ee(4,Pe,m.Key,i.fromQueryParam,i.toQueryParam,i.type,e.ChannelID)),s(),Z(" ",m.Value," ")}}function De(n,r){if(n&1&&(o(0,"tr")(1,"td")(2,"a",12),T(3,"img",13),a()(),o(4,"td")(5,"div")(6,"a",12),c(7),a()(),o(8,"div"),c(9),a()(),C(10,be,3,10,"td",8),a()),n&2){let m=r.$implicit,e=v();s(2),U("href",m.Url,G),s(),p("src",e.getChannelLogo(m.Type),G),s(3),U("href",m.Url,G),s(),N(m.Name),s(2),N(m.Url),s(),p("ngForOf",m.list)}}function Ie(n,r){if(n&1&&(o(0,"td",14)(1,"div",16),c(2),A(3,"number"),a()()),n&2){let m=r.$implicit;s(2),N(j(3,1,m.total))}}var E=(()=>{let r=class r{constructor(){this.type=null,this.headerStatus=R,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 R.BAD_REQUEST:i="BAD REQUEST";break;case R.CONFLICT:i="CONFLICT";break;case R.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case R.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case R.OK:i="bg-success";break;case R.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"),T(3,"th",2),o(4,"th",3),c(5,"Channel"),a(),C(6,we,6,4,"th",4),a()(),o(7,"tbody"),C(8,De,11,6,"tr",5),a(),o(9,"tfoot")(10,"tr")(11,"td",6)(12,"div",7),c(13,"Total"),a()(),C(14,Ie,4,3,"td",8),a()()()),i&2&&(s(6),p("ngForOf",t.header),s(2),p("ngForOf",t.result),s(6),p("ngForOf",t.listCalculationStatusCode))},dependencies:[te,le,re],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]});let n=r;return n})();function Ee(n,r){if(n&1&&(o(0,"div",6)(1,"div",7),T(2,"app-table-report",8),a()()),n&2){let m=v();s(2),p("result",m.result)("header",m.header)("from",m.filter.From)("to",m.filter.To)("type",0)}}var ue=(()=>{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(b))},r.\u0275cmp=S({type:r,selectors:[["app-sales-order"]],decls:10,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold"],["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),P("onSubmit",function(){return t.getChannelLogs()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"datepicker",2),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a(),o(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()(),o(7,"content")(8,"div",4),C(9,Ee,3,5,"div",5),a()()()),i&2&&(p("headerTitle",t.pageTitle)("hideSearchBox",!0),s(5),u("date",t.filter.From),s(),u("date",t.filter.To),s(3),p("ngIf",t.result))},dependencies:[w,D,_,E]});let n=r;return n})();function Oe(n,r){if(n&1&&(o(0,"div",6)(1,"div",7),T(2,"app-table-report",8),a()()),n&2){let m=v();s(2),p("result",m.result)("header",m.header)("from",m.filter.From)("to",m.filter.To)("type",1)}}var ye=(()=>{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(b))},r.\u0275cmp=S({type:r,selectors:[["app-invoice"]],decls:10,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold"],["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),P("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"datepicker",2),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a(),o(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()(),o(7,"content")(8,"div",4),C(9,Oe,3,5,"div",5),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),s(5),u("date",t.filter.From),s(),u("date",t.filter.To),s(3),p("ngIf",t.result))},dependencies:[w,D,_,E]});let n=r;return n})();function Re(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),T(2,"app-table-report",9),a()()),n&2){let m=v();s(2),p("result",m.result)("header",m.header)("from",m.filter.From)("to",m.filter.To)("type",3)}}var ge=(()=>{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(b))},r.\u0275cmp=S({type:r,selectors:[["app-delivery"]],decls:10,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold"],["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),P("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div",1)(3,"h6",2),c(4,"From/To"),a(),o(5,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a(),o(6,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()(),o(7,"content")(8,"div",5),C(9,Re,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),s(5),u("date",t.filter.From),s(),u("date",t.filter.To),s(3),p("ngIf",t.result))},dependencies:[w,D,_,E]});let n=r;return n})();function Le(n,r){if(n&1&&(o(0,"div",6)(1,"div",7),T(2,"app-table-report",8),a()()),n&2){let m=v();s(2),p("result",m.result)("header",m.header)("from",m.filter.From)("to",m.filter.To)("type",4)}}var Ce=(()=>{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(b))},r.\u0275cmp=S({type:r,selectors:[["app-payment"]],decls:10,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold"],["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),P("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"datepicker",2),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a(),o(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()(),o(7,"content")(8,"div",4),C(9,Le,3,5,"div",5),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),s(5),u("date",t.filter.From),s(),u("date",t.filter.To),s(3),p("ngIf",t.result))},dependencies:[w,D,_,E]});let n=r;return n})();function Me(n,r){n&1&&Y(0)}function ke(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),T(2,"app-table-report",9),a()()),n&2){let m=r.ngIf,e=v();s(2),p("result",m.Body)("header",m.Header)("from",e.filter==null?null:e.filter.From)("to",e.filter==null?null:e.filter.To)}}var Te=(()=>{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(b))},r.\u0275cmp=S({type:r,selectors:[["app-all"]],decls:13,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold"],["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),P("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"datepicker",2),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a(),o(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()(),o(7,"content")(8,"div",4),C(9,Me,1,0,"ng-container",5),A(10,"async"),C(11,ke,3,4,"div",6),A(12,"async"),a()()()),i&2&&(p("headerTitle",t.pageTitle)("hideSearchBox",!0),s(5),u("date",t.filter.From),s(),u("date",t.filter.To),s(3),p("ngIf",j(10,6,t.pageLoader$)),s(2),p("ngIf",j(12,8,t.reportData$)))},dependencies:[w,D,_,E,ie]});let n=r;return n})();function xe(n,r){if(n&1&&(o(0,"div",6)(1,"div",7),T(2,"app-table-report",8),a()()),n&2){let m=v();s(2),p("result",m.result)("header",m.header)("from",m.filter.From)("to",m.filter.To)("type",1)}}var ve=(()=>{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(b))},r.\u0275cmp=S({type:r,selectors:[["app-convert-invoice"]],decls:10,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold"],["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),P("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"datepicker",2),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a(),o(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()(),o(7,"content")(8,"div",4),C(9,xe,3,5,"div",5),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),s(5),u("date",t.filter.From),s(),u("date",t.filter.To),s(3),p("ngIf",t.result))},dependencies:[w,D,_,E]});let n=r;return n})();function Ne(n,r){if(n&1&&(o(0,"div",6)(1,"div",7),T(2,"app-table-report",8),a()()),n&2){let m=v();s(2),p("result",m.result)("header",m.header)("from",m.filter.From)("to",m.filter.To)("type",1)}}var Se=(()=>{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(b))},r.\u0275cmp=S({type:r,selectors:[["app-void-invoice"]],decls:10,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold"],["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),P("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"datepicker",2),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a(),o(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()(),o(7,"content")(8,"div",4),C(9,Ne,3,5,"div",5),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),s(5),u("date",t.filter.From),s(),u("date",t.filter.To),s(3),p("ngIf",t.result))},dependencies:[w,D,_,E]});let n=r;return n})();var Be=[{path:"",component:he,children:[{path:"",redirectTo:"sync-order",pathMatch:"full"},{path:"sync-order",component:ue,canActivate:[L],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:ve,canActivate:[L],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:ye,canActivate:[L],data:{title:"Sync Invoice"}},{path:"delivery",component:ge,canActivate:[L],data:{title:"Sync Delivery"}},{path:"payment",component:Ce,canActivate:[L],data:{title:"Sync Payment"}},{path:"void-invoice",component:Se,canActivate:[L],data:{title:"Sync void invoice"}},{path:"all",component:Te,canActivate:[L],data:{title:"All Report"}}]}],Rt=(()=>{let r=class r{};r.\u0275fac=function(i){return new(i||r)},r.\u0275mod=z({type:r}),r.\u0275inj=Q({imports:[ne,ce,me,pe,fe,_,se.forChild(Be)]});let n=r;return n})();export{Rt as OrderModule};
|
|
1
|
+
import{a as fe}from"./chunk-YZ67XPSX.js";import{b as _}from"./chunk-GSSZWMCP.js";import"./chunk-XDNW2F3I.js";import"./chunk-TDHJ34QP.js";import"./chunk-INNTQ5YN.js";import{a as de,b as ce}from"./chunk-SRYGE2HW.js";import"./chunk-DT3B54LD.js";import{a as L}from"./chunk-T4Y427M7.js";import"./chunk-7QECCYLR.js";import{e as oe}from"./chunk-K3G6FMDF.js";import"./chunk-JM3LERUP.js";import{C as D,D as pe}from"./chunk-ZKBLXGXT.js";import"./chunk-6B64VOO7.js";import{u as me}from"./chunk-SP6QPE3M.js";import{c as f}from"./chunk-6F6NSBIF.js";import{$ as J,$a as X,Ab as c,Bb as N,Cb as Z,Eb as u,Fb as y,Gb as g,Ha as G,Ia as s,Ja as h,Jb as $,Ob as ee,Q as V,Rb as A,Sb as j,Wa as C,Wc as ae,X as H,Ya as p,Yc as le,_c as se,aa as Q,ca as K,fb as o,gb as a,ha as S,hb as T,ia as z,kb as Y,kc as te,lc as w,oa as q,ob as P,oc as ie,pc as b,qb as v,rc as re,sc as ne,tb as U}from"./chunk-6DRNAUKE.js";import"./chunk-GRMIXZTT.js";var he=(()=>{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"),T(3,"nav-tab",2),a()()(),T(4,"router-outlet")),i&2&&(s(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 R=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}(R||{});var Fe=()=>["/menu/log/order"],Pe=(n,r,m,e,i)=>({responseCode:n,From:r,to:m,actionType:e,ChannelID:i});function we(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 m=r.$implicit,e=v();s(3),N(m),s(),X(e.getTextBgColor(m)),s(),N(e.getHeaderStatusDesc(m))}}function be(n,r){if(n&1&&(o(0,"td",14)(1,"a",15),c(2),a()()),n&2){let m=r.$implicit,e=v().$implicit,i=v();s(),p("routerLink",$(3,Fe))("queryParams",ee(4,Pe,m.Key,i.fromQueryParam,i.toQueryParam,i.type,e.ChannelID)),s(),Z(" ",m.Value," ")}}function De(n,r){if(n&1&&(o(0,"tr")(1,"td")(2,"a",12),T(3,"img",13),a()(),o(4,"td")(5,"div")(6,"a",12),c(7),a()(),o(8,"div"),c(9),a()(),C(10,be,3,10,"td",8),a()),n&2){let m=r.$implicit,e=v();s(2),U("href",m.Url,G),s(),p("src",e.getChannelLogo(m.Type),G),s(3),U("href",m.Url,G),s(),N(m.Name),s(2),N(m.Url),s(),p("ngForOf",m.list)}}function Ie(n,r){if(n&1&&(o(0,"td",14)(1,"div",16),c(2),A(3,"number"),a()()),n&2){let m=r.$implicit;s(2),N(j(3,1,m.total))}}var E=(()=>{let r=class r{constructor(){this.type=null,this.headerStatus=R,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 R.BAD_REQUEST:i="BAD REQUEST";break;case R.CONFLICT:i="CONFLICT";break;case R.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case R.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case R.OK:i="bg-success";break;case R.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"),T(3,"th",2),o(4,"th",3),c(5,"Channel"),a(),C(6,we,6,4,"th",4),a()(),o(7,"tbody"),C(8,De,11,6,"tr",5),a(),o(9,"tfoot")(10,"tr")(11,"td",6)(12,"div",7),c(13,"Total"),a()(),C(14,Ie,4,3,"td",8),a()()()),i&2&&(s(6),p("ngForOf",t.header),s(2),p("ngForOf",t.result),s(6),p("ngForOf",t.listCalculationStatusCode))},dependencies:[te,le,re],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]});let n=r;return n})();function Ee(n,r){if(n&1&&(o(0,"div",6)(1,"div",7),T(2,"app-table-report",8),a()()),n&2){let m=v();s(2),p("result",m.result)("header",m.header)("from",m.filter.From)("to",m.filter.To)("type",0)}}var ue=(()=>{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(b))},r.\u0275cmp=S({type:r,selectors:[["app-sales-order"]],decls:10,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold"],["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),P("onSubmit",function(){return t.getChannelLogs()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"datepicker",2),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a(),o(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()(),o(7,"content")(8,"div",4),C(9,Ee,3,5,"div",5),a()()()),i&2&&(p("headerTitle",t.pageTitle)("hideSearchBox",!0),s(5),u("date",t.filter.From),s(),u("date",t.filter.To),s(3),p("ngIf",t.result))},dependencies:[w,D,_,E]});let n=r;return n})();function Oe(n,r){if(n&1&&(o(0,"div",6)(1,"div",7),T(2,"app-table-report",8),a()()),n&2){let m=v();s(2),p("result",m.result)("header",m.header)("from",m.filter.From)("to",m.filter.To)("type",1)}}var ye=(()=>{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(b))},r.\u0275cmp=S({type:r,selectors:[["app-invoice"]],decls:10,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold"],["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),P("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"datepicker",2),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a(),o(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()(),o(7,"content")(8,"div",4),C(9,Oe,3,5,"div",5),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),s(5),u("date",t.filter.From),s(),u("date",t.filter.To),s(3),p("ngIf",t.result))},dependencies:[w,D,_,E]});let n=r;return n})();function Re(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),T(2,"app-table-report",9),a()()),n&2){let m=v();s(2),p("result",m.result)("header",m.header)("from",m.filter.From)("to",m.filter.To)("type",3)}}var ge=(()=>{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(b))},r.\u0275cmp=S({type:r,selectors:[["app-delivery"]],decls:10,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold"],["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),P("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div",1)(3,"h6",2),c(4,"From/To"),a(),o(5,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a(),o(6,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()(),o(7,"content")(8,"div",5),C(9,Re,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),s(5),u("date",t.filter.From),s(),u("date",t.filter.To),s(3),p("ngIf",t.result))},dependencies:[w,D,_,E]});let n=r;return n})();function Le(n,r){if(n&1&&(o(0,"div",6)(1,"div",7),T(2,"app-table-report",8),a()()),n&2){let m=v();s(2),p("result",m.result)("header",m.header)("from",m.filter.From)("to",m.filter.To)("type",4)}}var Ce=(()=>{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(b))},r.\u0275cmp=S({type:r,selectors:[["app-payment"]],decls:10,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold"],["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),P("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"datepicker",2),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a(),o(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()(),o(7,"content")(8,"div",4),C(9,Le,3,5,"div",5),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),s(5),u("date",t.filter.From),s(),u("date",t.filter.To),s(3),p("ngIf",t.result))},dependencies:[w,D,_,E]});let n=r;return n})();function Me(n,r){n&1&&Y(0)}function ke(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),T(2,"app-table-report",9),a()()),n&2){let m=r.ngIf,e=v();s(2),p("result",m.Body)("header",m.Header)("from",e.filter==null?null:e.filter.From)("to",e.filter==null?null:e.filter.To)}}var Te=(()=>{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(b))},r.\u0275cmp=S({type:r,selectors:[["app-all"]],decls:13,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold"],["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),P("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"datepicker",2),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a(),o(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()(),o(7,"content")(8,"div",4),C(9,Me,1,0,"ng-container",5),A(10,"async"),C(11,ke,3,4,"div",6),A(12,"async"),a()()()),i&2&&(p("headerTitle",t.pageTitle)("hideSearchBox",!0),s(5),u("date",t.filter.From),s(),u("date",t.filter.To),s(3),p("ngIf",j(10,6,t.pageLoader$)),s(2),p("ngIf",j(12,8,t.reportData$)))},dependencies:[w,D,_,E,ie]});let n=r;return n})();function xe(n,r){if(n&1&&(o(0,"div",6)(1,"div",7),T(2,"app-table-report",8),a()()),n&2){let m=v();s(2),p("result",m.result)("header",m.header)("from",m.filter.From)("to",m.filter.To)("type",1)}}var ve=(()=>{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(b))},r.\u0275cmp=S({type:r,selectors:[["app-convert-invoice"]],decls:10,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold"],["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),P("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"datepicker",2),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a(),o(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()(),o(7,"content")(8,"div",4),C(9,xe,3,5,"div",5),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),s(5),u("date",t.filter.From),s(),u("date",t.filter.To),s(3),p("ngIf",t.result))},dependencies:[w,D,_,E]});let n=r;return n})();function Ne(n,r){if(n&1&&(o(0,"div",6)(1,"div",7),T(2,"app-table-report",8),a()()),n&2){let m=v();s(2),p("result",m.result)("header",m.header)("from",m.filter.From)("to",m.filter.To)("type",1)}}var Se=(()=>{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(b))},r.\u0275cmp=S({type:r,selectors:[["app-void-invoice"]],decls:10,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold"],["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),P("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"datepicker",2),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a(),o(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()(),o(7,"content")(8,"div",4),C(9,Ne,3,5,"div",5),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),s(5),u("date",t.filter.From),s(),u("date",t.filter.To),s(3),p("ngIf",t.result))},dependencies:[w,D,_,E]});let n=r;return n})();var Be=[{path:"",component:he,children:[{path:"",redirectTo:"sync-order",pathMatch:"full"},{path:"sync-order",component:ue,canActivate:[L],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:ve,canActivate:[L],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:ye,canActivate:[L],data:{title:"Sync Invoice"}},{path:"delivery",component:ge,canActivate:[L],data:{title:"Sync Delivery"}},{path:"payment",component:Ce,canActivate:[L],data:{title:"Sync Payment"}},{path:"void-invoice",component:Se,canActivate:[L],data:{title:"Sync void invoice"}},{path:"all",component:Te,canActivate:[L],data:{title:"All Report"}}]}],Rt=(()=>{let r=class r{};r.\u0275fac=function(i){return new(i||r)},r.\u0275mod=z({type:r}),r.\u0275inj=Q({imports:[ne,ce,me,pe,fe,_,se.forChild(Be)]});let n=r;return n})();export{Rt as OrderModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h}from"./chunk-YZ67XPSX.js";import"./chunk-GSSZWMCP.js";import"./chunk-XDNW2F3I.js";import"./chunk-TDHJ34QP.js";import"./chunk-INNTQ5YN.js";import{b as u}from"./chunk-SRYGE2HW.js";import"./chunk-DT3B54LD.js";import{a as f}from"./chunk-
|
|
1
|
+
import{a as h}from"./chunk-YZ67XPSX.js";import"./chunk-GSSZWMCP.js";import"./chunk-XDNW2F3I.js";import"./chunk-TDHJ34QP.js";import"./chunk-INNTQ5YN.js";import{b as u}from"./chunk-SRYGE2HW.js";import"./chunk-DT3B54LD.js";import{a as f}from"./chunk-T4Y427M7.js";import"./chunk-7QECCYLR.js";import"./chunk-K3G6FMDF.js";import"./chunk-JM3LERUP.js";import{D as l}from"./chunk-ZKBLXGXT.js";import"./chunk-6B64VOO7.js";import{u as d}from"./chunk-SP6QPE3M.js";import"./chunk-6F6NSBIF.js";import{Wc as s,_c as m,aa as r,ha as a,hb as c,ia as i,sc as n}from"./chunk-6DRNAUKE.js";import"./chunk-GRMIXZTT.js";var C=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=a({type:t,selectors:[["app-report"]],decls:1,vars:0,template:function(e,O){e&1&&c(0,"router-outlet")},dependencies:[s],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]});let o=t;return o})();var y=[{path:"",component:C,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-PTYBFE3S.js").then(o=>o.OrderModule),canActivate:[f]}]}],g=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,m.forChild(y)]});let o=t;return o})();var z=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,u,g,d,l,m,h]});let o=t;return o})();export{z as ReportModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ue}from"./chunk-662E5VTA.js";import{e as _e}from"./chunk-AL67KXJV.js";import{b as fe,g as be}from"./chunk-5DJHCNOC.js";import{b as te,e as y}from"./chunk-K3G6FMDF.js";import"./chunk-JM3LERUP.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-SP6QPE3M.js";import{a as M,c as ge,d as he,f as xe}from"./chunk-6F6NSBIF.js";import{$ as R,$a as U,Ab as a,Bb as C,Cb as B,Db as Y,Eb as I,Fb as L,Gb as T,Ha as w,Ia as c,Ja as p,Lb as G,Q as F,Rb as Q,Sb as K,Ub as $,Vc as S,Wa as f,Xc as v,Ya as m,_c as j,aa as A,fb as i,gb as r,ha as x,hb as l,ia as N,ib as k,ic as J,jb as E,kc as D,lb as z,lc as X,ob as u,oc as Z,pa as b,qa as _,qb as g,sc as ee,wb as W,xb as q,yb as H,zb as P}from"./chunk-6DRNAUKE.js";import"./chunk-GRMIXZTT.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{a as ue}from"./chunk-662E5VTA.js";import{e as _e}from"./chunk-AL67KXJV.js";import{b as fe,g as be}from"./chunk-7QECCYLR.js";import{b as te,e as y}from"./chunk-K3G6FMDF.js";import"./chunk-JM3LERUP.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-SP6QPE3M.js";import{a as M,c as ge,d as he,f as xe}from"./chunk-6F6NSBIF.js";import{$ as R,$a as U,Ab as a,Bb as C,Cb as B,Db as Y,Eb as I,Fb as L,Gb as T,Ha as w,Ia as c,Ja as p,Lb as G,Q as F,Rb as Q,Sb as K,Ub as $,Vc as S,Wa as f,Xc as v,Ya as m,_c as j,aa as A,fb as i,gb as r,ha as x,hb as l,ia as N,ib as k,ic as J,jb as E,kc as D,lb as z,lc as X,ob as u,oc as Z,pa as b,qa as _,qb as g,sc as ee,wb as W,xb as q,yb as H,zb as P}from"./chunk-6DRNAUKE.js";import"./chunk-GRMIXZTT.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{g as c}from"./chunk-
|
|
1
|
+
import{g as c}from"./chunk-7QECCYLR.js";import{b as a}from"./chunk-K3G6FMDF.js";import{$ as s,ca as o}from"./chunk-6DRNAUKE.js";var d=(()=>{let e=class e{constructor(i,t){this.toastr=i,this.authService=t}canActivate(i,t){let n=JSON.parse(window.localStorage.getItem("user")),l=new Date;if(n!=null){let p=new Date(n.Token.expiredAt);return l<p?!0:(this.onTokenExpired(),!1)}else return this.onTokenExpired(),!1}onTokenExpired(){this.toastr.error("Your session has expired. Please login again.","Session Expired").onShown.subscribe(()=>this.authService.logout())}};e.\u0275fac=function(t){return new(t||e)(o(a),o(c))},e.\u0275prov=s({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();export{d as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ot}from"./chunk-G5LCLRIW.js";import{b as rt}from"./chunk-N4S3Q3EC.js";import{a as Q,b as X,d as Y,e as Z}from"./chunk-AL67KXJV.js";import{g as J}from"./chunk-
|
|
1
|
+
import{c as ot}from"./chunk-G5LCLRIW.js";import{b as rt}from"./chunk-N4S3Q3EC.js";import{a as Q,b as X,d as Y,e as Z}from"./chunk-AL67KXJV.js";import{g as J}from"./chunk-7QECCYLR.js";import{b as H,e as A}from"./chunk-K3G6FMDF.js";import"./chunk-JM3LERUP.js";import{C as it,D as nt,q as tt,r as et}from"./chunk-ZKBLXGXT.js";import"./chunk-6B64VOO7.js";import{h as z,k as G,u as $}from"./chunk-SP6QPE3M.js";import{b as v,c as q}from"./chunk-6F6NSBIF.js";import{Ab as l,Bb as u,Cb as j,Eb as y,Fb as L,Gb as M,Ha as P,Ia as c,Ja as h,Q as T,Rb as V,Sb as W,Wa as g,X as x,Ya as m,_c as C,aa as p,fb as r,gb as a,ha as E,hb as D,ia as d,ib as U,jb as F,kc as k,lb as K,lc as R,ob as _,oc as B,pa as O,q as I,qa as w,qb as f,sc as S}from"./chunk-6DRNAUKE.js";import"./chunk-GRMIXZTT.js";function ct(n,e){if(n&1&&(r(0,"span",13),D(1,"img",14),a(),r(2,"span"),l(3),a()),n&2){let s=e.item;c(),m("src",s.Img,P)("alt",s.Name),c(2),j(" ",s.Name," ")}}function mt(n,e){if(n&1){let s=K();U(0),r(1,"ng-select",16),M("ngModelChange",function(i){O(s);let o=f().$implicit;return L(o.ProductSKU,i)||(o.ProductSKU=i),w(i)}),a(),F()}if(n&2){let s=e.ngIf,t=f().$implicit;c(),y("ngModel",t.ProductSKU),m("items",s)}}function pt(n,e){if(n&1&&(r(0,"tr")(1,"td"),l(2),a(),r(3,"td"),l(4),a(),r(5,"td"),l(6),a(),r(7,"td"),g(8,mt,2,2,"ng-container",15),V(9,"async"),a()()),n&2){let s=e.$implicit,t=f();c(2),u(s.Name),c(2),u(s.Service),c(2),u(s.TypeString),c(2),m("ngIf",W(9,4,t.logisticOptions$))}}var st=(()=>{let e=class e{constructor(t,i,o){this.http=t,this.toastr=i,this.authService=o,this.filter={ChannelID:""},this.logisticServiceOptions=[],this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let t=[v.WooCommerce,v.Lazada,v.Shopify];this.channelOptions=this.channelOptions.map(i=>(t.forEach(o=>{i.TypeID===o&&(i.disabled=!0)}),i))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(t=>{this.filter=t.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(T(1),x(t=>{this.logisticServiceOptions=t}))}Validate(){for(let t of this.logisticServices)this.datasource.find(o=>o.ProductSKU==t.ProductSKU&&o.Name==t.Name)===void 0&&(t.IsChange=!0);return Promise.resolve(this.logisticServices)}submitLogistics(){this.Validate().then(t=>{this.http.post("/api/Logistic/Submit",this.logisticServices).subscribe(i=>{this.toastr.success("Success","Update Complete!",{timeOut:5e3,enableHtml:!0}),this.getLogisticService()})})}getLogisticService(){this.datasource=[],this.http.post("/api/Logistic/Get",this.filter).pipe(I(t=>t.map(i=>(i.ProductSKU=q.IsEmpty(i.ProductSKU)?null:i.ProductSKU,i)))).subscribe(t=>{this.iniTitle(),this.logisticServices=t,this.datasource=structuredClone(t)})}iniTitle(){let t=this.channelOptions.find(i=>i.ID==this.filter.ChannelID);this.channelName=t?t.Name:null}};e.\u0275fac=function(i){return new(i||e)(h(A),h(H),h(J))},e.\u0275cmp=E({type:e,selectors:[["app-logistic"]],decls:28,vars:6,consts:[["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[4,"ngIf"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(i,o){i&1&&(r(0,"mainpanel",0),_("onSubmit",function(){return o.getLogisticService()}),r(1,"filters")(2,"div")(3,"label",1),l(4,"Select a Channel"),a(),r(5,"ng-select",2),M("ngModelChange",function(b){return L(o.filter.ChannelID,b)||(o.filter.ChannelID=b),b}),g(6,ct,4,3,"ng-template",3),a()()(),r(7,"actions")(8,"a",4),_("click",function(){return o.submitLogistics()}),l(9,"Submit"),a()(),r(10,"content")(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"table",9)(16,"thead",10)(17,"tr",11)(18,"th"),l(19,"Logistic"),a(),r(20,"th"),l(21,"Service"),a(),r(22,"th"),l(23,"Type"),a(),r(24,"th"),l(25,"Logistic Service"),a()()(),r(26,"tbody"),g(27,pt,10,6,"tr",12),a()()()()()()()()),i&2&&(m("headerTitle","Logistic Courier - "+o.channelName)("hideSearchDropdown",!1),c(5),m("clearable",!1)("items",o.channelOptions),y("ngModel",o.filter.ChannelID),c(22),m("ngForOf",o.logisticServices))},dependencies:[k,R,z,G,it,Y,Q,X,tt,B]});let n=e;return n})();var dt=[{path:"",component:st}],lt=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=d({type:e}),e.\u0275inj=p({imports:[S,C.forChild(dt)]});let n=e;return n})();var kt=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=d({type:e}),e.\u0275inj=p({imports:[S,C,lt,$,nt,Z,rt,ot,et]});let n=e;return n})();export{kt as LogisticModule};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as N,b as De,c as ke,d as re,e as se}from"./chunk-JQO7P26T.js";import{a as Ve}from"./chunk-WQ7LUTQ2.js";import"./chunk-BMZAGAK3.js";import{a as Fe,b as Ne}from"./chunk-N4S3Q3EC.js";import"./chunk-662E5VTA.js";import{a as le}from"./chunk-KBYAFLE5.js";import{a as oe}from"./chunk-U5YOE633.js";import"./chunk-INNTQ5YN.js";import{a as Me,b as Ee}from"./chunk-SRYGE2HW.js";import{a as Pe}from"./chunk-MYMGWQRE.js";import"./chunk-DT3B54LD.js";import{a as Se,b as ve,d as ye,e as be}from"./chunk-AL67KXJV.js";import{a as ce}from"./chunk-OKEA4W2I.js";import{g as te}from"./chunk-5DJHCNOC.js";import{b as K,e as Y}from"./chunk-K3G6FMDF.js";import"./chunk-JM3LERUP.js";import{B as we,C as ae,D as Te,q as ne,r as Ie,u as ie}from"./chunk-ZKBLXGXT.js";import"./chunk-6B64VOO7.js";import{b as fe,c as Z,h as q,k as X,m as ee,u as xe}from"./chunk-SP6QPE3M.js";import{c as F}from"./chunk-6F6NSBIF.js";import{Ab as m,B as O,Bb as D,Cb as w,Db as _e,Eb as T,Fb as M,Gb as E,Ha as R,Ia as r,Ja as y,Kb as $,Rb as g,Sb as f,Tb as j,Ub as A,Wa as u,Wc as Ce,X as B,Ya as c,_c as J,aa as W,fb as l,gb as s,ha as k,hb as x,ia as U,ib as b,ic as ue,jb as I,kc as ge,lb as v,lc as z,ob as S,oc as Q,pa as d,pc as he,q as me,qa as _,qb as p,rc as H,sc as G,tb as de,zb as L}from"./chunk-6DRNAUKE.js";import"./chunk-GRMIXZTT.js";var Re=(()=>{let o=class o{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}};o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=k({type:o,selectors:[["app-inventory"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(e,a){e&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),x(3,"nav-tab",2),s()()(),x(4,"router-outlet")),e&2&&(r(3),c("Tabs",a.inventoryTabs))},dependencies:[Ce,Me]});let i=o;return i})();function Ze(i,o){if(i&1){let t=v();l(0,"button",21),S("click",function(){d(t);let e=p().ngIf,a=p(2);return _(a.onUpdateItems(e))}),x(1,"i",22),m(2," Update "),s()}}function qe(i,o){if(i&1&&(l(0,"actions")(1,"div",19),u(2,Ze,3,0,"button",20),s()()),i&2){let t=o.ngIf,n=p(2);r(2),c("ngIf",n.productService.hasSelectionVariant(t))}}function Xe(i,o){if(i&1){let t=v();l(0,"app-table",23),S("onToggle",function(e){d(t);let a=p(2);return _(a.onShowDifferenceStock(e))})("onSubmit",function(e){let a=d(t).ngIf,h=p(2);return _(h.updateStockByVariant(e,a))}),s()}if(i&2){let t=o.ngIf,n=p(2);c("data",t)("channel",n.channelOptions)("showProductToggle",!0)("filter",n.searchFilter)}}function et(i,o){if(i&1){let t=v();l(0,"span",24),S("click",function(){d(t);let e=p(2);return _(e.getRowCount())}),l(1,"i",25),m(2,"?"),s()()}}function tt(i,o){if(i&1&&(l(0,"span"),m(1),g(2,"number"),s()),i&2){let t=o.ngIf;r(),D(f(2,1,t))}}function nt(i,o){if(i&1){let t=v();l(0,"a",26),S("click",function(){d(t);let e=p(2);return _(e.nextPage())}),x(1,"i",27),m(2," Next"),s()}}function it(i,o){if(i&1){let t=v();l(0,"a",28),S("click",function(){d(t);let e=p(2);return _(e.getAllData())}),x(1,"i",29),m(2," Last"),s()}}function at(i,o){if(i&1){let t=v();l(0,"mainpanel",1),S("onSubmit",function(e){d(t);let a=p();return _(a.onSearch(e))}),u(1,qe,3,1,"actions",2),g(2,"async"),l(3,"filters")(4,"div")(5,"label",3),m(6,"PageNumber"),s(),l(7,"input",4),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.PageNumber,e)||(a.searchFilter.PageNumber=e),_(e)}),s()(),l(8,"div",5)(9,"label",6),m(10,"Page Size"),s(),l(11,"input",7),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.RowCount,e)||(a.searchFilter.RowCount=e),_(e)}),s()()(),l(12,"content")(13,"div",8)(14,"div",9)(15,"div",10),u(16,Xe,1,4,"app-table",11),g(17,"async"),b(18),l(19,"div",12)(20,"div",13)(21,"div",14),m(22),g(23,"async"),g(24,"number"),u(25,et,3,0,"span",15)(26,tt,3,3,"span",2),g(27,"async"),m(28),s()(),l(29,"div",16),u(30,nt,3,0,"a",17)(31,it,3,0,"a",18),s()(),I(),s()()()()()}if(i&2){let t,n=p();c("pageData",n.pageData)("hideSearchBox",!1)("textButton","Search"),r(),c("ngIf",f(2,13,n.paginationService.data$)),r(6),T("ngModel",n.searchFilter.PageNumber),r(4),T("ngModel",n.searchFilter.RowCount),r(5),c("ngIf",f(17,15,n.paginationService.data$)),r(6),w(" Showing 1 - ",f(24,19,(t=f(23,17,n.paginationService.data$))==null?null:t.length)," of "),r(3),c("ngIf",n.paginationService.hideCount),r(),c("ngIf",f(27,21,!n.paginationService.hideCount&&n.allDataCount$)),r(2),w(" records ~ ",n.paginationService.footerPageNumber," Page "),r(2),c("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage),r(),c("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage)}}var Be=(()=>{let o=class o{constructor(n,e,a,h,C,P){this.http=n,this.toastr=e,this.dialog=a,this.paginationService=h,this.productService=C,this.authService=P,this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(B(n=>{n.Filter={PageNumber:n.Filter.PageNumber,filterModel:N.ALL,RowCount:n.Filter.PageSize,HiddenIPOSInventory:n.Filter.HiddenIPOSInventory},this.searchFilter=n.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onSearch(n){this.searchFilter.text=n,this.paginationService.reloadPagination(this.searchFilter)}updateStock(n,e){let a=this.productService.selectedVariantProduct(n);if(a.length>0){let C=a.map(V=>({ID:V.ID,Code:V.Code,Inventory:V.Inventory}));var h=e.filter(V=>V.selected).map(V=>V.ID);let P={ListChannelID:h,List:C};this.http.post("/api/Inventory/UpdateChannel",P).subscribe(V=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+P.List.length+" variants in "+P.ListChannelID.length+" channels","Success")})}}updateStockByVariant(n,e){let a={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:parseFloat(n.Inventory),VariantID:n.ID,SKU:n.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(h=>{let C=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success("Successfully updated "+n.ItemName+"("+n.VarName+") inventory in "+C.Name+" to "+a.NewQuantity,"Success")})}onShowDifferenceStock(n){n?this.searchFilter.filterModel=N.DIFFERENCE:this.searchFilter.filterModel=N.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(n){let e=this.productService.selectedVariantProduct(n);this.dialog.open(Ve,{data:{selectedItems:e,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"600px"}).afterClosed().pipe(O(a=>F.IsNotEmpty(a))).subscribe(a=>{this.updateStock(n,a)})}getRowCount(){this.paginationService.hideCount=!1;let n={text:this.searchFilter.text};this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,n)}nextPage(){this.paginationService.onNextPage(this.searchFilter)}getAllData(){this.http.post(`/API/${this.allDataCountEndpoint}`,{}).subscribe({next:n=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,n)}})}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(e){return new(e||o)(y(Y),y(K),y(ie),y(le),y(oe),y(te))},o.\u0275cmp=k({type:o,selectors:[["app-multi-channel-comparison"]],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"onSubmit","pageData","hideSearchBox","textButton"],[4,"ngIf"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"mt-5"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary border-start-0","title","Load all products",3,"click",4,"ngIf"],[1,"d-flex"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","filter"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(e,a){e&1&&(u(0,at,32,23,"mainpanel",0),g(1,"async")),e&2&&c("ngIf",f(1,1,a.loader$))},dependencies:[z,Z,ee,q,X,ae,re,ne,Q,H],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let i=o;return i})();var ot=i=>({"text-decoration-line-through":i}),lt=i=>({"ms-10":i}),rt=i=>({"bg-gradient-warning":i});function st(i,o){if(i&1){let t=v();l(0,"button",43),S("click",function(){d(t);let e=p().ngIf,a=p(2);return _(a.updateStock(e))}),x(1,"i",44),m(2," Update"),s()}}function pt(i,o){if(i&1&&(l(0,"div"),u(1,st,3,0,"button",42),s()),i&2){let t=o.ngIf,n=p(2);r(),c("ngIf",n.productService.hasSelectionVariant(t))}}function ct(i,o){if(i&1&&(l(0,"span",45),x(1,"img",46),s(),m(2)),i&2){let t=o.item;r(),c("src",t==null?null:t.Img,R),r(),w(" ",t.Name," ")}}function mt(i,o){i&1&&(l(0,"div",47)(1,"span"),m(2," showing only different stock, please press next to populate more data "),s()())}function dt(i,o){if(i&1){let t=v();l(0,"th")(1,"input",48),E("ngModelChange",function(e){d(t);let a=p(2);return M(a.checkboxState,e)||(a.checkboxState=e),_(e)}),S("ngModelChange",function(){let e=d(t).ngIf,a=p(2);return _(a.onCheckboxStateChange(e))}),s()()}if(i&2){let t=p(2);r(),T("ngModel",t.checkboxState)}}function _t(i,o){i&1&&(b(0),l(1,"th",49),m(2," Reserved "),s(),I())}function ut(i,o){if(i&1){let t=v();b(0),l(1,"input",62),E("ngModelChange",function(e){d(t);let a=p(3).$implicit;return M(a.selected,e)||(a.selected=e),_(e)}),S("ngModelChange",function(){d(t);let e=p(3).$implicit,a=p(2);return _(a.onCheckboxStateProduct(e))}),s(),I()}if(i&2){let t=p(3).$implicit;r(),T("ngModel",t.selected)}}function gt(i,o){if(i&1){let t=v();b(0),l(1,"img",63),S("click",function(e){d(t);let a=p(3).$implicit,h=p(2);return _(h.onZoomImage(e,a==null?null:a.ImageUrl))}),s(),I()}if(i&2){let t=p(3).$implicit;r(),de("src",t==null?null:t.ThumbnailUrl,R)}}function ht(i,o){i&1&&x(0,"img",64)}function Ct(i,o){if(i&1&&(b(0),x(1,"br"),l(2,"div",65),x(3,"i",66),l(4,"small"),m(5),s()(),I()),i&2){let t=p(3).$implicit;r(5),w("(",t==null?null:t.Category,")")}}function ft(i,o){if(i&1&&(b(0),l(1,"td",59)(2,"div",17),u(3,ut,2,1,"ng-container",7),l(4,"div",53),u(5,gt,2,1,"ng-container",55)(6,ht,1,0,"ng-template",null,2,A),s()()(),l(8,"td",60)(9,"span",61),m(10),s(),u(11,Ct,6,1,"ng-container",7),s(),I()),i&2){let t=L(7),n=p(2).$implicit,e=p(2);r(),c("rowSpan",n==null?null:n.Variants.length),r(2),c("ngIf",n.Variants.length>1),r(),c("ngClass",$(8,lt,n.Variants.length<=1)),r(),c("ngIf",n==null?null:n.ThumbnailUrl)("ngIfElse",t),r(3),c("rowSpan",n==null?null:n.Variants.length),r(2),D(n==null?null:n.Name),r(),c("ngIf",n.CategoryID!==null&&n.CategoryID!=e.guidEmpty)}}function xt(i,o){if(i&1){let t=v();b(0),l(1,"input",48),E("ngModelChange",function(e){d(t);let a=p(2).$implicit;return M(a.selected,e)||(a.selected=e),_(e)}),s(),I()}if(i&2){let t=p(2).$implicit;r(),T("ngModel",t.selected)}}function St(i,o){if(i&1&&(b(0),u(1,xt,2,1,"ng-container",7),I()),i&2){let t=p().$implicit;r(),c("ngIf",(t==null?null:t.Inventory)<=1e5)}}function vt(i,o){if(i&1){let t=v();l(0,"input",48),E("ngModelChange",function(e){d(t);let a=p(2).$implicit;return M(a.selected,e)||(a.selected=e),_(e)}),s()}if(i&2){let t=p(2).$implicit;T("ngModel",t.selected)}}function yt(i,o){if(i&1&&u(0,vt,1,1,"input",67),i&2){let t=p().$implicit;c("ngIf",(t==null?null:t.Inventory)>=0)}}function bt(i,o){i&1&&(l(0,"div",68),m(1,"Not Found"),s())}function It(i,o){if(i&1&&(l(0,"div")(1,"span",69),m(2),g(3,"number"),s(),m(4," => "),l(5,"span",70),m(6),g(7,"number"),s()()),i&2){let t=p().$implicit;r(2),w(" ",f(3,2,t==null||t.I==null?null:t.I.Available),""),r(4),D(f(7,4,t==null?null:t.Inventory))}}function wt(i,o){if(i&1&&(l(0,"div"),m(1),g(2,"number"),s()),i&2){let t=p().$implicit;r(),w(" ",f(2,1,t==null?null:t.Inventory)," ")}}function Tt(i,o){if(i&1&&(b(0),l(1,"div",71)(2,"a",72),x(3,"i",73),s()(),I()),i&2){let t=p().$implicit,n=p(3);r(2),c("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),R)}}function Mt(i,o){if(i&1){let t=v();l(0,"td",74)(1,"div",52)(2,"div")(3,"span",75),S("click",function(){d(t);let e=p().$implicit,a=p(),h=a.$implicit,C=a.ngForOf,P=p(2);return _(P.openTableDialog(h,e,C))}),m(4),g(5,"number"),s()(),l(6,"div",71)(7,"a",72),x(8,"i",73),s()(),l(9,"div",71)(10,"span",76),S("click",function(){d(t);let e=p().$implicit,a=p(3);return _(a.refreshInventory(e==null||e.Channel[0]==null?null:e.Channel[0].ChannelItemID,e==null||e.Channel[0]==null?null:e.Channel[0].ChannelVariationID,e==null||e.Channel[0]==null?null:e.Channel[0].ChannelID,e==null?null:e.ID))}),x(11,"i",77),s()()()()}if(i&2){let t=p().$implicit;c("ngClass",$(5,rt,(t==null?null:t.Inventory)!=(t==null||t.Channel[0]==null?null:t.Channel[0].Inventory))),r(4),w(" ",f(5,3,t==null||t.Channel[0]==null?null:t.Channel[0].Inventory)," "),r(3),c("href",t==null||t.Channel[0]==null?null:t.Channel[0].Url,R)}}function Et(i,o){if(i&1&&(b(0),l(1,"span",79),m(2),g(3,"number"),s(),I()),i&2){let t=p(2).$implicit;r(2),w(" (",f(3,1,t==null||t.Channel[0]==null?null:t.Channel[0].InventoryReserved),") ")}}function Pt(i,o){i&1&&m(0," - ")}function Vt(i,o){if(i&1&&(b(0),l(1,"td",78),u(2,Et,4,3,"ng-container",55)(3,Pt,1,0,"ng-template",null,3,A),s(),I()),i&2){let t=L(4),n=p().$implicit;r(2),c("ngIf",n==null||n.Channel[0]==null?null:n.Channel[0].InventoryReserved)("ngIfElse",t)}}function Dt(i,o){i&1&&(b(0),m(1," - "),I())}function Ft(i,o){if(i&1&&(l(0,"span",80),g(1,"date"),m(2),g(3,"date"),s()),i&2){let t=p().$implicit;c("matTooltip",j(1,2,t==null||t.Channel[0]==null?null:t.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),r(2),w(" ",j(3,5,t==null||t.Channel[0]==null?null:t.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function Nt(i,o){if(i&1&&(l(0,"tr"),u(1,ft,12,10,"ng-container",7),l(2,"td",50),m(3),s(),l(4,"td",51)(5,"div",52)(6,"span",53),m(7),s()()(),l(8,"td",54),u(9,St,2,1,"ng-container",55)(10,yt,1,1,"ng-template",null,0,A),s(),l(12,"td")(13,"div",52),u(14,bt,2,0,"div",56)(15,It,8,6,"div",7)(16,wt,3,3,"div",7)(17,Tt,4,1,"ng-container",7),s()(),u(18,Mt,12,7,"td",57)(19,Vt,5,2,"ng-container",7),l(20,"td",58),u(21,Dt,2,0,"ng-container",55)(22,Ft,4,8,"ng-template",null,1,A),s()()),i&2){let t=o.$implicit,n=o.index,e=L(11),a=L(23),h=p(3);r(),c("ngIf",n==0),r(2),D(t==null?null:t.Model),r(),c("matTooltip",t.isDiscontinued?h.discontinuedVariantMsg:""),r(2),c("ngClass",$(15,ot,t.isDiscontinued)),r(),D(t==null?null:t.Code),r(2),c("ngIf",(t==null?null:t.Channel[0].TypeID)==1)("ngIfElse",e),r(5),c("ngIf",(t==null?null:t.I)==null),r(),c("ngIf",(t==null?null:t.I)!=null&&(t==null?null:t.Inventory)!=(t==null||t.I==null?null:t.I.Available)),r(),c("ngIf",(t==null?null:t.I)!=null&&(t==null?null:t.Inventory)==(t==null||t.I==null?null:t.I.Available)),r(),c("ngIf",(t==null?null:t.I)!=null),r(),c("ngIf",t==null?null:t.Channel),r(),c("ngIf",h.isShowReservedColumn),r(2),c("ngIf",(t==null||t.Channel[0]==null?null:t.Channel[0].LastInventorySync)==h.minDate)("ngIfElse",a)}}function kt(i,o){if(i&1&&(l(0,"tbody"),u(1,Nt,24,17,"tr",36),s()),i&2){let t=o.$implicit;r(),c("ngForOf",t.Variants)}}function Rt(i,o){if(i&1){let t=v();l(0,"span",81),S("click",function(){d(t);let e=p(2);return _(e.getRowCount())}),l(1,"i",82),m(2,"?"),s()()}}function Bt(i,o){if(i&1&&(l(0,"span"),m(1),g(2,"number"),s()),i&2){let t=o.ngIf;r(),D(f(2,1,t==null?null:t.Total))}}function Lt(i,o){if(i&1){let t=v();l(0,"a",86),S("click",function(){d(t);let e=p(3);return _(e.onNextPage())}),x(1,"i",87),m(2," Next"),s()}}function At(i,o){if(i&1){let t=v();l(0,"a",88),S("click",function(){d(t);let e=p(3);return _(e.onLastPage())}),x(1,"i",89),m(2," Last"),s()}}function Ot(i,o){if(i&1&&(l(0,"div",83),u(1,Lt,3,0,"a",84)(2,At,3,0,"a",85),s()),i&2){let t=p(2);r(),c("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),r(),c("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function Wt(i,o){if(i&1){let t=v();l(0,"mainpanel",5),S("onSubmit",function(e){d(t);let a=p();return _(a.onSearch(e))}),l(1,"actions")(2,"div",6),u(3,pt,2,1,"div",7),g(4,"async"),s()(),l(5,"filters")(6,"div")(7,"label",8),m(8,"Channel"),s(),l(9,"ng-select",9),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.ChannelID,e)||(a.searchFilter.ChannelID=e),_(e)}),u(10,ct,3,2,"ng-template",10),s()(),l(11,"div",11)(12,"label",12),m(13,"PageNumber"),s(),l(14,"input",13),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.PageNumber,e)||(a.searchFilter.PageNumber=e),_(e)}),s()(),l(15,"div",11)(16,"label",14),m(17,"Page Size"),s(),l(18,"input",15),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.RowCount,e)||(a.searchFilter.RowCount=e),_(e)}),s()(),l(19,"div",11)(20,"label",16),m(21,"Quantity From - To"),s(),l(22,"div",17)(23,"input",18),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.QuantityFrom,e)||(a.searchFilter.QuantityFrom=e),_(e)}),s(),m(24," - "),l(25,"input",19),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.QuantityTo,e)||(a.searchFilter.QuantityTo=e),_(e)}),s()()()(),l(26,"content")(27,"div",20)(28,"div",21)(29,"div",22),u(30,mt,3,0,"div",23),l(31,"table",24)(32,"thead",25)(33,"tr")(34,"th",26),m(35,"Product "),x(36,"br"),l(37,"mat-slide-toggle",27),S("toggleChange",function(){d(t);let e=p();return e.showDifferenceStock=!e.showDifferenceStock,_(e.onShowDifferenceStock())}),l(38,"small",16),m(39,"FILTER DIFFERENT INVENTORY"),s()()(),l(40,"th",28),m(41,"Variant"),s(),l(42,"th",29),m(43,"SKU"),s(),u(44,dt,2,1,"th",7),g(45,"async"),l(46,"th",30),m(47,"POS"),s(),l(48,"th",31)(49,"div",32),S("click",function(){d(t);let e=p();return _(e.openModalFilter())}),x(50,"img",33),l(51,"span",34),m(52),g(53,"stringLimit"),s()()(),u(54,_t,3,0,"ng-container",7),l(55,"th",35),m(56,"Last Sync"),s()()(),u(57,kt,2,1,"tbody",36),g(58,"async"),s(),l(59,"div",37)(60,"div",38)(61,"div",39),m(62),g(63,"async"),g(64,"number"),u(65,Rt,3,0,"span",40)(66,Bt,3,3,"span",7),g(67,"async"),m(68),s()(),u(69,Ot,3,2,"div",41),g(70,"async"),s()()()()()()}if(i&2){let t,n,e=p();c("headerTitle","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1),r(3),c("ngIf",f(4,24,e.paginationService.data$)),r(6),c("clearable",!1)("items",e.channelOptions),T("ngModel",e.searchFilter.ChannelID),r(5),T("ngModel",e.searchFilter.PageNumber),r(4),T("ngModel",e.searchFilter.RowCount),r(5),T("ngModel",e.searchFilter.QuantityFrom),r(2),T("ngModel",e.searchFilter.QuantityTo),r(5),c("ngIf",(e.searchFilter==null?null:e.searchFilter.filterModel)==3),r(14),c("ngIf",f(45,26,e.paginationService.data$)),r(5),c("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?e.selectedChannel==null?null:e.selectedChannel.Name:""),r(),c("src",e.selectedChannel==null?null:e.selectedChannel.Img,R),r(2),_e(" ",j(53,28,e.selectedChannel==null?null:e.selectedChannel.Name,13),"",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?"...":""," "),r(2),c("ngIf",e.isShowReservedColumn),r(3),c("ngForOf",f(58,31,e.products$)),r(5),w(" Showing 1 - ",f(64,35,(t=f(63,33,e.paginationService.data$))==null?null:t.length)," of "),r(3),c("ngIf",e.paginationService.hideCount),r(),c("ngIf",f(67,37,!e.paginationService.hideCount&&e.rowCount$)),r(2),w(" records ~ ",e.paginationService.footerPageNumber," Page "),r(),c("ngIf",((n=f(70,39,e.paginationService.data$))==null?null:n.length)>0)}}var Le=(()=>{let o=class o{constructor(n,e,a,h,C,P,V,Oe,We){this.http=n,this.toastr=e,this.dialog=a,this.paginationService=h,this.productService=C,this.authService=P,this.biggerPictureService=V,this.inventoryService=Oe,this.mainPanelService=We,this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="/api/InventoryLoader/Load",this.rowCountApi="/api/Inventory/GetInventoryByChannelRowCount",this.minDate=F.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=F.GuidEMpty,this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.products$=this.paginationService.data$.pipe(me(n=>(n=n.map(e=>(e.Variants&&(e.Variants=e.Variants.map(a=>(a.isDiscontinued=e.Discontinued=="Yes",a))),e)),n)),B(n=>{this.checkShowReservedColumn(n)}))}checkShowReservedColumn(n){let e=0,a;n.forEach(h=>{a=h.Variants.find(C=>F.IsNotEmpty(C?.Channel[0]?.InventoryReserved)),a&&(e+=1)}),this.isShowReservedColumn=e>0}initPageLoader(){this.paginationService.fetchDataEndpoint="Inventory/GetSingleChannelComparison",this.loader$=this.http.post(this.loaderApi,{}).pipe(B(n=>{this.searchFilter={RowCount:n.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:n.Filter.ChannelID},this.initSelectedChannel(),this.paginationService.reloadPagination(this.searchFilter),n.Filter.IsMarketplaceAppActive||this.toastr.warning(`Automatic inventory sync disabled.
|
|
1
|
+
import{a as N,b as De,c as ke,d as re,e as se}from"./chunk-WVXTWIP3.js";import{a as Ve}from"./chunk-WQ7LUTQ2.js";import"./chunk-BMZAGAK3.js";import{a as Fe,b as Ne}from"./chunk-N4S3Q3EC.js";import"./chunk-662E5VTA.js";import{a as le}from"./chunk-KBYAFLE5.js";import{a as oe}from"./chunk-U5YOE633.js";import"./chunk-INNTQ5YN.js";import{a as Me,b as Ee}from"./chunk-SRYGE2HW.js";import{a as Pe}from"./chunk-MYMGWQRE.js";import"./chunk-DT3B54LD.js";import{a as Se,b as ve,d as ye,e as be}from"./chunk-AL67KXJV.js";import{a as ce}from"./chunk-T4Y427M7.js";import{g as te}from"./chunk-7QECCYLR.js";import{b as K,e as Y}from"./chunk-K3G6FMDF.js";import"./chunk-JM3LERUP.js";import{B as we,C as ae,D as Te,q as ne,r as Ie,u as ie}from"./chunk-ZKBLXGXT.js";import"./chunk-6B64VOO7.js";import{b as fe,c as Z,h as q,k as X,m as ee,u as xe}from"./chunk-SP6QPE3M.js";import{c as F}from"./chunk-6F6NSBIF.js";import{Ab as m,B as O,Bb as D,Cb as w,Db as _e,Eb as T,Fb as M,Gb as E,Ha as R,Ia as r,Ja as y,Kb as $,Rb as g,Sb as f,Tb as j,Ub as A,Wa as u,Wc as Ce,X as B,Ya as c,_c as J,aa as W,fb as l,gb as s,ha as k,hb as x,ia as U,ib as b,ic as ue,jb as I,kc as ge,lb as v,lc as z,ob as S,oc as Q,pa as d,pc as he,q as me,qa as _,qb as p,rc as H,sc as G,tb as de,zb as L}from"./chunk-6DRNAUKE.js";import"./chunk-GRMIXZTT.js";var Re=(()=>{let o=class o{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}};o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=k({type:o,selectors:[["app-inventory"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(e,a){e&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),x(3,"nav-tab",2),s()()(),x(4,"router-outlet")),e&2&&(r(3),c("Tabs",a.inventoryTabs))},dependencies:[Ce,Me]});let i=o;return i})();function Ze(i,o){if(i&1){let t=v();l(0,"button",21),S("click",function(){d(t);let e=p().ngIf,a=p(2);return _(a.onUpdateItems(e))}),x(1,"i",22),m(2," Update "),s()}}function qe(i,o){if(i&1&&(l(0,"actions")(1,"div",19),u(2,Ze,3,0,"button",20),s()()),i&2){let t=o.ngIf,n=p(2);r(2),c("ngIf",n.productService.hasSelectionVariant(t))}}function Xe(i,o){if(i&1){let t=v();l(0,"app-table",23),S("onToggle",function(e){d(t);let a=p(2);return _(a.onShowDifferenceStock(e))})("onSubmit",function(e){let a=d(t).ngIf,h=p(2);return _(h.updateStockByVariant(e,a))}),s()}if(i&2){let t=o.ngIf,n=p(2);c("data",t)("channel",n.channelOptions)("showProductToggle",!0)("filter",n.searchFilter)}}function et(i,o){if(i&1){let t=v();l(0,"span",24),S("click",function(){d(t);let e=p(2);return _(e.getRowCount())}),l(1,"i",25),m(2,"?"),s()()}}function tt(i,o){if(i&1&&(l(0,"span"),m(1),g(2,"number"),s()),i&2){let t=o.ngIf;r(),D(f(2,1,t))}}function nt(i,o){if(i&1){let t=v();l(0,"a",26),S("click",function(){d(t);let e=p(2);return _(e.nextPage())}),x(1,"i",27),m(2," Next"),s()}}function it(i,o){if(i&1){let t=v();l(0,"a",28),S("click",function(){d(t);let e=p(2);return _(e.getAllData())}),x(1,"i",29),m(2," Last"),s()}}function at(i,o){if(i&1){let t=v();l(0,"mainpanel",1),S("onSubmit",function(e){d(t);let a=p();return _(a.onSearch(e))}),u(1,qe,3,1,"actions",2),g(2,"async"),l(3,"filters")(4,"div")(5,"label",3),m(6,"PageNumber"),s(),l(7,"input",4),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.PageNumber,e)||(a.searchFilter.PageNumber=e),_(e)}),s()(),l(8,"div",5)(9,"label",6),m(10,"Page Size"),s(),l(11,"input",7),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.RowCount,e)||(a.searchFilter.RowCount=e),_(e)}),s()()(),l(12,"content")(13,"div",8)(14,"div",9)(15,"div",10),u(16,Xe,1,4,"app-table",11),g(17,"async"),b(18),l(19,"div",12)(20,"div",13)(21,"div",14),m(22),g(23,"async"),g(24,"number"),u(25,et,3,0,"span",15)(26,tt,3,3,"span",2),g(27,"async"),m(28),s()(),l(29,"div",16),u(30,nt,3,0,"a",17)(31,it,3,0,"a",18),s()(),I(),s()()()()()}if(i&2){let t,n=p();c("pageData",n.pageData)("hideSearchBox",!1)("textButton","Search"),r(),c("ngIf",f(2,13,n.paginationService.data$)),r(6),T("ngModel",n.searchFilter.PageNumber),r(4),T("ngModel",n.searchFilter.RowCount),r(5),c("ngIf",f(17,15,n.paginationService.data$)),r(6),w(" Showing 1 - ",f(24,19,(t=f(23,17,n.paginationService.data$))==null?null:t.length)," of "),r(3),c("ngIf",n.paginationService.hideCount),r(),c("ngIf",f(27,21,!n.paginationService.hideCount&&n.allDataCount$)),r(2),w(" records ~ ",n.paginationService.footerPageNumber," Page "),r(2),c("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage),r(),c("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage)}}var Be=(()=>{let o=class o{constructor(n,e,a,h,C,P){this.http=n,this.toastr=e,this.dialog=a,this.paginationService=h,this.productService=C,this.authService=P,this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(B(n=>{n.Filter={PageNumber:n.Filter.PageNumber,filterModel:N.ALL,RowCount:n.Filter.PageSize,HiddenIPOSInventory:n.Filter.HiddenIPOSInventory},this.searchFilter=n.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onSearch(n){this.searchFilter.text=n,this.paginationService.reloadPagination(this.searchFilter)}updateStock(n,e){let a=this.productService.selectedVariantProduct(n);if(a.length>0){let C=a.map(V=>({ID:V.ID,Code:V.Code,Inventory:V.Inventory}));var h=e.filter(V=>V.selected).map(V=>V.ID);let P={ListChannelID:h,List:C};this.http.post("/api/Inventory/UpdateChannel",P).subscribe(V=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+P.List.length+" variants in "+P.ListChannelID.length+" channels","Success")})}}updateStockByVariant(n,e){let a={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:parseFloat(n.Inventory),VariantID:n.ID,SKU:n.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(h=>{let C=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success("Successfully updated "+n.ItemName+"("+n.VarName+") inventory in "+C.Name+" to "+a.NewQuantity,"Success")})}onShowDifferenceStock(n){n?this.searchFilter.filterModel=N.DIFFERENCE:this.searchFilter.filterModel=N.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(n){let e=this.productService.selectedVariantProduct(n);this.dialog.open(Ve,{data:{selectedItems:e,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"600px"}).afterClosed().pipe(O(a=>F.IsNotEmpty(a))).subscribe(a=>{this.updateStock(n,a)})}getRowCount(){this.paginationService.hideCount=!1;let n={text:this.searchFilter.text};this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,n)}nextPage(){this.paginationService.onNextPage(this.searchFilter)}getAllData(){this.http.post(`/API/${this.allDataCountEndpoint}`,{}).subscribe({next:n=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,n)}})}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(e){return new(e||o)(y(Y),y(K),y(ie),y(le),y(oe),y(te))},o.\u0275cmp=k({type:o,selectors:[["app-multi-channel-comparison"]],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"onSubmit","pageData","hideSearchBox","textButton"],[4,"ngIf"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"mt-5"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary border-start-0","title","Load all products",3,"click",4,"ngIf"],[1,"d-flex"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","filter"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(e,a){e&1&&(u(0,at,32,23,"mainpanel",0),g(1,"async")),e&2&&c("ngIf",f(1,1,a.loader$))},dependencies:[z,Z,ee,q,X,ae,re,ne,Q,H],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let i=o;return i})();var ot=i=>({"text-decoration-line-through":i}),lt=i=>({"ms-10":i}),rt=i=>({"bg-gradient-warning":i});function st(i,o){if(i&1){let t=v();l(0,"button",43),S("click",function(){d(t);let e=p().ngIf,a=p(2);return _(a.updateStock(e))}),x(1,"i",44),m(2," Update"),s()}}function pt(i,o){if(i&1&&(l(0,"div"),u(1,st,3,0,"button",42),s()),i&2){let t=o.ngIf,n=p(2);r(),c("ngIf",n.productService.hasSelectionVariant(t))}}function ct(i,o){if(i&1&&(l(0,"span",45),x(1,"img",46),s(),m(2)),i&2){let t=o.item;r(),c("src",t==null?null:t.Img,R),r(),w(" ",t.Name," ")}}function mt(i,o){i&1&&(l(0,"div",47)(1,"span"),m(2," showing only different stock, please press next to populate more data "),s()())}function dt(i,o){if(i&1){let t=v();l(0,"th")(1,"input",48),E("ngModelChange",function(e){d(t);let a=p(2);return M(a.checkboxState,e)||(a.checkboxState=e),_(e)}),S("ngModelChange",function(){let e=d(t).ngIf,a=p(2);return _(a.onCheckboxStateChange(e))}),s()()}if(i&2){let t=p(2);r(),T("ngModel",t.checkboxState)}}function _t(i,o){i&1&&(b(0),l(1,"th",49),m(2," Reserved "),s(),I())}function ut(i,o){if(i&1){let t=v();b(0),l(1,"input",62),E("ngModelChange",function(e){d(t);let a=p(3).$implicit;return M(a.selected,e)||(a.selected=e),_(e)}),S("ngModelChange",function(){d(t);let e=p(3).$implicit,a=p(2);return _(a.onCheckboxStateProduct(e))}),s(),I()}if(i&2){let t=p(3).$implicit;r(),T("ngModel",t.selected)}}function gt(i,o){if(i&1){let t=v();b(0),l(1,"img",63),S("click",function(e){d(t);let a=p(3).$implicit,h=p(2);return _(h.onZoomImage(e,a==null?null:a.ImageUrl))}),s(),I()}if(i&2){let t=p(3).$implicit;r(),de("src",t==null?null:t.ThumbnailUrl,R)}}function ht(i,o){i&1&&x(0,"img",64)}function Ct(i,o){if(i&1&&(b(0),x(1,"br"),l(2,"div",65),x(3,"i",66),l(4,"small"),m(5),s()(),I()),i&2){let t=p(3).$implicit;r(5),w("(",t==null?null:t.Category,")")}}function ft(i,o){if(i&1&&(b(0),l(1,"td",59)(2,"div",17),u(3,ut,2,1,"ng-container",7),l(4,"div",53),u(5,gt,2,1,"ng-container",55)(6,ht,1,0,"ng-template",null,2,A),s()()(),l(8,"td",60)(9,"span",61),m(10),s(),u(11,Ct,6,1,"ng-container",7),s(),I()),i&2){let t=L(7),n=p(2).$implicit,e=p(2);r(),c("rowSpan",n==null?null:n.Variants.length),r(2),c("ngIf",n.Variants.length>1),r(),c("ngClass",$(8,lt,n.Variants.length<=1)),r(),c("ngIf",n==null?null:n.ThumbnailUrl)("ngIfElse",t),r(3),c("rowSpan",n==null?null:n.Variants.length),r(2),D(n==null?null:n.Name),r(),c("ngIf",n.CategoryID!==null&&n.CategoryID!=e.guidEmpty)}}function xt(i,o){if(i&1){let t=v();b(0),l(1,"input",48),E("ngModelChange",function(e){d(t);let a=p(2).$implicit;return M(a.selected,e)||(a.selected=e),_(e)}),s(),I()}if(i&2){let t=p(2).$implicit;r(),T("ngModel",t.selected)}}function St(i,o){if(i&1&&(b(0),u(1,xt,2,1,"ng-container",7),I()),i&2){let t=p().$implicit;r(),c("ngIf",(t==null?null:t.Inventory)<=1e5)}}function vt(i,o){if(i&1){let t=v();l(0,"input",48),E("ngModelChange",function(e){d(t);let a=p(2).$implicit;return M(a.selected,e)||(a.selected=e),_(e)}),s()}if(i&2){let t=p(2).$implicit;T("ngModel",t.selected)}}function yt(i,o){if(i&1&&u(0,vt,1,1,"input",67),i&2){let t=p().$implicit;c("ngIf",(t==null?null:t.Inventory)>=0)}}function bt(i,o){i&1&&(l(0,"div",68),m(1,"Not Found"),s())}function It(i,o){if(i&1&&(l(0,"div")(1,"span",69),m(2),g(3,"number"),s(),m(4," => "),l(5,"span",70),m(6),g(7,"number"),s()()),i&2){let t=p().$implicit;r(2),w(" ",f(3,2,t==null||t.I==null?null:t.I.Available),""),r(4),D(f(7,4,t==null?null:t.Inventory))}}function wt(i,o){if(i&1&&(l(0,"div"),m(1),g(2,"number"),s()),i&2){let t=p().$implicit;r(),w(" ",f(2,1,t==null?null:t.Inventory)," ")}}function Tt(i,o){if(i&1&&(b(0),l(1,"div",71)(2,"a",72),x(3,"i",73),s()(),I()),i&2){let t=p().$implicit,n=p(3);r(2),c("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),R)}}function Mt(i,o){if(i&1){let t=v();l(0,"td",74)(1,"div",52)(2,"div")(3,"span",75),S("click",function(){d(t);let e=p().$implicit,a=p(),h=a.$implicit,C=a.ngForOf,P=p(2);return _(P.openTableDialog(h,e,C))}),m(4),g(5,"number"),s()(),l(6,"div",71)(7,"a",72),x(8,"i",73),s()(),l(9,"div",71)(10,"span",76),S("click",function(){d(t);let e=p().$implicit,a=p(3);return _(a.refreshInventory(e==null||e.Channel[0]==null?null:e.Channel[0].ChannelItemID,e==null||e.Channel[0]==null?null:e.Channel[0].ChannelVariationID,e==null||e.Channel[0]==null?null:e.Channel[0].ChannelID,e==null?null:e.ID))}),x(11,"i",77),s()()()()}if(i&2){let t=p().$implicit;c("ngClass",$(5,rt,(t==null?null:t.Inventory)!=(t==null||t.Channel[0]==null?null:t.Channel[0].Inventory))),r(4),w(" ",f(5,3,t==null||t.Channel[0]==null?null:t.Channel[0].Inventory)," "),r(3),c("href",t==null||t.Channel[0]==null?null:t.Channel[0].Url,R)}}function Et(i,o){if(i&1&&(b(0),l(1,"span",79),m(2),g(3,"number"),s(),I()),i&2){let t=p(2).$implicit;r(2),w(" (",f(3,1,t==null||t.Channel[0]==null?null:t.Channel[0].InventoryReserved),") ")}}function Pt(i,o){i&1&&m(0," - ")}function Vt(i,o){if(i&1&&(b(0),l(1,"td",78),u(2,Et,4,3,"ng-container",55)(3,Pt,1,0,"ng-template",null,3,A),s(),I()),i&2){let t=L(4),n=p().$implicit;r(2),c("ngIf",n==null||n.Channel[0]==null?null:n.Channel[0].InventoryReserved)("ngIfElse",t)}}function Dt(i,o){i&1&&(b(0),m(1," - "),I())}function Ft(i,o){if(i&1&&(l(0,"span",80),g(1,"date"),m(2),g(3,"date"),s()),i&2){let t=p().$implicit;c("matTooltip",j(1,2,t==null||t.Channel[0]==null?null:t.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),r(2),w(" ",j(3,5,t==null||t.Channel[0]==null?null:t.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function Nt(i,o){if(i&1&&(l(0,"tr"),u(1,ft,12,10,"ng-container",7),l(2,"td",50),m(3),s(),l(4,"td",51)(5,"div",52)(6,"span",53),m(7),s()()(),l(8,"td",54),u(9,St,2,1,"ng-container",55)(10,yt,1,1,"ng-template",null,0,A),s(),l(12,"td")(13,"div",52),u(14,bt,2,0,"div",56)(15,It,8,6,"div",7)(16,wt,3,3,"div",7)(17,Tt,4,1,"ng-container",7),s()(),u(18,Mt,12,7,"td",57)(19,Vt,5,2,"ng-container",7),l(20,"td",58),u(21,Dt,2,0,"ng-container",55)(22,Ft,4,8,"ng-template",null,1,A),s()()),i&2){let t=o.$implicit,n=o.index,e=L(11),a=L(23),h=p(3);r(),c("ngIf",n==0),r(2),D(t==null?null:t.Model),r(),c("matTooltip",t.isDiscontinued?h.discontinuedVariantMsg:""),r(2),c("ngClass",$(15,ot,t.isDiscontinued)),r(),D(t==null?null:t.Code),r(2),c("ngIf",(t==null?null:t.Channel[0].TypeID)==1)("ngIfElse",e),r(5),c("ngIf",(t==null?null:t.I)==null),r(),c("ngIf",(t==null?null:t.I)!=null&&(t==null?null:t.Inventory)!=(t==null||t.I==null?null:t.I.Available)),r(),c("ngIf",(t==null?null:t.I)!=null&&(t==null?null:t.Inventory)==(t==null||t.I==null?null:t.I.Available)),r(),c("ngIf",(t==null?null:t.I)!=null),r(),c("ngIf",t==null?null:t.Channel),r(),c("ngIf",h.isShowReservedColumn),r(2),c("ngIf",(t==null||t.Channel[0]==null?null:t.Channel[0].LastInventorySync)==h.minDate)("ngIfElse",a)}}function kt(i,o){if(i&1&&(l(0,"tbody"),u(1,Nt,24,17,"tr",36),s()),i&2){let t=o.$implicit;r(),c("ngForOf",t.Variants)}}function Rt(i,o){if(i&1){let t=v();l(0,"span",81),S("click",function(){d(t);let e=p(2);return _(e.getRowCount())}),l(1,"i",82),m(2,"?"),s()()}}function Bt(i,o){if(i&1&&(l(0,"span"),m(1),g(2,"number"),s()),i&2){let t=o.ngIf;r(),D(f(2,1,t==null?null:t.Total))}}function Lt(i,o){if(i&1){let t=v();l(0,"a",86),S("click",function(){d(t);let e=p(3);return _(e.onNextPage())}),x(1,"i",87),m(2," Next"),s()}}function At(i,o){if(i&1){let t=v();l(0,"a",88),S("click",function(){d(t);let e=p(3);return _(e.onLastPage())}),x(1,"i",89),m(2," Last"),s()}}function Ot(i,o){if(i&1&&(l(0,"div",83),u(1,Lt,3,0,"a",84)(2,At,3,0,"a",85),s()),i&2){let t=p(2);r(),c("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),r(),c("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function Wt(i,o){if(i&1){let t=v();l(0,"mainpanel",5),S("onSubmit",function(e){d(t);let a=p();return _(a.onSearch(e))}),l(1,"actions")(2,"div",6),u(3,pt,2,1,"div",7),g(4,"async"),s()(),l(5,"filters")(6,"div")(7,"label",8),m(8,"Channel"),s(),l(9,"ng-select",9),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.ChannelID,e)||(a.searchFilter.ChannelID=e),_(e)}),u(10,ct,3,2,"ng-template",10),s()(),l(11,"div",11)(12,"label",12),m(13,"PageNumber"),s(),l(14,"input",13),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.PageNumber,e)||(a.searchFilter.PageNumber=e),_(e)}),s()(),l(15,"div",11)(16,"label",14),m(17,"Page Size"),s(),l(18,"input",15),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.RowCount,e)||(a.searchFilter.RowCount=e),_(e)}),s()(),l(19,"div",11)(20,"label",16),m(21,"Quantity From - To"),s(),l(22,"div",17)(23,"input",18),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.QuantityFrom,e)||(a.searchFilter.QuantityFrom=e),_(e)}),s(),m(24," - "),l(25,"input",19),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.QuantityTo,e)||(a.searchFilter.QuantityTo=e),_(e)}),s()()()(),l(26,"content")(27,"div",20)(28,"div",21)(29,"div",22),u(30,mt,3,0,"div",23),l(31,"table",24)(32,"thead",25)(33,"tr")(34,"th",26),m(35,"Product "),x(36,"br"),l(37,"mat-slide-toggle",27),S("toggleChange",function(){d(t);let e=p();return e.showDifferenceStock=!e.showDifferenceStock,_(e.onShowDifferenceStock())}),l(38,"small",16),m(39,"FILTER DIFFERENT INVENTORY"),s()()(),l(40,"th",28),m(41,"Variant"),s(),l(42,"th",29),m(43,"SKU"),s(),u(44,dt,2,1,"th",7),g(45,"async"),l(46,"th",30),m(47,"POS"),s(),l(48,"th",31)(49,"div",32),S("click",function(){d(t);let e=p();return _(e.openModalFilter())}),x(50,"img",33),l(51,"span",34),m(52),g(53,"stringLimit"),s()()(),u(54,_t,3,0,"ng-container",7),l(55,"th",35),m(56,"Last Sync"),s()()(),u(57,kt,2,1,"tbody",36),g(58,"async"),s(),l(59,"div",37)(60,"div",38)(61,"div",39),m(62),g(63,"async"),g(64,"number"),u(65,Rt,3,0,"span",40)(66,Bt,3,3,"span",7),g(67,"async"),m(68),s()(),u(69,Ot,3,2,"div",41),g(70,"async"),s()()()()()()}if(i&2){let t,n,e=p();c("headerTitle","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1),r(3),c("ngIf",f(4,24,e.paginationService.data$)),r(6),c("clearable",!1)("items",e.channelOptions),T("ngModel",e.searchFilter.ChannelID),r(5),T("ngModel",e.searchFilter.PageNumber),r(4),T("ngModel",e.searchFilter.RowCount),r(5),T("ngModel",e.searchFilter.QuantityFrom),r(2),T("ngModel",e.searchFilter.QuantityTo),r(5),c("ngIf",(e.searchFilter==null?null:e.searchFilter.filterModel)==3),r(14),c("ngIf",f(45,26,e.paginationService.data$)),r(5),c("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?e.selectedChannel==null?null:e.selectedChannel.Name:""),r(),c("src",e.selectedChannel==null?null:e.selectedChannel.Img,R),r(2),_e(" ",j(53,28,e.selectedChannel==null?null:e.selectedChannel.Name,13),"",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?"...":""," "),r(2),c("ngIf",e.isShowReservedColumn),r(3),c("ngForOf",f(58,31,e.products$)),r(5),w(" Showing 1 - ",f(64,35,(t=f(63,33,e.paginationService.data$))==null?null:t.length)," of "),r(3),c("ngIf",e.paginationService.hideCount),r(),c("ngIf",f(67,37,!e.paginationService.hideCount&&e.rowCount$)),r(2),w(" records ~ ",e.paginationService.footerPageNumber," Page "),r(),c("ngIf",((n=f(70,39,e.paginationService.data$))==null?null:n.length)>0)}}var Le=(()=>{let o=class o{constructor(n,e,a,h,C,P,V,Oe,We){this.http=n,this.toastr=e,this.dialog=a,this.paginationService=h,this.productService=C,this.authService=P,this.biggerPictureService=V,this.inventoryService=Oe,this.mainPanelService=We,this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="/api/InventoryLoader/Load",this.rowCountApi="/api/Inventory/GetInventoryByChannelRowCount",this.minDate=F.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=F.GuidEMpty,this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.products$=this.paginationService.data$.pipe(me(n=>(n=n.map(e=>(e.Variants&&(e.Variants=e.Variants.map(a=>(a.isDiscontinued=e.Discontinued=="Yes",a))),e)),n)),B(n=>{this.checkShowReservedColumn(n)}))}checkShowReservedColumn(n){let e=0,a;n.forEach(h=>{a=h.Variants.find(C=>F.IsNotEmpty(C?.Channel[0]?.InventoryReserved)),a&&(e+=1)}),this.isShowReservedColumn=e>0}initPageLoader(){this.paginationService.fetchDataEndpoint="Inventory/GetSingleChannelComparison",this.loader$=this.http.post(this.loaderApi,{}).pipe(B(n=>{this.searchFilter={RowCount:n.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:n.Filter.ChannelID},this.initSelectedChannel(),this.paginationService.reloadPagination(this.searchFilter),n.Filter.IsMarketplaceAppActive||this.toastr.warning(`Automatic inventory sync disabled.
|
|
2
2
|
Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}))}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(n=>n.ID==this.searchFilter.ChannelID)}onSearch(n){this.searchFilter.text=n,this.paginationService.reloadPagination(this.searchFilter),this.initSelectedChannel()}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(n){let e=this.productService.selectedVariantProduct(n);if(e.length>0){let a=e.map(C=>({ID:C.ID,Code:C.Code,Inventory:C.Inventory})),h={ListChannelID:[this.searchFilter.ChannelID],List:a};this.http.post("/api/Inventory/UpdateChannel",h).subscribe(C=>{this.searchFilter.PageNumber=1,this.paginationService.reloadPagination(this.searchFilter),this.checkboxState=!1,this.handlingUpdateStock(C)})}}handlingUpdateStock(n){if(n[0]?.StatusProduct){let e=n[0].StatusProduct.Fail_list,a=n[0].StatusProduct.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",a,e)}else this.toastr.error(n[0]?.Exception,"Error")}refreshInventory(n,e,a,h){let C={ChannelItemID:n,ChannelVariationID:e,ChannelID:a,VariantID:h};this.http.post("/api/Inventory/RefreshInventoryChannel",C).subscribe(P=>{this.toastr.success("Successfully updated","Success"),this.paginationService.reloadPagination(this.searchFilter)})}onCheckboxStateProduct(n){n.Variants=n.Variants.map(e=>(e.Inventory>=0&&(e.selected=n.selected),e))}onCheckboxStateChange(n){n=n.map(e=>(e.Variants=e.Variants.map(a=>(a.selected=this.checkboxState,a)),e))}openTableDialog(n,e,a){this.dialog.open(De,{data:{Name:n.Name,Variant:e,ChannelID:e?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:n.ChannelItemID}}).afterClosed().pipe(O(C=>F.IsNotEmpty(C))).subscribe(C=>{this.updateItemAfterDialog(C,a)})}updateItemAfterDialog(n,e){let a={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:parseFloat(n.Inventory),VariantID:n.ID,SKU:n.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(h=>{this.searchFilter.PageNumber=1,this.paginationService.reloadPagination(this.searchFilter),this.handlingUpdateStock([h])})}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=N.DIFFERENCE:this.searchFilter.filterModel=N.ALL,this.paginationService.reloadPagination(this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}getRowCount(){let n={ChannelID:this.searchFilter.ChannelID,PageNumber:1,text:this.searchFilter.text};this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`${this.rowCountApi}`,n)}onLastPage(){let n={ChannelID:this.searchFilter.ChannelID,PageNumber:1};this.http.post(`${this.rowCountApi}`,n).subscribe({next:e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e.Total)}})}onZoomImage(n,e){this.biggerPictureService.openBiggerPicture(n,e)}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(e){return new(e||o)(y(Y),y(K),y(ie),y(le),y(oe),y(te),y(Pe),y(se),y(we))},o.\u0275cmp=k({type:o,selectors:[["app-single-channel-comparison"]],decls:2,vars:3,consts:[["OTHER_CHANNEL",""],["SYNCDATE",""],["elsePic",""],["EMPTY_RESERVED",""],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"onSubmit","headerTitle","pageData","hideSearchBox"],[1,"d-flex"],[4,"ngIf"],["for","ng-select",1,"fw-bold"],["id","ng-select","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text","mt-3",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],["scope","col",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[1,"text-center",2,"width","145px"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],["class","btn-group",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"me-2"],[2,"width","18px",3,"src"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModelChange","ngModel"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-start"],["matTooltipPosition","above",1,"text-end",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],[1,"align-middle"],[4,"ngIf","ngIfElse"],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"text-center"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],["title","Allocated"],["title","Inventory below minimum inventory"],[1,"ms-3"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"text-end",3,"ngClass"],[1,"cursor",3,"click"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom"],[1,"text-end"],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary border-start-0","title","Load all products",3,"click",4,"ngIf"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(e,a){e&1&&(u(0,Wt,71,41,"mainpanel",4),g(1,"async")),e&2&&c("ngIf",f(1,1,a.loader$))},dependencies:[ue,ge,z,Z,ee,fe,q,X,ye,Se,ve,Fe,ae,ne,Q,H,he,ke],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]});let i=o;return i})();var Ut=[{path:"",component:Re,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",component:Be,canActivate:[ce],data:{title:"Inventory Comparison"}},{path:"bychannel",component:Le,canActivate:[ce],data:{title:"Inventory Comparison"}}]}],Ae=(()=>{let o=class o{};o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=U({type:o}),o.\u0275inj=W({imports:[G,J.forChild(Ut)]});let i=o;return i})();var Rn=(()=>{let o=class o{};o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=U({type:o}),o.\u0275inj=W({providers:[se],imports:[G,Ae,J,Ee,xe,be,Ne,Te,re,Ie]});let i=o;return i})();export{Rn as InventoryModule};
|