dealpos 26.28.0 → 26.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/browser/{chunk-SH7KKWLV.js → chunk-2I5UUMDJ.js} +1 -1
  2. package/browser/{chunk-RSFKVIJG.js → chunk-3AA3DHH7.js} +1 -1
  3. package/browser/{chunk-WVO4VPNW.js → chunk-3BL7CUTN.js} +1 -1
  4. package/browser/{chunk-C7W5KFFB.js → chunk-3FRSVJJ7.js} +1 -1
  5. package/browser/{chunk-IKPATIKU.js → chunk-3JJUFLJM.js} +1 -1
  6. package/browser/{chunk-WBH5XK4Z.js → chunk-46Y4TGIE.js} +1 -1
  7. package/browser/{chunk-DLOUZRLB.js → chunk-4J2ID2MU.js} +1 -1
  8. package/browser/{chunk-DQ43IK2L.js → chunk-5OC7EMM6.js} +1 -1
  9. package/browser/{chunk-HXRS4QF2.js → chunk-5PTIWA7U.js} +1 -1
  10. package/browser/chunk-5TDNJSOY.js +1 -0
  11. package/browser/{chunk-6FVDY5UD.js → chunk-5YS5VY7A.js} +1 -1
  12. package/browser/{chunk-J7K7BKOU.js → chunk-67AH74YH.js} +10 -10
  13. package/browser/{chunk-VACZKGRO.js → chunk-6AGOAMVL.js} +1 -1
  14. package/browser/{chunk-6PA64EHG.js → chunk-6DNXB4ZE.js} +1 -1
  15. package/browser/{chunk-QTYC754R.js → chunk-6RNDU62J.js} +1 -1
  16. package/browser/{chunk-INT2QMDD.js → chunk-A6IF36DS.js} +1 -1
  17. package/browser/{chunk-GBTMYCB5.js → chunk-ACTIKDRX.js} +1 -1
  18. package/browser/{chunk-G7JCM6P3.js → chunk-ADHPMALJ.js} +1 -1
  19. package/browser/chunk-AE23N5CE.js +1 -0
  20. package/browser/{chunk-CEWCEV5F.js → chunk-ALBKTU2C.js} +1 -1
  21. package/browser/{chunk-WAIIMNSI.js → chunk-C3BIKM3S.js} +1 -1
  22. package/browser/{chunk-JZIW7N5U.js → chunk-CBGA6I7A.js} +1 -1
  23. package/browser/{chunk-LEFDWO3E.js → chunk-CWAWIUWN.js} +1 -1
  24. package/browser/{chunk-P2FJQWN4.js → chunk-CWT5ZMB7.js} +1 -1
  25. package/browser/{chunk-LZICCY37.js → chunk-D7653MEY.js} +1 -1
  26. package/browser/{chunk-7JJWKS37.js → chunk-DBEN6KKV.js} +1 -1
  27. package/browser/{chunk-FMNHSHD5.js → chunk-DBGV7UE7.js} +1 -1
  28. package/browser/{chunk-O5FJSENK.js → chunk-EOPSQQQW.js} +1 -1
  29. package/browser/{chunk-327KJJRZ.js → chunk-ERTXBVY4.js} +1 -1
  30. package/browser/{chunk-J7B6WY2X.js → chunk-EWRXBE3I.js} +1 -1
  31. package/browser/{chunk-LNOBTJ3M.js → chunk-FE2QSG4D.js} +2 -2
  32. package/browser/{chunk-D64PDRSQ.js → chunk-FTCHDS57.js} +2 -2
  33. package/browser/{chunk-CEPMKH2R.js → chunk-FUGRAGUR.js} +2 -2
  34. package/browser/{chunk-PC3LKRJV.js → chunk-FXPNQ2F7.js} +1 -1
  35. package/browser/{chunk-JMD2NQ6M.js → chunk-G2WIR7CS.js} +1 -1
  36. package/browser/{chunk-53XGL7QF.js → chunk-GEXHG4TA.js} +1 -1
  37. package/browser/{chunk-KMPVKMCP.js → chunk-GOIMBO6M.js} +1 -1
  38. package/browser/{chunk-EOPQCVG4.js → chunk-GZPQS275.js} +1 -1
  39. package/browser/{chunk-TPYW4CDL.js → chunk-HQ6FN675.js} +1 -1
  40. package/browser/{chunk-QL2JS57O.js → chunk-HXB2MZXO.js} +2 -2
  41. package/browser/{chunk-RAVOM5G2.js → chunk-I36KID5F.js} +1 -1
  42. package/browser/{chunk-ZJMXJ6LC.js → chunk-IEDC4XOD.js} +1 -1
  43. package/browser/{chunk-PFLHSFRK.js → chunk-IH6MKS5E.js} +1 -1
  44. package/browser/{chunk-UVP3UXJX.js → chunk-IIAIW2LO.js} +1 -1
  45. package/browser/{chunk-FL26XBUA.js → chunk-IIWRQLLK.js} +1 -1
  46. package/browser/{chunk-7Y2Y644H.js → chunk-J3AUT7P7.js} +1 -1
  47. package/browser/{chunk-MN5BTDDF.js → chunk-J7K3ZGHO.js} +1 -1
  48. package/browser/{chunk-B7NYDBTQ.js → chunk-JAAW3FBF.js} +1 -1
  49. package/browser/{chunk-SC4HA5U3.js → chunk-JIWJJRGS.js} +1 -1
  50. package/browser/{chunk-GW7VZZHI.js → chunk-KC5WGF2P.js} +1 -1
  51. package/browser/{chunk-AN5WRSZS.js → chunk-KS6RPDTZ.js} +1 -1
  52. package/browser/{chunk-YXMOVCA5.js → chunk-L3PP32LV.js} +1 -1
  53. package/browser/{chunk-Q35HHHWJ.js → chunk-LANQ6YUO.js} +1 -1
  54. package/browser/{chunk-V335UIPQ.js → chunk-LBCCTXF2.js} +1 -1
  55. package/browser/{chunk-MCKFTACJ.js → chunk-LILVQOBI.js} +1 -1
  56. package/browser/{chunk-XUDC7KKL.js → chunk-LJQ6RWLC.js} +1 -1
  57. package/browser/chunk-LRORASZT.js +1 -0
  58. package/browser/{chunk-KEAX5LTZ.js → chunk-LZVFVGHO.js} +2 -2
  59. package/browser/{chunk-ACP45XJ4.js → chunk-M6GCTCNF.js} +1 -1
  60. package/browser/{chunk-FZEZBSGQ.js → chunk-MNEHXZNC.js} +1 -1
  61. package/browser/{chunk-XLFRTOQA.js → chunk-MNNM6IOI.js} +1 -1
  62. package/browser/chunk-NW62DOPB.js +1 -0
  63. package/browser/{chunk-HHFT7K4U.js → chunk-OTA7JWE7.js} +1 -1
  64. package/browser/{chunk-AM55FWN2.js → chunk-P37LRPAP.js} +1 -1
  65. package/browser/{chunk-2UD4FNXS.js → chunk-POCPZAKF.js} +1 -1
  66. package/browser/{chunk-YW6CVGZI.js → chunk-PORO4RUV.js} +1 -1
  67. package/browser/{chunk-57VNUM46.js → chunk-QCKULX4E.js} +1 -1
  68. package/browser/{chunk-ZKAO5YAI.js → chunk-QLQ37H7W.js} +1 -1
  69. package/browser/{chunk-WA7LUOJ7.js → chunk-QZ3FFFFG.js} +1 -1
  70. package/browser/{chunk-JGNCPYXH.js → chunk-R5TR4QVA.js} +1 -1
  71. package/browser/{chunk-DM3DU5DU.js → chunk-RE3NBLIJ.js} +1 -1
  72. package/browser/{chunk-J2R25A7R.js → chunk-RFKPCS4S.js} +1 -1
  73. package/browser/{chunk-LKQWTLXR.js → chunk-RH5QBEME.js} +1 -1
  74. package/browser/{chunk-Q4EDTY7P.js → chunk-RTNM34UG.js} +1 -1
  75. package/browser/{chunk-PI7EUFPY.js → chunk-RTVRQ26X.js} +1 -1
  76. package/browser/{chunk-WPKVRAFJ.js → chunk-RVCOS3S6.js} +1 -1
  77. package/browser/{chunk-ZFTPYPG2.js → chunk-SKGL4FZS.js} +1 -1
  78. package/browser/{chunk-GXKWO66S.js → chunk-SQ52KMEN.js} +1 -1
  79. package/browser/{chunk-HVNEUBQL.js → chunk-SVACMPDM.js} +1 -1
  80. package/browser/chunk-SVFZD5CX.js +1 -0
  81. package/browser/{chunk-KDNHJUJN.js → chunk-T4G2GDOZ.js} +1 -1
  82. package/browser/{chunk-H3V2JT7B.js → chunk-TBLYWPU4.js} +1 -1
  83. package/browser/{chunk-CBPLFRTG.js → chunk-TR4OQR6N.js} +1 -1
  84. package/browser/{chunk-UCUZH73J.js → chunk-TRHQ4FSE.js} +1 -1
  85. package/browser/{chunk-4ZMZWD3V.js → chunk-TV3MPMPX.js} +1 -1
  86. package/browser/{chunk-EFYKJ6OJ.js → chunk-UBMJFCG5.js} +1 -1
  87. package/browser/{chunk-I2PQ6UT6.js → chunk-UM3P65CR.js} +1 -1
  88. package/browser/{chunk-FCIXB5ZU.js → chunk-UQZHWFMW.js} +1 -1
  89. package/browser/{chunk-IWNQ3RES.js → chunk-UVSDRJK7.js} +1 -1
  90. package/browser/{chunk-ZIUUXDZT.js → chunk-V4GFMYOL.js} +1 -1
  91. package/browser/{chunk-MOIZ2DDH.js → chunk-VJORBDSM.js} +2 -2
  92. package/browser/{chunk-QQPICUAQ.js → chunk-VJRBLQOO.js} +2 -2
  93. package/browser/{chunk-UH4LSBJ3.js → chunk-WHF4RFVG.js} +2 -2
  94. package/browser/{chunk-NNH6OM6K.js → chunk-WOYUNUGJ.js} +1 -1
  95. package/browser/{chunk-I6VGSIF2.js → chunk-X44ZWGRG.js} +1 -1
  96. package/browser/{chunk-FAQJ54Z2.js → chunk-XCCYKZ5U.js} +1 -1
  97. package/browser/{chunk-UVLAPTCO.js → chunk-XCFJ777N.js} +1 -1
  98. package/browser/{chunk-6POQSXT7.js → chunk-XOGT4BRU.js} +1 -1
  99. package/browser/{chunk-36U6DCC4.js → chunk-XON5IJ3T.js} +1 -1
  100. package/browser/{chunk-SFNQ5R7E.js → chunk-YP7FNCN4.js} +1 -1
  101. package/browser/{chunk-XABVNPFC.js → chunk-Z5ZUEWMA.js} +1 -1
  102. package/browser/{chunk-F6GZTHRS.js → chunk-ZPAT4WUM.js} +1 -1
  103. package/browser/index.html +2 -2
  104. package/browser/{main-OKP4WWL4.js → main-OBGKN3VT.js} +1 -1
  105. package/package.json +1 -1
  106. package/browser/chunk-2FU5LP27.js +0 -1
  107. package/browser/chunk-5IUT6OMG.js +0 -1
  108. package/browser/chunk-AT37TOEQ.js +0 -1
  109. package/browser/chunk-GAB6PXCK.js +0 -1
  110. package/browser/chunk-WRRXL5QM.js +0 -1
@@ -1 +1 @@
1
- import{a as te}from"./chunk-NQX7EX5A.js";import{a as le}from"./chunk-AM55FWN2.js";import{a as ie,c as ne,e as re,f as ae,g as oe}from"./chunk-6ZKW6NGS.js";import{b as Y}from"./chunk-WLNLF7ZT.js";import{a as Z}from"./chunk-KR74ZZ6U.js";import{g as X}from"./chunk-5NWJYNJO.js";import{N as ee}from"./chunk-VAJAIBT3.js";import{d as D}from"./chunk-RBBEZN3D.js";import{a as U}from"./chunk-3UB7PEG5.js";import{E as J,c as G,h as q,o as z}from"./chunk-POUQHZWU.js";import{a as j}from"./chunk-PTRS3UA6.js";import{n as K}from"./chunk-D3E5UKKJ.js";import{$b as x,Ab as f,Bb as a,Cb as s,Cc as V,Db as S,Dc as B,Ec as H,Mb as C,Pb as h,Qc as L,Ra as l,Rb as d,W as P,Ya as y,ab as F,bb as Q,ca as O,ec as p,fc as R,gc as g,ia as k,jc as w,kc as M,lc as T,ld as W,nd as $,pa as m,qa as c,r as N,sd as A,tb as u,vb as _,wa as b,xb as I,yb as v,zb as E}from"./chunk-M3O2GJ3M.js";function ce(i,t){i&1&&(a(0,"div",3)(1,"div",6),p(2,"Edit Serial is disabled during EDIT MODE"),s(),a(3,"div"),p(4," If you make a mistake, please delete the item and then add again "),s()())}function pe(i,t){if(i&1){let e=C();a(0,"mat-chip-row",17),h("removed",function(){let r=m(e).$implicit,o=d(3);return c(o.onRemoveSerialChip(r))}),p(1),a(2,"button",18),S(3,"i",19),s()()}if(i&2){let e=t.$implicit;l(),g(" ",e," ")}}function ue(i,t){if(i&1){let e=C();a(0,"div",8)(1,"div",10)(2,"mat-form-field",11),h("keyup.enter",function(r){return r.stopPropagation()}),a(3,"mat-chip-grid",null,0),v(5,pe,4,1,"mat-chip-row",null,I),a(7,"input",12,1),h("matChipInputTokenEnd",function(r){m(e);let o=x(8),me=d(2);return c(me.addSerial(r,o))}),s()()()(),a(9,"div",13)(10,"button",14),h("click",function(){m(e);let r=x(8),o=d(2);return c(o.submitSerial(r))}),S(11,"i",15),a(12,"strong",16),p(13,"ADD"),s()()()()}if(i&2){let e=x(4),n=d(2);l(5),E(n.serials),l(2),f("placeholder",n.isBatchNumber()?"E.g. Batch1 Batch2":"E.g. Serial1 Serial2")("matChipInputFor",e)("matChipInputSeparatorKeyCodes",n.separatorKeysCodes)}}function _e(i,t){if(i&1){let e=C();a(0,"ng-select",20),V(1,"async"),T("ngModelChange",function(r){m(e);let o=d(2);return M(o.serials,r)||(o.serials=r),c(r)}),h("remove",function(r){m(e);let o=d(2);return c(o.onRemoveSerialFromOption(r.value))})("change",function(r){m(e);let o=d(2);return c(o.onSelectSerial(r))}),s()}if(i&2){let e=d(2);f("items",B(1,3,e.serials$)),w("ngModel",e.serials),f("multiple",!0)}}function he(i,t){if(i&1&&(a(0,"div",4)(1,"div",7),u(2,ue,14,3,"div",8)(3,_e,2,5,"ng-select",9),s()()),i&2){let e=d();l(2),_(e.isReturn?2:3)}}function Ce(i,t){i&1&&S(0,"th",23)}function fe(i,t){i&1&&(a(0,"th",25),p(1,"Expiry Date"),s())}function Se(i,t){if(i&1){let e=C();a(0,"td",27)(1,"i",29),h("click",function(){m(e);let r=d().$index,o=d(2);return c(o.onRemoveSerial(r))}),s()()}}function xe(i,t){if(i&1&&(a(0,"td"),p(1),V(2,"date"),s()),i&2){let e=d().$implicit;l(),g(" ",e.ExpiryDate?H(2,1,e.ExpiryDate,"dd MMM yyyy"):"-"," ")}}function ge(i,t){if(i&1){let e=C();a(0,"tr"),u(1,Se,2,0,"td",27),a(2,"td"),p(3),s(),u(4,xe,3,4,"td"),a(5,"td")(6,"input",28),T("ngModelChange",function(r){let o=m(e).$implicit;return M(o.Quantity,r)||(o.Quantity=r),c(r)}),h("change",function(){m(e);let r=d(2);return c(r.onChangeQty())}),s()()()}if(i&2){let e=t.$implicit,n=d(2);l(),_(n.disabled?-1:1),l(2),R(e.Number),l(),_(n.showExpiryDate?4:-1),l(2),w("ngModel",e.Quantity),f("disabled",n.disabled||!n.isBatchNumber())("decimalPlaces",0)}}function be(i,t){if(i&1&&(a(0,"div",5)(1,"div",7)(2,"table",21)(3,"thead",22)(4,"tr"),u(5,Ce,1,0,"th",23),a(6,"th",24),p(7),s(),u(8,fe,2,0,"th",25),a(9,"th",26),p(10,"Quantity"),s()()(),a(11,"tbody"),v(12,ge,7,6,"tr",null,I),s()()()()),i&2){let e=d();l(5),_(e.disabled?-1:5),l(2),g(" ",e.isBatchNumber()?"Batch":"Serial"," Number "),l(),_(e.showExpiryDate?8:-1),l(4),E(e.selectedSerial)}}var se=class i{constructor(t,e){this.productService=t;this.toastr=e;this.cartItemChange=new b,this.serialsChange=new b}separatorKeysCodes=[13,188];_cartItem;isReturn=!1;disabled=!1;set cartItem(t){t&&(this._cartItem=t,this.initSelectedSerial(),t.Quantity<0?this.isReturn=!0:this.getSerialVariant())}isBatchNumber=L(!1);get cartItem(){return this._cartItem}cartItemChange;entityId;serials;serialsChange;serials$;selectedSerial=[];showExpiryDate;ngOnDestroy(){this.serialsChange.emit([])}initSelectedSerial(){let t=this.cartItem.Serial;t&&t.length>0&&(this.selectedSerial=t,this.checkShowExpiryDate())}getSerialVariant(){let t=this.cartItem.VariantID,e;this.serials$=this.productService.getVariantSerial(this.entityId,t).pipe(N(n=>n.map(r=>(e=new te,e.Number=r.Number,e.Quantity=r.Quantity?r.Quantity:1,e.ExpiryDate=r.ExpiryDate,e))),O(()=>{this.isReturn||(this.serials=this.generateSerialCode(this.selectedSerial))}),P())}generateSerialCode(t=[]){return t.map(e=>e.Number)}onSelectSerial(t){let e=t.filter(n=>this.selectedSerial.findIndex(r=>r.Number==n.Number)==-1);e.length>0&&(e[0].Quantity=1,this.selectedSerial=[...this.selectedSerial,...e],this.updateCartItem())}onRemoveSerial(t){this.selectedSerial=this.selectedSerial.filter((e,n)=>n!==t),this.serials=this.generateSerialCode(this.selectedSerial),this.updateCartItem()}onRemoveSerialChip(t){this.serials=this.serials.filter(e=>e!==t),this.serialsChange.emit(this.serials)}onRemoveSerialFromOption(t){this.selectedSerial=this.selectedSerial.filter(e=>e.Number!==t.Number),this.serials=this.generateSerialCode(this.selectedSerial)}onChangeQty(){this.updateCartItem()}submitSerial(t){t.value.trim()&&(this.serials.push(t.value.trim()),t.value="");let e=this.generateSerialData();this.selectedSerial=[...this.selectedSerial,...e],this.serials=[],this.updateCartItem()}generateSerialData(){return this.serials.filter(e=>this.selectedSerial.findIndex(n=>n.Number==e)==-1).map(e=>({Number:e,Quantity:this.isReturn?-1:1,ExpiryDate:null}))}addSerial(t,e){let n=(t.value||"").trim();if(n)if(this.serials.find(r=>r==n)){e.value="",this.toastr.info("Serial already exists",U.Info);return}else this.serials.push(n),this.serialsChange.emit(this.serials);t.chipInput.clear()}updateCartItem(){this.cartItem.Serial=this.selectedSerial,this.checkShowExpiryDate(),this.calculateSerialQty(),this.cartItemChange.emit(this.cartItem)}calculateSerialQty(){let t=0;this.selectedSerial.forEach(e=>{t+=e.Quantity}),this.cartItem.Quantity=t}checkShowExpiryDate(){let t=0;this.selectedSerial.forEach(e=>{j.IsNotEmpty(e.ExpiryDate)&&(t+=1)}),this.showExpiryDate=t>0}static \u0275fac=function(e){return new(e||i)(y(le),y(K))};static \u0275cmp=F({type:i,selectors:[["app-item-serial"]],inputs:{disabled:"disabled",cartItem:"cartItem",isBatchNumber:[1,"isBatchNumber"],entityId:"entityId",serials:"serials"},outputs:{cartItemChange:"cartItemChange",serialsChange:"serialsChange"},standalone:!1,decls:4,vars:3,consts:[["chipGrid",""],["inputChip",""],[1,"my-8"],[1,"alert","alert-warning","text-center","my-5","py-3"],[1,"row"],[1,"row","mt-8"],[1,"fw-bold"],[1,"col-12"],[1,"input-group"],["bindLabel","Number","appendTo","body","bindValue","Number","placeholder","Insert Number",1,"ng-select-multiple",3,"items","ngModel","multiple"],[1,"col"],["appearance","outline",1,"serial-chip",3,"keyup.enter"],[3,"matChipInputTokenEnd","placeholder","matChipInputFor","matChipInputSeparatorKeyCodes"],[1,"col-auto"],["type","button",1,"btn","btn-outline-secondary","btn-sm","add-chip",3,"click"],["aria-hidden","true",1,"fa","fa-plus","me-1","fs-6"],[1,"headings-font-family","h6","font-weight-bold"],[3,"removed"],["matChipRemove",""],[1,"fa-solid","fa-circle-xmark"],["bindLabel","Number","appendTo","body","bindValue","Number","placeholder","Insert Number",1,"ng-select-multiple",3,"ngModelChange","remove","change","items","ngModel","multiple"],[1,"table","table-bordered"],[1,"thead-light"],[1,"border-end",2,"width","40px"],[1,"border-end"],[1,"border-end",2,"width","100px"],[1,"border-end","text-end",2,"width","60px"],[1,"text-center"],["type","text","placeholder","Serial Quantity","autoNum","",1,"form-control","text-end",3,"ngModelChange","change","ngModel","disabled","decimalPlaces"],["aria-hidden","true","title","Remove serial",1,"fa","fa-xmark","text-danger","cursor-pointer","fa-2x",3,"click"]],template:function(e,n){e&1&&(a(0,"div",2),u(1,ce,5,0,"div",3),u(2,he,4,1,"div",4),u(3,be,14,3,"div",5),s()),e&2&&(l(),_(n.disabled?1:-1),l(),_(n.disabled?-1:2),l(),_(n.selectedSerial.length>0?3:-1))},dependencies:()=>[D,G,q,z,Z,re,ae,ie,ne,X,W,$],styles:[".serial-chip[_ngcontent-%COMP%]{width:100%}.serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.serial-chip[_ngcontent-%COMP%] .mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input, .serial-chip[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:40px!important}.serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing, .serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch, .serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading{border-color:#ccc!important}.serial-chip[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.add-chip[_ngcontent-%COMP%]{height:calc(100% - 18.4px);margin-left:1px;border-top-left-radius:0;border-bottom-left-radius:0}"]})},de=class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=Q({type:i});static \u0275inj=k({imports:[A,ee,D,J,oe,Y]})};export{se as a,de as b};
1
+ import{a as te}from"./chunk-NQX7EX5A.js";import{a as le}from"./chunk-P37LRPAP.js";import{a as ie,c as ne,e as re,f as ae,g as oe}from"./chunk-6ZKW6NGS.js";import{b as Y}from"./chunk-WLNLF7ZT.js";import{a as Z}from"./chunk-KR74ZZ6U.js";import{g as X}from"./chunk-5NWJYNJO.js";import{N as ee}from"./chunk-VAJAIBT3.js";import{d as D}from"./chunk-RBBEZN3D.js";import{a as U}from"./chunk-3UB7PEG5.js";import{E as J,c as G,h as q,o as z}from"./chunk-POUQHZWU.js";import{a as j}from"./chunk-PTRS3UA6.js";import{n as K}from"./chunk-D3E5UKKJ.js";import{$b as x,Ab as f,Bb as a,Cb as s,Cc as V,Db as S,Dc as B,Ec as H,Mb as C,Pb as h,Qc as L,Ra as l,Rb as d,W as P,Ya as y,ab as F,bb as Q,ca as O,ec as p,fc as R,gc as g,ia as k,jc as w,kc as M,lc as T,ld as W,nd as $,pa as m,qa as c,r as N,sd as A,tb as u,vb as _,wa as b,xb as I,yb as v,zb as E}from"./chunk-M3O2GJ3M.js";function ce(i,t){i&1&&(a(0,"div",3)(1,"div",6),p(2,"Edit Serial is disabled during EDIT MODE"),s(),a(3,"div"),p(4," If you make a mistake, please delete the item and then add again "),s()())}function pe(i,t){if(i&1){let e=C();a(0,"mat-chip-row",17),h("removed",function(){let r=m(e).$implicit,o=d(3);return c(o.onRemoveSerialChip(r))}),p(1),a(2,"button",18),S(3,"i",19),s()()}if(i&2){let e=t.$implicit;l(),g(" ",e," ")}}function ue(i,t){if(i&1){let e=C();a(0,"div",8)(1,"div",10)(2,"mat-form-field",11),h("keyup.enter",function(r){return r.stopPropagation()}),a(3,"mat-chip-grid",null,0),v(5,pe,4,1,"mat-chip-row",null,I),a(7,"input",12,1),h("matChipInputTokenEnd",function(r){m(e);let o=x(8),me=d(2);return c(me.addSerial(r,o))}),s()()()(),a(9,"div",13)(10,"button",14),h("click",function(){m(e);let r=x(8),o=d(2);return c(o.submitSerial(r))}),S(11,"i",15),a(12,"strong",16),p(13,"ADD"),s()()()()}if(i&2){let e=x(4),n=d(2);l(5),E(n.serials),l(2),f("placeholder",n.isBatchNumber()?"E.g. Batch1 Batch2":"E.g. Serial1 Serial2")("matChipInputFor",e)("matChipInputSeparatorKeyCodes",n.separatorKeysCodes)}}function _e(i,t){if(i&1){let e=C();a(0,"ng-select",20),V(1,"async"),T("ngModelChange",function(r){m(e);let o=d(2);return M(o.serials,r)||(o.serials=r),c(r)}),h("remove",function(r){m(e);let o=d(2);return c(o.onRemoveSerialFromOption(r.value))})("change",function(r){m(e);let o=d(2);return c(o.onSelectSerial(r))}),s()}if(i&2){let e=d(2);f("items",B(1,3,e.serials$)),w("ngModel",e.serials),f("multiple",!0)}}function he(i,t){if(i&1&&(a(0,"div",4)(1,"div",7),u(2,ue,14,3,"div",8)(3,_e,2,5,"ng-select",9),s()()),i&2){let e=d();l(2),_(e.isReturn?2:3)}}function Ce(i,t){i&1&&S(0,"th",23)}function fe(i,t){i&1&&(a(0,"th",25),p(1,"Expiry Date"),s())}function Se(i,t){if(i&1){let e=C();a(0,"td",27)(1,"i",29),h("click",function(){m(e);let r=d().$index,o=d(2);return c(o.onRemoveSerial(r))}),s()()}}function xe(i,t){if(i&1&&(a(0,"td"),p(1),V(2,"date"),s()),i&2){let e=d().$implicit;l(),g(" ",e.ExpiryDate?H(2,1,e.ExpiryDate,"dd MMM yyyy"):"-"," ")}}function ge(i,t){if(i&1){let e=C();a(0,"tr"),u(1,Se,2,0,"td",27),a(2,"td"),p(3),s(),u(4,xe,3,4,"td"),a(5,"td")(6,"input",28),T("ngModelChange",function(r){let o=m(e).$implicit;return M(o.Quantity,r)||(o.Quantity=r),c(r)}),h("change",function(){m(e);let r=d(2);return c(r.onChangeQty())}),s()()()}if(i&2){let e=t.$implicit,n=d(2);l(),_(n.disabled?-1:1),l(2),R(e.Number),l(),_(n.showExpiryDate?4:-1),l(2),w("ngModel",e.Quantity),f("disabled",n.disabled||!n.isBatchNumber())("decimalPlaces",0)}}function be(i,t){if(i&1&&(a(0,"div",5)(1,"div",7)(2,"table",21)(3,"thead",22)(4,"tr"),u(5,Ce,1,0,"th",23),a(6,"th",24),p(7),s(),u(8,fe,2,0,"th",25),a(9,"th",26),p(10,"Quantity"),s()()(),a(11,"tbody"),v(12,ge,7,6,"tr",null,I),s()()()()),i&2){let e=d();l(5),_(e.disabled?-1:5),l(2),g(" ",e.isBatchNumber()?"Batch":"Serial"," Number "),l(),_(e.showExpiryDate?8:-1),l(4),E(e.selectedSerial)}}var se=class i{constructor(t,e){this.productService=t;this.toastr=e;this.cartItemChange=new b,this.serialsChange=new b}separatorKeysCodes=[13,188];_cartItem;isReturn=!1;disabled=!1;set cartItem(t){t&&(this._cartItem=t,this.initSelectedSerial(),t.Quantity<0?this.isReturn=!0:this.getSerialVariant())}isBatchNumber=L(!1);get cartItem(){return this._cartItem}cartItemChange;entityId;serials;serialsChange;serials$;selectedSerial=[];showExpiryDate;ngOnDestroy(){this.serialsChange.emit([])}initSelectedSerial(){let t=this.cartItem.Serial;t&&t.length>0&&(this.selectedSerial=t,this.checkShowExpiryDate())}getSerialVariant(){let t=this.cartItem.VariantID,e;this.serials$=this.productService.getVariantSerial(this.entityId,t).pipe(N(n=>n.map(r=>(e=new te,e.Number=r.Number,e.Quantity=r.Quantity?r.Quantity:1,e.ExpiryDate=r.ExpiryDate,e))),O(()=>{this.isReturn||(this.serials=this.generateSerialCode(this.selectedSerial))}),P())}generateSerialCode(t=[]){return t.map(e=>e.Number)}onSelectSerial(t){let e=t.filter(n=>this.selectedSerial.findIndex(r=>r.Number==n.Number)==-1);e.length>0&&(e[0].Quantity=1,this.selectedSerial=[...this.selectedSerial,...e],this.updateCartItem())}onRemoveSerial(t){this.selectedSerial=this.selectedSerial.filter((e,n)=>n!==t),this.serials=this.generateSerialCode(this.selectedSerial),this.updateCartItem()}onRemoveSerialChip(t){this.serials=this.serials.filter(e=>e!==t),this.serialsChange.emit(this.serials)}onRemoveSerialFromOption(t){this.selectedSerial=this.selectedSerial.filter(e=>e.Number!==t.Number),this.serials=this.generateSerialCode(this.selectedSerial)}onChangeQty(){this.updateCartItem()}submitSerial(t){t.value.trim()&&(this.serials.push(t.value.trim()),t.value="");let e=this.generateSerialData();this.selectedSerial=[...this.selectedSerial,...e],this.serials=[],this.updateCartItem()}generateSerialData(){return this.serials.filter(e=>this.selectedSerial.findIndex(n=>n.Number==e)==-1).map(e=>({Number:e,Quantity:this.isReturn?-1:1,ExpiryDate:null}))}addSerial(t,e){let n=(t.value||"").trim();if(n)if(this.serials.find(r=>r==n)){e.value="",this.toastr.info("Serial already exists",U.Info);return}else this.serials.push(n),this.serialsChange.emit(this.serials);t.chipInput.clear()}updateCartItem(){this.cartItem.Serial=this.selectedSerial,this.checkShowExpiryDate(),this.calculateSerialQty(),this.cartItemChange.emit(this.cartItem)}calculateSerialQty(){let t=0;this.selectedSerial.forEach(e=>{t+=e.Quantity}),this.cartItem.Quantity=t}checkShowExpiryDate(){let t=0;this.selectedSerial.forEach(e=>{j.IsNotEmpty(e.ExpiryDate)&&(t+=1)}),this.showExpiryDate=t>0}static \u0275fac=function(e){return new(e||i)(y(le),y(K))};static \u0275cmp=F({type:i,selectors:[["app-item-serial"]],inputs:{disabled:"disabled",cartItem:"cartItem",isBatchNumber:[1,"isBatchNumber"],entityId:"entityId",serials:"serials"},outputs:{cartItemChange:"cartItemChange",serialsChange:"serialsChange"},standalone:!1,decls:4,vars:3,consts:[["chipGrid",""],["inputChip",""],[1,"my-8"],[1,"alert","alert-warning","text-center","my-5","py-3"],[1,"row"],[1,"row","mt-8"],[1,"fw-bold"],[1,"col-12"],[1,"input-group"],["bindLabel","Number","appendTo","body","bindValue","Number","placeholder","Insert Number",1,"ng-select-multiple",3,"items","ngModel","multiple"],[1,"col"],["appearance","outline",1,"serial-chip",3,"keyup.enter"],[3,"matChipInputTokenEnd","placeholder","matChipInputFor","matChipInputSeparatorKeyCodes"],[1,"col-auto"],["type","button",1,"btn","btn-outline-secondary","btn-sm","add-chip",3,"click"],["aria-hidden","true",1,"fa","fa-plus","me-1","fs-6"],[1,"headings-font-family","h6","font-weight-bold"],[3,"removed"],["matChipRemove",""],[1,"fa-solid","fa-circle-xmark"],["bindLabel","Number","appendTo","body","bindValue","Number","placeholder","Insert Number",1,"ng-select-multiple",3,"ngModelChange","remove","change","items","ngModel","multiple"],[1,"table","table-bordered"],[1,"thead-light"],[1,"border-end",2,"width","40px"],[1,"border-end"],[1,"border-end",2,"width","100px"],[1,"border-end","text-end",2,"width","60px"],[1,"text-center"],["type","text","placeholder","Serial Quantity","autoNum","",1,"form-control","text-end",3,"ngModelChange","change","ngModel","disabled","decimalPlaces"],["aria-hidden","true","title","Remove serial",1,"fa","fa-xmark","text-danger","cursor-pointer","fa-2x",3,"click"]],template:function(e,n){e&1&&(a(0,"div",2),u(1,ce,5,0,"div",3),u(2,he,4,1,"div",4),u(3,be,14,3,"div",5),s()),e&2&&(l(),_(n.disabled?1:-1),l(),_(n.disabled?-1:2),l(),_(n.selectedSerial.length>0?3:-1))},dependencies:()=>[D,G,q,z,Z,re,ae,ie,ne,X,W,$],styles:[".serial-chip[_ngcontent-%COMP%]{width:100%}.serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.serial-chip[_ngcontent-%COMP%] .mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input, .serial-chip[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:40px!important}.serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing, .serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch, .serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading{border-color:#ccc!important}.serial-chip[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.add-chip[_ngcontent-%COMP%]{height:calc(100% - 18.4px);margin-left:1px;border-top-left-radius:0;border-bottom-left-radius:0}"]})},de=class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=Q({type:i});static \u0275inj=k({imports:[A,ee,D,J,oe,Y]})};export{se as a,de as b};
@@ -1,4 +1,4 @@
1
- import{k as ze,o as tt,q as it,r as nt}from"./chunk-5NWJYNJO.js";import{a as Ke,b as qe}from"./chunk-V25UXFNL.js";import{a as ot,b as rt}from"./chunk-EFYKJ6OJ.js";import{a as Ye,b as Je,e as Qe,f as Xe,g as Ze,h as et}from"./chunk-R2YNXAPB.js";import{a as X}from"./chunk-SY5NNN4M.js";import{a as ae,b as Ge,c as We}from"./chunk-3UB7PEG5.js";import{F as je,a as Le,c as Ue,h as He,l as $e,s as Be}from"./chunk-POUQHZWU.js";import{a as v}from"./chunk-PTRS3UA6.js";import{n as E,q as Q}from"./chunk-D3E5UKKJ.js";import{$b as Me,Aa as V,Ab as h,Bb as s,C as ne,Cb as d,Db as M,G as r,H as ue,I as oe,Jb as K,K as me,Ka as ye,L as D,Ma as be,Mb as w,O as fe,Pb as y,Pc as R,Qc as Y,Ra as l,Rb as p,Rc as Ae,Sb as xe,Tb as q,Ya as A,Zb as Te,_ as u,_b as Ie,aa as F,ab as N,ac as ke,bb as ve,bc as Ee,c as ce,ca as I,d as $,dc as S,e as P,ec as x,fc as k,fd as Ne,ga as ge,gb as Ce,gc as Pe,ha as B,i as de,ia as he,k as ie,ka as j,kd as J,l as _,la as G,m as a,pa as C,pb as Oe,qa as O,qc as De,r as g,s as pe,sd as Re,tb as m,tc as Fe,vb as f,vc as z,wa as b,wc as re,xb as _e,yb as Se,yc as Ve,za as W,zb as we}from"./chunk-M3O2GJ3M.js";import{a as U,b as H}from"./chunk-KMHZKFQS.js";var L=class{static emptyDate="Please fill invoice date";static emptyNumber="Please fill invoice number";static emptyOrderNumber="Number is Required";static failGetMenu="Fail to get pos menu";static failToGetRetur="Fail to get retur";static failGetLocalPosStorage="Fail to get setting and option from local storage, Please re-cache your data while online!";static failGetVariant='"Error getting variant with {0} {1}" - {2}';static failGetLocalVariant="Fail to get variant from local storage, Please re-cache your data while online!";static emptyBarcodeFormat='No product with barcode "{0}"';static emptyCustomerFormat='No customer with code "{0}"';static failGetSalesOrder="Fail to get sales order";static failBin="Fail to bin transaction";static failGetCustomer="Fail to get customer's data";static failCreateCustomer="Fail to create customer";static noRoleContact="You have no right to create new customer";static submitLocally="Connection unavailable ~ offline! Order stored locally";static offlineMode="There is no internet connection, it is now in offline mode";static OfflineOrderNotSupport="Offline order is not Supported!";static failOrderConnectionTimeOut="Connection timeout! Please try uploading your order again!";static failDeletePark="Fail to delete park";static emptyAccessRegister="You do not have access to any Register";static failGenerateNewNumber="Fail to generate new number";static emptyPayment="There is no active payment method.";static failOpenRegister="Fail to open register";static failGetLocalOutletInfo="Fail to get outlet information from local storage, Please re-cache your data while online!";static failTrySubmit=`[Error submitting order]
1
+ import{k as ze,o as tt,q as it,r as nt}from"./chunk-5NWJYNJO.js";import{a as Ke,b as qe}from"./chunk-V25UXFNL.js";import{a as ot,b as rt}from"./chunk-UBMJFCG5.js";import{a as Ye,b as Je,e as Qe,f as Xe,g as Ze,h as et}from"./chunk-R2YNXAPB.js";import{a as X}from"./chunk-SY5NNN4M.js";import{a as ae,b as Ge,c as We}from"./chunk-3UB7PEG5.js";import{F as je,a as Le,c as Ue,h as He,l as $e,s as Be}from"./chunk-POUQHZWU.js";import{a as v}from"./chunk-PTRS3UA6.js";import{n as E,q as Q}from"./chunk-D3E5UKKJ.js";import{$b as Me,Aa as V,Ab as h,Bb as s,C as ne,Cb as d,Db as M,G as r,H as ue,I as oe,Jb as K,K as me,Ka as ye,L as D,Ma as be,Mb as w,O as fe,Pb as y,Pc as R,Qc as Y,Ra as l,Rb as p,Rc as Ae,Sb as xe,Tb as q,Ya as A,Zb as Te,_ as u,_b as Ie,aa as F,ab as N,ac as ke,bb as ve,bc as Ee,c as ce,ca as I,d as $,dc as S,e as P,ec as x,fc as k,fd as Ne,ga as ge,gb as Ce,gc as Pe,ha as B,i as de,ia as he,k as ie,ka as j,kd as J,l as _,la as G,m as a,pa as C,pb as Oe,qa as O,qc as De,r as g,s as pe,sd as Re,tb as m,tc as Fe,vb as f,vc as z,wa as b,wc as re,xb as _e,yb as Se,yc as Ve,za as W,zb as we}from"./chunk-M3O2GJ3M.js";import{a as U,b as H}from"./chunk-KMHZKFQS.js";var L=class{static emptyDate="Please fill invoice date";static emptyNumber="Please fill invoice number";static emptyOrderNumber="Number is Required";static failGetMenu="Fail to get pos menu";static failToGetRetur="Fail to get retur";static failGetLocalPosStorage="Fail to get setting and option from local storage, Please re-cache your data while online!";static failGetVariant='"Error getting variant with {0} {1}" - {2}';static failGetLocalVariant="Fail to get variant from local storage, Please re-cache your data while online!";static emptyBarcodeFormat='No product with barcode "{0}"';static emptyCustomerFormat='No customer with code "{0}"';static failGetSalesOrder="Fail to get sales order";static failBin="Fail to bin transaction";static failGetCustomer="Fail to get customer's data";static failCreateCustomer="Fail to create customer";static noRoleContact="You have no right to create new customer";static submitLocally="Connection unavailable ~ offline! Order stored locally";static offlineMode="There is no internet connection, it is now in offline mode";static OfflineOrderNotSupport="Offline order is not Supported!";static failOrderConnectionTimeOut="Connection timeout! Please try uploading your order again!";static failDeletePark="Fail to delete park";static emptyAccessRegister="You do not have access to any Register";static failGenerateNewNumber="Fail to generate new number";static emptyPayment="There is no active payment method.";static failOpenRegister="Fail to open register";static failGetLocalOutletInfo="Fail to get outlet information from local storage, Please re-cache your data while online!";static failTrySubmit=`[Error submitting order]
2
2
  {0}`;static failTryCreateCustomer=`"[Error creating customer]
3
3
  "{0}`;static createCustomerOffline="Create customer is not supported when the connection offline";static emptyCustomer="Please select customer!";static emptySalesPerson="Please select sales person!";static emptySalesType="Please select sales type!";static failCreateNewVariant="Fail to create new variant";static requiredDefaultCategory="[WARNING] - POS / Quick Create Product requires Default Category";static emptyVariant="Item is undefined, please re-type";static emptyPOItem="You must have at least one item";static emptyEntity="Please select entity before proceeding..";static failGetRetrieve="Fail to get retrieve";static failTryPark=`[Error submitting park]
4
4
  {0}`;static failTryGetPark=`[Error during get park]
@@ -1 +1 @@
1
- import{a as le}from"./chunk-J2R25A7R.js";import{a as ge}from"./chunk-LJ3IXMQO.js";import{g as Ie}from"./chunk-F26TML5Q.js";import{b as oe,c as ae,d as re}from"./chunk-KMI7GZJI.js";import{a as fe,b as ve}from"./chunk-EWMMWD7T.js";import{b as xe}from"./chunk-O652RU6G.js";import{a as ye}from"./chunk-75C5S3PQ.js";import{b as pe}from"./chunk-N5GGRFDA.js";import{a as _e}from"./chunk-T7SY746R.js";import{g as Ce,h as ue}from"./chunk-WAIIMNSI.js";import{a as se}from"./chunk-GXKWO66S.js";import{b as ie}from"./chunk-V25UXFNL.js";import{d as me,e as de}from"./chunk-RBBEZN3D.js";import{c as ce}from"./chunk-R2YNXAPB.js";import{E as ee,c as X,h as Y,o as Z,q as $}from"./chunk-POUQHZWU.js";import{b as ne}from"./chunk-WYAHUX6O.js";import{n as U,q as te}from"./chunk-D3E5UKKJ.js";import{Aa as B,Ab as x,Bb as a,Cb as r,Cc as w,Db as V,Dc as b,Hb as E,Ib as M,Ic as G,Mb as S,Nd as K,Pb as D,Ra as o,Rb as l,Ya as h,ab as k,ec as c,fb as H,fc as F,fd as q,gb as j,gc as _,jc as y,kc as f,la as W,lc as v,pa as C,pd as z,qa as u,sd as J,tb as p,vb as s,vc as A,wb as R,xb as Q,yb as L,za as O,zb as N}from"./chunk-M3O2GJ3M.js";import{a as T,b as P}from"./chunk-KMHZKFQS.js";var Se=n=>({ID:n}),De=n=>({"expanded-icon":n});function we(n,d){if(n&1){let e=S();a(0,"button",15),D("click",function(){C(e);let t=l();return u(t.openExportModal())}),V(1,"i",16),c(2," Export "),r()}}function be(n,d){if(n&1){let e=S();a(0,"div",17)(1,"div")(2,"h6"),c(3,"Outlet"),r(),a(4,"outlet-selector",18),v("ngModelChange",function(t){C(e);let m=l();return f(m.pageData().Filter.OutletID,t)||(m.pageData().Filter.OutletID=t),u(t)}),r()(),a(5,"div")(6,"h6"),c(7,"Category"),r(),a(8,"POS-product-category-select",19),v("selectedCategoryIDChange",function(t){C(e);let m=l();return f(m.pageData().Filter.ProductCategoryID,t)||(m.pageData().Filter.ProductCategoryID=t),u(t)}),r()(),a(9,"h6"),c(10,"Brand"),r(),a(11,"POS-brand-options",20),v("ngModelChange",function(t){C(e);let m=l();return f(m.pageData().Filter.BrandIDs,t)||(m.pageData().Filter.BrandIDs=t),u(t)}),r(),a(12,"div")(13,"h6"),c(14,"Product Tags"),r(),a(15,"ng-select",21),v("ngModelChange",function(t){C(e);let m=l();return f(m.pageData().Filter.ProductTagID,t)||(m.pageData().Filter.ProductTagID=t),u(t)}),r()(),a(16,"div")(17,"h6"),c(18,"Quantity From - To"),r(),a(19,"div",22)(20,"input",23),v("ngModelChange",function(t){C(e);let m=l();return f(m.pageData().Filter.QtyFrom,t)||(m.pageData().Filter.QtyFrom=t),u(t)}),r(),c(21," - "),a(22,"input",24),v("ngModelChange",function(t){C(e);let m=l();return f(m.pageData().Filter.QtyTo,t)||(m.pageData().Filter.QtyTo=t),u(t)}),r()()()()}if(n&2){let e,i=l();o(4),x("accessType",2),y("ngModel",i.pageData().Filter.OutletID),o(4),y("selectedCategoryID",i.pageData().Filter.ProductCategoryID),x("showClear",!0),o(3),y("ngModel",i.pageData().Filter.BrandIDs),x("multiple",!0)("clearable",!0),o(4),x("items",(e=i.pageData().Options)==null?null:e.Tags),y("ngModel",i.pageData().Filter.ProductTagID),o(5),y("ngModel",i.pageData().Filter.QtyFrom),o(2),y("ngModel",i.pageData().Filter.QtyTo)}}function Te(n,d){if(n&1&&(a(0,"th",10),c(1),r()),n&2){let e=l();o(),_(" ",e.column.VariantName.name," ")}}function Pe(n,d){if(n&1&&(a(0,"th",11),c(1),r()),n&2){let e=l();o(),_(" ",e.column.OnHand.name," ")}}function Ve(n,d){if(n&1&&(a(0,"th",12),c(1),r()),n&2){let e=l();o(),_(" ",e.column.DirectAllocated.name," ")}}function Ee(n,d){if(n&1&&(a(0,"th",13),c(1),r()),n&2){let e=l();o(),_(" ",e.column.IndirectAllocated.name," ")}}function Me(n,d){if(n&1&&(a(0,"th",14),c(1),r()),n&2){let e=l();o(),_(" ",e.column.Available.name," ")}}function Fe(n,d){if(n&1){let e=S();a(0,"button",29),D("click",function(){C(e);let t=l(2).$implicit,m=l();return u(m.onExpand(t))}),V(1,"i",30),r()}if(n&2){let e=l(2).$implicit,i=l();o(),x("ngClass",A(1,De,i.displayExpandedRow(e.VariantID)))}}function Ae(n,d){if(n&1&&(a(0,"td")(1,"div",26),p(2,Fe,2,3,"button",27),a(3,"div")(4,"a",28),c(5),r(),V(6,"br"),a(7,"small"),c(8),r()()()()),n&2){let e=l().$implicit;o(2),s(e.ListComponent&&e.ListComponent.length>0?2:-1),o(2),x("routerLink","/menu/Products/Catalog/Variants/Info")("queryParams",A(5,Se,e.VariantID)),o(),_(" ",e.VariantName," "),o(3),_(" ",e.VariantCode," ")}}function Oe(n,d){if(n&1&&(a(0,"td",25),c(1),w(2,"number"),r()),n&2){let e=l().$implicit;o(),F(b(2,1,e.OnHand))}}function Le(n,d){if(n&1&&(a(0,"td",25),c(1),w(2,"number"),r()),n&2){let e=l(2).$implicit;o(),_(" ",b(2,1,e.DirectAllocated)," ")}}function Ne(n,d){if(n&1&&p(0,Le,3,3,"td",25),n&2){let e=l(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function We(n,d){if(n&1&&(a(0,"td",25),c(1),w(2,"number"),r()),n&2){let e=l(2).$implicit;o(),_(" ",b(2,1,e.DirectAllocated)," ")}}function Be(n,d){if(n&1&&p(0,We,3,3,"td",25),n&2){let e=l(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function ke(n,d){if(n&1&&(a(0,"td",25),c(1),w(2,"number"),r()),n&2){let e=l().$implicit;o(),F(b(2,1,e.IndirectAllocated))}}function He(n,d){if(n&1&&(a(0,"td",25),c(1),w(2,"number"),r()),n&2){let e=l().$implicit;o(),F(b(2,1,e.Available))}}function je(n,d){if(n&1&&(a(0,"tbody")(1,"tr")(2,"td")(3,"a",28),c(4),r()(),a(5,"td"),c(6),r(),a(7,"td",25),c(8),r(),a(9,"td",25),c(10),r()()()),n&2){let e=d.$implicit,i=l(2).$implicit;o(3),x("routerLink","/menu/Products/Catalog/Variants/Info")("queryParams",A(6,Se,i.VariantID)),o(),_(" ",e.VariantName," "),o(2),_(" ",e.VariantCode," "),o(2),_(" ",e.Quantity," "),o(2),_(" ",e.OnHand," ")}}function Re(n,d){if(n&1&&(a(0,"tr")(1,"td",31)(2,"div",7)(3,"table",32)(4,"thead",33)(5,"tr",34)(6,"th",35),c(7),r(),a(8,"th",36),c(9,"Code"),r(),a(10,"th",37),c(11," Quantity "),r(),a(12,"th",37),c(13," On Hand "),r()()(),L(14,je,11,8,"tbody",null,R),r()()()()),n&2){let e=l().$implicit;o(7),_(" Components (",e.ListComponent.length,") "),o(7),N(e.ListComponent)}}function Qe(n,d){if(n&1&&(a(0,"tr"),p(1,Ae,9,7,"td"),p(2,Oe,3,3,"td",25),p(3,Ne,1,1)(4,Be,1,1),p(5,ke,3,3,"td",25),p(6,He,3,3,"td",25),r(),p(7,Re,16,1,"tr")),n&2){let e=d.$implicit,i=l();o(),s(i.column.VariantName&&i.column.VariantName.selected?1:-1),o(),s(i.column.OnHand&&i.column.OnHand.selected?2:-1),o(),s(i.totalIndirect()>0?3:4),o(2),s(i.column.IndirectAllocated&&i.column.IndirectAllocated.selected&&i.totalIndirect()>0?5:-1),o(),s(i.column.Available&&i.column.Available.selected?6:-1),o(),s(i.displayExpandedRow(e.VariantID)&&i.column.VariantName&&i.column.VariantName.selected?7:-1)}}function Ge(n,d){if(n&1){let e=S();a(0,"div")(1,"POS-complex-pagination",38),D("jumpToPage",function(){C(e);let t=l();return u(t.getListData())})("previousPage",function(){C(e);let t=l();return u(t.getListData())})("nextPage",function(){C(e);let t=l();return u(t.getListData())}),r()()}if(n&2){let e=l();o(),x("total",e.data().Data.length)("pageData",e.pageData())}}var he=class n extends le{constructor(e,i,t,m,I){super(e,i,"inventory/GetListInventoryComposite","inventoryloader/GetListInventoryComposite",t,void 0,!1);this.httpService=i;this.csvConverter=m;this.roleService=I;B(()=>{let g=this.totalIndirect();g!==null&&g<=0&&(console.log("Indirect allocation is zero or negative"),this.column=P(T({},this.column),{DirectAllocated:P(T({},this.column.DirectAllocated),{name:"Allocated"}),IndirectAllocated:P(T({},this.column.IndirectAllocated),{show:!1})}))})}column={VariantName:{selected:!0,name:"Name",show:!0},OnHand:{selected:!0,name:"On Hand",show:!0},DirectAllocated:{selected:!0,name:"Direct Allocated",show:!0},IndirectAllocated:{selected:!0,name:"Indirect Allocated",show:!0},Available:{selected:!0,name:"Available",show:!0}};totalIndirect=O(null);expandedRow=O([]);dialog=W(ce);afterPostInit(e){console.log("Composite Inventory Data",e);let i=e.Data.reduce((t,m)=>t+m.IndirectAllocated,0);console.log("Total Indirect Allocated:",i),this.totalIndirect.set(i)}sortData(e){let i=[...this.data().Data];if(!e.active||e.direction===""){this.infiniteList=i;return}this.infiniteList=i.sort((t,m)=>{let I=e.direction==="asc";return this.compare(t[e.active],m[e.active],I)})}openExportModal(){this.dialog.open(pe,{data:{title:"Composite Inventory",exportTypes:[{ID:"inventoryExport/GetExportInventoryComposite",Value:"Default",FileName:"Composite Inventory"}],filterExport:this.pageData().Filter,getAllDataLengthAPI:"inventory/GetCountInventoryComposite",pagination:!0}})}onExpand(e){e?.VariantID&&this.expandedRow.update(i=>i.includes(e.VariantID)?i.filter(t=>t!==e.VariantID):[...i,e.VariantID])}displayExpandedRow(e){return this.expandedRow().includes(e)}static \u0275fac=function(i){return new(i||n)(h(se),h(te),h(U),h(_e),h(ne))};static \u0275cmp=k({type:n,selectors:[["pos-composite-inventory"]],features:[H],decls:21,vars:12,consts:[["pageFilterTemplate",""],["tooltipTitle","Identify and manage unsold inventory that has been stagnant for a long time",3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter","column"],["ngProjectAs","actions",5,["actions"]],[1,"btn","btn-outline-secondary","me-3"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"]],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","VariantName",2,"width","35%"],["mat-sort-header","OnHand",1,"text-right-sort",2,"width","10%"],["mat-sort-header","DirectAllocated",1,"text-right-sort",2,"width","10%"],["mat-sort-header","IndirectAllocated",1,"text-right-sort",2,"width","10%"],["mat-sort-header","Available",1,"text-right-sort",2,"width","10%"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"d-flex","flex-column","gap-4"],["placeholder","Choose Outlets (Leave Blank to Choose All)",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["placeholder","Choose Brand",1,"w-100",3,"ngModelChange","ngModel","multiple","clearable"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center",2,"column-gap","8px"],["type","number","name","QuantityFrom",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"form-control","input-filter",3,"ngModelChange","ngModel"],[1,"text-end"],[1,"d-flex","align-items-center"],[1,"btn","btn-sm","expand-btn"],[3,"routerLink","queryParams"],[1,"btn","btn-sm","expand-btn",3,"click"],[1,"fa","fa-chevron-down",3,"ngClass"],["colspan","100%",2,"padding-left","50px"],[1,"table","border-bottom",2,"width","100%"],[2,"background-color","#f5f5f5"],[1,"text-muted"],[2,"width","55%","color","#3b3b3b"],[2,"color","#3b3b3b"],[2,"text-align","right !important","color","#3b3b3b"],["api","inventory/GetCountInventoryComposite",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(i,t){if(i&1){let m=S();a(0,"mainpanel-cmp",1),v("textChange",function(g){return C(m),f(t.pageData().Filter.SearchText,g)||(t.pageData().Filter.SearchText=g),u(g)}),D("onSubmit",function(){return t.searchFromPageOne()}),v("filterChange",function(g){return C(m),f(t.pageData().Filter,g)||(t.pageData().Filter=g),u(g)}),E(1,2),p(2,we,3,0,"button",3),M(),E(3,4),j(4,be,23,11,"ng-template",null,0,G),M(),E(6,5),a(7,"div",6)(8,"div",7)(9,"table",8),D("matSortChange",function(g){return t.sortData(g)}),a(10,"thead",9)(11,"tr"),p(12,Te,2,1,"th",10),p(13,Pe,2,1,"th",11),p(14,Ve,2,1,"th",12),p(15,Ee,2,1,"th",13),p(16,Me,2,1,"th",14),r()(),a(17,"tbody"),L(18,Qe,8,6,null,null,Q),r()()(),p(20,Ge,2,2,"div"),r(),M(),r()}i&2&&(x("pageData",t.menuData()),y("text",t.pageData().Filter.SearchText),x("isFilterOnDropdown",!1),y("filter",t.pageData().Filter),x("column",t.column),o(2),s(t.roleService.global.Export?2:-1),o(10),s(t.column.VariantName&&t.column.VariantName.selected?12:-1),o(),s(t.column.OnHand&&t.column.OnHand.selected?13:-1),o(),s(t.column.DirectAllocated&&t.column.DirectAllocated.selected?14:-1),o(),s(t.column.IndirectAllocated&&t.column.IndirectAllocated.selected&&t.totalIndirect()>0?15:-1),o(),s(t.column.Available&&t.column.Available.selected?16:-1),o(2),N(t.infiniteList),o(2),s(t.data()?20:-1))},dependencies:[ue,Ce,ye,xe,ee,X,$,Y,Z,de,me,ie,ge,ve,fe,J,q,K,re,oe,ae,Ie,z],styles:["[_nghost-%COMP%]{display:block}.expand-btn[_ngcontent-%COMP%]{border-radius:100px;width:30px;height:30px;transition:all .3s ease;padding:0;transform:rotate(270deg)}.expand-btn[_ngcontent-%COMP%]:hover{background-color:#eaeaea}.expand-btn[_ngcontent-%COMP%]:focus{border:none;outline:none}.expanded-icon[_ngcontent-%COMP%]{transform:rotate(90deg)}[_nghost-%COMP%] .text-right-sort .mat-sort-header-container{display:flex;justify-content:end}th.mat-header-cell[_ngcontent-%COMP%], td.mat-cell[_ngcontent-%COMP%]{text-align:right}"],changeDetection:0})};export{he as a};
1
+ import{a as le}from"./chunk-RFKPCS4S.js";import{a as ge}from"./chunk-LJ3IXMQO.js";import{g as Ie}from"./chunk-F26TML5Q.js";import{b as oe,c as ae,d as re}from"./chunk-KMI7GZJI.js";import{a as fe,b as ve}from"./chunk-EWMMWD7T.js";import{b as xe}from"./chunk-O652RU6G.js";import{a as ye}from"./chunk-75C5S3PQ.js";import{b as pe}from"./chunk-N5GGRFDA.js";import{a as _e}from"./chunk-T7SY746R.js";import{g as Ce,h as ue}from"./chunk-C3BIKM3S.js";import{a as se}from"./chunk-SQ52KMEN.js";import{b as ie}from"./chunk-V25UXFNL.js";import{d as me,e as de}from"./chunk-RBBEZN3D.js";import{c as ce}from"./chunk-R2YNXAPB.js";import{E as ee,c as X,h as Y,o as Z,q as $}from"./chunk-POUQHZWU.js";import{b as ne}from"./chunk-WYAHUX6O.js";import{n as U,q as te}from"./chunk-D3E5UKKJ.js";import{Aa as B,Ab as x,Bb as a,Cb as r,Cc as w,Db as V,Dc as b,Hb as E,Ib as M,Ic as G,Mb as S,Nd as K,Pb as D,Ra as o,Rb as l,Ya as h,ab as k,ec as c,fb as H,fc as F,fd as q,gb as j,gc as _,jc as y,kc as f,la as W,lc as v,pa as C,pd as z,qa as u,sd as J,tb as p,vb as s,vc as A,wb as R,xb as Q,yb as L,za as O,zb as N}from"./chunk-M3O2GJ3M.js";import{a as T,b as P}from"./chunk-KMHZKFQS.js";var Se=n=>({ID:n}),De=n=>({"expanded-icon":n});function we(n,d){if(n&1){let e=S();a(0,"button",15),D("click",function(){C(e);let t=l();return u(t.openExportModal())}),V(1,"i",16),c(2," Export "),r()}}function be(n,d){if(n&1){let e=S();a(0,"div",17)(1,"div")(2,"h6"),c(3,"Outlet"),r(),a(4,"outlet-selector",18),v("ngModelChange",function(t){C(e);let m=l();return f(m.pageData().Filter.OutletID,t)||(m.pageData().Filter.OutletID=t),u(t)}),r()(),a(5,"div")(6,"h6"),c(7,"Category"),r(),a(8,"POS-product-category-select",19),v("selectedCategoryIDChange",function(t){C(e);let m=l();return f(m.pageData().Filter.ProductCategoryID,t)||(m.pageData().Filter.ProductCategoryID=t),u(t)}),r()(),a(9,"h6"),c(10,"Brand"),r(),a(11,"POS-brand-options",20),v("ngModelChange",function(t){C(e);let m=l();return f(m.pageData().Filter.BrandIDs,t)||(m.pageData().Filter.BrandIDs=t),u(t)}),r(),a(12,"div")(13,"h6"),c(14,"Product Tags"),r(),a(15,"ng-select",21),v("ngModelChange",function(t){C(e);let m=l();return f(m.pageData().Filter.ProductTagID,t)||(m.pageData().Filter.ProductTagID=t),u(t)}),r()(),a(16,"div")(17,"h6"),c(18,"Quantity From - To"),r(),a(19,"div",22)(20,"input",23),v("ngModelChange",function(t){C(e);let m=l();return f(m.pageData().Filter.QtyFrom,t)||(m.pageData().Filter.QtyFrom=t),u(t)}),r(),c(21," - "),a(22,"input",24),v("ngModelChange",function(t){C(e);let m=l();return f(m.pageData().Filter.QtyTo,t)||(m.pageData().Filter.QtyTo=t),u(t)}),r()()()()}if(n&2){let e,i=l();o(4),x("accessType",2),y("ngModel",i.pageData().Filter.OutletID),o(4),y("selectedCategoryID",i.pageData().Filter.ProductCategoryID),x("showClear",!0),o(3),y("ngModel",i.pageData().Filter.BrandIDs),x("multiple",!0)("clearable",!0),o(4),x("items",(e=i.pageData().Options)==null?null:e.Tags),y("ngModel",i.pageData().Filter.ProductTagID),o(5),y("ngModel",i.pageData().Filter.QtyFrom),o(2),y("ngModel",i.pageData().Filter.QtyTo)}}function Te(n,d){if(n&1&&(a(0,"th",10),c(1),r()),n&2){let e=l();o(),_(" ",e.column.VariantName.name," ")}}function Pe(n,d){if(n&1&&(a(0,"th",11),c(1),r()),n&2){let e=l();o(),_(" ",e.column.OnHand.name," ")}}function Ve(n,d){if(n&1&&(a(0,"th",12),c(1),r()),n&2){let e=l();o(),_(" ",e.column.DirectAllocated.name," ")}}function Ee(n,d){if(n&1&&(a(0,"th",13),c(1),r()),n&2){let e=l();o(),_(" ",e.column.IndirectAllocated.name," ")}}function Me(n,d){if(n&1&&(a(0,"th",14),c(1),r()),n&2){let e=l();o(),_(" ",e.column.Available.name," ")}}function Fe(n,d){if(n&1){let e=S();a(0,"button",29),D("click",function(){C(e);let t=l(2).$implicit,m=l();return u(m.onExpand(t))}),V(1,"i",30),r()}if(n&2){let e=l(2).$implicit,i=l();o(),x("ngClass",A(1,De,i.displayExpandedRow(e.VariantID)))}}function Ae(n,d){if(n&1&&(a(0,"td")(1,"div",26),p(2,Fe,2,3,"button",27),a(3,"div")(4,"a",28),c(5),r(),V(6,"br"),a(7,"small"),c(8),r()()()()),n&2){let e=l().$implicit;o(2),s(e.ListComponent&&e.ListComponent.length>0?2:-1),o(2),x("routerLink","/menu/Products/Catalog/Variants/Info")("queryParams",A(5,Se,e.VariantID)),o(),_(" ",e.VariantName," "),o(3),_(" ",e.VariantCode," ")}}function Oe(n,d){if(n&1&&(a(0,"td",25),c(1),w(2,"number"),r()),n&2){let e=l().$implicit;o(),F(b(2,1,e.OnHand))}}function Le(n,d){if(n&1&&(a(0,"td",25),c(1),w(2,"number"),r()),n&2){let e=l(2).$implicit;o(),_(" ",b(2,1,e.DirectAllocated)," ")}}function Ne(n,d){if(n&1&&p(0,Le,3,3,"td",25),n&2){let e=l(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function We(n,d){if(n&1&&(a(0,"td",25),c(1),w(2,"number"),r()),n&2){let e=l(2).$implicit;o(),_(" ",b(2,1,e.DirectAllocated)," ")}}function Be(n,d){if(n&1&&p(0,We,3,3,"td",25),n&2){let e=l(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function ke(n,d){if(n&1&&(a(0,"td",25),c(1),w(2,"number"),r()),n&2){let e=l().$implicit;o(),F(b(2,1,e.IndirectAllocated))}}function He(n,d){if(n&1&&(a(0,"td",25),c(1),w(2,"number"),r()),n&2){let e=l().$implicit;o(),F(b(2,1,e.Available))}}function je(n,d){if(n&1&&(a(0,"tbody")(1,"tr")(2,"td")(3,"a",28),c(4),r()(),a(5,"td"),c(6),r(),a(7,"td",25),c(8),r(),a(9,"td",25),c(10),r()()()),n&2){let e=d.$implicit,i=l(2).$implicit;o(3),x("routerLink","/menu/Products/Catalog/Variants/Info")("queryParams",A(6,Se,i.VariantID)),o(),_(" ",e.VariantName," "),o(2),_(" ",e.VariantCode," "),o(2),_(" ",e.Quantity," "),o(2),_(" ",e.OnHand," ")}}function Re(n,d){if(n&1&&(a(0,"tr")(1,"td",31)(2,"div",7)(3,"table",32)(4,"thead",33)(5,"tr",34)(6,"th",35),c(7),r(),a(8,"th",36),c(9,"Code"),r(),a(10,"th",37),c(11," Quantity "),r(),a(12,"th",37),c(13," On Hand "),r()()(),L(14,je,11,8,"tbody",null,R),r()()()()),n&2){let e=l().$implicit;o(7),_(" Components (",e.ListComponent.length,") "),o(7),N(e.ListComponent)}}function Qe(n,d){if(n&1&&(a(0,"tr"),p(1,Ae,9,7,"td"),p(2,Oe,3,3,"td",25),p(3,Ne,1,1)(4,Be,1,1),p(5,ke,3,3,"td",25),p(6,He,3,3,"td",25),r(),p(7,Re,16,1,"tr")),n&2){let e=d.$implicit,i=l();o(),s(i.column.VariantName&&i.column.VariantName.selected?1:-1),o(),s(i.column.OnHand&&i.column.OnHand.selected?2:-1),o(),s(i.totalIndirect()>0?3:4),o(2),s(i.column.IndirectAllocated&&i.column.IndirectAllocated.selected&&i.totalIndirect()>0?5:-1),o(),s(i.column.Available&&i.column.Available.selected?6:-1),o(),s(i.displayExpandedRow(e.VariantID)&&i.column.VariantName&&i.column.VariantName.selected?7:-1)}}function Ge(n,d){if(n&1){let e=S();a(0,"div")(1,"POS-complex-pagination",38),D("jumpToPage",function(){C(e);let t=l();return u(t.getListData())})("previousPage",function(){C(e);let t=l();return u(t.getListData())})("nextPage",function(){C(e);let t=l();return u(t.getListData())}),r()()}if(n&2){let e=l();o(),x("total",e.data().Data.length)("pageData",e.pageData())}}var he=class n extends le{constructor(e,i,t,m,I){super(e,i,"inventory/GetListInventoryComposite","inventoryloader/GetListInventoryComposite",t,void 0,!1);this.httpService=i;this.csvConverter=m;this.roleService=I;B(()=>{let g=this.totalIndirect();g!==null&&g<=0&&(console.log("Indirect allocation is zero or negative"),this.column=P(T({},this.column),{DirectAllocated:P(T({},this.column.DirectAllocated),{name:"Allocated"}),IndirectAllocated:P(T({},this.column.IndirectAllocated),{show:!1})}))})}column={VariantName:{selected:!0,name:"Name",show:!0},OnHand:{selected:!0,name:"On Hand",show:!0},DirectAllocated:{selected:!0,name:"Direct Allocated",show:!0},IndirectAllocated:{selected:!0,name:"Indirect Allocated",show:!0},Available:{selected:!0,name:"Available",show:!0}};totalIndirect=O(null);expandedRow=O([]);dialog=W(ce);afterPostInit(e){console.log("Composite Inventory Data",e);let i=e.Data.reduce((t,m)=>t+m.IndirectAllocated,0);console.log("Total Indirect Allocated:",i),this.totalIndirect.set(i)}sortData(e){let i=[...this.data().Data];if(!e.active||e.direction===""){this.infiniteList=i;return}this.infiniteList=i.sort((t,m)=>{let I=e.direction==="asc";return this.compare(t[e.active],m[e.active],I)})}openExportModal(){this.dialog.open(pe,{data:{title:"Composite Inventory",exportTypes:[{ID:"inventoryExport/GetExportInventoryComposite",Value:"Default",FileName:"Composite Inventory"}],filterExport:this.pageData().Filter,getAllDataLengthAPI:"inventory/GetCountInventoryComposite",pagination:!0}})}onExpand(e){e?.VariantID&&this.expandedRow.update(i=>i.includes(e.VariantID)?i.filter(t=>t!==e.VariantID):[...i,e.VariantID])}displayExpandedRow(e){return this.expandedRow().includes(e)}static \u0275fac=function(i){return new(i||n)(h(se),h(te),h(U),h(_e),h(ne))};static \u0275cmp=k({type:n,selectors:[["pos-composite-inventory"]],features:[H],decls:21,vars:12,consts:[["pageFilterTemplate",""],["tooltipTitle","Identify and manage unsold inventory that has been stagnant for a long time",3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter","column"],["ngProjectAs","actions",5,["actions"]],[1,"btn","btn-outline-secondary","me-3"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"]],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","VariantName",2,"width","35%"],["mat-sort-header","OnHand",1,"text-right-sort",2,"width","10%"],["mat-sort-header","DirectAllocated",1,"text-right-sort",2,"width","10%"],["mat-sort-header","IndirectAllocated",1,"text-right-sort",2,"width","10%"],["mat-sort-header","Available",1,"text-right-sort",2,"width","10%"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"d-flex","flex-column","gap-4"],["placeholder","Choose Outlets (Leave Blank to Choose All)",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["placeholder","Choose Brand",1,"w-100",3,"ngModelChange","ngModel","multiple","clearable"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center",2,"column-gap","8px"],["type","number","name","QuantityFrom",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"form-control","input-filter",3,"ngModelChange","ngModel"],[1,"text-end"],[1,"d-flex","align-items-center"],[1,"btn","btn-sm","expand-btn"],[3,"routerLink","queryParams"],[1,"btn","btn-sm","expand-btn",3,"click"],[1,"fa","fa-chevron-down",3,"ngClass"],["colspan","100%",2,"padding-left","50px"],[1,"table","border-bottom",2,"width","100%"],[2,"background-color","#f5f5f5"],[1,"text-muted"],[2,"width","55%","color","#3b3b3b"],[2,"color","#3b3b3b"],[2,"text-align","right !important","color","#3b3b3b"],["api","inventory/GetCountInventoryComposite",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(i,t){if(i&1){let m=S();a(0,"mainpanel-cmp",1),v("textChange",function(g){return C(m),f(t.pageData().Filter.SearchText,g)||(t.pageData().Filter.SearchText=g),u(g)}),D("onSubmit",function(){return t.searchFromPageOne()}),v("filterChange",function(g){return C(m),f(t.pageData().Filter,g)||(t.pageData().Filter=g),u(g)}),E(1,2),p(2,we,3,0,"button",3),M(),E(3,4),j(4,be,23,11,"ng-template",null,0,G),M(),E(6,5),a(7,"div",6)(8,"div",7)(9,"table",8),D("matSortChange",function(g){return t.sortData(g)}),a(10,"thead",9)(11,"tr"),p(12,Te,2,1,"th",10),p(13,Pe,2,1,"th",11),p(14,Ve,2,1,"th",12),p(15,Ee,2,1,"th",13),p(16,Me,2,1,"th",14),r()(),a(17,"tbody"),L(18,Qe,8,6,null,null,Q),r()()(),p(20,Ge,2,2,"div"),r(),M(),r()}i&2&&(x("pageData",t.menuData()),y("text",t.pageData().Filter.SearchText),x("isFilterOnDropdown",!1),y("filter",t.pageData().Filter),x("column",t.column),o(2),s(t.roleService.global.Export?2:-1),o(10),s(t.column.VariantName&&t.column.VariantName.selected?12:-1),o(),s(t.column.OnHand&&t.column.OnHand.selected?13:-1),o(),s(t.column.DirectAllocated&&t.column.DirectAllocated.selected?14:-1),o(),s(t.column.IndirectAllocated&&t.column.IndirectAllocated.selected&&t.totalIndirect()>0?15:-1),o(),s(t.column.Available&&t.column.Available.selected?16:-1),o(2),N(t.infiniteList),o(2),s(t.data()?20:-1))},dependencies:[ue,Ce,ye,xe,ee,X,$,Y,Z,de,me,ie,ge,ve,fe,J,q,K,re,oe,ae,Ie,z],styles:["[_nghost-%COMP%]{display:block}.expand-btn[_ngcontent-%COMP%]{border-radius:100px;width:30px;height:30px;transition:all .3s ease;padding:0;transform:rotate(270deg)}.expand-btn[_ngcontent-%COMP%]:hover{background-color:#eaeaea}.expand-btn[_ngcontent-%COMP%]:focus{border:none;outline:none}.expanded-icon[_ngcontent-%COMP%]{transform:rotate(90deg)}[_nghost-%COMP%] .text-right-sort .mat-sort-header-container{display:flex;justify-content:end}th.mat-header-cell[_ngcontent-%COMP%], td.mat-cell[_ngcontent-%COMP%]{text-align:right}"],changeDetection:0})};export{he as a};