marketplacepos 3.20.4 → 3.20.5

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.
Files changed (31) hide show
  1. package/Marketplace/{chunk-V3GS7OX4.js → chunk-2LWHDKOC.js} +1 -1
  2. package/Marketplace/{chunk-H7UZRHOQ.js → chunk-2ORRMEZR.js} +1 -1
  3. package/Marketplace/{chunk-PO2VZWM6.js → chunk-3HIQR6S5.js} +1 -1
  4. package/Marketplace/{chunk-P5TJRZVH.js → chunk-3VGAURY3.js} +1 -1
  5. package/Marketplace/{chunk-34GTZZQO.js → chunk-5CRDOJPK.js} +1 -1
  6. package/Marketplace/{chunk-FQ44ODSE.js → chunk-5GZGQTZO.js} +1 -1
  7. package/Marketplace/{chunk-OIJTOBKY.js → chunk-62AUVNTW.js} +1 -1
  8. package/Marketplace/{chunk-CXK5ZSMG.js → chunk-6LC5LHS7.js} +1 -1
  9. package/Marketplace/{chunk-2THQTK3B.js → chunk-AGTLQ7PH.js} +1 -1
  10. package/Marketplace/{chunk-OO5N62Q3.js → chunk-BAP3IJF6.js} +1 -1
  11. package/Marketplace/{chunk-EBAZER63.js → chunk-BARICLUB.js} +1 -1
  12. package/Marketplace/{chunk-QT3OJWVR.js → chunk-COAD3DY5.js} +1 -1
  13. package/Marketplace/{chunk-AZPLV5HA.js → chunk-EKFFWAOD.js} +1 -1
  14. package/Marketplace/{chunk-ZVHEEQMP.js → chunk-ELNSUKXK.js} +1 -1
  15. package/Marketplace/{chunk-C4NWPL4V.js → chunk-G5TWCIEM.js} +1 -1
  16. package/Marketplace/{chunk-ACQIVAGX.js → chunk-GOV3GQ7Y.js} +1 -1
  17. package/Marketplace/{chunk-2UOP4Q66.js → chunk-HMRV5GCL.js} +1 -1
  18. package/Marketplace/{chunk-4UP4R76L.js → chunk-HNI6GED7.js} +1 -1
  19. package/Marketplace/{chunk-BQOBABN6.js → chunk-HQ2NK4T7.js} +1 -1
  20. package/Marketplace/{chunk-ITQ6LYLN.js → chunk-HTFZRZEI.js} +1 -1
  21. package/Marketplace/{chunk-HEOC5SSC.js → chunk-JAASJQ7I.js} +1 -1
  22. package/Marketplace/{chunk-2JCMZXWL.js → chunk-LF7UA3W4.js} +1 -1
  23. package/Marketplace/{chunk-XJSMU6IK.js → chunk-LWMWPW7O.js} +1 -1
  24. package/Marketplace/{chunk-JSNPJ3MM.js → chunk-OMR5REL2.js} +1 -1
  25. package/Marketplace/{chunk-PCIN2PEO.js → chunk-REVVSWD3.js} +1 -1
  26. package/Marketplace/{chunk-EEMDWQRP.js → chunk-SAGRGMBL.js} +1 -1
  27. package/Marketplace/{chunk-MZDRIAOG.js → chunk-UTP5O3JL.js} +1 -1
  28. package/Marketplace/{chunk-TG2ZFMOG.js → chunk-ZPUEDBNZ.js} +1 -1
  29. package/Marketplace/index.html +2 -2
  30. package/Marketplace/{main-VDWTMQFP.js → main-CMQW2MZJ.js} +1 -1
  31. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import{b as At}from"./chunk-OTR5MBON.js";import{a as Ft}from"./chunk-CJILX5R7.js";import{b as It}from"./chunk-ZA7FXMFZ.js";import"./chunk-ZX3SBNZT.js";import"./chunk-2FRMUOJY.js";import{a as St,b as Tt}from"./chunk-C6QIBOCB.js";import{a as ct,b as pt}from"./chunk-47PEHCOU.js";import{a as he,b as ut,c as ft,d as ge,e as Ce}from"./chunk-PCIN2PEO.js";import{a as Ct,b as bt,c as ve,d as yt,e as vt,j as ae}from"./chunk-KZ6AD6KW.js";import"./chunk-BZPMSXEO.js";import{b as xt}from"./chunk-7VKIP3Z6.js";import{b as gt,c as ye}from"./chunk-DYLT6RRK.js";import{a as _t}from"./chunk-D6L7HUOY.js";import{b as ht,c as be}from"./chunk-BTY6PS53.js";import"./chunk-D76K4RZ7.js";import{a as mt,b as st,f as dt,g as _e}from"./chunk-EIBGI6U2.js";import{d as H,e as W}from"./chunk-PYD2YWAN.js";import"./chunk-FQ44ODSE.js";import{e as re}from"./chunk-JHYIHRQH.js";import"./chunk-KCDL7SWP.js";import{m as at,n as lt}from"./chunk-4CEFDQPI.js";import{t as ot,u as rt}from"./chunk-2SC3HO66.js";import{M as it,N as ue,O as nt,P as fe}from"./chunk-DQIP7MCZ.js";import{a as Je,c as se,e as de,h as j,i as z,l as Me,m as Qe,n as J,p as Q,q as qe,r as q,s as Ze,t as Ke,u as et,x as Z,y as oe,z as Y}from"./chunk-2E5AKA74.js";import{b as tt,c as g}from"./chunk-FTHTFVHH.js";import{$ as N,$a as je,Ab as Ye,Bc as E,F as $e,Fc as I,H as Re,Ib as ke,Ja as p,Jb as h,Ka as X,Kb as ne,Lb as K,Nb as He,Ob as We,Pb as Xe,Q as ie,Qb as F,Rb as U,Sb as me,V as Ge,X as L,_a as _,aa as ce,ab as m,ac as S,bb as Ee,bc as T,c as Be,d as Le,da as u,ga as x,ha as pe,hb as k,ib as $,kb as R,lb as G,lc as ze,mb as s,na as w,nb as l,oa as C,ob as f,pa as b,pb as D,q as B,qb as V,sb as M,vb as y,xa as Ae,xb as c,yc as A,za as O}from"./chunk-ZIZWZZ4E.js";import"./chunk-GNOSNGXM.js";var ee=function(e){return e[e.SINGLE_DROP_DOWN=1]="SINGLE_DROP_DOWN",e[e.SINGLE_COMBO_BOX=2]="SINGLE_COMBO_BOX",e[e.FREE_TEXT_FILED=3]="FREE_TEXT_FILED",e[e.MULTI_DROP_DOWN=4]="MULTI_DROP_DOWN",e[e.MULTI_COMBO_BOX=5]="MULTI_COMBO_BOX",e}(ee||{});var le=function(e){return e[e.FORMAT_NORMAL=1]="FORMAT_NORMAL",e[e.FORMAT_QUANTITATIVE_WITH_UNIT=2]="FORMAT_QUANTITATIVE_WITH_UNIT",e}(le||{});var Pe=(()=>{let i=class i{constructor(){this.shopeeUploadService=u(he),this.formBuilder=u(Z)}getAttributes(o){return this.shopeeUploadService.getAttributes(o.channelId,o.categoryId).pipe(B(t=>this.setLabelToIndonesian(t)))}setLabelToIndonesian(o=[]){let t,a;return o=o.map(r=>(t=r?.multi_lang?.find(d=>d.language=="id"),r.attribute_value_list=r?.attribute_value_list?.map(d=>(a=d?.multi_lang?.find(v=>v.language=="id"),d.name=a?.value,d)),r.name=t?.value?t?.value:r.name,r)),o}createFormGroup(o){let t=this.formBuilder.group({}),a=[];return o.forEach(r=>{if(a=[],r.mandatory&&a.push(de.required),r?.attribute_info?.format_type==le.FORMAT_QUANTITATIVE_WITH_UNIT&&r?.attribute_info?.input_type==ee.FREE_TEXT_FILED){let d=this.formBuilder.group({unit:new Me(null),value:new Me(null,a)});t.addControl(JSON.stringify(r.attribute_id),d)}else t.addControl(JSON.stringify(r.attribute_id),this.formBuilder.control(null,a))}),t}getFilteredAttributes(o,t){let a=JSON.parse(JSON.stringify(o)),r=Object.keys(t),d=a.filter(v=>r.findIndex(Fe=>parseInt(Fe)==v.attribute_id||v.mandatory)!=-1);return d=this.filterSelectedAttributes(d,t),d}filterSelectedAttributes(o,t){return o.map(r=>{switch(r.attribute_info.input_type){case ee.MULTI_COMBO_BOX:g.IsNotEmpty(r.attribute_value_list)?r.attribute_value_list=r.attribute_value_list.filter(d=>t[r.attribute_id]==d.value_id):r.attribute_value_list=[];break;case ee.FREE_TEXT_FILED:r.attribute_info.format_type==le.FORMAT_QUANTITATIVE_WITH_UNIT?r.attribute_value_list=this.setSelectedQuantitativeAttr(t[r.attribute_id]?.value,t[r.attribute_id]?.unit):g.IsNotEmpty(t[r.attribute_id])&&(r.attribute_value_list=[{value_id:0,name:t[r.attribute_id]}]);break;default:r.attribute_value_list=r.attribute_value_list.filter(d=>d.value_id==t[r.attribute_id])}return r}).filter(r=>r?.attribute_value_list?.length>0)}setSelectedQuantitativeAttr(o,t){let a=[];return g.IsNotEmpty(o)&&(a=[{value_id:0,original_value_name:JSON.stringify(o),value_unit:t}]),a}};i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=N({token:i,factory:i.\u0275fac});let e=i;return e})();var xe=(()=>{let i=class i{constructor(){this._calendarHeaderConfig=new Le({hideBtnClear:!1,hideBtnToday:!1}),this.calendarConfig=this._calendarHeaderConfig.value}setHeaderConfig(o){this._calendarHeaderConfig.next(o)}getHeaderConfig$(){return this._calendarHeaderConfig.asObservable()}};i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"});let e=i;return e})();var Lt=["class","component ts"];function $t(e,i){if(e&1){let n=M();s(0,"button",3),y("click",function(){C(n);let t=c(2);return b(t.todayClicked())}),f(1,"i",4),l()}}function Rt(e,i){if(e&1){let n=M();s(0,"button",5),y("click",function(){C(n);let t=c(2);return b(t.clearClicked())}),f(1,"i",6),l()}}function Gt(e,i){if(e&1&&(D(0),_(1,$t,2,0,"button",1)(2,Rt,2,0,"button",2),V()),e&2){let n=i.ngIf;p(),m("ngIf",!n.hideBtnToday),p(),m("ngIf",!n.hideBtnClear)}}var kt=(()=>{let i=class i{constructor(o,t,a,r,d){this._datePicker=o,this._calendar=t,this._dateAdapter=a,this.calendarService=r,this._destroyed=new Be,t.stateChanges.pipe(Ge(this._destroyed)).subscribe(v=>d.markForCheck()),this.calendarConfig$=this.calendarService.getHeaderConfig$()}todayClicked(){this._calendar.activeDate=this._dateAdapter.today(),this._datePicker.select(this._dateAdapter.today()),this._datePicker.close()}clearClicked(){this._datePicker.select(null),this._datePicker.close()}ngOnChanges(o){this._calendar.ngOnChanges(o)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}};i.\u0275fac=function(t){return new(t||i)(X(ve),X(bt),X(ue),X(xe),X(ze))},i.\u0275cmp=x({type:i,selectors:[["POS-DatepickerHeader",8,"component","ts"]],features:[w],attrs:Lt,decls:3,vars:3,consts:[[4,"ngIf"],["mat-icon-button","","title","Today",3,"click",4,"ngIf"],["mat-icon-button","","title","Clear",3,"click",4,"ngIf"],["mat-icon-button","","title","Today",3,"click"],[1,"far","fa-clock",2,"font-size","18px"],["mat-icon-button","","title","Clear",3,"click"],[1,"far","fa-xmark-circle",2,"font-size","18px"]],template:function(t,a){t&1&&(s(0,"mat-calendar-header"),_(1,Gt,3,2,"ng-container",0),S(2,"async"),l()),t&2&&(p(),m("ngIf",T(2,1,a.calendarConfig$)))},dependencies:[A,ht,Ct,E],encapsulation:2});let e=i;return e})(),Mt=(()=>{let i=class i{};i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=pe({type:i}),i.\u0275inj=ce({providers:[ae],imports:[I,be,fe,ae,_e,ye]});let e=i;return e})();function jt(e,i){if(e&1&&(s(0,"mat-label",6)(1,"span"),h(2),l()()),e&2){let n=c();m("show",n.placeholder),p(2),ne(n.placeholder)}}var Yt={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},Pt=(()=>{let i=class i{set hidelClearBtn(o){this.calendarService.setHeaderConfig({hideBtnClear:o,hideBtnToday:this.calendarService.calendarConfig.hideBtnToday})}change(o){let t=null;o&&(t=o.toDate(),t.setHours(0,0,0,0)),this.onChange(t),this.dateChange.emit(t)}constructor(o){this.calendarService=o,this.headerComponent=kt,this.appearance="outline",this.isFloatingLabel=!0,this.disabled=!1,this.readOnly=!1,this.dateChange=new O,this.minDate=g.MinDate,this.onChange=t=>{},this.displayToggle=!0}writeValue(o){this.date=o}registerOnChange(o){this.onChange=o}registerOnTouched(o){}setDisabledState(o){this.disabled=o}onOpenDatepicker(){let o=document.getElementById("dropdown-filter");if(o){var t=new bootstrap.Dropdown(o);t&&(t._config.autoClose="inside")}}onCloseDatepicker(){let o=document.getElementById("dropdown-filter");if(o){var t=new bootstrap.Dropdown(o);t&&(t._config.autoClose="outside")}}ngOnDestroy(){this.calendarService.setHeaderConfig({hideBtnClear:!1,hideBtnToday:!1})}};i.\u0275fac=function(t){return new(t||i)(X(xe))},i.\u0275cmp=x({type:i,selectors:[["datepicker"]],inputs:{data_cy:"data_cy",placeholder:"placeholder",displayToggle:"displayToggle",appearance:"appearance",width:"width",isFloatingLabel:"isFloatingLabel",date:"date",disabled:"disabled",readOnly:"readOnly",minDateValidation:"minDateValidation",maxDateValidation:"maxDateValidation",hidelClearBtn:"hidelClearBtn"},outputs:{dateChange:"dateChange"},features:[F([{provide:ue,useClass:Ft,deps:[it]},{provide:nt,useValue:Yt},{provide:Je,multi:!0,useExisting:i}])],decls:6,vars:17,consts:[["picker1",""],[1,"datepicker",3,"disabled","appearance"],[3,"show",4,"ngIf"],["matInput","",3,"dateChange","click","matDatepicker","min","max","placeholder","value","disabled","readonly"],["matSuffix","",3,"for"],[3,"opened","closed","calendarHeaderComponent"],[3,"show"]],template:function(t,a){if(t&1){let r=M();s(0,"mat-form-field",1),_(1,jt,3,2,"mat-label",2),s(2,"input",3),y("dateChange",function(v){return C(r),b(a.change(v.value))})("click",function(){C(r);let v=ke(5);return b(v.open())}),l(),f(3,"mat-datepicker-toggle",4),s(4,"mat-datepicker",5,0),y("opened",function(){return C(r),b(a.onOpenDatepicker())})("closed",function(){return C(r),b(a.onCloseDatepicker())}),l()()}if(t&2){let r=ke(5);Ee("width",a.width||100,"%"),m("disabled",a.disabled)("appearance",a.appearance),p(),m("ngIf",a.isFloatingLabel&&a.placeholder),p(),Ye("placeholder",a.placeholder||""),m("matDatepicker",r)("min",a.minDateValidation)("max",a.maxDateValidation)("value",a.date==a.minDate?null:a.date)("disabled",a.disabled)("readonly",a.readOnly),je("data-cy",a.data_cy),p(),Ee("display",a.displayToggle?"unset":"none"),m("for",r),p(),m("calendarHeaderComponent",a.headerComponent)}},dependencies:[A,ve,yt,vt,dt,mt,st,gt],styles:[`.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline{background-color:#e9ecef!important;opacity:1!important}.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline input{color:#00000061!important}.datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{min-height:33px;padding-top:18px;padding-bottom:13px}.datepicker .mat-mdc-icon-button.mat-mdc-button-base{padding:0}.datepicker .mat-mdc-form-field-subscript-wrapper{display:none}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{padding:0!important}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important;font-size:16px;color:#9da2a6}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:23px!important;font-size:.875rem;color:#ccc}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#fff}
1
+ import{b as At}from"./chunk-OTR5MBON.js";import{a as Ft}from"./chunk-CJILX5R7.js";import{b as It}from"./chunk-ZA7FXMFZ.js";import"./chunk-ZX3SBNZT.js";import"./chunk-2FRMUOJY.js";import{a as St,b as Tt}from"./chunk-C6QIBOCB.js";import{a as ct,b as pt}from"./chunk-47PEHCOU.js";import{a as he,b as ut,c as ft,d as ge,e as Ce}from"./chunk-REVVSWD3.js";import{a as Ct,b as bt,c as ve,d as yt,e as vt,j as ae}from"./chunk-KZ6AD6KW.js";import"./chunk-BZPMSXEO.js";import{b as xt}from"./chunk-7VKIP3Z6.js";import{b as gt,c as ye}from"./chunk-DYLT6RRK.js";import{a as _t}from"./chunk-D6L7HUOY.js";import{b as ht,c as be}from"./chunk-BTY6PS53.js";import"./chunk-D76K4RZ7.js";import{a as mt,b as st,f as dt,g as _e}from"./chunk-EIBGI6U2.js";import{d as H,e as W}from"./chunk-PYD2YWAN.js";import"./chunk-5GZGQTZO.js";import{e as re}from"./chunk-JHYIHRQH.js";import"./chunk-KCDL7SWP.js";import{m as at,n as lt}from"./chunk-4CEFDQPI.js";import{t as ot,u as rt}from"./chunk-2SC3HO66.js";import{M as it,N as ue,O as nt,P as fe}from"./chunk-DQIP7MCZ.js";import{a as Je,c as se,e as de,h as j,i as z,l as Me,m as Qe,n as J,p as Q,q as qe,r as q,s as Ze,t as Ke,u as et,x as Z,y as oe,z as Y}from"./chunk-2E5AKA74.js";import{b as tt,c as g}from"./chunk-FTHTFVHH.js";import{$ as N,$a as je,Ab as Ye,Bc as E,F as $e,Fc as I,H as Re,Ib as ke,Ja as p,Jb as h,Ka as X,Kb as ne,Lb as K,Nb as He,Ob as We,Pb as Xe,Q as ie,Qb as F,Rb as U,Sb as me,V as Ge,X as L,_a as _,aa as ce,ab as m,ac as S,bb as Ee,bc as T,c as Be,d as Le,da as u,ga as x,ha as pe,hb as k,ib as $,kb as R,lb as G,lc as ze,mb as s,na as w,nb as l,oa as C,ob as f,pa as b,pb as D,q as B,qb as V,sb as M,vb as y,xa as Ae,xb as c,yc as A,za as O}from"./chunk-ZIZWZZ4E.js";import"./chunk-GNOSNGXM.js";var ee=function(e){return e[e.SINGLE_DROP_DOWN=1]="SINGLE_DROP_DOWN",e[e.SINGLE_COMBO_BOX=2]="SINGLE_COMBO_BOX",e[e.FREE_TEXT_FILED=3]="FREE_TEXT_FILED",e[e.MULTI_DROP_DOWN=4]="MULTI_DROP_DOWN",e[e.MULTI_COMBO_BOX=5]="MULTI_COMBO_BOX",e}(ee||{});var le=function(e){return e[e.FORMAT_NORMAL=1]="FORMAT_NORMAL",e[e.FORMAT_QUANTITATIVE_WITH_UNIT=2]="FORMAT_QUANTITATIVE_WITH_UNIT",e}(le||{});var Pe=(()=>{let i=class i{constructor(){this.shopeeUploadService=u(he),this.formBuilder=u(Z)}getAttributes(o){return this.shopeeUploadService.getAttributes(o.channelId,o.categoryId).pipe(B(t=>this.setLabelToIndonesian(t)))}setLabelToIndonesian(o=[]){let t,a;return o=o.map(r=>(t=r?.multi_lang?.find(d=>d.language=="id"),r.attribute_value_list=r?.attribute_value_list?.map(d=>(a=d?.multi_lang?.find(v=>v.language=="id"),d.name=a?.value,d)),r.name=t?.value?t?.value:r.name,r)),o}createFormGroup(o){let t=this.formBuilder.group({}),a=[];return o.forEach(r=>{if(a=[],r.mandatory&&a.push(de.required),r?.attribute_info?.format_type==le.FORMAT_QUANTITATIVE_WITH_UNIT&&r?.attribute_info?.input_type==ee.FREE_TEXT_FILED){let d=this.formBuilder.group({unit:new Me(null),value:new Me(null,a)});t.addControl(JSON.stringify(r.attribute_id),d)}else t.addControl(JSON.stringify(r.attribute_id),this.formBuilder.control(null,a))}),t}getFilteredAttributes(o,t){let a=JSON.parse(JSON.stringify(o)),r=Object.keys(t),d=a.filter(v=>r.findIndex(Fe=>parseInt(Fe)==v.attribute_id||v.mandatory)!=-1);return d=this.filterSelectedAttributes(d,t),d}filterSelectedAttributes(o,t){return o.map(r=>{switch(r.attribute_info.input_type){case ee.MULTI_COMBO_BOX:g.IsNotEmpty(r.attribute_value_list)?r.attribute_value_list=r.attribute_value_list.filter(d=>t[r.attribute_id]==d.value_id):r.attribute_value_list=[];break;case ee.FREE_TEXT_FILED:r.attribute_info.format_type==le.FORMAT_QUANTITATIVE_WITH_UNIT?r.attribute_value_list=this.setSelectedQuantitativeAttr(t[r.attribute_id]?.value,t[r.attribute_id]?.unit):g.IsNotEmpty(t[r.attribute_id])&&(r.attribute_value_list=[{value_id:0,name:t[r.attribute_id]}]);break;default:r.attribute_value_list=r.attribute_value_list.filter(d=>d.value_id==t[r.attribute_id])}return r}).filter(r=>r?.attribute_value_list?.length>0)}setSelectedQuantitativeAttr(o,t){let a=[];return g.IsNotEmpty(o)&&(a=[{value_id:0,original_value_name:JSON.stringify(o),value_unit:t}]),a}};i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=N({token:i,factory:i.\u0275fac});let e=i;return e})();var xe=(()=>{let i=class i{constructor(){this._calendarHeaderConfig=new Le({hideBtnClear:!1,hideBtnToday:!1}),this.calendarConfig=this._calendarHeaderConfig.value}setHeaderConfig(o){this._calendarHeaderConfig.next(o)}getHeaderConfig$(){return this._calendarHeaderConfig.asObservable()}};i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=N({token:i,factory:i.\u0275fac,providedIn:"root"});let e=i;return e})();var Lt=["class","component ts"];function $t(e,i){if(e&1){let n=M();s(0,"button",3),y("click",function(){C(n);let t=c(2);return b(t.todayClicked())}),f(1,"i",4),l()}}function Rt(e,i){if(e&1){let n=M();s(0,"button",5),y("click",function(){C(n);let t=c(2);return b(t.clearClicked())}),f(1,"i",6),l()}}function Gt(e,i){if(e&1&&(D(0),_(1,$t,2,0,"button",1)(2,Rt,2,0,"button",2),V()),e&2){let n=i.ngIf;p(),m("ngIf",!n.hideBtnToday),p(),m("ngIf",!n.hideBtnClear)}}var kt=(()=>{let i=class i{constructor(o,t,a,r,d){this._datePicker=o,this._calendar=t,this._dateAdapter=a,this.calendarService=r,this._destroyed=new Be,t.stateChanges.pipe(Ge(this._destroyed)).subscribe(v=>d.markForCheck()),this.calendarConfig$=this.calendarService.getHeaderConfig$()}todayClicked(){this._calendar.activeDate=this._dateAdapter.today(),this._datePicker.select(this._dateAdapter.today()),this._datePicker.close()}clearClicked(){this._datePicker.select(null),this._datePicker.close()}ngOnChanges(o){this._calendar.ngOnChanges(o)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}};i.\u0275fac=function(t){return new(t||i)(X(ve),X(bt),X(ue),X(xe),X(ze))},i.\u0275cmp=x({type:i,selectors:[["POS-DatepickerHeader",8,"component","ts"]],features:[w],attrs:Lt,decls:3,vars:3,consts:[[4,"ngIf"],["mat-icon-button","","title","Today",3,"click",4,"ngIf"],["mat-icon-button","","title","Clear",3,"click",4,"ngIf"],["mat-icon-button","","title","Today",3,"click"],[1,"far","fa-clock",2,"font-size","18px"],["mat-icon-button","","title","Clear",3,"click"],[1,"far","fa-xmark-circle",2,"font-size","18px"]],template:function(t,a){t&1&&(s(0,"mat-calendar-header"),_(1,Gt,3,2,"ng-container",0),S(2,"async"),l()),t&2&&(p(),m("ngIf",T(2,1,a.calendarConfig$)))},dependencies:[A,ht,Ct,E],encapsulation:2});let e=i;return e})(),Mt=(()=>{let i=class i{};i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=pe({type:i}),i.\u0275inj=ce({providers:[ae],imports:[I,be,fe,ae,_e,ye]});let e=i;return e})();function jt(e,i){if(e&1&&(s(0,"mat-label",6)(1,"span"),h(2),l()()),e&2){let n=c();m("show",n.placeholder),p(2),ne(n.placeholder)}}var Yt={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},Pt=(()=>{let i=class i{set hidelClearBtn(o){this.calendarService.setHeaderConfig({hideBtnClear:o,hideBtnToday:this.calendarService.calendarConfig.hideBtnToday})}change(o){let t=null;o&&(t=o.toDate(),t.setHours(0,0,0,0)),this.onChange(t),this.dateChange.emit(t)}constructor(o){this.calendarService=o,this.headerComponent=kt,this.appearance="outline",this.isFloatingLabel=!0,this.disabled=!1,this.readOnly=!1,this.dateChange=new O,this.minDate=g.MinDate,this.onChange=t=>{},this.displayToggle=!0}writeValue(o){this.date=o}registerOnChange(o){this.onChange=o}registerOnTouched(o){}setDisabledState(o){this.disabled=o}onOpenDatepicker(){let o=document.getElementById("dropdown-filter");if(o){var t=new bootstrap.Dropdown(o);t&&(t._config.autoClose="inside")}}onCloseDatepicker(){let o=document.getElementById("dropdown-filter");if(o){var t=new bootstrap.Dropdown(o);t&&(t._config.autoClose="outside")}}ngOnDestroy(){this.calendarService.setHeaderConfig({hideBtnClear:!1,hideBtnToday:!1})}};i.\u0275fac=function(t){return new(t||i)(X(xe))},i.\u0275cmp=x({type:i,selectors:[["datepicker"]],inputs:{data_cy:"data_cy",placeholder:"placeholder",displayToggle:"displayToggle",appearance:"appearance",width:"width",isFloatingLabel:"isFloatingLabel",date:"date",disabled:"disabled",readOnly:"readOnly",minDateValidation:"minDateValidation",maxDateValidation:"maxDateValidation",hidelClearBtn:"hidelClearBtn"},outputs:{dateChange:"dateChange"},features:[F([{provide:ue,useClass:Ft,deps:[it]},{provide:nt,useValue:Yt},{provide:Je,multi:!0,useExisting:i}])],decls:6,vars:17,consts:[["picker1",""],[1,"datepicker",3,"disabled","appearance"],[3,"show",4,"ngIf"],["matInput","",3,"dateChange","click","matDatepicker","min","max","placeholder","value","disabled","readonly"],["matSuffix","",3,"for"],[3,"opened","closed","calendarHeaderComponent"],[3,"show"]],template:function(t,a){if(t&1){let r=M();s(0,"mat-form-field",1),_(1,jt,3,2,"mat-label",2),s(2,"input",3),y("dateChange",function(v){return C(r),b(a.change(v.value))})("click",function(){C(r);let v=ke(5);return b(v.open())}),l(),f(3,"mat-datepicker-toggle",4),s(4,"mat-datepicker",5,0),y("opened",function(){return C(r),b(a.onOpenDatepicker())})("closed",function(){return C(r),b(a.onCloseDatepicker())}),l()()}if(t&2){let r=ke(5);Ee("width",a.width||100,"%"),m("disabled",a.disabled)("appearance",a.appearance),p(),m("ngIf",a.isFloatingLabel&&a.placeholder),p(),Ye("placeholder",a.placeholder||""),m("matDatepicker",r)("min",a.minDateValidation)("max",a.maxDateValidation)("value",a.date==a.minDate?null:a.date)("disabled",a.disabled)("readonly",a.readOnly),je("data-cy",a.data_cy),p(),Ee("display",a.displayToggle?"unset":"none"),m("for",r),p(),m("calendarHeaderComponent",a.headerComponent)}},dependencies:[A,ve,yt,vt,dt,mt,st,gt],styles:[`.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline{background-color:#e9ecef!important;opacity:1!important}.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline input{color:#00000061!important}.datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{min-height:33px;padding-top:18px;padding-bottom:13px}.datepicker .mat-mdc-icon-button.mat-mdc-button-base{padding:0}.datepicker .mat-mdc-form-field-subscript-wrapper{display:none}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{padding:0!important}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important;font-size:16px;color:#9da2a6}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:23px!important;font-size:.875rem;color:#ccc}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#fff}
2
2
  `],encapsulation:2});let e=i;return e})(),Nt=(()=>{let i=class i{};i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=pe({type:i}),i.\u0275inj=ce({providers:[ae],imports:[I,be,fe,ae,_e,ye,Mt]});let e=i;return e})();var Ne=function(e){return e[e.VALIDATOR_NO_VALIDATE_TYPE=0]="VALIDATOR_NO_VALIDATE_TYPE",e[e.VALIDATOR_INT_TYPE=1]="VALIDATOR_INT_TYPE",e[e.VALIDATOR_STRING_TYPE=2]="VALIDATOR_STRING_TYPE",e[e.VALIDATOR_FLOAT_TYPE=3]="VALIDATOR_FLOAT_TYPE",e[e.VALIDATOR_DATE_TYPE=4]="VALIDATOR_DATE_TYPE",e}(Ne||{});var we=()=>[];function Wt(e,i){e&1&&(s(0,"span",5),h(1,"*"),l())}function Xt(e,i){if(e&1&&f(0,"ng-select",6),e&2){let n=c().$implicit;m("multiple",!0)("formControlName",n.attribute_id)("items",n.attribute_value_list?n.attribute_value_list:me(4,we))("placeholder","Pilih "+(n==null?null:n.name))}}function zt(e,i){if(e&1&&f(0,"input",8),e&2){let n=c(2).$implicit;m("formControlName",n.attribute_id)("placeholder","Isi "+(n==null?null:n.name))}}function Jt(e,i){if(e&1&&(s(0,"option",15),h(1),l()),e&2){let n=i.$implicit;m("value",n),p(),ne(n)}}function Qt(e,i){if(e&1&&(s(0,"div",10),f(1,"input",12),s(2,"select",13)(3,"option",14),h(4,"Unit"),l(),R(5,Jt,2,2,"option",15,$),l()()),e&2){let n=c(3).$implicit;m("formGroupName",n.attribute_id),p(),m("placeholder","Isi "+(n==null?null:n.name)),p(2),m("value",null),p(2),G(n==null||n.attribute_info==null?null:n.attribute_info.attribute_unit_list)}}function qt(e,i){if(e&1&&f(0,"input",11),e&2){let n=c(3).$implicit;m("formControlName",n.attribute_id)("placeholder","Isi "+(n==null?null:n.name))}}function Zt(e,i){if(e&1&&_(0,Qt,7,3,"div",10)(1,qt,1,2,"input",11),e&2){let n=c(2).$implicit,o=c(2);k((n==null||n.attribute_info==null?null:n.attribute_info.format_type)==o.formatType.FORMAT_QUANTITATIVE_WITH_UNIT?0:1)}}function Kt(e,i){if(e&1&&f(0,"datepicker",9),e&2){let n=c(2).$implicit;m("formControlName",n.attribute_id)}}function ei(e,i){if(e&1&&_(0,zt,1,2,"input",8)(1,Zt,2,1)(2,Kt,1,1,"datepicker",9),e&2){let n,o=c().$implicit,t=c(2);k((n=o==null||o.attribute_info==null?null:o.attribute_info.input_validation_type)===t.validationType.VALIDATOR_STRING_TYPE?0:n===t.validationType.VALIDATOR_FLOAT_TYPE?1:n===t.validationType.VALIDATOR_DATE_TYPE?2:-1)}}function ti(e,i){if(e&1&&f(0,"ng-select",7),e&2){let n=c().$implicit;m("formControlName",n.attribute_id)("items",n.attribute_value_list?n.attribute_value_list:me(3,we))("placeholder","Pilih "+(n==null?null:n.name))}}function ii(e,i){if(e&1&&f(0,"ng-select",7),e&2){let n=c().$implicit;m("formControlName",n.attribute_id)("items",n.attribute_value_list?n.attribute_value_list:me(3,we))("placeholder","Pilih "+(n==null?null:n.name))}}function ni(e,i){if(e&1&&(s(0,"div",3)(1,"div",4),_(2,Wt,2,0,"span",5),s(3,"span"),h(4),l()(),_(5,Xt,1,5,"ng-select",6)(6,ei,3,1)(7,ti,1,4,"ng-select",7)(8,ii,1,4,"ng-select",7),l()),e&2){let n,o=i.$implicit,t=c(2);p(2),k(o.mandatory?2:-1),p(2),K(" ",o==null?null:o.name," "),p(),k((n=o==null||o.attribute_info==null?null:o.attribute_info.input_type)===t.inputType.MULTI_COMBO_BOX?5:n===t.inputType.FREE_TEXT_FILED?6:n===t.inputType.SINGLE_COMBO_BOX?7:8)}}function oi(e,i){if(e&1&&(D(0),s(1,"form",1)(2,"div",2),R(3,ni,9,3,"div",3,$),l()(),V()),e&2){let n=i.ngIf,o=c();p(),m("formGroup",o.form),p(2),G(n)}}var wt=(()=>{let i=class i{constructor(){this.formCategoryService=u(Pe),this.attributesChanges=new O,this.inputType=ee,this.formatType=le,this.validationType=Ne}ngOnChanges(){g.IsNotEmpty(this.categoryId)&&g.IsNotEmpty(this.channelId)&&(this.attributes$=this.formCategoryService.getAttributes({categoryId:this.categoryId,channelId:this.channelId,channelType:this.channelType}).pipe(L(o=>{this.form=this.formCategoryService.createFormGroup(o),this.listenToFormChange(o)}),ie(1)))}listenToFormChange(o){let t=[];this.formSubscription=this.form.valueChanges.subscribe(a=>{t=this.formCategoryService.getFilteredAttributes(o,a),this.attributesChanges.emit(t)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}};i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=x({type:i,selectors:[["shopee-attribute-form"]],inputs:{channelType:"channelType",categoryId:"categoryId",channelId:"channelId",channelProductUpload:"channelProductUpload"},outputs:{attributesChanges:"attributesChanges"},standalone:!0,features:[F([Pe]),w,U],decls:2,vars:3,consts:[[4,"ngIf"],[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],[1,"text-danger"],["bindLabel","name","bindValue","value_id",3,"multiple","formControlName","items","placeholder"],["bindLabel","name","bindValue","value_id",3,"formControlName","items","placeholder"],["type","text",1,"form-control",3,"formControlName","placeholder"],[1,"attribute-datepicker",3,"formControlName"],[1,"d-flex","align-items-center",3,"formGroupName"],["type","text","autoNum","",1,"form-control",3,"formControlName","placeholder"],["formControlName","value","type","text","autoNum","",1,"form-control","me-1",2,"width","200px",3,"placeholder"],["name","unit","id","unit","formControlName","unit",1,"form-control"],["disabled","","selected","",3,"value"],[3,"value"]],template:function(t,a){t&1&&(_(0,oi,5,1,"ng-container",0),S(1,"async")),t&2&&m("ngIf",T(1,1,a.attributes$))},dependencies:[I,A,E,W,H,Y,J,Ke,et,se,Ze,j,z,Q,q,qe,xt,Nt,Pt],styles:["input[_ngcontent-%COMP%], select[_ngcontent-%COMP%]{height:36px;border-radius:4px} datepicker.attribute-datepicker>mat-form-field.mat-mdc-form-field>.mat-mdc-text-field-wrapper{height:36px} datepicker.attribute-datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:11px!important;padding-bottom:11px!important;height:36px;min-height:36px!important} datepicker.attribute-datepicker mat-datepicker-toggle>button.mat-mdc-icon-button.mat-mdc-button-base{--mdc-icon-button-state-layer-size: 36px}"]});let e=i;return e})();var Oe=(()=>{let i=class i{constructor(){this.httpService=u(re),this.formBuilder=u(Z),this.uploadProductService=u(Ce)}getAttributes(o,t){return this.httpService.get("api/product/tiktok/GetAttributes",[{key:"ID",value:o},{key:"CategoryID",value:t}]).pipe($e(r=>this.uploadProductService.selectedProduct$.pipe(B(d=>(r=this.mappingAttributeSalesProperty(r,d),r)))))}mappingAttributeSalesProperty(o,t){let a=0;return o.filter(r=>(r.type=="SALES_PROPERTY"&&(a+=1),a>1?(a=0,!1):!0)).map(r=>(r.type=="SALES_PROPERTY"&&(r.name="Jenis Variant",r.is_multiple_selection=!1,r.is_required=this.isProductHasMoreVariant(t),r.values=[{id:"Warna",name:"Warna"},{id:"Ukuran",name:"Ukuran"}]),r))}isProductHasMoreVariant(o){let t=!1,a=[];return o.forEach(r=>{r.Variants&&a.push(r.Variants.length)}),t=a.some(r=>r>1),t}createFormGroup(o){let t=this.formBuilder.group({}),a=[];return o.forEach(r=>{a=[],r.is_required&&a.push(de.required),t.addControl(r.id,this.formBuilder.control(null,a))}),t}getFilteredAttributes(o,t){let a=JSON.parse(JSON.stringify(o)),r=Object.keys(t),d=a.filter(v=>r.findIndex(Fe=>parseInt(Fe)==v.id)!=-1);return d=this.filterSelectedAttributes(d,t),d}filterSelectedAttributes(o,t){return o.map(r=>(r.is_multiple_selection?r.values=r.values.filter(d=>t[r.id]?.includes(d.id)):r.values=r.values.filter(d=>d.id==t[r.id]),r)).filter(r=>r?.values?.length>0)}};i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=N({token:i,factory:i.\u0275fac});let e=i;return e})();function ri(e,i){e&1&&(s(0,"span",5),h(1,"*"),l())}function ai(e,i){if(e&1&&f(0,"ng-select",6),e&2){let n=c().$implicit;m("multiple",!0)("formControlName",n.id)("items",n.values)("placeholder","Pilih "+(n==null?null:n.name))}}function li(e,i){if(e&1&&f(0,"ng-select",7),e&2){let n=c().$implicit;m("formControlName",n.id)("items",n.values)("placeholder","Pilih "+(n==null?null:n.name))}}function ci(e,i){if(e&1&&(s(0,"small",5),h(1),l()),e&2){let n=c().$implicit;p(),K(" ",n==null?null:n.name," is mandatory ")}}function pi(e,i){if(e&1&&(s(0,"div",3)(1,"div",4),_(2,ri,2,0,"span",5),s(3,"span"),h(4),l()(),_(5,ai,1,4,"ng-select",6)(6,li,1,3,"ng-select",7)(7,ci,2,1,"small",5),l()),e&2){let n=i.$implicit;p(2),k(n.is_required?2:-1),p(2),K(" ",n==null?null:n.name," "),p(),k(n.is_multiple_selection?5:6),p(2),k(n.is_required?7:-1)}}function mi(e,i){if(e&1&&(D(0),s(1,"form",1)(2,"div",2),R(3,pi,8,4,"div",3,$),l()(),V()),e&2){let n=i.ngIf,o=c();p(),m("formGroup",o.form),p(2),G(n)}}var Ot=(()=>{let i=class i{constructor(){this.tiktokAttributeFormService=u(Oe),this.attributesChanges=new O}ngOnChanges(){g.IsNotEmpty(this.categoryId)&&g.IsNotEmpty(this.channelId)&&(this.attributes$=this.tiktokAttributeFormService.getAttributes(this.channelId,this.categoryId).pipe(B(o=>o.filter(t=>!(t.type=="PRODUCT_PROPERTY"&&(g.IsEmpty(t.values)||t.values?.length==0)))),L(o=>{this.form=this.tiktokAttributeFormService.createFormGroup(o),this.listenToFormChange(o)}),ie(1)))}listenToFormChange(o){let t=[];this.formSubscription=this.form.valueChanges.subscribe(a=>{t=this.tiktokAttributeFormService.getFilteredAttributes(o,a),this.attributesChanges.emit(t)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}};i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=x({type:i,selectors:[["tiktok-attribute-form"]],inputs:{channelId:"channelId",categoryId:"categoryId"},outputs:{attributesChanges:"attributesChanges"},standalone:!0,features:[F([Oe]),w,U],decls:2,vars:3,consts:[[4,"ngIf"],[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],[1,"text-danger"],["bindLabel","name","bindValue","id",3,"multiple","formControlName","items","placeholder"],["bindLabel","name","bindValue","id",3,"formControlName","items","placeholder"]],template:function(t,a){t&1&&(_(0,mi,5,1,"ng-container",0),S(1,"async")),t&2&&m("ngIf",T(1,1,a.attributes$))},dependencies:[I,A,E,W,H,Y,J,j,z,Q,q,oe]});let e=i;return e})();var De=(()=>{let i=class i{constructor(){this.woocommerceUploadService=u(ge)}getAttributes(o,t){return this.woocommerceUploadService.getAttributes(o,t).pipe(B(a=>a.map(r=>({key:r.name,label:r.name}))))}};i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=N({token:i,factory:i.\u0275fac});let e=i;return e})();var Dt=(()=>{let i=class i{constructor(){this.wooAttributeFormService=u(De),this.channelId=Ae(),this.categoryId=Ae(),this.attributesChanges=new O}ngOnChanges(){g.IsNotEmpty(this.categoryId())&&g.IsNotEmpty(this.channelId())&&(this.attributes$=this.wooAttributeFormService.getAttributes(this.channelId(),this.categoryId()))}onSelectAttribute(o){this.attributesChanges.emit([o.key])}};i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=x({type:i,selectors:[["wooocommerce-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{attributesChanges:"attributesChanges"},standalone:!0,features:[F([De]),w,U],decls:6,vars:3,consts:[[1,"row"],[1,"col-6"],[1,"mb-1"],["bindLabel","label","bindValue","id","placeholder","Pilih Atribut",3,"change","items"]],template:function(t,a){t&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),h(3,"Atribut"),l(),s(4,"ng-select",3),S(5,"async"),y("change",function(d){return a.onSelectAttribute(d)}),l()()()),t&2&&(p(4),m("items",T(5,1,a.attributes$)))},dependencies:[I,E,oe,W,H,Y]});let e=i;return e})();var Ve=(()=>{let i=class i{constructor(){this.httpService=u(re),this.formBuilder=u(Z)}getAttributes(o,t){return this.httpService.get("api/product/tokopedia/GetAttributes",[{key:"ID",value:o},{key:"CategoryID",value:t}]).pipe(B(r=>r))}createFormGroup(o){let t=this.formBuilder.group({});return o.forEach(a=>{t.addControl(a.variant,this.formBuilder.control(null))}),t}convertAttributes(o={}){return Object.values(o).filter(a=>a!==null).map(a=>JSON.stringify(a))}};i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=N({token:i,factory:i.\u0275fac});let e=i;return e})();function si(e,i){if(e&1&&(s(0,"div",3)(1,"div",4),h(2),l(),f(3,"ng-select",5),l()),e&2){let n=i.$implicit;p(2),K(" ",n==null?null:n.variant," "),p(),m("formControlName",n.variant)("items",n.values)("placeholder","Pilih "+(n==null?null:n.variant))}}function di(e,i){if(e&1&&(D(0),s(1,"form",1)(2,"div",2),R(3,si,4,4,"div",3,$),l()(),V()),e&2){let n=i.ngIf,o=c();p(),m("formGroup",o.form),p(2),G(n)}}var Vt=(()=>{let i=class i{constructor(){this.tokpedAttrFormService=u(Ve),this.attributesChanges=new O}ngOnInit(){}ngOnChanges(o){g.IsNotEmpty(this.categoryId)&&g.IsNotEmpty(this.channelId)&&(this.attributes$=this.tokpedAttrFormService.getAttributes(this.channelId,this.categoryId).pipe(L(t=>{this.form=this.tokpedAttrFormService.createFormGroup(t),this.listenToFormChange()})))}listenToFormChange(){let o=[];this.formSubscription=this.form.valueChanges.subscribe(t=>{o=this.tokpedAttrFormService.convertAttributes(t),this.attributesChanges.emit(o)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}};i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=x({type:i,selectors:[["tokopedia-attribute-form"]],inputs:{channelId:"channelId",categoryId:"categoryId"},outputs:{attributesChanges:"attributesChanges"},standalone:!0,features:[F([Ve]),w,U],decls:2,vars:3,consts:[[4,"ngIf"],[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["bindLabel","name","bindValue","id",3,"formControlName","items","placeholder"]],template:function(t,a){t&1&&(_(0,di,5,1,"ng-container",0),S(1,"async")),t&2&&m("ngIf",T(1,1,a.attributes$))},dependencies:[I,A,E,W,H,Y,J,j,z,Q,q]});let e=i;return e})();var Ue=(()=>{let i=class i{constructor(){this.httpService=u(re),this.formBuilder=u(Z)}getAttributes(o){return this.httpService.get("api/product/shopify/GetAttributes",[{key:"ID",value:o}]).pipe(L(a=>(a.Options.StatusOptions=a.Options.Status.map(r=>({id:r,name:r})),a)))}createFormGroup(o){let t=this.formBuilder.group({});return Object.keys(o.Attribute).forEach(r=>{t.addControl(r,this.formBuilder.control(null))}),t}};i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=N({token:i,factory:i.\u0275fac});let e=i;return e})();function ui(e,i){if(e&1&&(D(0),s(1,"form",1)(2,"div",2)(3,"div",3)(4,"div",4),h(5," Brand "),l(),f(6,"input",5),l(),s(7,"div",6)(8,"div",4),h(9," Product Type "),l(),f(10,"input",7),l(),s(11,"div",6)(12,"div",4),h(13," Status "),l(),f(14,"ng-select",8),l()()(),V()),e&2){let n=i.ngIf,o=c();p(),m("formGroup",o.form),p(13),m("items",n.Options.StatusOptions)}}var Ut=(()=>{let i=class i{constructor(){this.attributesChanges=new O,this.shopifyFormService=u(Ue)}ngOnChanges(o){o.channelId&&(this.attributes$=this.shopifyFormService.getAttributes(this.channelId).pipe(L(t=>{this.form=this.shopifyFormService.createFormGroup(t),this.listenToFormChange()})))}listenToFormChange(){this.formSubscription=this.form.valueChanges.pipe(Re(500)).subscribe(o=>{this.attributesChanges.emit([o])})}ngOnDestroy(){this.formSubscription.unsubscribe()}};i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=x({type:i,selectors:[["shopify-attribute-form"]],inputs:{channelId:"channelId"},outputs:{attributesChanges:"attributesChanges"},standalone:!0,features:[F([Ue]),w,U],decls:2,vars:3,consts:[[4,"ngIf"],[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["formControlName","Brand","type","text","placeholder","brand",1,"form-control"],[1,"col-6"],["formControlName","ProductType","type","text","placeholder","Product Type",1,"form-control"],["formControlName","Status","bindLabel","name","bindValue","id","placeholder","Status",3,"items"]],template:function(t,a){t&1&&(_(0,ui,15,2,"ng-container",0),S(1,"async")),t&2&&m("ngIf",T(1,1,a.attributes$))},dependencies:[I,A,E,Y,J,se,j,z,Q,q,W,H]});let e=i;return e})();function fi(e,i){if(e&1&&(s(0,"div",6),f(1,"app-product-card",9),l()),e&2){let n=i.$implicit;p(),m("productId",n==null?null:n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null||n.Variants==null?null:n.Variants.length)>1?(n==null||n.Variants==null?null:n.Variants.length)+" Variants":null)("imageForZoom",n==null?null:n.ImageUrl)("code",n==null||n.Variants[0]==null?null:n.Variants[0].Code)("showFooter",!1)}}function _i(e,i){if(e&1){let n=M();D(0),s(1,"mat-checkbox",21),Xe("ngModelChange",function(t){C(n);let a=c().$implicit;return We(a.selected,t)||(a.selected=t),b(t)}),y("ngModelChange",function(){let t=C(n).ngIf,a=c(),r=a.$implicit,d=a.$index,v=c();return b(v.onSelectChannel(r,d,t))}),l(),V()}if(e&2){let n=c().$implicit;p(),He("ngModel",n.selected)}}function hi(e,i){e&1&&(s(0,"div",18),f(1,"input",22),l())}function gi(e,i){if(e&1){let n=M();s(0,"app-channel-category-select",23),y("selectedCategory",function(t){C(n);let a=c().$index,r=c();return b(r.onCategoryChange(a,t))}),l()}if(e&2){let n=c().$implicit,o=c();m("disabled",!n.selected||n.selected&&n.type==o.channelType.Lazada)("channelId",n.id)("channelType",n.type)("categoryId",n.categoryId)}}function Ci(e,i){if(e&1){let n=M();s(0,"shopee-attribute-form",27),y("attributesChanges",function(t){C(n);let a=c(2).$index,r=c();return b(r.onAttributesChange(a,t))}),l()}if(e&2){let n=c(2).$implicit;m("categoryId",n.categoryId)("channelId",n.id)("channelType",n.type)}}function bi(e,i){if(e&1){let n=M();s(0,"tiktok-attribute-form",28),y("attributesChanges",function(t){C(n);let a=c(2).$index,r=c();return b(r.onAttributesChange(a,t))}),l()}if(e&2){let n=c(2).$implicit;m("categoryId",n.categoryId)("channelId",n.id)}}function yi(e,i){if(e&1){let n=M();s(0,"wooocommerce-attribute-form",28),y("attributesChanges",function(t){C(n);let a=c(2).$index,r=c();return b(r.onAttributesChange(a,t))}),l()}if(e&2){let n=c(2).$implicit;m("categoryId",n.categoryId)("channelId",n.id)}}function vi(e,i){if(e&1){let n=M();s(0,"tokopedia-attribute-form",28),y("attributesChanges",function(t){C(n);let a=c(2).$index,r=c();return b(r.onAttributesChange(a,t))}),l()}if(e&2){let n=c(2).$implicit;m("categoryId",n.categoryId)("channelId",n.id)}}function xi(e,i){if(e&1&&(s(0,"div",20)(1,"div",24),_(2,Ci,1,3,"shopee-attribute-form",25)(3,bi,1,2,"tiktok-attribute-form",26)(4,yi,1,2,"wooocommerce-attribute-form",26)(5,vi,1,2,"tokopedia-attribute-form",26),l()()),e&2){let n,o=c().$implicit,t=c();p(2),k((n=o.type)===t.channelType.Shopee?2:n===t.channelType.Tiktok?3:n===t.channelType.WooCommerce?4:n===t.channelType.Tokopedia?5:-1)}}function Ii(e,i){if(e&1){let n=M();s(0,"div",20)(1,"div",24)(2,"shopify-attribute-form",29),y("attributesChanges",function(t){C(n);let a=c().$index,r=c();return b(r.onAttributesChange(a,t))}),l()()()}if(e&2){let n=c().$implicit;p(2),m("channelId",n.id)}}function Si(e,i){if(e&1&&(s(0,"div",8)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13)(5,"div"),_(6,_i,2,1,"ng-container",14),S(7,"async"),l(),s(8,"div"),f(9,"app-channel-logo",15),l(),s(10,"div",16)(11,"span"),h(12),l()()()(),s(13,"div",12)(14,"div",17),_(15,hi,2,0,"div",18)(16,gi,1,4,"app-channel-category-select",19),l()()(),_(17,xi,6,1,"div",20)(18,Ii,3,1,"div",20),l()()),e&2){let n=i.$implicit,o=c();p(6),m("ngIf",T(7,8,o.defaultCategories$)),p(3),m("typeId",n.type)("showChannelName",!1),p(),m("matTooltip",n.name)("matTooltipShowDelay",2500),p(2),ne(n.name),p(3),k(n.type==o.channelType.Shopify?15:16),p(2),k(n.categoryId&&o.channelType.Lazada!=n.type&&n.selected?17:o.channelType.Shopify==n.type&&n.selected?18:-1)}}var xr=(()=>{let i=class i{constructor(){this.uploadProductService=u(Ce),this.selectedProducts$=this.uploadProductService.selectedProduct$,this.channelProductUploads=this.uploadProductService.channelProductUpload,this.channelType=tt,this.defaultCategories$=this.uploadProductService.getDefaultCategory().pipe(ie(1))}onCategoryChange(o,t){this.channelProductUploads.update(a=>a.map((r,d)=>(d==o&&(r.categoryId=t,r.attributes=[]),r)))}onAttributesChange(o,t){this.channelProductUploads.update(a=>a.map((r,d)=>(d==o&&(r.attributes=t),r)))}onSelectChannel(o,t,a){this.channelProductUploads.update(r=>r.map((d,v)=>{if(v==t&&o.selected){let Te=this.findCategoryByChannelId(o.id,a);d.categoryId=Te?.DefaultCategoryID}return v==t&&!o.selected&&(d.categoryId=null),d}))}findCategoryByChannelId(o,t){return t.find(a=>a.ID===o)}onUploadProduct(){this.uploadProductService.onUploadProduct(this.channelProductUploads())}ngOnDestroy(){this.uploadProductService.clearSelectedProduct()}};i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=x({type:i,selectors:[["app-product-upload"]],standalone:!0,features:[F([he,ut,ft,ge]),U],decls:17,vars:5,consts:[["headerTitle","Upload Product To Channel",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click","disabled"],["aria-hidden","true",1,"fa","fa-upload"],[1,"container-fluid","mt-6"],[1,"ps-3","mt-8","pb-5","fw-medium"],[1,"row","mb-10","ps-3"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"ps-3","mb-8","border-bottom","pb-5","fw-medium"],[1,"row","mb-6"],[3,"productId","title","image","description","imageForZoom","code","showFooter"],[1,"col-12"],[1,"row"],[1,"col-3"],[1,"d-flex","align-items-center"],[4,"ngIf"],[3,"typeId","showChannelName"],[2,"overflow","hidden","text-overflow","ellipsis","white-space","nowrap",3,"matTooltip","matTooltipShowDelay"],[1,"w-100"],["matTooltip","Cannot change category, please change category in admin.shopify.com","matTooltipPosition","above"],[3,"disabled","channelId","channelType","categoryId"],[1,"row","my-3"],["color","primary",1,"example-margin",3,"ngModelChange","ngModel"],["disabled","","type","text","placeholder","Category Unavailable",1,"form-control","rounded-1",2,"height","35px"],[3,"selectedCategory","disabled","channelId","channelType","categoryId"],[1,"col-12","ps-11"],[3,"categoryId","channelId","channelType"],[3,"categoryId","channelId"],[3,"attributesChanges","categoryId","channelId","channelType"],[3,"attributesChanges","categoryId","channelId"],[3,"attributesChanges","channelId"]],template:function(t,a){if(t&1&&(s(0,"mainpanel",0)(1,"actions")(2,"button",1),y("click",function(){return a.onUploadProduct()}),f(3,"i",2),h(4," Upload "),l()(),s(5,"content")(6,"div",3)(7,"h3",4),h(8,"Product To Upload"),l(),s(9,"div",5),R(10,fi,2,7,"div",6,$),S(12,"async"),l(),s(13,"h3",7),h(14,"Channel To Upload"),l(),R(15,Si,19,10,"div",8,$),l()()()),t&2){let r;m("hideSearchBox",!0)("hideSearchDropdown",!0),p(2),m("disabled",((r=a.channelProductUploads())==null?null:r.length)==0),p(8),G(T(12,3,a.selectedProducts$)),p(5),G(a.channelProductUploads())}},dependencies:[I,A,E,It,lt,at,Tt,St,pt,ct,oe,j,Qe,rt,ot,wt,Ot,Dt,Vt,Ut,_t,At],encapsulation:2});let e=i;return e})();export{xr as ProductUploadComponent};
@@ -1 +1 @@
1
- import{a as _}from"./chunk-HHIG3XFB.js";import"./chunk-6U6JR5K6.js";import{a as de,b as ce}from"./chunk-7YWHTN3X.js";import"./chunk-CJILX5R7.js";import"./chunk-KZ6AD6KW.js";import"./chunk-DYLT6RRK.js";import{a as R}from"./chunk-XJSMU6IK.js";import"./chunk-BTY6PS53.js";import"./chunk-EIBGI6U2.js";import"./chunk-FQ44ODSE.js";import{e as se}from"./chunk-JHYIHRQH.js";import"./chunk-KCDL7SWP.js";import{m as D,n as pe}from"./chunk-4CEFDQPI.js";import"./chunk-2SC3HO66.js";import"./chunk-DQIP7MCZ.js";import{y as me}from"./chunk-2E5AKA74.js";import{c as f}from"./chunk-FTHTFVHH.js";import{$ as J,$c as le,Ab as U,Bc as ie,Cc as w,Ec as re,Fc as ne,Ha as G,Ja as m,Jb as c,Ka as h,Kb as N,Lb as Z,Nb as u,Ob as y,Pb as g,Q as V,Sb as $,X as H,Xb as ee,Xc as oe,Zc as ae,_a as v,aa as Q,ab as p,ac as A,bc as j,ca as K,eb as X,ga as S,ha as z,mb as o,na as q,nb as a,ob as C,rb as Y,vb as b,xb as T,xc as te,yc as P}from"./chunk-ZIZWZZ4E.js";import"./chunk-GNOSNGXM.js";var fe=(()=>{let r=class r{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/order/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/order/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/order/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/order/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/order/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/order/void-invoice"},{Title:"All",Url:"/menu/sync-log/order/all"}]}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=S({type:r,selectors:[["app-order"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),a()()(),C(4,"router-outlet")),i&2&&(m(3),p("Tabs",t.reportTabs))},dependencies:[de,oe],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]});let n=r;return n})();var F=class{};var I=(()=>{let r=class r{constructor(e){this.http=e}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(e){return new Promise((i,t)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/CreateInvoice",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncVoidInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/Void",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncConvertInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/ConvertToInvoice",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncDelivery(e){return new Promise((i,t)=>{this.http.post("/api/Report/Delivery",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncPayment(e){return new Promise((i,t)=>{this.http.post("/api/Report/Payment",JSON.stringify(e)).subscribe(d=>{i(d)})})}getAllReport(e){return this.http.post("/api/Report/all",JSON.stringify(e))}};r.\u0275fac=function(i){return new(i||r)(K(se))},r.\u0275prov=J({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var L=function(n){return n[n.OK=200]="OK",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.CONFLICT=409]="CONFLICT",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n}(L||{});var _e=()=>["/menu/log/order"],Fe=(n,r,s,e,i)=>({responseCode:n,From:r,to:s,actionType:e,ChannelID:i});function be(n,r){if(n&1&&(o(0,"th",9)(1,"div",10)(2,"h4"),c(3),a(),o(4,"small",11),c(5),a()()()),n&2){let s=r.$implicit,e=T();m(3),N(s),m(),X(e.getTextBgColor(s)),m(),N(e.getHeaderStatusDesc(s))}}function Pe(n,r){if(n&1&&(o(0,"td",14)(1,"a",15),c(2),a()()),n&2){let s=r.$implicit,e=T().$implicit,i=T();m(),p("routerLink",$(3,_e))("queryParams",ee(4,Fe,s.Key,i.fromQueryParam,i.toQueryParam,i.type,e.ChannelID)),m(),Z(" ",s.Value," ")}}function we(n,r){if(n&1&&(o(0,"tr")(1,"td")(2,"a",12),C(3,"img",13),a()(),o(4,"td")(5,"div")(6,"a",12),c(7),a()(),o(8,"div"),c(9),a()(),v(10,Pe,3,10,"td",8),a()),n&2){let s=r.$implicit,e=T();m(2),U("href",s.Url,G),m(),p("src",e.getChannelLogo(s.Type),G),m(3),U("href",s.Url,G),m(),N(s.Name),m(2),N(s.Url),m(),p("ngForOf",s.list)}}function De(n,r){if(n&1&&(o(0,"td",14)(1,"div",16),c(2),A(3,"number"),a()()),n&2){let s=r.$implicit;m(2),N(j(3,1,s.total))}}var E=(()=>{let r=class r{constructor(){this.type=null,this.headerStatus=L,this.listCalculationStatusCode=[]}set from(e){e&&(this.fromQueryParam=new Date(e).toJSON().toString())}set to(e){e&&(this.toQueryParam=new Date(e).toJSON().toString())}ngOnChanges(e){e.result&&this.calculateStatusCode()}getHeaderStatusDesc(e){let i=null;switch(e){case L.BAD_REQUEST:i="BAD REQUEST";break;case L.CONFLICT:i="CONFLICT";break;case L.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case L.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case L.OK:i="bg-success";break;case L.INTERNAL_SERVER_ERROR:i="bg-danger";break;default:i="bg-warning";break}return i}getChannelLogo(e){return f.getChannelLogoByTypeId(e)}calculateStatusCode(){if(this.listCalculationStatusCode=[],this.result){let e,i;this.concatStatusCode().forEach(t=>{e=this.listCalculationStatusCode.findIndex(d=>d.status==t.Key),i=e!==-1,i?this.listCalculationStatusCode[e].total+=t.Value:this.listCalculationStatusCode=[...this.listCalculationStatusCode,{status:t.Key,total:t.Value}]})}}concatStatusCode(){return this.result.map(e=>e.list).reduce((e,i)=>[...e,...i])}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=S({type:r,selectors:[["app-table-report"]],inputs:{header:"header",result:"result",from:"from",to:"to",type:"type"},features:[q],decls:15,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%;",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(i,t){i&1&&(o(0,"table",0)(1,"thead",1)(2,"tr"),C(3,"th",2),o(4,"th",3),c(5,"Channel"),a(),v(6,be,6,4,"th",4),a()(),o(7,"tbody"),v(8,we,11,6,"tr",5),a(),o(9,"tfoot")(10,"tr")(11,"td",6)(12,"div",7),c(13,"Total"),a()(),v(14,De,4,3,"td",8),a()()()),i&2&&(m(6),p("ngForOf",t.header),m(2),p("ngForOf",t.result),m(6),p("ngForOf",t.listCalculationStatusCode))},dependencies:[te,ae,re],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]});let n=r;return n})();function Ie(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",0)}}var he=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.pageTitle="New Order";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-sales-order"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.getChannelLogs()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Ie,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.pageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Ee(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var ue=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Ee,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Oe(n,r){if(n&1&&(o(0,"div",8)(1,"div",9),C(2,"app-table-report",10),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",3)}}var ye=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F;let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-delivery"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div",1)(3,"label",2),c(4,"From/To"),a(),o(5,"div",3)(6,"datepicker",4),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",5),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",6),v(11,Oe,3,5,"div",7),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Le(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",4)}}var ge=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Completed";let t=new Date;this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-payment"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Le,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Re(n,r){n&1&&Y(0)}function Me(n,r){if(n&1&&(o(0,"div",8)(1,"div",9),C(2,"app-table-report",10),a()()),n&2){let s=r.ngIf,e=T();m(2),p("result",s.Body)("header",s.Header)("from",e.filter==null?null:e.filter.From)("to",e.filter==null?null:e.filter.To)}}var ve=(()=>{let r=class r{constructor(e,i){this.reportOrderService=e,this.datePipe=i,this.filter=new F}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let e=new Date;this.minDate=f.addDays(e,6),this.filter.From=e,this.filter.To=e,this.updatePageTitle()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${e==null?"":i+"-"} ${t})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe(H(e=>{this.filter=e,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe(V())}onFilter(){this.updatePageTitle(),this.initData()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-all"]],decls:15,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Re,1,0,"ng-container",6),A(12,"async"),v(13,Me,3,4,"div",7),A(14,"async"),a()()()),i&2&&(p("headerTitle",t.pageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",j(12,6,t.pageLoader$)),m(2),p("ngIf",j(14,8,t.reportData$)))},dependencies:[P,D,_,E,ie]});let n=r;return n})();function ke(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var Ce=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Convert Sales Order To Invoice";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Convert Sales Order To Invoice (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-convert-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,ke,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function xe(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var Te=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-void-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,xe,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();var Ne=[{path:"",component:fe,children:[{path:"",redirectTo:"sync-order",pathMatch:"full"},{path:"sync-order",component:he,canActivate:[R],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:Ce,canActivate:[R],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:ue,canActivate:[R],data:{title:"Sync Invoice"}},{path:"delivery",component:ye,canActivate:[R],data:{title:"Sync Delivery"}},{path:"payment",component:ge,canActivate:[R],data:{title:"Sync Payment"}},{path:"void-invoice",component:Te,canActivate:[R],data:{title:"Sync void invoice"}},{path:"all",component:ve,canActivate:[R],data:{title:"All Report"}}]}],Et=(()=>{let r=class r{};r.\u0275fac=function(i){return new(i||r)},r.\u0275mod=z({type:r}),r.\u0275inj=Q({imports:[ne,ce,me,pe,_,le.forChild(Ne)]});let n=r;return n})();export{Et as OrderModule};
1
+ import{a as _}from"./chunk-HHIG3XFB.js";import"./chunk-6U6JR5K6.js";import{a as de,b as ce}from"./chunk-7YWHTN3X.js";import"./chunk-CJILX5R7.js";import"./chunk-KZ6AD6KW.js";import"./chunk-DYLT6RRK.js";import{a as R}from"./chunk-LWMWPW7O.js";import"./chunk-BTY6PS53.js";import"./chunk-EIBGI6U2.js";import"./chunk-5GZGQTZO.js";import{e as se}from"./chunk-JHYIHRQH.js";import"./chunk-KCDL7SWP.js";import{m as D,n as pe}from"./chunk-4CEFDQPI.js";import"./chunk-2SC3HO66.js";import"./chunk-DQIP7MCZ.js";import{y as me}from"./chunk-2E5AKA74.js";import{c as f}from"./chunk-FTHTFVHH.js";import{$ as J,$c as le,Ab as U,Bc as ie,Cc as w,Ec as re,Fc as ne,Ha as G,Ja as m,Jb as c,Ka as h,Kb as N,Lb as Z,Nb as u,Ob as y,Pb as g,Q as V,Sb as $,X as H,Xb as ee,Xc as oe,Zc as ae,_a as v,aa as Q,ab as p,ac as A,bc as j,ca as K,eb as X,ga as S,ha as z,mb as o,na as q,nb as a,ob as C,rb as Y,vb as b,xb as T,xc as te,yc as P}from"./chunk-ZIZWZZ4E.js";import"./chunk-GNOSNGXM.js";var fe=(()=>{let r=class r{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/order/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/order/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/order/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/order/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/order/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/order/void-invoice"},{Title:"All",Url:"/menu/sync-log/order/all"}]}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=S({type:r,selectors:[["app-order"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),a()()(),C(4,"router-outlet")),i&2&&(m(3),p("Tabs",t.reportTabs))},dependencies:[de,oe],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]});let n=r;return n})();var F=class{};var I=(()=>{let r=class r{constructor(e){this.http=e}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(e){return new Promise((i,t)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/CreateInvoice",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncVoidInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/Void",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncConvertInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/ConvertToInvoice",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncDelivery(e){return new Promise((i,t)=>{this.http.post("/api/Report/Delivery",JSON.stringify(e)).subscribe(d=>{i(d)})})}GetSyncPayment(e){return new Promise((i,t)=>{this.http.post("/api/Report/Payment",JSON.stringify(e)).subscribe(d=>{i(d)})})}getAllReport(e){return this.http.post("/api/Report/all",JSON.stringify(e))}};r.\u0275fac=function(i){return new(i||r)(K(se))},r.\u0275prov=J({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var L=function(n){return n[n.OK=200]="OK",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.CONFLICT=409]="CONFLICT",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n}(L||{});var _e=()=>["/menu/log/order"],Fe=(n,r,s,e,i)=>({responseCode:n,From:r,to:s,actionType:e,ChannelID:i});function be(n,r){if(n&1&&(o(0,"th",9)(1,"div",10)(2,"h4"),c(3),a(),o(4,"small",11),c(5),a()()()),n&2){let s=r.$implicit,e=T();m(3),N(s),m(),X(e.getTextBgColor(s)),m(),N(e.getHeaderStatusDesc(s))}}function Pe(n,r){if(n&1&&(o(0,"td",14)(1,"a",15),c(2),a()()),n&2){let s=r.$implicit,e=T().$implicit,i=T();m(),p("routerLink",$(3,_e))("queryParams",ee(4,Fe,s.Key,i.fromQueryParam,i.toQueryParam,i.type,e.ChannelID)),m(),Z(" ",s.Value," ")}}function we(n,r){if(n&1&&(o(0,"tr")(1,"td")(2,"a",12),C(3,"img",13),a()(),o(4,"td")(5,"div")(6,"a",12),c(7),a()(),o(8,"div"),c(9),a()(),v(10,Pe,3,10,"td",8),a()),n&2){let s=r.$implicit,e=T();m(2),U("href",s.Url,G),m(),p("src",e.getChannelLogo(s.Type),G),m(3),U("href",s.Url,G),m(),N(s.Name),m(2),N(s.Url),m(),p("ngForOf",s.list)}}function De(n,r){if(n&1&&(o(0,"td",14)(1,"div",16),c(2),A(3,"number"),a()()),n&2){let s=r.$implicit;m(2),N(j(3,1,s.total))}}var E=(()=>{let r=class r{constructor(){this.type=null,this.headerStatus=L,this.listCalculationStatusCode=[]}set from(e){e&&(this.fromQueryParam=new Date(e).toJSON().toString())}set to(e){e&&(this.toQueryParam=new Date(e).toJSON().toString())}ngOnChanges(e){e.result&&this.calculateStatusCode()}getHeaderStatusDesc(e){let i=null;switch(e){case L.BAD_REQUEST:i="BAD REQUEST";break;case L.CONFLICT:i="CONFLICT";break;case L.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case L.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case L.OK:i="bg-success";break;case L.INTERNAL_SERVER_ERROR:i="bg-danger";break;default:i="bg-warning";break}return i}getChannelLogo(e){return f.getChannelLogoByTypeId(e)}calculateStatusCode(){if(this.listCalculationStatusCode=[],this.result){let e,i;this.concatStatusCode().forEach(t=>{e=this.listCalculationStatusCode.findIndex(d=>d.status==t.Key),i=e!==-1,i?this.listCalculationStatusCode[e].total+=t.Value:this.listCalculationStatusCode=[...this.listCalculationStatusCode,{status:t.Key,total:t.Value}]})}}concatStatusCode(){return this.result.map(e=>e.list).reduce((e,i)=>[...e,...i])}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=S({type:r,selectors:[["app-table-report"]],inputs:{header:"header",result:"result",from:"from",to:"to",type:"type"},features:[q],decls:15,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%;",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(i,t){i&1&&(o(0,"table",0)(1,"thead",1)(2,"tr"),C(3,"th",2),o(4,"th",3),c(5,"Channel"),a(),v(6,be,6,4,"th",4),a()(),o(7,"tbody"),v(8,we,11,6,"tr",5),a(),o(9,"tfoot")(10,"tr")(11,"td",6)(12,"div",7),c(13,"Total"),a()(),v(14,De,4,3,"td",8),a()()()),i&2&&(m(6),p("ngForOf",t.header),m(2),p("ngForOf",t.result),m(6),p("ngForOf",t.listCalculationStatusCode))},dependencies:[te,ae,re],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]});let n=r;return n})();function Ie(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",0)}}var he=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.pageTitle="New Order";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-sales-order"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.getChannelLogs()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Ie,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.pageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Ee(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var ue=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Ee,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Oe(n,r){if(n&1&&(o(0,"div",8)(1,"div",9),C(2,"app-table-report",10),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",3)}}var ye=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F;let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-delivery"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div",1)(3,"label",2),c(4,"From/To"),a(),o(5,"div",3)(6,"datepicker",4),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",5),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",6),v(11,Oe,3,5,"div",7),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Le(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",4)}}var ge=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Completed";let t=new Date;this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-payment"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Le,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function Re(n,r){n&1&&Y(0)}function Me(n,r){if(n&1&&(o(0,"div",8)(1,"div",9),C(2,"app-table-report",10),a()()),n&2){let s=r.ngIf,e=T();m(2),p("result",s.Body)("header",s.Header)("from",e.filter==null?null:e.filter.From)("to",e.filter==null?null:e.filter.To)}}var ve=(()=>{let r=class r{constructor(e,i){this.reportOrderService=e,this.datePipe=i,this.filter=new F}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let e=new Date;this.minDate=f.addDays(e,6),this.filter.From=e,this.filter.To=e,this.updatePageTitle()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${e==null?"":i+"-"} ${t})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe(H(e=>{this.filter=e,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe(V())}onFilter(){this.updatePageTitle(),this.initData()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-all"]],decls:15,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,Re,1,0,"ng-container",6),A(12,"async"),v(13,Me,3,4,"div",7),A(14,"async"),a()()()),i&2&&(p("headerTitle",t.pageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",j(12,6,t.pageLoader$)),m(2),p("ngIf",j(14,8,t.reportData$)))},dependencies:[P,D,_,E,ie]});let n=r;return n})();function ke(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var Ce=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Convert Sales Order To Invoice";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Convert Sales Order To Invoice (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-convert-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,ke,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();function xe(n,r){if(n&1&&(o(0,"div",7)(1,"div",8),C(2,"app-table-report",9),a()()),n&2){let s=T();m(2),p("result",s.result)("header",s.header)("from",s.filter.From)("to",s.filter.To)("type",1)}}var Te=(()=>{let r=class r{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new F,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=f.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=f.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}};r.\u0275fac=function(i){return new(i||r)(h(I),h(w))},r.\u0275cmp=S({type:r,selectors:[["app-void-invoice"]],decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(o(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),o(1,"filters")(2,"div")(3,"label",1),c(4,"From/To"),a(),o(5,"div",2)(6,"datepicker",3),g("dateChange",function(l){return y(t.filter.From,l)||(t.filter.From=l),l}),a()(),o(7,"div")(8,"datepicker",4),g("dateChange",function(l){return y(t.filter.To,l)||(t.filter.To=l),l}),a()()()(),o(9,"content")(10,"div",5),v(11,xe,3,5,"div",6),a()()()),i&2&&(p("headerTitle",t.PageTitle)("hideSearchBox",!0),m(6),u("date",t.filter.From),m(2),u("date",t.filter.To),m(3),p("ngIf",t.result))},dependencies:[P,D,_,E]});let n=r;return n})();var Ne=[{path:"",component:fe,children:[{path:"",redirectTo:"sync-order",pathMatch:"full"},{path:"sync-order",component:he,canActivate:[R],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:Ce,canActivate:[R],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:ue,canActivate:[R],data:{title:"Sync Invoice"}},{path:"delivery",component:ye,canActivate:[R],data:{title:"Sync Delivery"}},{path:"payment",component:ge,canActivate:[R],data:{title:"Sync Payment"}},{path:"void-invoice",component:Te,canActivate:[R],data:{title:"Sync void invoice"}},{path:"all",component:ve,canActivate:[R],data:{title:"All Report"}}]}],Et=(()=>{let r=class r{};r.\u0275fac=function(i){return new(i||r)},r.\u0275mod=z({type:r}),r.\u0275inj=Q({imports:[ne,ce,me,pe,_,le.forChild(Ne)]});let n=r;return n})();export{Et as OrderModule};
@@ -1 +1 @@
1
- import{a as Z}from"./chunk-P5TJRZVH.js";import{a as Y}from"./chunk-65RMQ5Q5.js";import{b as ee,c as V}from"./chunk-MZNSPLFO.js";import"./chunk-BVIRHZTZ.js";import{b as X}from"./chunk-ULELZXI5.js";import"./chunk-E5BOLHDG.js";import"./chunk-A37OKNC2.js";import"./chunk-C6QIBOCB.js";import{a as Q}from"./chunk-7VKIP3Z6.js";import"./chunk-DYLT6RRK.js";import"./chunk-D76K4RZ7.js";import"./chunk-EIBGI6U2.js";import{g as q}from"./chunk-FQ44ODSE.js";import{b as $,e as H}from"./chunk-JHYIHRQH.js";import"./chunk-KCDL7SWP.js";import{d as z,m as J,n as K}from"./chunk-4CEFDQPI.js";import"./chunk-2SC3HO66.js";import"./chunk-DQIP7MCZ.js";import{c as U,h as j,m as k,o as G,y as W}from"./chunk-2E5AKA74.js";import"./chunk-FTHTFVHH.js";import{B as F,Bc as B,Ec as I,Fc as O,Ja as u,Jb as f,Ka as h,Nb as v,Ob as y,Pb as D,Q as T,Qb as R,Rb as L,X as M,_a as w,ab as P,ac as C,bc as x,da as N,ga as E,mb as a,nb as m,oa as s,ob as b,pa as l,sb as S,vb as g,xb as o,yc as A}from"./chunk-ZIZWZZ4E.js";import"./chunk-GNOSNGXM.js";function te(r,c){if(r&1){let i=S();a(0,"button",15),g("click",function(){s(i);let e=o().ngIf,n=o(2);return l(n.onUpdateItems(e))}),b(1,"i",16),f(2," Update "),m()}}function ie(r,c){if(r&1&&(a(0,"div"),w(1,te,3,0,"button",14),m()),r&2){let i=c.ngIf,t=o(2);u(),P("ngIf",t.productService.hasSelectionVariant(i))}}function ne(r,c){if(r&1){let i=S();a(0,"mainpanel",1),g("onSubmit",function(e){s(i);let n=o();return l(n.onSearch(e))}),a(1,"actions")(2,"div",2),w(3,ie,2,1,"div",3),C(4,"async"),a(5,"button",4),g("click",function(){s(i);let e=o();return l(e.openExportDialog())}),b(6,"i",5),a(7,"span"),f(8,"Export"),m()()()(),a(9,"filters")(10,"div")(11,"label",6),f(12,"Page Number"),m(),a(13,"input",7),D("ngModelChange",function(e){s(i);let n=o();return y(n.searchFilter.PageNumber,e)||(n.searchFilter.PageNumber=e),l(e)}),m()(),a(14,"div",8)(15,"label",6),f(16,"Page Size"),m(),a(17,"input",7),D("ngModelChange",function(e){s(i);let n=o();return y(n.searchFilter.RowCount,e)||(n.searchFilter.RowCount=e),l(e)}),m()()(),a(18,"content")(19,"div",9)(20,"div",10)(21,"div",11)(22,"app-table",12),C(23,"async"),g("onToggle",function(e){s(i);let n=o();return l(n.onShowDifferencePrice(e))})("onSubmit",function(e){s(i);let n=o();return l(n.updatePriceByVariant(e))}),m(),a(24,"infinite-paginator",13),C(25,"async"),g("onNextPage",function(){s(i);let e=o();return l(e.infinitePagination.onNextPage(e.searchFilter))})("onLastPage",function(){s(i);let e=o();return l(e.infinitePagination.onLastPage(e.searchFilter))})("onGetRowCount",function(){s(i);let e=o();return l(e.infinitePagination.getRowCount(e.searchFilter))}),m()()()()()()}if(r&2){let i=o();P("textButton","Search"),u(3),P("ngIf",x(4,14,i.data$)),u(10),v("ngModel",i.searchFilter.PageNumber),u(4),v("ngModel",i.searchFilter.RowCount),u(5),P("showProductToggle",!0)("data",x(23,16,i.data$))("channel",i.channelOptions)("hiddenIPOSInventory",!1),u(2),P("totalData",i.infinitePagination.totalData())("hideCount",i.infinitePagination.hideCount())("rowCount",x(25,18,i.infinitePagination.totalRowCount$))("pageNumber",i.infinitePagination.pageNumber())("disableNextButton",i.infinitePagination.disableNextButton())("goToLastPage",i.infinitePagination.isLastPage())}}var ve=(()=>{let c=class c{constructor(t,e,n,_,d,p){this.http=t,this.toastr=e,this.dialog=n,this.productService=_,this.authService=d,this.decimalPipe=p,this.infinitePagination=N(V),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(T()),this.pageData={Title:"Price",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!0},{Title:"Price Realtime",Url:"/menu/price/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(M(t=>{t.Filter={PageNumber:t.Filter.PageNumber,RowCount:t.Filter.RowCount,filterModel:1},this.searchFilter=t.Filter,this.infinitePagination.reloadPagination(this.searchFilter)}))}onShowDifferencePrice(t){this.searchFilter.filterModel=1,t&&(this.searchFilter.filterModel=3),this.infinitePagination.reloadPagination(this.searchFilter)}onSearch(t){this.searchFilter.text=t,this.infinitePagination.reloadPagination(this.searchFilter)}updatePrice(t){let e=this.productService.selectedVariantProduct(t);if(e.length>0){let _=e.map(p=>({ID:p.ID,Code:p.Code,Price:p.UnitPrice}));var n=this.channelOptions.filter(p=>p.selected).map(p=>p.ID);let d={ListChannelID:n,ListPrice:_};this.http.post("/api/Price/UpdateChannel",d).subscribe(p=>{this.infinitePagination.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+d.ListPrice.length+" items in "+d.ListChannelID.length+" channels","Success")})}}updatePriceByVariant(t){let e={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:t.Price-0,VariantID:t.ID};this.http.post("/api/Price/UpdatePriceByID",e).subscribe(n=>{let _=this.productService.findChannelById(e.ID,this.channelOptions),d=e.Price?this.decimalPipe.transform(e.Price):e.Price;this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") price in "+_.Name+" to "+d,"Success"),this.infinitePagination.reloadPagination(this.searchFilter)})}onUpdateItems(t){let e=this.productService.selectedVariantProduct(t);this.dialog.open(Y,{data:{selectedItems:e,channels:this.channelOptions},width:"600px"}).afterClosed().pipe(F(n=>n!==void 0)).subscribe(n=>{this.channelOptions=n,this.updatePrice(t)})}openExportDialog(){this.dialog.open(X,{data:{title:"Export Multi Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportMultipleChannelComparison"}}).afterClosed().subscribe()}};c.\u0275fac=function(e){return new(e||c)(h(H),h($),h(z),h(Q),h(q),h(I))},c.\u0275cmp=E({type:c,selectors:[["app-price-pos-channel"]],standalone:!0,features:[R([V,I]),L],decls:2,vars:3,consts:[["headerTitle","Price Comparison",3,"textButton","onSubmit",4,"ngIf"],["headerTitle","Price Comparison",3,"onSubmit","textButton"],[1,"d-flex"],[4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"onToggle","onSubmit","showProductToggle","data","channel","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"]],template:function(e,n){e&1&&(w(0,ne,26,20,"mainpanel",0),C(1,"async")),e&2&&P("ngIf",x(1,1,n.loader$))},dependencies:[O,A,B,W,U,G,j,k,ee,K,J,Z],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let r=c;return r})();export{ve as PricePosChannelComponent};
1
+ import{a as Z}from"./chunk-3VGAURY3.js";import{a as Y}from"./chunk-65RMQ5Q5.js";import{b as ee,c as V}from"./chunk-MZNSPLFO.js";import"./chunk-BVIRHZTZ.js";import{b as X}from"./chunk-ULELZXI5.js";import"./chunk-E5BOLHDG.js";import"./chunk-A37OKNC2.js";import"./chunk-C6QIBOCB.js";import{a as Q}from"./chunk-7VKIP3Z6.js";import"./chunk-DYLT6RRK.js";import"./chunk-D76K4RZ7.js";import"./chunk-EIBGI6U2.js";import{g as q}from"./chunk-5GZGQTZO.js";import{b as $,e as H}from"./chunk-JHYIHRQH.js";import"./chunk-KCDL7SWP.js";import{d as z,m as J,n as K}from"./chunk-4CEFDQPI.js";import"./chunk-2SC3HO66.js";import"./chunk-DQIP7MCZ.js";import{c as U,h as j,m as k,o as G,y as W}from"./chunk-2E5AKA74.js";import"./chunk-FTHTFVHH.js";import{B as F,Bc as B,Ec as I,Fc as O,Ja as u,Jb as f,Ka as h,Nb as v,Ob as y,Pb as D,Q as T,Qb as R,Rb as L,X as M,_a as w,ab as P,ac as C,bc as x,da as N,ga as E,mb as a,nb as m,oa as s,ob as b,pa as l,sb as S,vb as g,xb as o,yc as A}from"./chunk-ZIZWZZ4E.js";import"./chunk-GNOSNGXM.js";function te(r,c){if(r&1){let i=S();a(0,"button",15),g("click",function(){s(i);let e=o().ngIf,n=o(2);return l(n.onUpdateItems(e))}),b(1,"i",16),f(2," Update "),m()}}function ie(r,c){if(r&1&&(a(0,"div"),w(1,te,3,0,"button",14),m()),r&2){let i=c.ngIf,t=o(2);u(),P("ngIf",t.productService.hasSelectionVariant(i))}}function ne(r,c){if(r&1){let i=S();a(0,"mainpanel",1),g("onSubmit",function(e){s(i);let n=o();return l(n.onSearch(e))}),a(1,"actions")(2,"div",2),w(3,ie,2,1,"div",3),C(4,"async"),a(5,"button",4),g("click",function(){s(i);let e=o();return l(e.openExportDialog())}),b(6,"i",5),a(7,"span"),f(8,"Export"),m()()()(),a(9,"filters")(10,"div")(11,"label",6),f(12,"Page Number"),m(),a(13,"input",7),D("ngModelChange",function(e){s(i);let n=o();return y(n.searchFilter.PageNumber,e)||(n.searchFilter.PageNumber=e),l(e)}),m()(),a(14,"div",8)(15,"label",6),f(16,"Page Size"),m(),a(17,"input",7),D("ngModelChange",function(e){s(i);let n=o();return y(n.searchFilter.RowCount,e)||(n.searchFilter.RowCount=e),l(e)}),m()()(),a(18,"content")(19,"div",9)(20,"div",10)(21,"div",11)(22,"app-table",12),C(23,"async"),g("onToggle",function(e){s(i);let n=o();return l(n.onShowDifferencePrice(e))})("onSubmit",function(e){s(i);let n=o();return l(n.updatePriceByVariant(e))}),m(),a(24,"infinite-paginator",13),C(25,"async"),g("onNextPage",function(){s(i);let e=o();return l(e.infinitePagination.onNextPage(e.searchFilter))})("onLastPage",function(){s(i);let e=o();return l(e.infinitePagination.onLastPage(e.searchFilter))})("onGetRowCount",function(){s(i);let e=o();return l(e.infinitePagination.getRowCount(e.searchFilter))}),m()()()()()()}if(r&2){let i=o();P("textButton","Search"),u(3),P("ngIf",x(4,14,i.data$)),u(10),v("ngModel",i.searchFilter.PageNumber),u(4),v("ngModel",i.searchFilter.RowCount),u(5),P("showProductToggle",!0)("data",x(23,16,i.data$))("channel",i.channelOptions)("hiddenIPOSInventory",!1),u(2),P("totalData",i.infinitePagination.totalData())("hideCount",i.infinitePagination.hideCount())("rowCount",x(25,18,i.infinitePagination.totalRowCount$))("pageNumber",i.infinitePagination.pageNumber())("disableNextButton",i.infinitePagination.disableNextButton())("goToLastPage",i.infinitePagination.isLastPage())}}var ve=(()=>{let c=class c{constructor(t,e,n,_,d,p){this.http=t,this.toastr=e,this.dialog=n,this.productService=_,this.authService=d,this.decimalPipe=p,this.infinitePagination=N(V),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(T()),this.pageData={Title:"Price",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!0},{Title:"Price Realtime",Url:"/menu/price/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(M(t=>{t.Filter={PageNumber:t.Filter.PageNumber,RowCount:t.Filter.RowCount,filterModel:1},this.searchFilter=t.Filter,this.infinitePagination.reloadPagination(this.searchFilter)}))}onShowDifferencePrice(t){this.searchFilter.filterModel=1,t&&(this.searchFilter.filterModel=3),this.infinitePagination.reloadPagination(this.searchFilter)}onSearch(t){this.searchFilter.text=t,this.infinitePagination.reloadPagination(this.searchFilter)}updatePrice(t){let e=this.productService.selectedVariantProduct(t);if(e.length>0){let _=e.map(p=>({ID:p.ID,Code:p.Code,Price:p.UnitPrice}));var n=this.channelOptions.filter(p=>p.selected).map(p=>p.ID);let d={ListChannelID:n,ListPrice:_};this.http.post("/api/Price/UpdateChannel",d).subscribe(p=>{this.infinitePagination.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+d.ListPrice.length+" items in "+d.ListChannelID.length+" channels","Success")})}}updatePriceByVariant(t){let e={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:t.Price-0,VariantID:t.ID};this.http.post("/api/Price/UpdatePriceByID",e).subscribe(n=>{let _=this.productService.findChannelById(e.ID,this.channelOptions),d=e.Price?this.decimalPipe.transform(e.Price):e.Price;this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") price in "+_.Name+" to "+d,"Success"),this.infinitePagination.reloadPagination(this.searchFilter)})}onUpdateItems(t){let e=this.productService.selectedVariantProduct(t);this.dialog.open(Y,{data:{selectedItems:e,channels:this.channelOptions},width:"600px"}).afterClosed().pipe(F(n=>n!==void 0)).subscribe(n=>{this.channelOptions=n,this.updatePrice(t)})}openExportDialog(){this.dialog.open(X,{data:{title:"Export Multi Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportMultipleChannelComparison"}}).afterClosed().subscribe()}};c.\u0275fac=function(e){return new(e||c)(h(H),h($),h(z),h(Q),h(q),h(I))},c.\u0275cmp=E({type:c,selectors:[["app-price-pos-channel"]],standalone:!0,features:[R([V,I]),L],decls:2,vars:3,consts:[["headerTitle","Price Comparison",3,"textButton","onSubmit",4,"ngIf"],["headerTitle","Price Comparison",3,"onSubmit","textButton"],[1,"d-flex"],[4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"onToggle","onSubmit","showProductToggle","data","channel","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"]],template:function(e,n){e&1&&(w(0,ne,26,20,"mainpanel",0),C(1,"async")),e&2&&P("ngIf",x(1,1,n.loader$))},dependencies:[O,A,B,W,U,G,j,k,ee,K,J,Z],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let r=c;return r})();export{ve as PricePosChannelComponent};
@@ -1 +1 @@
1
- import{a as T}from"./chunk-XUSY2QT2.js";import{a as y,b}from"./chunk-7YWHTN3X.js";import{a}from"./chunk-XJSMU6IK.js";import"./chunk-FQ44ODSE.js";import"./chunk-JHYIHRQH.js";import"./chunk-KCDL7SWP.js";import"./chunk-2SC3HO66.js";import"./chunk-DQIP7MCZ.js";import"./chunk-FTHTFVHH.js";import{$c as r,Fc as o,Ja as c,Qb as h,Rb as v,Xc as C,aa as p,ab as u,ga as l,ha as s,mb as d,nb as f,ob as i}from"./chunk-ZIZWZZ4E.js";import"./chunk-GNOSNGXM.js";var M=(()=>{let e=class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"},{Title:"Different Inventory",Url:"/menu/inventory/channel_summary"}]}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=l({type:e,selectors:[["app-inventory"]],standalone:!0,features:[h([T]),v],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,S){n&1&&(d(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),f()()(),i(4,"router-outlet")),n&2&&(c(3),u("Tabs",S.inventoryTabs))},dependencies:[o,b,y,r,C],encapsulation:2});let t=e;return t})();var A=[{path:"",component:M,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-JSNPJ3MM.js").then(t=>t.MultiChannelComparison)},canActivate:[a],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-EEMDWQRP.js").then(t=>t.SingleChannelComparisonComponent)},canActivate:[a],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-ACQIVAGX.js").then(t=>t.ChannelSummaryComponent)},canActivate:[a],data:{title:"Different Inventory"}}]}],P=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=s({type:e}),e.\u0275inj=p({imports:[o,r.forChild(A)]});let t=e;return t})();export{P as InventoryRoutingModule};
1
+ import{a as T}from"./chunk-XUSY2QT2.js";import{a as y,b}from"./chunk-7YWHTN3X.js";import{a}from"./chunk-LWMWPW7O.js";import"./chunk-5GZGQTZO.js";import"./chunk-JHYIHRQH.js";import"./chunk-KCDL7SWP.js";import"./chunk-2SC3HO66.js";import"./chunk-DQIP7MCZ.js";import"./chunk-FTHTFVHH.js";import{$c as r,Fc as o,Ja as c,Qb as h,Rb as v,Xc as C,aa as p,ab as u,ga as l,ha as s,mb as d,nb as f,ob as i}from"./chunk-ZIZWZZ4E.js";import"./chunk-GNOSNGXM.js";var M=(()=>{let e=class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"},{Title:"Different Inventory",Url:"/menu/inventory/channel_summary"}]}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=l({type:e,selectors:[["app-inventory"]],standalone:!0,features:[h([T]),v],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,S){n&1&&(d(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),f()()(),i(4,"router-outlet")),n&2&&(c(3),u("Tabs",S.inventoryTabs))},dependencies:[o,b,y,r,C],encapsulation:2});let t=e;return t})();var A=[{path:"",component:M,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-OMR5REL2.js").then(t=>t.MultiChannelComparison)},canActivate:[a],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-SAGRGMBL.js").then(t=>t.SingleChannelComparisonComponent)},canActivate:[a],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-GOV3GQ7Y.js").then(t=>t.ChannelSummaryComponent)},canActivate:[a],data:{title:"Different Inventory"}}]}],P=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=s({type:e}),e.\u0275inj=p({imports:[o,r.forChild(A)]});let t=e;return t})();export{P as InventoryRoutingModule};
@@ -1 +1 @@
1
- import{a as v,b}from"./chunk-7YWHTN3X.js";import{a as r}from"./chunk-XJSMU6IK.js";import"./chunk-FQ44ODSE.js";import"./chunk-JHYIHRQH.js";import"./chunk-KCDL7SWP.js";import"./chunk-2SC3HO66.js";import"./chunk-DQIP7MCZ.js";import"./chunk-FTHTFVHH.js";import{$c as i,Fc as o,Ja as s,Rb as f,Xc as h,aa as l,ab as u,ga as m,ha as c,mb as d,nb as C,ob as a}from"./chunk-ZIZWZZ4E.js";import"./chunk-GNOSNGXM.js";var T=(()=>{let e=class e{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"},{Title:"Custom Channel Price",Url:"/menu/price/OutletPrice"}]}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=m({type:e,selectors:[["app-price"]],standalone:!0,features:[f],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,g){n&1&&(d(0,"nav",0)(1,"div",1)(2,"div"),a(3,"nav-tab",2),C()()(),a(4,"router-outlet")),n&2&&(s(3),u("Tabs",g.priceTabs))},dependencies:[o,b,v,i,h],encapsulation:2});let t=e;return t})();var P=[{path:"",component:T,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-EBAZER63.js").then(t=>t.PricePosChannelComponent)},canActivate:[r],data:{title:"Global Price Comparison"}},{path:"OutletPrice",loadComponent(){return import("./chunk-34GTZZQO.js").then(t=>t.CustomChannelPriceComponent)},canActivate:[r],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-ITQ6LYLN.js").then(t=>t.PriceSingleChannelComponent)},canActivate:[r],data:{title:"Price Single Channel Comparison"}}]}],D=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=c({type:e}),e.\u0275inj=l({imports:[o,i.forChild(P)]});let t=e;return t})();export{D as PriceRoutingModule};
1
+ import{a as v,b}from"./chunk-7YWHTN3X.js";import{a as r}from"./chunk-LWMWPW7O.js";import"./chunk-5GZGQTZO.js";import"./chunk-JHYIHRQH.js";import"./chunk-KCDL7SWP.js";import"./chunk-2SC3HO66.js";import"./chunk-DQIP7MCZ.js";import"./chunk-FTHTFVHH.js";import{$c as i,Fc as o,Ja as s,Rb as f,Xc as h,aa as l,ab as u,ga as m,ha as c,mb as d,nb as C,ob as a}from"./chunk-ZIZWZZ4E.js";import"./chunk-GNOSNGXM.js";var T=(()=>{let e=class e{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"},{Title:"Custom Channel Price",Url:"/menu/price/OutletPrice"}]}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=m({type:e,selectors:[["app-price"]],standalone:!0,features:[f],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,g){n&1&&(d(0,"nav",0)(1,"div",1)(2,"div"),a(3,"nav-tab",2),C()()(),a(4,"router-outlet")),n&2&&(s(3),u("Tabs",g.priceTabs))},dependencies:[o,b,v,i,h],encapsulation:2});let t=e;return t})();var P=[{path:"",component:T,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-BARICLUB.js").then(t=>t.PricePosChannelComponent)},canActivate:[r],data:{title:"Global Price Comparison"}},{path:"OutletPrice",loadComponent(){return import("./chunk-5CRDOJPK.js").then(t=>t.CustomChannelPriceComponent)},canActivate:[r],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-HTFZRZEI.js").then(t=>t.PriceSingleChannelComponent)},canActivate:[r],data:{title:"Price Single Channel Comparison"}}]}],D=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=c({type:e}),e.\u0275inj=l({imports:[o,i.forChild(P)]});let t=e;return t})();export{D as PriceRoutingModule};