dealpos 25.51.0 → 25.51.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-OURNAI65.js → chunk-243EB36Y.js} +2 -2
- package/browser/{chunk-5HIJCKLY.js → chunk-3K2A4Z67.js} +1 -1
- package/browser/{chunk-43G72GH2.js → chunk-4OP4E5Q4.js} +1 -1
- package/browser/{chunk-V6NXOOJA.js → chunk-4PDGY62B.js} +1 -1
- package/browser/{chunk-WR54IKY6.js → chunk-54SK3PVO.js} +1 -1
- package/browser/{chunk-VQKO557Q.js → chunk-55Z32OLJ.js} +1 -1
- package/browser/{chunk-SVUFU2AS.js → chunk-5XTMPVSF.js} +1 -1
- package/browser/{chunk-67UFIJ2O.js → chunk-6OULAYGH.js} +1 -1
- package/browser/{chunk-HIA4J5DB.js → chunk-6VYP636I.js} +1 -1
- package/browser/{chunk-PV27CMZ2.js → chunk-7264OPXA.js} +1 -1
- package/browser/{chunk-XWV7AI2C.js → chunk-7OQXKVTC.js} +1 -1
- package/browser/{chunk-6UY42XOC.js → chunk-AB7O2ERM.js} +1 -1
- package/browser/{chunk-T5IJP474.js → chunk-ABOSNV75.js} +1 -1
- package/browser/{chunk-HHCNN3XR.js → chunk-BCGNQKO5.js} +1 -1
- package/browser/{chunk-RU3GD3GY.js → chunk-BRQVQGLJ.js} +1 -1
- package/browser/{chunk-2EHLYOAD.js → chunk-BWVEZ3MZ.js} +1 -1
- package/browser/{chunk-RHDU4PR2.js → chunk-CAGFIP4G.js} +1 -1
- package/browser/{chunk-4MWVPOV6.js → chunk-CJ4ET4PG.js} +1 -1
- package/browser/{chunk-CRKJEU3Z.js → chunk-CR5CHTI7.js} +1 -1
- package/browser/{chunk-4CYACZL5.js → chunk-DAH4EEQV.js} +1 -1
- package/browser/{chunk-SCHTN7VQ.js → chunk-DBRZ7F2Z.js} +1 -1
- package/browser/{chunk-VA6MHJ5E.js → chunk-DNY4JYTC.js} +1 -1
- package/browser/{chunk-IM3B5EF2.js → chunk-E5TUY2II.js} +1 -1
- package/browser/chunk-EFDMYOLZ.js +4 -0
- package/browser/{chunk-NRTKHF45.js → chunk-EMHEIQNS.js} +1 -1
- package/browser/{chunk-QS2AUXB7.js → chunk-FEHMPX43.js} +1 -1
- package/browser/{chunk-WQMYMJLR.js → chunk-FVFTYYCC.js} +1 -1
- package/browser/{chunk-BVOUQJCA.js → chunk-GE5I6JYL.js} +1 -1
- package/browser/{chunk-ZNPC63ZV.js → chunk-GZ6OVEDL.js} +1 -1
- package/browser/{chunk-NQQB5U5S.js → chunk-H6RHVRGW.js} +1 -1
- package/browser/{chunk-6LZENMYE.js → chunk-HLCZLXPS.js} +1 -1
- package/browser/{chunk-N6EBK52R.js → chunk-IF6EZMOM.js} +2 -2
- package/browser/{chunk-OTLU2WY3.js → chunk-ISZRZRCT.js} +2 -2
- package/browser/{chunk-I7AQHKKG.js → chunk-JHBK7LOJ.js} +1 -1
- package/browser/{chunk-PQSGJR4P.js → chunk-KDISSQKT.js} +1 -1
- package/browser/{chunk-5ZPO7V26.js → chunk-KFC3V2GW.js} +1 -1
- package/browser/{chunk-KEILLJ6G.js → chunk-KHB5Q7IN.js} +1 -1
- package/browser/{chunk-P5XKSQ34.js → chunk-KIYO2YC2.js} +1 -1
- package/browser/{chunk-HVFYCXLX.js → chunk-KKM7I2BT.js} +1 -1
- package/browser/{chunk-DX56EYRS.js → chunk-LHTHIOAY.js} +1 -1
- package/browser/{chunk-A5LIALQE.js → chunk-M4FNFZNJ.js} +1 -1
- package/browser/{chunk-TOJPS7BJ.js → chunk-MEL6Z4NI.js} +1 -1
- package/browser/{chunk-XVTXHAKW.js → chunk-MHPLYS7O.js} +1 -1
- package/browser/{chunk-ZO3XZXWW.js → chunk-MJCLLJBB.js} +1 -1
- package/browser/{chunk-2GIDUMXS.js → chunk-MZDVGN2B.js} +1 -1
- package/browser/{chunk-SUCJCOST.js → chunk-NYMHQHNP.js} +1 -1
- package/browser/{chunk-6AHKVKAZ.js → chunk-O7SYLGUB.js} +2 -2
- package/browser/{chunk-OZ2R2K2V.js → chunk-OF3BZHBQ.js} +1 -1
- package/browser/{chunk-H2RXYP7A.js → chunk-OFWJY5WB.js} +1 -1
- package/browser/{chunk-3HDEMBWS.js → chunk-ORTAUDOX.js} +1 -1
- package/browser/{chunk-4OTZNFYS.js → chunk-PSLGWGNP.js} +1 -1
- package/browser/{chunk-MUWJSYXR.js → chunk-Q22HR52N.js} +1 -1
- package/browser/{chunk-ZNJ4JTTS.js → chunk-QEL7CGCP.js} +1 -1
- package/browser/{chunk-57WKDIDF.js → chunk-QHGZQ2IG.js} +1 -1
- package/browser/{chunk-6F45DEGR.js → chunk-R6DRKF4V.js} +8 -8
- package/browser/{chunk-HHM4L75O.js → chunk-RDASAJA5.js} +1 -1
- package/browser/{chunk-HSLDD424.js → chunk-RPBIQ4ME.js} +1 -1
- package/browser/{chunk-DJUOMCAV.js → chunk-RT7OZJYZ.js} +1 -1
- package/browser/{chunk-3PKJLXTC.js → chunk-RWW55Z7V.js} +1 -1
- package/browser/{chunk-V36Z6WRV.js → chunk-RWZGTR3S.js} +1 -1
- package/browser/{chunk-YXRJV3RQ.js → chunk-SQAFHZEO.js} +1 -1
- package/browser/{chunk-RF5FWMSR.js → chunk-T43ISYOP.js} +1 -1
- package/browser/{chunk-6O6OE4KQ.js → chunk-TKHSLAZH.js} +13 -13
- package/browser/{chunk-OAVGNXY4.js → chunk-TYVVSM36.js} +1 -1
- package/browser/{chunk-D7YMUC3H.js → chunk-U6FO6TSU.js} +1 -1
- package/browser/{chunk-XPN6EISF.js → chunk-UFVN6MTY.js} +1 -1
- package/browser/{chunk-VOY3BJZP.js → chunk-UI6U53UY.js} +1 -1
- package/browser/{chunk-B6TCVVAN.js → chunk-UPV6ZIB5.js} +1 -1
- package/browser/{chunk-6GCAXVFO.js → chunk-VG3B7TDX.js} +1 -1
- package/browser/{chunk-OR4H5IKL.js → chunk-VS6CGXUJ.js} +1 -1
- package/browser/{chunk-T6GXIGYG.js → chunk-WDUPZI6X.js} +1 -1
- package/browser/{chunk-TCW7SVU5.js → chunk-WTIIZBRC.js} +1 -1
- package/browser/{chunk-HQGZC4Y3.js → chunk-XCSDEGWL.js} +1 -1
- package/browser/{chunk-WFTIOB7Q.js → chunk-XDFUPYND.js} +1 -1
- package/browser/{chunk-3XDE3GJ3.js → chunk-XFU3EMCG.js} +1 -1
- package/browser/{chunk-7JBFR3T4.js → chunk-XGXXFTMA.js} +1 -1
- package/browser/{chunk-DCONKX6G.js → chunk-XMPWQ5UV.js} +1 -1
- package/browser/{chunk-ECW7GAZQ.js → chunk-XPM7J5AN.js} +1 -1
- package/browser/{chunk-HZP6OUOI.js → chunk-XW7VJLDW.js} +1 -1
- package/browser/{chunk-MTUBVUM5.js → chunk-Y6SAXN2J.js} +1 -1
- package/browser/{chunk-A2EDYIYP.js → chunk-YLXBICIW.js} +1 -1
- package/browser/{chunk-IHIJW73V.js → chunk-Z5HEFUTD.js} +1 -1
- package/browser/{chunk-YC2LQSY3.js → chunk-ZRJU5XBX.js} +1 -1
- package/browser/index.html +2 -2
- package/browser/{main-PHIUFC5R.js → main-6NLSRECT.js} +2 -2
- package/package.json +1 -1
- package/browser/chunk-QERITLZK.js +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ae,b as le}from"./chunk-P7KMHPVN.js";import"./chunk-U4MC22BG.js";import{a as ie}from"./chunk-HYCKETL4.js";import"./chunk-SMEVWRVE.js";import"./chunk-AJAUI7BA.js";import"./chunk-MWGICBEB.js";import{e as de,f as ce}from"./chunk-
|
|
1
|
+
import{a as ae,b as le}from"./chunk-P7KMHPVN.js";import"./chunk-U4MC22BG.js";import{a as ie}from"./chunk-HYCKETL4.js";import"./chunk-SMEVWRVE.js";import"./chunk-AJAUI7BA.js";import"./chunk-MWGICBEB.js";import{e as de,f as ce}from"./chunk-MZDVGN2B.js";import"./chunk-7YYWBCWJ.js";import"./chunk-CCIHCGP5.js";import"./chunk-RWW55Z7V.js";import{a as pe,b as me}from"./chunk-XPM7J5AN.js";import"./chunk-E634BI4W.js";import"./chunk-BAXZ74LK.js";import"./chunk-3ZH3XK5V.js";import"./chunk-V6D6TV7B.js";import{O as H}from"./chunk-QWLNF7VL.js";import{d as ue,e as se}from"./chunk-SCGKVOSE.js";import{a as re}from"./chunk-N5RDRDT7.js";import"./chunk-N7OS7SFI.js";import"./chunk-RIZ4YVMH.js";import"./chunk-2FWFPV5I.js";import"./chunk-Z76C52NM.js";import{F as te,c as Y,h as Z,o as ee}from"./chunk-7MRUPBXU.js";import"./chunk-ABOSNV75.js";import"./chunk-RT7OZJYZ.js";import"./chunk-5RYL4EJ2.js";import{b as oe}from"./chunk-KBLVOO4J.js";import{a as h}from"./chunk-WUV22SZ4.js";import"./chunk-H6RHVRGW.js";import{s as ne}from"./chunk-TANYEHMZ.js";import{Ab as y,Ac as $,Ca as D,Cb as C,Eb as T,Fb as V,Gb as k,Hb as s,Hc as d,Ib as o,Ic as f,Jb as r,Jc as A,Kb as O,Nc as j,Pd as K,Qa as L,Rb as w,Sd as Q,Ub as G,Ud as X,Wb as u,Xa as l,Y as b,eb as M,fa as R,ib as U,jc as p,kc as g,mb as B,ob as F,oc as P,pa as v,pc as I,qc as E,qd as q,rc as N,sd as z,ta as c,ua as _,xd as J,zc as W}from"./chunk-L3U6V3BF.js";import"./chunk-WFMAM73Y.js";import{a as x,b as S}from"./chunk-SNAKHGZS.js";var ge=()=>["/menu/Users/User/Groups/Info"],fe=i=>({ID:i});function he(i,m){if(i&1){let e=w();o(0,"div",9)(1,"h6"),p(2,"Group"),r(),o(3,"ng-select",10),E("ngModelChange",function(t){c(e);let a=u(2);return I(a.filter().GroupID,t)||(a.filter().GroupID=t),_(t)}),r(),o(4,"h6"),p(5,"Row Count"),r(),o(6,"input",11),E("ngModelChange",function(t){c(e);let a=u(2);return I(a.filter().RowCount,t)||(a.filter().RowCount=t),_(t)}),r()()}if(i&2){let e=u(2);l(3),s("items",e.options().Groups),P("ngModel",e.filter().GroupID),l(3),s("max",1e4),P("ngModel",e.filter().RowCount)}}function ye(i,m){if(i&1&&(o(0,"a",12),p(1),r()),i&2){let e=u().$implicit;s("routerLink",W(3,ge))("queryParams",$(4,fe,e._source==null||e._source.Log==null?null:e._source.Log.id)),l(),g(e._source==null||e._source.Log==null?null:e._source.Log.name)}}function Ce(i,m){if(i&1&&(o(0,"span"),p(1),r()),i&2){let e=u().$implicit;l(),g(e._source==null||e._source.Log==null?null:e._source.Log.name)}}function xe(i,m){if(i&1&&(o(0,"tr",7)(1,"td"),y(2,ye,2,6,"a",12),y(3,Ce,2,1,"span"),r(),o(4,"td"),p(5),d(6,"date"),r(),o(7,"td"),p(8),r(),O(9,"td",13),d(10,"newlines"),r()),i&2){let e=m.$implicit,n=u(2);l(2),C(n.role.users.Edit?2:-1),l(),C(n.role.users.Edit?-1:3),l(2),g(A(6,5,e._source["@timestamp"],"dd MMM yyyy HH:mm")),l(3),g(e._source==null||e._source.Log==null?null:e._source.Log.creator),l(),s("innerHtml",f(10,8,e._source==null||e._source.Log==null?null:e._source.Log.note),L)}}function Se(i,m){if(i&1){let e=w();o(0,"mainpanel-cmp",2),G("onSubmit",function(){c(e);let t=u();return _(t.initData())}),o(1,"filters"),F(2,he,7,4,"ng-template",null,0,j),r(),o(4,"content")(5,"div",3)(6,"div",4)(7,"table",5)(8,"thead",6)(9,"tr")(10,"th"),p(11,"Group"),r(),o(12,"th"),p(13,"Modified"),r(),o(14,"th"),p(15,"Modify By"),r(),o(16,"th"),p(17,"Note"),r()()(),o(18,"tbody"),V(19,xe,11,10,"tr",7,T),d(21,"async"),r()(),o(22,"div"),N(23),d(24,"async"),o(25,"mat-paginator",8),G("page",function(t){c(e);let a=u();return _(a.onPaginationChange(t))}),r()()()()()()}if(i&2){let e,n,t=u();s("pageData",t.menuData)("isFilterOnDropdown",!1)("hideSearchBox",!0),l(19),k((e=f(21,6,t.data$))==null||e.Data==null?null:e.Data.hits);let a=(n=f(24,8,t.data$))==null||n.Data==null||n.Data.hits==null?null:n.Data.hits.length;l(6),s("length",a)("pageSize",t.filter().RowCount)("pageIndex",t.filter().PageNumber==0?0:t.filter().PageNumber-1)}}var _e=class i extends pe{constructor(e,n){super(e);this.role=n;this.menuData$.pipe(re()).subscribe();let t=this.routeSnapshot.snapshot?.queryParams?.ID;h.IsNotEmpty(t)&&(this.filter.update(a=>S(x({},a),{GroupID:t})),this.initData())}httpService=v(ne);routeSnapshot=v(K);filter=D({PageNumber:1,RowCount:20,GroupID:h.GuidEmpty});options=D({Groups:[]});loader$=this.httpService.get(H.GroupHistoryLoader).pipe(R(e=>{this.options.set(e.Options),this.initData()}),b(1));data$;initData(){let e=h.IsNotEmpty(this.filter().GroupID)?this.filter().GroupID:h.GuidEmpty;this.data$=this.httpService.get(H.GroupHistoryData,[{key:"PageNumber",value:this.filter().PageNumber},{key:"RowCount",value:this.filter().RowCount},{key:"GroupID",value:e}]).pipe(b(1))}onPaginationChange(e){this.filter.update(n=>S(x({},n),{PageNumber:e.pageIndex+1})),this.initData()}static \u0275fac=function(n){return new(n||i)(M(me),M(oe))};static \u0275cmp=U({type:i,selectors:[["app-group-update-history"]],features:[B],decls:3,vars:3,consts:[["pageFilterTemplate",""],["searchBoxPlaceholder","Search Note...",3,"pageData","isFilterOnDropdown","hideSearchBox"],["searchBoxPlaceholder","Search Note...",3,"onSubmit","pageData","isFilterOnDropdown","hideSearchBox"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"border-bottom"],[3,"page","length","pageSize","pageIndex"],[1,"dialog-filter"],["bindLabel","Name","bindValue","ID","placeholder","Choose a group","appendTo","body",3,"ngModelChange","items","ngModel"],["type","text","autoNum","",1,"input-left","w-100","form-control","input-filter",3,"ngModelChange","max","ngModel"],[3,"routerLink","queryParams"],[3,"innerHtml"]],template:function(n,t){if(n&1&&(N(0),d(1,"async"),y(2,Se,26,10,"mainpanel-cmp",1)),n&2){let a=f(1,1,t.loader$);l(2),C(a?2:-1)}},dependencies:[J,ce,de,le,ae,X,Q,te,Y,Z,ee,se,ue,q,z,ie],encapsulation:2})};export{_e as GroupUpdateHistoryComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ve}from"./chunk-TPJWIEYA.js";import{b as fe,c as ye}from"./chunk-ZV4K4PP6.js";import{g as Ce}from"./chunk-P3TFDLWR.js";import{c as ge,d as _e}from"./chunk-
|
|
1
|
+
import{a as ve}from"./chunk-TPJWIEYA.js";import{b as fe,c as ye}from"./chunk-ZV4K4PP6.js";import{g as Ce}from"./chunk-P3TFDLWR.js";import{c as ge,d as _e}from"./chunk-RWW55Z7V.js";import{A as de,G as he}from"./chunk-3ZH3XK5V.js";import{b as me,c as ce}from"./chunk-V6D6TV7B.js";import{M as pe,N as ue}from"./chunk-QWLNF7VL.js";import{F as le,G as ae,h as oe,o as se}from"./chunk-7MRUPBXU.js";import{p as ne,s as re}from"./chunk-TANYEHMZ.js";import{$b as Q,Ab as x,Ac as Y,Ca as w,Cb as V,Ha as y,Hb as g,Hc as Z,I as D,Ib as m,Ja as L,Jb as p,Jc as ee,Kb as T,Nc as te,Rb as E,Sa as j,Ub as C,Wb as u,Xa as c,Ya as d,_b as H,ac as q,c as k,db as R,e as N,eb as I,ec as B,fa as O,hc as W,ib as P,jc as v,kb as U,kc as A,la as K,lc as z,o as F,ob as $,oc as G,pa as f,pc as J,qc as X,ta as a,ua as r,xd as ie,zc as S}from"./chunk-L3U6V3BF.js";var b=class o{selectionsSubject=new N(new Map);getSelectedItems(i){return this.selectionsSubject.value.get(i)||[]}setSelectedItems(i,e){let t=new Map(this.selectionsSubject.value);t.set(i,[...e]),this.selectionsSubject.next(t)}clearSelectedItems(i){let e=new Map(this.selectionsSubject.value);e.delete(i),this.selectionsSubject.next(e)}getSelectedItems$(i){return new k(e=>{let t=this.selectionsSubject.subscribe(n=>{e.next(n.get(i)||[])});return()=>t.unsubscribe()})}getAllSelections(){return this.selectionsSubject.value}clearAllSelections(){this.selectionsSubject.next(new Map)}static \u0275fac=function(e){return new(e||o)};static \u0275prov=K({token:o,factory:o.\u0275fac,providedIn:"root"})};var Ee=["autocomplete"],be=()=>({width:"100%"}),Ae=()=>({width:"100%",maxWidth:"400px"}),ke=o=>({style:o});function Ne(o,i){if(o&1&&T(0,"img",10),o&2){let e=u(2).$implicit,t=u();g("src",e[t.thumbnailKey],j)}}function Fe(o,i){o&1&&(m(0,"div",11),T(1,"i",12),p())}function De(o,i){if(o&1&&(m(0,"div"),x(1,Ne,1,1,"img",10)(2,Fe,2,0,"div",11),p()),o&2){let e=u().$implicit,t=u();c(),V(e[t.thumbnailKey]&&e[t.thumbnailKey].trim()!==""?1:2)}}function Oe(o,i){if(o&1){let e=E();m(0,"div",5),C("click",function(n){let s=a(e).$implicit,l=u();return r(l.toggleCheckbox(s,n))})("mouseenter",function(n){return a(e),r(n.stopPropagation())})("mouseleave",function(n){return a(e),r(n.stopPropagation())}),m(1,"p-checkbox",6),X("ngModelChange",function(n){let s=a(e).$implicit;return J(s._checked,n)||(s._checked=n),r(n)}),C("onChange",function(){let n=a(e).$implicit,s=u();return r(s.onCheckboxChange(n))})("click",function(n){return a(e),r(n.stopPropagation())}),p(),x(2,De,3,1,"div"),m(3,"div",7)(4,"div",8),v(5),Z(6,"TruncateText"),p(),m(7,"div",9),v(8),p()()()}if(o&2){let e=i.$implicit,t=u();g("matTooltip",e[t.valueField].length>40?e[t.valueField]:""),c(),G("ngModel",e._checked),g("binary",!0),c(),V(t.showThumbnail?2:-1),c(3),A(ee(6,6,e[t.valueField],40)),c(3),z(" ",e.Code," ")}}var Me=class o{autocomplete;matTooltip;modelName;isMultiple=!0;placeholder="Search";isShowEmptyMessage=!1;emptyMessage="No results found";tooltipMessage="";valueField="Name";paramsKey="Key";label;listDataEndpoint;showThumbnail=!1;thumbnailKey="";maxSelectedItems=0;modelNameChange=new d;onSelectItem=new d;onRemoveItem=new d;completeMethod=new d;onSelect=new d;onUnselect=new d;httpService=f(re);toastr=f(ne);autocompleteV3Service=f(b);selectedItems=w([]);suggestionList;internalSuggestionList=w([]);ngOnInit(){if(this.isMultiple&&this.modelName&&Array.isArray(this.modelName)&&this.modelName.length>0){if(this.suggestionList&&this.suggestionList.length>0){let e=this.modelName.map(t=>this.suggestionList.find(n=>n[this.paramsKey]===t)).filter(t=>t!==void 0);if(e.length>0){this.selectedItems.set(e),this.autocompleteV3Service.setSelectedItems(this.listDataEndpoint,e);return}}let i=this.autocompleteV3Service.getSelectedItems(this.listDataEndpoint);if(i&&i.length>0){let e=i.filter(t=>this.modelName.includes(t[this.paramsKey]));if(e.length>0){this.selectedItems.set(e);return}}}}ngOnChanges(i){let e=i.modelName;e&&e?.currentValue?.length===0&&this.resetSelection()}resetSelection(){this.selectedItems.set([])}onModelChange(i){if(this.isMultiple&&Array.isArray(i)){this.selectedItems.set(i),this.autocompleteV3Service.setSelectedItems(this.listDataEndpoint,i);let e=i.map(t=>t[this.paramsKey]);this.modelNameChange.emit(e)}else this.isMultiple||this.modelNameChange.emit(i)}onCompleteHandler(i){let e=i.query;if(this.suggestionList&&this.suggestionList.length>0){let s=this.selectedItems(),l=this.suggestionList.filter(h=>{let _=e.toLowerCase(),M=(h.Name||"").toLowerCase(),Ie=(h.Key||"").toLowerCase(),xe=M.includes(_)||Ie.includes(_),Ve=!s.some(Te=>Te[this.paramsKey]===h[this.paramsKey]);return xe&&Ve});this.internalSuggestionList.set(l);return}let t=new URLSearchParams({Prefix:e,Count:"100"}).toString(),n=this.listDataEndpoint;n&&this.httpService.get(`${n}?${t}`).pipe(D(()=>F([])),O(s=>{let l=this.selectedItems(),h=s.filter(_=>!l.some(M=>M[this.paramsKey]===_[this.paramsKey]));this.internalSuggestionList.set(h)})).subscribe()}onSelectHandler(i){let e=this.isMultiple,t=this.maxSelectedItems;if(e&&t>0){let n=this.selectedItems();if(n.length>=t){this.toastr.warning(`Maximum ${t} items can be selected`,"Selection Limit"),setTimeout(()=>{this.modelNameChange.emit([...n])},0);return}}this.onSelectItem.emit(i),this.onSelect.emit(i)}onRemoveHandler(i){this.onRemoveItem.emit(i.value),this.onUnselect.emit(i.value),i.value&&(i.value._checked=!1)}isChecked(i){let e=this.selectedItems(),t=this.valueField;return e.some(n=>n[t]===i[t])}clearSelections(){this.selectedItems.set([]),this.autocompleteV3Service.clearSelectedItems(this.listDataEndpoint),this.modelNameChange.emit([])}getCurrentSelectionsFromService(){return this.autocompleteV3Service.getSelectedItems(this.listDataEndpoint)}onCheckboxChange(i){if(i._checked)this.isChecked(i)||(this.selectedItems.set([...this.selectedItems(),i]),this.onModelChange(this.selectedItems()));else{let e=this.selectedItems().filter(t=>t[this.paramsKey]!==i[this.paramsKey]);this.selectedItems.set(e),this.onModelChange(e)}setTimeout(()=>{this.autocomplete&&this.autocomplete.inputEL.nativeElement.focus()},0)}toggleCheckbox(i,e){i._checked=!i._checked,this.onCheckboxChange(i),e.stopPropagation()}ngOnDestroy(){}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=P({type:o,selectors:[["autocompleteV3"]],viewQuery:function(e,t){if(e&1&&H(Ee,5),e&2){let n;Q(n=q())&&(t.autocomplete=n.first)}},inputs:{matTooltip:"matTooltip",modelName:"modelName",isMultiple:"isMultiple",placeholder:"placeholder",isShowEmptyMessage:"isShowEmptyMessage",emptyMessage:"emptyMessage",tooltipMessage:"tooltipMessage",valueField:"valueField",paramsKey:"paramsKey",label:"label",listDataEndpoint:"listDataEndpoint",showThumbnail:"showThumbnail",thumbnailKey:"thumbnailKey",maxSelectedItems:"maxSelectedItems"},outputs:{modelNameChange:"modelNameChange",onSelectItem:"onSelectItem",onRemoveItem:"onRemoveItem",completeMethod:"completeMethod",onSelect:"onSelect",onUnselect:"onUnselect"},features:[y],decls:8,vars:19,consts:[["autocomplete",""],["item",""],[1,"d-flex","flex-column","gap-2",2,"margin-top","1rem"],[1,"w-100",2,"width","100%"],["matTooltipPosition","above",1,"w-100",3,"ngModelChange","completeMethod","onSelect","onUnselect","matTooltip","matTooltipDisabled","ngModel","suggestions","optionLabel","multiple","placeholder","showEmptyMessage","emptyMessage","inputStyle","overlayOptions"],["matTooltipPosition","above",1,"d-flex","align-items-center","gap-2","p-6","w-100",3,"click","mouseenter","mouseleave","matTooltip"],[2,"margin","0",3,"ngModelChange","onChange","click","ngModel","binary"],[1,"ms-2"],[1,"font-medium"],[1,"text-muted",2,"font-size","10px !important"],["width","30","height","30","brokenImageIconFailSafe","","brokenImageIconFailSafeClass","ms-2 empty-image d-flex justify-content-center align-items-center rounded-1",1,"ms-2","empty-image",3,"src"],[1,"empty-image","d-flex","justify-content-center","align-items-center","rounded-1","ms-2"],[1,"fa-solid","fa-image","fa-image-autocomplete",2,"color","#b4b4b4c2"]],template:function(e,t){if(e&1){let n=E();m(0,"div",2)(1,"h6"),v(2),p(),m(3,"div",3)(4,"p-autocomplete",4,0),C("ngModelChange",function(l){return a(n),r(t.onModelChange(l))})("completeMethod",function(l){return a(n),r(t.onCompleteHandler(l))})("onSelect",function(l){return a(n),r(t.onSelectHandler(l))})("onUnselect",function(l){return a(n),r(t.onRemoveHandler(l))}),$(6,Oe,9,9,"ng-template",null,1,te),p()()()}if(e&2){let n=B(5);c(2),A(t.label),c(2),W(S(14,be)),g("matTooltip",t.tooltipMessage)("matTooltipDisabled",n==null?null:n.overlayVisible)("ngModel",t.selectedItems())("suggestions",t.internalSuggestionList())("optionLabel",t.valueField)("multiple",t.isMultiple)("placeholder",t.placeholder)("showEmptyMessage",t.isShowEmptyMessage)("emptyMessage",t.emptyMessage)("inputStyle",S(15,be))("overlayOptions",Y(17,ke,S(16,Ae)))}},dependencies:[de,ie,ae,oe,le,se,ce,me,he,Ce,ye,fe,_e,ge,ve,ue,pe],styles:["div[_ngcontent-%COMP%] > .empty-image[_ngcontent-%COMP%]{height:32px;width:30px;border:solid 1px #dddddd}"]})};var we=class o{constructor(i,e){this.el=i;this.renderer=e}value=null;ngOnChanges(){if(this.value===null||this.value===void 0)return;this.renderer.removeClass(this.el.nativeElement,"text-black"),this.renderer.removeClass(this.el.nativeElement,"text-danger");let i=+this.value==0||+this.value>=1?"text-black":"text-danger";this.renderer.addClass(this.el.nativeElement,i)}static \u0275fac=function(e){return new(e||o)(I(L),I(R))};static \u0275dir=U({type:o,selectors:[["","colsFontColor",""]],inputs:{value:[0,"colsFontColor","value"]},features:[y]})};export{Me as a,we as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ge}from"./chunk-IDOUPEKS.js";import{a as ve}from"./chunk-RHDU4PR2.js";import{a as Ce}from"./chunk-FINTUPRM.js";import"./chunk-BYXBJQAS.js";import{e as ce,f as fe}from"./chunk-2GIDUMXS.js";import"./chunk-3PKJLXTC.js";import{b as se}from"./chunk-ECW7GAZQ.js";import"./chunk-E634BI4W.js";import"./chunk-BAXZ74LK.js";import{u as pe,v as me,w as ue}from"./chunk-3ZH3XK5V.js";import"./chunk-V6D6TV7B.js";import{O as k}from"./chunk-QWLNF7VL.js";import{e as ae,f as le,g as de}from"./chunk-N5RDRDT7.js";import"./chunk-N7OS7SFI.js";import"./chunk-RIZ4YVMH.js";import"./chunk-2FWFPV5I.js";import"./chunk-Z76C52NM.js";import{E as oe,F as te,G as ne,c as J,e as h,h as Y,i as X,p as Q,t as Z,w as ee}from"./chunk-7MRUPBXU.js";import"./chunk-T5IJP474.js";import"./chunk-DJUOMCAV.js";import"./chunk-5RYL4EJ2.js";import{b as re}from"./chunk-KBLVOO4J.js";import{a as F}from"./chunk-WUV22SZ4.js";import"./chunk-NQQB5U5S.js";import{p as z,s as ie}from"./chunk-TANYEHMZ.js";import{Ab as m,Ac as b,Bc as q,Ca as V,Cb as u,Db as O,E as T,Fb as U,Gb as H,Hb as p,Ib as i,Jb as r,Kb as c,Nc as K,Pd as W,Qb as $,Qc as L,Rb as G,Ub as v,Wb as C,Xa as l,eb as f,ec as j,ib as y,id as M,jc as a,kc as x,lc as w,mb as A,ob as I,pa as _,pd as B,t as D,ta as P,ua as E,xd as R}from"./chunk-L3U6V3BF.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var N=n=>({"is-invalid":n});function Ee(n,d){n&1&&(i(0,"div",16),a(1," Provider Name is required "),r())}function ye(n,d){n&1&&(i(0,"div",20),a(1," Validate Coupon URL is required "),r())}function Ge(n,d){n&1&&(i(0,"div",20),a(1," Redeem Coupon URL is required "),r())}function xe(n,d){n&1&&(i(0,"div",20),a(1,"Key is required"),r())}var S=class n{constructor(d){this.data=d;this.config=new pe,this.config.title="Register Provider",this.config.customWidth="600px",this.initForm()}dialogRef=_(ae);config;fb=_(oe);formGroup;initForm(){this.formGroup=this.fb.group({name:[this.data?.name||"",[h.required]],validateCoupon:[this.data?.validateCoupon||"",[h.required]],redeemCoupon:[this.data?.redeemCoupon||"",[h.required]],enabled:[this.data?.enabled!==void 0?this.data.enabled:!0],header:[this.data?.header,[h.required]]})}onClose(){this.dialogRef.close()}onOk(){this.formGroup.markAllAsTouched(),!this.formGroup.invalid&&this.dialogRef.close(this.formGroup.value)}static \u0275fac=function(e){return new(e||n)(f(le))};static \u0275cmp=y({type:n,selectors:[["app-modal-register-provider"]],decls:35,vars:18,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid","pt-4"],[1,"row"],[1,"col-12"],[3,"formGroup"],[1,"mb-8"],[1,"d-flex","align-items-center"],[1,"flex-grow-1","me-3"],[1,"form-floating-outline","mb-0"],["type","text","placeholder","Provider Name","id","name","name","name","formControlName","name",1,"form-control","bg-white",3,"ngClass"],["for","name"],[2,"width","75px"],[1,"form-check-floating"],[1,"d-flex","justify-content-center","pt-7","pb-4"],["formControlName","enabled"],[1,"labelFilledInput","text-center"],[1,"invalid-feedback","mt-2",2,"display","block"],[1,"form-floating-outline","mb-8"],["type","text","id","validateCoupon","name","validateCoupon","placeholder","Validate Coupon","formControlName","validateCoupon",1,"form-control","bg-white",3,"ngClass"],["for","validateCoupon"],[1,"invalid-feedback"],["type","text","id","redeemCoupon","placeholder","Redeem Coupon","name","redeemCoupon","formControlName","redeemCoupon",1,"form-control","bg-white",3,"ngClass"],["for","redeemCoupon"],[1,"form-floating-outline","mb-3"],["type","text","id","key","name","key","placeholder","Key: E.g. eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9","formControlName","header","rows","4",1,"form-control","bg-white",3,"ngClass"],["for","key"]],template:function(e,o){e&1&&(i(0,"modal-material",0),v("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()})("onClose",function(){return o.onClose()}),i(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8),c(10,"input",9),i(11,"label",10),a(12,"Coupon Provider"),r()()(),i(13,"div",11)(14,"div",12)(15,"div",13),c(16,"app-customize-toggle",14),r(),i(17,"label",15),a(18,"Enabled"),r()()()(),m(19,Ee,2,0,"div",16),r(),i(20,"div",17),c(21,"input",18),i(22,"label",19),a(23,"Validate Coupon URL"),r(),m(24,ye,2,0,"div",20),r(),i(25,"div",17),c(26,"input",21),i(27,"label",22),a(28,"Redeem Coupon URL"),r(),m(29,Ge,2,0,"div",20),r(),i(30,"div",23),c(31,"textarea",24),i(32,"label",25),a(33,"Request Header (Key: value)"),r(),m(34,xe,2,0,"div",20),r()()()()()()()),e&2&&(p("config",o.config),l(5),p("formGroup",o.formGroup),l(5),p("ngClass",b(10,N,(o.formGroup.controls.name==null?null:o.formGroup.controls.name.invalid)&&((o.formGroup.controls.name==null?null:o.formGroup.controls.name.dirty)||(o.formGroup.controls.name==null?null:o.formGroup.controls.name.touched)))),l(9),u(o.formGroup.controls.name.invalid&&(o.formGroup.controls.name.dirty||o.formGroup.controls.name.touched)?19:-1),l(2),p("ngClass",b(12,N,(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.invalid)&&((o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.dirty)||(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.touched)))),l(3),u(o.formGroup.controls.validateCoupon.invalid&&(o.formGroup.controls.validateCoupon.dirty||o.formGroup.controls.validateCoupon.touched)?24:-1),l(2),p("ngClass",b(14,N,(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.invalid)&&((o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.dirty)||(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.touched)))),l(3),u(o.formGroup.controls.redeemCoupon.invalid&&(o.formGroup.controls.redeemCoupon.dirty||o.formGroup.controls.redeemCoupon.touched)?29:-1),l(2),p("ngClass",b(16,N,(o.formGroup.controls.header==null?null:o.formGroup.controls.header.invalid)&&((o.formGroup.controls.header==null?null:o.formGroup.controls.header.dirty)||(o.formGroup.controls.header==null?null:o.formGroup.controls.header.touched)))),l(3),u(o.formGroup.controls.header.invalid&&(o.formGroup.controls.header.dirty||o.formGroup.controls.header.touched)?34:-1))},dependencies:[R,M,ne,Q,J,Y,X,Z,ee,ue,me,ge],styles:["div.form-check-floating[_ngcontent-%COMP%]{border:1px solid #ced4da;position:relative;border-radius:.25rem!important}.labelFilledInput[_ngcontent-%COMP%]{position:absolute;top:-10px;left:10px;background:#fff;padding-left:4px;padding-right:4px;font-size:.75rem!important;color:#9da2a6}"]})};var Me=(n,d)=>({"bg-success-subtle text-success-emphasis":n,"bg-danger-subtle text-danger-emphasis":d});function Re(n,d){if(n&1){let e=G();i(0,"button",10),v("click",function(){P(e);let t=C();return E(t.addNewCouponProvider())}),a(1," Add "),r()}}function Ne(n,d){n&1&&c(0,"th",8)}function Te(n,d){if(n&1){let e=G();i(0,"td",11)(1,"i",14),v("click",function(){P(e);let t=C().$index,s=C(2);return E(s.onDeleteProvider(t))}),r()()}}function Ie(n,d){if(n&1){let e=G();i(0,"tr"),m(1,Te,2,0,"td",11),i(2,"td")(3,"a",12),v("click",function(){let t=P(e),s=t.$implicit,g=t.$index,be=C(2);return E(be.onUpdateProvider(s,g))}),a(4),r()(),i(5,"td"),a(6),r(),i(7,"td"),a(8),r(),i(9,"td"),a(10),r(),i(11,"td")(12,"span",13),a(13),r()()()}if(n&2){let e=d.$implicit,o=C(2);l(),u(o.role.developer.Edit?1:-1),l(3),w(" ",e.Name," "),l(2),x(e.ValidateCoupon),l(2),x(e.RedeemCoupon),l(2),x(e.KeyUI),l(2),p("ngClass",q(7,Me,e.Enabled,!e.Enabled)),l(),w(" ",e.Enabled?"Enabled":"Disabled"," ")}}function we(n,d){if(n&1&&U(0,Ie,14,10,"tr",null,O),n&2){let e=C();H(e.listProviders())}}function Fe(n,d){n&1&&$(0)}function ke(n,d){if(n&1&&I(0,Fe,1,0,"ng-container",15),n&2){C();let e=j(25);p("ngTemplateOutlet",e)}}function De(n,d){n&1&&(i(0,"tr",16)(1,"td",17),c(2,"empty-state-table"),r()())}var _e=class n extends ve{constructor(e,o,t,s,g){super(e,o,k.WebhookCouponProviderLoader,t);this.activatedRoute=t;this.role=s;this.dialog=g}toastr=_(z);couponProviders=V([]);listProviders=L(()=>this.couponProviders().map(e=>(e.KeyUI=this.generateKeyUI(e.Header),e)));generateKeyUI(e){if(!e||e.length<=25)return e||"";let o=e.substring(0,10),t=e.substring(e.length-10);return`${o}...${t}`}postBindForm(e){this.couponProviders.update(()=>e.Form.CouponProviders.map(t=>({FetchMemberPoint:t.FetchMemberPoint,Enabled:t.Enabled,Name:t.Name,RedeemCoupon:t.RedeemCoupon,ValidateCoupon:t.ValidateCoupon,Header:t.Header})))}addNewCouponProvider(){this.dialog.open(S).afterClosed().pipe(T(e=>F.IsNotEmpty(e)),D(e=>{let o={Name:e.name,ValidateCoupon:e.validateCoupon,RedeemCoupon:e.redeemCoupon,Enabled:e.enabled,Header:e.header};return[...this.couponProviders(),o]})).subscribe(e=>{this.couponProviders.update(()=>e),this.saveCouponProviders(`Coupon provider "${e[e.length-1].Name}" has been successfully added.`)})}onUpdateProvider(e,o){this.dialog.open(S,{data:{name:e.Name,validateCoupon:e.ValidateCoupon,redeemCoupon:e.RedeemCoupon,enabled:e.Enabled,header:e.Header}}).afterClosed().pipe(T(t=>F.IsNotEmpty(t))).subscribe(t=>{let s={Name:t.name,ValidateCoupon:t.validateCoupon,RedeemCoupon:t.redeemCoupon,Enabled:t.enabled,Header:t.header};this.couponProviders.update(g=>(g[o]=s,[...g])),this.saveCouponProviders(`Coupon provider "${t.name}" has been successfully updated.`)})}onDeleteProvider(e){if(confirm("Are you sure you want to delete this coupon provider?")){let o=this.couponProviders()[e]?.Name||"provider";this.couponProviders.update(t=>(t.splice(e,1),[...t])),this.saveCouponProviders(`Coupon provider "${o}" has been successfully deleted.`)}}saveCouponProviders(e){this.httpService.post(k.WebhookCouponProviderSave,this.couponProviders()).subscribe(()=>{this.toastr.success(e||"Coupon provider has been successfully updated.","Success")})}static \u0275fac=function(o){return new(o||n)(f(se),f(ie),f(W),f(re),f(de))};static \u0275cmp=y({type:n,selectors:[["app-coupon-configuration"]],features:[A],decls:26,vars:6,consts:[["EMPTY_STATE",""],[3,"pageData","hideSearchDropdown","hideSearchBox"],["type","button",1,"btn","btn-success"],[1,"container-fluid","mt-6"],[1,"row"],[1,"col-12"],[1,"table","table-stripped","custom-table"],[1,"thead-light","sticky-top-thead"],[1,"text-center",2,"width","10px"],[2,"width","220px"],["type","button",1,"btn","btn-success",3,"click"],[1,"text-center"],["role","button",1,"link-primary","cursor-pointer",3,"click"],[1,"p-3","rounded-2",3,"ngClass"],["title","Delete provider",1,"fa","fa-xmark","text-danger",2,"cursor","pointer",3,"click"],[4,"ngTemplateOutlet"],[1,"table-border-bottom-0"],["colspan","7"]],template:function(o,t){if(o&1&&(i(0,"mainpanel-cmp",1)(1,"actions"),m(2,Re,2,0,"button",2),r(),i(3,"content")(4,"div",3)(5,"div",4)(6,"div",5)(7,"table",6)(8,"thead",7)(9,"tr"),m(10,Ne,1,0,"th",8),i(11,"th",9),a(12,"Name"),r(),i(13,"th"),a(14,"Validate Coupon"),r(),i(15,"th"),a(16,"Redeem Coupon"),r(),i(17,"th"),a(18,"Value"),r(),i(19,"th"),a(20,"Status"),r()()(),i(21,"tbody"),m(22,we,2,0)(23,ke,1,1,"ng-container"),r()()()()(),I(24,De,3,0,"ng-template",null,0,K),r()()),o&2){let s;p("pageData",t.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),u(t.role.developer.Edit?2:-1),l(8),u(t.role.developer.Edit?10:-1),l(12),u(((s=t.listProviders())==null?null:s.length)>0?22:23)}},dependencies:[R,M,B,fe,ce,te,Ce],encapsulation:2})};export{_e as CouponConfigurationComponent};
|
|
1
|
+
import{a as ge}from"./chunk-IDOUPEKS.js";import{a as ve}from"./chunk-CAGFIP4G.js";import{a as Ce}from"./chunk-FINTUPRM.js";import"./chunk-BYXBJQAS.js";import{e as ce,f as fe}from"./chunk-MZDVGN2B.js";import"./chunk-RWW55Z7V.js";import{b as se}from"./chunk-XPM7J5AN.js";import"./chunk-E634BI4W.js";import"./chunk-BAXZ74LK.js";import{u as pe,v as me,w as ue}from"./chunk-3ZH3XK5V.js";import"./chunk-V6D6TV7B.js";import{O as k}from"./chunk-QWLNF7VL.js";import{e as ae,f as le,g as de}from"./chunk-N5RDRDT7.js";import"./chunk-N7OS7SFI.js";import"./chunk-RIZ4YVMH.js";import"./chunk-2FWFPV5I.js";import"./chunk-Z76C52NM.js";import{E as oe,F as te,G as ne,c as J,e as h,h as Y,i as X,p as Q,t as Z,w as ee}from"./chunk-7MRUPBXU.js";import"./chunk-ABOSNV75.js";import"./chunk-RT7OZJYZ.js";import"./chunk-5RYL4EJ2.js";import{b as re}from"./chunk-KBLVOO4J.js";import{a as F}from"./chunk-WUV22SZ4.js";import"./chunk-H6RHVRGW.js";import{p as z,s as ie}from"./chunk-TANYEHMZ.js";import{Ab as m,Ac as b,Bc as q,Ca as V,Cb as u,Db as O,E as T,Fb as U,Gb as H,Hb as p,Ib as i,Jb as r,Kb as c,Nc as K,Pd as W,Qb as $,Qc as L,Rb as G,Ub as v,Wb as C,Xa as l,eb as f,ec as j,ib as y,id as M,jc as a,kc as x,lc as w,mb as A,ob as I,pa as _,pd as B,t as D,ta as P,ua as E,xd as R}from"./chunk-L3U6V3BF.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var N=n=>({"is-invalid":n});function Ee(n,d){n&1&&(i(0,"div",16),a(1," Provider Name is required "),r())}function ye(n,d){n&1&&(i(0,"div",20),a(1," Validate Coupon URL is required "),r())}function Ge(n,d){n&1&&(i(0,"div",20),a(1," Redeem Coupon URL is required "),r())}function xe(n,d){n&1&&(i(0,"div",20),a(1,"Key is required"),r())}var S=class n{constructor(d){this.data=d;this.config=new pe,this.config.title="Register Provider",this.config.customWidth="600px",this.initForm()}dialogRef=_(ae);config;fb=_(oe);formGroup;initForm(){this.formGroup=this.fb.group({name:[this.data?.name||"",[h.required]],validateCoupon:[this.data?.validateCoupon||"",[h.required]],redeemCoupon:[this.data?.redeemCoupon||"",[h.required]],enabled:[this.data?.enabled!==void 0?this.data.enabled:!0],header:[this.data?.header,[h.required]]})}onClose(){this.dialogRef.close()}onOk(){this.formGroup.markAllAsTouched(),!this.formGroup.invalid&&this.dialogRef.close(this.formGroup.value)}static \u0275fac=function(e){return new(e||n)(f(le))};static \u0275cmp=y({type:n,selectors:[["app-modal-register-provider"]],decls:35,vars:18,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid","pt-4"],[1,"row"],[1,"col-12"],[3,"formGroup"],[1,"mb-8"],[1,"d-flex","align-items-center"],[1,"flex-grow-1","me-3"],[1,"form-floating-outline","mb-0"],["type","text","placeholder","Provider Name","id","name","name","name","formControlName","name",1,"form-control","bg-white",3,"ngClass"],["for","name"],[2,"width","75px"],[1,"form-check-floating"],[1,"d-flex","justify-content-center","pt-7","pb-4"],["formControlName","enabled"],[1,"labelFilledInput","text-center"],[1,"invalid-feedback","mt-2",2,"display","block"],[1,"form-floating-outline","mb-8"],["type","text","id","validateCoupon","name","validateCoupon","placeholder","Validate Coupon","formControlName","validateCoupon",1,"form-control","bg-white",3,"ngClass"],["for","validateCoupon"],[1,"invalid-feedback"],["type","text","id","redeemCoupon","placeholder","Redeem Coupon","name","redeemCoupon","formControlName","redeemCoupon",1,"form-control","bg-white",3,"ngClass"],["for","redeemCoupon"],[1,"form-floating-outline","mb-3"],["type","text","id","key","name","key","placeholder","Key: E.g. eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9","formControlName","header","rows","4",1,"form-control","bg-white",3,"ngClass"],["for","key"]],template:function(e,o){e&1&&(i(0,"modal-material",0),v("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()})("onClose",function(){return o.onClose()}),i(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8),c(10,"input",9),i(11,"label",10),a(12,"Coupon Provider"),r()()(),i(13,"div",11)(14,"div",12)(15,"div",13),c(16,"app-customize-toggle",14),r(),i(17,"label",15),a(18,"Enabled"),r()()()(),m(19,Ee,2,0,"div",16),r(),i(20,"div",17),c(21,"input",18),i(22,"label",19),a(23,"Validate Coupon URL"),r(),m(24,ye,2,0,"div",20),r(),i(25,"div",17),c(26,"input",21),i(27,"label",22),a(28,"Redeem Coupon URL"),r(),m(29,Ge,2,0,"div",20),r(),i(30,"div",23),c(31,"textarea",24),i(32,"label",25),a(33,"Request Header (Key: value)"),r(),m(34,xe,2,0,"div",20),r()()()()()()()),e&2&&(p("config",o.config),l(5),p("formGroup",o.formGroup),l(5),p("ngClass",b(10,N,(o.formGroup.controls.name==null?null:o.formGroup.controls.name.invalid)&&((o.formGroup.controls.name==null?null:o.formGroup.controls.name.dirty)||(o.formGroup.controls.name==null?null:o.formGroup.controls.name.touched)))),l(9),u(o.formGroup.controls.name.invalid&&(o.formGroup.controls.name.dirty||o.formGroup.controls.name.touched)?19:-1),l(2),p("ngClass",b(12,N,(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.invalid)&&((o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.dirty)||(o.formGroup.controls.validateCoupon==null?null:o.formGroup.controls.validateCoupon.touched)))),l(3),u(o.formGroup.controls.validateCoupon.invalid&&(o.formGroup.controls.validateCoupon.dirty||o.formGroup.controls.validateCoupon.touched)?24:-1),l(2),p("ngClass",b(14,N,(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.invalid)&&((o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.dirty)||(o.formGroup.controls.redeemCoupon==null?null:o.formGroup.controls.redeemCoupon.touched)))),l(3),u(o.formGroup.controls.redeemCoupon.invalid&&(o.formGroup.controls.redeemCoupon.dirty||o.formGroup.controls.redeemCoupon.touched)?29:-1),l(2),p("ngClass",b(16,N,(o.formGroup.controls.header==null?null:o.formGroup.controls.header.invalid)&&((o.formGroup.controls.header==null?null:o.formGroup.controls.header.dirty)||(o.formGroup.controls.header==null?null:o.formGroup.controls.header.touched)))),l(3),u(o.formGroup.controls.header.invalid&&(o.formGroup.controls.header.dirty||o.formGroup.controls.header.touched)?34:-1))},dependencies:[R,M,ne,Q,J,Y,X,Z,ee,ue,me,ge],styles:["div.form-check-floating[_ngcontent-%COMP%]{border:1px solid #ced4da;position:relative;border-radius:.25rem!important}.labelFilledInput[_ngcontent-%COMP%]{position:absolute;top:-10px;left:10px;background:#fff;padding-left:4px;padding-right:4px;font-size:.75rem!important;color:#9da2a6}"]})};var Me=(n,d)=>({"bg-success-subtle text-success-emphasis":n,"bg-danger-subtle text-danger-emphasis":d});function Re(n,d){if(n&1){let e=G();i(0,"button",10),v("click",function(){P(e);let t=C();return E(t.addNewCouponProvider())}),a(1," Add "),r()}}function Ne(n,d){n&1&&c(0,"th",8)}function Te(n,d){if(n&1){let e=G();i(0,"td",11)(1,"i",14),v("click",function(){P(e);let t=C().$index,s=C(2);return E(s.onDeleteProvider(t))}),r()()}}function Ie(n,d){if(n&1){let e=G();i(0,"tr"),m(1,Te,2,0,"td",11),i(2,"td")(3,"a",12),v("click",function(){let t=P(e),s=t.$implicit,g=t.$index,be=C(2);return E(be.onUpdateProvider(s,g))}),a(4),r()(),i(5,"td"),a(6),r(),i(7,"td"),a(8),r(),i(9,"td"),a(10),r(),i(11,"td")(12,"span",13),a(13),r()()()}if(n&2){let e=d.$implicit,o=C(2);l(),u(o.role.developer.Edit?1:-1),l(3),w(" ",e.Name," "),l(2),x(e.ValidateCoupon),l(2),x(e.RedeemCoupon),l(2),x(e.KeyUI),l(2),p("ngClass",q(7,Me,e.Enabled,!e.Enabled)),l(),w(" ",e.Enabled?"Enabled":"Disabled"," ")}}function we(n,d){if(n&1&&U(0,Ie,14,10,"tr",null,O),n&2){let e=C();H(e.listProviders())}}function Fe(n,d){n&1&&$(0)}function ke(n,d){if(n&1&&I(0,Fe,1,0,"ng-container",15),n&2){C();let e=j(25);p("ngTemplateOutlet",e)}}function De(n,d){n&1&&(i(0,"tr",16)(1,"td",17),c(2,"empty-state-table"),r()())}var _e=class n extends ve{constructor(e,o,t,s,g){super(e,o,k.WebhookCouponProviderLoader,t);this.activatedRoute=t;this.role=s;this.dialog=g}toastr=_(z);couponProviders=V([]);listProviders=L(()=>this.couponProviders().map(e=>(e.KeyUI=this.generateKeyUI(e.Header),e)));generateKeyUI(e){if(!e||e.length<=25)return e||"";let o=e.substring(0,10),t=e.substring(e.length-10);return`${o}...${t}`}postBindForm(e){this.couponProviders.update(()=>e.Form.CouponProviders.map(t=>({FetchMemberPoint:t.FetchMemberPoint,Enabled:t.Enabled,Name:t.Name,RedeemCoupon:t.RedeemCoupon,ValidateCoupon:t.ValidateCoupon,Header:t.Header})))}addNewCouponProvider(){this.dialog.open(S).afterClosed().pipe(T(e=>F.IsNotEmpty(e)),D(e=>{let o={Name:e.name,ValidateCoupon:e.validateCoupon,RedeemCoupon:e.redeemCoupon,Enabled:e.enabled,Header:e.header};return[...this.couponProviders(),o]})).subscribe(e=>{this.couponProviders.update(()=>e),this.saveCouponProviders(`Coupon provider "${e[e.length-1].Name}" has been successfully added.`)})}onUpdateProvider(e,o){this.dialog.open(S,{data:{name:e.Name,validateCoupon:e.ValidateCoupon,redeemCoupon:e.RedeemCoupon,enabled:e.Enabled,header:e.Header}}).afterClosed().pipe(T(t=>F.IsNotEmpty(t))).subscribe(t=>{let s={Name:t.name,ValidateCoupon:t.validateCoupon,RedeemCoupon:t.redeemCoupon,Enabled:t.enabled,Header:t.header};this.couponProviders.update(g=>(g[o]=s,[...g])),this.saveCouponProviders(`Coupon provider "${t.name}" has been successfully updated.`)})}onDeleteProvider(e){if(confirm("Are you sure you want to delete this coupon provider?")){let o=this.couponProviders()[e]?.Name||"provider";this.couponProviders.update(t=>(t.splice(e,1),[...t])),this.saveCouponProviders(`Coupon provider "${o}" has been successfully deleted.`)}}saveCouponProviders(e){this.httpService.post(k.WebhookCouponProviderSave,this.couponProviders()).subscribe(()=>{this.toastr.success(e||"Coupon provider has been successfully updated.","Success")})}static \u0275fac=function(o){return new(o||n)(f(se),f(ie),f(W),f(re),f(de))};static \u0275cmp=y({type:n,selectors:[["app-coupon-configuration"]],features:[A],decls:26,vars:6,consts:[["EMPTY_STATE",""],[3,"pageData","hideSearchDropdown","hideSearchBox"],["type","button",1,"btn","btn-success"],[1,"container-fluid","mt-6"],[1,"row"],[1,"col-12"],[1,"table","table-stripped","custom-table"],[1,"thead-light","sticky-top-thead"],[1,"text-center",2,"width","10px"],[2,"width","220px"],["type","button",1,"btn","btn-success",3,"click"],[1,"text-center"],["role","button",1,"link-primary","cursor-pointer",3,"click"],[1,"p-3","rounded-2",3,"ngClass"],["title","Delete provider",1,"fa","fa-xmark","text-danger",2,"cursor","pointer",3,"click"],[4,"ngTemplateOutlet"],[1,"table-border-bottom-0"],["colspan","7"]],template:function(o,t){if(o&1&&(i(0,"mainpanel-cmp",1)(1,"actions"),m(2,Re,2,0,"button",2),r(),i(3,"content")(4,"div",3)(5,"div",4)(6,"div",5)(7,"table",6)(8,"thead",7)(9,"tr"),m(10,Ne,1,0,"th",8),i(11,"th",9),a(12,"Name"),r(),i(13,"th"),a(14,"Validate Coupon"),r(),i(15,"th"),a(16,"Redeem Coupon"),r(),i(17,"th"),a(18,"Value"),r(),i(19,"th"),a(20,"Status"),r()()(),i(21,"tbody"),m(22,we,2,0)(23,ke,1,1,"ng-container"),r()()()()(),I(24,De,3,0,"ng-template",null,0,K),r()()),o&2){let s;p("pageData",t.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),u(t.role.developer.Edit?2:-1),l(8),u(t.role.developer.Edit?10:-1),l(12),u(((s=t.listProviders())==null?null:s.length)>0?22:23)}},dependencies:[R,M,B,fe,ce,te,Ce],encapsulation:2})};export{_e as CouponConfigurationComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as v,f as y}from"./chunk-
|
|
1
|
+
import{e as v,f as y}from"./chunk-MZDVGN2B.js";import"./chunk-RWW55Z7V.js";import"./chunk-E634BI4W.js";import"./chunk-BAXZ74LK.js";import"./chunk-3ZH3XK5V.js";import"./chunk-V6D6TV7B.js";import"./chunk-QWLNF7VL.js";import"./chunk-N5RDRDT7.js";import"./chunk-N7OS7SFI.js";import"./chunk-RIZ4YVMH.js";import"./chunk-2FWFPV5I.js";import"./chunk-Z76C52NM.js";import"./chunk-7MRUPBXU.js";import"./chunk-ABOSNV75.js";import"./chunk-RT7OZJYZ.js";import"./chunk-5RYL4EJ2.js";import"./chunk-KBLVOO4J.js";import"./chunk-WUV22SZ4.js";import"./chunk-H6RHVRGW.js";import"./chunk-TANYEHMZ.js";import{Hb as h,Ib as o,Jb as i,Kb as g,Rd as M,Ud as u,Xa as c,eb as l,ib as f,jb as m,jc as n,kc as x,ma as a,xd as z}from"./chunk-L3U6V3BF.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var s=class e{constructor(r){this.router=r;this.previousPage=this.router.lastSuccessfulNavigation?.finalUrl?.root?.children?.primary?.segments?.join("/"),this.role=this.router.getCurrentNavigation()?.extras?.state.role}previousPage="";role="";menuData={H:"Unauthorized"};static \u0275fac=function(t){return new(t||e)(l(M))};static \u0275cmp=f({type:e,selectors:[["POS-unauthorized"]],standalone:!1,decls:13,vars:4,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"d-flex","align-items-center","justify-content-center","mt-8",2,"height","350px"],[1,"text-center"],["src","https://cdn.dealpos.xyz/web-image/locked.svg",2,"width","200px"],[1,"mt-2","mb-6"],[1,"fw-bold"]],template:function(t,d){t&1&&(o(0,"mainpanel-cmp",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div"),g(5,"img",3),i(),o(6,"h1",4),n(7,"You are not authorized"),i(),o(8,"p"),n(9," This page require "),o(10,"span",5),n(11),i(),n(12," role. Please contact your Administrator to gain access! "),i()()()()()),t&2&&(h("pageData",d.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),c(11),x(d.role))},dependencies:[v],encapsulation:2})};var U=[{path:"Main/Unauthorized",component:s},{path:"",redirectTo:"Main/Unauthorized",pathMatch:"full"}],p=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=m({type:e});static \u0275inj=a({imports:[u.forChild(U),u]})};var S=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=m({type:e});static \u0275inj=a({imports:[z,p,y]})};export{S as UnauthorizedModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Mt,d as kt}from"./chunk-4HLKKTIV.js";import{c as Ot,j as St,k as F,l as It}from"./chunk-RIZ4YVMH.js";import{a as P}from"./chunk-2FWFPV5I.js";import{oa as Tt,pa as k,xa as Et}from"./chunk-Z76C52NM.js";import{F as vt,G as bt,a as ft,c as _t,h as ht,i as wt,k as Ct,o as yt,p as xt}from"./chunk-7MRUPBXU.js";import{a as mt}from"./chunk-
|
|
1
|
+
import{a as Mt,d as kt}from"./chunk-4HLKKTIV.js";import{c as Ot,j as St,k as F,l as It}from"./chunk-RIZ4YVMH.js";import{a as P}from"./chunk-2FWFPV5I.js";import{oa as Tt,pa as k,xa as Et}from"./chunk-Z76C52NM.js";import{F as vt,G as bt,a as ft,c as _t,h as ht,i as wt,k as Ct,o as yt,p as xt}from"./chunk-7MRUPBXU.js";import{a as mt}from"./chunk-H6RHVRGW.js";import{p as gt,s as Pt}from"./chunk-TANYEHMZ.js";import{$b as D,Ab as f,Bc as R,Cb as _,Cc as it,Hb as m,Ia as A,Ib as o,Jb as s,Kb as M,Ob as S,Pb as I,Qb as Z,Qc as ot,Rb as h,Rc as rt,Rd as ct,Ub as g,Vc as j,Wb as r,Wc as at,Xa as l,Ya as T,Zb as N,ac as B,bd as L,cc as J,dc as X,eb as Q,ib as E,ic as y,id as st,jb as K,jc as c,ka as W,kc as tt,kd as pt,la as z,lc as et,ld as lt,ma as U,mb as Y,na as q,nb as $,ob as O,oc as x,pa as C,pc as v,pd as dt,qc as b,ta as d,ua as u,vc as H,wb as G,xd as ut,yc as nt}from"./chunk-L3U6V3BF.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var Ft=`
|
|
2
2
|
.p-inputotp {
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as P}from"./chunk-
|
|
1
|
+
import{a as P}from"./chunk-55Z32OLJ.js";import{a as w}from"./chunk-MZDVGN2B.js";import{a as C}from"./chunk-TP6ZUC53.js";import{a as A}from"./chunk-XPM7J5AN.js";import{a as I}from"./chunk-N5RDRDT7.js";import{a as l}from"./chunk-2FWFPV5I.js";import{a as c}from"./chunk-WUV22SZ4.js";import{fa as y,pa as f,t as L,z as S}from"./chunk-L3U6V3BF.js";import{a as F}from"./chunk-SNAKHGZS.js";var g=class{enabledDragItem;constructor(){this.enabledDragItem=!1}drop(o,t){C(t.Data,o.previousIndex,o.currentIndex)}toggleEnabledDragItem(){}onSaveDragAndDrop(o,t){this.enabledDragItem=!this.enabledDragItem,this.enabledDragItem||t.postListID(o,t.data.Data)}onPutSaveDragAndDrop(o,t){this.enabledDragItem=!this.enabledDragItem,this.enabledDragItem||t.putListID(o,t.data.Data)}};var u=class{constructor(o){this.httpService=o}exportCSV(o,t,e,i){e.pageData.Filter.Export=!0,e.pageData.Filter.FormatType=0,i=i||"export.csv",this.httpService.post(`/api/${t}`,e.pageData.Filter).subscribe(r=>{o.convertToCSV(r,i),e.pageData.Filter.Export=!1})}convertToCSV(o,t=!1,e){let i=this.ExportDataFromUI2(t);o.convertToCSV(i,e)}ExportDataFromUI2(o=!1){let t=document.getElementById("tableGrid"),e=[];return c.IsNotEmpty(t)&&t.querySelectorAll("tr").forEach(r=>{let a=new Object,s=0;r.querySelectorAll("th, td").forEach(n=>{s++;let b=parseInt(n.getAttribute("colspan"));for(let h=1;h<b;h++)a["column"+s]="",s++;let m=n.innerText,v=m.toString().split("");if(o&&v[0]==="0"&&v.length>1){let h="'"+m.trim();a["column"+s]=h}else a["column"+s]=m.trim()}),e.push(a)}),e}};var d=class{listTotal;pageSize;show;constructor(){this.listTotal=0,this.pageSize=0,this.show=!1}changePaginationData(o){this.pageSize=o.pageData.Filter.RowCount,this.listTotal=o.data?.ListTotal??o.data?.Data?.total?.value,this.show=this.pageSize<=this.listTotal}changePage(o,t,e){t.Filter.PageNumber=o.pageIndex+1,e.getListData()}};var x=class extends A{constructor(t,e,i,r,a,s,p){super(t);this.httpService=e;this.dataAPI=i;this.pageAPI=r;this.toastrService=a;this.route=s;this.initOpenDialog=p;this.exportHandler=new u(e),r?(s&&(this.loaderPayload=F({ListIDs:this.reportFilterService?.initOutletFilter()},s.snapshot.queryParams)),this.preInitLoader(),S([this.menuData$,this.httpService.post("/api/"+this.pageAPI,this.loaderPayload)]).pipe(L(([n,b])=>b)).pipe(I()).subscribe(n=>{this.pageData=n,this.pageData.Filter||(this.pageData.Filter={},this.pageData.Filter.RowCount=20),this.pageData.Filter.PageNumber=1,this.pageData.Filter.ID=this.loaderPayload.ID,this.preInitList(),p?this.openDialogFilter.openDialog():this.getListData()})):(this.pageData.Filter.RowCount=20,this.pageData.Filter.PageNumber=1,this.preInitList(),S({menuData:this.menuData$,listData:this.getListData$()}).pipe(I()).subscribe())}openDialogFilter=f(w);reportFilterService=f(P);pageData={Filter:{},Options:{},Roles:{},Config:{}};data;pagination=new d;dragDrop=new g;exportHandler;comparation=0;loaderPayload={};preInitLoader(){}preInitList(){}getListData(t){this.preGetList(),this.dataAPI&&this.httpService.post("/api/"+this.dataAPI,this.pageData.Filter).subscribe(e=>{this.data=e,this.postInit(e),this.pagination.changePaginationData(this),t&&(this.pageData.HideStoreApiCount=!1)})}getListData$(t){return this.preGetList(),this.httpService.post("/api/"+this.dataAPI,this.pageData.Filter).pipe(y(e=>{this.data=e,this.postInit(e),this.pagination.changePaginationData(this),t&&(this.pageData.HideStoreApiCount=!1)}))}searchFromPageOne(){this.preSearchFromPageOne(),this.pageData.Filter.PageNumber=1,this.getListData("filterMode")}postInit(t){t.PageTitle!=null&&(this.menuData.H=t.PageTitle)}preGetList(){this.pageData.Filter.From==null&&(this.pageData.Filter.From=c.MinDate),this.pageData.Filter.To==null&&(this.pageData.Filter.To=c.MinDate)}preSearchFromPageOne(){}onPaginationChange(t){this.pagination.changePage(t,this.pageData,this)}onSelectAllData(t){this.data.Data=this.data.Data.map(e=>(e.selected=t,e))}getSelectedData(){let t=[];return this.data&&(t=this.data.Data.filter(e=>e.selected)),t}httpPostListID(t,e,i){if(e||(e="Are you sure you want to selected record/s?"),confirm(e)==!1)return;let r=this.getSelectedData();r.length>0&&this.postListID(t,r,i)}httpPutListID(t,e,i){if(e||(e="Are you sure you want to selected record/s?"),confirm(e)==!1)return;let r=this.getSelectedData();r.length>0&&this.putListID(t,r,i)}httpDeleteListID(t,e,i){if(e||(e="Are you sure you want to delete selected record/s?"),confirm(e)==!1)return;let r=this.getSelectedData();r.length>0&&this.DeleteListID(t,r,i)}onSaveDragAndDrop(t){this.dragDrop.onSaveDragAndDrop(t,this)}onPutSaveDragAndDrop(t){this.dragDrop.onPutSaveDragAndDrop(t,this)}postListID(t,e,i){let r=e.map(a=>i?a[i]:a.ID);this.httpService.post(`/api/${t}`,r,1e6,!0).subscribe(a=>{this.toastrService.success(a.Message?a.Message:a,l.Success),this.getListData()},a=>{let s=a.status+" "+a.statusText;this.toastrService.error(a.error.Message!=""?a.error.Message:"An unknown error has occured!",s,{enableHtml:!0})})}putListID(t,e,i){let r=e.map(a=>i?a[i]:a.ID);this.httpService.put(`/api/${t}`,r).subscribe(a=>{this.toastrService.success(a.Message?a.Message:a,l.Success),this.afterPutListSuccess(),this.getListData()})}afterPutListSuccess(){}DeleteListID(t,e,i){let r=e.map(a=>i?a[i]:a.ID);this.httpService.delete(`/api/${t}`,{body:r}).subscribe(a=>{this.toastrService.success(a.Message?a.Message:a,l.Success),this.getListData()})}postData(t,e){this.httpService.post("/API/"+t,e).subscribe(i=>{this.getListData(),this.toastrService.success(i.Message?i.Message:i,l.Success)})}compare(t,e,i){return(t<e?-1:1)*(i?1:-1)}exportCSV(t,e,i){this.exportHandler.exportCSV(t,e,this,i)}s2ab(t){for(var e=new ArrayBuffer(t.length),i=new Uint8Array(e),r=0;r!=t.length;++r)i[r]=t.charCodeAt(r)&255;return e}exportXlsx(t,e){this.pageData.Filter.FormatType=1,this.pageData.Filter.Export=!0,this.httpService.post(`/api/${t}`,this.pageData.Filter).subscribe(i=>{e=decodeURI(e);let r=window.URL.createObjectURL(new Blob([this.s2ab(atob(i))],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,"})),a=document.createElement("a");a.href=r,a.setAttribute("download",e),document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(r),a.remove()})}convertToCSV(t,e=!1,i){let r=this.exportHandler.ExportDataFromUI2(e);t.convertToCSV(r,i)}OnCompare(t){let e=t?this.data[t]:this.data;if(e.length<1)return;let i=Object.assign({},this.pageData.Filter);i.From=new Date(new Date(this.pageData.Filter.From).getFullYear(),new Date(this.pageData.Filter.From).getMonth()-1,1),i.To=new Date(new Date(this.pageData.Filter.To).getFullYear(),new Date(this.pageData.Filter.To).getMonth(),0).toDateString(),this.httpService.post("/API/"+this.dataAPI,i).subscribe(r=>{let a=t?r[t]:r;this.comparation=0,e.forEach(s=>{s.PrevIndex="-",s.CurrentIndex="-",s.Increase="-";let p=a.filter(n=>n.EntityID==s.EntityID);if(s.CurrentIndex=s.Rank,p.length>0){let n=p[0];s.PrevIndex=n.Rank,n.SalesNet?s.Increase=(s.SalesNet-n.SalesNet)/n.SalesNet*100:n.Sales&&(s.Increase=(s.Sales-n.Sales)/n.Sales*100),s.IsPositive=s.Increase>0,s.IsNegative=s.Increase<0,this.comparation+=s.Increase}})})}};export{x as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as u}from"./chunk-
|
|
1
|
+
import{f as u}from"./chunk-MZDVGN2B.js";import"./chunk-RWW55Z7V.js";import"./chunk-E634BI4W.js";import"./chunk-BAXZ74LK.js";import"./chunk-3ZH3XK5V.js";import"./chunk-V6D6TV7B.js";import"./chunk-QWLNF7VL.js";import"./chunk-N5RDRDT7.js";import"./chunk-N7OS7SFI.js";import"./chunk-RIZ4YVMH.js";import"./chunk-2FWFPV5I.js";import"./chunk-Z76C52NM.js";import"./chunk-7MRUPBXU.js";import"./chunk-ABOSNV75.js";import"./chunk-RT7OZJYZ.js";import"./chunk-5RYL4EJ2.js";import"./chunk-KBLVOO4J.js";import"./chunk-WUV22SZ4.js";import"./chunk-H6RHVRGW.js";import"./chunk-TANYEHMZ.js";import{Ib as o,Jb as m,Kb as p,Ud as d,ib as f,jb as i,jc as c,ma as n,xd as l}from"./chunk-L3U6V3BF.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var a=class t{menuData={H:"Not Found"};constructor(){}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=f({type:t,selectors:[["POS-not-found-page"]],standalone:!1,decls:12,vars:0,consts:[[1,"container-fluid","mt-12"],[1,"row"],[1,"col-1"],[1,"col-6","d-flex","align-items-center","justify-content-center","pe-0"],[1,"ms-12"],[1,"mb-0","fw-normal",2,"margin-top","20px","font-size","55px"],[1,"fs-4"],[1,"col-5","ps-0"],["src","https://cdn.dealpos.xyz/web-image/MicrosoftTeams-image.jpg","alt","",2,"width","50%"]],template:function(e,y){e&1&&(o(0,"content")(1,"div",0)(2,"div",1),p(3,"div",2),o(4,"div",3)(5,"div",4)(6,"h1",5),c(7," Page Not Found "),m(),o(8,"p",6),c(9,"The page you are trying to access cannot be found"),m()()(),o(10,"div",7),p(11,"img",8),m()()()())},encapsulation:2})};var M=[{path:"",component:a}],r=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=i({type:t});static \u0275inj=n({imports:[d.forChild(M),d]})};var N=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=i({type:t});static \u0275inj=n({imports:[l,r,u]})};export{N as NotFoundModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as st,b as ft}from"./chunk-6GCAXVFO.js";import"./chunk-TPJWIEYA.js";import{a as mt}from"./chunk-ZV4K4PP6.js";import{a as _t}from"./chunk-QS2AUXB7.js";import{a as ut}from"./chunk-3XH2STFE.js";import"./chunk-P3TFDLWR.js";import"./chunk-BYXBJQAS.js";import{a as $}from"./chunk-Y7ZKGM5U.js";import{d as dt,e as pt}from"./chunk-AHTR7XKG.js";import"./chunk-NS6IC2PT.js";import"./chunk-3RK6DDJD.js";import"./chunk-SMEVWRVE.js";import"./chunk-JQDS4BXR.js";import"./chunk-F3HDP5CA.js";import"./chunk-AJAUI7BA.js";import"./chunk-MWGICBEB.js";import{d as rt,e as lt}from"./chunk-ODYEJFNJ.js";import"./chunk-WSWTWRKJ.js";import{a as X}from"./chunk-BVOUQJCA.js";import{f as ct}from"./chunk-ZNPC63ZV.js";import{b as Z}from"./chunk-YQ5PAXUW.js";import"./chunk-HQGZC4Y3.js";import"./chunk-VQKO557Q.js";import"./chunk-TRK4LJDS.js";import"./chunk-B4TZQBTN.js";import{a as et}from"./chunk-JT4M6AIA.js";import{e as ot,f as at}from"./chunk-2GIDUMXS.js";import"./chunk-OB6KFXD6.js";import"./chunk-QJ3CWKQT.js";import"./chunk-ZOYWCF3Q.js";import"./chunk-SWF6XISV.js";import"./chunk-GXAF3JUO.js";import"./chunk-LB5UXGDG.js";import"./chunk-YDL2MTWE.js";import"./chunk-7YYWBCWJ.js";import"./chunk-CCIHCGP5.js";import"./chunk-FM7BHGBW.js";import"./chunk-TP6ZUC53.js";import"./chunk-3PKJLXTC.js";import{b as tt}from"./chunk-ECW7GAZQ.js";import"./chunk-E634BI4W.js";import"./chunk-BAXZ74LK.js";import"./chunk-3ZH3XK5V.js";import{b as K,c as U}from"./chunk-V6D6TV7B.js";import{N as nt,g as it}from"./chunk-QWLNF7VL.js";import"./chunk-UIVJ2JQT.js";import"./chunk-EQLHPWVB.js";import"./chunk-SCGKVOSE.js";import{g as Y}from"./chunk-N5RDRDT7.js";import"./chunk-N7OS7SFI.js";import"./chunk-4HLKKTIV.js";import"./chunk-RIZ4YVMH.js";import"./chunk-2FWFPV5I.js";import"./chunk-Z76C52NM.js";import{F as z}from"./chunk-7MRUPBXU.js";import"./chunk-T5IJP474.js";import"./chunk-DJUOMCAV.js";import"./chunk-5RYL4EJ2.js";import{b as J}from"./chunk-KBLVOO4J.js";import"./chunk-WUV22SZ4.js";import"./chunk-NQQB5U5S.js";import{s as Q}from"./chunk-TANYEHMZ.js";import{Ab as p,Ac as B,Cb as m,Db as M,Fb as N,Gb as j,Hb as s,Hc as d,Ib as o,Ic as f,Jb as n,Jc as x,Kb as w,Ld as R,Nc as q,Rb as P,Sd as H,Ub as h,Wb as c,Xa as i,eb as T,ib as O,jc as r,kc as D,lc as u,ld as W,mb as V,ob as E,oc as g,pc as I,qc as S,ta as v,ua as y,ud as A,wb as k,xd as G,zc as b}from"./chunk-L3U6V3BF.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var vt=()=>["/menu/Outlets/Master/Outlets/Info"],Ct=t=>({ID:t}),yt=()=>["/menu/Products/Catalog/Products/Info"];function Tt(t,l){if(t&1){let e=P();o(0,"button",11),h("click",function(){v(e);let a=c();return y(a.openExportModal())}),w(1,"i",12),r(2," Export "),n()}}function gt(t,l){if(t&1){let e=P();o(0,"div",13)(1,"h6"),r(2,"Outlet Group"),n(),o(3,"POS-outlet-group-tree-select",14),S("selectedOutletGroupIDChange",function(a){v(e);let C=c();return I(C.pageData.Filter.OutletGroupID,a)||(C.pageData.Filter.OutletGroupID=a),y(a)}),n(),o(4,"h6"),r(5,"Category"),n(),o(6,"POS-product-category-select",15),S("selectedCategoryIDChange",function(a){v(e);let C=c();return I(C.pageData.Filter.CategoryID,a)||(C.pageData.Filter.CategoryID=a),y(a)}),n(),o(7,"autocompleteV3",16),S("modelNameChange",function(a){v(e);let C=c();return I(C.pageData.Filter.ListProductID,a)||(C.pageData.Filter.ListProductID=a),y(a)}),n(),o(8,"h6"),r(9,"From - To"),n(),o(10,"div")(11,"datepicker",17),S("dateChange",function(a){v(e);let C=c();return I(C.pageData.Filter.From,a)||(C.pageData.Filter.From=a),y(a)}),n()(),o(12,"div",18)(13,"datepicker",19),S("dateChange",function(a){v(e);let C=c();return I(C.pageData.Filter.To,a)||(C.pageData.Filter.To=a),y(a)}),n()(),o(14,"h6"),r(15,"Inventory Type"),n(),o(16,"radio-options",20),S("modelChange",function(a){v(e);let C=c();return I(C.pageData.Filter.InventoryType,a)||(C.pageData.Filter.InventoryType=a),y(a)}),n()()}if(t&2){let e=c();i(3),s("showClear",!0),g("selectedOutletGroupID",e.pageData.Filter.OutletGroupID),i(3),g("selectedCategoryID",e.pageData.Filter.CategoryID),s("showClear",!0),i(),g("modelName",e.pageData.Filter.ListProductID),s("placeholder","Search Product")("isShowEmptyMessage",!0)("emptyMessage","No Product found")("tooltipMessage","Search by product name")("label","Product to Analyze")("listDataEndpoint","/api/ac/GetProductSuggestionByCodeNName")("valueField","Name"),i(4),s("isFloatingLabel",!1),g("date",e.pageData.Filter.From),s("hidelClearBtn",!0),i(2),s("isFloatingLabel",!1),g("date",e.pageData.Filter.To),s("hidelClearBtn",!0),i(3),g("model",e.pageData.Filter.InventoryType),s("options",e.pageData.Options.InventoryTypes)}}function It(t,l){t&1&&(o(0,"th",8),r(1,"Code"),n())}function St(t,l){t&1&&(o(0,"th",9)(1,"span",21),r(2," Start "),n()())}function Pt(t,l){t&1&&(o(0,"th",9)(1,"span",22),r(2," Bought "),n()())}function ht(t,l){t&1&&(o(0,"th",9)(1,"span",23),r(2," Sold "),n()())}function Ft(t,l){t&1&&(o(0,"th",9)(1,"span",24),r(2," T.In "),n()())}function Et(t,l){t&1&&(o(0,"th",9)(1,"span",25),r(2," T.Out "),n()())}function wt(t,l){t&1&&(o(0,"th",9)(1,"span",26),r(2," Adj "),n()())}function Dt(t,l){t&1&&(o(0,"th",9)(1,"span",27),r(2," End "),n()())}function bt(t,l){t&1&&(o(0,"th",9)(1,"span",28),r(2," Now "),n()())}function Bt(t,l){t&1&&(o(0,"th",9)(1,"span",29),r(2," % "),n()())}function Lt(t,l){if(t&1&&(o(0,"td",31),r(1),n()),t&2){let e=c().$implicit;i(),u(" ",e.ProductCode," ")}}function Ot(t,l){if(t&1&&(o(0,"td",32),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Start),i(),u(" ",f(2,2,e.Start)," ")}}function Vt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.Bought)," ")}}function kt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.Sold)," ")}}function Mt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.TransferredIn)," ")}}function Nt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.TransferredOut)," ")}}function jt(t,l){if(t&1&&(o(0,"td",32),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Adjustment),i(),u(" ",e.Adjustment<0?e.Adjustment*-1:f(2,2,e.Adjustment)," ")}}function qt(t,l){if(t&1&&(o(0,"td",32),r(1),n()),t&2){let e=c().$implicit;s("colsFontColor",e.End),i(),u(" ",e.End," ")}}function Wt(t,l){if(t&1&&(o(0,"td",32),r(1),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Now),i(),u(" ",e.Now," ")}}function At(t,l){if(t&1&&(o(0,"td",31),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.SellTransferInRate)," ")}}function Gt(t,l){if(t&1&&(o(0,"tr")(1,"td")(2,"a",30),r(3),n()(),o(4,"td")(5,"a",30),r(6),n()(),p(7,Lt,2,1,"td",31),p(8,Ot,3,4,"td",32),p(9,Vt,3,3,"td",33),p(10,kt,3,3,"td",34),p(11,Mt,3,3,"td",33),p(12,Nt,3,3,"td",34),p(13,jt,3,4,"td",32),p(14,qt,2,2,"td",32),p(15,Wt,2,2,"td",32),p(16,At,3,3,"td",31),n()),t&2){let e=l.$implicit,_=c(2);i(2),s("routerLink",b(16,vt))("queryParams",B(17,Ct,e.OutletID)),i(),u(" ",e.OutletName," "),i(2),s("routerLink",b(19,yt))("queryParams",B(20,Ct,e.ProductID)),i(),D(e.ProductName),i(),m(_.column.code.selected?7:-1),i(),m(_.column.start.selected?8:-1),i(),m(_.column.bought.selected?9:-1),i(),m(_.column.sold.selected?10:-1),i(),m(_.column.transferredIn.selected?11:-1),i(),m(_.column.transferredOut.selected?12:-1),i(),m(_.column.adjust.selected?13:-1),i(),m(_.column.end.selected?14:-1),i(),m(_.column.now.selected?15:-1),i(),m(_.column.percent.selected?16:-1)}}function Rt(t,l){if(t&1&&N(0,Gt,17,22,"tr",null,M),t&2){let e=c();j(e.infiniteList)}}function Ht(t,l){t&1&&(o(0,"tr")(1,"td",35),w(2,"app-empty-state"),n()())}function zt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Start"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Start"))," ")}}function Qt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"Bought"))," ")}}function Jt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"Sold"))," ")}}function Kt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"TransferredIn"))," ")}}function Ut(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"TransferredOut"))," ")}}function Xt(t,l){if(t&1&&(o(0,"td",38),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Adjustment"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Adjustment"))," ")}}function Yt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"End"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"End"))," ")}}function Zt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Now"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Now"))," ")}}function $t(t,l){if(t&1&&(o(0,"tfoot")(1,"tr",36)(2,"th",37),r(3," Total: "),n(),p(4,zt,6,12,"td",32),p(5,Qt,4,6,"td",33),p(6,Jt,4,6,"td",34),p(7,Kt,4,6,"td",33),p(8,Ut,4,6,"td",34),p(9,Xt,6,12,"td",38),p(10,Yt,6,12,"td",32),p(11,Zt,6,12,"td",32),n()()),t&2){let e=c();i(2),k("colspan",e.column.code.selected?3:2),i(2),m(e.column.start.selected?4:-1),i(),m(e.column.bought.selected?5:-1),i(),m(e.column.sold.selected?6:-1),i(),m(e.column.transferredIn.selected?7:-1),i(),m(e.column.transferredOut.selected?8:-1),i(),m(e.column.adjust.selected?9:-1),i(),m(e.column.end.selected?10:-1),i(),m(e.column.now.selected?11:-1)}}function te(t,l){if(t&1){let e=P();o(0,"span",45),h("click",function(){v(e);let a=c(2);return y(a.StoreRowsCountAPIResult("inventory/GetCountProductInventoryTraffic"))}),o(1,"i",46),r(2,"?"),n()()}}function ee(t,l){if(t&1&&(o(0,"span"),r(1),d(2,"number"),n()),t&2){let e=c(2);i(),D(f(2,1,e.listTotal))}}function ie(t,l){if(t&1){let e=P();o(0,"div",10)(1,"div",39)(2,"div",40),r(3),d(4,"number"),E(5,te,3,0,"span",41)(6,ee,3,3,"span",42),r(7),n()(),o(8,"a",43),h("click",function(){v(e);let a=c();return y(a.NextPage(!0))}),w(9,"i",44),r(10," Next"),n()()}if(t&2){let e=c();i(3),u(" Showing 1 - ",f(4,4,e.infiniteList.length)," of "),i(2),s("ngIf",!e.pageData.HideStoreApiCount),i(),s("ngIf",e.pageData.HideStoreApiCount),i(),u(" records ~ ",e.pageData.Filter.PageNumber," Page ")}}var xt=class t extends X{constructor(e,_,a,C,L,F,ne){super(e,_,"inventory/GetProductInventoryTraffic","inventoryloader/GetProductInventoryTraffic",void 0,void 0,!0);this.httpService=_;this.csvConverter=a;this.pageTitle=C;this.converter=L;this.roleService=F;this.matDialog=ne;this.pageTitle.setTitle(this.menuData.T)}column={code:{selected:!0,name:"Code"},start:{selected:!0,name:"Start"},bought:{selected:!1,name:"Bought"},sold:{selected:!0,name:"Sold"},transferredIn:{selected:!0,name:"T.In"},transferredOut:{selected:!0,name:"T.Out"},adjust:{selected:!1,name:"Adjust"},end:{selected:!0,name:"End"},now:{selected:!0,name:"Now"},percent:{selected:!1,name:"Percentage"}};selectedProduct=[];postBindData(){this.menuData.H=this.data.PageTitle}openExportModal(){this.matDialog.open(Z,{data:{title:"Product Inventory Traffic",exportTypes:[{ID:"inventoryexport/GetExportProductInventoryTraffic",Value:"Default",FileName:"Product Inventory Traffic"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!0}})}static \u0275fac=function(_){return new(_||t)(T(tt),T(Q),T(et),T(R),T(mt),T(J),T(Y))};static \u0275cmp=O({type:t,selectors:[["POS-product-inventory-traffic"]],features:[V],decls:31,vars:19,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter","column"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","150px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","80px"],[1,"d-flex","justify-content-between","mt-5"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],[1,"tree-select-as-filter",3,"selectedOutletGroupIDChange","showClear","selectedOutletGroupID"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],[3,"modelNameChange","modelName","placeholder","isShowEmptyMessage","emptyMessage","tooltipMessage","label","listDataEndpoint","valueField"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],["name","ProductTypeId",3,"modelChange","model","options"],["matTooltip","Stock based on start date (from date filter)","matTooltipPosition","above"],["matTooltip","Movement Stock from Inbound Logistics (Supplier Bill)","matTooltipPosition","above"],["matTooltip","Movement Stock from Outbound Logistics (Customer Invoice)","matTooltipPosition","above"],["matTooltip","Stock received from other outlets","matTooltipPosition","above"],["matTooltip","Stock sent to other outlets","matTooltipPosition","above"],["matTooltip","Total stock adjustments made","matTooltipPosition","above"],["matTooltip","Stock based on end date (to date filter)","matTooltipPosition","above"],["matTooltip","Current on-hand inventory","matTooltipPosition","above"],["matTooltip","Percentage of sold items compared to the total items received from other outlets.","matTooltipPosition","above",1,"text-end"],[3,"routerLink","queryParams"],[1,"text-end"],[1,"text-end",3,"colsFontColor"],[1,"text-end","text-success"],[1,"text-end","text-danger"],["colspan","12"],[1,"table-footer"],[1,"empty-column","text-end"],[1,"text-end","text-success",3,"colsFontColor"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retrieve rows count",1,"border","p-3"]],template:function(_,a){if(_&1){let C=P();o(0,"mainpanel-cmp",1),h("onSubmit",function(){return v(C),y(a.searchFromPageOne())}),S("filterChange",function(F){return v(C),I(a.pageData.Filter,F)||(a.pageData.Filter=F),y(F)}),o(1,"actions"),E(2,Tt,3,0,"button",2),n(),o(3,"filters"),E(4,gt,17,20,"ng-template",null,0,q),n(),o(6,"content")(7,"div",3)(8,"div",4)(9,"table",5)(10,"thead",6)(11,"tr")(12,"th",7),r(13,"Outlet"),n(),o(14,"th"),r(15,"Product"),n(),p(16,It,2,0,"th",8),p(17,St,3,0,"th",9),p(18,Pt,3,0,"th",9),p(19,ht,3,0,"th",9),p(20,Ft,3,0,"th",9),p(21,Et,3,0,"th",9),p(22,wt,3,0,"th",9),p(23,Dt,3,0,"th",9),p(24,bt,3,0,"th",9),p(25,Bt,3,0,"th",9),n()(),o(26,"tbody"),p(27,Rt,2,0)(28,Ht,3,0,"tr"),n(),p(29,$t,12,9,"tfoot"),n()(),p(30,ie,11,6,"div",10),n()()()}_&2&&(s("pageData",a.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),g("filter",a.pageData.Filter),s("column",a.column),i(2),s("ngIf",a.roleService.global.Export),i(14),m(a.column.code.selected?16:-1),i(),m(a.column.start.selected?17:-1),i(),m(a.column.bought.selected?18:-1),i(),m(a.column.sold.selected?19:-1),i(),m(a.column.transferredIn.selected?20:-1),i(),m(a.column.transferredOut.selected?21:-1),i(),m(a.column.adjust.selected?22:-1),i(),m(a.column.end.selected?23:-1),i(),m(a.column.now.selected?24:-1),i(),m(a.column.percent.selected?25:-1),i(2),m(a.infiniteList&&a.infiniteList.length>0?27:28),i(2),m(a.infiniteList&&a.infiniteList.length>0?29:-1),i(),m(a.infiniteList&&a.infiniteList.length>0?30:-1))},dependencies:[at,ot,G,W,z,_t,ct,st,nt,H,pt,dt,lt,rt,ut,ft,U,K,A,it,$],encapsulation:2})};export{xt as Product_Inventory_TrafficComponent};
|
|
1
|
+
import{a as st,b as ft}from"./chunk-VG3B7TDX.js";import"./chunk-TPJWIEYA.js";import{a as mt}from"./chunk-ZV4K4PP6.js";import{a as _t}from"./chunk-FEHMPX43.js";import{a as ut}from"./chunk-3XH2STFE.js";import"./chunk-P3TFDLWR.js";import"./chunk-BYXBJQAS.js";import{a as $}from"./chunk-Y7ZKGM5U.js";import{d as dt,e as pt}from"./chunk-AHTR7XKG.js";import"./chunk-NS6IC2PT.js";import"./chunk-3RK6DDJD.js";import"./chunk-SMEVWRVE.js";import"./chunk-JQDS4BXR.js";import"./chunk-F3HDP5CA.js";import"./chunk-AJAUI7BA.js";import"./chunk-MWGICBEB.js";import{d as rt,e as lt}from"./chunk-ODYEJFNJ.js";import"./chunk-WSWTWRKJ.js";import{a as X}from"./chunk-GE5I6JYL.js";import{f as ct}from"./chunk-GZ6OVEDL.js";import{b as Z}from"./chunk-YQ5PAXUW.js";import"./chunk-XCSDEGWL.js";import"./chunk-55Z32OLJ.js";import"./chunk-TRK4LJDS.js";import"./chunk-B4TZQBTN.js";import{a as et}from"./chunk-JT4M6AIA.js";import{e as ot,f as at}from"./chunk-MZDVGN2B.js";import"./chunk-OB6KFXD6.js";import"./chunk-QJ3CWKQT.js";import"./chunk-ZOYWCF3Q.js";import"./chunk-SWF6XISV.js";import"./chunk-GXAF3JUO.js";import"./chunk-LB5UXGDG.js";import"./chunk-YDL2MTWE.js";import"./chunk-7YYWBCWJ.js";import"./chunk-CCIHCGP5.js";import"./chunk-FM7BHGBW.js";import"./chunk-TP6ZUC53.js";import"./chunk-RWW55Z7V.js";import{b as tt}from"./chunk-XPM7J5AN.js";import"./chunk-E634BI4W.js";import"./chunk-BAXZ74LK.js";import"./chunk-3ZH3XK5V.js";import{b as K,c as U}from"./chunk-V6D6TV7B.js";import{N as nt,g as it}from"./chunk-QWLNF7VL.js";import"./chunk-UIVJ2JQT.js";import"./chunk-EQLHPWVB.js";import"./chunk-SCGKVOSE.js";import{g as Y}from"./chunk-N5RDRDT7.js";import"./chunk-N7OS7SFI.js";import"./chunk-4HLKKTIV.js";import"./chunk-RIZ4YVMH.js";import"./chunk-2FWFPV5I.js";import"./chunk-Z76C52NM.js";import{F as z}from"./chunk-7MRUPBXU.js";import"./chunk-ABOSNV75.js";import"./chunk-RT7OZJYZ.js";import"./chunk-5RYL4EJ2.js";import{b as J}from"./chunk-KBLVOO4J.js";import"./chunk-WUV22SZ4.js";import"./chunk-H6RHVRGW.js";import{s as Q}from"./chunk-TANYEHMZ.js";import{Ab as p,Ac as B,Cb as m,Db as M,Fb as N,Gb as j,Hb as s,Hc as d,Ib as o,Ic as f,Jb as n,Jc as x,Kb as w,Ld as R,Nc as q,Rb as P,Sd as H,Ub as h,Wb as c,Xa as i,eb as T,ib as O,jc as r,kc as D,lc as u,ld as W,mb as V,ob as E,oc as g,pc as I,qc as S,ta as v,ua as y,ud as A,wb as k,xd as G,zc as b}from"./chunk-L3U6V3BF.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var vt=()=>["/menu/Outlets/Master/Outlets/Info"],Ct=t=>({ID:t}),yt=()=>["/menu/Products/Catalog/Products/Info"];function Tt(t,l){if(t&1){let e=P();o(0,"button",11),h("click",function(){v(e);let a=c();return y(a.openExportModal())}),w(1,"i",12),r(2," Export "),n()}}function gt(t,l){if(t&1){let e=P();o(0,"div",13)(1,"h6"),r(2,"Outlet Group"),n(),o(3,"POS-outlet-group-tree-select",14),S("selectedOutletGroupIDChange",function(a){v(e);let C=c();return I(C.pageData.Filter.OutletGroupID,a)||(C.pageData.Filter.OutletGroupID=a),y(a)}),n(),o(4,"h6"),r(5,"Category"),n(),o(6,"POS-product-category-select",15),S("selectedCategoryIDChange",function(a){v(e);let C=c();return I(C.pageData.Filter.CategoryID,a)||(C.pageData.Filter.CategoryID=a),y(a)}),n(),o(7,"autocompleteV3",16),S("modelNameChange",function(a){v(e);let C=c();return I(C.pageData.Filter.ListProductID,a)||(C.pageData.Filter.ListProductID=a),y(a)}),n(),o(8,"h6"),r(9,"From - To"),n(),o(10,"div")(11,"datepicker",17),S("dateChange",function(a){v(e);let C=c();return I(C.pageData.Filter.From,a)||(C.pageData.Filter.From=a),y(a)}),n()(),o(12,"div",18)(13,"datepicker",19),S("dateChange",function(a){v(e);let C=c();return I(C.pageData.Filter.To,a)||(C.pageData.Filter.To=a),y(a)}),n()(),o(14,"h6"),r(15,"Inventory Type"),n(),o(16,"radio-options",20),S("modelChange",function(a){v(e);let C=c();return I(C.pageData.Filter.InventoryType,a)||(C.pageData.Filter.InventoryType=a),y(a)}),n()()}if(t&2){let e=c();i(3),s("showClear",!0),g("selectedOutletGroupID",e.pageData.Filter.OutletGroupID),i(3),g("selectedCategoryID",e.pageData.Filter.CategoryID),s("showClear",!0),i(),g("modelName",e.pageData.Filter.ListProductID),s("placeholder","Search Product")("isShowEmptyMessage",!0)("emptyMessage","No Product found")("tooltipMessage","Search by product name")("label","Product to Analyze")("listDataEndpoint","/api/ac/GetProductSuggestionByCodeNName")("valueField","Name"),i(4),s("isFloatingLabel",!1),g("date",e.pageData.Filter.From),s("hidelClearBtn",!0),i(2),s("isFloatingLabel",!1),g("date",e.pageData.Filter.To),s("hidelClearBtn",!0),i(3),g("model",e.pageData.Filter.InventoryType),s("options",e.pageData.Options.InventoryTypes)}}function It(t,l){t&1&&(o(0,"th",8),r(1,"Code"),n())}function St(t,l){t&1&&(o(0,"th",9)(1,"span",21),r(2," Start "),n()())}function Pt(t,l){t&1&&(o(0,"th",9)(1,"span",22),r(2," Bought "),n()())}function ht(t,l){t&1&&(o(0,"th",9)(1,"span",23),r(2," Sold "),n()())}function Ft(t,l){t&1&&(o(0,"th",9)(1,"span",24),r(2," T.In "),n()())}function Et(t,l){t&1&&(o(0,"th",9)(1,"span",25),r(2," T.Out "),n()())}function wt(t,l){t&1&&(o(0,"th",9)(1,"span",26),r(2," Adj "),n()())}function Dt(t,l){t&1&&(o(0,"th",9)(1,"span",27),r(2," End "),n()())}function bt(t,l){t&1&&(o(0,"th",9)(1,"span",28),r(2," Now "),n()())}function Bt(t,l){t&1&&(o(0,"th",9)(1,"span",29),r(2," % "),n()())}function Lt(t,l){if(t&1&&(o(0,"td",31),r(1),n()),t&2){let e=c().$implicit;i(),u(" ",e.ProductCode," ")}}function Ot(t,l){if(t&1&&(o(0,"td",32),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Start),i(),u(" ",f(2,2,e.Start)," ")}}function Vt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.Bought)," ")}}function kt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.Sold)," ")}}function Mt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.TransferredIn)," ")}}function Nt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.TransferredOut)," ")}}function jt(t,l){if(t&1&&(o(0,"td",32),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Adjustment),i(),u(" ",e.Adjustment<0?e.Adjustment*-1:f(2,2,e.Adjustment)," ")}}function qt(t,l){if(t&1&&(o(0,"td",32),r(1),n()),t&2){let e=c().$implicit;s("colsFontColor",e.End),i(),u(" ",e.End," ")}}function Wt(t,l){if(t&1&&(o(0,"td",32),r(1),n()),t&2){let e=c().$implicit;s("colsFontColor",e.Now),i(),u(" ",e.Now," ")}}function At(t,l){if(t&1&&(o(0,"td",31),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),u(" ",f(2,1,e.SellTransferInRate)," ")}}function Gt(t,l){if(t&1&&(o(0,"tr")(1,"td")(2,"a",30),r(3),n()(),o(4,"td")(5,"a",30),r(6),n()(),p(7,Lt,2,1,"td",31),p(8,Ot,3,4,"td",32),p(9,Vt,3,3,"td",33),p(10,kt,3,3,"td",34),p(11,Mt,3,3,"td",33),p(12,Nt,3,3,"td",34),p(13,jt,3,4,"td",32),p(14,qt,2,2,"td",32),p(15,Wt,2,2,"td",32),p(16,At,3,3,"td",31),n()),t&2){let e=l.$implicit,_=c(2);i(2),s("routerLink",b(16,vt))("queryParams",B(17,Ct,e.OutletID)),i(),u(" ",e.OutletName," "),i(2),s("routerLink",b(19,yt))("queryParams",B(20,Ct,e.ProductID)),i(),D(e.ProductName),i(),m(_.column.code.selected?7:-1),i(),m(_.column.start.selected?8:-1),i(),m(_.column.bought.selected?9:-1),i(),m(_.column.sold.selected?10:-1),i(),m(_.column.transferredIn.selected?11:-1),i(),m(_.column.transferredOut.selected?12:-1),i(),m(_.column.adjust.selected?13:-1),i(),m(_.column.end.selected?14:-1),i(),m(_.column.now.selected?15:-1),i(),m(_.column.percent.selected?16:-1)}}function Rt(t,l){if(t&1&&N(0,Gt,17,22,"tr",null,M),t&2){let e=c();j(e.infiniteList)}}function Ht(t,l){t&1&&(o(0,"tr")(1,"td",35),w(2,"app-empty-state"),n()())}function zt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Start"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Start"))," ")}}function Qt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"Bought"))," ")}}function Jt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"Sold"))," ")}}function Kt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"TransferredIn"))," ")}}function Ut(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"sum"),d(3,"quantityFraction"),n()),t&2){let e=c(2);i(),u(" ",f(3,4,x(2,1,e.infiniteList,"TransferredOut"))," ")}}function Xt(t,l){if(t&1&&(o(0,"td",38),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Adjustment"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Adjustment"))," ")}}function Yt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"End"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"End"))," ")}}function Zt(t,l){if(t&1&&(o(0,"td",32),d(1,"sum"),d(2,"quantityFraction"),r(3),d(4,"sum"),d(5,"quantityFraction"),n()),t&2){let e=c(2);s("colsFontColor",f(2,5,x(1,2,e.infiniteList,"Now"))),i(3),u(" ",f(5,10,x(4,7,e.infiniteList,"Now"))," ")}}function $t(t,l){if(t&1&&(o(0,"tfoot")(1,"tr",36)(2,"th",37),r(3," Total: "),n(),p(4,zt,6,12,"td",32),p(5,Qt,4,6,"td",33),p(6,Jt,4,6,"td",34),p(7,Kt,4,6,"td",33),p(8,Ut,4,6,"td",34),p(9,Xt,6,12,"td",38),p(10,Yt,6,12,"td",32),p(11,Zt,6,12,"td",32),n()()),t&2){let e=c();i(2),k("colspan",e.column.code.selected?3:2),i(2),m(e.column.start.selected?4:-1),i(),m(e.column.bought.selected?5:-1),i(),m(e.column.sold.selected?6:-1),i(),m(e.column.transferredIn.selected?7:-1),i(),m(e.column.transferredOut.selected?8:-1),i(),m(e.column.adjust.selected?9:-1),i(),m(e.column.end.selected?10:-1),i(),m(e.column.now.selected?11:-1)}}function te(t,l){if(t&1){let e=P();o(0,"span",45),h("click",function(){v(e);let a=c(2);return y(a.StoreRowsCountAPIResult("inventory/GetCountProductInventoryTraffic"))}),o(1,"i",46),r(2,"?"),n()()}}function ee(t,l){if(t&1&&(o(0,"span"),r(1),d(2,"number"),n()),t&2){let e=c(2);i(),D(f(2,1,e.listTotal))}}function ie(t,l){if(t&1){let e=P();o(0,"div",10)(1,"div",39)(2,"div",40),r(3),d(4,"number"),E(5,te,3,0,"span",41)(6,ee,3,3,"span",42),r(7),n()(),o(8,"a",43),h("click",function(){v(e);let a=c();return y(a.NextPage(!0))}),w(9,"i",44),r(10," Next"),n()()}if(t&2){let e=c();i(3),u(" Showing 1 - ",f(4,4,e.infiniteList.length)," of "),i(2),s("ngIf",!e.pageData.HideStoreApiCount),i(),s("ngIf",e.pageData.HideStoreApiCount),i(),u(" records ~ ",e.pageData.Filter.PageNumber," Page ")}}var xt=class t extends X{constructor(e,_,a,C,L,F,ne){super(e,_,"inventory/GetProductInventoryTraffic","inventoryloader/GetProductInventoryTraffic",void 0,void 0,!0);this.httpService=_;this.csvConverter=a;this.pageTitle=C;this.converter=L;this.roleService=F;this.matDialog=ne;this.pageTitle.setTitle(this.menuData.T)}column={code:{selected:!0,name:"Code"},start:{selected:!0,name:"Start"},bought:{selected:!1,name:"Bought"},sold:{selected:!0,name:"Sold"},transferredIn:{selected:!0,name:"T.In"},transferredOut:{selected:!0,name:"T.Out"},adjust:{selected:!1,name:"Adjust"},end:{selected:!0,name:"End"},now:{selected:!0,name:"Now"},percent:{selected:!1,name:"Percentage"}};selectedProduct=[];postBindData(){this.menuData.H=this.data.PageTitle}openExportModal(){this.matDialog.open(Z,{data:{title:"Product Inventory Traffic",exportTypes:[{ID:"inventoryexport/GetExportProductInventoryTraffic",Value:"Default",FileName:"Product Inventory Traffic"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!0}})}static \u0275fac=function(_){return new(_||t)(T(tt),T(Q),T(et),T(R),T(mt),T(J),T(Y))};static \u0275cmp=O({type:t,selectors:[["POS-product-inventory-traffic"]],features:[V],decls:31,vars:19,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter","column"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","150px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","80px"],[1,"d-flex","justify-content-between","mt-5"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],[1,"tree-select-as-filter",3,"selectedOutletGroupIDChange","showClear","selectedOutletGroupID"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],[3,"modelNameChange","modelName","placeholder","isShowEmptyMessage","emptyMessage","tooltipMessage","label","listDataEndpoint","valueField"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],["name","ProductTypeId",3,"modelChange","model","options"],["matTooltip","Stock based on start date (from date filter)","matTooltipPosition","above"],["matTooltip","Movement Stock from Inbound Logistics (Supplier Bill)","matTooltipPosition","above"],["matTooltip","Movement Stock from Outbound Logistics (Customer Invoice)","matTooltipPosition","above"],["matTooltip","Stock received from other outlets","matTooltipPosition","above"],["matTooltip","Stock sent to other outlets","matTooltipPosition","above"],["matTooltip","Total stock adjustments made","matTooltipPosition","above"],["matTooltip","Stock based on end date (to date filter)","matTooltipPosition","above"],["matTooltip","Current on-hand inventory","matTooltipPosition","above"],["matTooltip","Percentage of sold items compared to the total items received from other outlets.","matTooltipPosition","above",1,"text-end"],[3,"routerLink","queryParams"],[1,"text-end"],[1,"text-end",3,"colsFontColor"],[1,"text-end","text-success"],[1,"text-end","text-danger"],["colspan","12"],[1,"table-footer"],[1,"empty-column","text-end"],[1,"text-end","text-success",3,"colsFontColor"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retrieve rows count",1,"border","p-3"]],template:function(_,a){if(_&1){let C=P();o(0,"mainpanel-cmp",1),h("onSubmit",function(){return v(C),y(a.searchFromPageOne())}),S("filterChange",function(F){return v(C),I(a.pageData.Filter,F)||(a.pageData.Filter=F),y(F)}),o(1,"actions"),E(2,Tt,3,0,"button",2),n(),o(3,"filters"),E(4,gt,17,20,"ng-template",null,0,q),n(),o(6,"content")(7,"div",3)(8,"div",4)(9,"table",5)(10,"thead",6)(11,"tr")(12,"th",7),r(13,"Outlet"),n(),o(14,"th"),r(15,"Product"),n(),p(16,It,2,0,"th",8),p(17,St,3,0,"th",9),p(18,Pt,3,0,"th",9),p(19,ht,3,0,"th",9),p(20,Ft,3,0,"th",9),p(21,Et,3,0,"th",9),p(22,wt,3,0,"th",9),p(23,Dt,3,0,"th",9),p(24,bt,3,0,"th",9),p(25,Bt,3,0,"th",9),n()(),o(26,"tbody"),p(27,Rt,2,0)(28,Ht,3,0,"tr"),n(),p(29,$t,12,9,"tfoot"),n()(),p(30,ie,11,6,"div",10),n()()()}_&2&&(s("pageData",a.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),g("filter",a.pageData.Filter),s("column",a.column),i(2),s("ngIf",a.roleService.global.Export),i(14),m(a.column.code.selected?16:-1),i(),m(a.column.start.selected?17:-1),i(),m(a.column.bought.selected?18:-1),i(),m(a.column.sold.selected?19:-1),i(),m(a.column.transferredIn.selected?20:-1),i(),m(a.column.transferredOut.selected?21:-1),i(),m(a.column.adjust.selected?22:-1),i(),m(a.column.end.selected?23:-1),i(),m(a.column.now.selected?24:-1),i(),m(a.column.percent.selected?25:-1),i(2),m(a.infiniteList&&a.infiniteList.length>0?27:28),i(2),m(a.infiniteList&&a.infiniteList.length>0?29:-1),i(),m(a.infiniteList&&a.infiniteList.length>0?30:-1))},dependencies:[at,ot,G,W,z,_t,ct,st,nt,H,pt,dt,lt,rt,ut,ft,U,K,A,it,$],encapsulation:2})};export{xt as Product_Inventory_TrafficComponent};
|