marketplacepos 2.8.0 → 2.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/369.8c9ca2ecf6f3a760.js +1 -0
- package/Marketplace/379.fd2e5a0bd36c9b00.js +1 -0
- package/Marketplace/393.9113a28596b36003.js +1 -0
- package/Marketplace/397.c6768a042e8257c0.js +1 -0
- package/Marketplace/3rdpartylicenses.txt +3 -0
- package/Marketplace/408.c73edfe24695a688.js +1 -0
- package/Marketplace/425.03f8f97da7452806.js +1 -0
- package/Marketplace/46.40ebac81bd0fb91b.js +1 -0
- package/Marketplace/{53.7e8bb7325980dfd5.js → 53.ab0f83f4bba76774.js} +1 -1
- package/Marketplace/655.9604b4370243c059.js +1 -0
- package/Marketplace/717.5d253da5bb63552f.js +1 -0
- package/Marketplace/718.455a3c47fb180214.js +1 -0
- package/Marketplace/{859.b43bda3adda95fa3.js → 859.3a4d26983bbb5254.js} +1 -1
- package/Marketplace/874.5b06431d2b5a1e8f.js +1 -0
- package/Marketplace/877.bab93e3da1ff1928.js +1 -0
- package/Marketplace/884.06eb48b1f2379d09.js +1 -0
- package/Marketplace/{913.6b5b3db030c3bc49.js → 913.ac94f56e393c389b.js} +1 -1
- package/Marketplace/997.1e5281aa64540dee.js +1 -0
- package/Marketplace/common.29d2fb726f28cde8.js +1 -0
- package/Marketplace/index.html +3 -3
- package/Marketplace/main.f21ded8d313b0b60.js +1 -0
- package/Marketplace/runtime.2d126c69c13cad80.js +1 -0
- package/package.json +1 -1
- package/Marketplace/369.b5bcb467b3ca04c8.js +0 -1
- package/Marketplace/397.55fafd1d8945185c.js +0 -1
- package/Marketplace/408.b53797a5bda9f7f8.js +0 -1
- package/Marketplace/46.67982fb195b43a4d.js +0 -1
- package/Marketplace/655.09b1b17f23a59b7e.js +0 -1
- package/Marketplace/717.2e5a78cf17e9bed1.js +0 -1
- package/Marketplace/718.78930b2d3e9fc2bd.js +0 -1
- package/Marketplace/82.fecf4fa3a3743326.js +0 -1
- package/Marketplace/87.0c53ec1547d4d5d5.js +0 -1
- package/Marketplace/874.7662257927081a57.js +0 -1
- package/Marketplace/877.7e5f8104980e0168.js +0 -1
- package/Marketplace/884.45404dc14d1585a7.js +0 -1
- package/Marketplace/970.7c36426f4bcc50cb.js +0 -1
- package/Marketplace/997.08e3f8cf0bafff67.js +0 -1
- package/Marketplace/common.df21aa97084954ce.js +0 -1
- package/Marketplace/main.c27e23d32d8dc713.js +0 -1
- package/Marketplace/runtime.447f149bd5bc7630.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[717],{6717:(J,f,e)=>{e.r(f),e.d(f,{NotificationModule:()=>l});var c=e(6895),N=e(284),T=e(1889),v=e(1290),Z=e(7579),_=e(2722),p=e(4004),h=e(4782),t=e(4650),x=e(1318),y=e(5051),m=e(8796),u=e(4006),d=e(7481),C=e(6732);function A(i,o){if(1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"number"),t.TgZ(3,"span"),t._uU(4,"s"),t.qZA(),t.BQk()),2&i){const n=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,n.DurationInSecond,"1.1-1")," ")}}function I(i,o){1&i&&t._uU(0," - ")}const S=function(i,o){return{"bg-gradient-danger":i,"bg-gradient-warning":o}};function b(i,o){if(1&i&&(t.ynx(0),t.TgZ(1,"tr",12)(2,"td"),t._UZ(3,"img",13),t.TgZ(4,"span"),t._uU(5),t.qZA()(),t.TgZ(6,"td")(7,"b"),t._uU(8),t.qZA(),t._UZ(9,"div",14),t.qZA(),t.TgZ(10,"td"),t.YNc(11,A,5,4,"ng-container",15),t.YNc(12,I,1,0,"ng-template",null,16,t.W1O),t.qZA(),t.TgZ(14,"td"),t._uU(15),t.qZA(),t.TgZ(16,"td"),t._uU(17),t.ALo(18,"date"),t.qZA()(),t.BQk()),2&i){const n=o.$implicit,a=t.MAs(13);t.xp6(1),t.Q6J("ngClass",t.WLB(12,S,1==n.Status,0==n.Status)),t.xp6(2),t.s9C("src",n.Img,t.LSH),t.xp6(2),t.Oqu(n.Name),t.xp6(3),t.Oqu(n.Label),t.xp6(1),t.Q6J("innerHTML",n.Message,t.oJD),t.xp6(2),t.Q6J("ngIf",n.DurationInSecond)("ngIfElse",a),t.xp6(4),t.Oqu(n.StatusLabel),t.xp6(2),t.Oqu(t.xi3(18,9,n.Created,"dd MMM yyyy HH:mm"))}}function L(i,o){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",4)(2,"div",17)(3,"app-custom-paginator",18),t.NdJ("total",function(){t.CHM(n);const s=t.oxw(2);return t.KtG(s.getRowCount())})("next",function(){t.CHM(n);const s=t.oxw(2);return t.KtG(s.onNextPage())})("previous",function(){t.CHM(n);const s=t.oxw(2);return t.KtG(s.onPreviousPage())}),t.ALo(4,"async"),t.ALo(5,"async"),t.qZA()()(),t.BQk()}if(2&i){const n=t.oxw().ngIf,a=t.oxw();t.xp6(3),t.Q6J("filter",a.filter)("totaldata",null==n?null:n.length)("paginationTotal",t.lcZ(4,4,a.rowCount$))("hasClicked",t.lcZ(5,6,a.rowCount$))}}function M(i,o){if(1&i&&(t.ynx(0),t.YNc(1,L,6,8,"ng-container",11),t.BQk()),2&i){const n=o.ngIf;t.xp6(1),t.Q6J("ngIf",n.length>0)}}class g{constructor(o,n){this.http=o,this.notificationService=n,this.filter=new v.k,this.destroy$=new Z.x}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe((0,_.R)(this.destroy$)).subscribe(o=>{o.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(o=>{this.filter=o.Filter,this.filter.PageSize=this.filter.RowCount,this.channelOptions=o.Options.Channel,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){this.notifications$=this.http.post("/api/notification/Get",{ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber}).pipe((0,p.U)(n=>n.Data),(0,p.U)(n=>(n=this.setChannelLogoToNotifications(n),this.setTimeToSecond(n))),(0,h.d)(1))}setTimeToSecond(o){return o.map(n=>(n.DurationInSecond=parseInt(n.Duration)/1e3,n))}setChannelLogoToNotifications(o){return o.map(n=>(n.Img=T.g.getChannelLogoByTypeId(n.TypeID),n))}onNextPage(){this.filter.PageNumber+=1,this.getNotifications()}onPreviousPage(){this.filter.PageNumber-=1,this.getNotifications()}getRowCount(){this.rowCount$=this.http.post("/api/notification/RowCount",{ChannelID:this.filter.ChannelID}).pipe((0,p.U)(n=>n.Count),(0,h.d)(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}g.\u0275fac=function(o){return new(o||g)(t.Y36(x.O),t.Y36(y.g))},g.\u0275cmp=t.Xpm({type:g,selectors:[["app-notification"]],decls:30,vars:9,consts:[["headerTitle","Notification","hideSearchBox","true",3,"onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],[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"],[4,"ngIf"],[3,"ngClass"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["timeNotAvailable",""],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(o,n){1&o&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(){return n.onFilter()}),t.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),t._uU(5,"Channel"),t.qZA(),t.TgZ(6,"ng-select",2),t.NdJ("ngModelChange",function(s){return n.filter.ChannelID=s}),t.qZA()()()(),t.TgZ(7,"content")(8,"div",3)(9,"div",4)(10,"div",5)(11,"div",6)(12,"table",7)(13,"thead",8)(14,"tr",9)(15,"th"),t._uU(16,"Channel"),t.qZA(),t.TgZ(17,"th"),t._uU(18,"Process"),t.qZA(),t.TgZ(19,"th"),t._uU(20,"Duration"),t.qZA(),t.TgZ(21,"th"),t._uU(22,"Status"),t.qZA(),t.TgZ(23,"th"),t._uU(24,"Created"),t.qZA()()(),t.TgZ(25,"tbody"),t.YNc(26,b,19,15,"ng-container",10),t.ALo(27,"async"),t.qZA()()()()(),t.YNc(28,M,2,1,"ng-container",11),t.ALo(29,"async"),t.qZA()()()),2&o&&(t.xp6(6),t.Q6J("clearable",!0)("items",n.channelOptions)("ngModel",n.filter.ChannelID),t.xp6(20),t.Q6J("ngForOf",t.lcZ(27,5,n.notifications$)),t.xp6(2),t.Q6J("ngIf",t.lcZ(29,7,n.notifications$)))},dependencies:[c.mk,c.sg,c.O5,m.w9,u.JJ,u.On,d.p,C.y,c.Ov,c.JJ,c.uU]});const U=[{path:"",component:g}];class r{}r.\u0275fac=function(o){return new(o||r)},r.\u0275mod=t.oAB({type:r}),r.\u0275inj=t.cJS({imports:[c.ez,N.Bz.forChild(U)]});class l{}l.\u0275fac=function(o){return new(o||l)},l.\u0275mod=t.oAB({type:l}),l.\u0275inj=t.cJS({imports:[c.ez,r,m.A0,u.u5,d.R,C.y]})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[718],{2937:(M,b,s)=>{s.d(b,{Z:()=>n,e:()=>h});var e=s(6895),g=s(266),_=s(284),i=s(4650);function w(r,l){if(1&r&&(i.TgZ(0,"li",2)(1,"a",3),i._uU(2),i.qZA()()),2&r){const m=l.$implicit;i.xp6(1),i.s9C("routerLink",m.Url),i.Q6J("title",m.Description?m.Description:""),i.xp6(1),i.hij(" ",m.Title," ")}}class h{}h.\u0275fac=function(l){return new(l||h)},h.\u0275cmp=i.Xpm({type:h,selectors:[["nav-tab"]],inputs:{Tabs:"Tabs"},decls:2,vars:1,consts:[[1,"nav","navbar-nav","navbar-left","nav-tab-arrow"],["routerLinkActive","active","class","nav-item me-6",4,"ngFor","ngForOf"],["routerLinkActive","active",1,"nav-item","me-6"],[1,"nav-link","nav-link-arrow","mb-0",3,"routerLink","title"]],template:function(l,m){1&l&&(i.TgZ(0,"ul",0),i.YNc(1,w,3,3,"li",1),i.qZA()),2&l&&(i.xp6(1),i.Q6J("ngForOf",m.Tabs))},dependencies:[e.sg,_.rH,_.Od]});class n{}n.\u0275fac=function(l){return new(l||n)},n.\u0275mod=i.oAB({type:n}),n.\u0275inj=i.cJS({imports:[e.ez,_.Bz,g.AV]})},455:(M,b,s)=>{s.d(b,{Rr:()=>k,rP:()=>I});var e=s(4650),g=s(4006),_=s(7253),i=s(3238),w=s(1281),h=s(6895);const n=["switch"],r=["*"],l=new e.OlP("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1})}),m={provide:g.JU,useExisting:(0,e.Gpc)(()=>k),multi:!0};class v{constructor(a,t){this.source=a,this.checked=t}}let T=0;const x=(0,i.sb)((0,i.pj)((0,i.Kr)((0,i.Id)(class{constructor(c){this._elementRef=c}}))));let D=(()=>{class c extends x{get required(){return this._required}set required(t){this._required=(0,w.Ig)(t)}get checked(){return this._checked}set checked(t){this._checked=(0,w.Ig)(t),this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(t,d,o,p,u,f,A){super(t),this._focusMonitor=d,this._changeDetectorRef=o,this.defaults=u,this._onChange=R=>{},this._onTouched=()=>{},this._required=!1,this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.change=new e.vpe,this.toggleChange=new e.vpe,this.tabIndex=parseInt(p)||0,this.color=this.defaultColor=u.color||"accent",this._noopAnimations="NoopAnimations"===f,this.id=this._uniqueId=`${A}${++T}`}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{"keyboard"===t||"program"===t?(this._focused=!0,this._changeDetectorRef.markForCheck()):t||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(t){this.checked=!!t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}}return c.\u0275fac=function(t){e.$Z()},c.\u0275dir=e.lG2({type:c,inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},features:[e.qOj]}),c})(),k=(()=>{class c extends D{get buttonId(){return`${this.id||this._uniqueId}-button`}constructor(t,d,o,p,u,f){super(t,d,o,p,u,f,"mat-mdc-slide-toggle-"),this._labelId=this._uniqueId+"-label"}_handleClick(){this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new v(this,this.checked)))}focus(){this._switchElement.nativeElement.focus()}_createChangeEvent(t){return new v(this,t)}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}}return c.\u0275fac=function(t){return new(t||c)(e.Y36(e.SBq),e.Y36(_.tE),e.Y36(e.sBO),e.$8M("tabindex"),e.Y36(l),e.Y36(e.QbO,8))},c.\u0275cmp=e.Xpm({type:c,selectors:[["mat-slide-toggle"]],viewQuery:function(t,d){if(1&t&&e.Gf(n,5),2&t){let o;e.iGM(o=e.CRH())&&(d._switchElement=o.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:11,hostBindings:function(t,d){2&t&&(e.Ikx("id",d.id),e.uIk("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),e.ekj("mat-mdc-slide-toggle-focused",d._focused)("mat-mdc-slide-toggle-checked",d.checked)("_mat-animation-noopable",d._noopAnimations))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matSlideToggle"],features:[e._Bn([m]),e.qOj],ngContentSelectors:r,decls:17,vars:24,consts:[[1,"mdc-form-field"],["role","switch","type","button",1,"mdc-switch",3,"tabIndex","disabled","click"],["switch",""],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],["viewBox","0 0 24 24",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"],[3,"for","click"]],template:function(t,d){if(1&t&&(e.F$t(),e.TgZ(0,"div",0)(1,"button",1,2),e.NdJ("click",function(){return d._handleClick()}),e._UZ(3,"div",3),e.TgZ(4,"div",4)(5,"div",5)(6,"div",6),e._UZ(7,"div",7),e.qZA(),e.TgZ(8,"div",8),e._UZ(9,"div",9),e.qZA(),e.TgZ(10,"div",10),e.O4$(),e.TgZ(11,"svg",11),e._UZ(12,"path",12),e.qZA(),e.TgZ(13,"svg",13),e._UZ(14,"path",14),e.qZA()()()()(),e.kcU(),e.TgZ(15,"label",15),e.NdJ("click",function(p){return p.stopPropagation()}),e.Hsn(16),e.qZA()()),2&t){const o=e.MAs(2);e.ekj("mdc-form-field--align-end","before"==d.labelPosition),e.xp6(1),e.ekj("mdc-switch--selected",d.checked)("mdc-switch--unselected",!d.checked)("mdc-switch--checked",d.checked)("mdc-switch--disabled",d.disabled),e.Q6J("tabIndex",d.tabIndex)("disabled",d.disabled),e.uIk("id",d.buttonId)("name",d.name)("aria-label",d.ariaLabel)("aria-labelledby",d._getAriaLabelledBy())("aria-describedby",d.ariaDescribedby)("aria-required",d.required||null)("aria-checked",d.checked),e.xp6(8),e.Q6J("matRippleTrigger",o)("matRippleDisabled",d.disableRipple||d.disabled)("matRippleCentered",!0),e.xp6(6),e.Q6J("for",d.buttonId),e.uIk("id",d._labelId)}},dependencies:[i.wG],styles:['.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative}.mdc-switch[hidden]{display:none}.mdc-switch:disabled{cursor:default;pointer-events:none}.mdc-switch__track{overflow:hidden;position:relative;width:100%}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%}@media screen and (forced-colors: active){.mdc-switch__track::before,.mdc-switch__track::after{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(-100%)}[dir=rtl] .mdc-switch__track::after,.mdc-switch__track[dir=rtl]::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track[dir=rtl]::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0)}[dir=rtl] .mdc-switch__handle-track,.mdc-switch__handle-track[dir=rtl]{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track,.mdc-switch--selected .mdc-switch__handle-track[dir=rtl]{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto}[dir=rtl] .mdc-switch__handle,.mdc-switch__handle[dir=rtl]{left:auto;right:0}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media screen and (forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-elevation-overlay{bottom:0;left:0;right:0;top:0}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1}.mdc-switch:disabled .mdc-switch__ripple{display:none}.mdc-switch__icons{height:100%;position:relative;width:100%;z-index:1}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mdc-switch{width:var(--mdc-switch-track-width, 36px)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color, #310077)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color, #310077)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color, #310077)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color, #424242)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color, #616161)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color, #212121)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color, #212121)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color, #212121)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color, #424242)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color, var(--mdc-theme-surface, #fff))}.mat-mdc-slide-toggle .mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__focus-ring-wrapper,.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle{height:var(--mdc-switch-handle-height, 20px)}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__handle::after{opacity:var(--mdc-switch-disabled-handle-opacity, 0.38)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle{border-radius:var(--mdc-switch-handle-shape, 10px)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle{width:var(--mdc-switch-handle-width, 20px)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__handle-track{width:calc(100% - var(--mdc-switch-handle-width, 20px))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled .mdc-switch__icon{fill:var(--mdc-switch-selected-icon-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled .mdc-switch__icon{fill:var(--mdc-switch-unselected-icon-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity, 0.38)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size, 18px);height:var(--mdc-switch-selected-icon-size, 18px)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size, 18px);height:var(--mdc-switch-unselected-icon-size, 18px)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-hover-state-layer-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-focus-state-layer-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-pressed-state-layer-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-hover-state-layer-color, #424242)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-focus-state-layer-color, #424242)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-pressed-state-layer-color, #424242)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-selected-hover-state-layer-opacity, 0.04)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-selected-focus-state-layer-opacity, 0.12)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, 0.1)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--selected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, 0.1)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-unselected-hover-state-layer-opacity, 0.04)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-unselected-focus-state-layer-opacity, 0.12)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, 0.1)}.mat-mdc-slide-toggle .mdc-switch.mdc-switch--unselected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, 0.1)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__ripple{height:var(--mdc-switch-state-layer-size, 48px);width:var(--mdc-switch-state-layer-size, 48px)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__track{height:var(--mdc-switch-track-height, 14px)}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity, 0.12)}.mat-mdc-slide-toggle .mdc-switch:enabled .mdc-switch__track::after{background:var(--mdc-switch-selected-track-color, #d7bbff)}.mat-mdc-slide-toggle .mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color, #d7bbff)}.mat-mdc-slide-toggle .mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color, #d7bbff)}.mat-mdc-slide-toggle .mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color, #d7bbff)}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color, #424242)}.mat-mdc-slide-toggle .mdc-switch:enabled .mdc-switch__track::before{background:var(--mdc-switch-unselected-track-color, #e0e0e0)}.mat-mdc-slide-toggle .mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color, #e0e0e0)}.mat-mdc-slide-toggle .mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color, #e0e0e0)}.mat-mdc-slide-toggle .mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color, #e0e0e0)}.mat-mdc-slide-toggle .mdc-switch:disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color, #424242)}.mat-mdc-slide-toggle .mdc-switch .mdc-switch__track{border-radius:var(--mdc-switch-track-shape, 7px)}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle .mdc-switch__ripple::after{content:"";opacity:0}.mat-mdc-slide-toggle .mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:opacity 75ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-mdc-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-elevation-overlay,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}'],encapsulation:2,changeDetection:0}),c})(),y=(()=>{class c{}return c.\u0275fac=function(t){return new(t||c)},c.\u0275mod=e.oAB({type:c}),c.\u0275inj=e.cJS({}),c})(),I=(()=>{class c{}return c.\u0275fac=function(t){return new(t||c)},c.\u0275mod=e.oAB({type:c}),c.\u0275inj=e.cJS({imports:[y,i.BQ,i.si,h.ez,y,i.BQ]}),c})()}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[82],{8082:(V,z,u)=>{u.r(z),u.d(z,{OrdersModule:()=>q});var h=u(6895),_=u(284),e=u(4650),H=u(2937);class S{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new"},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship"},{Title:"3 - Shipped",Url:"/menu/Order/Shipped"},{Title:"4 - Completed",Url:"/menu/Order/Delivered"},{Title:"All",Url:"/menu/Order/All"},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled"},{Title:"Download",Url:"/menu/Order/Download"}]}ngOnInit(){}}S.\u0275fac=function(n){return new(n||S)},S.\u0275cmp=e.Xpm({type:S,selectors:[["app-orders"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,t){1&n&&(e.TgZ(0,"nav",0)(1,"div",1)(2,"div"),e._UZ(3,"nav-tab",2),e.qZA()()(),e._UZ(4,"router-outlet")),2&n&&(e.xp6(3),e.Q6J("Tabs",t.ObjectOrderTabs))},dependencies:[H.e,_.lC]});var m=u(1889),B=u(4782),l=u(8505),r=u(9694),s=u(9568),p=u(2428),g=u(5412),c=u(4006),w=u(6709);class M{constructor(n){this.dialogRef=n,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}}M.\u0275fac=function(n){return new(n||M)(e.Y36(g.so))},M.\u0275cmp=e.Xpm({type:M,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],["mat-dialog-title","",1,"text-center","mb-8","fw-bold"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModel","ngModelChange"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center","mt-6"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(n,t){1&n&&(e.TgZ(0,"div",0)(1,"h2",1),e._uU(2,"Cetak label pesanan"),e.qZA(),e.TgZ(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),e._uU(7,"Kamu akan mencetak label yang berisi detail pesanan"),e.qZA(),e.TgZ(8,"div",5)(9,"mat-checkbox",6),e.NdJ("ngModelChange",function(o){return t.tandaiSudahDicetak=o}),e.qZA(),e.TgZ(10,"span",7),e._uU(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),e.qZA()()()()(),e.TgZ(12,"mat-dialog-actions",8)(13,"button",9),e.NdJ("click",function(){return t.onCancel()}),e._uU(14,"Cancel"),e.qZA(),e.TgZ(15,"button",10),e.NdJ("click",function(){return t.onPrint()}),e._uU(16,"Cetak Pesanan"),e.qZA()()()),2&n&&(e.xp6(9),e.Q6J("ngModel",t.tandaiSudahDicetak))},dependencies:[c.JJ,c.On,w.oG,g.uh,g.xY,g.H8]});var W=u(4004),X=u(9300),ee=u(3900),C=u(1318),U=u(7185);class T{constructor(n,t,a){this.http=n,this.dialog=t,this.toastr=a}loadInitialPage(){return this.http.post("/api/ordersLoader/GetOrder",{})}getNewOrders(n){return this.http.post("/api/orders/GetNewOrder",n).pipe((0,W.U)(t=>t.Data))}getTotalNewOrders(n){return this.http.post("/api/orders/GetCountNewOrder",{ListChannelID:n}).pipe((0,W.U)(a=>a.Count))}printShippingLabelTokopedia(n){const t={OrderNumber:n,Printed:!0};this.dialog.open(M).afterClosed().pipe((0,X.h)(a=>void 0!==a),(0,ee.w)(a=>(t.Printed=a,this.http.post("api/v1/Shippinglabel/Tokopedia",t)))).subscribe(a=>{const o=window.open("about:blank","_blank");o.document.write(a),o.document.close()})}printShippingLabelTiktok(n,t){this.http.post("api/v1/Shippinglabel/Tiktok",{ShopID:t,OrderNumber:n}).subscribe(o=>{null!=o.data?window.open(o.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print")})}printShippingLabelShopee(n,t){this.http.post("api/v1/Shippinglabel/shopee/DownloadShipping",{ShopID:t,OrderNumber:n}).subscribe(o=>{var d=Uint8Array.from(atob(o),Dt=>Dt.charCodeAt(0)),v=new Blob([d],{type:"octet/stream"});m.g.openDownloadFile(v,`${n}.pdf`)})}printShippingLabelLazada(n,t){this.http.post("api/v1/Shippinglabel/Lazada/DownloadShipping",{ShopID:t,OrderNumber:n}).subscribe(o=>{null!=o.result.data?window.open(o.result.data.pdf_url,"_blank"):this.toastr.error(o.message,"Cannot Print")})}}T.\u0275fac=function(n){return new(n||T)(e.LFG(C.O),e.LFG(g.uw),e.LFG(U._W))},T.\u0275prov=e.Yz7({token:T,factory:T.\u0275fac});class D{constructor(n,t){this.http=n,this.toastr=t}acceptTokopediaOrders(n){return this.http.post("/api/Orders/AcceptOrderTokopedia",n).pipe((0,l.b)(t=>{this.tokopediaAcceptOrderHandler(t)}))}tokopediaAcceptOrderHandler(n){const t=n.filter(o=>0==o.Status),a=n.filter(o=>1==o.Status);if(0==t.length&&a.length>0){let o=`<ol>${this.generateSuccessMessage(a)}</ol>`;this.toastr.success(o,"Success",{enableHtml:!0})}else if(t.length>0&&a.length>0){let o=`<ol>\n ${this.generateSuccessMessage(a)}\n ${this.generateErrorMessage(t)}\n </ol>`;this.toastr.warning(o,"Warning",{enableHtml:!0})}else{let o=`<ol>${this.generateErrorMessage(t)}</ol>`;this.toastr.error(o,"Error",{enableHtml:!0})}}generateSuccessMessage(n){let t="";return n.forEach(a=>{t+=`<li><b>${a.OrderNumber}</b> was successfully Accept</li>`}),t}generateErrorMessage(n){let t="";return n.forEach(a=>{t+=`<li><b>${a.OrderNumber}</b> ${a.Message}</li>`}),t}}D.\u0275fac=function(n){return new(n||D)(e.LFG(C.O),e.LFG(U._W))},D.\u0275prov=e.Yz7({token:D,factory:D.\u0275fac});var Z=u(7481),N=u(2594),O=u(9549),y=u(4385),x=u(3238);function te(i,n){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",17),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().ngIf,d=e.oxw();return e.KtG(d.onAcceptOrder(o))}),e._UZ(2,"i",18),e._uU(3," Accept "),e.qZA(),e.BQk()}if(2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("disabled",!t.isTokopediaSelected)}}function ne(i,n){if(1&i&&(e.ynx(0),e.YNc(1,te,4,1,"ng-container",1),e.BQk()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.isTokopediaAvailable)}}function ae(i,n){if(1&i&&(e.TgZ(0,"mat-option",19),e.NdJ("click",function(a){return a.stopPropagation()}),e.TgZ(1,"span",20),e._UZ(2,"img",21),e.qZA(),e.TgZ(3,"span"),e._uU(4),e.qZA()()),2&i){const t=n.$implicit;e.Q6J("value",t.ID)("title",t.Name)("title",t.Name),e.xp6(2),e.Q6J("src",t.img,e.LSH),e.xp6(2),e.hij(" ",t.Name," ")}}function ie(i,n){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"th",22)(2,"input",23),e.NdJ("ngModelChange",function(o){e.CHM(t);const d=e.oxw();return e.KtG(d.isCheckAll=o)})("ngModelChange",function(){const d=e.CHM(t).ngIf,v=e.oxw();return e.KtG(v.onSelectAllOrderData(d))}),e.qZA()(),e.BQk()}if(2&i){const t=e.oxw();e.xp6(2),e.Q6J("ngModel",t.isCheckAll)}}function oe(i,n){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"input",23),e.NdJ("ngModelChange",function(o){e.CHM(t);const d=e.oxw(2).$implicit;return e.KtG(d.selected=o)})("ngModelChange",function(){e.CHM(t);const o=e.oxw(2).ngForOf,d=e.oxw();return e.KtG(d.onSelectOrderData(o))}),e.qZA(),e.BQk()}if(2&i){const t=e.oxw(2).$implicit;e.xp6(1),e.Q6J("ngModel",t.selected)}}function re(i,n){if(1&i&&(e.ynx(0),e.TgZ(1,"td"),e.YNc(2,oe,2,1,"ng-container",1),e.qZA(),e.BQk()),2&i){const t=e.oxw().$implicit,a=e.oxw();e.xp6(2),e.Q6J("ngIf",t.Type==a.tokopediaType)}}function le(i,n){if(1&i&&(e.ynx(0),e.TgZ(1,"span"),e._uU(2),e.qZA(),e.BQk()),2&i){const t=e.oxw().$implicit;e.xp6(2),e.Oqu(t.Number)}}function se(i,n){if(1&i&&(e.TgZ(0,"a",26),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit,a=e.oxw();e.Q6J("href",a.domain+"/menu/Orders/Order/Sales_Order/Info?ID="+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function pe(i,n){if(1&i&&(e.TgZ(0,"tr"),e.YNc(1,re,3,1,"ng-container",1),e.TgZ(2,"td"),e._uU(3),e.qZA(),e.TgZ(4,"td"),e.YNc(5,le,3,1,"ng-container",24),e.YNc(6,se,2,2,"ng-template",null,25,e.W1O),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA(),e.TgZ(10,"td"),e._uU(11),e.ALo(12,"date"),e.qZA()()),2&i){const t=n.$implicit,a=e.MAs(7),o=e.oxw();e.xp6(1),e.Q6J("ngIf",o.isTokopediaAvailable),e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",t.ID==o.guidEmpty)("ngIfElse",a),e.xp6(4),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.xi3(12,6,t.Created,"dd MMM yyyy HH:mm"))}}class k{constructor(n,t,a,o,d){this.localDataService=n,this.channelService=t,this.orderService=a,this.toastr=o,this.acceptOrderService=d,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.domain=`https://${this.localDataService.getHostName()}`,this.guidEmpty=m.g.GuidEMpty,this.tokopediaType=r.x.Tokopedia,this.isTokopediaSelected=!1,this.isTokopediaAvailable=!1,this.isCheckAll=!1}ngOnInit(){this.initLoadPage()}initLoadPage(){this.orderService.loadInitialPage().subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.getNewOrders()})}getNewOrders(){this.newOrdersData$=this.orderService.getNewOrders({PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).pipe((0,B.d)(),(0,l.b)(t=>{t.filter(o=>o.Type==r.x.Tokopedia).length>0&&(this.isTokopediaAvailable=!0)}))}getPaginatonTotal(){this.paginationTotal$=this.orderService.getTotalNewOrders(this.filter.ListChannelID).pipe((0,B.d)())}onNextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getNewOrders()}onPreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getNewOrders()}onSelectOrderData(n){this.isTokopediaSelected=!1,n.filter(a=>a.selected).length>0&&(this.isTokopediaSelected=!0)}onSelectAllOrderData(n){n=n.map(t=>(t.Type==r.x.Tokopedia&&(t.selected=this.isCheckAll),t)),this.onSelectOrderData(n)}onAcceptOrder(n){let t=this.getSelectedTokopediaOrders(n);this.acceptOrderService.acceptTokopediaOrders(t).subscribe(a=>{this.isTokopediaSelected=!1,location.reload()})}getSelectedTokopediaOrders(n){return n.filter(a=>a.selected).map(a=>a.Number)}}function ce(i,n){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.ALo(5,"number"),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.ALo(8,"number"),e.qZA()()),2&i){const t=n.$implicit;e.xp6(2),e.Oqu(t.Code),e.xp6(2),e.Oqu(e.lcZ(5,3,t.Quantity)),e.xp6(3),e.Oqu(e.lcZ(8,5,t.Price))}}function de(i,n){if(1&i&&(e.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),e._uU(5,"Outlet Info"),e.qZA()(),e.TgZ(6,"div",4)(7,"div",9),e._uU(8," Outlet : "),e.qZA(),e.TgZ(9,"div",9),e._uU(10),e.qZA()(),e.TgZ(11,"div",4)(12,"div",9),e._uU(13," Date : "),e.qZA(),e.TgZ(14,"div",9),e._uU(15),e.ALo(16,"date"),e.qZA()(),e.TgZ(17,"div",4)(18,"div",9),e._uU(19," Status : "),e.qZA(),e.TgZ(20,"div",9),e._uU(21),e.qZA()(),e.TgZ(22,"div",4)(23,"div",9),e._uU(24," Tax Type : "),e.qZA(),e.TgZ(25,"div",9),e._uU(26),e.qZA()(),e.TgZ(27,"div",4)(28,"div",9),e._uU(29," Due Date : "),e.qZA(),e.TgZ(30,"div",9),e._uU(31),e.ALo(32,"date"),e.qZA()()(),e.TgZ(33,"div",6)(34,"div",7)(35,"h3",8),e._uU(36,"Customer Info"),e.qZA()(),e.TgZ(37,"div",4)(38,"div",9),e._uU(39," Name : "),e.qZA(),e.TgZ(40,"div",9),e._uU(41),e.qZA()(),e.TgZ(42,"div",4)(43,"div",9),e._uU(44," Email : "),e.qZA(),e.TgZ(45,"div",9),e._uU(46),e.qZA()(),e.TgZ(47,"div",4)(48,"div",9),e._uU(49," Mobile : "),e.qZA(),e.TgZ(50,"div",9),e._uU(51),e.qZA()()()(),e.TgZ(52,"div",10)(53,"h3",11),e._uU(54,"Products Sold"),e.qZA(),e.TgZ(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),e._uU(60,"Code"),e.qZA(),e.TgZ(61,"th"),e._uU(62,"Quantity"),e.qZA(),e.TgZ(63,"th"),e._uU(64,"Price"),e.qZA()()(),e.TgZ(65,"tbody"),e.YNc(66,ce,9,7,"tr",16),e.qZA()()()()()),2&i){const t=e.oxw();e.xp6(10),e.hij(" ",t.model.Outlet," "),e.xp6(5),e.hij(" ",e.xi3(16,9,t.model.Date,"dd MMM yyyy")," "),e.xp6(6),e.hij(" ",t.model.Delivery," "),e.xp6(5),e.hij(" ",t.model.TaxType," "),e.xp6(5),e.hij(" ",e.xi3(32,12,t.model.DueDate,"dd MMM yyyy")," "),e.xp6(10),e.hij(" ",t.model.Customer.Name," "),e.xp6(5),e.hij(" ",t.model.Customer.Email," "),e.xp6(5),e.hij(" ",t.model.Customer.Mobile," "),e.xp6(15),e.Q6J("ngForOf",t.model.Variants)}}k.\u0275fac=function(n){return new(n||k)(e.Y36(s.T),e.Y36(p.T),e.Y36(T),e.Y36(U._W),e.Y36(D))},k.\u0275cmp=e.Xpm({type:k,selectors:[["app-new-order"]],decls:44,vars:21,consts:[["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"hideSearchBox","onSubmit"],[4,"ngIf"],["container",""],["appearance","outline",1,"w-100"],["multiple","","placeholder","Choose channels",3,"ngModel","ngModelChange"],[3,"value","title","click",4,"ngFor","ngForOf"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],["type","button","data-cy","scanInPos","disabled","",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"disabled","click"],[1,"fa-solid","fa-check"],[3,"value","title","click"],[1,"me-1"],["alt","",2,"width","18px",3,"src"],[2,"width","5px"],["type","checkbox",3,"ngModel","ngModelChange"],[4,"ngIf","ngIfElse"],["NOT_EMPTY",""],["target","_blank",3,"href"]],template:function(n,t){if(1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(){return t.getNewOrders()}),e.TgZ(1,"actions"),e.YNc(2,ne,2,1,"ng-container",1),e.ALo(3,"async"),e.qZA(),e.TgZ(4,"filters")(5,"div",2)(6,"div")(7,"h6"),e._uU(8,"Channel"),e.qZA(),e.TgZ(9,"mat-form-field",3)(10,"mat-select",4),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(11,ae,5,5,"mat-option",5),e.qZA()()(),e.TgZ(12,"div")(13,"h6"),e._uU(14,"Page Number"),e.qZA(),e.TgZ(15,"input",6),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(16,"div")(17,"h6"),e._uU(18,"Page Size"),e.qZA(),e.TgZ(19,"input",7),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(20,"content")(21,"div",8)(22,"div",9)(23,"div",10)(24,"div",11)(25,"table",12)(26,"thead",13)(27,"tr",14),e.YNc(28,ie,3,1,"ng-container",1),e.ALo(29,"async"),e.TgZ(30,"th"),e._uU(31,"Outlet"),e.qZA(),e.TgZ(32,"th"),e._uU(33,"Order number"),e.qZA(),e.TgZ(34,"th"),e._uU(35,"Customer"),e.qZA(),e.TgZ(36,"th"),e._uU(37,"Created On"),e.qZA()()(),e.TgZ(38,"tbody"),e.YNc(39,pe,13,9,"tr",15),e.ALo(40,"async"),e.qZA()(),e.TgZ(41,"app-mat-paginator-no-count",16),e.NdJ("total",function(){return t.getPaginatonTotal()})("next",function(){return t.onNextPage()})("previous",function(){return t.onPreviousPage()}),e.ALo(42,"async"),e.ALo(43,"async"),e.qZA()()()()()()()),2&n){let a;e.Q6J("hideSearchBox",!0),e.xp6(2),e.Q6J("ngIf",e.lcZ(3,11,t.newOrdersData$)),e.xp6(8),e.Q6J("ngModel",t.filter.ListChannelID),e.xp6(1),e.Q6J("ngForOf",t.channels),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(9),e.Q6J("ngIf",t.isTokopediaAvailable&&e.lcZ(29,13,t.newOrdersData$)),e.xp6(11),e.Q6J("ngForOf",e.lcZ(40,15,t.newOrdersData$)),e.xp6(2),e.Q6J("filter",t.filter)("totaldata",null==(a=e.lcZ(42,17,t.newOrdersData$))?null:a.length)("paginationTotal",e.lcZ(43,19,t.paginationTotal$))}},dependencies:[h.sg,h.O5,c.Fj,c.wV,c.Wl,c.JJ,c.On,Z.p,N.n,O.KE,y.gD,x.ey,h.Ov,h.uU]});const ue=function(){return["/menu/Order"]};class J{constructor(n,t){this.http=n,this.url=t,this.number=this.url.snapshot.queryParams.Number,this.outlet=this.url.snapshot.queryParams.Outlet}ngOnInit(){this.Load()}Load(){this.http.post("/api/orders/GetInvoiceDetail",{Number:this.number,Outlet:this.outlet}).subscribe(t=>{this.model=t})}}J.\u0275fac=function(n){return new(n||J)(e.Y36(C.O),e.Y36(_.gz))},J.\u0275cmp=e.Xpm({type:J,selectors:[["app-detail-order"]],decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-secondary","btn-fill","btn-lg","me-3",3,"routerLink"],[1,"container"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"border","my-3","py-3","col-12"],[1,"row","m-2"],[1,"text-center"],[1,"col"],[1,"col-8"],[1,"text-center","my-3","py-3"],[1,"table-responsive"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"a",1),e._uU(3,"Back"),e.qZA()(),e.TgZ(4,"content")(5,"div",2),e.YNc(6,de,67,15,"div",3),e.qZA()()()),2&n&&(e.Q6J("headerTitle","Order #"+t.number)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(2),e.Q6J("routerLink",e.DdM(5,ue)),e.xp6(4),e.Q6J("ngIf",t.model))},dependencies:[h.sg,h.O5,Z.p,_.rH,h.JJ,h.uU]});class A{constructor(){}set typeId(n){this.channelLogo=m.g.getChannelLogoByTypeId(n),this.initChannelName(n)}initChannelName(n){switch(n){case r.x.Tokopedia:this.channelName="Tokopedia";break;case r.x.Tiktok:this.channelName="Tiktok";break;case r.x.WooCommerce:this.channelName="WooCommerce";break;case r.x.ShopeeV2:this.channelName="Shopee";break;case r.x.Lazada:this.channelName="Lazada";break;case r.x.KalCare:this.channelName="Kalcare"}}}function he(i,n){if(1&i&&(e.TgZ(0,"mat-option",19),e.NdJ("click",function(a){return a.stopPropagation()}),e.TgZ(1,"span",20),e._UZ(2,"img",21),e.qZA(),e.TgZ(3,"span"),e._uU(4),e.qZA()()),2&i){const t=n.$implicit;e.Q6J("value",t.ID)("title",t.Name)("title",t.Name),e.xp6(2),e.Q6J("src",t.img,e.LSH),e.xp6(2),e.hij(" ",t.Name," ")}}A.\u0275fac=function(n){return new(n||A)},A.\u0275cmp=e.Xpm({type:A,selectors:[["app-channel-logo"]],inputs:{typeId:"typeId"},decls:4,vars:2,consts:[[1,"d-flex","align-items-center"],[2,"width","20px",3,"src"],[1,"ms-2","fw-bold"]],template:function(n,t){1&n&&(e.TgZ(0,"div",0),e._UZ(1,"img",1),e.TgZ(2,"span",2),e._uU(3),e.qZA()()),2&n&&(e.xp6(1),e.Q6J("src",t.channelLogo,e.LSH),e.xp6(2),e.Oqu(t.channelName))}});const ge=function(){return["/menu/Order/detail"]},me=function(i,n){return{Number:i,Outlet:n}};function _e(i,n){if(1&i&&(e.TgZ(0,"a",28),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,ge))("queryParams",e.WLB(4,me,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number)}}function fe(i,n){if(1&i&&(e.TgZ(0,"a",29),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit,a=e.oxw();e.Q6J("href",a.domain+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function Te(i,n){if(1&i){const t=e.EpF();e.TgZ(0,"a",30),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,d=e.oxw();return e.KtG(d.onPrintShippingLabel(o.Number,o.ShopID,o.TypeID))}),e._UZ(1,"i",31),e.qZA()}}function Ce(i,n){if(1&i){const t=e.EpF();e.TgZ(0,"tr")(1,"td")(2,"input",22),e.NdJ("ngModelChange",function(o){const v=e.CHM(t).$implicit;return e.KtG(v.selected=o)})("ngModelChange",function(){const d=e.CHM(t).$implicit,v=e.oxw();return e.KtG(v.onCheckboxStateProduct(d.Number))}),e.qZA()(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e.YNc(6,_e,2,7,"a",23),e.YNc(7,fe,2,2,"a",24),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA(),e.TgZ(10,"td"),e._uU(11),e.ALo(12,"number"),e.qZA(),e.TgZ(13,"td"),e._uU(14),e.ALo(15,"date"),e.qZA(),e.TgZ(16,"td"),e._UZ(17,"app-channel-logo",25),e.qZA(),e.TgZ(18,"td",26),e.YNc(19,Te,2,0,"a",27),e.qZA()()}if(2&i){const t=n.$implicit,a=e.oxw();e.xp6(2),e.Q6J("ngModel",t.selected),e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",a.hasGuidEmpty(t.ID)),e.xp6(1),e.Q6J("ngIf",!a.hasGuidEmpty(t.ID)),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(12,9,t.Amount)),e.xp6(3),e.Oqu(e.xi3(15,11,t.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Q6J("typeId",t.TypeID),e.xp6(2),e.Q6J("ngIf",t.TypeID==a.channelType.ShopeeV2||t.TypeID==a.channelType.Tokopedia||t.TypeID==a.channelType.Tiktok||t.TypeID==a.channelType.Lazada)}}class L{constructor(n,t,a,o,d,v){this.http=n,this.toastr=t,this.localDataService=a,this.dialog=o,this.orderService=d,this.channelService=v,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.totaldata=0,this.paginationTotal=0,this.checkboxState=!1,this.channelType=r.x}ngOnInit(){this.Load()}getChannelLogo(n){return m.g.getChannelLogoByTypeId(n)}hasGuidEmpty(n){return n==m.g.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(n){this.http.post("api/orders/GetReadyToShip",{Number:n,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).subscribe(a=>{this.data=a.Data,this.totaldata=this.data.length})}onPrintShippingLabel(n,t,a){switch(a){case r.x.Tokopedia:this.orderService.printShippingLabelTokopedia(n);break;case r.x.Tiktok:this.orderService.printShippingLabelTiktok(n,t);break;case r.x.ShopeeV2:this.orderService.printShippingLabelShopee(n,t);break;case r.x.Lazada:this.orderService.printShippingLabelLazada(n,t)}}updateDelivery(){let n=this.getSelected();if(n.length>0){let t=[];n.forEach(a=>t.push(a)),this.http.post("/api/Orders/UpdateStateDelivery",t).subscribe(a=>{this.toastr.success("Successfully updated","Success")})}}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"Unpaid",DeliveryState:"Unsent",ListChannelID:this.filter.ListChannelID}).subscribe(t=>{this.paginationTotal=t.Total})}onCheckboxStateProduct(n){let t=this.data.filter(a=>a.Number==n);if(t.length>0)for(let a of t)a.selected=a.selected}onCheckboxStateChange(){for(let n of this.data)n.selected=this.checkboxState}getSelected(){let n=[];if(this.data){for(let t of this.data)t.selected&&n.push(t);return n}return[]}hasSelection(){return!!this.data&&this.getSelected().length>0}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}function Ze(i,n){if(1&i&&(e.TgZ(0,"mat-option",16),e.NdJ("click",function(a){return a.stopPropagation()}),e.TgZ(1,"span",17),e._UZ(2,"img",18),e.qZA(),e.TgZ(3,"span"),e._uU(4),e.qZA()()),2&i){const t=n.$implicit;e.Q6J("value",t.ID)("title",t.Name)("title",t.Name),e.xp6(2),e.Q6J("src",t.img,e.LSH),e.xp6(2),e.hij(" ",t.Name," ")}}L.\u0275fac=function(n){return new(n||L)(e.Y36(C.O),e.Y36(U._W),e.Y36(s.T),e.Y36(g.uw),e.Y36(T),e.Y36(p.T))},L.\u0275cmp=e.Xpm({type:L,selectors:[["app-ready-to-ship"]],decls:46,vars:10,consts:[["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["container","",1,""],["appearance","outline",1,"w-100"],["multiple","","placeholder","Choose channels",3,"ngModel","ngModelChange"],[3,"value","title","click",4,"ngFor","ngForOf"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"hidden","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"],[2,"width","5px"],["type","checkbox",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"value","title","click"],[1,"me-1"],["alt","",2,"width","18px",3,"src"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],["title","Print shipping label",3,"click"],[1,"fa-solid","fa-print","fs-3","cursor"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return t.Get(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"mat-form-field",2)(7,"mat-select",3),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(8,he,5,5,"mat-option",4),e.qZA()()(),e.TgZ(9,"div")(10,"h6"),e._uU(11,"Page Number"),e.qZA(),e.TgZ(12,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Size"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(17,"actions")(18,"button",7),e.NdJ("click",function(){return t.updateDelivery()}),e._uU(19," Dispatch "),e.qZA()(),e.TgZ(20,"content")(21,"div",8)(22,"div",9)(23,"div",10)(24,"div",11)(25,"table",12)(26,"thead",13)(27,"tr",14)(28,"th",15)(29,"input",16),e.NdJ("ngModelChange",function(o){return t.checkboxState=o})("ngModelChange",function(){return t.onCheckboxStateChange()}),e.qZA()(),e.TgZ(30,"th"),e._uU(31,"Outlet"),e.qZA(),e.TgZ(32,"th"),e._uU(33,"Order number"),e.qZA(),e.TgZ(34,"th"),e._uU(35,"Customer"),e.qZA(),e.TgZ(36,"th"),e._uU(37,"Amount"),e.qZA(),e.TgZ(38,"th"),e._uU(39,"Created On"),e.qZA(),e.TgZ(40,"th"),e._uU(41,"Channel Name"),e.qZA(),e._UZ(42,"th"),e.qZA()(),e.TgZ(43,"tbody"),e.YNc(44,Ce,20,14,"tr",17),e.qZA()(),e.TgZ(45,"app-mat-paginator-no-count",18),e.NdJ("total",function(){return t.StoreRowsCountAPIResult()})("next",function(){return t.NextPage()})("previous",function(){return t.PreviousPage()}),e.qZA()()()()()()()),2&n&&(e.xp6(7),e.Q6J("ngModel",t.filter.ListChannelID),e.xp6(1),e.Q6J("ngForOf",t.channels),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(2),e.Q6J("hidden",!t.hasSelection()),e.xp6(11),e.Q6J("ngModel",t.checkboxState),e.xp6(15),e.Q6J("ngForOf",t.data),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",t.totaldata)("paginationTotal",t.paginationTotal))},dependencies:[h.sg,h.O5,c.Fj,c.wV,c.Wl,c.JJ,c.On,Z.p,_.rH,N.n,A,O.KE,y.gD,x.ey,h.JJ,h.uU]});const ve=function(){return["/menu/Order/detail"]},be=function(i,n){return{Number:i,Outlet:n}};function Se(i,n){if(1&i&&(e.TgZ(0,"a",24),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,ve))("queryParams",e.WLB(4,be,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number)}}function De(i,n){if(1&i&&(e.TgZ(0,"a",25),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit,a=e.oxw();e.Q6J("href",a.domain+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function Ne(i,n){if(1&i){const t=e.EpF();e.TgZ(0,"a",26),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,d=e.oxw();return e.KtG(d.onPrintShippingLabel(o.Number,o.ShopID,o.TypeID))}),e._UZ(1,"i",27),e.qZA()}}function ye(i,n){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,Se,2,7,"a",19),e.YNc(5,De,2,2,"a",20),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e._UZ(15,"app-channel-logo",21),e.qZA(),e.TgZ(16,"td",22),e.YNc(17,Ne,2,0,"a",23),e.qZA()()),2&i){const t=n.$implicit,a=e.oxw();e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",a.hasGuidEmpty(t.ID)),e.xp6(1),e.Q6J("ngIf",!a.hasGuidEmpty(t.ID)),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,8,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,10,t.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Q6J("typeId",t.TypeID),e.xp6(2),e.Q6J("ngIf",t.TypeID==a.channelType.ShopeeV2||t.TypeID==a.channelType.Tokopedia||t.TypeID==a.channelType.Tiktok||t.TypeID==a.channelType.Lazada)}}class Q{constructor(n,t,a,o){this.http=n,this.localDataService=t,this.orderService=a,this.channelService=o,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.totaldata=0,this.paginationTotal=0,this.channelType=r.x}ngOnInit(){this.Load()}getChannelLogo(n){return m.g.getChannelLogoByTypeId(n)}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}hasGuidEmpty(n){return n==m.g.GuidEMpty}Get(n){this.http.post("api/orders/GetShipped",{Number:n,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).subscribe(a=>{this.data=a.Data,this.totaldata=this.data.length})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"Unpaid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID}).subscribe(t=>{this.paginationTotal=t.Total})}onPrintShippingLabel(n,t,a){switch(a){case r.x.Tokopedia:this.orderService.printShippingLabelTokopedia(n);break;case r.x.Tiktok:this.orderService.printShippingLabelTiktok(n,t);break;case r.x.ShopeeV2:this.orderService.printShippingLabelShopee(n,t);break;case r.x.Lazada:this.orderService.printShippingLabelLazada(n,t)}}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}Q.\u0275fac=function(n){return new(n||Q)(e.Y36(C.O),e.Y36(s.T),e.Y36(T),e.Y36(p.T))},Q.\u0275cmp=e.Xpm({type:Q,selectors:[["app-shipped"]],decls:41,vars:8,consts:[["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["container",""],["appearance","outline",1,"w-100"],["multiple","","placeholder","Choose channels",3,"ngModel","ngModelChange"],[3,"value","title","click",4,"ngFor","ngForOf"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"value","title","click"],[1,"me-1"],["alt","",2,"width","18px",3,"src"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],["title","Print shipping label",3,"click"],[1,"fa-solid","fa-print","fs-3","cursor"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return t.Get(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"mat-form-field",2)(7,"mat-select",3),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(8,Ze,5,5,"mat-option",4),e.qZA()()(),e.TgZ(9,"div")(10,"h6"),e._uU(11,"Page Number"),e.qZA(),e.TgZ(12,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Size"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(17,"content")(18,"div",7)(19,"div",8)(20,"div",9)(21,"div",10)(22,"table",11)(23,"thead",12)(24,"tr",13)(25,"th"),e._uU(26,"Outlet"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Order number"),e.qZA(),e.TgZ(29,"th"),e._uU(30,"Customer"),e.qZA(),e.TgZ(31,"th"),e._uU(32,"Amount"),e.qZA(),e.TgZ(33,"th"),e._uU(34,"Created On"),e.qZA(),e.TgZ(35,"th"),e._uU(36,"Channel Name"),e.qZA(),e._UZ(37,"th"),e.qZA()(),e.TgZ(38,"tbody"),e.YNc(39,ye,18,13,"tr",14),e.qZA()(),e.TgZ(40,"app-mat-paginator-no-count",15),e.NdJ("total",function(){return t.StoreRowsCountAPIResult()})("next",function(){return t.NextPage()})("previous",function(){return t.PreviousPage()}),e.qZA()()()()()()()),2&n&&(e.xp6(7),e.Q6J("ngModel",t.filter.ListChannelID),e.xp6(1),e.Q6J("ngForOf",t.channels),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(23),e.Q6J("ngForOf",t.data),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",t.totaldata)("paginationTotal",t.paginationTotal))},dependencies:[h.sg,h.O5,c.Fj,c.wV,c.JJ,c.On,Z.p,_.rH,N.n,A,O.KE,y.gD,x.ey,h.JJ,h.uU]});var xe=u(501);function Ae(i,n){if(1&i&&(e.TgZ(0,"mat-option",16),e.NdJ("click",function(a){return a.stopPropagation()}),e.TgZ(1,"span",17),e._UZ(2,"img",18),e.qZA(),e.TgZ(3,"span"),e._uU(4),e.qZA()()),2&i){const t=n.$implicit;e.Q6J("value",t.ID)("title",t.Name)("title",t.Name),e.xp6(2),e.Q6J("src",t.img,e.LSH),e.xp6(2),e.hij(" ",t.Name," ")}}const Pe=function(){return["/menu/Order/detail"]},we=function(i,n){return{Number:i,Outlet:n}};function Oe(i,n){if(1&i&&(e.TgZ(0,"a",24),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,Pe))("queryParams",e.WLB(4,we,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number)}}function Ie(i,n){if(1&i&&(e.TgZ(0,"a",25),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit,a=e.oxw();e.Q6J("href",a.customerInfoUrl+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function qe(i,n){if(1&i){const t=e.EpF();e.TgZ(0,"a",26),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,d=e.oxw();return e.KtG(d.onPrintShippingLabel(o.Number,o.ShopID,o.TypeID))}),e._UZ(1,"i",27),e.qZA()}}function Me(i,n){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,Oe,2,7,"a",19),e.YNc(5,Ie,2,2,"a",20),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e._UZ(15,"app-channel-logo",21),e.qZA(),e.TgZ(16,"td",22),e.YNc(17,qe,2,0,"a",23),e.qZA()()),2&i){const t=n.$implicit,a=e.oxw();e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",a.hasGuidEmpty(t.ID)),e.xp6(1),e.Q6J("ngIf",!a.hasGuidEmpty(t.ID)),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,8,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,10,t.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Q6J("typeId",t.TypeID),e.xp6(2),e.Q6J("ngIf",t.TypeID==a.channelType.ShopeeV2||t.TypeID==a.channelType.Tokopedia||t.TypeID==a.channelType.Tiktok)}}class F{constructor(n,t,a,o){this.http=n,this.orderService=t,this.authService=a,this.channelService=o,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.totaldata=0,this.paginationTotal=0,this.channelType=r.x}ngOnInit(){this.Load()}hasGuidEmpty(n){return n==m.g.GuidEMpty}getChannelLogo(n){return m.g.getChannelLogoByTypeId(n)}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.customerInfoUrl=`${this.authService.getDomain()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(n){this.http.post("api/orders/GetDelivered ",{Number:n,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).subscribe(a=>{this.data=a.Data,this.totaldata=this.data.length})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"Paid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID}).subscribe(t=>{this.paginationTotal=t.Total})}onPrintShippingLabel(n,t,a){switch(a){case r.x.Tokopedia:this.orderService.printShippingLabelTokopedia(n);break;case r.x.Tiktok:this.orderService.printShippingLabelTiktok(n,t);break;case r.x.ShopeeV2:this.orderService.printShippingLabelShopee(n,t)}}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}function Ue(i,n){if(1&i&&(e.TgZ(0,"mat-option",16),e.NdJ("click",function(a){return a.stopPropagation()}),e.TgZ(1,"span",17),e._UZ(2,"img",18),e.qZA(),e.TgZ(3,"span"),e._uU(4),e.qZA()()),2&i){const t=n.$implicit;e.Q6J("value",t.ID)("title",t.Name)("title",t.Name),e.xp6(2),e.Q6J("src",t.img,e.LSH),e.xp6(2),e.hij(" ",t.Name," ")}}F.\u0275fac=function(n){return new(n||F)(e.Y36(C.O),e.Y36(T),e.Y36(xe.e),e.Y36(p.T))},F.\u0275cmp=e.Xpm({type:F,selectors:[["app-delivered"]],decls:41,vars:9,consts:[["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"hideSearchBox","onSubmit"],["container","",1,""],["appearance","outline",1,"w-100"],["multiple","","placeholder","Choose channels",3,"ngModel","ngModelChange"],[3,"value","title","click",4,"ngFor","ngForOf"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"value","title","click"],[1,"me-1"],["alt","",2,"width","18px",3,"src"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],["title","Print shipping label",3,"click"],[1,"fa-solid","fa-print","fs-3","cursor"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return t.Get(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"mat-form-field",2)(7,"mat-select",3),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(8,Ae,5,5,"mat-option",4),e.qZA()()(),e.TgZ(9,"div")(10,"h6"),e._uU(11,"Page Number"),e.qZA(),e.TgZ(12,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Size"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(17,"content")(18,"div",7)(19,"div",8)(20,"div",9)(21,"div",10)(22,"table",11)(23,"thead",12)(24,"tr",13)(25,"th"),e._uU(26,"Outlet"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Order number"),e.qZA(),e.TgZ(29,"th"),e._uU(30,"Customer"),e.qZA(),e.TgZ(31,"th"),e._uU(32,"Amount"),e.qZA(),e.TgZ(33,"th"),e._uU(34,"Created On"),e.qZA(),e.TgZ(35,"th"),e._uU(36,"Channel Name"),e.qZA(),e._UZ(37,"th"),e.qZA()(),e.TgZ(38,"tbody"),e.YNc(39,Me,18,13,"tr",14),e.qZA()(),e.TgZ(40,"app-mat-paginator-no-count",15),e.NdJ("total",function(){return t.StoreRowsCountAPIResult()})("next",function(){return t.NextPage()})("previous",function(){return t.PreviousPage()}),e.qZA()()()()()()()),2&n&&(e.Q6J("hideSearchBox",!0),e.xp6(7),e.Q6J("ngModel",t.filter.ListChannelID),e.xp6(1),e.Q6J("ngForOf",t.channels),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(23),e.Q6J("ngForOf",t.data),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",t.totaldata)("paginationTotal",t.paginationTotal))},dependencies:[h.sg,h.O5,c.Fj,c.wV,c.JJ,c.On,Z.p,_.rH,N.n,A,O.KE,y.gD,x.ey,h.JJ,h.uU]});const ke=function(){return["/menu/Order/detail"]},Je=function(i,n){return{Number:i,Outlet:n}};function Le(i,n){if(1&i&&(e.TgZ(0,"a",21),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,ke))("queryParams",e.WLB(4,Je,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number)}}function Qe(i,n){if(1&i&&(e.TgZ(0,"a",22),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit,a=e.oxw();e.Q6J("href",a.domain+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function Fe(i,n){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,Le,2,7,"a",19),e.YNc(5,Qe,2,2,"a",20),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"td"),e._uU(15),e.qZA()()),2&i){const t=n.$implicit,a=e.oxw();e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",a.hasGuidEmpty(t.ID)),e.xp6(1),e.Q6J("ngIf",!a.hasGuidEmpty(t.ID)),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,7,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,9,t.Created,"dd MMM yyyy HH:mm")),e.xp6(3),e.Oqu(t.State)}}class Y{constructor(n,t,a){this.http=n,this.localDataService=t,this.channelService=a,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.totaldata=0,this.paginationTotal=0}ngOnInit(){this.Load()}hasGuidEmpty(n){return n==m.g.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(n){this.http.post("api/orders/GetAll ",{Number:n,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).subscribe(a=>{this.data=a.Data,this.totaldata=this.data.length})}changePage(n){this.filter=n,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"",DeliveryState:"",Bin:!1,ListChannelID:this.filter.ListChannelID}).subscribe(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}}function Ye(i,n){if(1&i&&(e.TgZ(0,"mat-option",16),e.NdJ("click",function(a){return a.stopPropagation()}),e.TgZ(1,"span",17),e._UZ(2,"img",18),e.qZA(),e.TgZ(3,"span"),e._uU(4),e.qZA()()),2&i){const t=n.$implicit;e.Q6J("value",t.ID)("title",t.Name)("title",t.Name),e.xp6(2),e.Q6J("src",t.img,e.LSH),e.xp6(2),e.hij(" ",t.Name," ")}}Y.\u0275fac=function(n){return new(n||Y)(e.Y36(C.O),e.Y36(s.T),e.Y36(p.T))},Y.\u0275cmp=e.Xpm({type:Y,selectors:[["app-all-order"]],decls:40,vars:8,consts:[["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["container",""],["appearance","outline",1,"w-100"],["multiple","","placeholder","Choose channels",3,"ngModel","ngModelChange"],[3,"value","title","click",4,"ngFor","ngForOf"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"value","title","click"],[1,"me-1"],["alt","",2,"width","18px",3,"src"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return t.Get(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"mat-form-field",2)(7,"mat-select",3),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(8,Ue,5,5,"mat-option",4),e.qZA()()(),e.TgZ(9,"div")(10,"h6"),e._uU(11,"Page Number"),e.qZA(),e.TgZ(12,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Size"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(17,"content")(18,"div",7)(19,"div",8)(20,"div",9)(21,"div",10)(22,"table",11)(23,"thead",12)(24,"tr",13)(25,"th"),e._uU(26,"Outlet"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Order number"),e.qZA(),e.TgZ(29,"th"),e._uU(30,"Customer"),e.qZA(),e.TgZ(31,"th"),e._uU(32,"Amount"),e.qZA(),e.TgZ(33,"th"),e._uU(34,"Created On"),e.qZA(),e.TgZ(35,"th"),e._uU(36,"Status"),e.qZA()()(),e.TgZ(37,"tbody"),e.YNc(38,Fe,16,12,"tr",14),e.qZA()(),e.TgZ(39,"app-mat-paginator-no-count",15),e.NdJ("total",function(){return t.StoreRowsCountAPIResult()})("next",function(){return t.NextPage()})("previous",function(){return t.PreviousPage()}),e.qZA()()()()()()()),2&n&&(e.xp6(7),e.Q6J("ngModel",t.filter.ListChannelID),e.xp6(1),e.Q6J("ngForOf",t.channels),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(22),e.Q6J("ngForOf",t.data),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",t.totaldata)("paginationTotal",t.paginationTotal))},dependencies:[h.sg,h.O5,c.Fj,c.wV,c.JJ,c.On,Z.p,_.rH,N.n,O.KE,y.gD,x.ey,h.JJ,h.uU]});const Ge=function(){return["/menu/Order/detail"]},Ee=function(i,n){return{Number:i,Outlet:n}};function Re(i,n){if(1&i&&(e.TgZ(0,"a",21),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit;e.Q6J("routerLink",e.DdM(3,Ge))("queryParams",e.WLB(4,Ee,t.Number,t.Outlet)),e.xp6(1),e.Oqu(t.Number)}}function $e(i,n){if(1&i&&(e.TgZ(0,"a",22),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit,a=e.oxw();e.Q6J("href",a.domain+t.ID,e.LSH),e.xp6(1),e.Oqu(t.Number)}}function ze(i,n){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,Re,2,7,"a",19),e.YNc(5,$e,2,2,"a",20),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.ALo(10,"number"),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.ALo(13,"date"),e.qZA()()),2&i){const t=n.$implicit,a=e.oxw();e.xp6(2),e.Oqu(t.Outlet),e.xp6(2),e.Q6J("ngIf",a.hasGuidEmpty(t.ID)),e.xp6(1),e.Q6J("ngIf",!a.hasGuidEmpty(t.ID)),e.xp6(2),e.Oqu(t.Customer),e.xp6(2),e.Oqu(e.lcZ(10,6,t.Amount)),e.xp6(3),e.Oqu(e.xi3(13,8,t.Created,"dd MMM yyyy HH:mm"))}}class G{constructor(n,t,a){this.http=n,this.localDataService=t,this.channelService=a,this.filter={PageNumber:null,PageSize:null,ListChannelID:[]},this.totaldata=0,this.paginationTotal=0}ngOnInit(){this.Load()}hasGuidEmpty(n){return n==m.g.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(n=>{this.filter.PageNumber=n.Filter.PageNumber,this.filter.PageSize=n.Filter.RowCount,this.channels=n.Options.Channel,this.channels=this.channelService.mapChannelImage(this.channels),this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(n){this.http.post("api/orders/GetCancelled ",{Number:n,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID}).subscribe(a=>{this.data=a.Data,this.totaldata=this.data.length})}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){this.http.post("api/orders/GetRowCount",{PaymentState:"",DeliveryState:"",Bin:!0,ListChannelID:this.filter.ListChannelID}).subscribe(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}getChannelLogo(n){return m.g.getChannelLogoByTypeId(n)}}G.\u0275fac=function(n){return new(n||G)(e.Y36(C.O),e.Y36(s.T),e.Y36(p.T))},G.\u0275cmp=e.Xpm({type:G,selectors:[["app-cancelled"]],decls:38,vars:8,consts:[["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],["container","",1,""],["appearance","outline",1,"w-100"],["multiple","","placeholder","Choose channels",3,"ngModel","ngModelChange"],[3,"value","title","click",4,"ngFor","ngForOf"],["type","number","name","PageNumber",1,"w-100",3,"ngModel","ngModelChange"],["type","number","name","PageSize",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"filter","totaldata","paginationTotal","total","next","previous"],[3,"value","title","click"],[1,"me-1"],["alt","",2,"width","18px",3,"src"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"]],template:function(n,t){1&n&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(o){return t.Get(o)}),e.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),e._uU(5,"Channel"),e.qZA(),e.TgZ(6,"mat-form-field",2)(7,"mat-select",3),e.NdJ("ngModelChange",function(o){return t.filter.ListChannelID=o}),e.YNc(8,Ye,5,5,"mat-option",4),e.qZA()()(),e.TgZ(9,"div")(10,"h6"),e._uU(11,"Page Number"),e.qZA(),e.TgZ(12,"input",5),e.NdJ("ngModelChange",function(o){return t.filter.PageNumber=o}),e.qZA()(),e.TgZ(13,"div")(14,"h6"),e._uU(15,"Page Size"),e.qZA(),e.TgZ(16,"input",6),e.NdJ("ngModelChange",function(o){return t.filter.PageSize=o}),e.qZA()()()(),e.TgZ(17,"content")(18,"div",7)(19,"div",8)(20,"div",9)(21,"div",10)(22,"table",11)(23,"thead",12)(24,"tr",13)(25,"th"),e._uU(26,"Outlet"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Order number"),e.qZA(),e.TgZ(29,"th"),e._uU(30,"Customer"),e.qZA(),e.TgZ(31,"th"),e._uU(32,"Amount"),e.qZA(),e.TgZ(33,"th"),e._uU(34,"Created On"),e.qZA()()(),e.TgZ(35,"tbody"),e.YNc(36,ze,14,11,"tr",14),e.qZA()(),e.TgZ(37,"app-mat-paginator-no-count",15),e.NdJ("total",function(){return t.StoreRowsCountAPIResult()})("next",function(){return t.NextPage()})("previous",function(){return t.PreviousPage()}),e.qZA()()()()()()()),2&n&&(e.xp6(7),e.Q6J("ngModel",t.filter.ListChannelID),e.xp6(1),e.Q6J("ngForOf",t.channels),e.xp6(4),e.Q6J("ngModel",t.filter.PageNumber),e.xp6(4),e.Q6J("ngModel",t.filter.PageSize),e.xp6(20),e.Q6J("ngForOf",t.data),e.xp6(1),e.Q6J("filter",t.filter)("totaldata",t.totaldata)("paginationTotal",t.paginationTotal))},dependencies:[h.sg,h.O5,c.Fj,c.wV,c.JJ,c.On,Z.p,_.rH,N.n,O.KE,y.gD,x.ey,h.JJ,h.uU]});var He=u(2138),P=(()=>{return(i=P||(P={}))[i.DoNothing=0]="DoNothing",i[i.New=1]="New",i[i.Update=2]="Update",P;var i})(),Be=u(6082),j=u(8796),E=u(9602),R=u(8425),K=u(266);function je(i,n){if(1&i){const t=e.EpF();e.TgZ(0,"button",27),e.NdJ("click",function(){e.CHM(t),e.oxw();const o=e.MAs(11);return e.KtG(o.previous())}),e._uU(1," Back "),e.qZA()}}function We(i,n){if(1&i){const t=e.EpF();e.TgZ(0,"button",28),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(),d=e.MAs(11);return e.KtG(o.onNext(d))}),e._uU(1," Next "),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("disabled",t.checkDisabledNextFilter())}}function Ke(i,n){if(1&i){const t=e.EpF();e.TgZ(0,"button",27),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(),d=e.MAs(11);return e.KtG(o.onNew(d))}),e._UZ(1,"i",29),e._uU(2," New "),e.qZA()}}function Ve(i,n){1&i&&e._uU(0,"Filter")}function Xe(i,n){if(1&i&&(e.TgZ(0,"ng-option",30),e._UZ(1,"img",31),e._uU(2),e.qZA()),2&i){const t=n.$implicit;e.Q6J("value",t.ID),e.xp6(1),e.s9C("src",t.Img,e.LSH),e.xp6(1),e.hij("",t.Name," ")}}function et(i,n){1&i&&e._uU(0,"Preview")}function tt(i,n){if(1&i&&(e.TgZ(0,"th",49),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Oqu(0==t.getTypeID()?"Last Status Update":"Created Date")}}function nt(i,n){if(1&i&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"date"),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,t.Date,"dd MMM yyyy HH:mm:ss"),"")}}function at(i,n){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",t.ActionString," ")}}function it(i,n){if(1&i&&(e.TgZ(0,"li"),e._uU(1),e.qZA()),2&i){const t=n.$implicit;e.xp6(1),e.hij("",t," ")}}function ot(i,n){if(1&i&&(e.TgZ(0,"ul",55),e.YNc(1,it,2,1,"li",50),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",t.ActionString)}}function rt(i,n){if(1&i&&(e.TgZ(0,"span",56),e._UZ(1,"i",57),e.qZA()),2&i){const t=e.oxw().$implicit;e.hYB("title","Delivery : ",t.DeliveryState," \nPayment : ",t.PaymentState,"")}}const lt=function(i,n){return{"over-due-today":i,"over-due":n}};function st(i,n){if(1&i&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.YNc(5,nt,3,4,"td",51),e.TgZ(6,"td")(7,"span"),e._uU(8),e.qZA(),e._uU(9),e.qZA(),e.TgZ(10,"td",52)(11,"span"),e._uU(12),e.qZA(),e._uU(13),e.qZA(),e.TgZ(14,"td"),e.YNc(15,at,2,1,"span",51),e.YNc(16,ot,2,1,"ul",53),e.qZA(),e.TgZ(17,"td"),e.YNc(18,rt,2,2,"span",54),e.qZA()()),2&i){const t=n.$implicit,a=n.index,o=e.oxw(3);e.xp6(2),e.Oqu(a+1),e.xp6(2),e.Oqu(t.Number),e.xp6(1),e.Q6J("ngIf",o.getTypeID()!=o.channelType.ShopeeV2),e.xp6(3),e.hij("",t.ChannelStatus," - "),e.xp6(1),e.Oqu(t.ChannelStatusDescription),e.xp6(1),e.Q6J("ngClass",e.WLB(12,lt,(null==t?null:t.Action)==o.actionPreviewOrder.Update,(null==t?null:t.Action)==o.actionPreviewOrder.New))("matTooltip",91==t.POSStatus||"Conflict"==t.POSStatusDescription?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),e.xp6(2),e.hij("",t.POSStatus," - "),e.xp6(1),e.hij("",t.POSStatusDescription," "),e.xp6(2),e.Q6J("ngIf",1==t.ActionString.length),e.xp6(1),e.Q6J("ngIf",t.ActionString.length>1),e.xp6(2),e.Q6J("ngIf",99!=t.ChannelStatus&&99!=t.POSStatus)}}function pt(i,n){if(1&i&&(e.ynx(0),e.YNc(1,st,19,15,"tr",50),e.BQk()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.displayedPreviewData)}}function ct(i,n){1&i&&(e.TgZ(0,"tr",58)(1,"td",59)(2,"div",60),e._UZ(3,"i",61),e.qZA(),e.TgZ(4,"h4",62),e._uU(5,"There is no order to processed"),e.qZA()()())}function dt(i,n){if(1&i){const t=e.EpF();e.TgZ(0,"div",32)(1,"div",33)(2,"div",34)(3,"ul",35)(4,"li",36)(5,"button",37),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.filterPreviewData(o.previewStatus.ALL))}),e._uU(6),e.qZA()(),e.TgZ(7,"li",36)(8,"button",38),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.filterPreviewData(o.previewStatus.SYNC))}),e._uU(9),e.qZA()(),e.TgZ(10,"li",36)(11,"button",39),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.filterPreviewData(o.previewStatus.WRONG))}),e._uU(12),e.qZA()(),e.TgZ(13,"li",36)(14,"button",40),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.filterPreviewData(o.previewStatus.UNSYNC))}),e._uU(15),e.qZA()()()(),e.TgZ(16,"table",41)(17,"thead",42)(18,"tr"),e._UZ(19,"th",43),e.TgZ(20,"th",44),e._uU(21,"Number"),e.qZA(),e.YNc(22,tt,2,1,"th",45),e.TgZ(23,"th",46),e._uU(24,"Channel Status"),e.qZA(),e.TgZ(25,"th",46),e._uU(26,"POS Status"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Action"),e.qZA(),e._UZ(29,"th",43),e.qZA()(),e.TgZ(30,"tbody"),e.YNc(31,pt,2,1,"ng-container",47),e.YNc(32,ct,6,0,"ng-template",null,48,e.W1O),e.qZA()()()()}if(2&i){const t=e.MAs(33),a=e.oxw();e.xp6(5),e.Q6J("ngClass","all"==a.pillStatus?"btn-secondary text-white":"btn-outline-dark"),e.xp6(1),e.hij("All (",a.allData,")"),e.xp6(2),e.Q6J("ngClass","sync"==a.pillStatus?"btn-success":"btn-outline-success"),e.xp6(1),e.hij("Existing (",a.syncData,")"),e.xp6(2),e.Q6J("ngClass","wrong"==a.pillStatus?"btn-warning text-white":"btn-outline-warning"),e.xp6(1),e.hij("Wrong Status (",a.wrongData,")"),e.xp6(2),e.Q6J("ngClass","unsync"==a.pillStatus?"btn-danger":"btn-outline-danger"),e.xp6(1),e.hij("Missing (",a.unsyncData,")"),e.xp6(7),e.Q6J("ngIf",a.getTypeID()!=a.channelType.ShopeeV2),e.xp6(9),e.Q6J("ngIf",a.displayedPreviewData.length>0)("ngIfElse",t)}}function ut(i,n){1&i&&e._uU(0,"Finish")}const ht=function(i){return{"over-due":i}};function gt(i,n){if(1&i&&(e.TgZ(0,"tr",65)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA()()),2&i){const t=n.$implicit,a=n.index;e.Q6J("ngClass",e.VKq(5,ht,t.Exception)),e.xp6(2),e.Oqu(a+1),e.xp6(2),e.Oqu(t.Number),e.xp6(2),e.Oqu(t.Status),e.xp6(2),e.Oqu(t.Exception)}}function mt(i,n){if(1&i&&(e.ynx(0),e.YNc(1,gt,9,7,"tr",64),e.BQk()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.downloadData)}}function _t(i,n){1&i&&(e.TgZ(0,"tr",58)(1,"td",59)(2,"div",60),e._UZ(3,"i",61),e.qZA(),e.TgZ(4,"h4",62),e._uU(5,"There is no order to processed"),e.qZA()()())}function ft(i,n){if(1&i&&(e.TgZ(0,"div",32)(1,"div",33)(2,"table",41)(3,"thead",42)(4,"tr"),e._UZ(5,"th",43),e.TgZ(6,"th"),e._uU(7,"Order Number"),e.qZA(),e.TgZ(8,"th"),e._uU(9,"Status"),e.qZA(),e.TgZ(10,"th"),e._uU(11,"Exception"),e.qZA()()(),e.TgZ(12,"tbody"),e.YNc(13,mt,2,1,"ng-container",47),e.YNc(14,_t,6,0,"ng-template",null,63,e.W1O),e.qZA()()()()),2&i){const t=e.MAs(15),a=e.oxw();e.xp6(13),e.Q6J("ngIf",(null==a.downloadData?null:a.downloadData.length)>0)("ngIfElse",t)}}function Tt(i,n){1&i&&e._UZ(0,"i",66)}function Ct(i,n){1&i&&e._UZ(0,"i",67)}function Zt(i,n){1&i&&e._UZ(0,"i",68)}var f=(()=>{return(i=f||(f={})).ALL="all",i.SYNC="sync",i.WRONG="wrong",i.UNSYNC="unsync",f;var i})();class ${constructor(n,t,a,o,d){this.http=n,this.toastr=t,this.datePipe=a,this.url=o,this.productService=d,this.pageTitle="Download to POS",this.pillStatus="all",this.displayedPreviewData=[],this.previewData=[],this.channelType=r.x,this.previewStatus=f,this.currentState="filter",this.wrongData=0,this.unsyncData=0,this.syncData=0,this.allData=0,this.actionPreviewOrder=P}ngOnInit(){this.initPageLoader(),this.url.queryParams.subscribe(n=>{this.channelID=n.ChannelID,this.startDate=new Date(n.Date),this.endDate=new Date(n.Date)})}initPageLoader(){this.productService.loader().subscribe(n=>{this.channelOptions=n.Options.Channel})}onDownload(n){this.http.post("/api/Orders/Download",{ID:this.channelID,From:this.startDate,To:this.endDate,ListPreview:this.downloadedPreviewData}).subscribe(a=>{this.downloadData=a.Body,this.onStepperNext(n)})}onPreview(n){this.validateDatePreview()&&this.http.post("/api/Orders/Preview",{ID:this.channelID,From:this.startDate,To:this.endDate}).subscribe(a=>{0!=a.length?(this.previewData=a,this.groupingPreviewData(),this.filterPreviewData(f.ALL),this.initLengthStatusData(),this.onStepperNext(n)):this.toastrEmptyPreview()})}toastrEmptyPreview(){this.toastr.info("There is no orders from "+this.datePipe.transform(this.startDate,"dd MMM yyyy")+" to "+this.datePipe.transform(this.endDate,"dd MMM yyyy")+" !","No Orders!")}validateDatePreview(){let n=!0;return m.g.getDaysDiff(this.startDate,this.endDate)>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Failed"),n=!1),n}setPageTitle(n){const t=m.g.formatTitleFromDate(new Date(this.startDate),new Date(this.endDate)),a=this.datePipe.transform(this.startDate,t),o=this.datePipe.transform(this.endDate,"dd MMM yyyy");this.pageTitle=`\n ${n} (${null==t?"":a+"-"} ${o})\n `}onNew(n){this.channelID=null,this.startDate=null,this.endDate=null,this.pageTitle="Download to POS",n.reset()}groupingPreviewData(){let n=this.filterDataByStatus(f.UNSYNC),t=this.filterDataByStatus(f.WRONG);this.downloadedPreviewData=[...n,...t]}filterDataByStatus(n){let t=[];switch(n){case f.ALL:t=this.previewData;break;case f.SYNC:t=this.previewData.filter(a=>a.Action==P.DoNothing);break;case f.WRONG:t=this.previewData.filter(a=>a.Action==P.Update);break;case f.UNSYNC:t=this.previewData.filter(a=>a.Action==P.New)}return t}filterPreviewData(n){this.pillStatus=n,this.displayedPreviewData=this.filterDataByStatus(n)}initLengthStatusData(){this.wrongData=this.filterDataByStatus(f.WRONG).length,this.allData=this.previewData.length,this.syncData=this.filterDataByStatus(f.SYNC).length,this.unsyncData=this.filterDataByStatus(f.UNSYNC).length}getTypeID(){var n=this.channelOptions.find(t=>t.ID==this.channelID)?.TypeID;return n??0}onStepperChange(n){this.currentState=n.selectedStep.state}onStepperNext(n){n.selected.completed=!0,n.next()}onNext(n){switch(this.currentState){case"filter":this.onPreview(n);break;case"preview":this.onDownload(n)}}stepChange(n){switch(n?.selectedStep?.state){case"filter":this.pageTitle="Download To POS",this.resetPreviewData();break;case"preview":let t=this.productService.findChannelById(this.channelID,this.channelOptions);this.setPageTitle(`Preview ${t?.Name}`);break;case"finish":this.setPageTitle("Download")}}resetPreviewData(){this.displayedPreviewData=[],this.previewData=[],this.initLengthStatusData()}checkDisabledNextFilter(){let n=!m.g.isValidDate(this.startDate)||!m.g.isValidDate(this.endDate),t=m.g.IsEmpty(this.channelID);return n||t}}$.\u0275fac=function(n){return new(n||$)(e.Y36(C.O),e.Y36(U._W),e.Y36(h.uU),e.Y36(_.gz),e.Y36(Be.M))},$.\u0275cmp=e.Xpm({type:$,selectors:[["app-download"]],features:[e._Bn([{provide:He.gx,useValue:{displayDefaultIndicatorType:!1}}])],decls:47,vars:20,consts:[[3,"headerTitle","description","hideSearchBox","hideSearchDropdown"],["class","btn btn-outline-secondary btn-fill btn-lg ms-2",3,"click",4,"ngIf"],["class","btn btn-outline-secondary btn-fill btn-lg ms-2","type","button",3,"disabled","click",4,"ngIf"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["labelPosition","bottom","linear","",1,"w-100","stepper-download",3,"ngClass","selectionChange"],["stepper",""],["state","filter",3,"editable","completed"],["matStepLabel",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-6"],[1,"text-muted"],["appendTo","body",3,"clearable","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-1rem"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModel","ngModelChange","click"],["matEndDate","","placeholder","End date",3,"ngModel","ngModelChange","click"],["picker",""],["state","preview",3,"editable","completed"],["class","row pt-2",4,"ngIf"],["state","finish"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2",3,"click"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-2",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"nav","nav-pills"],[1,"nav-item","mx-3"],[1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"ngClass","click"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%",4,"ngIf"],["width","10%"],[4,"ngIf","ngIfElse"],["EMPTY",""],["width","15%"],[4,"ngFor","ngForOf"],[4,"ngIf"],["matTooltipClass","custom-width-tooltip",3,"ngClass","matTooltip"],["class","ps-5",4,"ngIf"],[3,"title",4,"ngIf"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],["EMPTY_DOWNLOAD",""],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"fa-solid","fa-filter"],[1,"fa-solid","fa-file"],[1,"fa-sharp","fa-solid","fa-flag"]],template:function(n,t){if(1&n){const a=e.EpF();e.TgZ(0,"mainpanel",0)(1,"actions"),e.YNc(2,je,2,0,"button",1),e.YNc(3,We,2,1,"button",2),e.YNc(4,Ke,3,0,"button",1),e.qZA(),e.TgZ(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"mat-stepper",7,8),e.NdJ("selectionChange",function(d){return t.stepChange(d)})("selectionChange",function(d){return t.onStepperChange(d)}),e.TgZ(12,"mat-step",9),e.YNc(13,Ve,1,0,"ng-template",10),e.TgZ(14,"div",11)(15,"div",5)(16,"div",4)(17,"div",12)(18,"h5"),e._uU(19,"Select a Channel"),e.qZA(),e.TgZ(20,"p",13),e._uU(21,"Select Channel want to download order"),e.qZA()(),e.TgZ(22,"div",12)(23,"ng-select",14),e.NdJ("ngModelChange",function(d){return t.channelID=d}),e.YNc(24,Xe,3,3,"ng-option",15),e.qZA()()(),e.TgZ(25,"div",16)(26,"div",12)(27,"h5"),e._uU(28,"Date Range"),e.qZA(),e.TgZ(29,"p",13),e._uU(30,"Select transaction date of the channel you want to download (Max 2 Weeks)"),e.qZA()(),e.TgZ(31,"div",12)(32,"div",5)(33,"mat-date-range-input",17)(34,"input",18),e.NdJ("ngModelChange",function(d){return t.startDate=d})("click",function(){e.CHM(a);const d=e.MAs(37);return e.KtG(d.open())}),e.qZA(),e.TgZ(35,"input",19),e.NdJ("ngModelChange",function(d){return t.endDate=d})("click",function(){e.CHM(a);const d=e.MAs(37);return e.KtG(d.open())}),e.qZA()(),e._UZ(36,"mat-date-range-picker",null,20),e.qZA()()()()()(),e.TgZ(38,"mat-step",21),e.YNc(39,et,1,0,"ng-template",10),e.YNc(40,dt,34,11,"div",22),e.qZA(),e.TgZ(41,"mat-step",23),e.YNc(42,ut,1,0,"ng-template",10),e.YNc(43,ft,16,2,"div",22),e.qZA(),e.YNc(44,Tt,1,0,"ng-template",24),e.YNc(45,Ct,1,0,"ng-template",25),e.YNc(46,Zt,1,0,"ng-template",26),e.qZA()()()()()()()}if(2&n){const a=e.MAs(11),o=e.MAs(37);e.Q6J("headerTitle",t.pageTitle)("description",t.pageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(2),e.Q6J("ngIf","preview"==t.currentState),e.xp6(1),e.Q6J("ngIf","finish"!=t.currentState),e.xp6(1),e.Q6J("ngIf","finish"==t.currentState),e.xp6(6),e.s9C("ngClass","last-edited-step-"+a.selectedIndex),e.xp6(2),e.Q6J("editable","finish"!=t.currentState)("completed",!1),e.xp6(11),e.Q6J("clearable",!1)("ngModel",t.channelID),e.xp6(1),e.Q6J("ngForOf",t.channelOptions),e.xp6(9),e.Q6J("rangePicker",o),e.xp6(1),e.Q6J("ngModel",t.startDate),e.xp6(1),e.Q6J("ngModel",t.endDate),e.xp6(3),e.Q6J("editable","finish"!=t.currentState)("completed",!1),e.xp6(2),e.Q6J("ngIf","preview"==t.currentState),e.xp6(3),e.Q6J("ngIf","finish"==t.currentState)}},dependencies:[h.mk,h.sg,h.O5,c.Fj,c.JJ,c.On,Z.p,j.w9,j.jq,E.wx,E.zY,E.By,E._g,R.C0,R.VY,R.Vq,R.z9,K.gM,h.uU],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container mat-step-header>div.mat-step-label{padding-top:8px} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px} mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}"]});var b=u(8063);const vt=[{path:"",component:S,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:k,canActivate:[b.a],data:{title:"New Order"}},{path:"detail",component:J,canActivate:[b.a],data:{title:"Orders detail"}},{path:"ready_to_ship",component:L,canActivate:[b.a],data:{title:"Ready To Ship"}},{path:"Shipped",component:Q,canActivate:[b.a],data:{title:"Shipped"}},{path:"Delivered",component:F,canActivate:[b.a],data:{title:"Delivered"}},{path:"All",component:Y,canActivate:[b.a],data:{title:"All Order"}},{path:"Cancelled",component:G,canActivate:[b.a],data:{title:"Cancelled"}},{path:"Download",component:$,canActivate:[b.a],data:{title:"Download"}}]}];class I{}I.\u0275fac=function(n){return new(n||I)},I.\u0275mod=e.oAB({type:I}),I.\u0275inj=e.cJS({imports:[h.ez,_.Bz.forChild(vt)]});var bt=u(8739),St=u(1108);class q{}q.\u0275fac=function(n){return new(n||q)},q.\u0275mod=e.oAB({type:q}),q.\u0275inj=e.cJS({providers:[T,D],imports:[h.ez,c.u5,I,H.Z,Z.R,bt.TU,_.Bz,j.A0,E.FA,x.XK,N.n,R.T5,K.AV,St.f,w.p9,g.Is,y.LD]})},6082:(V,z,u)=>{u.d(z,{M:()=>m});var h=u(8505),_=u(1889),e=u(4650),H=u(1318),S=u(7185);class m{constructor(l,r){this.httpService=l,this.toastrService=r}loader(l=_.g.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:l})}LoadInPOS(l=_.g.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:l})}filterChannelByTypeId(l,r){return l.filter(s=>-1!==r.findIndex(p=>s.TypeID==p))}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(l){return this.httpService.post("/api/product/TotalProductLive",{ID:l})}clearCacheChannel(l){return this.httpService.post("/api/Channel/ClearCacheChannel",{ID:l})}uploadSingleProduct(l,r){return this.httpService.post("api/product/UploadMultipleChannel",{Channel:r,Products:l})}uploadMultipleProduct(l,r){return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",{Channel:r,Products:l})}scanSingle(l,r){return this.httpService.post("/api/product/ScanSingle",{ID:l,SKU:r})}scanNotInChannel(l){return this.httpService.post("/api/product/ScanNotinChannel",{ID:l})}findAllSoldInChannel(l){return this.httpService.post("/api/product/GetSoldInChannel",l)}scanAll(l,r,s,p=!1){return this.httpService.post("/api/product/ScanOptimized",{ID:l,ScanFull:r,UpdatedProduct:s,Async:p})}scanCompareToPos(l){return this.httpService.post("/api/product/CompareMarketplaceToPOS",l)}getVariantCodesProduct(l){return l.Variants.map(s=>s.Code)}downloadMultipleProduct(l){let r=l.map(s=>({ChannelItemID:s.ChannelItemID,ChannelID:s.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",r).pipe((0,h.b)(s=>{this.toastrService.success(`${s.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(l){return this.httpService.post("/api/product/DownloadProductFromChannel",{ChannelItemID:l.ChannelItemID,ChannelID:l.ChannelID}).pipe((0,h.b)(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(l=[]){let r=[];return l.forEach(s=>{s.Variants.forEach(p=>{r=[...r,p.Code]})}),r}filterUnselectedChannel(l,r){let p,s=[];if(l.forEach(g=>{s=[...s,...g.Channel]}),s&&0!=s.length){let g=[];p=r.filter(c=>(g=s.filter(w=>w.ChannelID==c.ID),g.length!==l.length))}else p=r;return p}findChannelById(l,r){return r.find(s=>s.ID==l)}sortChannel(l=[]){return l.sort((r,s)=>r.TypeID<s.TypeID?1:r.TypeID===s.TypeID?0:-1)}hasSelection(l=[]){return this.selectedProduct(l).length>0}selectedProduct(l=[]){return l.filter(r=>r.selected)}hasSelectionVariant(l){return this.selectedVariantProduct(l).length>0}selectedVariantProduct(l){let r=[];return l.forEach(s=>{r=[...r,...null!=s.Variants?s.Variants.filter(p=>p.selected):""]}),r}getChannelProduct(l){const r=l.Variants;let s=[];for(let p of r)if(null!=p.Channel)for(let g of p.Channel)0==s.filter(c=>c.ChannelID==g.ChannelID).length&&s.push(g);return this.sortChannel(s)}successToastrScanAllProduct(l,r,s){if(s){const p=l?.NotInPOS?.Product?l?.NotInPOS?.Product:0,g=l?.InChannel?.Product?l?.InChannel?.Product:0;this.toastrService.success(`\n ${p+g} found in ${r.Name} </br>\n (${g} In POS + ${p} Not In Pos)\n `,"Scan Complete!",{enableHtml:!0})}else this.toastrService.success(`${l.InChannel?l.InChannel.Product:0} product updates in ${r.Name} </br> \n since ${l.LastUpdate}`,"Scan Complete!",{enableHtml:!0})}checkProductHasScanButton(l,r){let s;return l.map(p=>(p.Channel=this.getChannelProduct(p),s=this.filterUnselectedChannel([p],r),p.hasScan=s.length>0,p))}checkProductHasUploadBtn(l,r){let s;return l.map(p=>(p.Channel=this.getChannelProduct(p),s=this.filterUnselectedChannel([p],r),p.hasUpload=s.length>0,p))}showToastrUploadMultiple(l=[]){let r=[],s=[];if(l.forEach(p=>{"string"==typeof p?.Response?s=[...s,`<li>${p.Response}</li>`]:(p?.Response?.Success.forEach(g=>{r=[...r,`<li>Product ${g} was <b>successfully</b> uploaded to ${p.Name}</li>`]}),p?.Response.Fail.forEach(g=>{s=[...s,`<li>${g}</li>`]}))}),s.length>0&&r.length>0){const p=[...r,...s];this.toastrService.warning(this.concatMessage(p),"Warning!",{enableHtml:!0})}else r.length>0&&0==s.length?this.toastrService.success(this.concatMessage(r),"Success",{enableHtml:!0}):this.toastrService.error(this.concatMessage(s),"Error",{enableHtml:!0})}concatMessage(l=[]){let r="";return l.forEach(s=>{r+=s}),`<ol>${r}</ol>`}showToastrSuccessUploadSingle(l,r){let s=l.filter(c=>0==c.Status),p=l.filter(c=>1==c.Status),g=this.generateToastrMessage(s,p,r);this.toastrService.success(g.message,"Success",{enableHtml:!0})}showToastErrorUploadSingle(l,r){let s=l?.error?.Message.filter(c=>0==c.Status),p=l?.error?.Message.filter(c=>1==c.Status),g=this.generateToastrMessage(s,p,r);"WARNING"==g.status?this.toastrService.warning(g.message,"Warning!",{enableHtml:!0}):this.toastrService.error(g.message,`Error - ${l.status}`,{enableHtml:!0})}generateToastrMessage(l,r,s){let g,p="";return 0==l.length&&r.length>0?(g="SUCCESS",p=this.createSuccessResponse(r,s)):l.length>0&&0==r.length?(g="ERROR",p=this.createErrResponse(l,s)):(g="WARNING",p=`${this.createSuccessResponse(r,s)} ${this.createErrResponse(l,s)}`),p=`<ol>${p}</ol>`,{status:g,message:p}}createErrResponse(l,r){let s="";return l.forEach((p,g)=>{s+=`<li><b>${p.Response}</b> for ${r.Name} in ${p.Name}</li>`}),s}createSuccessResponse(l,r){let s="";return l.forEach((p,g)=>{s+=`<li>Product ${r.Name} was <b>successfully</b> uploaded to ${p.Name}</li>`}),s}getHostName(){if(_.g.IsEmpty(this.hostName)){const l=localStorage.getItem("Authorization");this.hostName=JSON.parse(l)?.Host}return this.hostName}}m.\u0275fac=function(l){return new(l||m)(e.LFG(H.O),e.LFG(S._W))},m.\u0275prov=e.Yz7({token:m,factory:m.\u0275fac,providedIn:"root"})}}]);
|