marketplacepos 3.19.3 → 3.20.1

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 (97) hide show
  1. package/Marketplace/3rdpartylicenses.txt +12 -12
  2. package/Marketplace/{chunk-O5MOPAT5.js → chunk-2E5AKA74.js} +1 -1
  3. package/Marketplace/chunk-2FRMUOJY.js +15 -0
  4. package/Marketplace/{chunk-ZWDUUAFA.js → chunk-2L6CZFW7.js} +1 -1
  5. package/Marketplace/{chunk-CTKEWRX4.js → chunk-2SC3HO66.js} +1 -1
  6. package/Marketplace/chunk-2V4K6SEC.js +1 -0
  7. package/Marketplace/{chunk-CHPESC5O.js → chunk-33L2SBIN.js} +1 -1
  8. package/Marketplace/chunk-47PEHCOU.js +1 -0
  9. package/Marketplace/{chunk-3XWOT6GZ.js → chunk-4CEFDQPI.js} +1 -1
  10. package/Marketplace/{chunk-E4XM7VHY.js → chunk-4O74KBBT.js} +1 -1
  11. package/Marketplace/{chunk-JKF36COK.js → chunk-5HY6FBUD.js} +1 -1
  12. package/Marketplace/{chunk-S36U4I4O.js → chunk-65RMQ5Q5.js} +1 -1
  13. package/Marketplace/{chunk-ATJPUUZQ.js → chunk-6UDYSYXW.js} +1 -1
  14. package/Marketplace/{chunk-AHA2WBEK.js → chunk-7V2SU4MA.js} +1 -1
  15. package/Marketplace/{chunk-WVKDNFEM.js → chunk-7VKIP3Z6.js} +2 -2
  16. package/Marketplace/chunk-7WUKCDMC.js +1 -0
  17. package/Marketplace/{chunk-K6H25CD6.js → chunk-7YWHTN3X.js} +1 -1
  18. package/Marketplace/{chunk-W3POM6UQ.js → chunk-A37OKNC2.js} +1 -1
  19. package/Marketplace/{chunk-HRB6G2LU.js → chunk-ALKBIH7J.js} +2 -2
  20. package/Marketplace/{chunk-4URWFKAM.js → chunk-BGWVHGAY.js} +1 -1
  21. package/Marketplace/{chunk-3LSSEMTW.js → chunk-BKFG7NIB.js} +1 -1
  22. package/Marketplace/{chunk-M4JG6342.js → chunk-BTY6PS53.js} +1 -1
  23. package/Marketplace/chunk-BZPMSXEO.js +9 -0
  24. package/Marketplace/{chunk-4QK7Y7R2.js → chunk-C6QIBOCB.js} +1 -1
  25. package/Marketplace/{chunk-3TNPJNQS.js → chunk-CJILX5R7.js} +1 -1
  26. package/Marketplace/{chunk-PYBQPNRY.js → chunk-D6L7HUOY.js} +1 -1
  27. package/Marketplace/{chunk-3ZQBMP7R.js → chunk-D76K4RZ7.js} +1 -1
  28. package/Marketplace/chunk-DA5WII5E.js +2 -0
  29. package/Marketplace/{chunk-GXHE2CDH.js → chunk-DQIP7MCZ.js} +1 -1
  30. package/Marketplace/{chunk-73DE2GZF.js → chunk-DYLT6RRK.js} +1 -1
  31. package/Marketplace/{chunk-GP6U42SV.js → chunk-E5BOLHDG.js} +1 -1
  32. package/Marketplace/{chunk-3UKBESDQ.js → chunk-EGYILQWG.js} +1 -1
  33. package/Marketplace/{chunk-6NTRXLMW.js → chunk-EIBGI6U2.js} +1 -1
  34. package/Marketplace/{chunk-GEOZCTY6.js → chunk-EN6KXWCY.js} +1 -1
  35. package/Marketplace/chunk-EXZPDDOY.js +1 -0
  36. package/Marketplace/{chunk-X4WLRMDP.js → chunk-FTHTFVHH.js} +1 -1
  37. package/Marketplace/{chunk-XNGU3O4O.js → chunk-GNY5TY3R.js} +1 -1
  38. package/Marketplace/{chunk-RVVTVU4B.js → chunk-GQG2K3LS.js} +1 -1
  39. package/Marketplace/{chunk-2ORPFPW3.js → chunk-HCJ6C5OR.js} +1 -1
  40. package/Marketplace/{chunk-PBJG5QAA.js → chunk-HHIG3XFB.js} +1 -1
  41. package/Marketplace/{chunk-G3NZDAHG.js → chunk-HOTEJTGP.js} +1 -1
  42. package/Marketplace/chunk-IG57OCJS.js +9 -0
  43. package/Marketplace/{chunk-FZDYEHNC.js → chunk-IIPI4CHY.js} +1 -1
  44. package/Marketplace/chunk-JEC3SZTG.js +1 -0
  45. package/Marketplace/{chunk-NVF24LK5.js → chunk-JHYIHRQH.js} +1 -1
  46. package/Marketplace/{chunk-IIANF3VA.js → chunk-JUWM7ABO.js} +1 -1
  47. package/Marketplace/{chunk-WH3FZ3VM.js → chunk-JY3L4RUM.js} +1 -1
  48. package/Marketplace/{chunk-44IWQ2WK.js → chunk-KZ6AD6KW.js} +1 -1
  49. package/Marketplace/{chunk-KGSUB5OH.js → chunk-L4BFVIW5.js} +1 -1
  50. package/Marketplace/{chunk-2C32PU5X.js → chunk-LAQL3BQZ.js} +1 -1
  51. package/Marketplace/chunk-MADSP2BP.js +52 -0
  52. package/Marketplace/{chunk-VZHIFACR.js → chunk-MKJON4UM.js} +1 -1
  53. package/Marketplace/{chunk-BH2R22DH.js → chunk-ML2BGDS4.js} +1 -1
  54. package/Marketplace/{chunk-3ORAGDUV.js → chunk-MZNSPLFO.js} +1 -1
  55. package/Marketplace/{chunk-XMQ2CMLS.js → chunk-NAZU3HCR.js} +1 -1
  56. package/Marketplace/chunk-NNXYTNL6.js +1 -0
  57. package/Marketplace/{chunk-OIQXRKAG.js → chunk-OTR5MBON.js} +1 -1
  58. package/Marketplace/{chunk-BTXJZOGD.js → chunk-PTFQX4VB.js} +1 -1
  59. package/Marketplace/{chunk-ACYUSHMS.js → chunk-PYD2YWAN.js} +1 -1
  60. package/Marketplace/chunk-QNEE46MU.js +3 -0
  61. package/Marketplace/{chunk-NF2ANZGK.js → chunk-QYY5XVLP.js} +1 -1
  62. package/Marketplace/{chunk-LVFJFYVO.js → chunk-RDSLGGC4.js} +1 -1
  63. package/Marketplace/{chunk-4ULJZM2I.js → chunk-SQTY2CZY.js} +1 -1
  64. package/Marketplace/{chunk-AUCIW6VR.js → chunk-TE62OPBT.js} +1 -1
  65. package/Marketplace/{chunk-IDJG7E4L.js → chunk-TVRLQACG.js} +1 -1
  66. package/Marketplace/{chunk-FMYZSZEX.js → chunk-ULELZXI5.js} +1 -1
  67. package/Marketplace/{chunk-R6PEAOIJ.js → chunk-V64ZU2C6.js} +1 -1
  68. package/Marketplace/{chunk-ONKOEBKR.js → chunk-VBCIYCOF.js} +1 -1
  69. package/Marketplace/{chunk-4YCZLOHQ.js → chunk-WKSTGJK5.js} +1 -1
  70. package/Marketplace/{chunk-I7OLAB5O.js → chunk-WTMUHE4V.js} +1 -1
  71. package/Marketplace/{chunk-WUCXNOY6.js → chunk-XG2DR4LW.js} +1 -1
  72. package/Marketplace/{chunk-URIDNNCK.js → chunk-XQQPMC44.js} +1 -1
  73. package/Marketplace/chunk-XUOIJTB4.js +1 -0
  74. package/Marketplace/{chunk-LV34VUJQ.js → chunk-XUSY2QT2.js} +1 -1
  75. package/Marketplace/{chunk-JHJNKEH6.js → chunk-XWXDJLRN.js} +1 -1
  76. package/Marketplace/{chunk-K62KUEI5.js → chunk-XYJNR26Y.js} +1 -1
  77. package/Marketplace/{chunk-YJFARXIC.js → chunk-YCTTFHDT.js} +1 -1
  78. package/Marketplace/{chunk-CGUWFGH3.js → chunk-YCVNABR6.js} +1 -1
  79. package/Marketplace/chunk-YVTEU2IF.js +14 -0
  80. package/Marketplace/chunk-ZA7FXMFZ.js +3 -0
  81. package/Marketplace/chunk-ZIZWZZ4E.js +8 -0
  82. package/Marketplace/chunk-ZX3SBNZT.js +3 -0
  83. package/Marketplace/index.html +3 -3
  84. package/Marketplace/{main-UMNDP57A.js → main-AEC57EMC.js} +1 -1
  85. package/package.json +1 -1
  86. package/Marketplace/chunk-6UK5EDKC.js +0 -5
  87. package/Marketplace/chunk-76GYL4GA.js +0 -1
  88. package/Marketplace/chunk-BFEEK5YU.js +0 -1
  89. package/Marketplace/chunk-BLH75XXY.js +0 -9
  90. package/Marketplace/chunk-CSYQB3ZA.js +0 -1
  91. package/Marketplace/chunk-HSFUKC7R.js +0 -8
  92. package/Marketplace/chunk-KRKQFGMS.js +0 -1
  93. package/Marketplace/chunk-NEQN5BMS.js +0 -15
  94. package/Marketplace/chunk-SNTDL3ZC.js +0 -22
  95. package/Marketplace/chunk-X6J6RWD3.js +0 -1
  96. package/Marketplace/chunk-XH22CID4.js +0 -2
  97. package/Marketplace/chunk-ZPFSBV72.js +0 -3
@@ -1 +1 @@
1
- import{a as X,b as tt}from"./chunk-4YCZLOHQ.js";import{b as et,c as it}from"./chunk-M4JG6342.js";import{f as W}from"./chunk-6NTRXLMW.js";import{t as K,u as Q}from"./chunk-CTKEWRX4.js";import{X as J}from"./chunk-GXHE2CDH.js";import{$ as w,$a as g,Hb as H,Ia as r,Ib as x,Ja as z,Jb as q,Kb as T,Qb as Y,Ya as j,Za as f,_a as m,aa as k,ba as F,c as M,e as L,ea as E,fa as A,ga as B,gb as h,ha as R,ib as G,jb as $,jc as Z,kb as U,kc as y,lb as s,lc as P,mb as l,nb as v,oa as u,pa as _,qa as b,ra as N,rb as I,ub as c,wb as d,za as V}from"./chunk-HSFUKC7R.js";function at(a,n){if(a&1&&(s(0,"mat-option",17),x(1),l()),a&2){let e=n.$implicit;g("value",e),r(),T(" ",e," ")}}function nt(a,n){if(a&1){let e=I();s(0,"mat-form-field",14)(1,"mat-select",16,0),c("selectionChange",function(o){u(e);let i=d(2);return _(i._changePageSize(o.value))}),$(3,at,2,2,"mat-option",17,G),l(),s(5,"div",18),c("click",function(){u(e);let o=H(2);return _(o.open())}),l()()}if(a&2){let e=d(2);g("appearance",e._formFieldAppearance)("color",e.color),r(),g("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),r(2),U(e._displayedPageSizeOptions)}}function ot(a,n){if(a&1&&(s(0,"div",15),x(1),l()),a&2){let e=d(2);r(),q(e.pageSize)}}function st(a,n){if(a&1&&(s(0,"div",3)(1,"div",13),x(2),l(),f(3,nt,6,7,"mat-form-field",14)(4,ot,2,1,"div",15),l()),a&2){let e=d();r(),m("id",e._pageSizeLabelId),r(),T(" ",e._intl.itemsPerPageLabel," "),r(),h(e._displayedPageSizeOptions.length>1?3:-1),r(),h(e._displayedPageSizeOptions.length<=1?4:-1)}}function rt(a,n){if(a&1){let e=I();s(0,"button",19),c("click",function(){u(e);let o=d();return _(o.firstPage())}),b(),s(1,"svg",8),v(2,"path",20),l()()}if(a&2){let e=d();g("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),m("aria-label",e._intl.firstPageLabel)}}function lt(a,n){if(a&1){let e=I();s(0,"button",21),c("click",function(){u(e);let o=d();return _(o.lastPage())}),b(),s(1,"svg",8),v(2,"path",22),l()()}if(a&2){let e=d();g("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),m("aria-label",e._intl.lastPageLabel)}}var C=(()=>{let n=class n{constructor(){this.changes=new M,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(t,o,i)=>{if(i==0||o==0)return`0 of ${i}`;i=Math.max(i,0);let p=t*o,S=p<i?Math.min(p+o,i):p+o;return`${p+1} \u2013 ${S} of ${i}`}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=w({token:n,factory:n.\u0275fac,providedIn:"root"});let a=n;return a})();function pt(a){return a||new C}var dt={provide:C,deps:[[new E,new A,C]],useFactory:pt},gt=50;var ct=new F("MAT_PAGINATOR_DEFAULT_OPTIONS"),mt=0,ht=(()=>{let n=class n{get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex=Math.max(t||0,0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(t){this._length=t||0,this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize=Math.max(t||0,0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(t){this._pageSizeOptions=(t||[]).map(o=>P(o,0)),this._updateDisplayedPageSizeOptions()}constructor(t,o,i){if(this._intl=t,this._changeDetectorRef=o,this._pageSizeLabelId=`mat-paginator-page-size-label-${mt++}`,this._isInitialized=!1,this._initializedStream=new L(1),this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this.hidePageSize=!1,this.showFirstLastButtons=!1,this.selectConfig={},this.disabled=!1,this.page=new V,this.initialized=this._initializedStream,this._intlChanges=t.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),i){let{pageSize:p,pageSizeOptions:S,hidePageSize:O,showFirstLastButtons:D}=i;p!=null&&(this._pageSize=p),S!=null&&(this._pageSizeOptions=S),O!=null&&(this.hidePageSize=O),D!=null&&(this.showFirstLastButtons=D)}this._formFieldAppearance=i?.formFieldAppearance||"outline"}ngOnInit(){this._isInitialized=!0,this._updateDisplayedPageSizeOptions(),this._initializedStream.next()}ngOnDestroy(){this._initializedStream.complete(),this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;let t=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(t)}previousPage(){if(!this.hasPreviousPage())return;let t=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(t)}firstPage(){if(!this.hasPreviousPage())return;let t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}lastPage(){if(!this.hasNextPage())return;let t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}hasPreviousPage(){return this.pageIndex>=1&&this.pageSize!=0}hasNextPage(){let t=this.getNumberOfPages()-1;return this.pageIndex<t&&this.pageSize!=0}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(t){let o=this.pageIndex*this.pageSize,i=this.pageIndex;this.pageIndex=Math.floor(o/t)||0,this.pageSize=t,this._emitPageEvent(i)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){this._isInitialized&&(this.pageSize||(this._pageSize=this.pageSizeOptions.length!=0?this.pageSizeOptions[0]:gt),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),this._displayedPageSizeOptions.indexOf(this.pageSize)===-1&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((t,o)=>t-o),this._changeDetectorRef.markForCheck())}_emitPageEvent(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}};n.\u0275fac=function(o){return new(o||n)(z(C),z(Z),z(ct,8))},n.\u0275cmp=B({type:n,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{color:"color",pageIndex:[2,"pageIndex","pageIndex",P],length:[2,"length","length",P],pageSize:[2,"pageSize","pageSize",P],pageSizeOptions:"pageSizeOptions",hidePageSize:[2,"hidePageSize","hidePageSize",y],showFirstLastButtons:[2,"showFirstLastButtons","showFirstLastButtons",y],selectConfig:"selectConfig",disabled:[2,"disabled","disabled",y]},outputs:{page:"page"},exportAs:["matPaginator"],standalone:!0,features:[j,Y],decls:14,vars:14,consts:[["selectRef",""],[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-previous",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-next",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],[1,"mat-mdc-paginator-page-size-label"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],[1,"mat-mdc-paginator-page-size-value"],["hideSingleSelectionIndicator","",3,"selectionChange","value","disabled","aria-labelledby","panelClass","disableOptionCentering"],[3,"value"],[1,"mat-mdc-paginator-touch-target",3,"click"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(o,i){o&1&&(s(0,"div",1)(1,"div",2),f(2,st,5,4,"div",3),s(3,"div",4)(4,"div",5),x(5),l(),f(6,rt,3,5,"button",6),s(7,"button",7),c("click",function(){return i.previousPage()}),b(),s(8,"svg",8),v(9,"path",9),l()(),N(),s(10,"button",10),c("click",function(){return i.nextPage()}),b(),s(11,"svg",8),v(12,"path",11),l()(),f(13,lt,3,5,"button",12),l()()()),o&2&&(r(2),h(i.hidePageSize?-1:2),r(3),T(" ",i._intl.getRangeLabel(i.pageIndex,i.pageSize,i.length)," "),r(),h(i.showFirstLastButtons?6:-1),r(),g("matTooltip",i._intl.previousPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),m("aria-label",i._intl.previousPageLabel),r(3),g("matTooltip",i._intl.nextPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),m("aria-label",i._intl.nextPageLabel),r(3),h(i.showFirstLastButtons?13:-1))},dependencies:[W,X,J,et,K],styles:[".mat-mdc-paginator{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color);background-color:var(--mat-paginator-container-background-color);font-family:var(--mat-paginator-container-text-font);line-height:var(--mat-paginator-container-text-line-height);font-size:var(--mat-paginator-container-text-size);font-weight:var(--mat-paginator-container-text-weight);letter-spacing:var(--mat-paginator-container-text-tracking);--mat-form-field-container-height:var(--mat-paginator-form-field-container-height);--mat-form-field-container-vertical-padding:var(--mat-paginator-form-field-container-vertical-padding)}.mat-mdc-paginator .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size)}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color)}.mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color)}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.cdk-high-contrast-active .mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.cdk-high-contrast-active .mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}.mat-mdc-paginator-touch-target{display:var(--mat-paginator-touch-target-display);position:absolute;top:50%;left:50%;width:84px;height:48px;background-color:rgba(0,0,0,0);transform:translate(-50%, -50%);cursor:pointer}"],encapsulation:2,changeDetection:0});let a=n;return a})(),Lt=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275mod=R({type:n}),n.\u0275inj=k({providers:[dt],imports:[it,tt,Q,ht]});let a=n;return a})();export{ht as a,Lt as b};
1
+ import{a as X,b as tt}from"./chunk-WKSTGJK5.js";import{b as et,c as it}from"./chunk-BTY6PS53.js";import{f as W}from"./chunk-EIBGI6U2.js";import{t as K,u as Q}from"./chunk-2SC3HO66.js";import{X as J}from"./chunk-DQIP7MCZ.js";import{$ as w,$a as m,Ib as H,Ja as r,Jb as x,Ka as z,Kb as q,Lb as T,Rb as Y,Za as j,_a as f,aa as k,ab as g,ba as F,c as M,e as L,ea as E,fa as A,ga as B,ha as R,hb as h,jb as G,kb as $,lb as U,lc as Z,mb as s,mc as y,nb as l,nc as P,oa as u,ob as v,pa as _,qa as b,ra as N,sb as I,vb as c,xb as d,za as V}from"./chunk-ZIZWZZ4E.js";function at(a,n){if(a&1&&(s(0,"mat-option",17),x(1),l()),a&2){let e=n.$implicit;g("value",e),r(),T(" ",e," ")}}function nt(a,n){if(a&1){let e=I();s(0,"mat-form-field",14)(1,"mat-select",16,0),c("selectionChange",function(o){u(e);let i=d(2);return _(i._changePageSize(o.value))}),$(3,at,2,2,"mat-option",17,G),l(),s(5,"div",18),c("click",function(){u(e);let o=H(2);return _(o.open())}),l()()}if(a&2){let e=d(2);g("appearance",e._formFieldAppearance)("color",e.color),r(),g("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),r(2),U(e._displayedPageSizeOptions)}}function ot(a,n){if(a&1&&(s(0,"div",15),x(1),l()),a&2){let e=d(2);r(),q(e.pageSize)}}function st(a,n){if(a&1&&(s(0,"div",3)(1,"div",13),x(2),l(),f(3,nt,6,7,"mat-form-field",14)(4,ot,2,1,"div",15),l()),a&2){let e=d();r(),m("id",e._pageSizeLabelId),r(),T(" ",e._intl.itemsPerPageLabel," "),r(),h(e._displayedPageSizeOptions.length>1?3:-1),r(),h(e._displayedPageSizeOptions.length<=1?4:-1)}}function rt(a,n){if(a&1){let e=I();s(0,"button",19),c("click",function(){u(e);let o=d();return _(o.firstPage())}),b(),s(1,"svg",8),v(2,"path",20),l()()}if(a&2){let e=d();g("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),m("aria-label",e._intl.firstPageLabel)}}function lt(a,n){if(a&1){let e=I();s(0,"button",21),c("click",function(){u(e);let o=d();return _(o.lastPage())}),b(),s(1,"svg",8),v(2,"path",22),l()()}if(a&2){let e=d();g("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),m("aria-label",e._intl.lastPageLabel)}}var C=(()=>{let n=class n{constructor(){this.changes=new M,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(t,o,i)=>{if(i==0||o==0)return`0 of ${i}`;i=Math.max(i,0);let p=t*o,S=p<i?Math.min(p+o,i):p+o;return`${p+1} \u2013 ${S} of ${i}`}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=w({token:n,factory:n.\u0275fac,providedIn:"root"});let a=n;return a})();function pt(a){return a||new C}var dt={provide:C,deps:[[new E,new A,C]],useFactory:pt},gt=50;var ct=new F("MAT_PAGINATOR_DEFAULT_OPTIONS"),mt=0,ht=(()=>{let n=class n{get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex=Math.max(t||0,0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(t){this._length=t||0,this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize=Math.max(t||0,0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(t){this._pageSizeOptions=(t||[]).map(o=>P(o,0)),this._updateDisplayedPageSizeOptions()}constructor(t,o,i){if(this._intl=t,this._changeDetectorRef=o,this._pageSizeLabelId=`mat-paginator-page-size-label-${mt++}`,this._isInitialized=!1,this._initializedStream=new L(1),this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this.hidePageSize=!1,this.showFirstLastButtons=!1,this.selectConfig={},this.disabled=!1,this.page=new V,this.initialized=this._initializedStream,this._intlChanges=t.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),i){let{pageSize:p,pageSizeOptions:S,hidePageSize:O,showFirstLastButtons:D}=i;p!=null&&(this._pageSize=p),S!=null&&(this._pageSizeOptions=S),O!=null&&(this.hidePageSize=O),D!=null&&(this.showFirstLastButtons=D)}this._formFieldAppearance=i?.formFieldAppearance||"outline"}ngOnInit(){this._isInitialized=!0,this._updateDisplayedPageSizeOptions(),this._initializedStream.next()}ngOnDestroy(){this._initializedStream.complete(),this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;let t=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(t)}previousPage(){if(!this.hasPreviousPage())return;let t=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(t)}firstPage(){if(!this.hasPreviousPage())return;let t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}lastPage(){if(!this.hasNextPage())return;let t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}hasPreviousPage(){return this.pageIndex>=1&&this.pageSize!=0}hasNextPage(){let t=this.getNumberOfPages()-1;return this.pageIndex<t&&this.pageSize!=0}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(t){let o=this.pageIndex*this.pageSize,i=this.pageIndex;this.pageIndex=Math.floor(o/t)||0,this.pageSize=t,this._emitPageEvent(i)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){this._isInitialized&&(this.pageSize||(this._pageSize=this.pageSizeOptions.length!=0?this.pageSizeOptions[0]:gt),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),this._displayedPageSizeOptions.indexOf(this.pageSize)===-1&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((t,o)=>t-o),this._changeDetectorRef.markForCheck())}_emitPageEvent(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}};n.\u0275fac=function(o){return new(o||n)(z(C),z(Z),z(ct,8))},n.\u0275cmp=B({type:n,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{color:"color",pageIndex:[2,"pageIndex","pageIndex",P],length:[2,"length","length",P],pageSize:[2,"pageSize","pageSize",P],pageSizeOptions:"pageSizeOptions",hidePageSize:[2,"hidePageSize","hidePageSize",y],showFirstLastButtons:[2,"showFirstLastButtons","showFirstLastButtons",y],selectConfig:"selectConfig",disabled:[2,"disabled","disabled",y]},outputs:{page:"page"},exportAs:["matPaginator"],standalone:!0,features:[j,Y],decls:14,vars:14,consts:[["selectRef",""],[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-previous",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-next",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],[1,"mat-mdc-paginator-page-size-label"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],[1,"mat-mdc-paginator-page-size-value"],["hideSingleSelectionIndicator","",3,"selectionChange","value","disabled","aria-labelledby","panelClass","disableOptionCentering"],[3,"value"],[1,"mat-mdc-paginator-touch-target",3,"click"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(o,i){o&1&&(s(0,"div",1)(1,"div",2),f(2,st,5,4,"div",3),s(3,"div",4)(4,"div",5),x(5),l(),f(6,rt,3,5,"button",6),s(7,"button",7),c("click",function(){return i.previousPage()}),b(),s(8,"svg",8),v(9,"path",9),l()(),N(),s(10,"button",10),c("click",function(){return i.nextPage()}),b(),s(11,"svg",8),v(12,"path",11),l()(),f(13,lt,3,5,"button",12),l()()()),o&2&&(r(2),h(i.hidePageSize?-1:2),r(3),T(" ",i._intl.getRangeLabel(i.pageIndex,i.pageSize,i.length)," "),r(),h(i.showFirstLastButtons?6:-1),r(),g("matTooltip",i._intl.previousPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),m("aria-label",i._intl.previousPageLabel),r(3),g("matTooltip",i._intl.nextPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),m("aria-label",i._intl.nextPageLabel),r(3),h(i.showFirstLastButtons?13:-1))},dependencies:[W,X,J,et,K],styles:[".mat-mdc-paginator{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color);background-color:var(--mat-paginator-container-background-color);font-family:var(--mat-paginator-container-text-font);line-height:var(--mat-paginator-container-text-line-height);font-size:var(--mat-paginator-container-text-size);font-weight:var(--mat-paginator-container-text-weight);letter-spacing:var(--mat-paginator-container-text-tracking);--mat-form-field-container-height:var(--mat-paginator-form-field-container-height);--mat-form-field-container-vertical-padding:var(--mat-paginator-form-field-container-vertical-padding)}.mat-mdc-paginator .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size)}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color)}.mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color)}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.cdk-high-contrast-active .mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.cdk-high-contrast-active .mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}.mat-mdc-paginator-touch-target{display:var(--mat-paginator-touch-target-display);position:absolute;top:50%;left:50%;width:84px;height:48px;background-color:rgba(0,0,0,0);transform:translate(-50%, -50%);cursor:pointer}"],encapsulation:2,changeDetection:0});let a=n;return a})(),Lt=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275mod=R({type:n}),n.\u0275inj=k({providers:[dt],imports:[it,tt,Q,ht]});let a=n;return a})();export{ht as a,Lt as b};
@@ -1 +1 @@
1
- import{b as u}from"./chunk-K6H25CD6.js";import{a as f}from"./chunk-WUCXNOY6.js";import"./chunk-2C32PU5X.js";import"./chunk-NVF24LK5.js";import"./chunk-KCDL7SWP.js";import{n as l}from"./chunk-3XWOT6GZ.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import{y as d}from"./chunk-O5MOPAT5.js";import"./chunk-X4WLRMDP.js";import{Dc as n,Vc as c,Zc as m,aa as r,ga as s,ha as i,nb as a}from"./chunk-HSFUKC7R.js";import"./chunk-GNOSNGXM.js";var M=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s({type:t,selectors:[["app-report"]],decls:1,vars:0,template:function(e,O){e&1&&a(0,"router-outlet")},dependencies:[c],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]});let o=t;return o})();var y=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-XMQ2CMLS.js").then(o=>o.OrderModule),canActivate:[f]}]}],C=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,m.forChild(y)]});let o=t;return o})();var b=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,u,C,d,l,m]});let o=t;return o})();export{b as ReportModule};
1
+ import{b as u}from"./chunk-7YWHTN3X.js";import{a as f}from"./chunk-XG2DR4LW.js";import"./chunk-LAQL3BQZ.js";import"./chunk-JHYIHRQH.js";import"./chunk-KCDL7SWP.js";import{n as l}from"./chunk-4CEFDQPI.js";import"./chunk-2SC3HO66.js";import"./chunk-DQIP7MCZ.js";import{y as d}from"./chunk-2E5AKA74.js";import"./chunk-FTHTFVHH.js";import{$c as m,Fc as n,Xc as c,aa as r,ga as s,ha as i,ob as a}from"./chunk-ZIZWZZ4E.js";import"./chunk-GNOSNGXM.js";var M=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s({type:t,selectors:[["app-report"]],decls:1,vars:0,template:function(e,O){e&1&&a(0,"router-outlet")},dependencies:[c],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]});let o=t;return o})();var y=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-NAZU3HCR.js").then(o=>o.OrderModule),canActivate:[f]}]}],C=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,m.forChild(y)]});let o=t;return o})();var b=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,u,C,d,l,m]});let o=t;return o})();export{b as ReportModule};
@@ -1 +1 @@
1
- import{a as rt}from"./chunk-BVIRHZTZ.js";import{b as bt}from"./chunk-WVKDNFEM.js";import{c as xt}from"./chunk-73DE2GZF.js";import{g as Ct}from"./chunk-6NTRXLMW.js";import{e as st}from"./chunk-NVF24LK5.js";import{b as ut,c as gt,g as ht,i as ft,j as _t}from"./chunk-3XWOT6GZ.js";import{t as pt,u as dt}from"./chunk-CTKEWRX4.js";import{c as it,h as nt,m as ot,y as at}from"./chunk-O5MOPAT5.js";import{b as lt,d as mt,f as ct}from"./chunk-X4WLRMDP.js";import{$ as q,$a as h,$b as y,B as U,Cc as O,Dc as B,F as z,Hb as V,Ia as r,Ib as p,Ja as S,Jb as N,Kb as F,Mb as X,Nb as Z,O as J,Ob as tt,Q as W,Qb as L,Ua as C,V as Y,X as k,Y as H,Za as g,_b as I,bc as j,c as A,ca as K,d as G,ga as E,gb as v,lb as l,mb as m,mc as D,nb as $,oa as d,ob as T,pa as u,pb as w,q as P,qb as Q,rb as _,ub as x,wb as c,wc as R,xa as f,yc as et,za as M}from"./chunk-HSFUKC7R.js";function Tt(i,n){i&1&&Q(0)}function wt(i,n){if(i&1&&(T(0),g(1,Tt,1,0,"ng-container",5),w()),i&2){c(2);let a=V(4);r(),h("ngTemplateOutlet",a)}}function Nt(i,n){if(i&1&&(l(0,"div",6)(1,"label"),p(2,"Editing Data"),m(),l(3,"div")(4,"span"),p(5),I(6,"number"),m()()()),i&2){let a=c(2);r(5),N(y(6,1,a.value))}}function It(i,n){if(i&1&&(T(0),g(1,wt,2,1,"ng-container",4)(2,Nt,7,3,"ng-template",null,1,j),w()),i&2){let a=V(3),t=c();r(),h("ngIf",t.hasPriceEdit)("ngIfElse",a)}}function yt(i,n){if(i&1){let a=_();l(0,"div",7)(1,"input",8),tt("ngModelChange",function(e){d(a);let o=c();return Z(o.value,e)||(o.value=e),u(e)}),m(),l(2,"label",9),p(3),m()()}if(i&2){let a=c();r(),X("ngModel",a.value),h("max",a.maxEditInventory),r(2),N(a.item.Table)}}var qt=(()=>{let n=class n{constructor(t,e,o){this.dialogRef=t,this.item=e,this.permissionService=o,this.maxEditInventory=1e5,this.permissionService.hasPermission(rt.price).then(s=>this.hasPriceEdit=s)}ngOnInit(){this.selectedChannel=this.item.Variant.Channel.find(t=>t.ChannelID==this.item.ChannelID),this.selectedChannel.ID=this.item.Variant.ID,this.selectedChannel.Sku=this.item.Variant.Code,this.item.Table=="inventory"?(this.value=this.selectedChannel.Inventory,this.maxEditInventory=this.selectedChannel?.TypeID==lt.Tokopedia?1e5:null):this.item.Table=="price"&&(this.value=this.selectedChannel.Price,this.maxEditInventory=null),this.selectedChannel.ItemName=this.item.Name,this.selectedChannel.VarName=this.item.Variant.Model,this.initModalConfig()}initModalConfig(){let t=this.item.Table=="inventory"?"Update Inventory":"Update Price";this.modalConfig=new ft,this.modalConfig.title=`${t} ${this.item?.Name} in ${this.selectedChannel?.Title}`}onSubmit(){this.item.Table=="inventory"?this.selectedChannel.Inventory=this.value:this.item.Table=="price"&&(this.selectedChannel.Price=this.value),this.dialogRef.close(this.selectedChannel)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(e){return new(e||n)(S(ut),S(gt),S(mt))},n.\u0275cmp=E({type:n,selectors:[["app-table-dialog"]],standalone:!0,features:[L],decls:5,vars:4,consts:[["INVENTORY",""],["DISABLED",""],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["matTooltipPosition","above","matTooltip","Cannot edit Unit Price because you dont have access ProductEditor role",1,"info-label-group","mt-3",2,"background","#e9ecef","opacity","1"],[1,"form-label-group","mt-3"],["type","text","name","edit","autoNum","",1,"form-control",3,"ngModelChange","ngModel","max"],["for","edit",1,"text-capitalize"]],template:function(e,o){if(e&1){let s=_();l(0,"modal-material",2),x("onClose",function(){return d(s),u(o.onClose())})("onCancel",function(){return d(s),u(o.onClose())})("onOk",function(){return d(s),u(o.onSubmit())}),l(1,"div",3),g(2,It,4,2,"ng-container",4)(3,yt,4,3,"ng-template",null,0,j),m()()}if(e&2){let s=V(4);h("dynamicValidated",o.value)("config",o.modalConfig),r(2),h("ngIf",o.item.Table=="price")("ngIfElse",s)}},dependencies:[B,R,et,O,ht,Ct,xt,bt,_t,at,it,nt,ot,ct,dt,pt],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-left:1rem;margin-right:1rem}.mat-dialog-content[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem;margin-left:.5rem;margin-right:.5rem}.font-lg[_ngcontent-%COMP%]{font-size:large}.font-lgr[_ngcontent-%COMP%]{font-size:larger}"]});let i=n;return i})();function Dt(i,n){if(i&1){let a=_();l(0,"span",6),x("click",function(){d(a);let e=c();return u(e.onGetRowCount())}),l(1,"i",7),p(2,"?"),m()()}}function Et(i,n){if(i&1&&(T(0),l(1,"span"),p(2),I(3,"number"),m(),w()),i&2){let a=c();r(2),N(y(3,1,a.rowCount()))}}function Mt(i,n){if(i&1){let a=_();l(0,"a",10),x("click",function(){d(a);let e=c(2);return u(e.onNextPage())}),$(1,"i",11),p(2," Next"),m()}}function St(i,n){if(i&1){let a=_();l(0,"a",12),x("click",function(){d(a);let e=c(2);return u(e.onLastPage())}),$(1,"i",13),p(2," Last"),m()}}function Vt(i,n){if(i&1&&(l(0,"div",5),g(1,Mt,3,0,"a",8)(2,St,3,0,"a",9),m()),i&2){let a=c();r(),v(a.disableNextButton()&&!a.goToLastPage()?1:-1),r(),v(a.disableNextButton()&&!a.goToLastPage()?2:-1)}}var ee=(()=>{let n=class n{constructor(){this.totalData=f(0),this.rowCount=f(),this.pageNumber=f(),this.disableNextButton=f(),this.goToLastPage=f(),this.hideCount=f(),this.nextPage=new M,this.lastPage=new M,this.getRowCount=new M}onNextPage(){this.nextPage.emit()}onLastPage(){this.lastPage.emit()}onGetRowCount(){this.getRowCount.emit()}};n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=E({type:n,selectors:[["infinite-paginator"]],inputs:{totalData:[1,"totalData"],rowCount:[1,"rowCount"],pageNumber:[1,"pageNumber"],disableNextButton:[1,"disableNextButton"],goToLastPage:[1,"goToLastPage"],hideCount:[1,"hideCount"]},outputs:{nextPage:"onNextPage",lastPage:"onLastPage",getRowCount:"onGetRowCount"},standalone:!0,features:[L],decls:9,vars:7,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[4,"ngIf"],[1,"btn-group"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(e,o){e&1&&(l(0,"div",0)(1,"div",1)(2,"div",2),p(3),I(4,"number"),g(5,Dt,3,0,"span",3)(6,Et,4,3,"ng-container",4),p(7),m()(),g(8,Vt,3,2,"div",5),m()),e&2&&(r(3),F(" Showing 1 - ",y(4,5,o.totalData())," of "),r(2),v(o.hideCount()?5:-1),r(),h("ngIf",!o.hideCount()&&o.rowCount()),r(),F(" records ~ ",o.pageNumber()," Page "),r(),v(o.totalData()>0?8:-1))},dependencies:[B,R,O]});let i=n;return i})();var le=(()=>{let n=class n{constructor(t){this.http=t,this.pagination$=new G(null),this._pageNumber=C(1),this.pageNumber=D(()=>this._pageNumber()),this._hideCount=C(!0),this.hideCount=D(()=>this._hideCount()),this._disableNextButton=C(!0),this.disableNextButton=D(()=>this._disableNextButton()),this._goToLastPage=C(!1),this.isLastPage=D(()=>this._goToLastPage()),this.totalData=C(0),this.destroy$=new A,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this._pageNumber.set(t.PageNumber)}setPaginationButtonState(t,e){e==0?this._disableNextButton.set(!0):this._disableNextButton.set(!(e<t.RowCount*t.PageNumber))}reloadPagination(t){t.PageNumber=1,this.pagination$.next(t),this._hideCount.set(!0),this._goToLastPage.set(!1)}onLastPage(t={}){let e=JSON.parse(JSON.stringify(t));this.totalRowCount$=this.http.post(`/api/${this.fethRowCountEndpoint}`,e).pipe(P(o=>o.Total),k(o=>{this._hideCount.set(!1),e.RowCount=o,e.PageNumber=1,this.pagination$.next(e),this._goToLastPage.set(!0)}))}paginationFunction(){return this.pagination$.pipe(Y(this.destroy$),U(t=>t!=null),z(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(P(e=>e.Data?e.Data:[]))),H(this.pagination$),J((t,e)=>{let[o,s]=t,[b]=e;return s.PageNumber==1?[b,s]:[o.concat(b),s]}),k(([t,e])=>{this.setPageNumberFooter(e);let o=this.calculateProductLength(t);this.totalData.set(o),this.setPaginationButtonState(e,o)}),P(([t])=>t),W())}getRowCount(t){this._hideCount.set(!1),this.totalRowCount$=this.http.post(`/API/${this.fethRowCountEndpoint}`,t).pipe(P(e=>e.Total))}calculateProductLength(t=[]){return t.reduce((o,s)=>o+(s.Variants?.length?s.Variants?.length:0),0)}};n.\u0275fac=function(e){return new(e||n)(K(st))},n.\u0275prov=q({token:n,factory:n.\u0275fac});let i=n;return i})();export{qt as a,ee as b,le as c};
1
+ import{a as rt}from"./chunk-BVIRHZTZ.js";import{b as bt}from"./chunk-7VKIP3Z6.js";import{c as xt}from"./chunk-DYLT6RRK.js";import{g as Ct}from"./chunk-EIBGI6U2.js";import{e as st}from"./chunk-JHYIHRQH.js";import{b as ut,c as gt,g as ht,i as ft,j as _t}from"./chunk-4CEFDQPI.js";import{t as pt,u as dt}from"./chunk-2SC3HO66.js";import{c as it,h as nt,m as ot,y as at}from"./chunk-2E5AKA74.js";import{b as lt,d as mt,f as ct}from"./chunk-FTHTFVHH.js";import{$ as q,Ac as et,B as U,Ec as O,F as z,Fc as B,Ib as V,Ja as r,Jb as p,Ka as S,Kb as N,Lb as F,Nb as X,O as J,Ob as Z,Pb as tt,Q as W,Rb as L,V as Y,Va as C,X as k,Y as H,_a as g,ab as h,ac as I,bc as y,c as A,ca as K,d as G,dc as j,ga as E,hb as v,mb as l,nb as m,oa as d,ob as $,oc as D,pa as u,pb as T,q as P,qb as w,rb as Q,sb as _,vb as x,xa as f,xb as c,yc as R,za as M}from"./chunk-ZIZWZZ4E.js";function Tt(i,n){i&1&&Q(0)}function wt(i,n){if(i&1&&(T(0),g(1,Tt,1,0,"ng-container",5),w()),i&2){c(2);let a=V(4);r(),h("ngTemplateOutlet",a)}}function Nt(i,n){if(i&1&&(l(0,"div",6)(1,"label"),p(2,"Editing Data"),m(),l(3,"div")(4,"span"),p(5),I(6,"number"),m()()()),i&2){let a=c(2);r(5),N(y(6,1,a.value))}}function It(i,n){if(i&1&&(T(0),g(1,wt,2,1,"ng-container",4)(2,Nt,7,3,"ng-template",null,1,j),w()),i&2){let a=V(3),t=c();r(),h("ngIf",t.hasPriceEdit)("ngIfElse",a)}}function yt(i,n){if(i&1){let a=_();l(0,"div",7)(1,"input",8),tt("ngModelChange",function(e){d(a);let o=c();return Z(o.value,e)||(o.value=e),u(e)}),m(),l(2,"label",9),p(3),m()()}if(i&2){let a=c();r(),X("ngModel",a.value),h("max",a.maxEditInventory),r(2),N(a.item.Table)}}var qt=(()=>{let n=class n{constructor(t,e,o){this.dialogRef=t,this.item=e,this.permissionService=o,this.maxEditInventory=1e5,this.permissionService.hasPermission(rt.price).then(s=>this.hasPriceEdit=s)}ngOnInit(){this.selectedChannel=this.item.Variant.Channel.find(t=>t.ChannelID==this.item.ChannelID),this.selectedChannel.ID=this.item.Variant.ID,this.selectedChannel.Sku=this.item.Variant.Code,this.item.Table=="inventory"?(this.value=this.selectedChannel.Inventory,this.maxEditInventory=this.selectedChannel?.TypeID==lt.Tokopedia?1e5:null):this.item.Table=="price"&&(this.value=this.selectedChannel.Price,this.maxEditInventory=null),this.selectedChannel.ItemName=this.item.Name,this.selectedChannel.VarName=this.item.Variant.Model,this.initModalConfig()}initModalConfig(){let t=this.item.Table=="inventory"?"Update Inventory":"Update Price";this.modalConfig=new ft,this.modalConfig.title=`${t} ${this.item?.Name} in ${this.selectedChannel?.Title}`}onSubmit(){this.item.Table=="inventory"?this.selectedChannel.Inventory=this.value:this.item.Table=="price"&&(this.selectedChannel.Price=this.value),this.dialogRef.close(this.selectedChannel)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(e){return new(e||n)(S(ut),S(gt),S(mt))},n.\u0275cmp=E({type:n,selectors:[["app-table-dialog"]],standalone:!0,features:[L],decls:5,vars:4,consts:[["INVENTORY",""],["DISABLED",""],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["matTooltipPosition","above","matTooltip","Cannot edit Unit Price because you dont have access ProductEditor role",1,"info-label-group","mt-3",2,"background","#e9ecef","opacity","1"],[1,"form-label-group","mt-3"],["type","text","name","edit","autoNum","",1,"form-control",3,"ngModelChange","ngModel","max"],["for","edit",1,"text-capitalize"]],template:function(e,o){if(e&1){let s=_();l(0,"modal-material",2),x("onClose",function(){return d(s),u(o.onClose())})("onCancel",function(){return d(s),u(o.onClose())})("onOk",function(){return d(s),u(o.onSubmit())}),l(1,"div",3),g(2,It,4,2,"ng-container",4)(3,yt,4,3,"ng-template",null,0,j),m()()}if(e&2){let s=V(4);h("dynamicValidated",o.value)("config",o.modalConfig),r(2),h("ngIf",o.item.Table=="price")("ngIfElse",s)}},dependencies:[B,R,et,O,ht,Ct,xt,bt,_t,at,it,nt,ot,ct,dt,pt],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-left:1rem;margin-right:1rem}.mat-dialog-content[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem;margin-left:.5rem;margin-right:.5rem}.font-lg[_ngcontent-%COMP%]{font-size:large}.font-lgr[_ngcontent-%COMP%]{font-size:larger}"]});let i=n;return i})();function Dt(i,n){if(i&1){let a=_();l(0,"span",6),x("click",function(){d(a);let e=c();return u(e.onGetRowCount())}),l(1,"i",7),p(2,"?"),m()()}}function Et(i,n){if(i&1&&(T(0),l(1,"span"),p(2),I(3,"number"),m(),w()),i&2){let a=c();r(2),N(y(3,1,a.rowCount()))}}function Mt(i,n){if(i&1){let a=_();l(0,"a",10),x("click",function(){d(a);let e=c(2);return u(e.onNextPage())}),$(1,"i",11),p(2," Next"),m()}}function St(i,n){if(i&1){let a=_();l(0,"a",12),x("click",function(){d(a);let e=c(2);return u(e.onLastPage())}),$(1,"i",13),p(2," Last"),m()}}function Vt(i,n){if(i&1&&(l(0,"div",5),g(1,Mt,3,0,"a",8)(2,St,3,0,"a",9),m()),i&2){let a=c();r(),v(a.disableNextButton()&&!a.goToLastPage()?1:-1),r(),v(a.disableNextButton()&&!a.goToLastPage()?2:-1)}}var ee=(()=>{let n=class n{constructor(){this.totalData=f(0),this.rowCount=f(),this.pageNumber=f(),this.disableNextButton=f(),this.goToLastPage=f(),this.hideCount=f(),this.nextPage=new M,this.lastPage=new M,this.getRowCount=new M}onNextPage(){this.nextPage.emit()}onLastPage(){this.lastPage.emit()}onGetRowCount(){this.getRowCount.emit()}};n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=E({type:n,selectors:[["infinite-paginator"]],inputs:{totalData:[1,"totalData"],rowCount:[1,"rowCount"],pageNumber:[1,"pageNumber"],disableNextButton:[1,"disableNextButton"],goToLastPage:[1,"goToLastPage"],hideCount:[1,"hideCount"]},outputs:{nextPage:"onNextPage",lastPage:"onLastPage",getRowCount:"onGetRowCount"},standalone:!0,features:[L],decls:9,vars:7,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[4,"ngIf"],[1,"btn-group"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(e,o){e&1&&(l(0,"div",0)(1,"div",1)(2,"div",2),p(3),I(4,"number"),g(5,Dt,3,0,"span",3)(6,Et,4,3,"ng-container",4),p(7),m()(),g(8,Vt,3,2,"div",5),m()),e&2&&(r(3),F(" Showing 1 - ",y(4,5,o.totalData())," of "),r(2),v(o.hideCount()?5:-1),r(),h("ngIf",!o.hideCount()&&o.rowCount()),r(),F(" records ~ ",o.pageNumber()," Page "),r(),v(o.totalData()>0?8:-1))},dependencies:[B,R,O]});let i=n;return i})();var le=(()=>{let n=class n{constructor(t){this.http=t,this.pagination$=new G(null),this._pageNumber=C(1),this.pageNumber=D(()=>this._pageNumber()),this._hideCount=C(!0),this.hideCount=D(()=>this._hideCount()),this._disableNextButton=C(!0),this.disableNextButton=D(()=>this._disableNextButton()),this._goToLastPage=C(!1),this.isLastPage=D(()=>this._goToLastPage()),this.totalData=C(0),this.destroy$=new A,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this._pageNumber.set(t.PageNumber)}setPaginationButtonState(t,e){e==0?this._disableNextButton.set(!0):this._disableNextButton.set(!(e<t.RowCount*t.PageNumber))}reloadPagination(t){t.PageNumber=1,this.pagination$.next(t),this._hideCount.set(!0),this._goToLastPage.set(!1)}onLastPage(t={}){let e=JSON.parse(JSON.stringify(t));this.totalRowCount$=this.http.post(`/api/${this.fethRowCountEndpoint}`,e).pipe(P(o=>o.Total),k(o=>{this._hideCount.set(!1),e.RowCount=o,e.PageNumber=1,this.pagination$.next(e),this._goToLastPage.set(!0)}))}paginationFunction(){return this.pagination$.pipe(Y(this.destroy$),U(t=>t!=null),z(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(P(e=>e.Data?e.Data:[]))),H(this.pagination$),J((t,e)=>{let[o,s]=t,[b]=e;return s.PageNumber==1?[b,s]:[o.concat(b),s]}),k(([t,e])=>{this.setPageNumberFooter(e);let o=this.calculateProductLength(t);this.totalData.set(o),this.setPaginationButtonState(e,o)}),P(([t])=>t),W())}getRowCount(t){this._hideCount.set(!1),this.totalRowCount$=this.http.post(`/API/${this.fethRowCountEndpoint}`,t).pipe(P(e=>e.Total))}calculateProductLength(t=[]){return t.reduce((o,s)=>o+(s.Variants?.length?s.Variants?.length:0),0)}};n.\u0275fac=function(e){return new(e||n)(K(st))},n.\u0275prov=q({token:n,factory:n.\u0275fac});let i=n;return i})();export{qt as a,ee as b,le as c};
@@ -1 +1 @@
1
- import{a as _}from"./chunk-PBJG5QAA.js";import"./chunk-6U6JR5K6.js";import{a as de,b as ce}from"./chunk-K6H25CD6.js";import"./chunk-3TNPJNQS.js";import"./chunk-44IWQ2WK.js";import"./chunk-73DE2GZF.js";import{a as R}from"./chunk-WUCXNOY6.js";import"./chunk-M4JG6342.js";import"./chunk-6NTRXLMW.js";import"./chunk-2C32PU5X.js";import{e as se}from"./chunk-NVF24LK5.js";import"./chunk-KCDL7SWP.js";import{m as D,n as pe}from"./chunk-3XWOT6GZ.js";import"./chunk-CTKEWRX4.js";import"./chunk-GXHE2CDH.js";import{y as me}from"./chunk-O5MOPAT5.js";import{c as f}from"./chunk-X4WLRMDP.js";import{$ as J,$a as p,$b as j,Ac as w,Cc as re,Dc as ne,Ha as G,Ia as m,Ib as c,Ja as h,Jb as N,Kb as Z,Mb as u,Nb as y,Ob as g,Q as V,Rb as $,Vc as oe,Wb as ee,X as H,Xc as ae,Za as v,Zc as le,_b as A,aa as Q,ca as K,db as X,ga as S,ha as z,lb as o,mb as a,na as q,nb as C,qb as Y,ub as b,vc as te,wb as T,wc as P,zb as U,zc as ie}from"./chunk-HSFUKC7R.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-XG2DR4LW.js";import"./chunk-BTY6PS53.js";import"./chunk-EIBGI6U2.js";import"./chunk-LAQL3BQZ.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};
@@ -0,0 +1 @@
1
+ import{a as T}from"./chunk-BZPMSXEO.js";import{a as w}from"./chunk-7VKIP3Z6.js";import{g as j}from"./chunk-LAQL3BQZ.js";import{b as D,e as d}from"./chunk-JHYIHRQH.js";import{b as a,c as g}from"./chunk-FTHTFVHH.js";import{$ as s,B as C,E as l,Va as I,Yc as U,d as P,da as c,n as u,q as b,w as A}from"./chunk-ZIZWZZ4E.js";var E=(()=>{let o=class o{constructor(){this.httpService=c(d)}getAttributes(t,e){return this.httpService.get("api/product/shopee/GetAttributesTree",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/shopee/AddProduct",t).pipe(l(r=>u(null)))}generateAttribute(t){return t.map(e=>({attribute_id:e.attribute_id,attribute_value_list:e.attribute_value_list.map(r=>({value_id:r.value_id,name:r.name}))})),t}};o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var F=(()=>{let o=class o{constructor(){this.httpService=c(d)}getCategories(t){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tiktok/AddProduct",t).pipe(l(r=>u(null)))}generateAttribute(t){let e;return t.map(r=>(r.type=="PRODUCT_PROPERTY"?e={id:r.id,name:r.name,type:r.type,values:r.values}:e={id:r.id,name:r.values[0].id,type:r.type},e))}};o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var x=(()=>{let o=class o{constructor(){this.httpService=c(d)}getAttributes(t,e){return this.httpService.get("api/product/lazada/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/lazada/AddProduct",t).pipe(l(r=>u(null)))}};o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var H=(()=>{let o=class o{constructor(){this.httpService=c(d)}getAttributes(t,e){return this.httpService.get("api/product/woo/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/woo/AddProduct",t).pipe(l(r=>u(null)))}};o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var v=class{};var S=class{};var z=(()=>{let o=class o{constructor(){this.httpService=c(d)}getCategories(t){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tokopedia/AddProduct",t).pipe(l(r=>u(null)))}};o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var R=(()=>{let o=class o{constructor(){this.httpService=c(d)}uploadProduct(t){return this.httpService.post("api/product/shopify/AddProduct",t).pipe(l(r=>u(null)))}};o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var Ht=(()=>{let o=class o{constructor(){this.authService=c(j),this.productService=c(w),this.shoppeUploadService=c(E),this.tiktokUploadService=c(F),this.lazadaUploadService=c(x),this.tokopediaUploadService=c(z),this.wooUploadService=c(H),this.shopifyUploadService=c(R),this.toastrHandlingService=c(T),this.toastr=c(D),this.router=c(U),this.httpService=c(d),this._selectedProduct=new P(this.getStoredProducts()),this.selectedProduct$=this._selectedProduct.asObservable().pipe(C(t=>t&&t.length>0))}getStoredProducts(){let t=localStorage.getItem("productsUpload");if(t){let e=JSON.parse(t);return e&&e.length>0?e:[]}else return[]}setSelectedProduct(t){localStorage.setItem("productsUpload",JSON.stringify(t)),this._selectedProduct.next(t)}clearSelectedProduct(){localStorage.removeItem("productsUpload"),this._selectedProduct.next([])}getUnselectedChannels(){let t=this.authService.getChannels(),e=this._selectedProduct.getValue();return this.productService.filterUnselectedChannel(e,t)}getDefaultCategory(){return this.httpService.get("api/v1/Channel/ProductCategory/Default")}get channelProductUpload(){let t=this.getUnselectedChannels();return I(t.map(r=>{let p=new v;return p.id=r.ID,p.name=r.Name,p.type=r.TypeID,p.categoryId=null,p.attributes=[],p.selected=!1,p}))}onUploadProduct(t){let e=t.filter(r=>r.selected&&g.IsNotEmpty(r.categoryId)||r.selected&&r.type==a.Shopify);if(e.length>0){let r=this.generateDataForUpload(e);this.uploadProduct(r)}else this.toastr.warning("Please select a channel and category to upload the product.","Warning!")}uploadProduct(t){let e=this.generateObservableForUpload(t);A(e).pipe(b(r=>{let p=[];return r.forEach(m=>{p=[...p,...m]}),p})).subscribe({next:(r=[])=>{g.IsNotEmpty(r)&&this.toastrHandlingService.showToastrUploadMultiple(r),this.hasSuccessRes(r)&&this.onSuccessUpload()}})}hasSuccessRes(t){let e=!1;return t.forEach(r=>{r?.Response.Success_list?.length>0&&g.IsNotEmpty(r)&&(e=!0)}),e}onSuccessUpload(){this.router.navigate(["/menu/products/status/sold-in-channel"]),this.clearSelectedProduct()}generateObservableForUpload(t){let e=[],r=[],p=[],m=[],y=[],k=[];t.forEach(n=>{switch(n.ChannelType){case a.Shopee:r.push(n);break;case a.Tiktok:e.push(n);break;case a.Lazada:p.push(n);break;case a.Tokopedia:m.push(n);break;case a.WooCommerce:y.push(n);break;case a.Shopify:k.push(n);break}});let h=[];return[{type:a.Shopee,data:r},{type:a.Tiktok,data:e},{type:a.Lazada,data:p},{type:a.Tokopedia,data:m},{type:a.WooCommerce,data:y},{type:a.Shopify,data:k}].filter(n=>n.data.length>0).forEach(n=>{switch(n.type){case a.Shopee:h.push(this.shoppeUploadService.uploadProduct(r));break;case a.Tiktok:h.push(this.tiktokUploadService.uploadProduct(e));break;case a.Lazada:h.push(this.lazadaUploadService.uploadProduct(p));break;case a.Tokopedia:h.push(this.tokopediaUploadService.uploadProduct(m));break;case a.WooCommerce:h.push(this.wooUploadService.uploadProduct(y));break;case a.Shopify:h.push(this.shopifyUploadService.uploadProduct(k));break}}),h}generateDataForUpload(t){let e=[];return t.forEach(r=>{let p=new S;p.ChannelID=r.id,p.ChannelType=r.type,p.Products=this._selectedProduct.getValue(),r.type==a.Shopify?delete p.CategoryID:p.CategoryID=r.categoryId,r.type==a.WooCommerce||r.type==a.Shopify?p.Attribute=r.attributes[0]:p.Attributes=this.formatAttributes(r.type,r.attributes),e.push(p)}),e}formatAttributes(t,e){let r;switch(t){case a.Shopee:r=this.shoppeUploadService.generateAttribute(e);break;case a.Tiktok:r=this.tiktokUploadService.generateAttribute(e);break;case a.WooCommerce:r=this.tiktokUploadService.generateAttribute(e);break;case a.Tokopedia:r=e;break;case a.Shopify:r=e;break;default:r=[];break}return r}};o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();export{E as a,F as b,x as c,H as d,Ht as e};
@@ -1 +1 @@
1
- import{a as K,b as Q}from"./chunk-6UK5EDKC.js";import{g as $}from"./chunk-NEQN5BMS.js";import{e as q}from"./chunk-NVF24LK5.js";import{t as H,u as J}from"./chunk-CTKEWRX4.js";import{a as B,h as V,m as R,y as U}from"./chunk-O5MOPAT5.js";import{b as g,c as s}from"./chunk-X4WLRMDP.js";import{$ as T,$a as b,$b as W,Dc as j,Ia as y,Ib as L,Kb as A,Mb as E,Nb as O,Ob as D,Pb as x,Q as u,Qb as P,T as c,Ua as f,X as l,Za as S,_ as w,_b as z,d,da as h,ga as k,gb as F,lb as C,mb as m,n as p,na as _,ub as N,wb as M,za as I,zc as G}from"./chunk-HSFUKC7R.js";var X=(()=>{let a=class a{constructor(){this.httpService=h(q),this.shopeeCategories=new d({data:[],isFirstLoad:!1}),this.tiktokCategories=new d({data:[],isFirstLoad:!1}),this.lazadaCategories=new d({data:[],isFirstLoad:!1}),this.tokopediaCategories=new d({data:[],isFirstLoad:!1}),this.wooCommerceCategories=new d({data:[],isFirstLoad:!1})}getCategories(t,o){switch(t){case g.Shopee:return this.shopeeCategories.asObservable().pipe(c(e=>e.isFirstLoad?p(e.data):this.getShopeeCategories(o)));case g.Tiktok:return this.tiktokCategories.asObservable().pipe(c(e=>e.isFirstLoad?p(e.data):this.getTiktokCategories(o)));case g.Lazada:return this.lazadaCategories.asObservable().pipe(c(e=>e.isFirstLoad?p(e.data):this.getLazadaCategories(o)));case g.Tokopedia:return this.tokopediaCategories.asObservable().pipe(c(e=>e.isFirstLoad?p(e.data):this.getTokopediaCategories(o)));case g.WooCommerce:return this.wooCommerceCategories.asObservable().pipe(c(e=>e.isFirstLoad?p(e.data):this.getWooCommerceCategories(o)));default:return p([])}}getShopeeCategories(t){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:t}]).pipe(l(e=>{let i={data:e,isFirstLoad:!0};this.shopeeCategories.next(i)}))}getTiktokCategories(t){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:t}]).pipe(l(e=>{let i={data:e,isFirstLoad:!0};this.tiktokCategories.next(i)}))}getLazadaCategories(t){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:t}]).pipe(l(e=>{let i={data:e,isFirstLoad:!0};this.lazadaCategories.next(i)}))}getTokopediaCategories(t){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:t}]).pipe(l(e=>{let i={data:e,isFirstLoad:!0};this.tokopediaCategories.next(i)}))}getWooCommerceCategories(t){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:t}]).pipe(l(e=>{let i={data:e,isFirstLoad:!0};this.wooCommerceCategories.next(i)}))}searchByIdWithParentDFS(t,o){let e=[...t];for(;e.length>0;){let i=e.pop();if(i.id===JSON.stringify(o))return i;if(i.children&&i.children.length>0)for(let n of i.children)n.parent=i,e.push(n)}return null}generateCategoryLabel(t){let o="";return t?o=s.getLabelPathTree(t):o="Select a Category",o}};a.\u0275fac=function(o){return new(o||a)},a.\u0275prov=T({token:a,factory:a.\u0275fac,providedIn:"root"});let r=a;return r})();function Z(r,a){if(r&1&&(C(0,"div",3),L(1),m()),r&2){let v=M();b("matTooltip",v.selectedCategoryLabel()),y(),A(" ",v.selectedCategoryLabel()," ")}}function ee(r,a){r&1&&(C(0,"label",2),L(1,"Category"),m())}var Te=(()=>{let a=class a{constructor(){this.categoryService=h(X),this.showClear=!1,this.showLabel=!1,this.disabled=!1,this.selectedCategory=new I,this.selectedCategoryLabel=f("Select a Category"),this.selectedNode=f(null),this.onChange=t=>{},this.onTouched=()=>{}}ngOnChanges(t){let o=t?.categoryId?.previousValue,e=t?.categoryId?.currentValue;s.IsEmpty(o)&&s.IsNotEmpty(e)&&this.initCategories(),s.IsEmpty(e)&&s.IsNotEmpty(o)&&this.generateCategoryLabel(null)}initCategories(){this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(l(t=>this.setDefaultCategory(t)),u(1))}setDefaultCategory(t){try{let o=this.categoryService.searchByIdWithParentDFS(t,this.categoryId);o&&(this.generateCategoryLabel(o),this.selectedNode.set(o))}catch(o){console.error(o)}}onClickSelect(){this.disabled==!1&&(this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(u(1)))}onNodeSelect(t){let o=t.node;this.selectedCategoryLabel.set(s.getLabelPathTree(o));let e=parseInt(o.id);this.onChange(e),this.selectedCategory.emit(e)}onNodeUnselect(){this.selectedCategoryLabel.set("Select a Category"),this.selectedCategory.emit(null)}generateCategoryLabel(t){t?this.selectedCategoryLabel.set(s.getLabelPathTree(t)):this.selectedCategoryLabel.set("Select a Category")}writeValue(t){s.IsNotEmpty(t)&&(this.categoryId=t,this.initCategories())}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=k({type:a,selectors:[["app-channel-category-select"]],inputs:{channelId:"channelId",channelType:"channelType",categoryId:"categoryId",showClear:"showClear",showLabel:"showLabel",disabled:"disabled"},outputs:{selectedCategory:"selectedCategory"},standalone:!0,features:[x([{provide:B,useExisting:w(()=>a),multi:!0}]),_,P],decls:4,vars:8,consts:[["appendTo","body","containerStyleClass","w-100","placeholder","Select a Category","id","selectCategory",3,"ngModelChange","click","onNodeSelect","onClear","ngModel","filter","options","showClear","disabled"],["pTemplate","value"],["for","selectCategory"],["matTooltipPosition","above",3,"matTooltip"]],template:function(o,e){o&1&&(C(0,"p-treeSelect",0),z(1,"async"),D("ngModelChange",function(n){return O(e.selectedNode,n)||(e.selectedNode=n),n}),N("click",function(){return e.onClickSelect()})("onNodeSelect",function(n){return e.onNodeSelect(n)})("onClear",function(){return e.onNodeUnselect()}),S(2,Z,2,2,"ng-template",1),m(),S(3,ee,2,0,"label",2)),o&2&&(E("ngModel",e.selectedNode),b("filter",!0)("options",W(1,6,e.categories$))("showClear",e.showClear)("disabled",e.disabled),y(3),F(e.showLabel?3:-1))},dependencies:[j,G,Q,K,$,J,H,U,V,R],styles:["[_nghost-%COMP%] .p-treeselect{width:100%;display:inline-flex;border:1px solid #ced4da;font-size:.875rem!important} .p-treeselect-panel{z-index:10002!important} .p-element .p-icon-wrapper{width:14px}"]});let r=a;return r})();export{X as a,Te as b};
1
+ import{a as K,b as Q}from"./chunk-ZA7FXMFZ.js";import{j as $}from"./chunk-2FRMUOJY.js";import{e as q}from"./chunk-JHYIHRQH.js";import{t as H,u as J}from"./chunk-2SC3HO66.js";import{a as B,h as V,m as R,y as U}from"./chunk-2E5AKA74.js";import{b as g,c as s}from"./chunk-FTHTFVHH.js";import{$ as T,Bc as G,Fc as j,Ja as y,Jb as L,Lb as A,Nb as E,Ob as O,Pb as D,Q as u,Qb as x,Rb as P,T as c,Va as f,X as l,_ as w,_a as S,ab as b,ac as z,bc as W,d,da as h,ga as k,hb as F,mb as C,n as p,na as _,nb as m,vb as N,xb as M,za as I}from"./chunk-ZIZWZZ4E.js";var X=(()=>{let a=class a{constructor(){this.httpService=h(q),this.shopeeCategories=new d({data:[],isFirstLoad:!1}),this.tiktokCategories=new d({data:[],isFirstLoad:!1}),this.lazadaCategories=new d({data:[],isFirstLoad:!1}),this.tokopediaCategories=new d({data:[],isFirstLoad:!1}),this.wooCommerceCategories=new d({data:[],isFirstLoad:!1})}getCategories(t,o){switch(t){case g.Shopee:return this.shopeeCategories.asObservable().pipe(c(e=>e.isFirstLoad?p(e.data):this.getShopeeCategories(o)));case g.Tiktok:return this.tiktokCategories.asObservable().pipe(c(e=>e.isFirstLoad?p(e.data):this.getTiktokCategories(o)));case g.Lazada:return this.lazadaCategories.asObservable().pipe(c(e=>e.isFirstLoad?p(e.data):this.getLazadaCategories(o)));case g.Tokopedia:return this.tokopediaCategories.asObservable().pipe(c(e=>e.isFirstLoad?p(e.data):this.getTokopediaCategories(o)));case g.WooCommerce:return this.wooCommerceCategories.asObservable().pipe(c(e=>e.isFirstLoad?p(e.data):this.getWooCommerceCategories(o)));default:return p([])}}getShopeeCategories(t){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:t}]).pipe(l(e=>{let i={data:e,isFirstLoad:!0};this.shopeeCategories.next(i)}))}getTiktokCategories(t){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:t}]).pipe(l(e=>{let i={data:e,isFirstLoad:!0};this.tiktokCategories.next(i)}))}getLazadaCategories(t){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:t}]).pipe(l(e=>{let i={data:e,isFirstLoad:!0};this.lazadaCategories.next(i)}))}getTokopediaCategories(t){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:t}]).pipe(l(e=>{let i={data:e,isFirstLoad:!0};this.tokopediaCategories.next(i)}))}getWooCommerceCategories(t){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:t}]).pipe(l(e=>{let i={data:e,isFirstLoad:!0};this.wooCommerceCategories.next(i)}))}searchByIdWithParentDFS(t,o){let e=[...t];for(;e.length>0;){let i=e.pop();if(i.id===JSON.stringify(o))return i;if(i.children&&i.children.length>0)for(let n of i.children)n.parent=i,e.push(n)}return null}generateCategoryLabel(t){let o="";return t?o=s.getLabelPathTree(t):o="Select a Category",o}};a.\u0275fac=function(o){return new(o||a)},a.\u0275prov=T({token:a,factory:a.\u0275fac,providedIn:"root"});let r=a;return r})();function Z(r,a){if(r&1&&(C(0,"div",3),L(1),m()),r&2){let v=M();b("matTooltip",v.selectedCategoryLabel()),y(),A(" ",v.selectedCategoryLabel()," ")}}function ee(r,a){r&1&&(C(0,"label",2),L(1,"Category"),m())}var Te=(()=>{let a=class a{constructor(){this.categoryService=h(X),this.showClear=!1,this.showLabel=!1,this.disabled=!1,this.selectedCategory=new I,this.selectedCategoryLabel=f("Select a Category"),this.selectedNode=f(null),this.onChange=t=>{},this.onTouched=()=>{}}ngOnChanges(t){let o=t?.categoryId?.previousValue,e=t?.categoryId?.currentValue;s.IsEmpty(o)&&s.IsNotEmpty(e)&&this.initCategories(),s.IsEmpty(e)&&s.IsNotEmpty(o)&&this.generateCategoryLabel(null)}initCategories(){this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(l(t=>this.setDefaultCategory(t)),u(1))}setDefaultCategory(t){try{let o=this.categoryService.searchByIdWithParentDFS(t,this.categoryId);o&&(this.generateCategoryLabel(o),this.selectedNode.set(o))}catch(o){console.error(o)}}onClickSelect(){this.disabled==!1&&(this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(u(1)))}onNodeSelect(t){let o=t.node;this.selectedCategoryLabel.set(s.getLabelPathTree(o));let e=parseInt(o.id);this.onChange(e),this.selectedCategory.emit(e)}onNodeUnselect(){this.selectedCategoryLabel.set("Select a Category"),this.selectedCategory.emit(null)}generateCategoryLabel(t){t?this.selectedCategoryLabel.set(s.getLabelPathTree(t)):this.selectedCategoryLabel.set("Select a Category")}writeValue(t){s.IsNotEmpty(t)&&(this.categoryId=t,this.initCategories())}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=k({type:a,selectors:[["app-channel-category-select"]],inputs:{channelId:"channelId",channelType:"channelType",categoryId:"categoryId",showClear:"showClear",showLabel:"showLabel",disabled:"disabled"},outputs:{selectedCategory:"selectedCategory"},standalone:!0,features:[x([{provide:B,useExisting:w(()=>a),multi:!0}]),_,P],decls:4,vars:8,consts:[["appendTo","body","containerStyleClass","w-100","placeholder","Select a Category","id","selectCategory",3,"ngModelChange","click","onNodeSelect","onClear","ngModel","filter","options","showClear","disabled"],["pTemplate","value"],["for","selectCategory"],["matTooltipPosition","above",3,"matTooltip"]],template:function(o,e){o&1&&(C(0,"p-treeSelect",0),z(1,"async"),D("ngModelChange",function(n){return O(e.selectedNode,n)||(e.selectedNode=n),n}),N("click",function(){return e.onClickSelect()})("onNodeSelect",function(n){return e.onNodeSelect(n)})("onClear",function(){return e.onNodeUnselect()}),S(2,Z,2,2,"ng-template",1),m(),S(3,ee,2,0,"label",2)),o&2&&(E("ngModel",e.selectedNode),b("filter",!0)("options",W(1,6,e.categories$))("showClear",e.showClear)("disabled",e.disabled),y(3),F(e.showLabel?3:-1))},dependencies:[j,G,Q,K,$,J,H,U,V,R],styles:["[_nghost-%COMP%] .p-treeselect{width:100%;display:inline-flex;border:1px solid #ced4da;font-size:.875rem!important} .p-treeselect-panel{z-index:10002!important} .p-element .p-icon-wrapper{width:14px}"]});let r=a;return r})();export{X as a,Te as b};
@@ -1 +1 @@
1
- import{b as ae,e as me}from"./chunk-NVF24LK5.js";import{b as S,c as A,h as se,i as _,j as M}from"./chunk-3XWOT6GZ.js";import{c as w,e as N,h as R,i as $,j as ee,l as K,m as W,n as te,p as ne,r as oe,v as ie,w as re}from"./chunk-O5MOPAT5.js";import{b as Y,c as le}from"./chunk-X4WLRMDP.js";import{$a as u,Ha as z,Hb as F,Ia as m,Ib as s,Ja as C,Jb as P,Kb as H,Mb as T,Nb as b,Ob as D,Sb as k,Za as h,ga as y,gb as V,lb as o,mb as r,nb as I,oa as c,pa as g,rb as L,tc as q,ub as v,vc as Q,wb as U,wc as X}from"./chunk-HSFUKC7R.js";function pe(t,i){if(t&1&&(o(0,"tr")(1,"td")(2,"a",11),I(3,"img",12),o(4,"span"),s(5),r()()(),o(6,"td"),s(7),r(),o(8,"td"),s(9),r()()),t&2){let f=i.$implicit;m(2),u("href","/menu/channel/marketplace/view?ID="+f.Key.ID,z),m(),u("src",f.Logo,z),m(2),P(f.Key.Name),m(2),P(f.Value.Out),m(2),P(f.Value.Tg)}}var De=(()=>{let i=class i{constructor(l,n){this.dialogRef=l,this.data=n,this.generateChannelName(),this.channels=this.setChannelLogo(n.channels)}ngOnInit(){this.modalConfig=new _,this.modalConfig.title="Channel - New Order Configuration is not Unique!",this.modalConfig.headerType=se.Warning,this.modalConfig.hideOk=!0,this.modalConfig.cancelText="Close",this.modalConfig.customWidth="500px",this.modalConfig.bodyScrollable=!0,this.modalConfig.hideClose=!0}setChannelLogo(l){return l.map(n=>(n.Logo=le.getChannelLogoByTypeId(n.Key.TypeID),n))}generateChannelName(){this.channelNames="";let l=this.data.channels;l.forEach((n,e)=>{this.channelNames+=`${n.Key} ${e!=l.length-1?" + ":""}`})}onClose(){this.dialogRef.close()}};i.\u0275fac=function(n){return new(n||i)(C(S),C(A))},i.\u0275cmp=y({type:i,selectors:[["app-modal-channel-warning"]],decls:24,vars:2,consts:[[3,"onCancel","onClose","config"],["content","",1,"pt-2","px-4"],[1,"row"],[1,"col-12"],[1,"lh-base","fs-5"],[1,"mb-4"],[1,"table","table-bordered"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"fs-5","mt-4"],["href","https://support.dealpos.com/en/articles/8281096-setup-multiple-channel-marketplace-to-one-warehouse-outlet","target","_blank"],["target","_blank",3,"href"],[1,"me-3",2,"width","24px",3,"src"]],template:function(n,e){n&1&&(o(0,"modal-material",0),v("onCancel",function(){return e.onClose()})("onClose",function(){return e.onClose()}),o(1,"div",1)(2,"div",2)(3,"div",3)(4,"p",4),s(5,"When your order configuration is not unique, your Dashboard Sales Report will be invalid. You can use either Outlet or Order Tag to differentiate Channel Order. "),r(),o(6,"h5",5),s(7,"Your duplicate Channels are"),r(),o(8,"table",6)(9,"thead")(10,"tr",7)(11,"th"),s(12,"Channel"),r(),o(13,"th"),s(14,"Outlet"),r(),o(15,"th"),s(16,"Tag"),r()()(),o(17,"tbody"),h(18,pe,10,5,"tr",8),r()(),o(19,"p",9),s(20," Please refer to this "),o(21,"a",10),s(22,"article"),r(),s(23," for more information "),r()()()()()),n&2&&(u("config",e.modalConfig),m(18),u("ngForOf",e.channels))},dependencies:[Q,M]});let t=i;return t})();var Ie=(()=>{let i=class i{constructor(l,n,e){this.dialogRef=l,this.httpService=n,this.toastr=e,this.modalConfig=new _,this.modalConfig.title="Write Off Reason"}onSubmit(){let l={Name:this.reason};this.subscription=this.httpService.post("/api/channel/AddWriteoffOption",l).subscribe(n=>{this.toastr.success(n.Message,"Success"),this.dialogRef.close(l)})}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.subscription.unsubscribe()}};i.\u0275fac=function(n){return new(n||i)(C(S),C(me),C(ae))},i.\u0275cmp=y({type:i,selectors:[["app-dialog-writeOff-reason"]],decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","writeOffReason","placeholder","Write Off Reason","name","writeOffReason",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(n,e){if(n&1){let a=L();o(0,"modal-material",1),v("onClose",function(){return c(a),g(e.onClose())})("onCancel",function(){return c(a),g(e.onClose())})("onOk",function(){return c(a),g(e.onSubmit())}),o(1,"div",2)(2,"div",3)(3,"input",4,0),D("ngModelChange",function(p){return c(a),b(e.reason,p)||(e.reason=p),g(p)}),r(),o(5,"label",5),s(6,"Reason"),r()()()()}n&2&&(u("dynamicValidated",e.reason)("config",e.modalConfig),m(3),T("ngModel",e.reason))},dependencies:[w,R,W,M],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]});let t=i;return t})();var ue=t=>({invalid:t});function fe(t,i){t&1&&(o(0,"small"),s(1," URL is required "),r())}function ce(t,i){if(t&1&&(o(0,"div",13),h(1,fe,2,0,"small",14),r()),t&2){U();let f=F(10);m(),u("ngIf",f.errors.required)}}function ge(t,i){t&1&&(o(0,"small"),s(1," Email is required "),r())}function Ce(t,i){t&1&&(o(0,"small"),s(1," Email is not valid "),r())}function he(t,i){if(t&1&&(o(0,"div",13),h(1,ge,2,0,"small",14)(2,Ce,2,0,"small",14),r()),t&2){U();let f=F(16);m(),u("ngIf",f.errors.required),m(),u("ngIf",f.errors.pattern)}}var ke=(()=>{let i=class i{constructor(l){this.dialogRef=l}ngOnInit(){this.formData={URL:"",Email:""},this.initModalConfig()}initModalConfig(){this.modalConfig=new _,this.modalConfig.title="Fill data for Customer Support"}onSubmit(l){l!="Enter"&&this.dialogRef.close(this.formData)}onClose(){this.dialogRef.close()}};i.\u0275fac=function(n){return new(n||i)(C(S))},i.\u0275cmp=y({type:i,selectors:[["app-contact-support"]],decls:18,vars:9,consts:[["url","ngModel"],["email","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-2"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px",3,"ngClass"],["required","","type","text","id","customerURL","name","customerURL","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModelChange","ngModel"],["class","text-danger",4,"ngIf"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModelChange","ngModel"],[1,"text-danger"],[4,"ngIf"]],template:function(n,e){if(n&1){let a=L();o(0,"modal-material",2),v("onClose",function(){return c(a),g(e.onClose())})("onCancel",function(){return c(a),g(e.onClose())})("onOk",function(p){return c(a),g(e.onSubmit(p))}),o(1,"div",3)(2,"div",4)(3,"label",5),s(4,"Tokopedia URL"),r(),o(5,"div",6)(6,"div",7)(7,"span",8),s(8,"https://tokopedia.com/"),r()(),o(9,"input",9,0),D("ngModelChange",function(p){return c(a),b(e.formData.URL,p)||(e.formData.URL=p),g(p)}),r()(),h(11,ce,2,1,"div",10),o(12,"label",11),s(13,"Requester's Email"),r(),o(14,"div",6)(15,"input",12,1),D("ngModelChange",function(p){return c(a),b(e.formData.Email,p)||(e.formData.Email=p),g(p)}),r()(),h(17,he,3,2,"div",10),r()()()}if(n&2){let a=F(10),d=F(16);u("dynamicValidated",!a.invalid&&!d.invalid)("config",e.modalConfig),m(7),u("ngClass",k(7,ue,a.invalid&&(a.dirty||a.touched))),m(2),T("ngModel",e.formData.URL),m(2),u("ngIf",a.invalid&&(a.dirty||a.touched)),m(4),T("ngModel",e.formData.Email),m(2),u("ngIf",d.invalid&&(d.dirty||d.touched))}},dependencies:[q,X,w,R,ie,re,W,M],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"]});let t=i;return t})();var Fe=(()=>{let i=class i{constructor(l,n){this.dialogRef=l,this.data=n}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new _,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.shopID)}onClose(){this.dialogRef.close()}};i.\u0275fac=function(n){return new(n||i)(C(S),C(A))},i.\u0275cmp=y({type:i,selectors:[["app-modal-dialog-tokopedia"]],decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(n,e){if(n&1){let a=L();o(0,"modal-material",1),v("onClose",function(){return c(a),g(e.onClose())})("onCancel",function(){return c(a),g(e.onClose())})("onOk",function(){return c(a),g(e.onSubmit())}),o(1,"div",2)(2,"div",3)(3,"input",4,0),D("ngModelChange",function(p){return c(a),b(e.shopID,p)||(e.shopID=p),g(p)}),r(),o(5,"label",5),s(6,"Shop ID"),r()()()()}n&2&&(u("dynamicValidated",e.shopID)("config",e.modalConfig),m(3),T("ngModel",e.shopID))},dependencies:[w,R,W,M],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let t=i;return t})();var J=t=>({"is-invalid":t});function _e(t,i){t&1&&(o(0,"div"),s(1,"Please input with shopify domain. example mystore.myshopify.com"),r())}function ye(t,i){if(t&1&&(o(0,"div"),s(1),r()),t&2){let f=U(2);m(),H("",f.data==null?null:f.data.title," url is required")}}function ve(t,i){if(t&1&&(o(0,"div",6),h(1,_e,2,0,"div")(2,ye,2,1,"div"),r()),t&2){let f,l,n=U();m(),V(!(n.formGroup==null||(f=n.formGroup.get("URL"))==null)&&f.getError("pattern")?1:-1),m(),V(!(n.formGroup==null||(l=n.formGroup.get("URL"))==null)&&l.getError("required")?2:-1)}}function Se(t,i){t&1&&(o(0,"div",6),s(1," Consumer Key is required "),r())}function Me(t,i){t&1&&(o(0,"div",6),s(1," Consumer Secret is required "),r())}var Be=(()=>{let i=class i{constructor(l,n){this.dialogRef=l,this.data=n,this.modalConfig=new _,this.shopifyRegex=new RegExp("^[a-zA-Z0-9-]+.myshopify.com/?$"),this.urlCtrl=new K(null,N.pattern(this.shopifyRegex)),this.channelType=Y}ngOnInit(){this.initModalConfig(),this.initFormGroup()}initFormGroup(){let l=[N.required];this.data.channelType===Y.Shopify&&l.push(N.pattern(this.shopifyRegex)),this.formGroup=new ee({URL:new K(null,l),ConsumerKey:new K(null,[N.required]),ConsumerSecret:new K(null,[N.required])})}initModalConfig(){this.modalConfig=new _,this.modalConfig.title=this.data.title,this.modalConfig.okText="SAVE"}onClose(){this.dialogRef.close()}onSubmit(){this.formGroup.markAllAsTouched();let l=this.formGroup?.get("URL")?.getError("pattern"),n=this.formGroup?.get("ConsumerKey")?.valid,e=this.formGroup?.get("ConsumerSecret")?.valid;(this.formGroup?.valid||l&&n&&e)&&this.dialogRef.close(this.formGroup.value)}};i.\u0275fac=function(n){return new(n||i)(C(S),C(A))},i.\u0275cmp=y({type:i,selectors:[["app-modal-register-channel"]],decls:18,vars:16,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],[1,"form-label-group","has-validation"],["type","text","id","shopid","name","URL","title","URL","formControlName","URL",1,"form-control",3,"placeholder","ngClass"],["for","shopid"],[1,"invalid-feedback"],["type","text","id","ConsumerKey","placeholder","Consumer Key","name","ConsumerKey","title","ConsumerKey","formControlName","ConsumerKey",1,"form-control",3,"ngClass"],["for","ConsumerKey"],["type","text","id","ConsumerSecret","placeholder","Consumer Secret","name","ConsumerSecret","title","ConsumerSecret","formControlName","ConsumerSecret",1,"form-control",3,"ngClass"],["for","ConsumerSecret"]],template:function(n,e){if(n&1&&(o(0,"modal-material",0),v("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),o(1,"div",1)(2,"form",2)(3,"div",3),I(4,"input",4),o(5,"label",5),s(6),r(),h(7,ve,3,2,"div",6),r(),o(8,"div",3),I(9,"input",7),o(10,"label",8),s(11,"Consumer Key"),r(),h(12,Se,2,0,"div",6),r(),o(13,"div",3),I(14,"input",9),o(15,"label",10),s(16,"Consumer Secret"),r(),h(17,Me,2,0,"div",6),r()()()()),n&2){let a,d,p,E,G,O;u("config",e.modalConfig),m(2),u("formGroup",e.formGroup),m(2),u("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"Default Url Shopify":"Url")("ngClass",k(10,J,(e.formGroup==null||(a=e.formGroup.get("URL"))==null?null:a.invalid)&&((e.formGroup==null||(a=e.formGroup.get("URL"))==null?null:a.dirty)||(e.formGroup==null||(a=e.formGroup.get("URL"))==null?null:a.touched)))),m(2),H(" ",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"Default Url Shopify":"Url"," "),m(),V(!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.invalid&&(!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.dirty||!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.touched)?7:-1),m(2),u("ngClass",k(12,J,(e.formGroup==null||(p=e.formGroup.get("ConsumerKey"))==null?null:p.invalid)&&((e.formGroup==null||(p=e.formGroup.get("ConsumerKey"))==null?null:p.dirty)||(e.formGroup==null||(p=e.formGroup.get("ConsumerKey"))==null?null:p.touched)))),m(3),V(!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.getError("required")&&(!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.dirty||!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.touched)?12:-1),m(2),u("ngClass",k(14,J,(e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null?null:G.invalid)&&((e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null?null:G.dirty)||(e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null?null:G.touched)))),m(3),V(!(e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null)&&O.getError("required")&&(!(e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null)&&O.dirty||!(e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null)&&O.touched)?17:-1)}},dependencies:[q,te,w,R,$,M,ne,oe]});let t=i;return t})();export{De as a,Ie as b,ke as c,Fe as d,Be as e};
1
+ import{b as ae,e as me}from"./chunk-JHYIHRQH.js";import{b as S,c as A,h as se,i as _,j as M}from"./chunk-4CEFDQPI.js";import{c as w,e as N,h as R,i as $,j as ee,l as K,m as W,n as te,p as ne,r as oe,v as ie,w as re}from"./chunk-2E5AKA74.js";import{b as Y,c as le}from"./chunk-FTHTFVHH.js";import{Ha as z,Ib as F,Ja as m,Jb as s,Ka as C,Kb as P,Lb as H,Nb as T,Ob as b,Pb as D,Tb as k,_a as h,ab as u,ga as y,hb as V,mb as o,nb as r,oa as c,ob as I,pa as g,sb as L,vb as v,vc as q,xb as U,xc as Q,yc as X}from"./chunk-ZIZWZZ4E.js";function pe(t,i){if(t&1&&(o(0,"tr")(1,"td")(2,"a",11),I(3,"img",12),o(4,"span"),s(5),r()()(),o(6,"td"),s(7),r(),o(8,"td"),s(9),r()()),t&2){let f=i.$implicit;m(2),u("href","/menu/channel/marketplace/view?ID="+f.Key.ID,z),m(),u("src",f.Logo,z),m(2),P(f.Key.Name),m(2),P(f.Value.Out),m(2),P(f.Value.Tg)}}var De=(()=>{let i=class i{constructor(l,n){this.dialogRef=l,this.data=n,this.generateChannelName(),this.channels=this.setChannelLogo(n.channels)}ngOnInit(){this.modalConfig=new _,this.modalConfig.title="Channel - New Order Configuration is not Unique!",this.modalConfig.headerType=se.Warning,this.modalConfig.hideOk=!0,this.modalConfig.cancelText="Close",this.modalConfig.customWidth="500px",this.modalConfig.bodyScrollable=!0,this.modalConfig.hideClose=!0}setChannelLogo(l){return l.map(n=>(n.Logo=le.getChannelLogoByTypeId(n.Key.TypeID),n))}generateChannelName(){this.channelNames="";let l=this.data.channels;l.forEach((n,e)=>{this.channelNames+=`${n.Key} ${e!=l.length-1?" + ":""}`})}onClose(){this.dialogRef.close()}};i.\u0275fac=function(n){return new(n||i)(C(S),C(A))},i.\u0275cmp=y({type:i,selectors:[["app-modal-channel-warning"]],decls:24,vars:2,consts:[[3,"onCancel","onClose","config"],["content","",1,"pt-2","px-4"],[1,"row"],[1,"col-12"],[1,"lh-base","fs-5"],[1,"mb-4"],[1,"table","table-bordered"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"fs-5","mt-4"],["href","https://support.dealpos.com/en/articles/8281096-setup-multiple-channel-marketplace-to-one-warehouse-outlet","target","_blank"],["target","_blank",3,"href"],[1,"me-3",2,"width","24px",3,"src"]],template:function(n,e){n&1&&(o(0,"modal-material",0),v("onCancel",function(){return e.onClose()})("onClose",function(){return e.onClose()}),o(1,"div",1)(2,"div",2)(3,"div",3)(4,"p",4),s(5,"When your order configuration is not unique, your Dashboard Sales Report will be invalid. You can use either Outlet or Order Tag to differentiate Channel Order. "),r(),o(6,"h5",5),s(7,"Your duplicate Channels are"),r(),o(8,"table",6)(9,"thead")(10,"tr",7)(11,"th"),s(12,"Channel"),r(),o(13,"th"),s(14,"Outlet"),r(),o(15,"th"),s(16,"Tag"),r()()(),o(17,"tbody"),h(18,pe,10,5,"tr",8),r()(),o(19,"p",9),s(20," Please refer to this "),o(21,"a",10),s(22,"article"),r(),s(23," for more information "),r()()()()()),n&2&&(u("config",e.modalConfig),m(18),u("ngForOf",e.channels))},dependencies:[Q,M]});let t=i;return t})();var Ie=(()=>{let i=class i{constructor(l,n,e){this.dialogRef=l,this.httpService=n,this.toastr=e,this.modalConfig=new _,this.modalConfig.title="Write Off Reason"}onSubmit(){let l={Name:this.reason};this.subscription=this.httpService.post("/api/channel/AddWriteoffOption",l).subscribe(n=>{this.toastr.success(n.Message,"Success"),this.dialogRef.close(l)})}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.subscription.unsubscribe()}};i.\u0275fac=function(n){return new(n||i)(C(S),C(me),C(ae))},i.\u0275cmp=y({type:i,selectors:[["app-dialog-writeOff-reason"]],decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","writeOffReason","placeholder","Write Off Reason","name","writeOffReason",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(n,e){if(n&1){let a=L();o(0,"modal-material",1),v("onClose",function(){return c(a),g(e.onClose())})("onCancel",function(){return c(a),g(e.onClose())})("onOk",function(){return c(a),g(e.onSubmit())}),o(1,"div",2)(2,"div",3)(3,"input",4,0),D("ngModelChange",function(p){return c(a),b(e.reason,p)||(e.reason=p),g(p)}),r(),o(5,"label",5),s(6,"Reason"),r()()()()}n&2&&(u("dynamicValidated",e.reason)("config",e.modalConfig),m(3),T("ngModel",e.reason))},dependencies:[w,R,W,M],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]});let t=i;return t})();var ue=t=>({invalid:t});function fe(t,i){t&1&&(o(0,"small"),s(1," URL is required "),r())}function ce(t,i){if(t&1&&(o(0,"div",13),h(1,fe,2,0,"small",14),r()),t&2){U();let f=F(10);m(),u("ngIf",f.errors.required)}}function ge(t,i){t&1&&(o(0,"small"),s(1," Email is required "),r())}function Ce(t,i){t&1&&(o(0,"small"),s(1," Email is not valid "),r())}function he(t,i){if(t&1&&(o(0,"div",13),h(1,ge,2,0,"small",14)(2,Ce,2,0,"small",14),r()),t&2){U();let f=F(16);m(),u("ngIf",f.errors.required),m(),u("ngIf",f.errors.pattern)}}var ke=(()=>{let i=class i{constructor(l){this.dialogRef=l}ngOnInit(){this.formData={URL:"",Email:""},this.initModalConfig()}initModalConfig(){this.modalConfig=new _,this.modalConfig.title="Fill data for Customer Support"}onSubmit(l){l!="Enter"&&this.dialogRef.close(this.formData)}onClose(){this.dialogRef.close()}};i.\u0275fac=function(n){return new(n||i)(C(S))},i.\u0275cmp=y({type:i,selectors:[["app-contact-support"]],decls:18,vars:9,consts:[["url","ngModel"],["email","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-2"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px",3,"ngClass"],["required","","type","text","id","customerURL","name","customerURL","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModelChange","ngModel"],["class","text-danger",4,"ngIf"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModelChange","ngModel"],[1,"text-danger"],[4,"ngIf"]],template:function(n,e){if(n&1){let a=L();o(0,"modal-material",2),v("onClose",function(){return c(a),g(e.onClose())})("onCancel",function(){return c(a),g(e.onClose())})("onOk",function(p){return c(a),g(e.onSubmit(p))}),o(1,"div",3)(2,"div",4)(3,"label",5),s(4,"Tokopedia URL"),r(),o(5,"div",6)(6,"div",7)(7,"span",8),s(8,"https://tokopedia.com/"),r()(),o(9,"input",9,0),D("ngModelChange",function(p){return c(a),b(e.formData.URL,p)||(e.formData.URL=p),g(p)}),r()(),h(11,ce,2,1,"div",10),o(12,"label",11),s(13,"Requester's Email"),r(),o(14,"div",6)(15,"input",12,1),D("ngModelChange",function(p){return c(a),b(e.formData.Email,p)||(e.formData.Email=p),g(p)}),r()(),h(17,he,3,2,"div",10),r()()()}if(n&2){let a=F(10),d=F(16);u("dynamicValidated",!a.invalid&&!d.invalid)("config",e.modalConfig),m(7),u("ngClass",k(7,ue,a.invalid&&(a.dirty||a.touched))),m(2),T("ngModel",e.formData.URL),m(2),u("ngIf",a.invalid&&(a.dirty||a.touched)),m(4),T("ngModel",e.formData.Email),m(2),u("ngIf",d.invalid&&(d.dirty||d.touched))}},dependencies:[q,X,w,R,ie,re,W,M],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"]});let t=i;return t})();var Fe=(()=>{let i=class i{constructor(l,n){this.dialogRef=l,this.data=n}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new _,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.shopID)}onClose(){this.dialogRef.close()}};i.\u0275fac=function(n){return new(n||i)(C(S),C(A))},i.\u0275cmp=y({type:i,selectors:[["app-modal-dialog-tokopedia"]],decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(n,e){if(n&1){let a=L();o(0,"modal-material",1),v("onClose",function(){return c(a),g(e.onClose())})("onCancel",function(){return c(a),g(e.onClose())})("onOk",function(){return c(a),g(e.onSubmit())}),o(1,"div",2)(2,"div",3)(3,"input",4,0),D("ngModelChange",function(p){return c(a),b(e.shopID,p)||(e.shopID=p),g(p)}),r(),o(5,"label",5),s(6,"Shop ID"),r()()()()}n&2&&(u("dynamicValidated",e.shopID)("config",e.modalConfig),m(3),T("ngModel",e.shopID))},dependencies:[w,R,W,M],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let t=i;return t})();var J=t=>({"is-invalid":t});function _e(t,i){t&1&&(o(0,"div"),s(1,"Please input with shopify domain. example mystore.myshopify.com"),r())}function ye(t,i){if(t&1&&(o(0,"div"),s(1),r()),t&2){let f=U(2);m(),H("",f.data==null?null:f.data.title," url is required")}}function ve(t,i){if(t&1&&(o(0,"div",6),h(1,_e,2,0,"div")(2,ye,2,1,"div"),r()),t&2){let f,l,n=U();m(),V(!(n.formGroup==null||(f=n.formGroup.get("URL"))==null)&&f.getError("pattern")?1:-1),m(),V(!(n.formGroup==null||(l=n.formGroup.get("URL"))==null)&&l.getError("required")?2:-1)}}function Se(t,i){t&1&&(o(0,"div",6),s(1," Consumer Key is required "),r())}function Me(t,i){t&1&&(o(0,"div",6),s(1," Consumer Secret is required "),r())}var Be=(()=>{let i=class i{constructor(l,n){this.dialogRef=l,this.data=n,this.modalConfig=new _,this.shopifyRegex=new RegExp("^[a-zA-Z0-9-]+.myshopify.com/?$"),this.urlCtrl=new K(null,N.pattern(this.shopifyRegex)),this.channelType=Y}ngOnInit(){this.initModalConfig(),this.initFormGroup()}initFormGroup(){let l=[N.required];this.data.channelType===Y.Shopify&&l.push(N.pattern(this.shopifyRegex)),this.formGroup=new ee({URL:new K(null,l),ConsumerKey:new K(null,[N.required]),ConsumerSecret:new K(null,[N.required])})}initModalConfig(){this.modalConfig=new _,this.modalConfig.title=this.data.title,this.modalConfig.okText="SAVE"}onClose(){this.dialogRef.close()}onSubmit(){this.formGroup.markAllAsTouched();let l=this.formGroup?.get("URL")?.getError("pattern"),n=this.formGroup?.get("ConsumerKey")?.valid,e=this.formGroup?.get("ConsumerSecret")?.valid;(this.formGroup?.valid||l&&n&&e)&&this.dialogRef.close(this.formGroup.value)}};i.\u0275fac=function(n){return new(n||i)(C(S),C(A))},i.\u0275cmp=y({type:i,selectors:[["app-modal-register-channel"]],decls:18,vars:16,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],[1,"form-label-group","has-validation"],["type","text","id","shopid","name","URL","title","URL","formControlName","URL",1,"form-control",3,"placeholder","ngClass"],["for","shopid"],[1,"invalid-feedback"],["type","text","id","ConsumerKey","placeholder","Consumer Key","name","ConsumerKey","title","ConsumerKey","formControlName","ConsumerKey",1,"form-control",3,"ngClass"],["for","ConsumerKey"],["type","text","id","ConsumerSecret","placeholder","Consumer Secret","name","ConsumerSecret","title","ConsumerSecret","formControlName","ConsumerSecret",1,"form-control",3,"ngClass"],["for","ConsumerSecret"]],template:function(n,e){if(n&1&&(o(0,"modal-material",0),v("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),o(1,"div",1)(2,"form",2)(3,"div",3),I(4,"input",4),o(5,"label",5),s(6),r(),h(7,ve,3,2,"div",6),r(),o(8,"div",3),I(9,"input",7),o(10,"label",8),s(11,"Consumer Key"),r(),h(12,Se,2,0,"div",6),r(),o(13,"div",3),I(14,"input",9),o(15,"label",10),s(16,"Consumer Secret"),r(),h(17,Me,2,0,"div",6),r()()()()),n&2){let a,d,p,E,G,O;u("config",e.modalConfig),m(2),u("formGroup",e.formGroup),m(2),u("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"Default Url Shopify":"Url")("ngClass",k(10,J,(e.formGroup==null||(a=e.formGroup.get("URL"))==null?null:a.invalid)&&((e.formGroup==null||(a=e.formGroup.get("URL"))==null?null:a.dirty)||(e.formGroup==null||(a=e.formGroup.get("URL"))==null?null:a.touched)))),m(2),H(" ",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"Default Url Shopify":"Url"," "),m(),V(!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.invalid&&(!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.dirty||!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.touched)?7:-1),m(2),u("ngClass",k(12,J,(e.formGroup==null||(p=e.formGroup.get("ConsumerKey"))==null?null:p.invalid)&&((e.formGroup==null||(p=e.formGroup.get("ConsumerKey"))==null?null:p.dirty)||(e.formGroup==null||(p=e.formGroup.get("ConsumerKey"))==null?null:p.touched)))),m(3),V(!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.getError("required")&&(!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.dirty||!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.touched)?12:-1),m(2),u("ngClass",k(14,J,(e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null?null:G.invalid)&&((e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null?null:G.dirty)||(e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null?null:G.touched)))),m(3),V(!(e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null)&&O.getError("required")&&(!(e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null)&&O.dirty||!(e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null)&&O.touched)?17:-1)}},dependencies:[q,te,w,R,$,M,ne,oe]});let t=i;return t})();export{De as a,Ie as b,ke as c,Fe as d,Be as e};