marketplacepos 5.50.2 → 5.51.0

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 (66) hide show
  1. package/Marketplace/3rdpartylicenses.txt +26 -26
  2. package/Marketplace/{chunk-BGJEGBP5.js → chunk-25Q56ATV.js} +1 -1
  3. package/Marketplace/{chunk-4NT5VNJW.js → chunk-2PMJPSC4.js} +2 -2
  4. package/Marketplace/{chunk-VFZ76Z6T.js → chunk-364CDNZV.js} +1 -1
  5. package/Marketplace/{chunk-JUWHPFPW.js → chunk-36OIR6DM.js} +1 -1
  6. package/Marketplace/{chunk-TLCH5ENB.js → chunk-3Q6QZGLZ.js} +1 -1
  7. package/Marketplace/{chunk-B5BQZD66.js → chunk-4ITXH35D.js} +1 -1
  8. package/Marketplace/{chunk-EDGT4W2Q.js → chunk-4JCS7WPV.js} +1 -1
  9. package/Marketplace/{chunk-RNJHJCHP.js → chunk-53B6D5OR.js} +1 -1
  10. package/Marketplace/chunk-5NWJOQN5.js +1 -0
  11. package/Marketplace/{chunk-LQUMSCFQ.js → chunk-5YQUGH5Z.js} +1 -1
  12. package/Marketplace/{chunk-7K6U3ABQ.js → chunk-62YNPW6Q.js} +1 -1
  13. package/Marketplace/{chunk-YBRWFONB.js → chunk-6DGG765N.js} +1 -1
  14. package/Marketplace/{chunk-7AJN7ECH.js → chunk-6IZWIEUD.js} +1 -1
  15. package/Marketplace/{chunk-SS4PLPBF.js → chunk-7E6JD2PT.js} +1 -1
  16. package/Marketplace/{chunk-5NJAMQES.js → chunk-7QDKBMEA.js} +1 -1
  17. package/Marketplace/{chunk-TH27YE6R.js → chunk-7RIUHK6K.js} +1 -1
  18. package/Marketplace/{chunk-ELAPYSP6.js → chunk-A4X7F4MN.js} +1 -1
  19. package/Marketplace/{chunk-ZLNNQRTE.js → chunk-AF6XAQPY.js} +1 -1
  20. package/Marketplace/{chunk-7XA3VQEB.js → chunk-AZEH7PMO.js} +1 -1
  21. package/Marketplace/{chunk-GD6ZN56B.js → chunk-BKCKASH3.js} +1 -1
  22. package/Marketplace/{chunk-3TK5BYAY.js → chunk-BLOGT3TL.js} +1 -1
  23. package/Marketplace/{chunk-ZD5PSX3I.js → chunk-BVW7WI5I.js} +1 -1
  24. package/Marketplace/{chunk-QSW7O4GN.js → chunk-C64L25TP.js} +1 -1
  25. package/Marketplace/chunk-E6W25RW5.js +1 -0
  26. package/Marketplace/{chunk-DYTXOFIM.js → chunk-EGJMTFNO.js} +1 -1
  27. package/Marketplace/{chunk-YYKWI27U.js → chunk-EX4C4ZW4.js} +1 -1
  28. package/Marketplace/{chunk-PRM7MTFP.js → chunk-EYYKWIXP.js} +1 -1
  29. package/Marketplace/{chunk-U7FIZHGC.js → chunk-GD5I7ADU.js} +1 -1
  30. package/Marketplace/{chunk-2UKRRVAM.js → chunk-HT2MSA66.js} +1 -1
  31. package/Marketplace/{chunk-G3KVHCET.js → chunk-HZTKN5RX.js} +1 -1
  32. package/Marketplace/{chunk-OWLZQ5WE.js → chunk-ILFUI3MT.js} +1 -1
  33. package/Marketplace/{chunk-F24YPKYG.js → chunk-IXNEMOFX.js} +1 -1
  34. package/Marketplace/chunk-J4RDYEJC.js +1 -0
  35. package/Marketplace/{chunk-QB7PXKAO.js → chunk-K2CHDL7K.js} +1 -1
  36. package/Marketplace/{chunk-WCX3T6LK.js → chunk-LCN52IJT.js} +1 -1
  37. package/Marketplace/{chunk-GRVGKVD6.js → chunk-LOVYZLSU.js} +1 -1
  38. package/Marketplace/{chunk-CHGAMAQX.js → chunk-LWUMLKSO.js} +1 -1
  39. package/Marketplace/{chunk-EU324R5S.js → chunk-M5JNIPMS.js} +1 -1
  40. package/Marketplace/{chunk-OUYOKQ57.js → chunk-OJI34QN5.js} +1 -1
  41. package/Marketplace/{chunk-FUBZ75C7.js → chunk-OMY5ASFA.js} +1 -1
  42. package/Marketplace/{chunk-KA2HPWPG.js → chunk-OPCGCQMZ.js} +1 -1
  43. package/Marketplace/{chunk-A4UF2QH6.js → chunk-Q5IVQP3E.js} +1 -1
  44. package/Marketplace/{chunk-XF4A775R.js → chunk-R3BRUX7Z.js} +1 -1
  45. package/Marketplace/{chunk-PQM7IB5J.js → chunk-SASGSPGQ.js} +1 -1
  46. package/Marketplace/{chunk-XCJ5XRFI.js → chunk-SLQ42VND.js} +1 -1
  47. package/Marketplace/chunk-T3CN3WQD.js +1 -0
  48. package/Marketplace/{chunk-TG7XOXCH.js → chunk-T62YFSKW.js} +1 -1
  49. package/Marketplace/{chunk-KUPGF23P.js → chunk-TLTFNFAB.js} +1 -1
  50. package/Marketplace/{chunk-TVFILHVN.js → chunk-VBVBTC2P.js} +1 -1
  51. package/Marketplace/chunk-WEJBY3OB.js +1 -0
  52. package/Marketplace/{chunk-TUJBAZ5Q.js → chunk-WH76SMZT.js} +1 -1
  53. package/Marketplace/{chunk-2DZHA445.js → chunk-XAL6YLNQ.js} +1 -1
  54. package/Marketplace/{chunk-6LXQMIYX.js → chunk-XSOP2OTT.js} +1 -1
  55. package/Marketplace/{chunk-EKYPWTJN.js → chunk-YF7CCYHF.js} +1 -1
  56. package/Marketplace/{chunk-YQKEWN54.js → chunk-ZMMMNVOU.js} +1 -1
  57. package/Marketplace/{chunk-WXXGLR46.js → chunk-ZMSM2NR7.js} +1 -1
  58. package/Marketplace/{chunk-WG34QKGX.js → chunk-ZXFWQ6VJ.js} +1 -1
  59. package/Marketplace/index.html +2 -2
  60. package/Marketplace/{main-G6GGJLGW.js → main-SOO5LINL.js} +1 -1
  61. package/package.json +1 -1
  62. package/Marketplace/chunk-42GDFAAQ.js +0 -1
  63. package/Marketplace/chunk-CZICXKFA.js +0 -1
  64. package/Marketplace/chunk-DQXBBV26.js +0 -1
  65. package/Marketplace/chunk-UQ7PDZO3.js +0 -1
  66. /package/Marketplace/{chunk-FDGH6XKK.js → chunk-CIVDQKQZ.js} +0 -0
@@ -1,4 +1,30 @@
1
1
 
2
+ --------------------------------------------------------------------------------
3
+ Package: @angular/material
4
+ License: "MIT"
5
+
6
+ The MIT License
7
+
8
+ Copyright (c) 2025 Google LLC.
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in
18
+ all copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
+ THE SOFTWARE.
27
+
2
28
  --------------------------------------------------------------------------------
3
29
  Package: @primeuix/styles
4
30
  License: "MIT"
@@ -107,32 +133,6 @@ The term “Software” includes all source and object code, in whole and/or par
107
133
  9. **Indemnification:** Licensee hereby warrants to hold Licensor harmless and indemnify Licensor for any lawsuit brought against it in regards to Licensee’s use of The Software in means that violate, breach or otherwise circumvent this license, Licensor's intellectual property rights or Licensor's title in The Software. Licensor shall promptly notify Licensee in case of such legal action and request Licensee’s consent prior to any settlement in relation to such lawsuit or claim.
108
134
  10. **Governing Law, Jurisdiction:** Licensee hereby agrees not to initiate class-action lawsuits against Licensor in relation to this license and to compensate Licensor for any legal fees, cost or attorney fees should any claim brought by Licensee against Licensor be denied, in part or in full.
109
135
 
110
- --------------------------------------------------------------------------------
111
- Package: @angular/material
112
- License: "MIT"
113
-
114
- The MIT License
115
-
116
- Copyright (c) 2025 Google LLC.
117
-
118
- Permission is hereby granted, free of charge, to any person obtaining a copy
119
- of this software and associated documentation files (the "Software"), to deal
120
- in the Software without restriction, including without limitation the rights
121
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
122
- copies of the Software, and to permit persons to whom the Software is
123
- furnished to do so, subject to the following conditions:
124
-
125
- The above copyright notice and this permission notice shall be included in
126
- all copies or substantial portions of the Software.
127
-
128
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
129
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
130
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
131
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
132
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
133
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
134
- THE SOFTWARE.
135
-
136
136
  --------------------------------------------------------------------------------
137
137
  Package: @dealpos-npm/ng-dealpos-library
138
138
  License: "ISC"
@@ -1 +1 @@
1
- import{a as re}from"./chunk-RUYX7KTP.js";import{a as oe}from"./chunk-TVEI5B2O.js";import{a as ie}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as $,b as ee,d as te}from"./chunk-BZWZ64N5.js";import{a as ne}from"./chunk-27DIE2YS.js";import"./chunk-A6QXXKPR.js";import{b as Z}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import{c as Y}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as H}from"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as X,c as q,h as j,m as K,o as U,u as J,v as Q}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as k}from"./chunk-D6JH2KV4.js";import{b as z,e as G}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{q as F,y as V}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as L,Hb as x,Mc as I,Nb as N,Nc as l,Oc as S,Pc as b,Rc as g,Sc as c,Tc as u,ac as h,ad as T,cc as C,ec as B,fc as O,gc as R,hc as _,ic as i,id as A,jc as n,kc as w,kd as D,mb as E,ob as a,ra as y,rc as P,wc as v,ya as W,yc as f,za as M}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var ae=()=>["/menu/log/order/detail-user"],le=r=>({ID:r}),de=r=>({"bg-warning":r});function se(r,d){if(r&1&&(i(0,"span",22),w(1,"img",23),n(),l(2)),r&2){let o=d.item;a(),_("src",o.Img,E)("alt",o.Name),a(),b(" ",o.Name," ")}}function me(r,d){r&1&&(i(0,"th",26)(1,"span",29),l(2," Response Body Warning "),n()())}function pe(r,d){r&1&&(i(0,"th")(1,"span",29),l(2," Number Override "),n()())}function ge(r,d){if(r&1&&(i(0,"td",26)(1,"span",32),l(2),n()()),r&2){let o=f().$implicit;a(),_("ngClass",T(2,de,o.responseBodyWarning!=null)),a(),S(o.responseBodyWarning)}}function ce(r,d){if(r&1&&(i(0,"td"),l(1),n()),r&2){let o=f().$implicit;a(),b(" ",o.ResponseBodyWarningReference," ")}}function ue(r,d){if(r&1&&(i(0,"tr")(1,"td")(2,"a",30),l(3),A(4,"date"),n()(),i(5,"td"),l(6),n(),i(7,"td"),l(8),n(),i(9,"td"),l(10),n(),i(11,"td",26)(12,"span",31),l(13),n()(),h(14,ge,3,4,"td",26),h(15,ce,2,1,"td"),n()),r&2){let o=d.$implicit,s=f(2);a(2),_("routerLink",L(14,ae))("queryParams",T(15,le,o.ID)),a(),b(" ",D(4,11,o.Created,"dd MMM yyyy HH:mm:ss")," "),a(3),S(o.ChannelName),a(2),S(o.POSActionTypeString),a(2),S(o.Number),a(2),I(o.ResponseCode===200||o.ResponseCode===202?"bg-success":"bg-warning"),a(),b(" ",o.ResponseCode," "),a(),C(s.responseBodyWarningVisible?14:-1),a(),C(s.responseBodyWarningVisible?15:-1)}}function _e(r,d){if(r&1){let o=P();i(0,"div",20)(1,"table",24)(2,"thead")(3,"tr",25)(4,"th"),l(5,"Date"),n(),i(6,"th"),l(7,"Channel"),n(),i(8,"th"),l(9,"Actions"),n(),i(10,"th"),l(11,"Number"),n(),i(12,"th",26)(13,"span",27),l(14," Response Code "),n()(),h(15,me,3,0,"th",26),h(16,pe,3,0,"th"),n()(),i(17,"tbody"),O(18,ue,16,17,"tr",null,B),n()(),i(20,"mat-paginator",28),v("page",function(m){W(o);let e=f();return M(e.changePage(m))}),n()()}if(r&2){let o=f();a(15),C(o.responseBodyWarningVisible?15:-1),a(),C(o.responseBodyWarningVisible?16:-1),a(2),R(o.Result),a(2),_("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function he(r,d){r&1&&(i(0,"div",21),w(1,"app-empty-state"),n())}var Ie=(()=>{let d=class d{constructor(){this.http=y(k),this._RawLogService=y(re),this.route=y(z),this.authService=y(H),this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""},this.responseBodyWarningVisible=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.route.queryParams.subscribe(s=>{this.responseCode=s.responseCode,this.responseCode!=null?this.Load(s):this.Load()})}Load(s={}){this.http.post("/api/OrdersLoader/Get",s).subscribe(m=>{this.filter=m.Filter,this.ActionTypeList=m.Options.ActionTypeList,this.Get()})}Get(s){this.filter.Number=s,this.http.post("/api/Orders/Get",this.filter).subscribe(m=>{this._RawLogService.Data=m.hits,this.Result=Array();for(let e of m.hits){e._source.log.responseBodyWarning!=null&&(this.responseBodyWarningVisible=!0);let p={ID:e._id,Created:e._source["@timestamp_received"],shopId:e._source.shopId,MarketTypeString:e._source.log.type,ChannelName:e._source?.channelId!=null?this.channelOptions.find(t=>t.ID===e._source?.channelId)?.Name:"",POSActionTypeString:e._source.message,Number:e._source.log.number,ResponseCode:e._source.log.responseCode,responseBodyWarning:e._source.log.responseBodyWarning,ResponseBodyWarningReference:e._source.log.ResponseBodyWarningReference};this.Result.push(p)}this.paginationTotal=m.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(s){this.filter.PageNumber=s.pageIndex+1,this.Get()}};d.\u0275fac=function(m){return new(m||d)},d.\u0275cmp=x({type:d,selectors:[["app-order"]],decls:42,vars:14,consts:[["headerTitle","Order Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["id","listresponseBodyWarning"],["value","number-override"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],[3,"page","length","pageSize","pageIndex"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"],[1,"text-white","p-2","rounded","response-desc",3,"ngClass"]],template:function(m,e){m&1&&(i(0,"mainpanel",0),u("textChange",function(t){return c(e.Number,t)||(e.Number=t),t}),v("onSubmit",function(t){return e.Get(t)}),i(1,"filters")(2,"div")(3,"label",1),l(4,"Channel"),n(),i(5,"ng-select",2),u("ngModelChange",function(t){return c(e.filter.ChannelID,t)||(e.filter.ChannelID=t),t}),N(6,se,3,3,"ng-template",3),n()(),i(7,"div",4)(8,"label",1),l(9,"Action"),n(),i(10,"ng-select",5),u("ngModelChange",function(t){return c(e.filter.ActionType,t)||(e.filter.ActionType=t),t}),n()(),i(11,"div",4)(12,"label",6),l(13,"From/To"),n(),i(14,"div",7)(15,"datepicker",8),u("dateChange",function(t){return c(e.filter.From,t)||(e.filter.From=t),t}),n()(),i(16,"div")(17,"datepicker",9),u("dateChange",function(t){return c(e.filter.To,t)||(e.filter.To=t),t}),n()()(),i(18,"div",4)(19,"label",10),l(20,"Response Code"),n(),i(21,"input",11),u("ngModelChange",function(t){return c(e.filter.StatusCode,t)||(e.filter.StatusCode=t),t}),n()(),i(22,"div",4)(23,"label",10),l(24,"Response Body Warning"),n(),i(25,"input",12),u("ngModelChange",function(t){return c(e.filter.responseBodyWarning,t)||(e.filter.responseBodyWarning=t),t}),n(),i(26,"datalist",13),w(27,"option",14),n()(),i(28,"div",4)(29,"label",10),l(30,"Page Number"),n(),i(31,"input",15),u("ngModelChange",function(t){return c(e.filter.PageNumber,t)||(e.filter.PageNumber=t),t}),n()(),i(32,"div",4)(33,"label",10),l(34,"Page Size"),n(),i(35,"input",16),u("ngModelChange",function(t){return c(e.filter.RowCount,t)||(e.filter.RowCount=t),t}),n()()(),i(36,"content")(37,"div",17)(38,"div",18)(39,"div",19),h(40,_e,21,5,"div",20)(41,he,2,0,"div",21),n()()()()()),m&2&&(g("text",e.Number),a(5),_("clearable",!0)("items",e.channelOptions),g("ngModel",e.filter.ChannelID),a(5),_("clearable",!0)("items",e.ActionTypeList),g("ngModel",e.filter.ActionType),a(5),g("date",e.filter.From),a(2),g("date",e.filter.To),a(4),g("ngModel",e.filter.StatusCode),a(4),g("ngModel",e.filter.responseBodyWarning),a(6),g("ngModel",e.filter.PageNumber),a(4),g("ngModel",e.filter.RowCount),a(5),C((e.Result==null?null:e.Result.length)>0?40:41))},dependencies:[Z,te,X,J,Q,q,U,j,K,$,ee,ie,Y,G,F,oe,ne,V],encapsulation:2});let r=d;return r})();export{Ie as OrderComponent};
1
+ import{a as re}from"./chunk-RUYX7KTP.js";import{a as oe}from"./chunk-TVEI5B2O.js";import{a as ie}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as $,b as ee,d as te}from"./chunk-BZWZ64N5.js";import{a as ne}from"./chunk-27DIE2YS.js";import"./chunk-A6QXXKPR.js";import{b as Z}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import{c as Y}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as H}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as X,c as q,h as j,m as K,o as U,u as J,v as Q}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as k}from"./chunk-D6JH2KV4.js";import{b as z,e as G}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{q as F,y as V}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as L,Hb as x,Mc as I,Nb as N,Nc as l,Oc as S,Pc as b,Rc as g,Sc as c,Tc as u,ac as h,ad as T,cc as C,ec as B,fc as O,gc as R,hc as _,ic as i,id as A,jc as n,kc as w,kd as D,mb as E,ob as a,ra as y,rc as P,wc as v,ya as W,yc as f,za as M}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var ae=()=>["/menu/log/order/detail-user"],le=r=>({ID:r}),de=r=>({"bg-warning":r});function se(r,d){if(r&1&&(i(0,"span",22),w(1,"img",23),n(),l(2)),r&2){let o=d.item;a(),_("src",o.Img,E)("alt",o.Name),a(),b(" ",o.Name," ")}}function me(r,d){r&1&&(i(0,"th",26)(1,"span",29),l(2," Response Body Warning "),n()())}function pe(r,d){r&1&&(i(0,"th")(1,"span",29),l(2," Number Override "),n()())}function ge(r,d){if(r&1&&(i(0,"td",26)(1,"span",32),l(2),n()()),r&2){let o=f().$implicit;a(),_("ngClass",T(2,de,o.responseBodyWarning!=null)),a(),S(o.responseBodyWarning)}}function ce(r,d){if(r&1&&(i(0,"td"),l(1),n()),r&2){let o=f().$implicit;a(),b(" ",o.ResponseBodyWarningReference," ")}}function ue(r,d){if(r&1&&(i(0,"tr")(1,"td")(2,"a",30),l(3),A(4,"date"),n()(),i(5,"td"),l(6),n(),i(7,"td"),l(8),n(),i(9,"td"),l(10),n(),i(11,"td",26)(12,"span",31),l(13),n()(),h(14,ge,3,4,"td",26),h(15,ce,2,1,"td"),n()),r&2){let o=d.$implicit,s=f(2);a(2),_("routerLink",L(14,ae))("queryParams",T(15,le,o.ID)),a(),b(" ",D(4,11,o.Created,"dd MMM yyyy HH:mm:ss")," "),a(3),S(o.ChannelName),a(2),S(o.POSActionTypeString),a(2),S(o.Number),a(2),I(o.ResponseCode===200||o.ResponseCode===202?"bg-success":"bg-warning"),a(),b(" ",o.ResponseCode," "),a(),C(s.responseBodyWarningVisible?14:-1),a(),C(s.responseBodyWarningVisible?15:-1)}}function _e(r,d){if(r&1){let o=P();i(0,"div",20)(1,"table",24)(2,"thead")(3,"tr",25)(4,"th"),l(5,"Date"),n(),i(6,"th"),l(7,"Channel"),n(),i(8,"th"),l(9,"Actions"),n(),i(10,"th"),l(11,"Number"),n(),i(12,"th",26)(13,"span",27),l(14," Response Code "),n()(),h(15,me,3,0,"th",26),h(16,pe,3,0,"th"),n()(),i(17,"tbody"),O(18,ue,16,17,"tr",null,B),n()(),i(20,"mat-paginator",28),v("page",function(m){W(o);let e=f();return M(e.changePage(m))}),n()()}if(r&2){let o=f();a(15),C(o.responseBodyWarningVisible?15:-1),a(),C(o.responseBodyWarningVisible?16:-1),a(2),R(o.Result),a(2),_("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function he(r,d){r&1&&(i(0,"div",21),w(1,"app-empty-state"),n())}var Ie=(()=>{let d=class d{constructor(){this.http=y(k),this._RawLogService=y(re),this.route=y(z),this.authService=y(H),this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""},this.responseBodyWarningVisible=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.route.queryParams.subscribe(s=>{this.responseCode=s.responseCode,this.responseCode!=null?this.Load(s):this.Load()})}Load(s={}){this.http.post("/api/OrdersLoader/Get",s).subscribe(m=>{this.filter=m.Filter,this.ActionTypeList=m.Options.ActionTypeList,this.Get()})}Get(s){this.filter.Number=s,this.http.post("/api/Orders/Get",this.filter).subscribe(m=>{this._RawLogService.Data=m.hits,this.Result=Array();for(let e of m.hits){e._source.log.responseBodyWarning!=null&&(this.responseBodyWarningVisible=!0);let p={ID:e._id,Created:e._source["@timestamp_received"],shopId:e._source.shopId,MarketTypeString:e._source.log.type,ChannelName:e._source?.channelId!=null?this.channelOptions.find(t=>t.ID===e._source?.channelId)?.Name:"",POSActionTypeString:e._source.message,Number:e._source.log.number,ResponseCode:e._source.log.responseCode,responseBodyWarning:e._source.log.responseBodyWarning,ResponseBodyWarningReference:e._source.log.ResponseBodyWarningReference};this.Result.push(p)}this.paginationTotal=m.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(s){this.filter.PageNumber=s.pageIndex+1,this.Get()}};d.\u0275fac=function(m){return new(m||d)},d.\u0275cmp=x({type:d,selectors:[["app-order"]],decls:42,vars:14,consts:[["headerTitle","Order Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["id","listresponseBodyWarning"],["value","number-override"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],[3,"page","length","pageSize","pageIndex"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"],[1,"text-white","p-2","rounded","response-desc",3,"ngClass"]],template:function(m,e){m&1&&(i(0,"mainpanel",0),u("textChange",function(t){return c(e.Number,t)||(e.Number=t),t}),v("onSubmit",function(t){return e.Get(t)}),i(1,"filters")(2,"div")(3,"label",1),l(4,"Channel"),n(),i(5,"ng-select",2),u("ngModelChange",function(t){return c(e.filter.ChannelID,t)||(e.filter.ChannelID=t),t}),N(6,se,3,3,"ng-template",3),n()(),i(7,"div",4)(8,"label",1),l(9,"Action"),n(),i(10,"ng-select",5),u("ngModelChange",function(t){return c(e.filter.ActionType,t)||(e.filter.ActionType=t),t}),n()(),i(11,"div",4)(12,"label",6),l(13,"From/To"),n(),i(14,"div",7)(15,"datepicker",8),u("dateChange",function(t){return c(e.filter.From,t)||(e.filter.From=t),t}),n()(),i(16,"div")(17,"datepicker",9),u("dateChange",function(t){return c(e.filter.To,t)||(e.filter.To=t),t}),n()()(),i(18,"div",4)(19,"label",10),l(20,"Response Code"),n(),i(21,"input",11),u("ngModelChange",function(t){return c(e.filter.StatusCode,t)||(e.filter.StatusCode=t),t}),n()(),i(22,"div",4)(23,"label",10),l(24,"Response Body Warning"),n(),i(25,"input",12),u("ngModelChange",function(t){return c(e.filter.responseBodyWarning,t)||(e.filter.responseBodyWarning=t),t}),n(),i(26,"datalist",13),w(27,"option",14),n()(),i(28,"div",4)(29,"label",10),l(30,"Page Number"),n(),i(31,"input",15),u("ngModelChange",function(t){return c(e.filter.PageNumber,t)||(e.filter.PageNumber=t),t}),n()(),i(32,"div",4)(33,"label",10),l(34,"Page Size"),n(),i(35,"input",16),u("ngModelChange",function(t){return c(e.filter.RowCount,t)||(e.filter.RowCount=t),t}),n()()(),i(36,"content")(37,"div",17)(38,"div",18)(39,"div",19),h(40,_e,21,5,"div",20)(41,he,2,0,"div",21),n()()()()()),m&2&&(g("text",e.Number),a(5),_("clearable",!0)("items",e.channelOptions),g("ngModel",e.filter.ChannelID),a(5),_("clearable",!0)("items",e.ActionTypeList),g("ngModel",e.filter.ActionType),a(5),g("date",e.filter.From),a(2),g("date",e.filter.To),a(4),g("ngModel",e.filter.StatusCode),a(4),g("ngModel",e.filter.responseBodyWarning),a(6),g("ngModel",e.filter.PageNumber),a(4),g("ngModel",e.filter.RowCount),a(5),C((e.Result==null?null:e.Result.length)>0?40:41))},dependencies:[Z,te,X,J,Q,q,U,j,K,$,ee,ie,Y,G,F,oe,ne,V],encapsulation:2});let r=d;return r})();export{Ie as OrderComponent};
@@ -1,2 +1,2 @@
1
- import{a as _e}from"./chunk-CUSAKJLC.js";import"./chunk-4VNQYYVV.js";import{a as c}from"./chunk-TUJBAZ5Q.js";import{b as fe}from"./chunk-GD6ZN56B.js";import"./chunk-A6QXXKPR.js";import{a as he}from"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as be}from"./chunk-UEXWQT5J.js";import{c as ue}from"./chunk-IZZY74PN.js";import{B as ae,H as oe,I as A,l as Y,m as ee,q as te,u as ie,v as ne}from"./chunk-O3BS4AC6.js";import{a as o}from"./chunk-ZSUWHVKX.js";import{b as Z,h as ge}from"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{a as me,b as ce,c as pe}from"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as re,d as se,e as le,f as de,g as I}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as X,q as K,w as Q,y as W}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Da as N,Fd as P,Hb as M,Ib as _,Jb as j,Kc as y,Mc as E,Nb as S,Nc as g,Oc as w,Pc as x,Ra as U,ac as v,bc as G,cc as C,ec as H,fc as q,gc as J,hc as u,ic as r,id as T,jc as m,jd as D,kc as f,mb as V,na as b,ob as d,ra as s,ub as F,v as L,wc as z,yc as p,zb as $}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{i as k}from"./chunk-66YHNWRR.js";var O=class{constructor(){this.menus=[{Icon:"fa-solid fa-chart-pie",Title:"Dashboard",Url:"/menu/dashboard",Roles:[o.DashboardView]},{Icon:"fas fa-tag",Title:"Products",Url:"/menu/products",Roles:[o.ProductView]},{Icon:"fas fa-archive",Title:"Inventory",Url:"/menu/inventory",Roles:[o.InventoryView]},{Icon:"fas fa-money-bill-alt",Title:"Price",Url:"/menu/price",Roles:[o.PriceView]},{Icon:"fas fa-shopping-cart",Title:"Order",Url:"/menu/order",Roles:[o.OrderView]},{Icon:"fas fa-cog",Title:"Channel",Url:"/menu/channel",Roles:[o.ChannelView]},{Icon:"fa-solid fa-user",Title:"Users",Url:"/menu/users",Roles:[o.UserView]},{Icon:"fas fa-clipboard-list",Title:"Sync Logs",Url:"/menu/sync-log",Roles:[o.Report]},{Icon:"fas fa-dolly",Title:"Logistic",Url:"/menu/Logistic",Roles:[o.LogisticView]},{Icon:"fas fa-file-alt",Title:"Developer",Url:"/menu/log",Roles:[o.DevView]},{Icon:"fa-solid fa-file-brackets-curly",Title:"JSON Api",Url:"/menu/json-api",Roles:[o.JsonApiView]}]}get getMenu(){return this.menus}};var ve="mat-badge-content",we=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],decls:0,vars:0,template:function(i,a){},styles:[`.mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color, var(--mat-sys-error));color:var(--mat-badge-text-color, var(--mat-sys-on-error));font-family:var(--mat-badge-text-font, var(--mat-sys-label-small-font));font-weight:var(--mat-badge-text-weight, var(--mat-sys-label-small-weight));border-radius:var(--mat-badge-container-shape, var(--mat-sys-corner-full))}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}@media(forced-colors: active){.mat-badge-content{outline:solid 1px;border-radius:0}}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color, color-mix(in srgb, var(--mat-sys-error) 38%, transparent));color:var(--mat-badge-disabled-state-text-color, var(--mat-sys-on-error))}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size, unset);height:var(--mat-badge-legacy-small-size-container-size, unset);min-width:var(--mat-badge-small-size-container-size, 6px);min-height:var(--mat-badge-small-size-container-size, 6px);line-height:var(--mat-badge-small-size-line-height, 6px);padding:var(--mat-badge-small-size-container-padding, 0);font-size:var(--mat-badge-small-size-text-size, 0);margin:var(--mat-badge-small-size-container-offset, -6px 0)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset, -6px)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size, unset);height:var(--mat-badge-legacy-container-size, unset);min-width:var(--mat-badge-container-size, 16px);min-height:var(--mat-badge-container-size, 16px);line-height:var(--mat-badge-line-height, 16px);padding:var(--mat-badge-container-padding, 0 4px);font-size:var(--mat-badge-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-container-offset, -12px 0)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset, -12px)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size, unset);height:var(--mat-badge-legacy-large-size-container-size, unset);min-width:var(--mat-badge-large-size-container-size, 16px);min-height:var(--mat-badge-large-size-container-size, 16px);line-height:var(--mat-badge-large-size-line-height, 16px);padding:var(--mat-badge-large-size-container-padding, 0 4px);font-size:var(--mat-badge-large-size-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-large-size-container-offset, -12px 0)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset, -12px)}
2
- `],encapsulation:2,changeDetection:0})}return e})(),Ce=(()=>{class e{_ngZone=s(F);_elementRef=s(U);_ariaDescriber=s(ae);_renderer=s($);_animationsDisabled=oe();_idGenerator=s(ne);get color(){return this._color}set color(t){this._setColor(t),this._color=t}_color="primary";overlap=!0;disabled;position="above after";get content(){return this._content}set content(t){this._updateRenderedContent(t)}_content;get description(){return this._description}set description(t){this._updateDescription(t)}_description;size="medium";hidden;_badgeElement;_inlineBadgeDescription;_isInitialized=!1;_interactivityChecker=s(te);_document=s(N);constructor(){let t=s(Y);t.load(we),t.load(ee)}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let t=this._renderer.createElement("span"),i="mat-badge-active";return t.setAttribute("id",this._idGenerator.getId("mat-badge-content-")),t.setAttribute("aria-hidden","true"),t.classList.add(ve),this._animationsDisabled&&t.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(t),typeof requestAnimationFrame=="function"&&!this._animationsDisabled?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{t.classList.add(i)})}):t.classList.add(i),t}_updateRenderedContent(t){let i=`${t??""}`.trim();this._isInitialized&&i&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=i),this._content=i}_updateDescription(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!t||this._isHostInteractive())&&this._removeInlineDescription(),this._description=t,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,t):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(t){let i=this._elementRef.nativeElement.classList;i.remove(`mat-badge-${this._color}`),t&&i.add(`mat-badge-${t}`)}_clearExistingBadges(){let t=this._elementRef.nativeElement.querySelectorAll(`:scope > .${ve}`);for(let i of Array.from(t))i!==this._badgeElement&&i.remove()}static \u0275fac=function(i){return new(i||e)};static \u0275dir=j({type:e,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(i,a){i&2&&y("mat-badge-overlap",a.overlap)("mat-badge-above",a.isAbove())("mat-badge-below",!a.isAbove())("mat-badge-before",!a.isAfter())("mat-badge-after",a.isAfter())("mat-badge-small",a.size==="small")("mat-badge-medium",a.size==="medium")("mat-badge-large",a.size==="large")("mat-badge-hidden",a.hidden||!a.content)("mat-badge-disabled",a.disabled)},inputs:{color:[0,"matBadgeColor","color"],overlap:[2,"matBadgeOverlap","overlap",P],disabled:[2,"matBadgeDisabled","disabled",P],position:[0,"matBadgePosition","position"],content:[0,"matBadge","content"],description:[0,"matBadgeDescription","description"],size:[0,"matBadgeSize","size"],hidden:[2,"matBadgeHidden","hidden",P]}})}return e})(),xe=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=_({type:e});static \u0275inj=b({imports:[ie,A,A]})}return e})();function Oe(e,n){if(e&1&&(r(0,"p",21),g(1),m()),e&2){let t=p(3).$implicit;d(),x(" ",t.Title," ")}}function ke(e,n){if(e&1&&(r(0,"p"),g(1),m()),e&2){let t=p(3).$implicit;d(),w(t.Title)}}function Se(e,n){if(e&1&&(r(0,"a",18),f(1,"i"),v(2,Oe,2,1,"p",21)(3,ke,2,1,"p"),m()),e&2){let t=p(2).$implicit;u("href",t.Url,V),d(),E(t.Icon),d(),C(t.Badge?2:3)}}function ze(e,n){if(e&1&&S(0,Se,4,4,"a",20),e&2){let t=p().$implicit;u("ngxPermissionsOnly",t.Roles)}}function Ee(e,n){if(e&1&&(r(0,"p",21),g(1),m()),e&2){let t=p(4).$implicit;d(),x(" ",t.Title," ")}}function Te(e,n){if(e&1&&(r(0,"p"),g(1),m()),e&2){let t=p(4).$implicit;d(),w(t.Title)}}function De(e,n){if(e&1&&(v(0,Ee,2,1,"p",21),T(1,"async"),G(2,Te,2,1,"p")),e&2){let t=p(4);C(D(1,1,t.notifications$)!=0?0:2)}}function Ae(e,n){if(e&1&&(r(0,"p"),g(1),m()),e&2){let t=p(3).$implicit;d(),w(t.Title)}}function Ie(e,n){if(e&1&&(r(0,"a",19),f(1,"i"),v(2,De,3,3)(3,Ae,2,1,"p"),m()),e&2){let t=p(2).$implicit,i=p();u("matTooltip",i.isCollapseSidebar?t.Title:"")("routerLink",t.Url),d(),E(t.Icon),d(),C(t.Badge?2:3)}}function Be(e,n){if(e&1&&S(0,Ie,4,5,"a",22),e&2){let t=p().$implicit;u("ngxPermissionsOnly",t.Roles)}}function Re(e,n){if(e&1&&(r(0,"li",16),v(1,ze,1,1,"a",18)(2,Be,1,1,"a",19),m()),e&2){let t=n.$implicit;d(),C(t.ExternalLink?1:2)}}var Me=(()=>{let n=class n{constructor(){this.toggleSidebarService=s(he),this.notificationService=s(fe),this.decodeTokenService=s(Z),this.authService=s(ge),this.Menu={};let i=this.decodeTokenService;this.isCollapseSidebar=!1,this.token=i.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new O().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(L(i=>i.length))}onLogout(){this.authService.logout()}onCallapseSidebar(){this.isCollapseSidebar=!this.isCollapseSidebar,this.storeName=this.token.StoreName,this.isCollapseSidebar&&(this.storeName=this.getInitialTitle(this.token.StoreName))}getInitialTitle(i){if(i){let a,l=i.split(" ");return l.length==1?a=l[0].substring(0,2):a=l.shift().charAt(0)+l.pop().charAt(0),a}}};n.\u0275fac=function(a){return new(a||n)},n.\u0275cmp=M({type:n,selectors:[["app-menu"]],standalone:!1,decls:29,vars:8,consts:[[1,"wrapper"],["data-color","green",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-md-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fas","cursor",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-bs-toggle","dropdown","aria-expanded","false",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center","cursor-pointer"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],["routerLink","/menu/profile",1,"dropdown-item","h5",2,"cursor","pointer"],["aria-hidden","true",1,"fa-user","fas"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fas","fa-sign-out-alt"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active"],[1,"main-panel"],["target","_blank",1,"nav-link","position-relative","d-block","changelog",3,"href"],["matTooltipPosition","right",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"],["class","nav-link position-relative d-block changelog","target","_blank",3,"href",4,"ngxPermissionsOnly"],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation"],["class","nav-link position-relative d-block","matTooltipPosition","right",3,"matTooltip","routerLink",4,"ngxPermissionsOnly"]],template:function(a,l){a&1&&(r(0,"div",0),T(1,"async"),r(2,"div",1)(3,"button",2),z("click",function(){return l.onCallapseSidebar()}),f(4,"i",3),m(),r(5,"div",4)(6,"div",5)(7,"a",6),g(8),m(),r(9,"div",7)(10,"div",8),g(11),m(),f(12,"div",9),r(13,"a",10),f(14,"i",11),g(15,"\xA0 "),r(16,"span"),g(17,"My Profile"),m()(),r(18,"a",12),z("click",function(){return l.onLogout()}),f(19,"i",13),g(20,"\xA0 "),r(21,"span"),g(22," Log Out"),m()()()()(),r(23,"div",14)(24,"ul",15),q(25,Re,3,1,"li",16,H),m()()(),r(27,"div",17),f(28,"router-outlet"),m()()),a&2&&(y("nav-open",D(1,6,l.toggleState$)),d(2),u("ngClass",l.isCollapseSidebar?"collapses":""),d(2),u("ngClass",l.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),d(4),x(" ",l.storeName," "),d(3),x(" ",l.token==null?null:l.token.LID," "),d(14),J(l.Menu))},dependencies:[K,re,le,de,ue,Ce,ce,Q],styles:["@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}.full-container[_ngcontent-%COMP%]{padding-top:0!important}} p.shake-animation.mat-badge>span.mat-badge-content{animation:_ngcontent-%COMP%_shake-animation 4.72s ease infinite;font-size:12px;transform-origin:50% 50%;right:-14px!important}@keyframes _ngcontent-%COMP%_shake-animation{0%{transform:translate(0)}1.78571%{transform:translate(5px)}3.57143%{transform:translate(0)}5.35714%{transform:translate(5px)}7.14286%{transform:translate(0)}8.92857%{transform:translate(5px)}10.71429%{transform:translate(0)}to{transform:translate(0)}} .changelog:visited p.shake-animation.mat-badge>span.mat-badge-content{color:#77c425;background-color:#77c425;z-index:-1}@media print{.main-panel[_ngcontent-%COMP%]{padding:0!important}}"]});let e=n;return e})();var h=(e,n)=>k(null,null,function*(){let t=s(me),i=s(se),a=e.data?.roles||[],l=e.data?.redirectUrl||"/";return a.length===0||(yield Le(t,a))?!0:(i.navigate([l]),!1)});function Le(e,n){return k(this,null,function*(){let t=n.map(a=>e.hasPermission(a));return(yield Promise.all(t)).some(a=>a)})}var Ne=[{path:"",component:Me,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"profile",loadChildren:()=>import("./chunk-IXURR6VG.js").then(e=>e.routes),canActivate:[c],data:{title:"My Profile"}},{path:"dashboard",loadChildren:()=>import("./chunk-IQX2CRL5.js").then(e=>e.routes),canActivate:[c,h,_e],data:{title:"Dashboard",roles:[o.DashboardView],redirectUrl:"/menu/products"}},{path:"products",loadChildren:()=>import("./chunk-XCJ5XRFI.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Products",roles:[o.ProductView],redirectUrl:"/menu/inventory"}},{path:"inventory",loadChildren:()=>import("./chunk-2DZHA445.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Inventory",roles:[o.InventoryView],redirectUrl:"/menu/price"}},{path:"price",loadChildren:()=>import("./chunk-OUYOKQ57.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Price",roles:[o.PriceView],redirectUrl:"/menu/Order"}},{path:"order",loadChildren:()=>import("./chunk-UQ7PDZO3.js").then(e=>e.routes),canActivate:[c],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("./chunk-CZICXKFA.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Report",roles:[o.Report],redirectUrl:"/menu/Logistic"}},{path:"Logistic",loadComponent(){return import("./chunk-7AJN7ECH.js").then(e=>e.LogisticComponent)},canActivate:[c,h],data:{title:"Logistic",roles:[o.LogisticView],redirectUrl:"/menu/channel"}},{path:"channel",loadChildren:()=>import("./chunk-KUPGF23P.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Marketplace",roles:[o.ChannelView],redirectUrl:"/menu/log"}},{path:"log",loadChildren:()=>import("./chunk-FUBZ75C7.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Orders",roles:[o.DevView]}},{path:"users",loadChildren:()=>import("./chunk-FDGH6XKK.js").then(e=>e.userRoutes),canActivate:[c,h],data:{title:"Users",roles:[o.UserView],redirectUrl:"/menu/dashboard"}},{path:"json-api",loadChildren:()=>import("./chunk-A4UF2QH6.js").then(e=>e.routes),canActivate:[c],data:{title:"Json API"}}]}],ye=(()=>{let n=class n{};n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=_({type:n}),n.\u0275inj=b({imports:[I.forChild(Ne),I]});let e=n;return e})();var Tt=(()=>{let n=class n{};n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=_({type:n}),n.\u0275inj=b({providers:[W],imports:[X,ye,be,xe,pe.forChild()]});let e=n;return e})();export{Tt as MenuModule};
1
+ import{a as _e}from"./chunk-CUSAKJLC.js";import"./chunk-4VNQYYVV.js";import{a as c}from"./chunk-WH76SMZT.js";import{b as fe}from"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import{a as he}from"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as be}from"./chunk-UEXWQT5J.js";import{c as ue}from"./chunk-IZZY74PN.js";import{B as ae,H as oe,I as A,l as Y,m as ee,q as te,u as ie,v as ne}from"./chunk-O3BS4AC6.js";import{a as o}from"./chunk-ZSUWHVKX.js";import{b as Z,h as ge}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{a as me,b as ce,c as pe}from"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as re,d as se,e as le,f as de,g as I}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as X,q as K,w as Q,y as W}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Da as N,Fd as P,Hb as M,Ib as _,Jb as j,Kc as y,Mc as E,Nb as S,Nc as g,Oc as w,Pc as x,Ra as U,ac as v,bc as G,cc as C,ec as H,fc as q,gc as J,hc as u,ic as r,id as T,jc as m,jd as D,kc as f,mb as V,na as b,ob as d,ra as s,ub as F,v as L,wc as z,yc as p,zb as $}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{i as k}from"./chunk-66YHNWRR.js";var O=class{constructor(){this.menus=[{Icon:"fa-solid fa-chart-pie",Title:"Dashboard",Url:"/menu/dashboard",Roles:[o.DashboardView]},{Icon:"fas fa-tag",Title:"Products",Url:"/menu/products",Roles:[o.ProductView]},{Icon:"fas fa-archive",Title:"Inventory",Url:"/menu/inventory",Roles:[o.InventoryView]},{Icon:"fas fa-money-bill-alt",Title:"Price",Url:"/menu/price",Roles:[o.PriceView]},{Icon:"fas fa-shopping-cart",Title:"Order",Url:"/menu/order",Roles:[o.OrderView]},{Icon:"fas fa-cog",Title:"Channel",Url:"/menu/channel",Roles:[o.ChannelView]},{Icon:"fa-solid fa-user",Title:"Users",Url:"/menu/users",Roles:[o.UserView]},{Icon:"fas fa-clipboard-list",Title:"Sync Logs",Url:"/menu/sync-log",Roles:[o.Report]},{Icon:"fas fa-dolly",Title:"Logistic",Url:"/menu/Logistic",Roles:[o.LogisticView]},{Icon:"fas fa-file-alt",Title:"Developer",Url:"/menu/log",Roles:[o.DevView]},{Icon:"fa-solid fa-file-brackets-curly",Title:"JSON Api",Url:"/menu/json-api",Roles:[o.JsonApiView]}]}get getMenu(){return this.menus}};var ve="mat-badge-content",we=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],decls:0,vars:0,template:function(i,a){},styles:[`.mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color, var(--mat-sys-error));color:var(--mat-badge-text-color, var(--mat-sys-on-error));font-family:var(--mat-badge-text-font, var(--mat-sys-label-small-font));font-weight:var(--mat-badge-text-weight, var(--mat-sys-label-small-weight));border-radius:var(--mat-badge-container-shape, var(--mat-sys-corner-full))}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}@media(forced-colors: active){.mat-badge-content{outline:solid 1px;border-radius:0}}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color, color-mix(in srgb, var(--mat-sys-error) 38%, transparent));color:var(--mat-badge-disabled-state-text-color, var(--mat-sys-on-error))}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size, unset);height:var(--mat-badge-legacy-small-size-container-size, unset);min-width:var(--mat-badge-small-size-container-size, 6px);min-height:var(--mat-badge-small-size-container-size, 6px);line-height:var(--mat-badge-small-size-line-height, 6px);padding:var(--mat-badge-small-size-container-padding, 0);font-size:var(--mat-badge-small-size-text-size, 0);margin:var(--mat-badge-small-size-container-offset, -6px 0)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset, -6px)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size, unset);height:var(--mat-badge-legacy-container-size, unset);min-width:var(--mat-badge-container-size, 16px);min-height:var(--mat-badge-container-size, 16px);line-height:var(--mat-badge-line-height, 16px);padding:var(--mat-badge-container-padding, 0 4px);font-size:var(--mat-badge-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-container-offset, -12px 0)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset, -12px)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size, unset);height:var(--mat-badge-legacy-large-size-container-size, unset);min-width:var(--mat-badge-large-size-container-size, 16px);min-height:var(--mat-badge-large-size-container-size, 16px);line-height:var(--mat-badge-large-size-line-height, 16px);padding:var(--mat-badge-large-size-container-padding, 0 4px);font-size:var(--mat-badge-large-size-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-large-size-container-offset, -12px 0)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset, -12px)}
2
+ `],encapsulation:2,changeDetection:0})}return e})(),Ce=(()=>{class e{_ngZone=s(F);_elementRef=s(U);_ariaDescriber=s(ae);_renderer=s($);_animationsDisabled=oe();_idGenerator=s(ne);get color(){return this._color}set color(t){this._setColor(t),this._color=t}_color="primary";overlap=!0;disabled;position="above after";get content(){return this._content}set content(t){this._updateRenderedContent(t)}_content;get description(){return this._description}set description(t){this._updateDescription(t)}_description;size="medium";hidden;_badgeElement;_inlineBadgeDescription;_isInitialized=!1;_interactivityChecker=s(te);_document=s(N);constructor(){let t=s(Y);t.load(we),t.load(ee)}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let t=this._renderer.createElement("span"),i="mat-badge-active";return t.setAttribute("id",this._idGenerator.getId("mat-badge-content-")),t.setAttribute("aria-hidden","true"),t.classList.add(ve),this._animationsDisabled&&t.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(t),typeof requestAnimationFrame=="function"&&!this._animationsDisabled?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{t.classList.add(i)})}):t.classList.add(i),t}_updateRenderedContent(t){let i=`${t??""}`.trim();this._isInitialized&&i&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=i),this._content=i}_updateDescription(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!t||this._isHostInteractive())&&this._removeInlineDescription(),this._description=t,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,t):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(t){let i=this._elementRef.nativeElement.classList;i.remove(`mat-badge-${this._color}`),t&&i.add(`mat-badge-${t}`)}_clearExistingBadges(){let t=this._elementRef.nativeElement.querySelectorAll(`:scope > .${ve}`);for(let i of Array.from(t))i!==this._badgeElement&&i.remove()}static \u0275fac=function(i){return new(i||e)};static \u0275dir=j({type:e,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(i,a){i&2&&y("mat-badge-overlap",a.overlap)("mat-badge-above",a.isAbove())("mat-badge-below",!a.isAbove())("mat-badge-before",!a.isAfter())("mat-badge-after",a.isAfter())("mat-badge-small",a.size==="small")("mat-badge-medium",a.size==="medium")("mat-badge-large",a.size==="large")("mat-badge-hidden",a.hidden||!a.content)("mat-badge-disabled",a.disabled)},inputs:{color:[0,"matBadgeColor","color"],overlap:[2,"matBadgeOverlap","overlap",P],disabled:[2,"matBadgeDisabled","disabled",P],position:[0,"matBadgePosition","position"],content:[0,"matBadge","content"],description:[0,"matBadgeDescription","description"],size:[0,"matBadgeSize","size"],hidden:[2,"matBadgeHidden","hidden",P]}})}return e})(),xe=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=_({type:e});static \u0275inj=b({imports:[ie,A,A]})}return e})();function Oe(e,n){if(e&1&&(r(0,"p",21),g(1),m()),e&2){let t=p(3).$implicit;d(),x(" ",t.Title," ")}}function ke(e,n){if(e&1&&(r(0,"p"),g(1),m()),e&2){let t=p(3).$implicit;d(),w(t.Title)}}function Se(e,n){if(e&1&&(r(0,"a",18),f(1,"i"),v(2,Oe,2,1,"p",21)(3,ke,2,1,"p"),m()),e&2){let t=p(2).$implicit;u("href",t.Url,V),d(),E(t.Icon),d(),C(t.Badge?2:3)}}function ze(e,n){if(e&1&&S(0,Se,4,4,"a",20),e&2){let t=p().$implicit;u("ngxPermissionsOnly",t.Roles)}}function Ee(e,n){if(e&1&&(r(0,"p",21),g(1),m()),e&2){let t=p(4).$implicit;d(),x(" ",t.Title," ")}}function Te(e,n){if(e&1&&(r(0,"p"),g(1),m()),e&2){let t=p(4).$implicit;d(),w(t.Title)}}function De(e,n){if(e&1&&(v(0,Ee,2,1,"p",21),T(1,"async"),G(2,Te,2,1,"p")),e&2){let t=p(4);C(D(1,1,t.notifications$)!=0?0:2)}}function Ae(e,n){if(e&1&&(r(0,"p"),g(1),m()),e&2){let t=p(3).$implicit;d(),w(t.Title)}}function Ie(e,n){if(e&1&&(r(0,"a",19),f(1,"i"),v(2,De,3,3)(3,Ae,2,1,"p"),m()),e&2){let t=p(2).$implicit,i=p();u("matTooltip",i.isCollapseSidebar?t.Title:"")("routerLink",t.Url),d(),E(t.Icon),d(),C(t.Badge?2:3)}}function Be(e,n){if(e&1&&S(0,Ie,4,5,"a",22),e&2){let t=p().$implicit;u("ngxPermissionsOnly",t.Roles)}}function Re(e,n){if(e&1&&(r(0,"li",16),v(1,ze,1,1,"a",18)(2,Be,1,1,"a",19),m()),e&2){let t=n.$implicit;d(),C(t.ExternalLink?1:2)}}var Me=(()=>{let n=class n{constructor(){this.toggleSidebarService=s(he),this.notificationService=s(fe),this.decodeTokenService=s(Z),this.authService=s(ge),this.Menu={};let i=this.decodeTokenService;this.isCollapseSidebar=!1,this.token=i.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new O().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(L(i=>i.length))}onLogout(){this.authService.logout()}onCallapseSidebar(){this.isCollapseSidebar=!this.isCollapseSidebar,this.storeName=this.token.StoreName,this.isCollapseSidebar&&(this.storeName=this.getInitialTitle(this.token.StoreName))}getInitialTitle(i){if(i){let a,l=i.split(" ");return l.length==1?a=l[0].substring(0,2):a=l.shift().charAt(0)+l.pop().charAt(0),a}}};n.\u0275fac=function(a){return new(a||n)},n.\u0275cmp=M({type:n,selectors:[["app-menu"]],standalone:!1,decls:29,vars:8,consts:[[1,"wrapper"],["data-color","green",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-md-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fas","cursor",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-bs-toggle","dropdown","aria-expanded","false",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center","cursor-pointer"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],["routerLink","/menu/profile",1,"dropdown-item","h5",2,"cursor","pointer"],["aria-hidden","true",1,"fa-user","fas"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fas","fa-sign-out-alt"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active"],[1,"main-panel"],["target","_blank",1,"nav-link","position-relative","d-block","changelog",3,"href"],["matTooltipPosition","right",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"],["class","nav-link position-relative d-block changelog","target","_blank",3,"href",4,"ngxPermissionsOnly"],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation"],["class","nav-link position-relative d-block","matTooltipPosition","right",3,"matTooltip","routerLink",4,"ngxPermissionsOnly"]],template:function(a,l){a&1&&(r(0,"div",0),T(1,"async"),r(2,"div",1)(3,"button",2),z("click",function(){return l.onCallapseSidebar()}),f(4,"i",3),m(),r(5,"div",4)(6,"div",5)(7,"a",6),g(8),m(),r(9,"div",7)(10,"div",8),g(11),m(),f(12,"div",9),r(13,"a",10),f(14,"i",11),g(15,"\xA0 "),r(16,"span"),g(17,"My Profile"),m()(),r(18,"a",12),z("click",function(){return l.onLogout()}),f(19,"i",13),g(20,"\xA0 "),r(21,"span"),g(22," Log Out"),m()()()()(),r(23,"div",14)(24,"ul",15),q(25,Re,3,1,"li",16,H),m()()(),r(27,"div",17),f(28,"router-outlet"),m()()),a&2&&(y("nav-open",D(1,6,l.toggleState$)),d(2),u("ngClass",l.isCollapseSidebar?"collapses":""),d(2),u("ngClass",l.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),d(4),x(" ",l.storeName," "),d(3),x(" ",l.token==null?null:l.token.LID," "),d(14),J(l.Menu))},dependencies:[K,re,le,de,ue,Ce,ce,Q],styles:["@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}.full-container[_ngcontent-%COMP%]{padding-top:0!important}} p.shake-animation.mat-badge>span.mat-badge-content{animation:_ngcontent-%COMP%_shake-animation 4.72s ease infinite;font-size:12px;transform-origin:50% 50%;right:-14px!important}@keyframes _ngcontent-%COMP%_shake-animation{0%{transform:translate(0)}1.78571%{transform:translate(5px)}3.57143%{transform:translate(0)}5.35714%{transform:translate(5px)}7.14286%{transform:translate(0)}8.92857%{transform:translate(5px)}10.71429%{transform:translate(0)}to{transform:translate(0)}} .changelog:visited p.shake-animation.mat-badge>span.mat-badge-content{color:#77c425;background-color:#77c425;z-index:-1}@media print{.main-panel[_ngcontent-%COMP%]{padding:0!important}}"]});let e=n;return e})();var h=(e,n)=>k(null,null,function*(){let t=s(me),i=s(se),a=e.data?.roles||[],l=e.data?.redirectUrl||"/";return a.length===0||(yield Le(t,a))?!0:(i.navigate([l]),!1)});function Le(e,n){return k(this,null,function*(){let t=n.map(a=>e.hasPermission(a));return(yield Promise.all(t)).some(a=>a)})}var Ne=[{path:"",component:Me,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"profile",loadChildren:()=>import("./chunk-IXURR6VG.js").then(e=>e.routes),canActivate:[c],data:{title:"My Profile"}},{path:"dashboard",loadChildren:()=>import("./chunk-IQX2CRL5.js").then(e=>e.routes),canActivate:[c,h,_e],data:{title:"Dashboard",roles:[o.DashboardView],redirectUrl:"/menu/products"}},{path:"products",loadChildren:()=>import("./chunk-SLQ42VND.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Products",roles:[o.ProductView],redirectUrl:"/menu/inventory"}},{path:"inventory",loadChildren:()=>import("./chunk-XAL6YLNQ.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Inventory",roles:[o.InventoryView],redirectUrl:"/menu/price"}},{path:"price",loadChildren:()=>import("./chunk-OJI34QN5.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Price",roles:[o.PriceView],redirectUrl:"/menu/Order"}},{path:"order",loadChildren:()=>import("./chunk-E6W25RW5.js").then(e=>e.routes),canActivate:[c],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("./chunk-J4RDYEJC.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Report",roles:[o.Report],redirectUrl:"/menu/Logistic"}},{path:"Logistic",loadComponent(){return import("./chunk-6IZWIEUD.js").then(e=>e.LogisticComponent)},canActivate:[c,h],data:{title:"Logistic",roles:[o.LogisticView],redirectUrl:"/menu/channel"}},{path:"channel",loadChildren:()=>import("./chunk-TLTFNFAB.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Marketplace",roles:[o.ChannelView],redirectUrl:"/menu/log"}},{path:"log",loadChildren:()=>import("./chunk-OMY5ASFA.js").then(e=>e.routes),canActivate:[c,h],data:{title:"Orders",roles:[o.DevView]}},{path:"users",loadChildren:()=>import("./chunk-CIVDQKQZ.js").then(e=>e.userRoutes),canActivate:[c,h],data:{title:"Users",roles:[o.UserView],redirectUrl:"/menu/dashboard"}},{path:"json-api",loadChildren:()=>import("./chunk-Q5IVQP3E.js").then(e=>e.routes),canActivate:[c],data:{title:"Json API"}}]}],ye=(()=>{let n=class n{};n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=_({type:n}),n.\u0275inj=b({imports:[I.forChild(Ne),I]});let e=n;return e})();var Tt=(()=>{let n=class n{};n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=_({type:n}),n.\u0275inj=b({providers:[W],imports:[X,ye,be,xe,pe.forChild()]});let e=n;return e})();export{Tt as MenuModule};
@@ -1 +1 @@
1
- import{a as vt}from"./chunk-TYSM3R5E.js";import"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{e as ft}from"./chunk-G3KVHCET.js";import"./chunk-TQROQOXU.js";import{c as Pt,d as yt}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import{a as gt}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import"./chunk-BZWZ64N5.js";import{a as bt}from"./chunk-DLHIDOS3.js";import{a as St}from"./chunk-27DIE2YS.js";import{a as xt}from"./chunk-WCX3T6LK.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-GD6ZN56B.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as Ct}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as ut}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as ht}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as W}from"./chunk-ZSUWHVKX.js";import{h as st}from"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as j}from"./chunk-AGBJEXIM.js";import{b as lt,c as ct}from"./chunk-NB2H6KA7.js";import{c as N}from"./chunk-UPRDDI4K.js";import{A as mt,b as dt,h as pt,m as _t}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as at,e as D}from"./chunk-D6JH2KV4.js";import{d as rt}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as ot,w as it}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as V,Hb as tt,Ia as X,K as H,Nb as A,Nc as d,Oc as nt,Pc as y,Rc as B,Sc as $,Tc as U,X as K,Z as q,ac as _,ad as E,bc as et,ca as J,cc as m,ea as k,ec as F,f as z,fa as Z,fc as I,g as R,gc as T,hc as p,ic as r,id as S,jc as c,jd as P,kc as C,ma as Q,mb as v,ob as l,oc as O,pc as M,qa as Y,ra as g,rc as f,v as w,wc as x,ya as h,yc as s,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Nt=(()=>{let o=class o{get footerPageNumber(){return this._footerPageNumber}set footerPageNumber(t){this._footerPageNumber=t}get hideCount(){return this._hideCount}set hideCount(t){this._hideCount=t}get disableNextButton(){return this._disableNextButton}set disableNextButton(t){this._disableNextButton=t}get goToLastPage(){return this._goToLastPage}set goToLastPage(t){this._goToLastPage=t}constructor(t){this.http=t,this.pagination$=new R(null),this.destroy$=new z,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this.footerPageNumber=t.PageNumber}setPaginationButtonState(t,e){e==0?this.disableNextButton=!0:this.disableNextButton=!(e<t.RowCount*t.PageNumber)}reloadPagination(t){N.IsEmpty(t.PageNumber)&&(t.PageNumber=1),this.pagination$.next(t),this.hideCount=!0,this.goToLastPage=!1}getAllData(t,e){t.RowCount=e,this.pagination$.next(t),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new R(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe(J(this.destroy$),V(t=>t!=null),H(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(w(e=>e.Data))),Z(this.pagination$),K((t,e)=>{let[a,b]=t,[G]=e;return b.PageNumber==1?[G,b]:[a.concat(G),b]}),k(([t,e])=>{this.setPageNumberFooter(e),this.setPaginationButtonState(e,t.length)}),w(([t])=>t),q())}};o.\u0275fac=function(e){return new(e||o)(Y(D))},o.\u0275prov=Q({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var L=i=>[i];function Ft(i,o){if(i&1){let n=f();r(0,"button",11),x("click",function(){h(n);let e=s(3);return u(e.uploadMultipleProduct())}),C(1,"i",12),d(2),c()}if(i&2){let n=s(3);l(2),y(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function It(i,o){if(i&1&&(O(0),_(1,Ft,3,1,"button",10),M()),i&2){let n=s(2);l(),m(n.hasSelectionProduct?1:-1)}}function Tt(i,o){if(i&1){let n=f();O(0),r(1,"button",13),x("click",function(){h(n);let e=s(2);return u(e.openScanDialog())}),C(2,"i",14),d(3," Scan Channel "),c(),M()}}function Ot(i,o){i&1&&(O(0),C(1,"th",21),M())}function Mt(i,o){if(i&1){let n=f();r(0,"td",27)(1,"input",28),U("ngModelChange",function(e){h(n);let a=s(3).$implicit;return $(a.selected,e)||(a.selected=e),u(e)}),x("ngModelChange",function(){h(n);let e=s(4),a=s(3);return u(a.onSelectProduct(e))}),c()()}if(i&2){let n=s(3).$implicit;p("rowSpan",n==null?null:n.Variants.length),l(),B("ngModel",n.selected)}}function Et(i,o){if(i&1&&(O(0),_(1,Mt,2,2,"td",27),M()),i&2){let n=s().$index;l(),m(n==0?1:-1)}}function Vt(i,o){if(i&1){let n=f();r(0,"img",35),x("click",function(e){h(n);let a=s(3).$implicit,b=s(4);return u(b.onZoomImage(e,a==null?null:a.ImageUrl))}),c()}if(i&2){let n=s(3).$implicit;p("src",n==null?null:n.ImageUrl,v)}}function kt(i,o){i&1&&C(0,"img",31)}function At(i,o){if(i&1&&(r(0,"td",27)(1,"div",29),_(2,Vt,1,1,"img",30)(3,kt,1,0,"img",31),c()(),r(4,"td",32)(5,"h4",33)(6,"span",34),d(7),c()()()),i&2){let n=s(2).$implicit;p("rowSpan",n==null?null:n.Variants.length),l(2),m(n!=null&&n.ImageUrl?2:3),l(2),p("rowSpan",n==null?null:n.Variants.length),l(2),p("matTooltip",(n==null||n.Name==null?null:n.Name.length)>50?n==null?null:n.Name:""),l(),y(" ",n==null?null:n.Name," ")}}function Bt(i,o){if(i&1&&(r(0,"div")(1,"a",23),C(2,"img",36),c()()),i&2){let n=o.$implicit;l(),p("href",n.URL,v),l(),p("src",n.Img,v)("matTooltip",n.Name)}}function $t(i,o){if(i&1&&(r(0,"div"),C(1,"img",36),c()),i&2){let n=o.$implicit;l(),p("src",n.Img,v)("matTooltip",n.Name)}}function Dt(i,o){if(i&1&&(r(0,"tr"),A(1,Et,2,1,"ng-container",2),_(2,At,8,5),r(3,"td"),d(4),c(),r(5,"td")(6,"span"),d(7),c(),r(8,"span",22)(9,"a",23),C(10,"i",24),c()()(),r(11,"td",25)(12,"div",26),I(13,Bt,3,3,"div",null,F),c()(),r(15,"td",25)(16,"div",26),I(17,$t,2,2,"div",null,F),c()()()),i&2){let n=o.$implicit,t=o.$index,e=s(5);l(),p("ngxPermissionsOnly",E(5,L,e.uploadProductRole)),l(),m(t==0?2:-1),l(2),y(" ",n.Name," "),l(3),y(" ",n.Code," "),l(2),p("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),v),l(4),T(n==null?null:n.Available),l(4),T(n==null?null:n.NotAvailable)}}function Lt(i,o){if(i&1&&I(0,Dt,19,7,"tr",null,F),i&2){let n=o.$implicit;T(n.Variants)}}function Rt(i,o){i&1&&(r(0,"tbody"),I(1,Lt,2,0,null,null,F),c()),i&2&&(l(),T(o))}function Ut(i,o){if(i&1&&(r(0,"div",8)(1,"table",15)(2,"thead",16)(3,"tr"),A(4,Ot,2,0,"ng-container",2),r(5,"th",17),d(6," Product "),c(),r(7,"th",18),d(8,"Variant"),c(),r(9,"th",18),d(10,"SKU"),c(),r(11,"th",19),d(12,"Available In"),c(),r(13,"th",20),d(14,"Not Available In"),c()()(),_(15,Rt,3,0,"tbody"),S(16,"async"),c()()),i&2){let n,t=s(2);l(4),p("ngxPermissionsOnly",E(4,L,t.uploadProductRole)),l(11),m((n=P(16,2,t.data$))?15:-1,n)}}function jt(i,o){i&1&&(r(0,"div",9),C(1,"app-empty-state"),c())}function Wt(i,o){if(i&1){let n=f();r(0,"span",44),x("click",function(){h(n);let e=s(4);return u(e.getRowCount())}),r(1,"i",45),d(2,"?"),c()()}}function Gt(i,o){if(i&1&&(r(0,"span"),d(1),S(2,"number"),c()),i&2){let n=o;l(),nt(P(2,1,n==null?null:n.Count))}}function zt(i,o){if(i&1){let n=f();r(0,"a",46),x("click",function(){h(n);let e=s(4);return u(e.onNextPage())}),C(1,"i",47),d(2," Next"),c()}}function Ht(i,o){if(i&1){let n=f();r(0,"a",48),x("click",function(){h(n);let e=s(4);return u(e.onLastPage())}),C(1,"i",49),d(2," Last"),c()}}function Kt(i,o){if(i&1&&(r(0,"div",37)(1,"div",38)(2,"div",39),d(3),S(4,"number"),_(5,Wt,3,0,"span",40),_(6,Gt,3,3,"span"),S(7,"async"),d(8),c()(),r(9,"div",41),_(10,zt,3,0,"a",42),_(11,Ht,3,0,"a",43),c()()),i&2){let n,t=s(),e=s(2);l(3),y(" Showing 1 - ",P(4,6,t==null?null:t.length)," of "),l(2),m(e.paginationService.hideCount?5:-1),l(),m((n=!e.paginationService.hideCount&&P(7,8,e.rowCount$))?6:-1,n),l(2),y(" records ~ ",e.paginationService.footerPageNumber," Page "),l(2),m(e.paginationService.disableNextButton&&!e.paginationService.goToLastPage?10:-1),l(),m(e.paginationService.disableNextButton&&!e.paginationService.goToLastPage?11:-1)}}function qt(i,o){if(i&1&&_(0,Kt,12,10,"div",37),i&2){let n=o;m((n==null?null:n.length)>0?0:-1)}}function Jt(i,o){if(i&1){let n=f();r(0,"mainpanel",1),x("onSubmit",function(e){h(n);let a=s();return u(a.searchProduct(e))}),r(1,"actions"),A(2,It,2,1,"ng-container",2)(3,Tt,4,0,"ng-container",2),r(4,"button",3),x("click",function(){h(n);let e=s();return u(e.openExportDialog())}),C(5,"i",4),r(6,"span"),d(7,"Export"),c()()(),r(8,"filters")(9,"filter-query-type",5),U("numberFilterComparatorChange",function(e){h(n);let a=s();return $(a.searchFilter.NumberFilterComparator,e)||(a.searchFilter.NumberFilterComparator=e),u(e)})("searchTypeChange",function(e){h(n);let a=s();return $(a.searchFilter.SearchType,e)||(a.searchFilter.SearchType=e),u(e)}),c()(),r(10,"content")(11,"div",6)(12,"div",7),_(13,Ut,17,6,"div",8),S(14,"async"),et(15,jt,2,0,"div",9),c(),_(16,qt,1,1),S(17,"async"),c()()()}if(i&2){let n,t,e=o,a=s();p("searchBoxPlaceHolder",a.searchPlaceholder()),l(2),p("ngxPermissionsOnly",E(13,L,a.uploadProductRole)),l(),p("ngxPermissionsOnly",E(15,L,a.scanProductRole)),l(6),p("numberFilterComparatorOptions",e==null||e.Options==null?null:e.Options.SearchComparatorTypeOptions),B("numberFilterComparator",a.searchFilter.NumberFilterComparator),p("searchTypeOptions",e==null||e.Options==null?null:e.Options.SearchSKUOnlyOrSKUNameOptions),B("searchType",a.searchFilter.SearchType),l(4),m(((n=P(14,9,a.data$))==null?null:n.length)>0?13:15),l(3),m((t=P(17,11,a.data$))?16:-1,t)}}var Ie=(()=>{let o=class o{constructor(){this.http=g(D),this.dialog=g(ut),this.toastr=g(at),this.route=g(rt),this.productService=g(xt),this.paginationService=g(Nt),this.biggerPictureService=g(bt),this.authService=g(st),this.uploadProductService=g(ft),this.placeholderService=g(Pt),this.loaderAPI="product/Load",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.scanProductRole=W.ProductScan,this.uploadProductRole=W.ProductUpload,this.searchPlaceholder=X("Search ...");let t=this.authService;this.channelOptions=t.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(k(t=>{this.searchFilter=t.Filter,this.paginationService.reloadPagination(t.Filter),this.initSearchPlaceholder()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}iniData(){this.data$=this.paginationService.data$.pipe(w(t=>(t=t.map(e=>(e.Variants=e.Variants.map(a=>(a.Available=this.productService.sortChannel(a.Available),a.NotAvailable=this.productService.sortChannel(a.NotAvailable),a.Available=this.assignLogoChannel(a.Available),a.NotAvailable=this.assignLogoChannel(a.NotAvailable),a)),e.Channel=e?.Variants[0]?.Available,e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=N.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter),this.initSearchPlaceholder()}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=N.GuidEMpty,this.dialog.open(gt,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(V(a=>N.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.searchFilter.Async=a.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1;let t={text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.rowCount$=this.http.post(j.GetNotInChannelRowCount,t)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){let t={text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.http.post(j.GetNotInChannelRowCount,t).subscribe({next:e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e.Count)}})}onZoomImage(t,e){this.biggerPictureService.openBiggerPicture(t,e)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(vt,{data:{title:"Export Not In Channel",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}};o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=tt({type:o,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"searchBoxPlaceHolder"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[2,"width","10px"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[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"],[1,"btn-group"],["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"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,a){if(e&1&&(_(0,Jt,18,17,"mainpanel",0),S(1,"async")),e&2){let b;m((b=P(1,1,a.loader$))?0:-1,b)}},dependencies:[Ct,ct,lt,yt,mt,dt,pt,_t,ht,St,it,ot],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});let i=o;return i})();export{Ie as NotInChannelComponent};
1
+ import{a as vt}from"./chunk-TYSM3R5E.js";import"./chunk-JKRELT7N.js";import"./chunk-WTHYLNPX.js";import{e as ft}from"./chunk-HZTKN5RX.js";import"./chunk-TQROQOXU.js";import{c as Pt,d as yt}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import{a as gt}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import"./chunk-BZWZ64N5.js";import{a as bt}from"./chunk-DLHIDOS3.js";import{a as St}from"./chunk-27DIE2YS.js";import{a as xt}from"./chunk-LCN52IJT.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as Ct}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as ut}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as ht}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as W}from"./chunk-ZSUWHVKX.js";import{h as st}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as j}from"./chunk-AGBJEXIM.js";import{b as lt,c as ct}from"./chunk-NB2H6KA7.js";import{c as N}from"./chunk-UPRDDI4K.js";import{A as mt,b as dt,h as pt,m as _t}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as at,e as D}from"./chunk-D6JH2KV4.js";import{d as rt}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as ot,w as it}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as V,Hb as tt,Ia as X,K as H,Nb as A,Nc as d,Oc as nt,Pc as y,Rc as B,Sc as $,Tc as U,X as K,Z as q,ac as _,ad as E,bc as et,ca as J,cc as m,ea as k,ec as F,f as z,fa as Z,fc as I,g as R,gc as T,hc as p,ic as r,id as S,jc as c,jd as P,kc as C,ma as Q,mb as v,ob as l,oc as O,pc as M,qa as Y,ra as g,rc as f,v as w,wc as x,ya as h,yc as s,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Nt=(()=>{let o=class o{get footerPageNumber(){return this._footerPageNumber}set footerPageNumber(t){this._footerPageNumber=t}get hideCount(){return this._hideCount}set hideCount(t){this._hideCount=t}get disableNextButton(){return this._disableNextButton}set disableNextButton(t){this._disableNextButton=t}get goToLastPage(){return this._goToLastPage}set goToLastPage(t){this._goToLastPage=t}constructor(t){this.http=t,this.pagination$=new R(null),this.destroy$=new z,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this.footerPageNumber=t.PageNumber}setPaginationButtonState(t,e){e==0?this.disableNextButton=!0:this.disableNextButton=!(e<t.RowCount*t.PageNumber)}reloadPagination(t){N.IsEmpty(t.PageNumber)&&(t.PageNumber=1),this.pagination$.next(t),this.hideCount=!0,this.goToLastPage=!1}getAllData(t,e){t.RowCount=e,this.pagination$.next(t),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new R(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe(J(this.destroy$),V(t=>t!=null),H(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(w(e=>e.Data))),Z(this.pagination$),K((t,e)=>{let[a,b]=t,[G]=e;return b.PageNumber==1?[G,b]:[a.concat(G),b]}),k(([t,e])=>{this.setPageNumberFooter(e),this.setPaginationButtonState(e,t.length)}),w(([t])=>t),q())}};o.\u0275fac=function(e){return new(e||o)(Y(D))},o.\u0275prov=Q({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var L=i=>[i];function Ft(i,o){if(i&1){let n=f();r(0,"button",11),x("click",function(){h(n);let e=s(3);return u(e.uploadMultipleProduct())}),C(1,"i",12),d(2),c()}if(i&2){let n=s(3);l(2),y(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function It(i,o){if(i&1&&(O(0),_(1,Ft,3,1,"button",10),M()),i&2){let n=s(2);l(),m(n.hasSelectionProduct?1:-1)}}function Tt(i,o){if(i&1){let n=f();O(0),r(1,"button",13),x("click",function(){h(n);let e=s(2);return u(e.openScanDialog())}),C(2,"i",14),d(3," Scan Channel "),c(),M()}}function Ot(i,o){i&1&&(O(0),C(1,"th",21),M())}function Mt(i,o){if(i&1){let n=f();r(0,"td",27)(1,"input",28),U("ngModelChange",function(e){h(n);let a=s(3).$implicit;return $(a.selected,e)||(a.selected=e),u(e)}),x("ngModelChange",function(){h(n);let e=s(4),a=s(3);return u(a.onSelectProduct(e))}),c()()}if(i&2){let n=s(3).$implicit;p("rowSpan",n==null?null:n.Variants.length),l(),B("ngModel",n.selected)}}function Et(i,o){if(i&1&&(O(0),_(1,Mt,2,2,"td",27),M()),i&2){let n=s().$index;l(),m(n==0?1:-1)}}function Vt(i,o){if(i&1){let n=f();r(0,"img",35),x("click",function(e){h(n);let a=s(3).$implicit,b=s(4);return u(b.onZoomImage(e,a==null?null:a.ImageUrl))}),c()}if(i&2){let n=s(3).$implicit;p("src",n==null?null:n.ImageUrl,v)}}function kt(i,o){i&1&&C(0,"img",31)}function At(i,o){if(i&1&&(r(0,"td",27)(1,"div",29),_(2,Vt,1,1,"img",30)(3,kt,1,0,"img",31),c()(),r(4,"td",32)(5,"h4",33)(6,"span",34),d(7),c()()()),i&2){let n=s(2).$implicit;p("rowSpan",n==null?null:n.Variants.length),l(2),m(n!=null&&n.ImageUrl?2:3),l(2),p("rowSpan",n==null?null:n.Variants.length),l(2),p("matTooltip",(n==null||n.Name==null?null:n.Name.length)>50?n==null?null:n.Name:""),l(),y(" ",n==null?null:n.Name," ")}}function Bt(i,o){if(i&1&&(r(0,"div")(1,"a",23),C(2,"img",36),c()()),i&2){let n=o.$implicit;l(),p("href",n.URL,v),l(),p("src",n.Img,v)("matTooltip",n.Name)}}function $t(i,o){if(i&1&&(r(0,"div"),C(1,"img",36),c()),i&2){let n=o.$implicit;l(),p("src",n.Img,v)("matTooltip",n.Name)}}function Dt(i,o){if(i&1&&(r(0,"tr"),A(1,Et,2,1,"ng-container",2),_(2,At,8,5),r(3,"td"),d(4),c(),r(5,"td")(6,"span"),d(7),c(),r(8,"span",22)(9,"a",23),C(10,"i",24),c()()(),r(11,"td",25)(12,"div",26),I(13,Bt,3,3,"div",null,F),c()(),r(15,"td",25)(16,"div",26),I(17,$t,2,2,"div",null,F),c()()()),i&2){let n=o.$implicit,t=o.$index,e=s(5);l(),p("ngxPermissionsOnly",E(5,L,e.uploadProductRole)),l(),m(t==0?2:-1),l(2),y(" ",n.Name," "),l(3),y(" ",n.Code," "),l(2),p("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),v),l(4),T(n==null?null:n.Available),l(4),T(n==null?null:n.NotAvailable)}}function Lt(i,o){if(i&1&&I(0,Dt,19,7,"tr",null,F),i&2){let n=o.$implicit;T(n.Variants)}}function Rt(i,o){i&1&&(r(0,"tbody"),I(1,Lt,2,0,null,null,F),c()),i&2&&(l(),T(o))}function Ut(i,o){if(i&1&&(r(0,"div",8)(1,"table",15)(2,"thead",16)(3,"tr"),A(4,Ot,2,0,"ng-container",2),r(5,"th",17),d(6," Product "),c(),r(7,"th",18),d(8,"Variant"),c(),r(9,"th",18),d(10,"SKU"),c(),r(11,"th",19),d(12,"Available In"),c(),r(13,"th",20),d(14,"Not Available In"),c()()(),_(15,Rt,3,0,"tbody"),S(16,"async"),c()()),i&2){let n,t=s(2);l(4),p("ngxPermissionsOnly",E(4,L,t.uploadProductRole)),l(11),m((n=P(16,2,t.data$))?15:-1,n)}}function jt(i,o){i&1&&(r(0,"div",9),C(1,"app-empty-state"),c())}function Wt(i,o){if(i&1){let n=f();r(0,"span",44),x("click",function(){h(n);let e=s(4);return u(e.getRowCount())}),r(1,"i",45),d(2,"?"),c()()}}function Gt(i,o){if(i&1&&(r(0,"span"),d(1),S(2,"number"),c()),i&2){let n=o;l(),nt(P(2,1,n==null?null:n.Count))}}function zt(i,o){if(i&1){let n=f();r(0,"a",46),x("click",function(){h(n);let e=s(4);return u(e.onNextPage())}),C(1,"i",47),d(2," Next"),c()}}function Ht(i,o){if(i&1){let n=f();r(0,"a",48),x("click",function(){h(n);let e=s(4);return u(e.onLastPage())}),C(1,"i",49),d(2," Last"),c()}}function Kt(i,o){if(i&1&&(r(0,"div",37)(1,"div",38)(2,"div",39),d(3),S(4,"number"),_(5,Wt,3,0,"span",40),_(6,Gt,3,3,"span"),S(7,"async"),d(8),c()(),r(9,"div",41),_(10,zt,3,0,"a",42),_(11,Ht,3,0,"a",43),c()()),i&2){let n,t=s(),e=s(2);l(3),y(" Showing 1 - ",P(4,6,t==null?null:t.length)," of "),l(2),m(e.paginationService.hideCount?5:-1),l(),m((n=!e.paginationService.hideCount&&P(7,8,e.rowCount$))?6:-1,n),l(2),y(" records ~ ",e.paginationService.footerPageNumber," Page "),l(2),m(e.paginationService.disableNextButton&&!e.paginationService.goToLastPage?10:-1),l(),m(e.paginationService.disableNextButton&&!e.paginationService.goToLastPage?11:-1)}}function qt(i,o){if(i&1&&_(0,Kt,12,10,"div",37),i&2){let n=o;m((n==null?null:n.length)>0?0:-1)}}function Jt(i,o){if(i&1){let n=f();r(0,"mainpanel",1),x("onSubmit",function(e){h(n);let a=s();return u(a.searchProduct(e))}),r(1,"actions"),A(2,It,2,1,"ng-container",2)(3,Tt,4,0,"ng-container",2),r(4,"button",3),x("click",function(){h(n);let e=s();return u(e.openExportDialog())}),C(5,"i",4),r(6,"span"),d(7,"Export"),c()()(),r(8,"filters")(9,"filter-query-type",5),U("numberFilterComparatorChange",function(e){h(n);let a=s();return $(a.searchFilter.NumberFilterComparator,e)||(a.searchFilter.NumberFilterComparator=e),u(e)})("searchTypeChange",function(e){h(n);let a=s();return $(a.searchFilter.SearchType,e)||(a.searchFilter.SearchType=e),u(e)}),c()(),r(10,"content")(11,"div",6)(12,"div",7),_(13,Ut,17,6,"div",8),S(14,"async"),et(15,jt,2,0,"div",9),c(),_(16,qt,1,1),S(17,"async"),c()()()}if(i&2){let n,t,e=o,a=s();p("searchBoxPlaceHolder",a.searchPlaceholder()),l(2),p("ngxPermissionsOnly",E(13,L,a.uploadProductRole)),l(),p("ngxPermissionsOnly",E(15,L,a.scanProductRole)),l(6),p("numberFilterComparatorOptions",e==null||e.Options==null?null:e.Options.SearchComparatorTypeOptions),B("numberFilterComparator",a.searchFilter.NumberFilterComparator),p("searchTypeOptions",e==null||e.Options==null?null:e.Options.SearchSKUOnlyOrSKUNameOptions),B("searchType",a.searchFilter.SearchType),l(4),m(((n=P(14,9,a.data$))==null?null:n.length)>0?13:15),l(3),m((t=P(17,11,a.data$))?16:-1,t)}}var Ie=(()=>{let o=class o{constructor(){this.http=g(D),this.dialog=g(ut),this.toastr=g(at),this.route=g(rt),this.productService=g(xt),this.paginationService=g(Nt),this.biggerPictureService=g(bt),this.authService=g(st),this.uploadProductService=g(ft),this.placeholderService=g(Pt),this.loaderAPI="product/Load",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.scanProductRole=W.ProductScan,this.uploadProductRole=W.ProductUpload,this.searchPlaceholder=X("Search ...");let t=this.authService;this.channelOptions=t.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(k(t=>{this.searchFilter=t.Filter,this.paginationService.reloadPagination(t.Filter),this.initSearchPlaceholder()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}iniData(){this.data$=this.paginationService.data$.pipe(w(t=>(t=t.map(e=>(e.Variants=e.Variants.map(a=>(a.Available=this.productService.sortChannel(a.Available),a.NotAvailable=this.productService.sortChannel(a.NotAvailable),a.Available=this.assignLogoChannel(a.Available),a.NotAvailable=this.assignLogoChannel(a.NotAvailable),a)),e.Channel=e?.Variants[0]?.Available,e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=N.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter),this.initSearchPlaceholder()}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=N.GuidEMpty,this.dialog.open(gt,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(V(a=>N.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.searchFilter.Async=a.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1;let t={text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.rowCount$=this.http.post(j.GetNotInChannelRowCount,t)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){let t={text:this.searchFilter.text,NumberFilterComparator:this.searchFilter.NumberFilterComparator,SearchType:this.searchFilter.SearchType};this.http.post(j.GetNotInChannelRowCount,t).subscribe({next:e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e.Count)}})}onZoomImage(t,e){this.biggerPictureService.openBiggerPicture(t,e)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(vt,{data:{title:"Export Not In Channel",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}};o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=tt({type:o,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"searchBoxPlaceHolder"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[2,"width","10px"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[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"],[1,"btn-group"],["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"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,a){if(e&1&&(_(0,Jt,18,17,"mainpanel",0),S(1,"async")),e&2){let b;m((b=P(1,1,a.loader$))?0:-1,b)}},dependencies:[Ct,ct,lt,yt,mt,dt,pt,_t,ht,St,it,ot],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});let i=o;return i})();export{Ie as NotInChannelComponent};
@@ -1 +1 @@
1
- import{a as $,b as ee}from"./chunk-TVEI5B2O.js";import{a as Z}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as Y}from"./chunk-WG34QKGX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as X}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as Q}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as U}from"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{c as z}from"./chunk-UPRDDI4K.js";import{A as K,c as j,h as q,m as G,o as J}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as V}from"./chunk-D6JH2KV4.js";import{e as A,g as H}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as F,B as k,y as B}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as L,Nc as r,Oc as f,Pc as y,Rc as s,Sc as g,Tc as u,ac as M,ad as W,cc as E,ec as P,fc as x,gc as T,hc as c,ic as e,id as b,jc as t,jd as N,kc as _,kd as R,mb as O,ob as a,ra as C,rc as I,wc as w,ya as v,yc as S,za as D}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var te=l=>({ID:l});function ne(l,m){if(l&1&&(e(0,"tr")(1,"td"),r(2),t(),e(3,"td"),_(4,"img",23),t(),e(5,"td"),r(6),t(),e(7,"td",24)(8,"a",25),r(9),b(10,"number"),t()(),e(11,"td"),r(12),t(),e(13,"td"),r(14),b(15,"date"),t()()),l&2){let o=m.$implicit;a(2),f(o._source.ChannelName),a(2),c("src",o.logo,O),a(2),f(o._source.DateRange),a(2),c("queryParams",W(12,te,o._source.ID)),a(),y(" ",N(10,7,o._source.CountOrder)," "),a(3),f(o._source.UserLogin),a(2),y(" ",R(15,9,o._source["@timestamp_received"],"dd MMM yyyy HH:mm")," ")}}function ie(l,m){if(l&1){let o=I();e(0,"div",14)(1,"table",16)(2,"thead")(3,"tr",17)(4,"th",18),r(5,"Channel"),t(),e(6,"th",19),r(7,"Type"),t(),e(8,"th",20),r(9,"Download Date Range"),t(),e(10,"th",21),r(11,"Count"),t(),e(12,"th"),r(13,"User Login"),t(),e(14,"th"),r(15,"Created"),t()()(),e(16,"tbody"),x(17,ne,16,14,"tr",null,P),t()(),e(19,"mat-paginator",22),w("page",function(p){v(o);let n=S();return D(n.onPaginationChange(p))}),t()()}if(l&2){let o=S();a(17),T(o.downloadOrders),a(2),c("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function oe(l,m){l&1&&(e(0,"div",15),_(1,"app-empty-state"),t())}var De=(()=>{let m=class m{constructor(){this.http=C(V),this.authService=C(U),this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(d=>{this.filter=d.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(d=>{this.downloadOrders=d.hits,this.setChannelLogo(),this.paginationTotal=d.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(d=>(d.logo=z.getChannelLogoByTypeId(d._source.TypeID),d))}onPaginationChange(d){this.filter.PageNumber=d.pageIndex+1,this.getDownloadOrders()}};m.\u0275fac=function(p){return new(p||m)},m.\u0275cmp=L({type:m,selectors:[["app-download-order-log"]],decls:27,vars:7,consts:[["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[3,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/Order/Download_Order_Log/Detail",3,"queryParams"]],template:function(p,n){p&1&&(e(0,"mainpanel",0),w("onSubmit",function(){return n.getDownloadOrders()}),e(1,"filters")(2,"div")(3,"label",1),r(4,"Channel"),t(),e(5,"app-channel-options-v2",2),u("ngModelChange",function(i){return g(n.filter.ChannelID,i)||(n.filter.ChannelID=i),i}),t()(),e(6,"div",3)(7,"label",4),r(8,"From/To"),t(),e(9,"div",5)(10,"datepicker",6),u("dateChange",function(i){return g(n.filter.From,i)||(n.filter.From=i),i}),t()(),e(11,"div")(12,"datepicker",7),u("dateChange",function(i){return g(n.filter.To,i)||(n.filter.To=i),i}),t()()(),e(13,"div",3)(14,"label",8),r(15,"Page Number"),t(),e(16,"input",9),u("ngModelChange",function(i){return g(n.filter.PageNumber,i)||(n.filter.PageNumber=i),i}),t()(),e(17,"div",3)(18,"label",8),r(19,"Page Size"),t(),e(20,"input",10),u("ngModelChange",function(i){return g(n.filter.RowCount,i)||(n.filter.RowCount=i),i}),t()()(),e(21,"content")(22,"div",11)(23,"div",12)(24,"div",13),M(25,ie,20,3,"div",14)(26,oe,2,0,"div",15),t()()()()()),p&2&&(c("hideSearchBox",!0),a(5),s("ngModel",n.filter.ChannelID),a(5),s("date",n.filter.From),a(2),s("date",n.filter.To),a(4),s("ngModel",n.filter.PageNumber),a(4),s("ngModel",n.filter.RowCount),a(5),E((n.downloadOrders==null?null:n.downloadOrders.length)>0?25:26))},dependencies:[k,ee,$,Q,K,j,J,q,G,Z,H,A,X,Y,F,B],encapsulation:2});let l=m;return l})();export{De as DownloadOrderLogComponent};
1
+ import{a as $,b as ee}from"./chunk-TVEI5B2O.js";import{a as Z}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as Y}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as X}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as Q}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as U}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{c as z}from"./chunk-UPRDDI4K.js";import{A as K,c as j,h as q,m as G,o as J}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as V}from"./chunk-D6JH2KV4.js";import{e as A,g as H}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as F,B as k,y as B}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as L,Nc as r,Oc as f,Pc as y,Rc as s,Sc as g,Tc as u,ac as M,ad as W,cc as E,ec as P,fc as x,gc as T,hc as c,ic as e,id as b,jc as t,jd as N,kc as _,kd as R,mb as O,ob as a,ra as C,rc as I,wc as w,ya as v,yc as S,za as D}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var te=l=>({ID:l});function ne(l,m){if(l&1&&(e(0,"tr")(1,"td"),r(2),t(),e(3,"td"),_(4,"img",23),t(),e(5,"td"),r(6),t(),e(7,"td",24)(8,"a",25),r(9),b(10,"number"),t()(),e(11,"td"),r(12),t(),e(13,"td"),r(14),b(15,"date"),t()()),l&2){let o=m.$implicit;a(2),f(o._source.ChannelName),a(2),c("src",o.logo,O),a(2),f(o._source.DateRange),a(2),c("queryParams",W(12,te,o._source.ID)),a(),y(" ",N(10,7,o._source.CountOrder)," "),a(3),f(o._source.UserLogin),a(2),y(" ",R(15,9,o._source["@timestamp_received"],"dd MMM yyyy HH:mm")," ")}}function ie(l,m){if(l&1){let o=I();e(0,"div",14)(1,"table",16)(2,"thead")(3,"tr",17)(4,"th",18),r(5,"Channel"),t(),e(6,"th",19),r(7,"Type"),t(),e(8,"th",20),r(9,"Download Date Range"),t(),e(10,"th",21),r(11,"Count"),t(),e(12,"th"),r(13,"User Login"),t(),e(14,"th"),r(15,"Created"),t()()(),e(16,"tbody"),x(17,ne,16,14,"tr",null,P),t()(),e(19,"mat-paginator",22),w("page",function(p){v(o);let n=S();return D(n.onPaginationChange(p))}),t()()}if(l&2){let o=S();a(17),T(o.downloadOrders),a(2),c("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function oe(l,m){l&1&&(e(0,"div",15),_(1,"app-empty-state"),t())}var De=(()=>{let m=class m{constructor(){this.http=C(V),this.authService=C(U),this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(d=>{this.filter=d.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(d=>{this.downloadOrders=d.hits,this.setChannelLogo(),this.paginationTotal=d.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(d=>(d.logo=z.getChannelLogoByTypeId(d._source.TypeID),d))}onPaginationChange(d){this.filter.PageNumber=d.pageIndex+1,this.getDownloadOrders()}};m.\u0275fac=function(p){return new(p||m)},m.\u0275cmp=L({type:m,selectors:[["app-download-order-log"]],decls:27,vars:7,consts:[["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[3,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/order/log/detail",3,"queryParams"]],template:function(p,n){p&1&&(e(0,"mainpanel",0),w("onSubmit",function(){return n.getDownloadOrders()}),e(1,"filters")(2,"div")(3,"label",1),r(4,"Channel"),t(),e(5,"app-channel-options-v2",2),u("ngModelChange",function(i){return g(n.filter.ChannelID,i)||(n.filter.ChannelID=i),i}),t()(),e(6,"div",3)(7,"label",4),r(8,"From/To"),t(),e(9,"div",5)(10,"datepicker",6),u("dateChange",function(i){return g(n.filter.From,i)||(n.filter.From=i),i}),t()(),e(11,"div")(12,"datepicker",7),u("dateChange",function(i){return g(n.filter.To,i)||(n.filter.To=i),i}),t()()(),e(13,"div",3)(14,"label",8),r(15,"Page Number"),t(),e(16,"input",9),u("ngModelChange",function(i){return g(n.filter.PageNumber,i)||(n.filter.PageNumber=i),i}),t()(),e(17,"div",3)(18,"label",8),r(19,"Page Size"),t(),e(20,"input",10),u("ngModelChange",function(i){return g(n.filter.RowCount,i)||(n.filter.RowCount=i),i}),t()()(),e(21,"content")(22,"div",11)(23,"div",12)(24,"div",13),M(25,ie,20,3,"div",14)(26,oe,2,0,"div",15),t()()()()()),p&2&&(c("hideSearchBox",!0),a(5),s("ngModel",n.filter.ChannelID),a(5),s("date",n.filter.From),a(2),s("date",n.filter.To),a(4),s("ngModel",n.filter.PageNumber),a(4),s("ngModel",n.filter.RowCount),a(5),E((n.downloadOrders==null?null:n.downloadOrders.length)>0?25:26))},dependencies:[k,ee,$,Q,K,j,J,q,G,Z,H,A,X,Y,F,B],encapsulation:2});let l=m;return l})();export{De as DownloadOrderLogComponent};
@@ -1 +1 @@
1
- import{a as w}from"./chunk-TUJBAZ5Q.js";import{a as C,b as D}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as h,e as y}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as u,Nc as f,Pc as v,ad as b,ec as m,fc as s,gc as c,hc as l,ic as n,jc as o,kc as i,ob as r}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var k=e=>[e];function x(e,t){if(e&1&&(n(0,"a",8),f(1),o()),e&2){let d=t.$implicit;l("routerLink",b(2,k,d.url)),r(),v(" ",d.title)}}var T=(()=>{let t=class t{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}};t.\u0275fac=function(a){return new(a||t)},t.\u0275cmp=u({type:t,selectors:[["app-download"]],decls:13,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[1,"dropdown-item",3,"routerLink"]],template:function(a,p){a&1&&(n(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),o()(),n(4,"div")(5,"div",3)(6,"a",4),i(7,"i",5),o(),n(8,"div",6)(9,"div",7),s(10,x,2,4,"a",8,m),o()()()()(),i(12,"router-outlet")),a&2&&(r(3),l("Tabs",p.tabs),r(7),c(p.moreMenu))},dependencies:[D,C,y,h],encapsulation:2});let e=t;return e})();var F=[{path:"",component:T,children:[{path:"by-url",loadComponent(){return import("./chunk-YBRWFONB.js").then(e=>e.ByUrlComponent)},data:{title:"Download Product By Url"},canActivate:[w]},{pathMatch:"full",path:"",redirectTo:"by-url"}]}];export{F as routes};
1
+ import{a as w}from"./chunk-WH76SMZT.js";import{a as C,b as D}from"./chunk-75IM3UUA.js";import"./chunk-UEXWQT5J.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{c as h,e as y}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as u,Nc as f,Pc as v,ad as b,ec as m,fc as s,gc as c,hc as l,ic as n,jc as o,kc as i,ob as r}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var k=e=>[e];function x(e,t){if(e&1&&(n(0,"a",8),f(1),o()),e&2){let d=t.$implicit;l("routerLink",b(2,k,d.url)),r(),v(" ",d.title)}}var T=(()=>{let t=class t{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}};t.\u0275fac=function(a){return new(a||t)},t.\u0275cmp=u({type:t,selectors:[["app-download"]],decls:13,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[1,"dropdown-item",3,"routerLink"]],template:function(a,p){a&1&&(n(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),o()(),n(4,"div")(5,"div",3)(6,"a",4),i(7,"i",5),o(),n(8,"div",6)(9,"div",7),s(10,x,2,4,"a",8,m),o()()()()(),i(12,"router-outlet")),a&2&&(r(3),l("Tabs",p.tabs),r(7),c(p.moreMenu))},dependencies:[D,C,y,h],encapsulation:2});let e=t;return e})();var F=[{path:"",component:T,children:[{path:"by-url",loadComponent(){return import("./chunk-6DGG765N.js").then(e=>e.ByUrlComponent)},data:{title:"Download Product By Url"},canActivate:[w]},{pathMatch:"full",path:"",redirectTo:"by-url"}]}];export{F as routes};
@@ -1 +1 @@
1
- import{a as b,b as ct}from"./chunk-4GV67OQR.js";import"./chunk-BKR7YPEW.js";import{a as lt}from"./chunk-WG34QKGX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as rt}from"./chunk-ZZYFVEJO.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as at}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as ot,h as it,m as nt}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{e as tt,g as et}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as X,B as Z,q as Y,w as G,y as Q}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as j,Hb as M,Ia as w,Mc as $,Nc as n,Oc as x,Pc as C,Qc as O,Rc as H,Sc as J,Tc as W,Uc as q,Z as P,_c as A,ac as f,ad as z,bd as K,cc as _,cd as U,dc as L,ec as k,fc as I,gc as N,hc as m,ic as e,id as v,jc as i,jd as D,kc as B,kd as V,mb as T,ob as l,ra as F,rc as R,v as E,wc as y,ya as p,yc as S,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var st=(t,o)=>({"bg-gradient-danger":t,"bg-gradient-warning":o}),dt=()=>["/menu/products/status/notificationV2/detailV2"],mt=t=>({ID:t}),pt=(t,o,a)=>({"text-warning":t,"text-success":o,"text-danger":a});function ut(t,o){t&1&&(e(0,"div"),n(1," Scan in progress. You will be notified once it is complete. "),i())}function ft(t,o){if(t&1&&(e(0,"div"),n(1),v(2,"number"),i()),t&2){let a=o.$implicit;l(),O(" ",a.Key,": ",D(2,2,a.Value)," ")}}function _t(t,o){if(t&1&&(e(0,"div",19)(1,"div",18),n(2,"Status Product:"),i(),I(3,ft,3,4,"div",null,L),i()),t&2){let a=S(2).$implicit;l(3),N(a.ParsedStatus)}}function St(t,o){if(t&1&&(e(0,"div",18),n(1),i(),e(2,"div"),n(3),i(),f(4,_t,5,0,"div",19)),t&2){let a=S().$implicit;l(),C(" ",a.ProcessLabel," "),l(2),x(a.ProcessDescription),l(),_(a!=null&&a.ParsedStatus&&(a==null||a.ParsedStatus==null?null:a.ParsedStatus.length)>0?4:-1)}}function Ct(t,o){if(t&1&&(n(0),v(1,"number"),e(2,"span"),n(3,"s"),i()),t&2){let a=S().$implicit;C(" ",V(1,1,a.DurationInSecond,"1.1-1")," ")}}function vt(t,o){t&1&&n(0," - ")}function xt(t,o){t&1&&n(0," In Progress ")}function gt(t,o){t&1&&n(0," Completed ")}function ht(t,o){t&1&&n(0," Failed ")}function It(t,o){if(t&1&&(e(0,"tr",12)(1,"td")(2,"a",15),n(3),i()(),e(4,"td")(5,"div",16),B(6,"img",17),e(7,"span"),n(8),i()()(),e(9,"td"),f(10,ut,2,0,"div")(11,St,5,3),i(),e(12,"td"),f(13,Ct,4,4)(14,vt,1,0),i(),e(15,"td")(16,"div",18),f(17,xt,1,0)(18,gt,1,0)(19,ht,1,0),i()(),e(20,"td",19)(21,"div"),n(22),i(),e(23,"div"),n(24),v(25,"date"),i()()()),t&2){let a,r=o.$implicit,c=S();m("ngClass",K(16,st,r.Status==1,r.Status==0)),l(2),m("routerLink",j(19,dt))("queryParams",z(20,mt,r.ID)),l(),C(" ",r.ID," "),l(3),m("src",r.Img,T),l(2),x(r.ChannelName),l(2),_(r.StateID==c.scanState.InProgress?10:11),l(3),_(r.DurationInSecond?13:14),l(3),$(U(22,pt,r.StateID==c.scanState.InProgress,r.StateID==c.scanState.Completed,r.StateID==c.scanState.Failed)),l(),_((a=r.StateID)===c.scanState.InProgress?17:a===c.scanState.Completed?18:a===c.scanState.Failed?19:-1),l(5),x(r.LoginID),l(2),C(" ",V(25,13,r.Created,"dd MMM yyyy HH:mm")," ")}}var Ot=(()=>{let o=class o{constructor(){this.notificationService=F(b),this.filter=w({RowCount:20,PageNumber:1,ChannelID:null}),this.scanState=ct,this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotificationList(this.filter()).pipe(E(r=>(r.Data=r.Data.map(c=>(c.StatusProduct&&(c.ParsedStatus=JSON.parse(c.StatusProduct)),c)),r)),P(1))}onFilter(){this.initNotifications()}};o.\u0275fac=function(c){return new(c||o)},o.\u0275cmp=M({type:o,selectors:[["app-notificationV2"]],features:[A([b])],decls:37,vars:8,consts:[["headerTitle","Notification",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/notification",1,"btn","btn-outline-secondary","btn-lg"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","260px"],[3,"ngClass"],[1,"col-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","gap-3"],[1,"channelLogo-md",3,"src","alt"],[1,"fw-bold"],[1,"lh-base"]],template:function(c,d){if(c&1){let s=R();q(0),v(1,"async"),e(2,"mainpanel",0),y("onSubmit",function(){return p(s),u(d.onFilter())}),e(3,"actions")(4,"a",1),n(5," Scan Job "),i()(),e(6,"filters")(7,"div")(8,"label",2),n(9,"Channel"),i(),e(10,"app-channel-options-v2",3),W("ngModelChange",function(h){return p(s),J(d.filter().ChannelID,h)||(d.filter().ChannelID=h),u(h)}),i()()(),e(11,"content")(12,"div",4)(13,"div",5)(14,"div",6)(15,"div",7)(16,"table",8)(17,"thead",9)(18,"tr",10)(19,"th",11),n(20,"Job ID"),i(),e(21,"th"),n(22,"Channel"),i(),e(23,"th"),n(24,"Process"),i(),e(25,"th"),n(26,"Duration"),i(),e(27,"th"),n(28,"Status"),i(),e(29,"th"),n(30,"Creator"),i()()(),e(31,"tbody"),I(32,It,26,26,"tr",12,k),i()()()()(),e(34,"div",5)(35,"div",13)(36,"app-custom-paginator",14),y("next",function(){return p(s),u(d.initNotifications())})("previous",function(){return p(s),u(d.initNotifications())}),i()()()()()()}if(c&2){let s=D(1,6,d.notifications$);l(2),m("hideSearchBox",!0),l(8),H("ngModel",d.filter().ChannelID),l(22),N(s==null?null:s.Data),l(4),m("filter",d.filter())("totaldata",s==null||s.Data==null?null:s.Data.length)("paginationTotal",s==null?null:s.Count)("hasClicked",!0)}},dependencies:[Z,Y,ot,it,nt,at,rt,et,tt,lt,G,X,Q],encapsulation:2});let t=o;return t})();export{Ot as NotificationV2Component};
1
+ import{a as b,b as ct}from"./chunk-4GV67OQR.js";import"./chunk-BKR7YPEW.js";import{a as lt}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as rt}from"./chunk-ZZYFVEJO.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as at}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as ot,h as it,m as nt}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import{e as tt,g as et}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as X,B as Z,q as Y,w as G,y as Q}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as j,Hb as M,Ia as w,Mc as $,Nc as n,Oc as x,Pc as C,Qc as O,Rc as H,Sc as J,Tc as W,Uc as q,Z as P,_c as A,ac as f,ad as z,bd as K,cc as _,cd as U,dc as L,ec as k,fc as I,gc as N,hc as m,ic as e,id as v,jc as i,jd as D,kc as B,kd as V,mb as T,ob as l,ra as F,rc as R,v as E,wc as y,ya as p,yc as S,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var st=(t,o)=>({"bg-gradient-danger":t,"bg-gradient-warning":o}),dt=()=>["/menu/products/status/notificationV2/detailV2"],mt=t=>({ID:t}),pt=(t,o,a)=>({"text-warning":t,"text-success":o,"text-danger":a});function ut(t,o){t&1&&(e(0,"div"),n(1," Scan in progress. You will be notified once it is complete. "),i())}function ft(t,o){if(t&1&&(e(0,"div"),n(1),v(2,"number"),i()),t&2){let a=o.$implicit;l(),O(" ",a.Key,": ",D(2,2,a.Value)," ")}}function _t(t,o){if(t&1&&(e(0,"div",19)(1,"div",18),n(2,"Status Product:"),i(),I(3,ft,3,4,"div",null,L),i()),t&2){let a=S(2).$implicit;l(3),N(a.ParsedStatus)}}function St(t,o){if(t&1&&(e(0,"div",18),n(1),i(),e(2,"div"),n(3),i(),f(4,_t,5,0,"div",19)),t&2){let a=S().$implicit;l(),C(" ",a.ProcessLabel," "),l(2),x(a.ProcessDescription),l(),_(a!=null&&a.ParsedStatus&&(a==null||a.ParsedStatus==null?null:a.ParsedStatus.length)>0?4:-1)}}function Ct(t,o){if(t&1&&(n(0),v(1,"number"),e(2,"span"),n(3,"s"),i()),t&2){let a=S().$implicit;C(" ",V(1,1,a.DurationInSecond,"1.1-1")," ")}}function vt(t,o){t&1&&n(0," - ")}function xt(t,o){t&1&&n(0," In Progress ")}function gt(t,o){t&1&&n(0," Completed ")}function ht(t,o){t&1&&n(0," Failed ")}function It(t,o){if(t&1&&(e(0,"tr",12)(1,"td")(2,"a",15),n(3),i()(),e(4,"td")(5,"div",16),B(6,"img",17),e(7,"span"),n(8),i()()(),e(9,"td"),f(10,ut,2,0,"div")(11,St,5,3),i(),e(12,"td"),f(13,Ct,4,4)(14,vt,1,0),i(),e(15,"td")(16,"div",18),f(17,xt,1,0)(18,gt,1,0)(19,ht,1,0),i()(),e(20,"td",19)(21,"div"),n(22),i(),e(23,"div"),n(24),v(25,"date"),i()()()),t&2){let a,r=o.$implicit,c=S();m("ngClass",K(16,st,r.Status==1,r.Status==0)),l(2),m("routerLink",j(19,dt))("queryParams",z(20,mt,r.ID)),l(),C(" ",r.ID," "),l(3),m("src",r.Img,T),l(2),x(r.ChannelName),l(2),_(r.StateID==c.scanState.InProgress?10:11),l(3),_(r.DurationInSecond?13:14),l(3),$(U(22,pt,r.StateID==c.scanState.InProgress,r.StateID==c.scanState.Completed,r.StateID==c.scanState.Failed)),l(),_((a=r.StateID)===c.scanState.InProgress?17:a===c.scanState.Completed?18:a===c.scanState.Failed?19:-1),l(5),x(r.LoginID),l(2),C(" ",V(25,13,r.Created,"dd MMM yyyy HH:mm")," ")}}var Ot=(()=>{let o=class o{constructor(){this.notificationService=F(b),this.filter=w({RowCount:20,PageNumber:1,ChannelID:null}),this.scanState=ct,this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotificationList(this.filter()).pipe(E(r=>(r.Data=r.Data.map(c=>(c.StatusProduct&&(c.ParsedStatus=JSON.parse(c.StatusProduct)),c)),r)),P(1))}onFilter(){this.initNotifications()}};o.\u0275fac=function(c){return new(c||o)},o.\u0275cmp=M({type:o,selectors:[["app-notificationV2"]],features:[A([b])],decls:37,vars:8,consts:[["headerTitle","Notification",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/notification",1,"btn","btn-outline-secondary","btn-lg"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","260px"],[3,"ngClass"],[1,"col-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","gap-3"],[1,"channelLogo-md",3,"src","alt"],[1,"fw-bold"],[1,"lh-base"]],template:function(c,d){if(c&1){let s=R();q(0),v(1,"async"),e(2,"mainpanel",0),y("onSubmit",function(){return p(s),u(d.onFilter())}),e(3,"actions")(4,"a",1),n(5," Scan Job "),i()(),e(6,"filters")(7,"div")(8,"label",2),n(9,"Channel"),i(),e(10,"app-channel-options-v2",3),W("ngModelChange",function(h){return p(s),J(d.filter().ChannelID,h)||(d.filter().ChannelID=h),u(h)}),i()()(),e(11,"content")(12,"div",4)(13,"div",5)(14,"div",6)(15,"div",7)(16,"table",8)(17,"thead",9)(18,"tr",10)(19,"th",11),n(20,"Job ID"),i(),e(21,"th"),n(22,"Channel"),i(),e(23,"th"),n(24,"Process"),i(),e(25,"th"),n(26,"Duration"),i(),e(27,"th"),n(28,"Status"),i(),e(29,"th"),n(30,"Creator"),i()()(),e(31,"tbody"),I(32,It,26,26,"tr",12,k),i()()()()(),e(34,"div",5)(35,"div",13)(36,"app-custom-paginator",14),y("next",function(){return p(s),u(d.initNotifications())})("previous",function(){return p(s),u(d.initNotifications())}),i()()()()()()}if(c&2){let s=D(1,6,d.notifications$);l(2),m("hideSearchBox",!0),l(8),H("ngModel",d.filter().ChannelID),l(22),N(s==null?null:s.Data),l(4),m("filter",d.filter())("totaldata",s==null||s.Data==null?null:s.Data.length)("paginationTotal",s==null?null:s.Count)("hasClicked",!0)}},dependencies:[Z,Y,ot,it,nt,at,rt,et,tt,lt,G,X,Q],encapsulation:2});let t=o;return t})();export{Ot as NotificationV2Component};
@@ -1,4 +1,4 @@
1
- import{a as ye}from"./chunk-YKKHSYDW.js";import{a as de,b as he}from"./chunk-Z3PLQ27X.js";import"./chunk-VG66LDXQ.js";import{e as me}from"./chunk-G3KVHCET.js";import"./chunk-TQROQOXU.js";import{a as ge}from"./chunk-IQGRGC3E.js";import{c as Ce,d as be}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import{a as W}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import"./chunk-BZWZ64N5.js";import{a as xe}from"./chunk-WG34QKGX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import{a as ce}from"./chunk-GNXSEYJF.js";import{a as ue}from"./chunk-7KG3DC5J.js";import{a as fe}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as _e}from"./chunk-27DIE2YS.js";import{a as pe}from"./chunk-WCX3T6LK.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import{a as re}from"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import{e as le}from"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import{a as at}from"./chunk-3NCMRK7E.js";import{a as ne}from"./chunk-GD6ZN56B.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import{g as st}from"./chunk-C4MTEDSW.js";import{b as L,c as ae,d as Ct,e as $}from"./chunk-JMRRXRKO.js";import{b as se}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as oe,h as ie}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import{P as _t,Q as Qt,ha as H,la as qt,ma as ft,ua as Kt}from"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as it}from"./chunk-ZSUWHVKX.js";import{h as Jt}from"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as Wt}from"./chunk-AGBJEXIM.js";import{b as Ht,c as $t}from"./chunk-NB2H6KA7.js";import{b as ut,c as g}from"./chunk-UPRDDI4K.js";import{A as ee,c as Yt,h as Xt,m as te}from"./chunk-6UM4NHOR.js";import{a as Rt}from"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as zt,e as Gt}from"./chunk-D6JH2KV4.js";import{b as jt,d as ot}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as mt,q as Dt,s as Bt,t as Nt,v as At}from"./chunk-CGSMHTKB.js";import{c as ht,d as gt,f as et,g as Lt,i as nt,k as Ut,m as Zt}from"./chunk-XBIHN6D3.js";import{$c as Ft,Aa as w,Ab as Tt,Bc as Q,Dc as q,Ec as K,Fd as tt,G as F,Gd as j,Hb as I,Ia as M,Lb as k,Lc as Y,Mb as wt,Mc as T,Nb as P,Nc as b,Oc as U,Pa as V,Pc as O,Rc as Z,Sc as z,Tc as X,_b as S,_c as G,aa as ct,ac as f,ad as E,bd as Mt,cc as C,dd as kt,ec as It,fc as Pt,gc as Ot,hc as l,ic as c,jc as d,kc as u,lb as vt,lc as D,ld as Et,ma as bt,mc as B,nc as N,ob as r,oc as A,pa as yt,pc as R,pd as Vt,qc as pt,ra as h,rc as v,sc as J,tb as dt,ub as St,wc as x,ya as p,yc as a,za as m}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Oe=["data-p-icon","exclamation-triangle"],ve=(()=>{class e extends at{pathId;onInit(){this.pathId="url(#"+L()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=V(e)))(n||e)}})();static \u0275cmp=I({type:e,selectors:[["","data-p-icon","exclamation-triangle"]],features:[k],attrs:Oe,decls:7,vars:2,consts:[["d","M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z","fill","currentColor"],["d","M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z","fill","currentColor"],["d","M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(o,n){o&1&&(w(),D(0,"g"),N(1,"path",0)(2,"path",1)(3,"path",2),B(),D(4,"defs")(5,"clipPath",3),N(6,"rect",4),B()()),o&2&&(S("clip-path",n.pathId),r(5),J("id",n.pathId))},encapsulation:2})}return e})();var Fe=["data-p-icon","info-circle"],Se=(()=>{class e extends at{pathId;onInit(){this.pathId="url(#"+L()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=V(e)))(n||e)}})();static \u0275cmp=I({type:e,selectors:[["","data-p-icon","info-circle"]],features:[k],attrs:Fe,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(o,n){o&1&&(w(),D(0,"g"),N(1,"path",0),B(),D(2,"defs")(3,"clipPath",1),N(4,"rect",2),B()()),o&2&&(S("clip-path",n.pathId),r(3),J("id",n.pathId))},encapsulation:2})}return e})();var Te=`
1
+ import{a as ye}from"./chunk-YKKHSYDW.js";import{a as de,b as he}from"./chunk-Z3PLQ27X.js";import"./chunk-VG66LDXQ.js";import{e as me}from"./chunk-HZTKN5RX.js";import"./chunk-TQROQOXU.js";import{a as ge}from"./chunk-IQGRGC3E.js";import{c as Ce,d as be}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import{a as W}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import"./chunk-BZWZ64N5.js";import{a as xe}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import{a as ce}from"./chunk-GNXSEYJF.js";import{a as ue}from"./chunk-7KG3DC5J.js";import{a as fe}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as _e}from"./chunk-27DIE2YS.js";import{a as pe}from"./chunk-LCN52IJT.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import{a as re}from"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import{e as le}from"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import{a as at}from"./chunk-3NCMRK7E.js";import{a as ne}from"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import{g as st}from"./chunk-C4MTEDSW.js";import{b as L,c as ae,d as Ct,e as $}from"./chunk-JMRRXRKO.js";import{b as se}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as oe,h as ie}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import{P as _t,Q as Qt,ha as H,la as qt,ma as ft,ua as Kt}from"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as it}from"./chunk-ZSUWHVKX.js";import{h as Jt}from"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as Wt}from"./chunk-AGBJEXIM.js";import{b as Ht,c as $t}from"./chunk-NB2H6KA7.js";import{b as ut,c as g}from"./chunk-UPRDDI4K.js";import{A as ee,c as Yt,h as Xt,m as te}from"./chunk-6UM4NHOR.js";import{a as Rt}from"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as zt,e as Gt}from"./chunk-D6JH2KV4.js";import{b as jt,d as ot}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as mt,q as Dt,s as Bt,t as Nt,v as At}from"./chunk-CGSMHTKB.js";import{c as ht,d as gt,f as et,g as Lt,i as nt,k as Ut,m as Zt}from"./chunk-XBIHN6D3.js";import{$c as Ft,Aa as w,Ab as Tt,Bc as Q,Dc as q,Ec as K,Fd as tt,G as F,Gd as j,Hb as I,Ia as M,Lb as k,Lc as Y,Mb as wt,Mc as T,Nb as P,Nc as b,Oc as U,Pa as V,Pc as O,Rc as Z,Sc as z,Tc as X,_b as S,_c as G,aa as ct,ac as f,ad as E,bd as Mt,cc as C,dd as kt,ec as It,fc as Pt,gc as Ot,hc as l,ic as c,jc as d,kc as u,lb as vt,lc as D,ld as Et,ma as bt,mc as B,nc as N,ob as r,oc as A,pa as yt,pc as R,pd as Vt,qc as pt,ra as h,rc as v,sc as J,tb as dt,ub as St,wc as x,ya as p,yc as a,za as m}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Oe=["data-p-icon","exclamation-triangle"],ve=(()=>{class e extends at{pathId;onInit(){this.pathId="url(#"+L()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=V(e)))(n||e)}})();static \u0275cmp=I({type:e,selectors:[["","data-p-icon","exclamation-triangle"]],features:[k],attrs:Oe,decls:7,vars:2,consts:[["d","M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z","fill","currentColor"],["d","M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z","fill","currentColor"],["d","M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(o,n){o&1&&(w(),D(0,"g"),N(1,"path",0)(2,"path",1)(3,"path",2),B(),D(4,"defs")(5,"clipPath",3),N(6,"rect",4),B()()),o&2&&(S("clip-path",n.pathId),r(5),J("id",n.pathId))},encapsulation:2})}return e})();var Fe=["data-p-icon","info-circle"],Se=(()=>{class e extends at{pathId;onInit(){this.pathId="url(#"+L()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=V(e)))(n||e)}})();static \u0275cmp=I({type:e,selectors:[["","data-p-icon","info-circle"]],features:[k],attrs:Fe,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(o,n){o&1&&(w(),D(0,"g"),N(1,"path",0),B(),D(2,"defs")(3,"clipPath",1),N(4,"rect",2),B()()),o&2&&(S("clip-path",n.pathId),r(3),J("id",n.pathId))},encapsulation:2})}return e})();var Te=`
2
2
  .p-toast {
3
3
  width: dt('toast.width');
4
4
  white-space: pre-line;
@@ -1 +1 @@
1
- import{a as re}from"./chunk-WG34QKGX.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as ie}from"./chunk-7KG3DC5J.js";import{a as ae}from"./chunk-ZZYFVEJO.js";import{a as ne}from"./chunk-DLHIDOS3.js";import{a as oe}from"./chunk-27DIE2YS.js";import{a as te}from"./chunk-WCX3T6LK.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-GD6ZN56B.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as ee}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as Y}from"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import{c as X}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-7K6U3ABQ.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{c as y}from"./chunk-UPRDDI4K.js";import{A as M,h as J,m as Q}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as A}from"./chunk-D6JH2KV4.js";import{e as K}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as W,B as H,H as q,q as G}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as w,Nc as s,Oc as L,Pc as F,Qc as O,Rc as B,Sc as U,Tc as Z,Uc as j,Vc as $,Wc as z,_b as I,ac as u,ad as E,cc as g,dc as V,ec as P,fc as x,gc as b,hc as c,ic as l,id as N,jc as d,jd as R,kc as m,mb as k,ob as a,ra as v,rc as D,ud as _,wc as S,ya as h,yc as p,za as C}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var ce=e=>({"border-bottom-0":e}),pe=e=>({"border-bottom":e});function se(e,o){if(e&1){let i=D();l(0,"img",15),S("click",function(n){h(i);let r=p();return C(r.onZoomImage(n))}),d()}if(e&2){let i=p();c("ngSrc",i.image)("fill",!0)}}function me(e,o){e&1&&m(0,"img",7),e&2&&c("fill",!0)}function ue(e,o){if(e&1&&(l(0,"div",10),m(1,"i",16),l(2,"span"),s(3),d()()),e&2){let i=p();a(3),L(i.code)}}function ge(e,o){if(e&1&&(l(0,"div",11),s(1),N(2,"number"),d()),e&2){let i=p();a(),F("",R(2,1,i.totalChannel())," Listing")}}function he(e,o){if(e&1&&(l(0,"div",22),s(1),N(2,"number"),d()),e&2){p();let i=z(7);a(),F(" (",R(2,1,i)," Listing) ")}}function Ce(e,o){if(e&1&&(l(0,"div",25)(1,"div",26),s(2),d(),l(3,"div")(4,"a",27),m(5,"i",28),d()()()),e&2){let i=o.$implicit,t=o.$index,n=p().$implicit;c("ngClass",E(4,pe,t!==(n==null?null:n.Variants.length)-1)),a(2),O(" ",i.ProductName," - ",i.Name," "),a(2),c("href",i.URL,k)}}function _e(e,o){if(e&1&&(l(0,"div",14)(1,"h2",17)(2,"button",18)(3,"div",19),m(4,"img",20),l(5,"span",21),s(6),d(),j(7),u(8,he,3,3,"div",22),d()()(),l(9,"div",23)(10,"div",24),x(11,Ce,6,6,"div",25,V),d()()()),e&2){let i,t=o.$implicit,n=o.$index,r=p();c("ngClass",E(11,ce,r.channels().length-1==n)),a(),c("id","heading"+n+r.id()),a(),I("data-bs-target","#collapse"+n+r.id())("aria-controls","#collapse"+n+r.id()),a(2),c("src",r.getChannelLogo(t.TypeID),k),a(),c("matTooltip",(t==null||t.ChannelName==null?null:t.ChannelName.length)>30?t==null?null:t.ChannelName:""),a(),L(t==null?null:t.ChannelName),a();let T=$(t==null||t.Variants==null?null:t.Variants.length);a(),g(T>1&&((i=r.channels())==null?null:i.length)>1?8:-1),a(),c("id","collapse"+n+r.id()),I("aria-labelledby","heading"+n+r.id()),a(2),b(t==null?null:t.Variants)}}var le=(()=>{let o=class o{constructor(){this.biggerPictureService=v(ne),this.totalChannel=_(0),this.imageForZoom=_(void 0),this.title=_(void 0),this.channels=_(void 0),this.id=_(void 0)}getChannelLogo(t){return y.getChannelLogoByTypeId(t)}onZoomImage(t){this.biggerPictureService.openBiggerPicture(t,this.imageForZoom())}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=w({type:o,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",code:"code",totalChannel:[1,"totalChannel"],imageForZoom:[1,"imageForZoom"],title:[1,"title"],channels:[1,"channels"],id:[1,"id"]},decls:17,vars:4,consts:[[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"ngSrc","fill"],["ngSrc","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload",3,"fill"],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],[1,"description"],[1,"fs-5"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],[1,"accordion-item","border-start-0","border-end-0",3,"ngClass"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"click","ngSrc","fill"],[1,"fa","fa-barcode","me-2"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],[1,"fs-4","ms-2"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"ngClass"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"]],template:function(n,r){n&1&&(l(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),u(6,se,1,2,"img",6)(7,me,1,1,"img",7),d()()(),l(8,"div",8)(9,"h4",9),s(10),d(),u(11,ue,4,1,"div",10),u(12,ge,3,3,"div",11),d()()(),l(13,"div",12)(14,"div",13),x(15,_e,13,13,"div",14,P),d()()()),n&2&&(a(6),g(r.image?6:7),a(4),F(" ",r.title()," "),a(),g(r.code?11:-1),a(),g(r.totalChannel()?12:-1),a(3),b(r.channels()))},dependencies:[H,G,M,Y,X,q,W],styles:[`.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}`]});let e=o;return e})();function fe(e,o){if(e&1&&(l(0,"div",8),m(1,"app-duplicate-product-card",11),d()),e&2){let i=o.$implicit,t=o.$index;a(),c("imageForZoom",i.ImageUrl)("title",i.Name)("code",i.Code)("id",t)("image",i.ThumbnailURL)("channels",i.Channels)("totalChannel",i.Total)}}function ve(e,o){e&1&&(l(0,"div",9),m(1,"app-empty-state"),d())}function xe(e,o){if(e&1){let i=D();l(0,"div",10)(1,"div",12)(2,"app-custom-paginator",13),S("next",function(){h(i);let n=p();return C(n.getProducts())})("previous",function(){h(i);let n=p();return C(n.getProducts())})("total",function(){h(i);let n=p();return C(n.getRowCount())}),d()()()}if(e&2){let i=p();a(2),c("filter",i.searchFilter)("totaldata",i.products==null?null:i.products.length)("paginationTotal",i.rowCount)("hasClicked",i.hasClickedRowCount)}}var qe=(()=>{let o=class o{constructor(){this.httpService=v(A),this.productService=v(te),this.searchFilter=new ie,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(n=>{this.products=n.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=y.GuidEMpty}getChannelLogo(t){return y.getChannelLogoByTypeId(t)}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=w({type:o,selectors:[["app-duplicate-sku"]],decls:19,vars:4,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["routerLink","/menu/products/status/duplicate-sku/table",1,"btn","btn-outline-secondary","btn-lg","d-flex","align-items-center","gap-2"],[1,"fa-solid","fa-table"],["container",""],[1,"mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-8","mx-1"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[3,"imageForZoom","title","code","id","image","channels","totalChannel"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,r){n&1&&(l(0,"mainpanel",0),S("onSubmit",function(f){return r.onSearch(f)}),l(1,"actions")(2,"a",1),m(3,"i",2),l(4,"span"),s(5,"Table View"),d()()(),l(6,"filters")(7,"div",3)(8,"div")(9,"h6",4),s(10,"Channel"),d(),l(11,"app-channel-options-v2",5),Z("ngModelChange",function(f){return U(r.searchFilter.ListChannelID,f)||(r.searchFilter.ListChannelID=f),f}),d()()()(),l(12,"content")(13,"div",6)(14,"div",7),x(15,fe,2,7,"div",8,P),u(17,ve,2,0,"div",9),d(),u(18,xe,3,4,"div",10),d()()()),n&2&&(a(11),c("multiple",!0),B("ngModel",r.searchFilter.ListChannelID),a(4),b(r.products),a(2),g((r.products==null?null:r.products.length)==0?17:-1),a(),g((r.products==null?null:r.products.length)>0?18:-1))},dependencies:[ee,K,re,M,J,Q,le,oe,ae],encapsulation:2});let e=o;return e})();export{qe as DuplicateSkuComponent};
1
+ import{a as re}from"./chunk-ZXFWQ6VJ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as ie}from"./chunk-7KG3DC5J.js";import{a as ae}from"./chunk-ZZYFVEJO.js";import{a as ne}from"./chunk-DLHIDOS3.js";import{a as oe}from"./chunk-27DIE2YS.js";import{a as te}from"./chunk-LCN52IJT.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-BKCKASH3.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as ee}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as Y}from"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import{c as X}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-62YNPW6Q.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{c as y}from"./chunk-UPRDDI4K.js";import{A as M,h as J,m as Q}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as A}from"./chunk-D6JH2KV4.js";import{e as K}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as W,B as H,H as q,q as G}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as w,Nc as s,Oc as L,Pc as F,Qc as O,Rc as B,Sc as U,Tc as Z,Uc as j,Vc as $,Wc as z,_b as I,ac as u,ad as E,cc as g,dc as V,ec as P,fc as x,gc as b,hc as c,ic as l,id as N,jc as d,jd as R,kc as m,mb as k,ob as a,ra as v,rc as D,ud as _,wc as S,ya as h,yc as p,za as C}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var ce=e=>({"border-bottom-0":e}),pe=e=>({"border-bottom":e});function se(e,o){if(e&1){let i=D();l(0,"img",15),S("click",function(n){h(i);let r=p();return C(r.onZoomImage(n))}),d()}if(e&2){let i=p();c("ngSrc",i.image)("fill",!0)}}function me(e,o){e&1&&m(0,"img",7),e&2&&c("fill",!0)}function ue(e,o){if(e&1&&(l(0,"div",10),m(1,"i",16),l(2,"span"),s(3),d()()),e&2){let i=p();a(3),L(i.code)}}function ge(e,o){if(e&1&&(l(0,"div",11),s(1),N(2,"number"),d()),e&2){let i=p();a(),F("",R(2,1,i.totalChannel())," Listing")}}function he(e,o){if(e&1&&(l(0,"div",22),s(1),N(2,"number"),d()),e&2){p();let i=z(7);a(),F(" (",R(2,1,i)," Listing) ")}}function Ce(e,o){if(e&1&&(l(0,"div",25)(1,"div",26),s(2),d(),l(3,"div")(4,"a",27),m(5,"i",28),d()()()),e&2){let i=o.$implicit,t=o.$index,n=p().$implicit;c("ngClass",E(4,pe,t!==(n==null?null:n.Variants.length)-1)),a(2),O(" ",i.ProductName," - ",i.Name," "),a(2),c("href",i.URL,k)}}function _e(e,o){if(e&1&&(l(0,"div",14)(1,"h2",17)(2,"button",18)(3,"div",19),m(4,"img",20),l(5,"span",21),s(6),d(),j(7),u(8,he,3,3,"div",22),d()()(),l(9,"div",23)(10,"div",24),x(11,Ce,6,6,"div",25,V),d()()()),e&2){let i,t=o.$implicit,n=o.$index,r=p();c("ngClass",E(11,ce,r.channels().length-1==n)),a(),c("id","heading"+n+r.id()),a(),I("data-bs-target","#collapse"+n+r.id())("aria-controls","#collapse"+n+r.id()),a(2),c("src",r.getChannelLogo(t.TypeID),k),a(),c("matTooltip",(t==null||t.ChannelName==null?null:t.ChannelName.length)>30?t==null?null:t.ChannelName:""),a(),L(t==null?null:t.ChannelName),a();let T=$(t==null||t.Variants==null?null:t.Variants.length);a(),g(T>1&&((i=r.channels())==null?null:i.length)>1?8:-1),a(),c("id","collapse"+n+r.id()),I("aria-labelledby","heading"+n+r.id()),a(2),b(t==null?null:t.Variants)}}var le=(()=>{let o=class o{constructor(){this.biggerPictureService=v(ne),this.totalChannel=_(0),this.imageForZoom=_(void 0),this.title=_(void 0),this.channels=_(void 0),this.id=_(void 0)}getChannelLogo(t){return y.getChannelLogoByTypeId(t)}onZoomImage(t){this.biggerPictureService.openBiggerPicture(t,this.imageForZoom())}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=w({type:o,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",code:"code",totalChannel:[1,"totalChannel"],imageForZoom:[1,"imageForZoom"],title:[1,"title"],channels:[1,"channels"],id:[1,"id"]},decls:17,vars:4,consts:[[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"ngSrc","fill"],["ngSrc","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload",3,"fill"],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],[1,"description"],[1,"fs-5"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],[1,"accordion-item","border-start-0","border-end-0",3,"ngClass"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"click","ngSrc","fill"],[1,"fa","fa-barcode","me-2"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],[1,"fs-4","ms-2"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"ngClass"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"]],template:function(n,r){n&1&&(l(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),u(6,se,1,2,"img",6)(7,me,1,1,"img",7),d()()(),l(8,"div",8)(9,"h4",9),s(10),d(),u(11,ue,4,1,"div",10),u(12,ge,3,3,"div",11),d()()(),l(13,"div",12)(14,"div",13),x(15,_e,13,13,"div",14,P),d()()()),n&2&&(a(6),g(r.image?6:7),a(4),F(" ",r.title()," "),a(),g(r.code?11:-1),a(),g(r.totalChannel()?12:-1),a(3),b(r.channels()))},dependencies:[H,G,M,Y,X,q,W],styles:[`.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}`]});let e=o;return e})();function fe(e,o){if(e&1&&(l(0,"div",8),m(1,"app-duplicate-product-card",11),d()),e&2){let i=o.$implicit,t=o.$index;a(),c("imageForZoom",i.ImageUrl)("title",i.Name)("code",i.Code)("id",t)("image",i.ThumbnailURL)("channels",i.Channels)("totalChannel",i.Total)}}function ve(e,o){e&1&&(l(0,"div",9),m(1,"app-empty-state"),d())}function xe(e,o){if(e&1){let i=D();l(0,"div",10)(1,"div",12)(2,"app-custom-paginator",13),S("next",function(){h(i);let n=p();return C(n.getProducts())})("previous",function(){h(i);let n=p();return C(n.getProducts())})("total",function(){h(i);let n=p();return C(n.getRowCount())}),d()()()}if(e&2){let i=p();a(2),c("filter",i.searchFilter)("totaldata",i.products==null?null:i.products.length)("paginationTotal",i.rowCount)("hasClicked",i.hasClickedRowCount)}}var qe=(()=>{let o=class o{constructor(){this.httpService=v(A),this.productService=v(te),this.searchFilter=new ie,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(n=>{this.products=n.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=y.GuidEMpty}getChannelLogo(t){return y.getChannelLogoByTypeId(t)}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=w({type:o,selectors:[["app-duplicate-sku"]],decls:19,vars:4,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["routerLink","/menu/products/status/duplicate-sku/table",1,"btn","btn-outline-secondary","btn-lg","d-flex","align-items-center","gap-2"],[1,"fa-solid","fa-table"],["container",""],[1,"mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-8","mx-1"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[3,"imageForZoom","title","code","id","image","channels","totalChannel"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,r){n&1&&(l(0,"mainpanel",0),S("onSubmit",function(f){return r.onSearch(f)}),l(1,"actions")(2,"a",1),m(3,"i",2),l(4,"span"),s(5,"Table View"),d()()(),l(6,"filters")(7,"div",3)(8,"div")(9,"h6",4),s(10,"Channel"),d(),l(11,"app-channel-options-v2",5),Z("ngModelChange",function(f){return U(r.searchFilter.ListChannelID,f)||(r.searchFilter.ListChannelID=f),f}),d()()()(),l(12,"content")(13,"div",6)(14,"div",7),x(15,fe,2,7,"div",8,P),u(17,ve,2,0,"div",9),d(),u(18,xe,3,4,"div",10),d()()()),n&2&&(a(11),c("multiple",!0),B("ngModel",r.searchFilter.ListChannelID),a(4),b(r.products),a(2),g((r.products==null?null:r.products.length)==0?17:-1),a(),g((r.products==null?null:r.products.length)>0?18:-1))},dependencies:[ee,K,re,M,J,Q,le,oe,ae],encapsulation:2});let e=o;return e})();export{qe as DuplicateSkuComponent};