dealpos 25.44.0 → 25.44.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/browser/{chunk-IQQGAD2W.js → chunk-2RZHUSQU.js} +1 -1
  2. package/browser/{chunk-BJBJJUF7.js → chunk-2X7JXLPO.js} +1 -1
  3. package/browser/{chunk-RMOQAAKS.js → chunk-2ZDXMF6S.js} +2 -2
  4. package/browser/{chunk-SVV5ZTGZ.js → chunk-34KJ7YHX.js} +1 -1
  5. package/browser/{chunk-476U7URX.js → chunk-3FD5W6K2.js} +2 -2
  6. package/browser/{chunk-6PWFGFWQ.js → chunk-3Q3FUJ44.js} +1 -1
  7. package/browser/{chunk-BX366TSG.js → chunk-3UXPJWJQ.js} +1 -1
  8. package/browser/{chunk-IAZFUBFX.js → chunk-43CYJJ7R.js} +1 -1
  9. package/browser/{chunk-GBQSPBVZ.js → chunk-47RLR2PC.js} +1 -1
  10. package/browser/{chunk-AJLKESQV.js → chunk-4WAY7P2M.js} +1 -1
  11. package/browser/{chunk-HCSPFPLE.js → chunk-53I2NSFZ.js} +1 -1
  12. package/browser/{chunk-K4LAZCXZ.js → chunk-5E64BHHD.js} +2 -2
  13. package/browser/{chunk-7NGYBSTA.js → chunk-5XINUUVX.js} +2 -2
  14. package/browser/{chunk-PQDYHLJ2.js → chunk-655R7PDY.js} +1 -1
  15. package/browser/{chunk-SJPYABFR.js → chunk-6PSJSHPW.js} +1 -1
  16. package/browser/{chunk-LLQVL4JL.js → chunk-7M35JNER.js} +1 -1
  17. package/browser/{chunk-FA4ADELT.js → chunk-7QOZKOAW.js} +1 -1
  18. package/browser/{chunk-GYNHYLZQ.js → chunk-AAX2TBEM.js} +1 -1
  19. package/browser/{chunk-G6USNHW7.js → chunk-APFUVBFJ.js} +1 -1
  20. package/browser/{chunk-WAMC5CEY.js → chunk-AUTKQFDZ.js} +1 -1
  21. package/browser/{chunk-WLGAEGPV.js → chunk-AXITAME4.js} +1 -1
  22. package/browser/{chunk-3PTKHKTZ.js → chunk-BA64MIHJ.js} +1 -1
  23. package/browser/chunk-BC4RWXWV.js +3 -0
  24. package/browser/{chunk-VIJLHA7Q.js → chunk-BO6JXHTU.js} +1 -1
  25. package/browser/{chunk-NRYWKVQ2.js → chunk-BSFKTGRH.js} +1 -1
  26. package/browser/{chunk-WQDUNDSA.js → chunk-CFDWM2SO.js} +1 -1
  27. package/browser/{chunk-FHMDB7MQ.js → chunk-CKNSQS62.js} +1 -1
  28. package/browser/{chunk-CXTL5YYJ.js → chunk-CLIFAF7L.js} +2 -2
  29. package/browser/{chunk-TMADIQOR.js → chunk-CMAE52E3.js} +1 -1
  30. package/browser/{chunk-CN4B6FUG.js → chunk-CT7VQIZ7.js} +1 -1
  31. package/browser/{chunk-QHGWF2RX.js → chunk-CW2D4XVM.js} +1 -1
  32. package/browser/{chunk-USUWU5NE.js → chunk-D4G24QCQ.js} +1 -1
  33. package/browser/{chunk-YEAPJ2OC.js → chunk-D7I2I6EI.js} +1 -1
  34. package/browser/{chunk-RABEENVP.js → chunk-DHQWJAOX.js} +1 -1
  35. package/browser/chunk-DTWCNQ4N.js +14 -0
  36. package/browser/{chunk-T6WJAS3H.js → chunk-EPUDCYJW.js} +1 -1
  37. package/browser/{chunk-Z65FTA7V.js → chunk-ESIVNWIY.js} +1 -1
  38. package/browser/{chunk-XDINGYNX.js → chunk-FOF7BQHC.js} +1 -1
  39. package/browser/chunk-GCBG44YQ.js +1 -0
  40. package/browser/{chunk-2HUEFC2T.js → chunk-H273QYYR.js} +1 -1
  41. package/browser/{chunk-XQ6JBIMX.js → chunk-IJVIVNVH.js} +1 -1
  42. package/browser/{chunk-KXCEORNJ.js → chunk-J2HRW2OD.js} +1 -1
  43. package/browser/{chunk-V26H2UIF.js → chunk-J2QBKYVZ.js} +1 -1
  44. package/browser/{chunk-A4HMT7IS.js → chunk-J7JOV2UE.js} +3 -3
  45. package/browser/{chunk-2PX7ZCAH.js → chunk-JXNDVG64.js} +1 -1
  46. package/browser/{chunk-EVWNBQBC.js → chunk-KAJ5NYU6.js} +1 -1
  47. package/browser/{chunk-DEVO5OTP.js → chunk-M57BBETM.js} +1 -1
  48. package/browser/chunk-MS67N3VC.js +1 -0
  49. package/browser/{chunk-PANAC2WS.js → chunk-NHKASBAN.js} +1 -1
  50. package/browser/chunk-NSXJCO22.js +1 -0
  51. package/browser/{chunk-7CMBWKFF.js → chunk-O35SSVC5.js} +1 -1
  52. package/browser/{chunk-M5PJHCX4.js → chunk-ODOX327P.js} +1 -1
  53. package/browser/{chunk-JUTITMC7.js → chunk-OGM6TARA.js} +2 -2
  54. package/browser/chunk-OTEI4GZK.js +1 -0
  55. package/browser/{chunk-BMMZ2W3C.js → chunk-OZG5SOW6.js} +1 -1
  56. package/browser/chunk-P63I2MBK.js +112 -0
  57. package/browser/{chunk-LVYO35LX.js → chunk-PJTFJKGS.js} +1 -1
  58. package/browser/{chunk-XPWSJXFB.js → chunk-PKT3SIRZ.js} +1 -1
  59. package/browser/{chunk-ODOWAGLZ.js → chunk-PLZ3ODXT.js} +1 -1
  60. package/browser/{chunk-VIPGZJM3.js → chunk-PMEWJS46.js} +1 -1
  61. package/browser/{chunk-2FWXO7SV.js → chunk-PW7JCR65.js} +1 -1
  62. package/browser/{chunk-RF2OEHPO.js → chunk-QMBZSWSZ.js} +1 -1
  63. package/browser/{chunk-QVPSWY5E.js → chunk-QPS677LS.js} +1 -1
  64. package/browser/{chunk-7J36T25H.js → chunk-QR4VV4GM.js} +1 -1
  65. package/browser/{chunk-V5ZK5RT7.js → chunk-RKZPHRAC.js} +14 -14
  66. package/browser/{chunk-35WLGG74.js → chunk-RUFSPHPN.js} +1 -1
  67. package/browser/{chunk-RW4LIELV.js → chunk-RW5SHW7P.js} +1 -1
  68. package/browser/{chunk-4TW7XHFP.js → chunk-SAAWSHJS.js} +1 -1
  69. package/browser/{chunk-IHFA5AEL.js → chunk-SCB5WW4J.js} +1 -1
  70. package/browser/{chunk-S22XRS4J.js → chunk-SPTLCHEU.js} +1 -1
  71. package/browser/{chunk-QXU66IK7.js → chunk-SZ7M2HSN.js} +1 -1
  72. package/browser/{chunk-BSQJETW6.js → chunk-T6TPCDSC.js} +1 -1
  73. package/browser/{chunk-IOJ4YVHD.js → chunk-UKFG66EY.js} +1 -1
  74. package/browser/{chunk-SMZ4VMLX.js → chunk-V77ELRLY.js} +1 -1
  75. package/browser/{chunk-7V7QIPRV.js → chunk-VFEOT7L6.js} +1 -1
  76. package/browser/{chunk-JXYRDQVO.js → chunk-W5EJQZB4.js} +1 -1
  77. package/browser/{chunk-TGFYFTBV.js → chunk-WM2ISZEL.js} +1 -1
  78. package/browser/{chunk-BMW3GOBJ.js → chunk-XFP34FRB.js} +1 -1
  79. package/browser/{chunk-WQDFMYT7.js → chunk-XMABGEYA.js} +1 -1
  80. package/browser/{chunk-6ABP4TP7.js → chunk-XMABJJGK.js} +1 -1
  81. package/browser/chunk-XQOLOZQF.js +1 -0
  82. package/browser/{chunk-UMDNTO5M.js → chunk-Y3YIK27D.js} +1 -1
  83. package/browser/{chunk-F4F5V5CZ.js → chunk-YCTTD62Z.js} +2 -2
  84. package/browser/{chunk-LI2NYODY.js → chunk-YH3UWFOD.js} +1 -1
  85. package/browser/{chunk-W5U5OOLP.js → chunk-YR223T2R.js} +13 -13
  86. package/browser/{chunk-KKRF45KI.js → chunk-YV6PGG6H.js} +1 -1
  87. package/browser/{chunk-GV2PUDWZ.js → chunk-ZIT77RS6.js} +2 -2
  88. package/browser/{chunk-2KCCP5UQ.js → chunk-ZIUOCAE2.js} +1 -1
  89. package/browser/{chunk-ARKU4MG5.js → chunk-ZJHWFDGD.js} +1 -1
  90. package/browser/index.html +2 -2
  91. package/browser/{main-GH4LELYQ.js → main-4NFW4OXW.js} +2 -2
  92. package/package.json +1 -1
  93. package/browser/chunk-5QXTT2Q4.js +0 -1
  94. package/browser/chunk-6SNK3MMW.js +0 -1
  95. package/browser/chunk-C2W6JXEB.js +0 -3
  96. package/browser/chunk-HKZQN5TX.js +0 -14
  97. package/browser/chunk-HOM424UE.js +0 -1
  98. package/browser/chunk-S2QC3PGR.js +0 -112
  99. package/browser/chunk-S5ZMZ6ZK.js +0 -1
@@ -1,2 +1,2 @@
1
- import{O as b}from"./chunk-TSIYPTYI.js";import{a as m}from"./chunk-2FWFPV5I.js";import{a as u}from"./chunk-QVPSWY5E.js";import{Vd as d,Yd as h,ja as n,na as c}from"./chunk-UXRO4UFY.js";import{j as l}from"./chunk-7DCB7DB2.js";var p=class a{constructor(){}copy(t){return new Promise((o,r)=>{try{if(navigator.clipboard)navigator.clipboard.writeText(t).then(o,r);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();try{document.execCommand("copy")?o():r(new Error("Failed to copy with execCommand"))}catch(i){r(i)}finally{document.body.removeChild(e)}}}catch(e){r(e)}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};var y=class a{toastr=c(d);httpService=c(h);copyToClipBoard=c(p);createCustomerFromNewNumberAndSendReceipt(t,o,r,e,i){r==0?this.httpService.post(b.CreateCustomerInvoice,{InvoiceID:e.ObjectID,Mobile:t}).subscribe(s=>l(this,null,function*(){this.toastr.success(s.Message,m.Success),yield this.sendReceiptToWhatsapp(t,e,o,i)})):this.toastr.info("WABA is not supported yet",m.Info)}createWhatsappReceipt(t,o,r){let e=I=>new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(I).replace("Rp","").trim().split(",00")?.[0],i=JSON.parse(localStorage.getItem("AccountInfo"))?.BrandName,{ObjectID:s,Final:g,InvoiceNumber:f}=t,v=window.location.host,w=`https://receipt.dealpos.app/s?Data=${window.btoa(`${s}_${v}`)}`;return this.convertWhatsappTemplateMessage({Amount:e(g),Brand:i,Currency:o,Number:f,ReceiptLink:w},r)}convertWhatsappTemplateMessage(t,o){let r=o||u?.whatsappTemplateMessage,e=["Brand","Number","Currency","Amount","ReceiptLink"],i=r;return e.forEach(s=>i=i.replace(`{${s}}`,t[s])),i}redirectToWhatsapp(t,o){let r=t;r=r[0]==="0"?`62${r.slice(1)}`:r;let e=`whatsapp://send?phone=${r}&text=${encodeURIComponent(o)}`;window.location.href=e,this.showToastrWhatsappNoInstalled()}showToastrWhatsappNoInstalled(){let t=!1;window.onblur=function(){t=!0},setTimeout(()=>{t||this.toastr.warning(`Currently, sending an e-receipt automatically opens WhatsApp Desktop, provided the device has the app installed
1
+ import{O as b}from"./chunk-TSIYPTYI.js";import{a as m}from"./chunk-2FWFPV5I.js";import{a as u}from"./chunk-QPS677LS.js";import{Vd as d,Yd as h,ja as n,na as c}from"./chunk-UXRO4UFY.js";import{j as l}from"./chunk-7DCB7DB2.js";var p=class a{constructor(){}copy(t){return new Promise((o,r)=>{try{if(navigator.clipboard)navigator.clipboard.writeText(t).then(o,r);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();try{document.execCommand("copy")?o():r(new Error("Failed to copy with execCommand"))}catch(i){r(i)}finally{document.body.removeChild(e)}}}catch(e){r(e)}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};var y=class a{toastr=c(d);httpService=c(h);copyToClipBoard=c(p);createCustomerFromNewNumberAndSendReceipt(t,o,r,e,i){r==0?this.httpService.post(b.CreateCustomerInvoice,{InvoiceID:e.ObjectID,Mobile:t}).subscribe(s=>l(this,null,function*(){this.toastr.success(s.Message,m.Success),yield this.sendReceiptToWhatsapp(t,e,o,i)})):this.toastr.info("WABA is not supported yet",m.Info)}createWhatsappReceipt(t,o,r){let e=I=>new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(I).replace("Rp","").trim().split(",00")?.[0],i=JSON.parse(localStorage.getItem("AccountInfo"))?.BrandName,{ObjectID:s,Final:g,InvoiceNumber:f}=t,v=window.location.host,w=`https://receipt.dealpos.app/s?Data=${window.btoa(`${s}_${v}`)}`;return this.convertWhatsappTemplateMessage({Amount:e(g),Brand:i,Currency:o,Number:f,ReceiptLink:w},r)}convertWhatsappTemplateMessage(t,o){let r=o||u?.whatsappTemplateMessage,e=["Brand","Number","Currency","Amount","ReceiptLink"],i=r;return e.forEach(s=>i=i.replace(`{${s}}`,t[s])),i}redirectToWhatsapp(t,o){let r=t;r=r[0]==="0"?`62${r.slice(1)}`:r;let e=`whatsapp://send?phone=${r}&text=${encodeURIComponent(o)}`;window.location.href=e,this.showToastrWhatsappNoInstalled()}showToastrWhatsappNoInstalled(){let t=!1;window.onblur=function(){t=!0},setTimeout(()=>{t||this.toastr.warning(`Currently, sending an e-receipt automatically opens WhatsApp Desktop, provided the device has the app installed
2
2
  `,"WhatsApp not installed")},2e3)}copyToClipboard(t){return new Promise((o,r)=>this.copyToClipBoard.copy(t).then(()=>{this.toastr.info("Message copied to clipboard. If WhatsApp doesn't show the message, please paste it manually.","Receipt Ready",{timeOut:8e3}),o("Copied to clipboard")}).catch(e=>{console.log(e),this.toastr.warning("Could not copy message to clipboard","Clipboard Error",{timeOut:8e3}),r(e)}))}sendReceiptToWhatsapp(t,o,r,e){return l(this,null,function*(){try{let i=this.createWhatsappReceipt(o,r,e);try{yield this.copyToClipboard(i)}finally{this.redirectToWhatsapp(t,i)}}catch(i){console.warn(i),this.toastr.error("Failed to send receipt")}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac})};export{y as a};
@@ -1 +1 @@
1
- import{b as ae,c as ce}from"./chunk-FKDZ5OWB.js";import{g as me}from"./chunk-4UYZJCFI.js";import{d as le,e as re}from"./chunk-ARKU4MG5.js";import{A as oe,G as se}from"./chunk-H7F34T25.js";import{b as ie,c as ne}from"./chunk-JOXTERIM.js";import{F as Z,G as ee,h as X,o as Y}from"./chunk-RVXZOIFQ.js";import{$a as p,$b as $,Fa as c,Fc as z,I as F,Ib as m,Jb as u,Ka as T,Ma as M,Ob as b,Qb as v,Rb as V,Vd as J,Yd as te,Zb as H,_b as P,c as E,cb as L,db as I,e as k,ec as S,fa as N,fc as x,gc as Q,ja as O,jc as q,jd as G,kb as D,kc as W,lc as K,mb as j,na as g,o as A,qb as R,qc as C,rc as B,ua as f,va as r,vb as w,wa as a,yb as U}from"./chunk-UXRO4UFY.js";var _=class o{selectionsSubject=new k(new Map);getSelectedItems(t){return this.selectionsSubject.value.get(t)||[]}setSelectedItems(t,e){let i=new Map(this.selectionsSubject.value);i.set(t,[...e]),this.selectionsSubject.next(i)}clearSelectedItems(t){let e=new Map(this.selectionsSubject.value);e.delete(t),this.selectionsSubject.next(e)}getSelectedItems$(t){return new E(e=>{let i=this.selectionsSubject.subscribe(n=>{e.next(n.get(t)||[])});return()=>i.unsubscribe()})}getAllSelections(){return this.selectionsSubject.value}clearAllSelections(){this.selectionsSubject.next(new Map)}static \u0275fac=function(e){return new(e||o)};static \u0275prov=O({token:o,factory:o.\u0275fac,providedIn:"root"})};var Ce=["autocomplete"],ue=()=>({width:"100%"}),_e=()=>({width:"100%",maxWidth:"400px"}),ye=o=>({style:o});function Me(o,t){if(o&1){let e=b();m(0,"div",5),v("click",function(n){let s=r(e).$implicit,l=V();return a(l.toggleCheckbox(s,n))}),m(1,"p-checkbox",6),K("ngModelChange",function(n){let s=r(e).$implicit;return W(s._checked,n)||(s._checked=n),a(n)}),v("onChange",function(){let n=r(e).$implicit,s=V();return a(s.onCheckboxChange(n))})("click",function(n){return r(e),a(n.stopPropagation())}),u(),m(2,"div",7)(3,"div",8),S(4),u(),m(5,"div",9),S(6),u()()()}if(o&2){let e,i=t.$implicit;p(),q("ngModel",i._checked),w("binary",!0),p(3),x((e=i.Value)!==null&&e!==void 0?e:i.Name),p(2),Q(" ",i.Code," ")}}var de=class o{autocomplete;matTooltip;modelName;isMultiple=!0;placeholder="Search";isShowEmptyMessage=!1;emptyMessage="No results found";tooltipMessage="";valueField="Key";label;listDataEndpoint;maxSelectedItems=0;modelNameChange=new c;onSelectItem=new c;onRemoveItem=new c;completeMethod=new c;onSelect=new c;onUnselect=new c;httpService=g(te);toastr=g(J);autocompleteV3Service=g(_);selectedItems=M([]);suggestionList;internalSuggestionList=M([]);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(i=>this.suggestionList.find(n=>n[this.valueField]===i)).filter(i=>i!==void 0);if(e.length>0){this.selectedItems.set(e),this.autocompleteV3Service.setSelectedItems(this.listDataEndpoint,e);return}}let t=this.autocompleteV3Service.getSelectedItems(this.listDataEndpoint);if(t&&t.length>0){let e=t.filter(i=>this.modelName.includes(i[this.valueField]));if(e.length>0){this.selectedItems.set(e);return}}}}ngOnChanges(t){let e=t.modelName;e&&e.currentValue.length===0&&this.resetSelection()}resetSelection(){this.selectedItems.set([])}onModelChange(t){if(this.isMultiple&&Array.isArray(t)){this.selectedItems.set(t),this.autocompleteV3Service.setSelectedItems(this.listDataEndpoint,t);let e=t.map(i=>i[this.valueField]);this.modelNameChange.emit(e)}else this.isMultiple||this.modelNameChange.emit(t)}onCompleteHandler(t){let e=t.query;if(this.suggestionList&&this.suggestionList.length>0){let s=this.selectedItems(),l=this.suggestionList.filter(d=>{let h=e.toLowerCase(),y=(d.Name||"").toLowerCase(),ge=(d.Key||"").toLowerCase(),fe=y.includes(h)||ge.includes(h),ve=!s.some(Se=>Se[this.valueField]===d[this.valueField]);return fe&&ve});this.internalSuggestionList.set(l);return}let i=new URLSearchParams({Prefix:e,Count:"100"}).toString(),n=this.listDataEndpoint;n&&this.httpService.get(`${n}?${i}`).pipe(F(()=>A([])),N(s=>{let l=this.selectedItems(),d=s.filter(h=>!l.some(y=>y[this.valueField]===h[this.valueField]));this.internalSuggestionList.set(d)})).subscribe()}onSelectHandler(t){let e=this.isMultiple,i=this.maxSelectedItems;if(e&&i>0){let n=this.selectedItems();if(n.length>=i){this.toastr.warning(`Maximum ${i} items can be selected`,"Selection Limit"),setTimeout(()=>{this.modelNameChange.emit([...n])},0);return}}this.onSelectItem.emit(t),this.onSelect.emit(t)}onRemoveHandler(t){this.onRemoveItem.emit(t.value),this.onUnselect.emit(t.value),t.value&&(t.value._checked=!1)}isChecked(t){let e=this.selectedItems(),i=this.valueField;return e.some(n=>n[i]===t[i])}clearSelections(){this.selectedItems.set([]),this.autocompleteV3Service.clearSelectedItems(this.listDataEndpoint),this.modelNameChange.emit([])}getCurrentSelectionsFromService(){return this.autocompleteV3Service.getSelectedItems(this.listDataEndpoint)}onCheckboxChange(t){if(t._checked)this.isChecked(t)||(this.selectedItems.set([...this.selectedItems(),t]),this.onModelChange(this.selectedItems()));else{let e=this.selectedItems().filter(i=>i[this.valueField]!==t[this.valueField]);this.selectedItems.set(e),this.onModelChange(e)}setTimeout(()=>{this.autocomplete&&this.autocomplete.inputEL.nativeElement.focus()},0)}toggleCheckbox(t,e){t._checked=!t._checked,this.onCheckboxChange(t),e.stopPropagation()}ngOnDestroy(){}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=D({type:o,selectors:[["autocompleteV3"]],viewQuery:function(e,i){if(e&1&&H(Ce,5),e&2){let n;P(n=$())&&(i.autocomplete=n.first)}},inputs:{matTooltip:"matTooltip",modelName:"modelName",isMultiple:"isMultiple",placeholder:"placeholder",isShowEmptyMessage:"isShowEmptyMessage",emptyMessage:"emptyMessage",tooltipMessage:"tooltipMessage",valueField:"valueField",label:"label",listDataEndpoint:"listDataEndpoint",maxSelectedItems:"maxSelectedItems"},outputs:{modelNameChange:"modelNameChange",onSelectItem:"onSelectItem",onRemoveItem:"onRemoveItem",completeMethod:"completeMethod",onSelect:"onSelect",onUnselect:"onUnselect"},features:[f],decls:8,vars:17,consts:[["autocomplete",""],["item",""],[1,"d-flex","flex-column","gap-2",2,"margin-top","1rem"],[1,"w-100",2,"width","100%"],["optionLabel","Value",1,"w-100",3,"ngModelChange","completeMethod","onSelect","onUnselect","matTooltip","ngModel","suggestions","multiple","placeholder","showEmptyMessage","emptyMessage","inputStyle","overlayOptions"],[1,"d-flex","align-items-center","gap-2","p-6","w-100",3,"click"],[2,"margin","0",3,"ngModelChange","onChange","click","ngModel","binary"],[1,"ms-2"],[1,"font-medium"],[1,"text-muted",2,"font-size","10px !important"]],template:function(e,i){if(e&1){let n=b();m(0,"div",2)(1,"h6"),S(2),u(),m(3,"div",3)(4,"p-autocomplete",4,0),v("ngModelChange",function(l){return r(n),a(i.onModelChange(l))})("completeMethod",function(l){return r(n),a(i.onCompleteHandler(l))})("onSelect",function(l){return r(n),a(i.onSelectHandler(l))})("onUnselect",function(l){return r(n),a(i.onRemoveHandler(l))}),R(6,Me,7,4,"ng-template",null,1,z),u()()()}e&2&&(p(2),x(i.label),p(2),U(C(12,ue)),w("matTooltip",i.tooltipMessage)("ngModel",i.selectedItems())("suggestions",i.internalSuggestionList())("multiple",i.isMultiple)("placeholder",i.placeholder)("showEmptyMessage",i.isShowEmptyMessage)("emptyMessage",i.emptyMessage)("inputStyle",C(13,ue))("overlayOptions",B(15,ye,C(14,_e))))},dependencies:[oe,G,ee,X,Z,Y,ne,ie,se,me,ce,ae,re,le],encapsulation:2})};var he=class o{constructor(t,e){this.el=t;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-success"),this.renderer.removeClass(this.el.nativeElement,"text-danger");let t=this.value===0?"text-black":this.value>=1?"text-success":"text-danger";this.renderer.addClass(this.el.nativeElement,t)}static \u0275fac=function(e){return new(e||o)(I(T),I(L))};static \u0275dir=j({type:o,selectors:[["","colsFontColor",""]],inputs:{value:[0,"colsFontColor","value"]},features:[f]})};export{de as a,he as b};
1
+ import{b as ae,c as ce}from"./chunk-FKDZ5OWB.js";import{g as me}from"./chunk-4UYZJCFI.js";import{d as le,e as re}from"./chunk-ZJHWFDGD.js";import{A as oe,G as se}from"./chunk-H7F34T25.js";import{b as ie,c as ne}from"./chunk-JOXTERIM.js";import{F as Z,G as ee,h as X,o as Y}from"./chunk-RVXZOIFQ.js";import{$a as p,$b as $,Fa as c,Fc as z,I as F,Ib as m,Jb as u,Ka as T,Ma as M,Ob as b,Qb as v,Rb as V,Vd as J,Yd as te,Zb as H,_b as P,c as E,cb as L,db as I,e as k,ec as S,fa as N,fc as x,gc as Q,ja as O,jc as q,jd as G,kb as D,kc as W,lc as K,mb as j,na as g,o as A,qb as R,qc as C,rc as B,ua as f,va as r,vb as w,wa as a,yb as U}from"./chunk-UXRO4UFY.js";var _=class o{selectionsSubject=new k(new Map);getSelectedItems(t){return this.selectionsSubject.value.get(t)||[]}setSelectedItems(t,e){let i=new Map(this.selectionsSubject.value);i.set(t,[...e]),this.selectionsSubject.next(i)}clearSelectedItems(t){let e=new Map(this.selectionsSubject.value);e.delete(t),this.selectionsSubject.next(e)}getSelectedItems$(t){return new E(e=>{let i=this.selectionsSubject.subscribe(n=>{e.next(n.get(t)||[])});return()=>i.unsubscribe()})}getAllSelections(){return this.selectionsSubject.value}clearAllSelections(){this.selectionsSubject.next(new Map)}static \u0275fac=function(e){return new(e||o)};static \u0275prov=O({token:o,factory:o.\u0275fac,providedIn:"root"})};var Ce=["autocomplete"],ue=()=>({width:"100%"}),_e=()=>({width:"100%",maxWidth:"400px"}),ye=o=>({style:o});function Me(o,t){if(o&1){let e=b();m(0,"div",5),v("click",function(n){let s=r(e).$implicit,l=V();return a(l.toggleCheckbox(s,n))}),m(1,"p-checkbox",6),K("ngModelChange",function(n){let s=r(e).$implicit;return W(s._checked,n)||(s._checked=n),a(n)}),v("onChange",function(){let n=r(e).$implicit,s=V();return a(s.onCheckboxChange(n))})("click",function(n){return r(e),a(n.stopPropagation())}),u(),m(2,"div",7)(3,"div",8),S(4),u(),m(5,"div",9),S(6),u()()()}if(o&2){let e,i=t.$implicit;p(),q("ngModel",i._checked),w("binary",!0),p(3),x((e=i.Value)!==null&&e!==void 0?e:i.Name),p(2),Q(" ",i.Code," ")}}var de=class o{autocomplete;matTooltip;modelName;isMultiple=!0;placeholder="Search";isShowEmptyMessage=!1;emptyMessage="No results found";tooltipMessage="";valueField="Key";label;listDataEndpoint;maxSelectedItems=0;modelNameChange=new c;onSelectItem=new c;onRemoveItem=new c;completeMethod=new c;onSelect=new c;onUnselect=new c;httpService=g(te);toastr=g(J);autocompleteV3Service=g(_);selectedItems=M([]);suggestionList;internalSuggestionList=M([]);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(i=>this.suggestionList.find(n=>n[this.valueField]===i)).filter(i=>i!==void 0);if(e.length>0){this.selectedItems.set(e),this.autocompleteV3Service.setSelectedItems(this.listDataEndpoint,e);return}}let t=this.autocompleteV3Service.getSelectedItems(this.listDataEndpoint);if(t&&t.length>0){let e=t.filter(i=>this.modelName.includes(i[this.valueField]));if(e.length>0){this.selectedItems.set(e);return}}}}ngOnChanges(t){let e=t.modelName;e&&e.currentValue.length===0&&this.resetSelection()}resetSelection(){this.selectedItems.set([])}onModelChange(t){if(this.isMultiple&&Array.isArray(t)){this.selectedItems.set(t),this.autocompleteV3Service.setSelectedItems(this.listDataEndpoint,t);let e=t.map(i=>i[this.valueField]);this.modelNameChange.emit(e)}else this.isMultiple||this.modelNameChange.emit(t)}onCompleteHandler(t){let e=t.query;if(this.suggestionList&&this.suggestionList.length>0){let s=this.selectedItems(),l=this.suggestionList.filter(d=>{let h=e.toLowerCase(),y=(d.Name||"").toLowerCase(),ge=(d.Key||"").toLowerCase(),fe=y.includes(h)||ge.includes(h),ve=!s.some(Se=>Se[this.valueField]===d[this.valueField]);return fe&&ve});this.internalSuggestionList.set(l);return}let i=new URLSearchParams({Prefix:e,Count:"100"}).toString(),n=this.listDataEndpoint;n&&this.httpService.get(`${n}?${i}`).pipe(F(()=>A([])),N(s=>{let l=this.selectedItems(),d=s.filter(h=>!l.some(y=>y[this.valueField]===h[this.valueField]));this.internalSuggestionList.set(d)})).subscribe()}onSelectHandler(t){let e=this.isMultiple,i=this.maxSelectedItems;if(e&&i>0){let n=this.selectedItems();if(n.length>=i){this.toastr.warning(`Maximum ${i} items can be selected`,"Selection Limit"),setTimeout(()=>{this.modelNameChange.emit([...n])},0);return}}this.onSelectItem.emit(t),this.onSelect.emit(t)}onRemoveHandler(t){this.onRemoveItem.emit(t.value),this.onUnselect.emit(t.value),t.value&&(t.value._checked=!1)}isChecked(t){let e=this.selectedItems(),i=this.valueField;return e.some(n=>n[i]===t[i])}clearSelections(){this.selectedItems.set([]),this.autocompleteV3Service.clearSelectedItems(this.listDataEndpoint),this.modelNameChange.emit([])}getCurrentSelectionsFromService(){return this.autocompleteV3Service.getSelectedItems(this.listDataEndpoint)}onCheckboxChange(t){if(t._checked)this.isChecked(t)||(this.selectedItems.set([...this.selectedItems(),t]),this.onModelChange(this.selectedItems()));else{let e=this.selectedItems().filter(i=>i[this.valueField]!==t[this.valueField]);this.selectedItems.set(e),this.onModelChange(e)}setTimeout(()=>{this.autocomplete&&this.autocomplete.inputEL.nativeElement.focus()},0)}toggleCheckbox(t,e){t._checked=!t._checked,this.onCheckboxChange(t),e.stopPropagation()}ngOnDestroy(){}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=D({type:o,selectors:[["autocompleteV3"]],viewQuery:function(e,i){if(e&1&&H(Ce,5),e&2){let n;P(n=$())&&(i.autocomplete=n.first)}},inputs:{matTooltip:"matTooltip",modelName:"modelName",isMultiple:"isMultiple",placeholder:"placeholder",isShowEmptyMessage:"isShowEmptyMessage",emptyMessage:"emptyMessage",tooltipMessage:"tooltipMessage",valueField:"valueField",label:"label",listDataEndpoint:"listDataEndpoint",maxSelectedItems:"maxSelectedItems"},outputs:{modelNameChange:"modelNameChange",onSelectItem:"onSelectItem",onRemoveItem:"onRemoveItem",completeMethod:"completeMethod",onSelect:"onSelect",onUnselect:"onUnselect"},features:[f],decls:8,vars:17,consts:[["autocomplete",""],["item",""],[1,"d-flex","flex-column","gap-2",2,"margin-top","1rem"],[1,"w-100",2,"width","100%"],["optionLabel","Value",1,"w-100",3,"ngModelChange","completeMethod","onSelect","onUnselect","matTooltip","ngModel","suggestions","multiple","placeholder","showEmptyMessage","emptyMessage","inputStyle","overlayOptions"],[1,"d-flex","align-items-center","gap-2","p-6","w-100",3,"click"],[2,"margin","0",3,"ngModelChange","onChange","click","ngModel","binary"],[1,"ms-2"],[1,"font-medium"],[1,"text-muted",2,"font-size","10px !important"]],template:function(e,i){if(e&1){let n=b();m(0,"div",2)(1,"h6"),S(2),u(),m(3,"div",3)(4,"p-autocomplete",4,0),v("ngModelChange",function(l){return r(n),a(i.onModelChange(l))})("completeMethod",function(l){return r(n),a(i.onCompleteHandler(l))})("onSelect",function(l){return r(n),a(i.onSelectHandler(l))})("onUnselect",function(l){return r(n),a(i.onRemoveHandler(l))}),R(6,Me,7,4,"ng-template",null,1,z),u()()()}e&2&&(p(2),x(i.label),p(2),U(C(12,ue)),w("matTooltip",i.tooltipMessage)("ngModel",i.selectedItems())("suggestions",i.internalSuggestionList())("multiple",i.isMultiple)("placeholder",i.placeholder)("showEmptyMessage",i.isShowEmptyMessage)("emptyMessage",i.emptyMessage)("inputStyle",C(13,ue))("overlayOptions",B(15,ye,C(14,_e))))},dependencies:[oe,G,ee,X,Z,Y,ne,ie,se,me,ce,ae,re,le],encapsulation:2})};var he=class o{constructor(t,e){this.el=t;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-success"),this.renderer.removeClass(this.el.nativeElement,"text-danger");let t=this.value===0?"text-black":this.value>=1?"text-success":"text-danger";this.renderer.addClass(this.el.nativeElement,t)}static \u0275fac=function(e){return new(e||o)(I(T),I(L))};static \u0275dir=j({type:o,selectors:[["","colsFontColor",""]],inputs:{value:[0,"colsFontColor","value"]},features:[f]})};export{de as a,he as b};
@@ -1 +1 @@
1
- import{O as A}from"./chunk-TSIYPTYI.js";import{$a as o,Fc as y,Ib as a,Jb as r,Lb as d,Mb as _,Rb as l,Rd as I,Td as T,Yc as w,Yd as E,Zc as k,db as f,dc as b,ec as g,fc as P,ja as m,jd as S,ka as O,kb as x,lb as h,na as s,nb as v,qb as p,rc as C,uc as M,vb as c,xd as z,zb as u}from"./chunk-UXRO4UFY.js";var U=t=>[t],N=(t,e,n,i)=>({ID:t,Template:e,Price:n,Print:i});function H(t,e){if(t&1&&(d(0),a(1,"div",5)(2,"a",6)(3,"small"),g(4),r()()(),_()),t&2){let n=e.$implicit,i=e.index;o(),u(i>0?"border-start border-light":""),o(),c("routerLink",C(5,U,n.link))("queryParams",M(7,N,n.param.ID,n==null||n.param==null?null:n.param.Template,n.param.Price,n.param.Print)),o(2),P(n==null?null:n.label)}}function $(t,e){if(t&1&&(d(0),a(1,"div",2)(2,"div",3)(3,"small"),g(4,"Paper Size :"),r()(),p(5,H,5,12,"ng-container",4),r(),_()),t&2){let n=l();o(5),c("ngForOf",n.paperPrints)}}function q(t,e){if(t&1&&(a(0,"li")(1,"a",6)(2,"medium"),g(3),r()()()),t&2){let n=e.$implicit;o(),c("routerLink",C(3,U,n.link))("queryParams",M(5,N,n.param.ID,n==null||n.param==null?null:n.param.Template,n.param.Price,n.param.Print)),o(2),P(n==null?null:n.label)}}function J(t,e){if(t&1&&(a(0,"div",7)(1,"span"),g(2,"Paper Size :"),r(),a(3,"ul"),p(4,q,4,10,"li",4),r()()),t&2){let n=l();o(4),c("ngForOf",n.paperPrints)}}var D=class t{paperPrints;paperType;constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=x({type:t,selectors:[["POS-print-mode"]],inputs:{paperPrints:"paperPrints",paperType:"paperType"},standalone:!1,decls:3,vars:2,consts:[["A4",""],[4,"ngIf","ngIfElse"],[1,"row","g-0","invoice_mini"],[1,"col-auto"],[4,"ngFor","ngForOf"],[1,"col-auto","ps-3","pe-3"],[3,"routerLink","queryParams"],[1,"mode"]],template:function(n,i){if(n&1&&p(0,$,6,1,"ng-container",1)(1,J,5,1,"ng-template",null,0,y),n&2){let L=b(2);c("ngIf",i.paperType=="mini")("ngIfElse",L)}},dependencies:[w,k,I],styles:['.invoice_mini[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%]{width:264px;margin:auto;padding:0 4px;color:#000;font-family:Arial!important}.invoice_mini[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-family:Arial!important}.invoice_mini[_ngcontent-%COMP%] .text-danger[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .text-danger[_ngcontent-%COMP%]{color:red!important}.invoice_mini[_ngcontent-%COMP%] .border-y[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .border-y[_ngcontent-%COMP%]{padding:5px 0;border-top:1px solid #888}.invoice_mini[_ngcontent-%COMP%] .cartAmount[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .cartAmount[_ngcontent-%COMP%]{border-top:1px solid #888;border-bottom:1px solid #888}.invoice_mini[_ngcontent-%COMP%] .rightAuto[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .rightAuto[_ngcontent-%COMP%]{margin:0 0 0 auto}.invoice_mini[_ngcontent-%COMP%] span.point[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] span.point[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 auto!important;padding:0!important}.invoice_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%]{font-size:11px!important}.invoice_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-size:.4375rem;padding:.4375rem}.invoice_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%] > p[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{margin:0 auto!important;padding:0!important}.invoice_mini.lx300[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .sales_order_mini.lx300[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:220px}.box[_ngcontent-%COMP%]{position:relative}.ribbon[_ngcontent-%COMP%]{width:170px;height:140px;overflow:hidden;position:absolute}.ribbon[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;display:block;width:204px;padding:42px 31px;background-color:#3498db;box-shadow:0 5px 10px #0000001a;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.2);text-transform:uppercase;text-align:center;font-size:9px;line-height:17px}.ribbon-content[_ngcontent-%COMP%]{top:-10px;left:-45px}div.ribbon-content[_ngcontent-%COMP%]{right:47px;top:47px;transform:rotate(-45deg)}.invoice_mini.lx300[_ngcontent-%COMP%], .sales_order_mini.lx300[_ngcontent-%COMP%], .packingslip_container.lx300[_ngcontent-%COMP%]{margin:0 0 0 20px!important;width:520px!important;letter-spacing:3px!important}.invoice_mini.lx300[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .sales_order_mini.lx300[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .packingslip_container.lx300[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{letter-spacing:8px!important}@media print{print-mode[_ngcontent-%COMP%]{display:none;visibility:hidden;height:0px}.ribbon[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{background-color:none!important;color:#000;opacity:.7;border-style:dotted none}.ribbon[_ngcontent-%COMP%] .ribbon-content[_ngcontent-%COMP%]:after, .ribbon[_ngcontent-%COMP%] .ribbon-content[_ngcontent-%COMP%]:before{display:none}.sales_order_mini[_ngcontent-%COMP%] > .invoiceHeader[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{font-family:Arial,Helvetica,sans-serif!important}.toast[_ngcontent-%COMP%]{display:none!important}}body[_ngcontent-%COMP%]{padding:0;font-size:12px}a.linkMini[_ngcontent-%COMP%]{left:130px;position:absolute;top:.5px;text-decoration:none;color:#3b5998}div.print_container[_ngcontent-%COMP%]{margin:0 auto;width:900px;text-align:left;color:#000;position:relative}div.print_container[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-family:Arial!important;background-color:#fff}div.mode[_ngcontent-%COMP%]{color:gray;font-size:11px;text-align:right;height:20px;padding-top:2px}div.mode[_ngcontent-%COMP%] span[_ngcontent-%COMP%], div.mode[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], div.mode[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{float:left;display:block;margin:0;padding:0}div.mode[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:first-child{padding-right:5px;margin-right:5px;border-right:solid 1px gray}div.mode[_ngcontent-%COMP%] div.printer[_ngcontent-%COMP%]{float:left}div.mode[_ngcontent-%COMP%] div.template[_ngcontent-%COMP%]{float:right}div.mode[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#3b5998;text-decoration:none}div.mode[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}div.mode[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{color:gray}div.mode[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]:hover{text-decoration:none}div.mode[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:0 5px}div.header_left[_ngcontent-%COMP%]{float:left;padding:5px 0 0 5px}div.header_left[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:5px 0 0;padding:0;font-size:18px}div.header_right[_ngcontent-%COMP%]{float:right;padding:0 5px 0 0;max-width:425px}div.header_right[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0;padding:0;text-align:right}div.header_right[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:16px;font-weight:700;margin:0 5px 0 0;text-transform:uppercase}div.header_right[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:18px;font-weight:400}div.header_right[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{float:right;border-collapse:collapse}div.header_right[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], div.header_right[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 1px #9E9E9E;padding:4px}div.header_right[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#f6f6f6}div.header_right[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-bottom:6px}div.header[_ngcontent-%COMP%] img.float[_ngcontent-%COMP%]{margin:5px 0 0 5px;float:left}div.header[_ngcontent-%COMP%] div.company[_ngcontent-%COMP%]{width:100%;overflow:auto;margin:0 0 8px}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%]{float:left}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:18px;font-weight:700;margin:0;padding:0}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:11px;text-align:left;font-weight:400}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%] div.contact_info[_ngcontent-%COMP%]{margin-top:3px}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%] div.contact_info[_ngcontent-%COMP%] div.address[_ngcontent-%COMP%]{float:left;min-width:125px}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%] div.contact_info[_ngcontent-%COMP%] div.number[_ngcontent-%COMP%]{margin-right:5px;min-width:160px}div.header[_ngcontent-%COMP%] div.contact[_ngcontent-%COMP%]{width:max-content;overflow:auto;border:solid 1px #9E9E9E;padding:5px}div.header[_ngcontent-%COMP%] div.contact[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:12px;margin:0 5px 0 0;padding:0;font-weight:700;float:left}div.cartItems[_ngcontent-%COMP%]{padding:10px 3px 2px 5px}div.copy[_ngcontent-%COMP%]{background-image:url(/Images/Print/copy_bg.png);background-repeat:no-repeat;background-position:50% 70px}div.topNote[_ngcontent-%COMP%]{clear:both;text-align:right}div.invoiceNote[_ngcontent-%COMP%]{padding:10px 0 0 7px}div.note[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-weight:700;font-size:12px;margin:0 0 3px;padding:0}div.note[_ngcontent-%COMP%] div.single[_ngcontent-%COMP%]{width:895px!important}div.note[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%]{float:left;margin-left:5px;width:440px}div.note[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:5px 0 0;padding:0 0 0 20px}div.note[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%] ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:0 0 2px}div.note[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:2px 0 5px;padding:0 0 0 20px}div.note[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:0 0 2px}div.note[_ngcontent-%COMP%] div.right[_ngcontent-%COMP%]{float:right;width:440px;border-left:solid 1px #CACACA;padding-left:8px;margin-right:5px}div.note[_ngcontent-%COMP%] div.right[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:0;padding:0;list-style:none}div.note[_ngcontent-%COMP%] div.right[_ngcontent-%COMP%] h3.closing[_ngcontent-%COMP%]{margin-top:10px;text-align:right}div.note-info[_ngcontent-%COMP%]{margin:auto;width:23%}table.info[_ngcontent-%COMP%]{border-collapse:collapse;margin-top:5px;margin-left:5px}table.info[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table.info[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:5px 7px;border:solid 1px #d8d8d8}table.info[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f6f6f6}div.fullContainer[_ngcontent-%COMP%] div.print_container[_ngcontent-%COMP%]{min-height:970px;position:relative}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:"";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.clearfix[_ngcontent-%COMP%]{zoom:1}div.reportMargin[_ngcontent-%COMP%]{margin:20px 0 0}@media print{div.mode[_ngcontent-%COMP%], .linkMini[_ngcontent-%COMP%]{display:none;visibility:hidden;height:0px}thead[_ngcontent-%COMP%]{display:table-header-group}}small.timestamp[_ngcontent-%COMP%], small.creator[_ngcontent-%COMP%], small.printed[_ngcontent-%COMP%]{font-size:12px;text-align:center;display:block;font-style:italic;padding:2px 0}small.creator[_ngcontent-%COMP%]{padding:2px 0 20px;font-style:normal}span.titleJB[_ngcontent-%COMP%]{font-weight:700;padding:10px 0 7px 8px;display:block}.topHolder[_ngcontent-%COMP%]{margin-top:15px!important}h1.jobOrderHeader[_ngcontent-%COMP%]{text-align:center}.shippingAddress[_ngcontent-%COMP%]{text-align:right;min-width:240px;clear:both}.shippingAddress[_ngcontent-%COMP%] div.box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:first-child{text-align:left;font-weight:700}.packingSlip[_ngcontent-%COMP%]{min-width:150px}.customer_info[_ngcontent-%COMP%]{min-width:310px}']})},F=class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=h({type:t});static \u0275inj=O({imports:[S,T]})};var j=class t{constructor(e){this.sanitizer=e}transform(e){if(this.isResourceUrl(e))return this.sanitizer.bypassSecurityTrustResourceUrl(e);{let i=`${window.location.origin}/${e}`;return this.sanitizer.bypassSecurityTrustResourceUrl(i)}}isResourceUrl(e){return/^(https?:\/\/|\/)/i.test(e)}static \u0275fac=function(n){return new(n||t)(f(z,16))};static \u0275pipe=v({name:"StylesheetSafeUrl",type:t,pure:!0})};var B=class t{httpService=s(E);updateLastPrintDateTime(e){return this.httpService.post(`${A.UpdateLastPrintDateTime}`,{InvoiceID:e})}static \u0275fac=function(n){return new(n||t)};static \u0275prov=m({token:t,factory:t.\u0275fac})};export{j as a,D as b,F as c,B as d};
1
+ import{O as F}from"./chunk-TSIYPTYI.js";import{$a as i,Fc as k,Ib as c,Jb as r,Lb as l,Mb as P,Rb as m,Rd as E,Td as A,Yc as S,Yd as D,Zc as T,db as v,dc as w,ec as g,fc as C,ja as f,jd as z,ka as x,kb as u,lb as b,na as h,nb as p,qb as d,rc as M,uc as s,vb as a,xd as I,zb as y}from"./chunk-UXRO4UFY.js";var N=t=>[t],j=(t,e,n,o)=>({ID:t,Template:e,Price:n,Print:o});function $(t,e){if(t&1&&(l(0),c(1,"div",5)(2,"a",6)(3,"small"),g(4),r()()(),P()),t&2){let n=e.$implicit,o=e.index;i(),y(o>0?"border-start border-light":""),i(),a("routerLink",M(5,N,n.link))("queryParams",s(7,j,n.param.ID,n==null||n.param==null?null:n.param.Template,n.param.Price,n.param.Print)),i(2),C(n==null?null:n.label)}}function q(t,e){if(t&1&&(l(0),c(1,"div",2)(2,"div",3)(3,"small"),g(4,"Paper Size :"),r()(),d(5,$,5,12,"ng-container",4),r(),P()),t&2){let n=m();i(5),a("ngForOf",n.paperPrints)}}function J(t,e){if(t&1&&(c(0,"li")(1,"a",6)(2,"medium"),g(3),r()()()),t&2){let n=e.$implicit;i(),a("routerLink",M(3,N,n.link))("queryParams",s(5,j,n.param.ID,n==null||n.param==null?null:n.param.Template,n.param.Price,n.param.Print)),i(2),C(n==null?null:n.label)}}function V(t,e){if(t&1&&(c(0,"div",7)(1,"span"),g(2,"Paper Size :"),r(),c(3,"ul"),d(4,J,4,10,"li",4),r()()),t&2){let n=m();i(4),a("ngForOf",n.paperPrints)}}var R=class t{paperPrints;paperType;constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=u({type:t,selectors:[["POS-print-mode"]],inputs:{paperPrints:"paperPrints",paperType:"paperType"},standalone:!1,decls:3,vars:2,consts:[["A4",""],[4,"ngIf","ngIfElse"],[1,"row","g-0","invoice_mini"],[1,"col-auto"],[4,"ngFor","ngForOf"],[1,"col-auto","ps-3","pe-3"],[3,"routerLink","queryParams"],[1,"mode"]],template:function(n,o){if(n&1&&d(0,q,6,1,"ng-container",1)(1,V,5,1,"ng-template",null,0,k),n&2){let _=w(2);a("ngIf",o.paperType=="mini")("ngIfElse",_)}},dependencies:[S,T,E],styles:['.invoice_mini[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%]{width:264px;margin:auto;padding:0 4px;color:#000;font-family:Arial!important}.invoice_mini[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .invoice_mini[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-family:Arial!important}.invoice_mini[_ngcontent-%COMP%] .text-danger[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .text-danger[_ngcontent-%COMP%]{color:red!important}.invoice_mini[_ngcontent-%COMP%] .border-y[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .border-y[_ngcontent-%COMP%]{padding:5px 0;border-top:1px solid #888}.invoice_mini[_ngcontent-%COMP%] .cartAmount[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .cartAmount[_ngcontent-%COMP%]{border-top:1px solid #888;border-bottom:1px solid #888}.invoice_mini[_ngcontent-%COMP%] .rightAuto[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .rightAuto[_ngcontent-%COMP%]{margin:0 0 0 auto}.invoice_mini[_ngcontent-%COMP%] span.point[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] span.point[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 auto!important;padding:0!important}.invoice_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%]{font-size:11px!important}.invoice_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-size:.4375rem;padding:.4375rem}.invoice_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%] > p[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] .note[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{margin:0 auto!important;padding:0!important}.invoice_mini.lx300[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .sales_order_mini.lx300[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:220px}.box[_ngcontent-%COMP%]{position:relative}.ribbon[_ngcontent-%COMP%]{width:170px;height:140px;overflow:hidden;position:absolute}.ribbon[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;display:block;width:204px;padding:42px 31px;background-color:#3498db;box-shadow:0 5px 10px #0000001a;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.2);text-transform:uppercase;text-align:center;font-size:9px;line-height:17px}.ribbon-content[_ngcontent-%COMP%]{top:-10px;left:-45px}div.ribbon-content[_ngcontent-%COMP%]{right:47px;top:47px;transform:rotate(-45deg)}.invoice_mini.lx300[_ngcontent-%COMP%], .sales_order_mini.lx300[_ngcontent-%COMP%], .packingslip_container.lx300[_ngcontent-%COMP%]{margin:0 0 0 20px!important;width:520px!important;letter-spacing:3px!important}.invoice_mini.lx300[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .sales_order_mini.lx300[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .packingslip_container.lx300[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{letter-spacing:8px!important}@media print{print-mode[_ngcontent-%COMP%]{display:none;visibility:hidden;height:0px}.ribbon[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{background-color:none!important;color:#000;opacity:.7;border-style:dotted none}.ribbon[_ngcontent-%COMP%] .ribbon-content[_ngcontent-%COMP%]:after, .ribbon[_ngcontent-%COMP%] .ribbon-content[_ngcontent-%COMP%]:before{display:none}.sales_order_mini[_ngcontent-%COMP%] > .invoiceHeader[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .sales_order_mini[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{font-family:Arial,Helvetica,sans-serif!important}.toast[_ngcontent-%COMP%]{display:none!important}}body[_ngcontent-%COMP%]{padding:0;font-size:12px}a.linkMini[_ngcontent-%COMP%]{left:130px;position:absolute;top:.5px;text-decoration:none;color:#3b5998}div.print_container[_ngcontent-%COMP%]{margin:0 auto;width:900px;text-align:left;color:#000;position:relative}div.print_container[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-family:Arial!important;background-color:#fff}div.mode[_ngcontent-%COMP%]{color:gray;font-size:11px;text-align:right;height:20px;padding-top:2px}div.mode[_ngcontent-%COMP%] span[_ngcontent-%COMP%], div.mode[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], div.mode[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{float:left;display:block;margin:0;padding:0}div.mode[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:first-child{padding-right:5px;margin-right:5px;border-right:solid 1px gray}div.mode[_ngcontent-%COMP%] div.printer[_ngcontent-%COMP%]{float:left}div.mode[_ngcontent-%COMP%] div.template[_ngcontent-%COMP%]{float:right}div.mode[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#3b5998;text-decoration:none}div.mode[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}div.mode[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{color:gray}div.mode[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]:hover{text-decoration:none}div.mode[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:0 5px}div.header_left[_ngcontent-%COMP%]{float:left;padding:5px 0 0 5px}div.header_left[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:5px 0 0;padding:0;font-size:18px}div.header_right[_ngcontent-%COMP%]{float:right;padding:0 5px 0 0;max-width:425px}div.header_right[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0;padding:0;text-align:right}div.header_right[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:16px;font-weight:700;margin:0 5px 0 0;text-transform:uppercase}div.header_right[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:18px;font-weight:400}div.header_right[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{float:right;border-collapse:collapse}div.header_right[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], div.header_right[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 1px #9E9E9E;padding:4px}div.header_right[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#f6f6f6}div.header_right[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-bottom:6px}div.header[_ngcontent-%COMP%] img.float[_ngcontent-%COMP%]{margin:5px 0 0 5px;float:left}div.header[_ngcontent-%COMP%] div.company[_ngcontent-%COMP%]{width:100%;overflow:auto;margin:0 0 8px}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%]{float:left}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:18px;font-weight:700;margin:0;padding:0}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:11px;text-align:left;font-weight:400}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%] div.contact_info[_ngcontent-%COMP%]{margin-top:3px}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%] div.contact_info[_ngcontent-%COMP%] div.address[_ngcontent-%COMP%]{float:left;min-width:125px}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%] div.contact_info[_ngcontent-%COMP%] div.number[_ngcontent-%COMP%]{margin-right:5px;min-width:160px}div.header[_ngcontent-%COMP%] div.contact[_ngcontent-%COMP%]{width:max-content;overflow:auto;border:solid 1px #9E9E9E;padding:5px}div.header[_ngcontent-%COMP%] div.contact[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:12px;margin:0 5px 0 0;padding:0;font-weight:700;float:left}div.cartItems[_ngcontent-%COMP%]{padding:10px 3px 2px 5px}div.copy[_ngcontent-%COMP%]{background-image:url(/Images/Print/copy_bg.png);background-repeat:no-repeat;background-position:50% 70px}div.topNote[_ngcontent-%COMP%]{clear:both;text-align:right}div.invoiceNote[_ngcontent-%COMP%]{padding:10px 0 0 7px}div.note[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-weight:700;font-size:12px;margin:0 0 3px;padding:0}div.note[_ngcontent-%COMP%] div.single[_ngcontent-%COMP%]{width:895px!important}div.note[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%]{float:left;margin-left:5px;width:440px}div.note[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:5px 0 0;padding:0 0 0 20px}div.note[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%] ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:0 0 2px}div.note[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:2px 0 5px;padding:0 0 0 20px}div.note[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:0 0 2px}div.note[_ngcontent-%COMP%] div.right[_ngcontent-%COMP%]{float:right;width:440px;border-left:solid 1px #CACACA;padding-left:8px;margin-right:5px}div.note[_ngcontent-%COMP%] div.right[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:0;padding:0;list-style:none}div.note[_ngcontent-%COMP%] div.right[_ngcontent-%COMP%] h3.closing[_ngcontent-%COMP%]{margin-top:10px;text-align:right}div.note-info[_ngcontent-%COMP%]{margin:auto;width:23%}table.info[_ngcontent-%COMP%]{border-collapse:collapse;margin-top:5px;margin-left:5px}table.info[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table.info[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:5px 7px;border:solid 1px #d8d8d8}table.info[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f6f6f6}div.fullContainer[_ngcontent-%COMP%] div.print_container[_ngcontent-%COMP%]{min-height:970px;position:relative}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:"";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.clearfix[_ngcontent-%COMP%]{zoom:1}div.reportMargin[_ngcontent-%COMP%]{margin:20px 0 0}@media print{div.mode[_ngcontent-%COMP%], .linkMini[_ngcontent-%COMP%]{display:none;visibility:hidden;height:0px}thead[_ngcontent-%COMP%]{display:table-header-group}}small.timestamp[_ngcontent-%COMP%], small.creator[_ngcontent-%COMP%], small.printed[_ngcontent-%COMP%]{font-size:12px;text-align:center;display:block;font-style:italic;padding:2px 0}small.creator[_ngcontent-%COMP%]{padding:2px 0 20px;font-style:normal}span.titleJB[_ngcontent-%COMP%]{font-weight:700;padding:10px 0 7px 8px;display:block}.topHolder[_ngcontent-%COMP%]{margin-top:15px!important}h1.jobOrderHeader[_ngcontent-%COMP%]{text-align:center}.shippingAddress[_ngcontent-%COMP%]{text-align:right;min-width:240px;clear:both}.shippingAddress[_ngcontent-%COMP%] div.box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:first-child{text-align:left;font-weight:700}.packingSlip[_ngcontent-%COMP%]{min-width:150px}.customer_info[_ngcontent-%COMP%]{min-width:310px}']})},U=class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=b({type:t});static \u0275inj=x({imports:[z,A]})};var B=class t{constructor(e){this.sanitizer=e}transform(e){if(this.isResourceUrl(e))return this.sanitizer.bypassSecurityTrustResourceUrl(e);{let o=`${window.location.origin}/${e}`;return this.sanitizer.bypassSecurityTrustResourceUrl(o)}}isResourceUrl(e){return/^(https?:\/\/|\/)/i.test(e)}static \u0275fac=function(n){return new(n||t)(v(I,16))};static \u0275pipe=p({name:"StylesheetSafeUrl",type:t,pure:!0})};var L=class t{httpService=h(D);updateLastPrintDateTime(e){return this.httpService.post(`${F.UpdateLastPrintDateTime}`,{InvoiceID:e})}static \u0275fac=function(n){return new(n||t)};static \u0275prov=f({token:t,factory:t.\u0275fac})};var H=class t{transform(e,n=1){if(e==null||n<=0)return e;let o=e.toString(),_=o.slice(-n);return"*".repeat(Math.max(0,o.length-n))+_}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=p({name:"lastDigit",type:t,pure:!0})};export{B as a,R as b,U as c,L as d,H as e};
@@ -1 +1 @@
1
- import{a as ae}from"./chunk-XKUQPHUA.js";import"./chunk-Q4CKRRGM.js";import"./chunk-PIYM2FOP.js";import"./chunk-2OWHEMAL.js";import"./chunk-XZELBTQR.js";import{a as oe,b as le}from"./chunk-5QXTT2Q4.js";import"./chunk-IAZFUBFX.js";import"./chunk-MPSML3FA.js";import{d as ne,e as re}from"./chunk-GIDGCFLX.js";import"./chunk-XBRBYCWJ.js";import"./chunk-3RK6DDJD.js";import"./chunk-FP4HFB5J.js";import"./chunk-H3OZSV6V.js";import"./chunk-YEDKRNXU.js";import"./chunk-VZEPVRCY.js";import"./chunk-7QWJJPNG.js";import{e as te}from"./chunk-6647Y35T.js";import"./chunk-VHAM2DWK.js";import{c as ie}from"./chunk-2PX7ZCAH.js";import{a as X}from"./chunk-XQ6JBIMX.js";import"./chunk-EVWNBQBC.js";import"./chunk-6JAL37Y4.js";import"./chunk-4QQTEPQT.js";import{a as Q,e as $,f as ee}from"./chunk-3PTKHKTZ.js";import"./chunk-IQQGAD2W.js";import"./chunk-5JJSLRVS.js";import"./chunk-CWITQVZH.js";import"./chunk-QHRP323Q.js";import"./chunk-WDQ4UKKY.js";import"./chunk-MFCXEITE.js";import"./chunk-LMJVRREP.js";import"./chunk-3LBZDIW2.js";import"./chunk-KTCV3KOE.js";import"./chunk-KZDE63UL.js";import"./chunk-ARKU4MG5.js";import{b as Z}from"./chunk-S22XRS4J.js";import"./chunk-3GOO5E5D.js";import"./chunk-XMYLHF4C.js";import"./chunk-H7F34T25.js";import"./chunk-JOXTERIM.js";import{O as x}from"./chunk-TSIYPTYI.js";import{d as Y}from"./chunk-XYB3YDKL.js";import"./chunk-7VKFVS7K.js";import"./chunk-ZVDY66SR.js";import"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-VFTGIP5A.js";import"./chunk-LE3BKIDY.js";import{a as K}from"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import{F as z,h as U,o as q}from"./chunk-RVXZOIFQ.js";import"./chunk-2FWXO7SV.js";import"./chunk-6ABP4TP7.js";import"./chunk-ZZGSAFGO.js";import"./chunk-QVPSWY5E.js";import{$a as s,Ac as I,Db as L,Eb as V,Fc as N,Gb as W,Hb as O,Ib as r,Jb as a,Kb as S,Lb as w,Ma as A,Mb as T,Ob as y,Qb as v,Rb as c,Vd as G,Y as k,Yd as J,Zc as R,cd as H,db as C,ec as u,fa as P,jc as g,jd as j,kb as E,kc as _,lc as f,na as B,ob as M,qb as h,va as p,vb as l,wa as m,zc as b}from"./chunk-UXRO4UFY.js";import"./chunk-7DCB7DB2.js";function me(o,d){if(o&1){let t=y();r(0,"button",7),v("click",function(){p(t);let e=c();return m(e.onPrint())}),S(1,"i",8),r(2,"span"),u(3,"Print"),a()()}}function se(o,d){if(o&1){let t=y();r(0,"div",9)(1,"h6"),u(2,"Outlet"),a(),r(3,"outlet-selector",10),f("ngModelChange",function(e){p(t);let i=c();return _(i.pageData.Filter.EntityID,e)||(i.pageData.Filter.EntityID=e),m(e)}),a(),r(4,"h6"),u(5,"Sales Order Tag"),a(),r(6,"ng-select",11),f("ngModelChange",function(e){p(t);let i=c();return _(i.pageData.Filter.SalesOrderTagID,e)||(i.pageData.Filter.SalesOrderTagID=e),m(e)}),a(),r(7,"h6"),u(8,"From"),a(),r(9,"div",12)(10,"div",13)(11,"datepicker",14),f("dateChange",function(e){p(t);let i=c();return _(i.pageData.Filter.From,e)||(i.pageData.Filter.From=e),m(e)}),a()(),r(12,"div",13)(13,"app-timepicker",15),f("timeChange",function(e){p(t);let i=c();return _(i.pageData.Filter.StartTime,e)||(i.pageData.Filter.StartTime=e),m(e)}),a()()(),r(14,"h6"),u(15,"To"),a(),r(16,"div",12)(17,"div",13)(18,"datepicker",16),f("dateChange",function(e){p(t);let i=c();return _(i.pageData.Filter.To,e)||(i.pageData.Filter.To=e),m(e)}),a()(),r(19,"div",13)(20,"app-timepicker",15),f("timeChange",function(e){p(t);let i=c();return _(i.pageData.Filter.EndTime,e)||(i.pageData.Filter.EndTime=e),m(e)}),a()()()()}if(o&2){let t=c();s(3),l("accessType",2),g("ngModel",t.pageData.Filter.EntityID),s(3),l("items",t.pageData==null||t.pageData.Options==null?null:t.pageData.Options.SalesOrderTags),g("ngModel",t.pageData.Filter.SalesOrderTagID),s(5),l("isFloatingLabel",!1),g("date",t.pageData.Filter.From),l("hidelClearBtn",!0),s(2),g("time",t.pageData.Filter.StartTime),l("fullWidth",!0),s(5),l("isFloatingLabel",!1)("hidelClearBtn",!0),g("date",t.pageData.Filter.To),s(2),g("time",t.pageData.Filter.EndTime),l("fullWidth",!0)}}function ce(o,d){o&1&&(w(0),r(1,"div",20),u(2,"\xA0"),a(),T())}function de(o,d){if(o&1&&(S(0,"pos-receipt-a4",17),r(1,"div",18),S(2,"div",19),a(),h(3,ce,3,0,"ng-container",6)),o&2){let t=d.$implicit,n=d.$index,e=c().ngIf,i=c();l("data",t)("printTemplate",i.printTemplates==null?null:i.printTemplates.get(t.PrintTemplateID))("config",e.AppConfig)("workOrderMode",!1)("fullMode",!0)("stylesheet",e.StylesSheet),s(3),l("ngIf",n!==(e.Data==null?null:e.Data.length)-1)}}function ue(o,d){if(o&1&&(w(0),W(1,de,4,7,null,null,V),T()),o&2){let t=d.ngIf;s(),O(t.Data)}}var pe=class o extends X{constructor(t,n,e){super(t,n,"Tool/GetBulkPrintLoader","Tool/GetBulkPrintLoader",e,null,!0);this.httpService=n;this.initPrintListener()}dialogFilter=B(Q);receipts$;printTemplates;invoiceIds=A([]);preInitList(){this.pageData.Filter.From=new Date,this.pageData.Filter.To=new Date,this.pageData.Filter.StartTime="00:00",this.pageData.Filter.EndTime="23:59"}onFilter(){this.receipts$=this.httpService.post(x.GetBulkPrintA4,this.pageData.Filter).pipe(P(t=>{t?.Data?.length==0?this.toastrService.info("There are no transaction",K.Info):this.generatePrintTemplate(t.PrintTemplates),this.invoiceIds.set(t.Data.map(n=>n?.Invoice?.ID))}),k(1))}generatePrintTemplate(t=[]){this.printTemplates=new Map(t.map(n=>[n.ID,n]))}onNewPrint(){this.dialogFilter.openDialog()}onPrint(){window.setTimeout(function(){window.print()},500)}initPrintListener(){window.addEventListener("afterprint",this.handleAfterPrint)}handleAfterPrint=()=>{this.invoiceIds()?.length>0&&this.httpService.post(x.UpdateLastPrintByListID,{ListID:this.invoiceIds()}).subscribe()};ngOnDestroy(){window.removeEventListener("afterprint",this.handleAfterPrint)}static \u0275fac=function(n){return new(n||o)(C(Z),C(J),C(G))};static \u0275cmp=E({type:o,selectors:[["bulk-invoice-A4"]],features:[M],decls:13,vars:10,consts:[["pageFilterTemplate",""],[3,"textChange","onSubmit","pageData","hideSearchBox","text","hideSearchDropdown"],[1,"btn","btn-outline-secondary","me-3"],[1,"btn","btn-success",3,"click"],["filters",""],[1,"container-fluid","mt-5"],[4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],[1,"fa","fa-print","me-3"],[1,"dialog-filter"],["placeholder","Choose an Outlet",3,"ngModelChange","accessType","ngModel"],["bindLabel","Name","bindValue","ID","placeholder","Choose Sales Order Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center","gap-5"],[1,"w-100"],["placeholder","From","appearance","outline","name","From",1,"me-4",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[3,"timeChange","time","fullWidth"],["placeholder","To","appearance","outline","name","To",1,"me-4",3,"dateChange","isFloatingLabel","hidelClearBtn","date"],[3,"data","printTemplate","config","workOrderMode","fullMode","stylesheet"],[1,"d-print-none","mt-8"],[2,"border-top-style","dotted","margin-bottom","5px"],[1,"page-break"]],template:function(n,e){if(n&1){let i=y();r(0,"mainpanel-cmp",1),f("textChange",function(D){return p(i),_(e.pageData.Filter.Number,D)||(e.pageData.Filter.Number=D),m(D)}),v("onSubmit",function(){return p(i),m(e.onFilter())}),r(1,"actions"),h(2,me,4,0,"button",2),b(3,"async"),r(4,"button",3),v("click",function(){return p(i),m(e.onNewPrint())}),u(5,"New"),a()(),r(6,"div",4),h(7,se,21,14,"ng-template",null,0,N),a(),r(9,"content")(10,"div",5),h(11,ue,3,0,"ng-container",6),b(12,"async"),a()()()}if(n&2){let i;l("pageData",e.menuData)("hideSearchBox",!0),g("text",e.pageData.Filter.Number),l("hideSearchDropdown",!0),s(2),L(((i=I(3,6,e.receipts$))==null||i.Data==null?null:i.Data.length)>0?2:-1),s(9),l("ngIf",I(12,8,e.printTemplates&&e.receipts$))}},dependencies:[j,R,H,le,oe,ee,$,ie,Y,re,ne,te,z,U,q,ae],styles:["input.p-inputtext{height:46.63px;border-color:#0000001f!important} input.p-inputtext :hover{border-color:#0000001f!important}@media print{.page-break[_ngcontent-%COMP%]{page-break-after:always}}"]})};export{pe as BulkInvoiceA4Component};
1
+ import{a as ae}from"./chunk-XKUQPHUA.js";import"./chunk-Q4CKRRGM.js";import"./chunk-PIYM2FOP.js";import"./chunk-2OWHEMAL.js";import"./chunk-XZELBTQR.js";import{a as oe,b as le}from"./chunk-GCBG44YQ.js";import"./chunk-43CYJJ7R.js";import"./chunk-MPSML3FA.js";import{d as ne,e as re}from"./chunk-GIDGCFLX.js";import"./chunk-XBRBYCWJ.js";import"./chunk-3RK6DDJD.js";import"./chunk-FP4HFB5J.js";import"./chunk-H3OZSV6V.js";import"./chunk-YEDKRNXU.js";import"./chunk-VZEPVRCY.js";import"./chunk-7QWJJPNG.js";import{e as te}from"./chunk-6647Y35T.js";import"./chunk-VHAM2DWK.js";import{c as ie}from"./chunk-JXNDVG64.js";import{a as X}from"./chunk-IJVIVNVH.js";import"./chunk-KAJ5NYU6.js";import"./chunk-6JAL37Y4.js";import"./chunk-4QQTEPQT.js";import{a as Q,e as $,f as ee}from"./chunk-BA64MIHJ.js";import"./chunk-2RZHUSQU.js";import"./chunk-5JJSLRVS.js";import"./chunk-CWITQVZH.js";import"./chunk-QHRP323Q.js";import"./chunk-WDQ4UKKY.js";import"./chunk-MFCXEITE.js";import"./chunk-LMJVRREP.js";import"./chunk-3LBZDIW2.js";import"./chunk-KTCV3KOE.js";import"./chunk-KZDE63UL.js";import"./chunk-ZJHWFDGD.js";import{b as Z}from"./chunk-SPTLCHEU.js";import"./chunk-3GOO5E5D.js";import"./chunk-XMYLHF4C.js";import"./chunk-H7F34T25.js";import"./chunk-JOXTERIM.js";import{O as x}from"./chunk-TSIYPTYI.js";import{d as Y}from"./chunk-XYB3YDKL.js";import"./chunk-7VKFVS7K.js";import"./chunk-ZVDY66SR.js";import"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-VFTGIP5A.js";import"./chunk-LE3BKIDY.js";import{a as K}from"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import{F as z,h as U,o as q}from"./chunk-RVXZOIFQ.js";import"./chunk-PW7JCR65.js";import"./chunk-XMABJJGK.js";import"./chunk-ZZGSAFGO.js";import"./chunk-QPS677LS.js";import{$a as s,Ac as I,Db as L,Eb as V,Fc as N,Gb as W,Hb as O,Ib as r,Jb as a,Kb as S,Lb as w,Ma as A,Mb as T,Ob as y,Qb as v,Rb as c,Vd as G,Y as k,Yd as J,Zc as R,cd as H,db as C,ec as u,fa as P,jc as g,jd as j,kb as E,kc as _,lc as f,na as B,ob as M,qb as h,va as p,vb as l,wa as m,zc as b}from"./chunk-UXRO4UFY.js";import"./chunk-7DCB7DB2.js";function me(o,d){if(o&1){let t=y();r(0,"button",7),v("click",function(){p(t);let e=c();return m(e.onPrint())}),S(1,"i",8),r(2,"span"),u(3,"Print"),a()()}}function se(o,d){if(o&1){let t=y();r(0,"div",9)(1,"h6"),u(2,"Outlet"),a(),r(3,"outlet-selector",10),f("ngModelChange",function(e){p(t);let i=c();return _(i.pageData.Filter.EntityID,e)||(i.pageData.Filter.EntityID=e),m(e)}),a(),r(4,"h6"),u(5,"Sales Order Tag"),a(),r(6,"ng-select",11),f("ngModelChange",function(e){p(t);let i=c();return _(i.pageData.Filter.SalesOrderTagID,e)||(i.pageData.Filter.SalesOrderTagID=e),m(e)}),a(),r(7,"h6"),u(8,"From"),a(),r(9,"div",12)(10,"div",13)(11,"datepicker",14),f("dateChange",function(e){p(t);let i=c();return _(i.pageData.Filter.From,e)||(i.pageData.Filter.From=e),m(e)}),a()(),r(12,"div",13)(13,"app-timepicker",15),f("timeChange",function(e){p(t);let i=c();return _(i.pageData.Filter.StartTime,e)||(i.pageData.Filter.StartTime=e),m(e)}),a()()(),r(14,"h6"),u(15,"To"),a(),r(16,"div",12)(17,"div",13)(18,"datepicker",16),f("dateChange",function(e){p(t);let i=c();return _(i.pageData.Filter.To,e)||(i.pageData.Filter.To=e),m(e)}),a()(),r(19,"div",13)(20,"app-timepicker",15),f("timeChange",function(e){p(t);let i=c();return _(i.pageData.Filter.EndTime,e)||(i.pageData.Filter.EndTime=e),m(e)}),a()()()()}if(o&2){let t=c();s(3),l("accessType",2),g("ngModel",t.pageData.Filter.EntityID),s(3),l("items",t.pageData==null||t.pageData.Options==null?null:t.pageData.Options.SalesOrderTags),g("ngModel",t.pageData.Filter.SalesOrderTagID),s(5),l("isFloatingLabel",!1),g("date",t.pageData.Filter.From),l("hidelClearBtn",!0),s(2),g("time",t.pageData.Filter.StartTime),l("fullWidth",!0),s(5),l("isFloatingLabel",!1)("hidelClearBtn",!0),g("date",t.pageData.Filter.To),s(2),g("time",t.pageData.Filter.EndTime),l("fullWidth",!0)}}function ce(o,d){o&1&&(w(0),r(1,"div",20),u(2,"\xA0"),a(),T())}function de(o,d){if(o&1&&(S(0,"pos-receipt-a4",17),r(1,"div",18),S(2,"div",19),a(),h(3,ce,3,0,"ng-container",6)),o&2){let t=d.$implicit,n=d.$index,e=c().ngIf,i=c();l("data",t)("printTemplate",i.printTemplates==null?null:i.printTemplates.get(t.PrintTemplateID))("config",e.AppConfig)("workOrderMode",!1)("fullMode",!0)("stylesheet",e.StylesSheet),s(3),l("ngIf",n!==(e.Data==null?null:e.Data.length)-1)}}function ue(o,d){if(o&1&&(w(0),W(1,de,4,7,null,null,V),T()),o&2){let t=d.ngIf;s(),O(t.Data)}}var pe=class o extends X{constructor(t,n,e){super(t,n,"Tool/GetBulkPrintLoader","Tool/GetBulkPrintLoader",e,null,!0);this.httpService=n;this.initPrintListener()}dialogFilter=B(Q);receipts$;printTemplates;invoiceIds=A([]);preInitList(){this.pageData.Filter.From=new Date,this.pageData.Filter.To=new Date,this.pageData.Filter.StartTime="00:00",this.pageData.Filter.EndTime="23:59"}onFilter(){this.receipts$=this.httpService.post(x.GetBulkPrintA4,this.pageData.Filter).pipe(P(t=>{t?.Data?.length==0?this.toastrService.info("There are no transaction",K.Info):this.generatePrintTemplate(t.PrintTemplates),this.invoiceIds.set(t.Data.map(n=>n?.Invoice?.ID))}),k(1))}generatePrintTemplate(t=[]){this.printTemplates=new Map(t.map(n=>[n.ID,n]))}onNewPrint(){this.dialogFilter.openDialog()}onPrint(){window.setTimeout(function(){window.print()},500)}initPrintListener(){window.addEventListener("afterprint",this.handleAfterPrint)}handleAfterPrint=()=>{this.invoiceIds()?.length>0&&this.httpService.post(x.UpdateLastPrintByListID,{ListID:this.invoiceIds()}).subscribe()};ngOnDestroy(){window.removeEventListener("afterprint",this.handleAfterPrint)}static \u0275fac=function(n){return new(n||o)(C(Z),C(J),C(G))};static \u0275cmp=E({type:o,selectors:[["bulk-invoice-A4"]],features:[M],decls:13,vars:10,consts:[["pageFilterTemplate",""],[3,"textChange","onSubmit","pageData","hideSearchBox","text","hideSearchDropdown"],[1,"btn","btn-outline-secondary","me-3"],[1,"btn","btn-success",3,"click"],["filters",""],[1,"container-fluid","mt-5"],[4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],[1,"fa","fa-print","me-3"],[1,"dialog-filter"],["placeholder","Choose an Outlet",3,"ngModelChange","accessType","ngModel"],["bindLabel","Name","bindValue","ID","placeholder","Choose Sales Order Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center","gap-5"],[1,"w-100"],["placeholder","From","appearance","outline","name","From",1,"me-4",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[3,"timeChange","time","fullWidth"],["placeholder","To","appearance","outline","name","To",1,"me-4",3,"dateChange","isFloatingLabel","hidelClearBtn","date"],[3,"data","printTemplate","config","workOrderMode","fullMode","stylesheet"],[1,"d-print-none","mt-8"],[2,"border-top-style","dotted","margin-bottom","5px"],[1,"page-break"]],template:function(n,e){if(n&1){let i=y();r(0,"mainpanel-cmp",1),f("textChange",function(D){return p(i),_(e.pageData.Filter.Number,D)||(e.pageData.Filter.Number=D),m(D)}),v("onSubmit",function(){return p(i),m(e.onFilter())}),r(1,"actions"),h(2,me,4,0,"button",2),b(3,"async"),r(4,"button",3),v("click",function(){return p(i),m(e.onNewPrint())}),u(5,"New"),a()(),r(6,"div",4),h(7,se,21,14,"ng-template",null,0,N),a(),r(9,"content")(10,"div",5),h(11,ue,3,0,"ng-container",6),b(12,"async"),a()()()}if(n&2){let i;l("pageData",e.menuData)("hideSearchBox",!0),g("text",e.pageData.Filter.Number),l("hideSearchDropdown",!0),s(2),L(((i=I(3,6,e.receipts$))==null||i.Data==null?null:i.Data.length)>0?2:-1),s(9),l("ngIf",I(12,8,e.printTemplates&&e.receipts$))}},dependencies:[j,R,H,le,oe,ee,$,ie,Y,re,ne,te,z,U,q,ae],styles:["input.p-inputtext{height:46.63px;border-color:#0000001f!important} input.p-inputtext :hover{border-color:#0000001f!important}@media print{.page-break[_ngcontent-%COMP%]{page-break-after:always}}"]})};export{pe as BulkInvoiceA4Component};
@@ -1 +1 @@
1
- import{a as _t,b as ut}from"./chunk-BX366TSG.js";import{a as pt}from"./chunk-FKDZ5OWB.js";import{a as mt}from"./chunk-DEVO5OTP.js";import{a as st}from"./chunk-BXQFYW4R.js";import"./chunk-4UYZJCFI.js";import"./chunk-BYXBJQAS.js";import{d as ct,e as dt}from"./chunk-GIDGCFLX.js";import"./chunk-XBRBYCWJ.js";import"./chunk-3RK6DDJD.js";import"./chunk-FP4HFB5J.js";import"./chunk-H3OZSV6V.js";import"./chunk-YEDKRNXU.js";import"./chunk-VZEPVRCY.js";import"./chunk-7QWJJPNG.js";import{d as at,e as rt}from"./chunk-6647Y35T.js";import"./chunk-VHAM2DWK.js";import{a as Z}from"./chunk-JPXXXD26.js";import{a as U}from"./chunk-ODOWAGLZ.js";import{f as lt}from"./chunk-IOJ4YVHD.js";import{b as Y}from"./chunk-QHBWVJIQ.js";import"./chunk-XQ6JBIMX.js";import"./chunk-EVWNBQBC.js";import"./chunk-6JAL37Y4.js";import"./chunk-4QQTEPQT.js";import{a as tt}from"./chunk-XZR3IMWZ.js";import{e as nt,f as ot}from"./chunk-3PTKHKTZ.js";import"./chunk-B6LPY2IZ.js";import"./chunk-CWITQVZH.js";import"./chunk-QHRP323Q.js";import"./chunk-WDQ4UKKY.js";import"./chunk-MFCXEITE.js";import"./chunk-MUJ6277G.js";import"./chunk-LMJVRREP.js";import"./chunk-3LBZDIW2.js";import"./chunk-KTCV3KOE.js";import"./chunk-KZDE63UL.js";import"./chunk-ARKU4MG5.js";import{b as $}from"./chunk-S22XRS4J.js";import"./chunk-3GOO5E5D.js";import"./chunk-XMYLHF4C.js";import"./chunk-H7F34T25.js";import{b as Q,c as J}from"./chunk-JOXTERIM.js";import{N as it,g as et}from"./chunk-TSIYPTYI.js";import"./chunk-XYB3YDKL.js";import"./chunk-7VKFVS7K.js";import"./chunk-ZVDY66SR.js";import{g as X}from"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-VFTGIP5A.js";import"./chunk-LE3BKIDY.js";import"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import{F as H}from"./chunk-RVXZOIFQ.js";import"./chunk-2FWXO7SV.js";import"./chunk-6ABP4TP7.js";import{d as K}from"./chunk-ZZGSAFGO.js";import"./chunk-QVPSWY5E.js";import{$a as i,Ac as u,Bc as C,Db as p,Eb as k,Fc as j,Gb as M,Hb as N,Ib as o,Jb as n,Kb as E,Ob as P,Qb as h,Rb as c,Rd as R,Yd as z,Zc as q,db as T,ec as r,fc as w,gc as s,gd as W,jc as g,jd as A,kb as L,kc as I,lc as S,ob as O,qb as y,qc as D,rc as b,ub as V,va as x,vb as _,wa as v,wd as G,zc as d}from"./chunk-UXRO4UFY.js";import"./chunk-7DCB7DB2.js";var xt=()=>["/menu/Outlets/Master/Outlets/Info"],ft=t=>({ID:t}),vt=()=>["/menu/Products/Catalog/Products/Info"];function yt(t,l){if(t&1){let e=P();o(0,"button",11),h("click",function(){x(e);let a=c();return v(a.openExportModal())}),E(1,"i",12),r(2," Export "),n()}}function Tt(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){x(e);let f=c();return I(f.pageData.Filter.OutletGroupID,a)||(f.pageData.Filter.OutletGroupID=a),v(a)}),n(),o(4,"h6"),r(5,"Category"),n(),o(6,"POS-product-category-select",15),S("selectedCategoryIDChange",function(a){x(e);let f=c();return I(f.pageData.Filter.CategoryID,a)||(f.pageData.Filter.CategoryID=a),v(a)}),n(),o(7,"autocompleteV3",16),S("modelNameChange",function(a){x(e);let f=c();return I(f.pageData.Filter.ListProductID,a)||(f.pageData.Filter.ListProductID=a),v(a)}),n(),o(8,"h6"),r(9,"From - To"),n(),o(10,"div")(11,"datepicker",17),S("dateChange",function(a){x(e);let f=c();return I(f.pageData.Filter.From,a)||(f.pageData.Filter.From=a),v(a)}),n()(),o(12,"div",18)(13,"datepicker",19),S("dateChange",function(a){x(e);let f=c();return I(f.pageData.Filter.To,a)||(f.pageData.Filter.To=a),v(a)}),n()(),o(14,"h6"),r(15,"Inventory Type"),n(),o(16,"radio-options",20),S("modelChange",function(a){x(e);let f=c();return I(f.pageData.Filter.InventoryType,a)||(f.pageData.Filter.InventoryType=a),v(a)}),n()()}if(t&2){let e=c();i(3),_("showClear",!0),g("selectedOutletGroupID",e.pageData.Filter.OutletGroupID),i(3),g("selectedCategoryID",e.pageData.Filter.CategoryID),_("showClear",!0),i(),g("modelName",e.pageData.Filter.ListProductID),_("placeholder","Search Product")("isShowEmptyMessage",!0)("emptyMessage","No Product found")("tooltipMessage","Search by product name")("label","Product to Analyze")("listDataEndpoint","/api/ac/GetProductSuggestionByCodeNName")("valueField","Key"),i(4),_("isFloatingLabel",!1),g("date",e.pageData.Filter.From),_("hidelClearBtn",!0),i(2),_("isFloatingLabel",!1),g("date",e.pageData.Filter.To),_("hidelClearBtn",!0),i(3),g("model",e.pageData.Filter.InventoryType),_("options",e.pageData.Options.InventoryTypes)}}function gt(t,l){t&1&&(o(0,"th",8),r(1,"Code"),n())}function It(t,l){t&1&&(o(0,"th",9)(1,"span",21),r(2," Start "),n()())}function St(t,l){t&1&&(o(0,"th",9)(1,"span",22),r(2," Bought "),n()())}function Pt(t,l){t&1&&(o(0,"th",9)(1,"span",23),r(2," Sold "),n()())}function ht(t,l){t&1&&(o(0,"th",9)(1,"span",24),r(2," T.In "),n()())}function Ft(t,l){t&1&&(o(0,"th",9)(1,"span",25),r(2," T.Out "),n()())}function Et(t,l){t&1&&(o(0,"th",9)(1,"span",26),r(2," Adj "),n()())}function wt(t,l){t&1&&(o(0,"th",9)(1,"span",27),r(2," End "),n()())}function Dt(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 Bt(t,l){if(t&1&&(o(0,"td",31),r(1),n()),t&2){let e=c().$implicit;i(),s(" ",e.ProductCode," ")}}function Lt(t,l){if(t&1&&(o(0,"td",32),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;_("colsFontColor",e.Start),i(),s(" ",u(2,2,e.Start)," ")}}function Ot(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),s(" ",u(2,1,e.Bought)," ")}}function Vt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),s(" ",u(2,1,e.Sold)," ")}}function kt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),s(" ",u(2,1,e.TransferredIn)," ")}}function Mt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),s(" ",u(2,1,e.TransferredOut)," ")}}function Nt(t,l){if(t&1&&(o(0,"td",32),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;_("colsFontColor",e.Adjustment),i(),s(" ",e.Adjustment<0?e.Adjustment*-1:u(2,2,e.Adjustment)," ")}}function jt(t,l){if(t&1&&(o(0,"td",32),r(1),n()),t&2){let e=c().$implicit;_("colsFontColor",e.End),i(),s(" ",e.End," ")}}function qt(t,l){if(t&1&&(o(0,"td",32),r(1),n()),t&2){let e=c().$implicit;_("colsFontColor",e.Now),i(),s(" ",e.Now," ")}}function Wt(t,l){if(t&1&&(o(0,"td",31),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),s(" ",u(2,1,e.SellTransferInRate)," ")}}function At(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()(),y(7,Bt,2,1,"td",31)(8,Lt,3,4,"td",32)(9,Ot,3,3,"td",33)(10,Vt,3,3,"td",34)(11,kt,3,3,"td",33)(12,Mt,3,3,"td",34)(13,Nt,3,4,"td",32)(14,jt,2,2,"td",32)(15,qt,2,2,"td",32)(16,Wt,3,3,"td",31),n()),t&2){let e=l.$implicit,m=c(2);i(2),_("routerLink",D(16,xt))("queryParams",b(17,ft,e.OutletID)),i(),s(" ",e.OutletName," "),i(2),_("routerLink",D(19,vt))("queryParams",b(20,ft,e.ProductID)),i(),w(e.ProductName),i(),p(m.column.code.selected?7:-1),i(),p(m.column.start.selected?8:-1),i(),p(m.column.bought.selected?9:-1),i(),p(m.column.sold.selected?10:-1),i(),p(m.column.transferredIn.selected?11:-1),i(),p(m.column.transferredOut.selected?12:-1),i(),p(m.column.adjust.selected?13:-1),i(),p(m.column.end.selected?14:-1),i(),p(m.column.now.selected?15:-1),i(),p(m.column.percent.selected?16:-1)}}function Gt(t,l){if(t&1&&M(0,At,17,22,"tr",null,k),t&2){let e=c();N(e.infiniteList)}}function Rt(t,l){t&1&&(o(0,"tr")(1,"td",35),E(2,"app-empty-state"),n()())}function Ht(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);_("colsFontColor",u(2,5,C(1,2,e.infiniteList,"Start"))),i(3),s(" ",u(5,10,C(4,7,e.infiniteList,"Start"))," ")}}function zt(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(),s(" ",u(3,4,C(2,1,e.infiniteList,"Bought"))," ")}}function Kt(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(),s(" ",u(3,4,C(2,1,e.infiniteList,"Sold"))," ")}}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(),s(" ",u(3,4,C(2,1,e.infiniteList,"TransferredIn"))," ")}}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(),s(" ",u(3,4,C(2,1,e.infiniteList,"TransferredOut"))," ")}}function Ut(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);_("colsFontColor",u(2,5,C(1,2,e.infiniteList,"Adjustment"))),i(3),s(" ",u(5,10,C(4,7,e.infiniteList,"Adjustment"))," ")}}function Xt(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);_("colsFontColor",u(2,5,C(1,2,e.infiniteList,"End"))),i(3),s(" ",u(5,10,C(4,7,e.infiniteList,"End"))," ")}}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);_("colsFontColor",u(2,5,C(1,2,e.infiniteList,"Now"))),i(3),s(" ",u(5,10,C(4,7,e.infiniteList,"Now"))," ")}}function Zt(t,l){if(t&1&&(o(0,"tfoot")(1,"tr",36)(2,"th",37),r(3," Total: "),n(),y(4,Ht,6,12,"td",32)(5,zt,4,6,"td",33)(6,Kt,4,6,"td",34)(7,Qt,4,6,"td",33)(8,Jt,4,6,"td",34)(9,Ut,6,12,"td",38)(10,Xt,6,12,"td",32)(11,Yt,6,12,"td",32),n()()),t&2){let e=c();i(2),V("colspan",e.column.code.selected?3:2),i(2),p(e.column.start.selected?4:-1),i(),p(e.column.bought.selected?5:-1),i(),p(e.column.sold.selected?6:-1),i(),p(e.column.transferredIn.selected?7:-1),i(),p(e.column.transferredOut.selected?8:-1),i(),p(e.column.adjust.selected?9:-1),i(),p(e.column.end.selected?10:-1),i(),p(e.column.now.selected?11:-1)}}function $t(t,l){if(t&1){let e=P();o(0,"span",45),h("click",function(){x(e);let a=c(2);return v(a.StoreRowsCountAPIResult("inventory/GetCountProductInventoryTraffic"))}),o(1,"i",46),r(2,"?"),n()()}}function te(t,l){if(t&1&&(o(0,"span"),r(1),d(2,"number"),n()),t&2){let e=c(2);i(),w(u(2,1,e.listTotal))}}function ee(t,l){if(t&1){let e=P();o(0,"div",10)(1,"div",39)(2,"div",40),r(3),d(4,"number"),y(5,$t,3,0,"span",41)(6,te,3,3,"span",42),r(7),n()(),o(8,"a",43),h("click",function(){x(e);let a=c();return v(a.NextPage(!0))}),E(9,"i",44),r(10," Next"),n()()}if(t&2){let e=c();i(3),s(" Showing 1 - ",u(4,4,e.infiniteList.length)," of "),i(2),_("ngIf",!e.pageData.HideStoreApiCount),i(),_("ngIf",e.pageData.HideStoreApiCount),i(),s(" records ~ ",e.pageData.Filter.PageNumber," Page ")}}var Ct=class t extends U{constructor(e,m,a,f,B,F,ie){super(e,m,"inventory/GetProductInventoryTraffic","inventoryloader/GetProductInventoryTraffic",void 0,void 0,!0);this.httpService=m;this.csvConverter=a;this.pageTitle=f;this.converter=B;this.roleService=F;this.matDialog=ie;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(Y,{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(m){return new(m||t)(T($),T(z),T(tt),T(G),T(pt),T(K),T(X))};static \u0275cmp=L({type:t,selectors:[["POS-product-inventory-traffic"]],features:[O],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(m,a){if(m&1){let f=P();o(0,"mainpanel-cmp",1),h("onSubmit",function(){return x(f),v(a.searchFromPageOne())}),S("filterChange",function(F){return x(f),I(a.pageData.Filter,F)||(a.pageData.Filter=F),v(F)}),o(1,"actions"),y(2,yt,3,0,"button",2),n(),o(3,"filters"),y(4,Tt,17,20,"ng-template",null,0,j),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(),y(16,gt,2,0,"th",8)(17,It,3,0,"th",9)(18,St,3,0,"th",9)(19,Pt,3,0,"th",9)(20,ht,3,0,"th",9)(21,Ft,3,0,"th",9)(22,Et,3,0,"th",9)(23,wt,3,0,"th",9)(24,Dt,3,0,"th",9)(25,bt,3,0,"th",9),n()(),o(26,"tbody"),y(27,Gt,2,0)(28,Rt,3,0,"tr"),n(),y(29,Zt,12,9,"tfoot"),n()(),y(30,ee,11,6,"div",10),n()()()}m&2&&(_("pageData",a.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),g("filter",a.pageData.Filter),_("column",a.column),i(2),_("ngIf",a.roleService.global.Export),i(14),p(a.column.code.selected?16:-1),i(),p(a.column.start.selected?17:-1),i(),p(a.column.bought.selected?18:-1),i(),p(a.column.sold.selected?19:-1),i(),p(a.column.transferredIn.selected?20:-1),i(),p(a.column.transferredOut.selected?21:-1),i(),p(a.column.adjust.selected?22:-1),i(),p(a.column.end.selected?23:-1),i(),p(a.column.now.selected?24:-1),i(),p(a.column.percent.selected?25:-1),i(2),p(a.infiniteList&&a.infiniteList.length>0?27:28),i(2),p(a.infiniteList&&a.infiniteList.length>0?29:-1),i(),p(a.infiniteList&&a.infiniteList.length>0?30:-1))},dependencies:[ot,nt,A,q,W,H,mt,lt,_t,it,et,R,Z,dt,ct,rt,at,st,ut,J,Q],encapsulation:2})};export{Ct as Product_Inventory_TrafficComponent};
1
+ import{a as _t,b as ut}from"./chunk-3UXPJWJQ.js";import{a as pt}from"./chunk-FKDZ5OWB.js";import{a as mt}from"./chunk-M57BBETM.js";import{a as st}from"./chunk-BXQFYW4R.js";import"./chunk-4UYZJCFI.js";import"./chunk-BYXBJQAS.js";import{d as ct,e as dt}from"./chunk-GIDGCFLX.js";import"./chunk-XBRBYCWJ.js";import"./chunk-3RK6DDJD.js";import"./chunk-FP4HFB5J.js";import"./chunk-H3OZSV6V.js";import"./chunk-YEDKRNXU.js";import"./chunk-VZEPVRCY.js";import"./chunk-7QWJJPNG.js";import{d as at,e as rt}from"./chunk-6647Y35T.js";import"./chunk-VHAM2DWK.js";import{a as Z}from"./chunk-JPXXXD26.js";import{a as U}from"./chunk-PLZ3ODXT.js";import{f as lt}from"./chunk-UKFG66EY.js";import{b as Y}from"./chunk-QHBWVJIQ.js";import"./chunk-IJVIVNVH.js";import"./chunk-KAJ5NYU6.js";import"./chunk-6JAL37Y4.js";import"./chunk-4QQTEPQT.js";import{a as tt}from"./chunk-XZR3IMWZ.js";import{e as nt,f as ot}from"./chunk-BA64MIHJ.js";import"./chunk-B6LPY2IZ.js";import"./chunk-CWITQVZH.js";import"./chunk-QHRP323Q.js";import"./chunk-WDQ4UKKY.js";import"./chunk-MFCXEITE.js";import"./chunk-MUJ6277G.js";import"./chunk-LMJVRREP.js";import"./chunk-3LBZDIW2.js";import"./chunk-KTCV3KOE.js";import"./chunk-KZDE63UL.js";import"./chunk-ZJHWFDGD.js";import{b as $}from"./chunk-SPTLCHEU.js";import"./chunk-3GOO5E5D.js";import"./chunk-XMYLHF4C.js";import"./chunk-H7F34T25.js";import{b as Q,c as J}from"./chunk-JOXTERIM.js";import{N as it,g as et}from"./chunk-TSIYPTYI.js";import"./chunk-XYB3YDKL.js";import"./chunk-7VKFVS7K.js";import"./chunk-ZVDY66SR.js";import{g as X}from"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-VFTGIP5A.js";import"./chunk-LE3BKIDY.js";import"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import{F as H}from"./chunk-RVXZOIFQ.js";import"./chunk-PW7JCR65.js";import"./chunk-XMABJJGK.js";import{d as K}from"./chunk-ZZGSAFGO.js";import"./chunk-QPS677LS.js";import{$a as i,Ac as u,Bc as C,Db as p,Eb as k,Fc as j,Gb as M,Hb as N,Ib as o,Jb as n,Kb as E,Ob as P,Qb as h,Rb as c,Rd as R,Yd as z,Zc as q,db as T,ec as r,fc as w,gc as s,gd as W,jc as g,jd as A,kb as L,kc as I,lc as S,ob as O,qb as y,qc as D,rc as b,ub as V,va as x,vb as _,wa as v,wd as G,zc as d}from"./chunk-UXRO4UFY.js";import"./chunk-7DCB7DB2.js";var xt=()=>["/menu/Outlets/Master/Outlets/Info"],ft=t=>({ID:t}),vt=()=>["/menu/Products/Catalog/Products/Info"];function yt(t,l){if(t&1){let e=P();o(0,"button",11),h("click",function(){x(e);let a=c();return v(a.openExportModal())}),E(1,"i",12),r(2," Export "),n()}}function Tt(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){x(e);let f=c();return I(f.pageData.Filter.OutletGroupID,a)||(f.pageData.Filter.OutletGroupID=a),v(a)}),n(),o(4,"h6"),r(5,"Category"),n(),o(6,"POS-product-category-select",15),S("selectedCategoryIDChange",function(a){x(e);let f=c();return I(f.pageData.Filter.CategoryID,a)||(f.pageData.Filter.CategoryID=a),v(a)}),n(),o(7,"autocompleteV3",16),S("modelNameChange",function(a){x(e);let f=c();return I(f.pageData.Filter.ListProductID,a)||(f.pageData.Filter.ListProductID=a),v(a)}),n(),o(8,"h6"),r(9,"From - To"),n(),o(10,"div")(11,"datepicker",17),S("dateChange",function(a){x(e);let f=c();return I(f.pageData.Filter.From,a)||(f.pageData.Filter.From=a),v(a)}),n()(),o(12,"div",18)(13,"datepicker",19),S("dateChange",function(a){x(e);let f=c();return I(f.pageData.Filter.To,a)||(f.pageData.Filter.To=a),v(a)}),n()(),o(14,"h6"),r(15,"Inventory Type"),n(),o(16,"radio-options",20),S("modelChange",function(a){x(e);let f=c();return I(f.pageData.Filter.InventoryType,a)||(f.pageData.Filter.InventoryType=a),v(a)}),n()()}if(t&2){let e=c();i(3),_("showClear",!0),g("selectedOutletGroupID",e.pageData.Filter.OutletGroupID),i(3),g("selectedCategoryID",e.pageData.Filter.CategoryID),_("showClear",!0),i(),g("modelName",e.pageData.Filter.ListProductID),_("placeholder","Search Product")("isShowEmptyMessage",!0)("emptyMessage","No Product found")("tooltipMessage","Search by product name")("label","Product to Analyze")("listDataEndpoint","/api/ac/GetProductSuggestionByCodeNName")("valueField","Key"),i(4),_("isFloatingLabel",!1),g("date",e.pageData.Filter.From),_("hidelClearBtn",!0),i(2),_("isFloatingLabel",!1),g("date",e.pageData.Filter.To),_("hidelClearBtn",!0),i(3),g("model",e.pageData.Filter.InventoryType),_("options",e.pageData.Options.InventoryTypes)}}function gt(t,l){t&1&&(o(0,"th",8),r(1,"Code"),n())}function It(t,l){t&1&&(o(0,"th",9)(1,"span",21),r(2," Start "),n()())}function St(t,l){t&1&&(o(0,"th",9)(1,"span",22),r(2," Bought "),n()())}function Pt(t,l){t&1&&(o(0,"th",9)(1,"span",23),r(2," Sold "),n()())}function ht(t,l){t&1&&(o(0,"th",9)(1,"span",24),r(2," T.In "),n()())}function Ft(t,l){t&1&&(o(0,"th",9)(1,"span",25),r(2," T.Out "),n()())}function Et(t,l){t&1&&(o(0,"th",9)(1,"span",26),r(2," Adj "),n()())}function wt(t,l){t&1&&(o(0,"th",9)(1,"span",27),r(2," End "),n()())}function Dt(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 Bt(t,l){if(t&1&&(o(0,"td",31),r(1),n()),t&2){let e=c().$implicit;i(),s(" ",e.ProductCode," ")}}function Lt(t,l){if(t&1&&(o(0,"td",32),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;_("colsFontColor",e.Start),i(),s(" ",u(2,2,e.Start)," ")}}function Ot(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),s(" ",u(2,1,e.Bought)," ")}}function Vt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),s(" ",u(2,1,e.Sold)," ")}}function kt(t,l){if(t&1&&(o(0,"td",33),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),s(" ",u(2,1,e.TransferredIn)," ")}}function Mt(t,l){if(t&1&&(o(0,"td",34),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),s(" ",u(2,1,e.TransferredOut)," ")}}function Nt(t,l){if(t&1&&(o(0,"td",32),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;_("colsFontColor",e.Adjustment),i(),s(" ",e.Adjustment<0?e.Adjustment*-1:u(2,2,e.Adjustment)," ")}}function jt(t,l){if(t&1&&(o(0,"td",32),r(1),n()),t&2){let e=c().$implicit;_("colsFontColor",e.End),i(),s(" ",e.End," ")}}function qt(t,l){if(t&1&&(o(0,"td",32),r(1),n()),t&2){let e=c().$implicit;_("colsFontColor",e.Now),i(),s(" ",e.Now," ")}}function Wt(t,l){if(t&1&&(o(0,"td",31),r(1),d(2,"quantityFraction"),n()),t&2){let e=c().$implicit;i(),s(" ",u(2,1,e.SellTransferInRate)," ")}}function At(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()(),y(7,Bt,2,1,"td",31)(8,Lt,3,4,"td",32)(9,Ot,3,3,"td",33)(10,Vt,3,3,"td",34)(11,kt,3,3,"td",33)(12,Mt,3,3,"td",34)(13,Nt,3,4,"td",32)(14,jt,2,2,"td",32)(15,qt,2,2,"td",32)(16,Wt,3,3,"td",31),n()),t&2){let e=l.$implicit,m=c(2);i(2),_("routerLink",D(16,xt))("queryParams",b(17,ft,e.OutletID)),i(),s(" ",e.OutletName," "),i(2),_("routerLink",D(19,vt))("queryParams",b(20,ft,e.ProductID)),i(),w(e.ProductName),i(),p(m.column.code.selected?7:-1),i(),p(m.column.start.selected?8:-1),i(),p(m.column.bought.selected?9:-1),i(),p(m.column.sold.selected?10:-1),i(),p(m.column.transferredIn.selected?11:-1),i(),p(m.column.transferredOut.selected?12:-1),i(),p(m.column.adjust.selected?13:-1),i(),p(m.column.end.selected?14:-1),i(),p(m.column.now.selected?15:-1),i(),p(m.column.percent.selected?16:-1)}}function Gt(t,l){if(t&1&&M(0,At,17,22,"tr",null,k),t&2){let e=c();N(e.infiniteList)}}function Rt(t,l){t&1&&(o(0,"tr")(1,"td",35),E(2,"app-empty-state"),n()())}function Ht(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);_("colsFontColor",u(2,5,C(1,2,e.infiniteList,"Start"))),i(3),s(" ",u(5,10,C(4,7,e.infiniteList,"Start"))," ")}}function zt(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(),s(" ",u(3,4,C(2,1,e.infiniteList,"Bought"))," ")}}function Kt(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(),s(" ",u(3,4,C(2,1,e.infiniteList,"Sold"))," ")}}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(),s(" ",u(3,4,C(2,1,e.infiniteList,"TransferredIn"))," ")}}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(),s(" ",u(3,4,C(2,1,e.infiniteList,"TransferredOut"))," ")}}function Ut(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);_("colsFontColor",u(2,5,C(1,2,e.infiniteList,"Adjustment"))),i(3),s(" ",u(5,10,C(4,7,e.infiniteList,"Adjustment"))," ")}}function Xt(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);_("colsFontColor",u(2,5,C(1,2,e.infiniteList,"End"))),i(3),s(" ",u(5,10,C(4,7,e.infiniteList,"End"))," ")}}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);_("colsFontColor",u(2,5,C(1,2,e.infiniteList,"Now"))),i(3),s(" ",u(5,10,C(4,7,e.infiniteList,"Now"))," ")}}function Zt(t,l){if(t&1&&(o(0,"tfoot")(1,"tr",36)(2,"th",37),r(3," Total: "),n(),y(4,Ht,6,12,"td",32)(5,zt,4,6,"td",33)(6,Kt,4,6,"td",34)(7,Qt,4,6,"td",33)(8,Jt,4,6,"td",34)(9,Ut,6,12,"td",38)(10,Xt,6,12,"td",32)(11,Yt,6,12,"td",32),n()()),t&2){let e=c();i(2),V("colspan",e.column.code.selected?3:2),i(2),p(e.column.start.selected?4:-1),i(),p(e.column.bought.selected?5:-1),i(),p(e.column.sold.selected?6:-1),i(),p(e.column.transferredIn.selected?7:-1),i(),p(e.column.transferredOut.selected?8:-1),i(),p(e.column.adjust.selected?9:-1),i(),p(e.column.end.selected?10:-1),i(),p(e.column.now.selected?11:-1)}}function $t(t,l){if(t&1){let e=P();o(0,"span",45),h("click",function(){x(e);let a=c(2);return v(a.StoreRowsCountAPIResult("inventory/GetCountProductInventoryTraffic"))}),o(1,"i",46),r(2,"?"),n()()}}function te(t,l){if(t&1&&(o(0,"span"),r(1),d(2,"number"),n()),t&2){let e=c(2);i(),w(u(2,1,e.listTotal))}}function ee(t,l){if(t&1){let e=P();o(0,"div",10)(1,"div",39)(2,"div",40),r(3),d(4,"number"),y(5,$t,3,0,"span",41)(6,te,3,3,"span",42),r(7),n()(),o(8,"a",43),h("click",function(){x(e);let a=c();return v(a.NextPage(!0))}),E(9,"i",44),r(10," Next"),n()()}if(t&2){let e=c();i(3),s(" Showing 1 - ",u(4,4,e.infiniteList.length)," of "),i(2),_("ngIf",!e.pageData.HideStoreApiCount),i(),_("ngIf",e.pageData.HideStoreApiCount),i(),s(" records ~ ",e.pageData.Filter.PageNumber," Page ")}}var Ct=class t extends U{constructor(e,m,a,f,B,F,ie){super(e,m,"inventory/GetProductInventoryTraffic","inventoryloader/GetProductInventoryTraffic",void 0,void 0,!0);this.httpService=m;this.csvConverter=a;this.pageTitle=f;this.converter=B;this.roleService=F;this.matDialog=ie;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(Y,{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(m){return new(m||t)(T($),T(z),T(tt),T(G),T(pt),T(K),T(X))};static \u0275cmp=L({type:t,selectors:[["POS-product-inventory-traffic"]],features:[O],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(m,a){if(m&1){let f=P();o(0,"mainpanel-cmp",1),h("onSubmit",function(){return x(f),v(a.searchFromPageOne())}),S("filterChange",function(F){return x(f),I(a.pageData.Filter,F)||(a.pageData.Filter=F),v(F)}),o(1,"actions"),y(2,yt,3,0,"button",2),n(),o(3,"filters"),y(4,Tt,17,20,"ng-template",null,0,j),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(),y(16,gt,2,0,"th",8)(17,It,3,0,"th",9)(18,St,3,0,"th",9)(19,Pt,3,0,"th",9)(20,ht,3,0,"th",9)(21,Ft,3,0,"th",9)(22,Et,3,0,"th",9)(23,wt,3,0,"th",9)(24,Dt,3,0,"th",9)(25,bt,3,0,"th",9),n()(),o(26,"tbody"),y(27,Gt,2,0)(28,Rt,3,0,"tr"),n(),y(29,Zt,12,9,"tfoot"),n()(),y(30,ee,11,6,"div",10),n()()()}m&2&&(_("pageData",a.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),g("filter",a.pageData.Filter),_("column",a.column),i(2),_("ngIf",a.roleService.global.Export),i(14),p(a.column.code.selected?16:-1),i(),p(a.column.start.selected?17:-1),i(),p(a.column.bought.selected?18:-1),i(),p(a.column.sold.selected?19:-1),i(),p(a.column.transferredIn.selected?20:-1),i(),p(a.column.transferredOut.selected?21:-1),i(),p(a.column.adjust.selected?22:-1),i(),p(a.column.end.selected?23:-1),i(),p(a.column.now.selected?24:-1),i(),p(a.column.percent.selected?25:-1),i(2),p(a.infiniteList&&a.infiniteList.length>0?27:28),i(2),p(a.infiniteList&&a.infiniteList.length>0?29:-1),i(),p(a.infiniteList&&a.infiniteList.length>0?30:-1))},dependencies:[ot,nt,A,q,W,H,mt,lt,_t,it,et,R,Z,dt,ct,rt,at,st,ut,J,Q],encapsulation:2})};export{Ct as Product_Inventory_TrafficComponent};
@@ -1 +1 @@
1
- import{a}from"./chunk-S22XRS4J.js";import{K as o}from"./chunk-UXRO4UFY.js";var s=class extends a{constructor(t,e,r,n){super(t);this.httpService=e;this.formDataAPI=r;this.route=n;let p=this.route.snapshot.queryParams;this.menuData$.pipe(o(()=>this.httpService.post(`/api/${this.formDataAPI}`,p))).subscribe(i=>{this.data=i,this.postBindForm(i)})}data={};get formData(){return this.data.Form}set formData(t){this.data.Form=t}get options(){return this.data.Options?this.data.Options:{}}get Roles(){return this.data.Roles?this.data.Roles:{}}postBindForm(t){}onSubmit(t,e=!1){this.preSubmitForm(),this.httpService.post(`/api/${t}`,this.formData).subscribe({next:r=>{this.onSubmitSuccess(r)},error:r=>{this.onSubmitError(r)}})}compare(t,e,r){return(t<e?-1:1)*(r?1:-1)}preSubmitForm(){}onSubmitSuccess(t){}onSubmitError(t){}};export{s as a};
1
+ import{a}from"./chunk-SPTLCHEU.js";import{K as o}from"./chunk-UXRO4UFY.js";var s=class extends a{constructor(t,e,r,n){super(t);this.httpService=e;this.formDataAPI=r;this.route=n;let p=this.route.snapshot.queryParams;this.menuData$.pipe(o(()=>this.httpService.post(`/api/${this.formDataAPI}`,p))).subscribe(i=>{this.data=i,this.postBindForm(i)})}data={};get formData(){return this.data.Form}set formData(t){this.data.Form=t}get options(){return this.data.Options?this.data.Options:{}}get Roles(){return this.data.Roles?this.data.Roles:{}}postBindForm(t){}onSubmit(t,e=!1){this.preSubmitForm(),this.httpService.post(`/api/${t}`,this.formData).subscribe({next:r=>{this.onSubmitSuccess(r)},error:r=>{this.onSubmitError(r)}})}compare(t,e,r){return(t<e?-1:1)*(r?1:-1)}preSubmitForm(){}onSubmitSuccess(t){}onSubmitError(t){}};export{s as a};