dealpos 12.2.2 → 12.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/POS/2527.c8c1472e2583d15c.js +1 -0
- package/POS/{4970.4b720eacff390388.js → 4970.4fd0b65a33ec215d.js} +1 -1
- package/POS/500.8a2dabd11040f420.js +1 -0
- package/POS/5453.70fcfbaa7bfcd55b.js +1 -0
- package/POS/5586.6557e4bd206a28bd.js +1 -0
- package/POS/6303.bfcba36635158bb0.js +1 -0
- package/POS/6664.5a6d92ea4c288821.js +1 -0
- package/POS/6840.d0036ec626577639.js +1 -0
- package/POS/{8126.a38cad86f4c81065.js → 8126.2a3f67a7639fa6c8.js} +1 -1
- package/POS/8317.5eadaac9d81f9a5f.js +1 -0
- package/POS/8425.8d3419e0fb226dda.js +1 -0
- package/POS/9042.5c52e1b1c2f26f40.js +1 -0
- package/POS/9612.6a332f69514c0983.js +1 -0
- package/POS/{9757.7255467eb7a81e5f.js → 9757.197c3204c36bdd73.js} +1 -1
- package/POS/{2527.7e671ae42215b675.js → 9841.5c1c03ebf5b7893e.js} +1 -1
- package/POS/index.html +2 -2
- package/POS/{main.5719023b63890082.js → main.434c24ea7d5f6011.js} +1 -1
- package/POS/runtime.7c28f5c91adf7583.js +1 -0
- package/package.json +1 -1
- package/POS/2526.b4ad12c60a108246.js +0 -1
- package/POS/500.0c17a4a814815447.js +0 -1
- package/POS/6303.5724083b307f1ed5.js +0 -1
- package/POS/6551.7ed8f31c22230139.js +0 -1
- package/POS/6664.567ef29551e80239.js +0 -1
- package/POS/6840.123d77eead78424d.js +0 -1
- package/POS/6911.3b1b89c2d61a261c.js +0 -1
- package/POS/8317.f9654b9e65973243.js +0 -1
- package/POS/9498.2b6e42b23bdba39a.js +0 -1
- package/POS/9612.0ffe44a08279c42b.js +0 -1
- package/POS/runtime.f4e420d04496da7f.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[6911],{11627:(G,k,d)=>{d.r(k),d.d(k,{AdjustmentModule:()=>aa});var a=d(81180),l=d(36895),c=d(24006),T=d(88796),P=d(98085),C=d(93669),A=d(30273),D=d(42011),N=d(88441),I=d(9116),x=d(4077),v=d(96700),y=(()=>{return(n=y||(y={}))[n.InProgress=1]="InProgress",n[n.Waiting=2]="Waiting",n[n.Rejected=3]="Rejected",n[n.Accepted=4]="Accepted",y;var n})(),t=d(94650),b=d(89156),h=d(97185),M=d(24424),u=d(51161),g=d(10266);function m(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",19)(1,"button",20),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.reject())}),t._UZ(2,"i",21),t._uU(3,"Reject "),t.qZA(),t.TgZ(4,"button",20),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.accept())}),t._UZ(5,"i",22),t._uU(6,"Accept "),t.qZA()()}}const _=function(){return["/menu/Adjustment/Adjustment/Archive/Form"]},f=function(n){return{ID:n}};function O(n,r){if(1&n&&(t.TgZ(0,"a",23),t._UZ(1,"i",24),t._uU(2,"Edit "),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("routerLink",t.DdM(2,_))("queryParams",t.VKq(3,f,e.data.ID))}}function U(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"button",20),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.delete())}),t._UZ(1,"i",25),t._uU(2,"Delete "),t.qZA()}}function L(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"th"),t._uU(2,"Journal Link"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t.TgZ(5,"td")(6,"a",26),t._uU(7,"View Journal"),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(6),t.MGl("href","https://accounting.dealpos.app/pages/journal-entry;TransID=",e.data.ID,"",t.LSH)}}function te(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",44),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(3);return t.KtG(i.exportCSV(i.csvConverter,"Adjustment/AdjustmentInfoExport","Adjustment#"+i.data.Adjustment.Number+".csv"))}),t._uU(1,"Export"),t.qZA()}}function ee(n,r){1&n&&(t.TgZ(0,"th",45),t._uU(1,"Cost"),t.qZA())}function ne(n,r){1&n&&(t.TgZ(0,"th",45),t._uU(1,"Price"),t.qZA())}function oe(n,r){if(1&n&&(t.ynx(0),t._UZ(1,"p",50),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("innerHTML",e.Note,t.oJD)}}const nt=function(n,r){return{"text-success":n,"text-danger":r}};function ie(n,r){if(1&n&&(t.TgZ(0,"td",51),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.Tol(t.WLB(3,nt,e.Quantity>0,e.Quantity<0)),t.xp6(1),t.Oqu(e.Quantity)}}function ae(n,r){if(1&n&&(t.TgZ(0,"td",51),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.Tol(t.WLB(3,nt,e.Quantity>0,e.Quantity<0)),t.xp6(1),t.Oqu(e.Quantity)}}function re(n,r){if(1&n&&(t.TgZ(0,"td",51),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.Tol(t.WLB(3,nt,e.Counted>0,e.Counted<0)),t.xp6(1),t.Oqu(e.Counted)}}function se(n,r){if(1&n&&(t._UZ(0,"td",52),t.ALo(1,"number")),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",t.lcZ(1,1,e.UnitCost),t.oJD)}}function le(n,r){if(1&n&&(t._UZ(0,"td",52),t.ALo(1,"number")),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",t.lcZ(1,1,e.UnitPrice),t.oJD)}}function ce(n,r){if(1&n&&(t.TgZ(0,"tr"),t._UZ(1,"td",46),t.TgZ(2,"td")(3,"a",47),t._uU(4),t.qZA(),t.TgZ(5,"div"),t._uU(6),t.qZA(),t.YNc(7,oe,2,1,"ng-container",14),t.qZA(),t.YNc(8,ie,2,6,"td",48),t.YNc(9,ae,2,6,"td",48),t.YNc(10,re,2,6,"td",48),t.YNc(11,se,2,3,"td",49),t.YNc(12,le,2,3,"td",49),t.qZA()),2&n){const e=r.$implicit,o=r.index,i=t.oxw(3);t.xp6(1),t.Q6J("innerHTML",o+1+".",t.oJD),t.xp6(2),t.Q6J("queryParams",t.VKq(10,f,e.VariantID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(1),t.Q6J("ngIf",null!=e.Note),t.xp6(1),t.Q6J("ngIf",4==i.data.Adjustment.StateID),t.xp6(1),t.Q6J("ngIf",i.data.Adjustment.StateID<4&&1==i.data.Adjustment.TypeID),t.xp6(1),t.Q6J("ngIf",i.data.Adjustment.StateID<4&&2==i.data.Adjustment.TypeID),t.xp6(1),t.Q6J("ngIf",i.roleService.product.Cost),t.xp6(1),t.Q6J("ngIf",i.roleService.sell.PriceVisible)}}function de(n,r){if(1&n&&(t.TgZ(0,"td",53)(1,"b"),t._uU(2),t.ALo(3,"number"),t.ALo(4,"sum"),t.qZA()()),2&n){const e=t.oxw(3);t.xp6(2),t.Oqu(t.lcZ(3,1,t.xi3(4,3,e.data.DifferencesArray,"TotalCost")))}}function pe(n,r){if(1&n&&(t.TgZ(0,"td",54)(1,"b"),t._uU(2),t.ALo(3,"number"),t.ALo(4,"sum"),t.qZA()()),2&n){const e=t.oxw(3);t.xp6(2),t.Oqu(t.lcZ(3,1,t.xi3(4,3,e.data.DifferencesArray,"TotalPrice")))}}const St=function(){return["/print/Adjustment"]};function ue(n,r){if(1&n&&(t.TgZ(0,"div",9)(1,"div",27)(2,"div")(3,"h2"),t._uU(4),t.qZA()(),t.TgZ(5,"div",28)(6,"a",29),t._UZ(7,"i",30),t._uU(8,"Print "),t.qZA(),t.YNc(9,te,2,0,"a",31),t.qZA()(),t.TgZ(10,"div",12)(11,"div",32)(12,"table",33)(13,"thead",34)(14,"tr")(15,"th",35),t._uU(16,"No"),t.qZA(),t.TgZ(17,"th",36),t._uU(18,"Name"),t.qZA(),t.TgZ(19,"th",37),t._uU(20,"Qty"),t.qZA(),t.YNc(21,ee,2,0,"th",38),t.YNc(22,ne,2,0,"th",38),t.qZA()(),t.TgZ(23,"tbody"),t.YNc(24,ce,13,12,"tr",39),t.qZA(),t.TgZ(25,"tfoot")(26,"tr")(27,"td",40)(28,"b"),t._uU(29,"Total :"),t.qZA()(),t.TgZ(30,"td",41)(31,"b"),t._uU(32),t.ALo(33,"number"),t.ALo(34,"sum"),t.qZA()(),t.YNc(35,de,5,6,"td",42),t.YNc(36,pe,5,6,"td",43),t.qZA()()()()()()),2&n){const e=t.oxw(2);t.xp6(4),t.hij("Adjusted Inventory (",e.data.DifferencesArray.length," SKU)"),t.xp6(2),t.Q6J("routerLink",t.DdM(15,St))("queryParams",t.VKq(16,f,e.id)),t.xp6(3),t.Q6J("ngIf",e.roleService.global.Export&&4==e.data.Adjustment.StateID),t.xp6(12),t.Q6J("ngIf",e.roleService.product.Cost),t.xp6(1),t.Q6J("ngIf",e.roleService.sell.PriceVisible),t.xp6(2),t.Q6J("ngForOf",e.data.DifferencesArray),t.xp6(8),t.Oqu(t.lcZ(33,10,t.xi3(34,12,e.data.DifferencesArray,"Quantity"))),t.xp6(3),t.Q6J("ngIf",e.roleService.product.Cost),t.xp6(1),t.Q6J("ngIf",e.roleService.sell.PriceVisible)}}function me(n,r){if(1&n&&(t.TgZ(0,"h2"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.hij("Counted Inventory (",e.data.CountedArray.length," SKU)")}}function _e(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",44),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(3);return t.KtG(i.exportCSV(i.csvConverter,"Adjustment/AdjustmentCountedExport","Adjustment_Counted#"+i.data.Adjustment.Number+".csv"))}),t._UZ(1,"i",56),t._uU(2,"Export"),t.qZA()}}function he(n,r){if(1&n&&(t.TgZ(0,"tr"),t._UZ(1,"td",46),t.TgZ(2,"td")(3,"a",47),t._uU(4),t.qZA(),t.TgZ(5,"div"),t._uU(6),t.qZA()(),t.TgZ(7,"td",51),t._uU(8),t.qZA(),t.TgZ(9,"td",51),t._uU(10),t.qZA(),t.TgZ(11,"td",51),t._uU(12),t.qZA()()),2&n){const e=r.$implicit,o=r.index;t.xp6(1),t.Q6J("innerHTML",o+1+".",t.oJD),t.xp6(2),t.Q6J("queryParams",t.VKq(9,f,e.VariantID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(e.Counted),t.xp6(2),t.Oqu(e.Actual),t.xp6(1),t.Tol(t.WLB(11,nt,e.Difference>0,e.Difference<0)),t.xp6(1),t.Oqu(e.Difference)}}function ge(n,r){if(1&n&&(t.TgZ(0,"div",9)(1,"div",27)(2,"div"),t.YNc(3,me,2,1,"h2",14),t.qZA(),t.TgZ(4,"div",28)(5,"a",29),t._UZ(6,"i",30),t._uU(7,"Print "),t.qZA(),t.YNc(8,_e,3,0,"a",31),t.qZA()(),t.TgZ(9,"div",12)(10,"div",32)(11,"table",33)(12,"thead",34)(13,"tr")(14,"th",35),t._uU(15,"No"),t.qZA(),t.TgZ(16,"th",36),t._uU(17,"Name"),t.qZA(),t.TgZ(18,"th",55),t._uU(19,"Counted"),t.qZA(),t.TgZ(20,"th",55),t._uU(21,"Actual"),t.qZA(),t.TgZ(22,"th",55),t._uU(23,"Difference"),t.qZA()()(),t.TgZ(24,"tbody"),t.YNc(25,he,13,14,"tr",39),t.qZA()()()()()),2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngIf",e.data.CountedArray.length>0&&2==e.data.Adjustment.TypeID),t.xp6(2),t.Q6J("routerLink",t.DdM(5,St))("queryParams",t.VKq(6,f,e.id)),t.xp6(3),t.Q6J("ngIf",e.roleService.global.Export&&4==e.data.Adjustment.StateID),t.xp6(17),t.Q6J("ngForOf",e.data.CountedArray)}}function fe(n,r){if(1&n&&(t.TgZ(0,"span")(1,"b"),t._uU(2,"Modified:"),t.qZA(),t._uU(3),t.ALo(4,"date"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(3),t.AsE(" ",t.xi3(4,2,e.data.CreatedInfo.Modified.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo.Modified.User," ")}}function xe(n,r){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,m,7,0,"div",2),t.TgZ(3,"div",3),t.YNc(4,O,3,5,"a",4),t.YNc(5,U,3,0,"button",5),t.qZA()(),t.TgZ(6,"content")(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"div",10)(12,"div"),t._UZ(13,"h2",11),t.qZA()(),t.TgZ(14,"div",12)(15,"table",13)(16,"tr")(17,"th"),t._uU(18,"Date"),t.qZA(),t.TgZ(19,"td"),t._uU(20,":"),t.qZA(),t._UZ(21,"td",11),t.qZA(),t.TgZ(22,"tr")(23,"th"),t._uU(24,"PIC"),t.qZA(),t.TgZ(25,"td"),t._uU(26,":"),t.qZA(),t._UZ(27,"td",11),t.qZA(),t.TgZ(28,"tr")(29,"th"),t._uU(30,"Type"),t.qZA(),t.TgZ(31,"td"),t._uU(32,":"),t.qZA(),t._UZ(33,"td",11),t.qZA(),t.TgZ(34,"tr")(35,"th"),t._uU(36,"State"),t.qZA(),t.TgZ(37,"td"),t._uU(38,":"),t.qZA(),t._UZ(39,"td",11),t.qZA(),t.TgZ(40,"tr")(41,"th"),t._uU(42,"Note"),t.qZA(),t.TgZ(43,"td"),t._uU(44,":"),t.qZA(),t._UZ(45,"td",11),t.qZA(),t.YNc(46,L,8,1,"tr",14),t.qZA()()()(),t.TgZ(47,"div",15),t.YNc(48,ue,37,18,"div",16),t.YNc(49,ge,26,8,"div",16),t.qZA()(),t.TgZ(50,"div",17),t._UZ(51,"i",18),t.TgZ(52,"span")(53,"b"),t._uU(54,"Created:"),t.qZA(),t._uU(55),t.ALo(56,"date"),t.qZA(),t.YNc(57,fe,5,5,"span",14),t.qZA()()()()),2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",!e.toggleAccRej),t.xp6(2),t.Q6J("ngIf",e.roleService.adjustment.Edit&&2!=e.data.Adjustment.TypeID&&3!=e.data.Adjustment.StateID),t.xp6(1),t.Q6J("ngIf",e.roleService.adjustment.Delete),t.xp6(8),t.Q6J("innerHTML",e.data.Adjustment.OutletName,t.oJD),t.xp6(8),t.Q6J("innerHTML",e.data.Adjustment.Date,t.oJD),t.xp6(6),t.Q6J("innerHTML",e.data.Adjustment.PIC,t.oJD),t.xp6(6),t.Q6J("innerHTML",e.data.Adjustment.TypeLabel,t.oJD),t.xp6(6),t.Q6J("innerHTML",e.data.Adjustment.StateLabel,t.oJD),t.xp6(6),t.Q6J("innerHTML",e.data.Adjustment.Note,t.oJD),t.xp6(1),t.Q6J("ngIf",e.data.AppsAccoutingActive&&e.roleService.accounting.View),t.xp6(2),t.Q6J("ngIf",e.data.DifferencesArray.length>0),t.xp6(1),t.Q6J("ngIf",(null==e.data.CountedArray?null:e.data.CountedArray.length)>0&&2==e.data.Adjustment.TypeID),t.xp6(6),t.AsE(" ",t.xi3(56,18,e.data.CreatedInfo.Created.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo.Created.User," "),t.xp6(2),t.Q6J("ngIf",e.data.CreatedInfo.Modified.User)}}let ve=(()=>{class n extends x.n{constructor(e,o,i,s,p,S){super(e,"Adjustment/AuditInventoryAdjustmentInfo",null,null,i),(0,a.Z)(this,"toastr",void 0),(0,a.Z)(this,"csvConverter",void 0),(0,a.Z)(this,"router",void 0),(0,a.Z)(this,"roleService",void 0),(0,a.Z)(this,"id",void 0),(0,a.Z)(this,"toggleAccRej",!1),(0,a.Z)(this,"isEditable",!1),this.toastr=o,this.csvConverter=s,this.router=p,this.roleService=S}preGetList(){const e=this.route.snapshot.queryParams;this.id=e.ID,this.pageData.Filter=e}postInit(e){this.menuData.H=e.PageTitle,this.toggleAccRej=!(e.Adjustment.StateID<=2&&this.roleService.adjustment.Approval&&e.Config.WithApproval),(1==this.data.Adjustment.StateID||2==this.data.Adjustment.StateID)&&(this.isEditable=!0)}exportCSV(e,o,i){this.httpService.post(`/api/${o}`,JSON.stringify(this.id)).subscribe(s=>{e.convertToCSV(s,i)})}reject(){confirm("Are you sure you want to reject this?")&&(this.data.Order={ID:this.data.Adjustment.ID,Number:this.data.Adjustment.Number,Date:this.data.Adjustment.Date,PIC:this.data.Adjustment.PIC,Note:this.data.Adjustment.Note,EntityID:this.data.Adjustment.EntityID,TypeID:this.data.Adjustment.TypeID,StateID:y.Rejected},this.httpService.post("/API/Adjustment/RejectCountedItem",JSON.stringify(this.data)).subscribe({next:o=>{this.toastr.success("Success reject adjustment",v.n.Success),this.toggleAccRej=!0,this.isEditable=!1,this.getListData()},error:o=>{this.toastr.error(o,v.n.Error)}}))}accept(){confirm("Are you sure you want to accept this?")&&(this.data.Order={ID:this.data.Adjustment.ID,Number:this.data.Adjustment.Number,Date:this.data.Adjustment.Date,PIC:this.data.Adjustment.PIC,Note:this.data.Adjustment.Note,EntityID:this.data.Adjustment.EntityID,TypeID:this.data.Adjustment.TypeID,StateID:y.Accepted},this.data.Items=[],this.data.DifferencesArray.forEach(o=>{2===this.data.Order.TypeID&&(o.Quantity=o.Counted),this.data.Items.push(o)}),this.httpService.post("/API/Adjustment/AcceptCountedItem",JSON.stringify(this.data)).subscribe({next:o=>{this.toastr.success("Success accept adjustment",v.n.Success),this.toggleAccRej=!0,this.isEditable=!1,this.getListData()},error:o=>{this.toastr.error(o,v.n.Error)}}))}delete(){confirm("Are you sure you want to delete this?")&&this.httpService.post("/api/Adjustment/DeleteInventoryAdjustmentInfo",JSON.stringify(this.data.Adjustment.ID)).subscribe(()=>{this.toastr.success("Success delete record.",v.n.Success),this.router.navigate(["/menu/Adjustment/Adjustment/Archive"])})}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(b.O),t.Y36(h._W),t.Y36(I.gz),t.Y36(M.O),t.Y36(I.F0),t.Y36(u.N))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-adjustment-info"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],["class","btn-group me-5",4,"ngIf"],[1,"btn-group","ms-5"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-sm-3"],[1,"card"],[1,"card-header"],[3,"innerHTML"],[1,"card-body"],[1,"table-sm","table-borderless"],[4,"ngIf"],[1,"col-sm-9"],["class","card",4,"ngIf"],[1,"alert","alert-warning"],["aria-hidden","true",1,"fa-regular","fa-file","me-3"],[1,"btn-group","me-5"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-thumbs-down","me-3"],[1,"fa-solid","fa-thumbs-up","me-3"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-pen-to-square","me-3"],[1,"fa-solid","fa-trash","me-3"],[3,"href"],[1,"card-header","d-flex","justify-content-between"],[1,"btn-group"],["target","_blank",1,"btn","btn-outline-secondary","btn-sm",3,"routerLink","queryParams"],[1,"fa-solid","fa-print","me-3"],["class","btn btn-outline-secondary btn-sm","role","button",3,"click",4,"ngIf"],[1,"table-responsive"],[1,"table"],[1,"thead-light"],[1,"text-center",2,"width","1px"],[2,"width","300px"],[1,"text-end",2,"width","80px"],["class","text-end","style","width: 120px",4,"ngIf"],[4,"ngFor","ngForOf"],["colspan","2",1,"text-end","empty-column"],[1,"text-end","empty-column"],["class","text-end empty-column","matTooltipPosition","above","matTooltip","Total from Quantity x Cost",4,"ngIf"],["class","text-end empty-column","matTooltipPosition","above","matTooltip","Total from Quantity x Price",4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","btn-sm",3,"click"],[1,"text-end",2,"width","120px"],[1,"text-center",3,"innerHTML"],["routerLink","/menu/Products/Catalog/Variants/Info","target","_blank",3,"queryParams"],["class","text-end",3,"class",4,"ngIf"],["class","text-end",3,"innerHTML",4,"ngIf"],[1,"special-TinyMCE","fst-italic","text-warning","mb-0",2,"word-break","break-all",3,"innerHTML"],[1,"text-end"],[1,"text-end",3,"innerHTML"],["matTooltipPosition","above","matTooltip","Total from Quantity x Cost",1,"text-end","empty-column"],["matTooltipPosition","above","matTooltip","Total from Quantity x Price",1,"text-end","empty-column"],[1,"text-end",2,"width","100px"],[1,"fa-solid","fa-upload","me-3"]],template:function(e,o){1&e&&t.YNc(0,xe,58,21,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[l.sg,l.O5,I.rH,A.p,g.gM,l.JJ,l.uU,C.qU]})),n})();var ot=d(17554),j=d(65412),At=d(3077),pt=d(11594),H=d(83902);function Ce(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",31),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.httpPostListID("Adjustment/DeleteInventoryAdjustmentList"))}),t._UZ(1,"i",32),t._uU(2,"Delete "),t.qZA()}}function be(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"button",33),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openExportModal())}),t._UZ(1,"i",34),t._uU(2," Export"),t.qZA()}}const Ze=function(){return["/menu/Adjustment/Adjustment/Archive/Form"]};function Te(n,r){1&n&&(t.TgZ(0,"a",35),t._uU(1,"New"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,Ze))}function Ie(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"th",36)(1,"input",37),t.NdJ("change",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.onSelectAllData(i.target.checked))}),t.qZA()()}}function ye(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"td")(1,"input",43),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw().$implicit;return t.KtG(s.selected=i)}),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.selected)}}function Se(n,r){if(1&n&&(t.TgZ(0,"td",44),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Quantity))}}const Ae=function(n){return{"text-success":n}};function Me(n,r){if(1&n&&(t.TgZ(0,"td",44),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.Tol(t.VKq(5,Ae,e.Quantity>0)),t.xp6(1),t.hij(" +",t.lcZ(2,3,e.Quantity),"")}}const De=function(n){return{"text-danger":n}};function Oe(n,r){if(1&n&&(t.TgZ(0,"td",44),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.Tol(t.VKq(5,De,e.Quantity<0)),t.xp6(1),t.hij(" ",t.lcZ(2,3,e.Quantity),"")}}const we=function(){return["/menu/Adjustment/Adjustment/Archive/Info"]},Pe=function(n){return{ID:n}},ke=function(n,r){return{"text-success":n,"text-danger":r}};function Ne(n,r){if(1&n&&(t.TgZ(0,"tr",38),t.YNc(1,ye,2,1,"td",39),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td")(5,"a",40),t._uU(6),t.qZA()(),t.TgZ(7,"td"),t._uU(8),t.ALo(9,"date"),t.qZA(),t.YNc(10,Se,3,3,"td",41),t.YNc(11,Me,3,7,"td",42),t.YNc(12,Oe,3,7,"td",42),t.TgZ(13,"td"),t._uU(14),t.qZA(),t.TgZ(15,"td"),t._uU(16),t.qZA(),t.TgZ(17,"td"),t._uU(18),t.qZA()()),2&n){const e=r.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngIf",o.roleService.adjustment.Delete),t.xp6(2),t.Oqu(e.EntityName),t.xp6(2),t.Q6J("routerLink",t.DdM(17,we))("queryParams",t.VKq(18,Pe,e.ID)),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.Oqu(t.xi3(9,14,e.Date,"dd MMM yyyy")),t.xp6(2),t.Q6J("ngIf",0==e.Quantity),t.xp6(1),t.Q6J("ngIf",e.Quantity>0),t.xp6(1),t.Q6J("ngIf",e.Quantity<0),t.xp6(2),t.Oqu(e.TypeLabel),t.xp6(1),t.Tol(t.WLB(20,ke,4==e.StateID,3==e.StateID)),t.xp6(1),t.hij(" ",e.StateLabel,""),t.xp6(2),t.Oqu(e.Note)}}function je(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.pageData.Filter.Number=i)})("onSubmit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,Ce,3,0,"a",2),t.YNc(3,be,3,0,"button",3),t.YNc(4,Te,2,2,"a",4),t.qZA(),t.TgZ(5,"filters")(6,"div",5)(7,"div",6)(8,"div")(9,"h6"),t._uU(10,"Outlet"),t.qZA(),t.TgZ(11,"ng-select",7),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.pageData.Filter.EntityID=i)}),t.qZA()(),t.TgZ(12,"div")(13,"h6"),t._uU(14,"From"),t.qZA(),t.TgZ(15,"datepicker",8),t.NdJ("dateChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.pageData.Filter.From=i)}),t.qZA()(),t.TgZ(16,"div")(17,"h6"),t._uU(18,"To"),t.qZA(),t.TgZ(19,"datepicker",9),t.NdJ("dateChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.pageData.Filter.To=i)}),t.qZA()()(),t.TgZ(20,"div",10)(21,"div")(22,"h6"),t._uU(23,"Quantity From - To"),t.qZA(),t.TgZ(24,"div",11)(25,"div",12)(26,"input",13),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.pageData.Filter.QuantityFrom=i)}),t.qZA()(),t.TgZ(27,"div",12)(28,"input",14),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.pageData.Filter.QuantityTo=i)}),t.qZA()()()(),t.TgZ(29,"div")(30,"h6"),t._uU(31,"State"),t.qZA(),t.TgZ(32,"ng-select",15),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.pageData.Filter.State=i)}),t.qZA()(),t.TgZ(33,"div")(34,"h6"),t._uU(35,"Rows"),t.qZA(),t.TgZ(36,"input",16),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.pageData.Filter.RowCount=i)}),t.qZA()(),t.TgZ(37,"div")(38,"h6"),t._uU(39,"Exclude Zero"),t.qZA(),t.TgZ(40,"radio-options",17),t.NdJ("modelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.pageData.Filter.ExcludeZero=i)}),t.qZA()()(),t.TgZ(41,"a",18),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.hideMore=!i.hideMore)}),t._uU(42),t._UZ(43,"i",19),t.qZA()()(),t.TgZ(44,"content")(45,"div",20)(46,"div",21)(47,"table",22)(48,"thead",23)(49,"tr"),t.YNc(50,Ie,2,0,"th",24),t.TgZ(51,"th",25),t._uU(52,"Outlet"),t.qZA(),t.TgZ(53,"th",25),t._uU(54,"Number"),t.qZA(),t.TgZ(55,"th",26),t._uU(56,"Date"),t.qZA(),t.TgZ(57,"th",27),t._uU(58,"Qty"),t.qZA(),t.TgZ(59,"th",28),t._uU(60,"Type"),t.qZA(),t.TgZ(61,"th",26),t._uU(62,"State"),t.qZA(),t.TgZ(63,"th"),t._uU(64,"Note"),t.qZA()()(),t.TgZ(65,"tbody"),t.YNc(66,Ne,19,23,"tr",29),t.qZA()()(),t.TgZ(67,"POS-complex-pagination",30),t.NdJ("jumpToPage",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.getListData())})("previousPage",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.getListData())})("nextPage",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.getListData())}),t.qZA()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("text",e.pageData.Filter.Number),t.xp6(2),t.Q6J("ngIf",e.getSelectedData().length>0),t.xp6(1),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(1),t.Q6J("ngIf",e.roleService.adjustment.Create),t.xp6(7),t.Q6J("items",e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.From),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(1),t.Tol(e.hideMore?"show":""),t.xp6(6),t.Q6J("ngModel",e.pageData.Filter.QuantityFrom),t.xp6(2),t.Q6J("ngModel",e.pageData.Filter.QuantityTo),t.xp6(4),t.Q6J("items",e.pageData.Options.States)("ngModel",e.pageData.Filter.State),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RowCount),t.xp6(4),t.Q6J("model",e.pageData.Filter.ExcludeZero),t.xp6(2),t.Oqu(e.hideMore?"More":"Less"),t.xp6(8),t.Q6J("ngIf",e.roleService.adjustment.Delete),t.xp6(16),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("total",e.data.Data.length)("pageData",e.pageData)}}let Ue=(()=>{class n extends x.n{constructor(e,o,i,s,p){super(e,"Adjustment/GetInventoryAdjustmentList","AdjustmentLoader/GetInventoryAdjustmentList",o),(0,a.Z)(this,"toastr",void 0),(0,a.Z)(this,"csvConverter",void 0),(0,a.Z)(this,"roleService",void 0),(0,a.Z)(this,"matDialog",void 0),(0,a.Z)(this,"hideMore",!1),this.toastr=o,this.csvConverter=i,this.roleService=s,this.matDialog=p}openExportModal(){this.matDialog.open(ot.H,{data:{title:"Inventory Adjustment",exportTypes:[{ID:"AdjustmentExport/GetInventoryAdjustmentList",Value:"Default",FileName:"Inventory Adjustment"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"Adjustment/GetInventoryAdjustmentListCount",pagination:!0}})}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(b.O),t.Y36(h._W),t.Y36(M.O),t.Y36(u.N),t.Y36(j.uw))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-inventory-adjustment"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","text","textChange","onSubmit",4,"ngIf"],[3,"pageData","text","textChange","onSubmit"],["class","btn btn-outline-secondary me-5",3,"click",4,"ngIf"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["class","button btn btn-success",3,"routerLink",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline",3,"isFloatingLabel","date","dateChange"],["placeholder","To","appearance","outline",3,"isFloatingLabel","date","dateChange"],["container","",1,"collapse"],[1,"row","g-0"],[1,"col-6"],["type","text","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["type","text","autoNum","",1,"ms-3","form-control",3,"ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose an State",3,"items","ngModel","ngModelChange"],["type","text",3,"ngModel","ngModelChange"],[3,"model","modelChange"],[1,"more",3,"click"],[1,"fa-solid","fa-caret-down"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],["style","width: 14px;",4,"ngIf"],[2,"width","120px"],[2,"width","100px"],["matTooltipPosition","above","matTooltip","Adjusted Quantity",1,"text-end",2,"width","50px"],[2,"width","180px"],["class","border-bottom",4,"ngFor","ngForOf"],["api","Adjustment/GetInventoryAdjustmentListCount",3,"total","pageData","jumpToPage","previousPage","nextPage"],[1,"btn","btn-outline-secondary","me-5",3,"click"],[1,"fa-solid","fa-trash","me-3"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"button","btn","btn-success",3,"routerLink"],[2,"width","14px"],["type","checkbox",3,"change"],[1,"border-bottom"],[4,"ngIf"],[3,"routerLink","queryParams"],["class","text-end",4,"ngIf"],["class","text-end",3,"class",4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"text-end"]],template:function(e,o){1&e&&t.YNc(0,je,68,24,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[l.sg,l.O5,I.rH,A.p,c.Fj,c.Wl,c.JJ,c.On,P.QB,T.w9,At.v,pt.P,H.b,g.gM,l.JJ,l.uU]})),n})();var ut=d(22863),qe=d(11989),z=d(94768),Z=d(67327),q=d(54850),Y=d(77579),Mt=d(39841),R=d(82722),F=d(39300),$=d(24351),W=d(18505),Dt=d(86751),Ot=d(94601),wt=d(47634),Je=d(31906),X=d(29521),it=d(42046),Ee=d(50494),mt=d(98818),tt=d(54004),Pt=d(61135),at=(()=>{return(n=at||(at={}))[n.ADJUST_DIFFERENCES=1]="ADJUST_DIFFERENCES",n[n.UPDATE_INVENTORY=2]="UPDATE_INVENTORY",at;var n})();class _t{constructor(){(0,a.Z)(this,"CountedItems",void 0),(0,a.Z)(this,"Items",void 0),(0,a.Z)(this,"Order",void 0),(0,a.Z)(this,"OrderItems",void 0),this.Items=[],this.Order=new Fe}}class Fe{constructor(){(0,a.Z)(this,"AdjustedQuantity",void 0),(0,a.Z)(this,"Bin",void 0),(0,a.Z)(this,"Created",void 0),(0,a.Z)(this,"CreatorID",void 0),(0,a.Z)(this,"Date",void 0),(0,a.Z)(this,"EntityID",void 0),(0,a.Z)(this,"EntityName",void 0),(0,a.Z)(this,"ID",void 0),(0,a.Z)(this,"Modified",void 0),(0,a.Z)(this,"ModifierID",void 0),(0,a.Z)(this,"Note",void 0),(0,a.Z)(this,"Number",void 0),(0,a.Z)(this,"PIC",void 0),(0,a.Z)(this,"Quantity",void 0),(0,a.Z)(this,"ReviewDate",void 0),(0,a.Z)(this,"ReviewerID",void 0),(0,a.Z)(this,"StateID",void 0),(0,a.Z)(this,"StateLabel",void 0),(0,a.Z)(this,"TotalPrice",void 0),(0,a.Z)(this,"TypeID",void 0),(0,a.Z)(this,"TypeLabel",void 0),(0,a.Z)(this,"UnitCost",void 0),(0,a.Z)(this,"UnitPrice",void 0),this.ID=Z.gT.GuidEmpty,this.EntityID="",this.StateID=1,this.TypeID=at.ADJUST_DIFFERENCES}}let kt=(()=>{class n{constructor(){(0,a.Z)(this,"_Data",new Pt.X(new _t)),(0,a.Z)(this,"Data$",this._Data.asObservable())}get Data(){return this._Data.value}pushNewValue(e){this._Data.next(e)}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,a.Z)(n,"\u0275prov",t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"})),n})();var ht=d(50),Qe=d(70852);let gt=(()=>{class n{constructor(e,o,i,s){(0,a.Z)(this,"adjustmentDataService",void 0),(0,a.Z)(this,"backEndService",void 0),(0,a.Z)(this,"factoryService",void 0),(0,a.Z)(this,"toastr",void 0),(0,a.Z)(this,"_notifyNewItem",new Y.x),(0,a.Z)(this,"notifyNewItem$",this._notifyNewItem.asObservable()),this.adjustmentDataService=e,this.backEndService=o,this.factoryService=i,this.toastr=s}getItemByCode(e,o){let i;return this.backEndService.getVarianByCode(e,o).pipe((0,tt.U)(s=>{let p=this.patchVariantToItem(s);return i=p.Variant,p.UnitCost=i.UnitCost,p}))}getItemById(e,o){let i;return this.backEndService.getVariantById(e,o).pipe((0,tt.U)(s=>{let p=this.patchVariantToItem(s);return i=p.Variant,p.UnitCost=i.UnitCost,p}))}patchVariantToItem(e){let o=new z.t;return e=this.factoryService.generateVariantObj(e),o.patchByVariant(e),o}updateCartItem(e){const o=this.adjustmentDataService.Data;o.Items=e,this.adjustmentDataService.pushNewValue(o)}addNewItem(e,o){let i=this.checkBehaviourRowItem(e,o);this.updateCartItem(i)}addCartItemByCode(e,o){this.backEndService.getVarianByCode(e,o).subscribe(i=>{this.createNewCartItem(i)})}createNewCartItem(e){let o=new z.t;o.patchByVariant(e),o.UnitPrice=e.UnitPrice,this.addNewItem(o)}removeItem(e){const o=this.adjustmentDataService.Data;o.Items.splice(e.index,1),this.updateCartItem(o.Items)}updateItem(e){const o=this.adjustmentDataService.Data.Items;o[e.index]=e.item,this.updateCartItem(o)}checkBehaviourRowItem(e,o=!1){let i=[];if(o)i=this.adjustmentDataService.Data.Items,this._notifyNewItem.next("NEW"),i.push(e);else{i=null!=this.adjustmentDataService.Data.Items?this.adjustmentDataService.Data.Items:Array();const s=i.findIndex(S=>S.VariantID===e.VariantID),p=e.Quantity;-1===s?(e.Quantity=Z.gT.IsNotEmpty(p)?p:1,this._notifyNewItem.next("NEW"),i.push(e)):Z.gT.IsNotEmpty(p)?i[s].Quantity+=p:i[s].Quantity++}return i}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.LFG(kt),t.LFG(ht.M),t.LFG(Qe.L),t.LFG(h._W))}),(0,a.Z)(n,"\u0275prov",t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"})),n})();var Nt=d(58393),V=d(63165),jt=d(54825),Le=d(34782),Ut=d(29766);function He(n,r){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"ng-select",5),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.serials=i)})("change",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.onSelectSerial(i))}),t.ALo(2,"async"),t.qZA(),t.BQk()}if(2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("items",t.lcZ(2,3,e.serialOptions$))("ngModel",e.serials)("multiple",!0)}}function Re(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",6)(1,"p-chips",7),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.addSerial(i))})("onFocus",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.onFocusAddSerial())})("onBlur",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.onBlurAddSerial())}),t.qZA(),t.TgZ(2,"button",8),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.submitSerial())}),t._UZ(3,"i",9),t.TgZ(4,"strong",10),t._uU(5,"ADD"),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("placeholder","E.g. Serial1 Serial2")("allowDuplicate",!1)("ngModel",e.serials)}}function Ye(n,r){if(1&n&&(t.ynx(0),t.YNc(1,He,3,5,"ng-container",3),t.YNc(2,Re,6,3,"ng-template",null,4,t.W1O),t.BQk()),2&n){const e=t.MAs(3),o=t.oxw();t.xp6(1),t.Q6J("ngIf",o.isSellAdjustment)("ngIfElse",e)}}function Ve(n,r){1&n&&(t.ynx(0),t._UZ(1,"th",18),t.BQk())}function Be(n,r){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"td",20)(2,"i",21),t.NdJ("click",function(){t.CHM(e);const i=t.oxw().index,s=t.oxw(2);return t.KtG(s.onRemoveSerial(i))}),t.qZA()(),t.BQk()}}function Ke(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"tr"),t.YNc(1,Be,3,0,"ng-container",2),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td")(5,"input",19),t.NdJ("ngModelChange",function(i){const p=t.CHM(e).$implicit;return t.KtG(p.Qty=i)})("change",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.serialQtyChange())}),t.qZA()()()}if(2&n){const e=r.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngIf",!o.isDisabled),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Q6J("ngModel",e.Qty)("disabled",o.isDisabled)}}function Ge(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"div",11)(2,"div",1)(3,"div",12)(4,"table",13)(5,"thead",14)(6,"tr"),t.YNc(7,Ve,2,0,"ng-container",2),t.TgZ(8,"th",15),t._uU(9,"Serial"),t.qZA(),t.TgZ(10,"th",16),t._uU(11,"Quantity"),t.qZA()()(),t.TgZ(12,"tbody"),t.YNc(13,Ke,6,4,"tr",17),t.qZA()()()()(),t.BQk()),2&n){const e=t.oxw();t.xp6(7),t.Q6J("ngIf",!e.isDisabled),t.xp6(6),t.Q6J("ngForOf",e.itemSerial)}}const ze=function(n){return{"mb-8":n}};let $e=(()=>{class n{set cartItem(e){e&&(this._cartItem=e,this.itemSerial=e?.Serial?e?.Serial:[],this.isSellAdjustment=e.Quantity<0,this.isSellAdjustment&&this.initSerialOptionsObservable())}get cartItem(){return this._cartItem}constructor(e){(0,a.Z)(this,"httpService",void 0),(0,a.Z)(this,"entityID",void 0),(0,a.Z)(this,"isDisabled",void 0),(0,a.Z)(this,"_cartItem",void 0),(0,a.Z)(this,"cartItemChange",void 0),(0,a.Z)(this,"focusInputSerial",void 0),(0,a.Z)(this,"blurInputSerial",void 0),(0,a.Z)(this,"serials",[]),(0,a.Z)(this,"serialsChange",void 0),(0,a.Z)(this,"itemSerial",[]),(0,a.Z)(this,"isSellAdjustment",!1),(0,a.Z)(this,"serialOptions$",void 0),(0,a.Z)(this,"selectedSerialCode",void 0),this.httpService=e,this.cartItemChange=new t.vpe,this.blurInputSerial=new t.vpe,this.focusInputSerial=new t.vpe,this.serialsChange=new t.vpe}addSerial(e){this.serials=e,this.serialsChange.emit(this.serials)}serialQtyChange(){this.updateCartItem()}onRemoveSerial(e){this.itemSerial.splice(e,1)}onFocusAddSerial(){this.focusInputSerial.emit(!0)}onBlurAddSerial(){this.blurInputSerial.emit(!0)}submitSerial(){this.itemSerial=[...this.itemSerial,...this.generateSerialData()],this.serials=[],this.updateCartItem()}generateSerialData(){return this.serials.filter(i=>-1==this.itemSerial.findIndex(s=>s.Code==i)).map(i=>({Code:i,Qty:this.isSellAdjustment?-1:1}))}onSelectSerial(e){this.itemSerial=e.length>this.itemSerial.length?[...this.itemSerial,...this.generateSerialData()]:this.itemSerial.filter(o=>-1!==e.findIndex(i=>i.Serial==o.Code)),this.updateCartItem()}updateCartItem(){this.cartItem.Serial=this.itemSerial,this.cartItem.Quantity=this.cartItem.calculateSerialQty(),this.cartItem.generateNoteFromSerial(),this.cartItemChange.emit(this.cartItem)}initSerialOptionsObservable(){this.serialOptions$=this.httpService.post(q.W.GetVariantSerial,{entityID:this.entityID,variantID:this.cartItem.VariantID}).pipe((0,Le.d)())}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(b.O))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["app-tab-serial"]],inputs:{entityID:"entityID",isDisabled:["disabled","isDisabled"],cartItem:"cartItem",serials:"serials"},outputs:{cartItemChange:"cartItemChange",focusInputSerial:"onFocus",blurInputSerial:"onBlur",serialsChange:"serialsChange"},decls:4,vars:5,consts:[[1,"row","mt-8",3,"ngClass"],[1,"col-12"],[4,"ngIf"],[4,"ngIf","ngIfElse"],["SELL_BUY",""],["bindLabel","Serial","appendTo","body","bindValue","Serial","placeholder","Select Serial",3,"items","ngModel","multiple","ngModelChange","change"],[1,"input-group","mb-3"],[3,"placeholder","allowDuplicate","ngModel","ngModelChange","onFocus","onBlur"],["type","button",1,"btn","btn-outline-secondary","btn-sm",3,"click"],["aria-hidden","true",1,"fa","fa-plus","me-3"],[1,"headings-font-family","h4","font-weight-bold"],[1,"row"],[1,"table-responsive"],[1,"table","table-bordered"],[1,"thead-light"],[1,"border-end"],[1,"border-end","text-end",2,"width","60px"],[4,"ngFor","ngForOf"],[1,"border-end",2,"width","40px"],["type","text","placeholder","Serial Quantity","autoNum","",1,"form-control","text-end",3,"ngModel","disabled","ngModelChange","change"],[1,"text-center"],["aria-hidden","true","title","Remove serial",1,"fa","fa-xmark","text-danger","cursor-pointer","fa-2x",3,"click"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t.YNc(2,Ye,4,2,"ng-container",2),t.qZA()(),t.YNc(3,Ge,14,2,"ng-container",2)),2&e&&(t.Q6J("ngClass",t.VKq(3,ze,!o.isDisabled)),t.xp6(2),t.Q6J("ngIf",!o.isDisabled),t.xp6(1),t.Q6J("ngIf",o.itemSerial.length>0))},dependencies:[l.mk,l.sg,l.O5,c.Fj,c.JJ,c.On,T.w9,H.b,Ut.cL,l.Ov],styles:["p-chips[_ngcontent-%COMP%] ul.p-inputtext{width:520px;max-width:570px;border:1px solid #C8D3DF;border-top-right-radius:0;border-bottom-right-radius:0}p-chips[_ngcontent-%COMP%] ul.p-inputtext li.p-chips-input-token>input[type=text]{border:none}p-chips[_ngcontent-%COMP%] .p-chips .p-chips-multiple-container:not(.p-disabled):hover{border:1px solid #C8D3DF}p-chips[_ngcontent-%COMP%] .p-chips-multiple-container{display:inline-block}p-chips[_ngcontent-%COMP%] .p-chips-multiple-container .p-chips-token{margin:2px;background:#96bf48}"]})),n})();const ft=function(n){return{selected:n}};function We(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",3),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onTabChange(i.modalItemState.INVENTORY))}),t._uU(1," Product "),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,ft,e.modalItemState.INVENTORY==e.currentStateTab))}}function Xe(n,r){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"a",3),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onTabChange(i.modalItemState.SERIAL))}),t._uU(2," Serial "),t.qZA(),t.BQk()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(1,ft,e.modalItemState.SERIAL==e.currentStateTab))}}function tn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",16)(1,"div",17)(2,"autocompleteV2",18),t.NdJ("onSelect",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.addItem(i))})("keyup.enter",function(i){return i.stopPropagation()})("onInputEnter",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.scanCode(i))}),t.qZA()()()}}function en(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",12)(1,"h5"),t._uU(2,"Cost"),t.qZA(),t.TgZ(3,"input",13),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.item.Cost=i)}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.item.Cost)}}function nn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",8)(1,"div",17)(2,"h5",19),t._uU(3,"Note"),t.qZA(),t.TgZ(4,"POS-tinymce-editor",20),t.NdJ("valueChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.item.Note=i)}),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("value",e.item.Note)}}function on(n,r){if(1&n){const e=t.EpF();t.ynx(0),t.YNc(1,tn,3,0,"div",7),t.TgZ(2,"div")(3,"div",8)(4,"div",9)(5,"h5"),t._uU(6,"Qty"),t.qZA(),t.TgZ(7,"input",10,11),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.item.Quantity=i)}),t.qZA()(),t.TgZ(9,"div",12)(10,"h5"),t._uU(11,"Price"),t.qZA(),t.TgZ(12,"input",13),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.item.Price=i)}),t.qZA()(),t.YNc(13,en,4,1,"div",14),t.qZA(),t.YNc(14,nn,5,1,"div",15),t.qZA(),t.BQk()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",!e.isEdit),t.xp6(6),t.Q6J("ngModel",e.item.Quantity)("disabled",e.isAdjustmentEdit&&e.isItemSerial),t.xp6(5),t.Q6J("ngModel",e.item.Price),t.xp6(1),t.Q6J("ngIf",e.roleService.product.Cost),t.xp6(1),t.Q6J("ngIf",!e.isItemSerial)}}function an(n,r){1&n&&(t.ynx(0),t._UZ(1,"i",33),t.TgZ(2,"h6"),t._uU(3,"No Image"),t.qZA(),t.BQk())}function rn(n,r){if(1&n&&t._UZ(0,"img",34),2&n){const e=t.oxw(2);t.Q6J("src",e.item.Variant.ThumbnailUrl,t.LSH)}}const sn=function(){return["/menu/Products/Catalog/Variants/Info"]},ln=function(n){return{ID:n}};function cn(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"div",16)(2,"div",21)(3,"a",22),t.YNc(4,an,4,0,"ng-container",23),t.YNc(5,rn,1,1,"ng-template",null,24,t.W1O),t.qZA()(),t.TgZ(7,"div",25)(8,"div",26),t._UZ(9,"i",27),t.TgZ(10,"div",28),t._uU(11,"Inventory"),t.qZA()(),t.TgZ(12,"table",29)(13,"tbody")(14,"tr")(15,"td",30),t._uU(16," On Hand "),t.qZA(),t.TgZ(17,"td",31),t._uU(18),t.ALo(19,"number"),t.qZA()(),t.TgZ(20,"tr")(21,"td",32),t._uU(22," Allocated "),t.qZA(),t.TgZ(23,"td",31),t._uU(24),t.ALo(25,"number"),t.qZA()(),t.TgZ(26,"tr")(27,"td",32),t._uU(28,"Available"),t.qZA(),t.TgZ(29,"td",31),t._uU(30),t.ALo(31,"number"),t.qZA()(),t.TgZ(32,"tr")(33,"td",32),t._uU(34,"ROP"),t.qZA(),t.TgZ(35,"td",31),t._uU(36),t.ALo(37,"number"),t.qZA()(),t.TgZ(38,"tr")(39,"td",32),t._uU(40,"Max"),t.qZA(),t.TgZ(41,"td",31)(42,"span"),t._uU(43),t.ALo(44,"number"),t.qZA()()()()()()(),t.BQk()),2&n){const e=t.MAs(6),o=t.oxw();t.xp6(3),t.Q6J("routerLink",t.DdM(19,sn))("queryParams",t.VKq(20,ln,null==o.item||null==o.item.Variant?null:o.item.Variant.ID)),t.xp6(1),t.Q6J("ngIf",null==(null==o.item||null==o.item.Variant?null:o.item.Variant.ThumbnailUrl))("ngIfElse",e),t.xp6(14),t.hij(" ",t.lcZ(19,9,o.onHand)," "),t.xp6(6),t.hij(" ",t.lcZ(25,11,o.allocated)," "),t.xp6(6),t.hij(" ",t.lcZ(31,13,o.onHand-o.allocated)," "),t.xp6(6),t.hij(" ",t.lcZ(37,15,o.rop)," "),t.xp6(7),t.Oqu(t.lcZ(44,17,o.max))}}function dn(n,r){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"app-tab-serial",35),t.NdJ("cartItemChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.item=i)})("onFocus",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onFocusAddSerial())})("onBlur",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onBlurAddSerial())})("serialsChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.serials=i)}),t.qZA(),t.BQk()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("entityID",e.entityID)("cartItem",e.item)("serials",e.serials)("disabled",e.isAdjustmentEdit)}}let pn=(()=>{class n{constructor(e,o,i,s,p,S){(0,a.Z)(this,"httpService",void 0),(0,a.Z)(this,"toastr",void 0),(0,a.Z)(this,"data",void 0),(0,a.Z)(this,"dialogRef",void 0),(0,a.Z)(this,"cartItemService",void 0),(0,a.Z)(this,"roleService",void 0),(0,a.Z)(this,"currentStateTab",void 0),(0,a.Z)(this,"modalItemState",mt.Y),(0,a.Z)(this,"onHand",void 0),(0,a.Z)(this,"allocated",void 0),(0,a.Z)(this,"rop",void 0),(0,a.Z)(this,"max",void 0),(0,a.Z)(this,"extraTitle",void 0),(0,a.Z)(this,"config",void 0),(0,a.Z)(this,"item",void 0),(0,a.Z)(this,"isEdit",!1),(0,a.Z)(this,"toggleInventory",!1),(0,a.Z)(this,"entityID",void 0),(0,a.Z)(this,"separatorKeysCodes",[X.K5,X.OC]),(0,a.Z)(this,"constants",Z.gT),(0,a.Z)(this,"isFocusSerialInput",!1),(0,a.Z)(this,"isItemSerial",!1),(0,a.Z)(this,"serialOptions",void 0),(0,a.Z)(this,"queryInventoryOnOpen",void 0),(0,a.Z)(this,"adjusmentType",void 0),(0,a.Z)(this,"isAdjustmentEdit",!1),(0,a.Z)(this,"serials",[]),this.httpService=e,this.toastr=o,this.data=i,this.dialogRef=s,this.cartItemService=p,this.roleService=S,this.config=new it.O,this.entityID=i.entityID,this.queryInventoryOnOpen=!1,this.currentStateTab=mt.Y.INPUT,this.adjusmentType=i.adjustmentType,this.isAdjustmentEdit=this.data.isAdjustmentEdit,Z.gT.IsNotEmpty(i.itemInfo)?(this.isEdit=!0,this.item=(0,Ee.yE)(z.t,this.data.itemInfo.item),this.roleService.inventory.View&&this.requestUnitInStock(),this.config.title=this.item.Variant.Name,null!=this.item.Variant.Ordered&&(this.extraTitle=` Inventory: ${this.item.Variant.UnitsInStock}, Allocated: ${this.item.Variant.Ordered}`,this.toggleInventory=!0)):(this.item=new z.t,this.config.title="Add Item"),this.config.customWidth="650px"}ngOnInit(){this.isItemSerial=this.checkIsSerial()}onOk(){if(!this.isFocusSerialInput){if(this.generateSerial(),!this.item.checkMatchSerialWithQuantity())return void this.toastr.warning("Serial must be equal with the quantity","Warning!");this.isEdit?this.cartItemService.updateItem({item:this.item,index:this.data.itemInfo.index}):this.cartItemService.addNewItem(this.item,!0),this.dialogRef.close()}}generateSerial(){this.isItemSerial&&(!this.item?.Serial||0==this.item?.Serial?.length)&&(this.item.Quantity=this.serials.length,this.item.Serial=this.serials.map(e=>({Qty:1,Code:e})),this.item=Z.gT.customSerialAsItemNote([this.item])[0])}addItem(e){this.cartItemService.getItemById(e,this.data.entityID).subscribe(o=>{this.item=o,this.config.title=this.item.Variant.Name})}onTabChange(e){this.currentStateTab=e,e==mt.Y.INVENTORY&&!this.queryInventoryOnOpen&&this.requestUnitInStock()}requestUnitInStock(){Z.gT.IsEmpty(this.entityID)?this.toastr.error("Please select outlet before proceeding..",v.n.Error):this.httpService.post("/API/catalog/variant/GetInventoryByVariantID",JSON.stringify({id:this.item.Variant.ID,entityID:this.entityID})).subscribe(o=>{this.queryInventoryOnOpen=!0,this.onHand=o.OnHand,this.allocated=o.Allocated,this.rop=o.ROP,this.max=o.Max})}scanCode(e){this.cartItemService.getItemByCode(e,this.entityID).subscribe(o=>{this.item=o,this.config.title=this.item.Variant.Name,this.toggleInventory=!1})}onFocusAddSerial(){this.isFocusSerialInput=!0}onBlurAddSerial(){this.isFocusSerialInput=!1}checkIsSerial(){return null!=this.item.Variant&&4==this.item.Variant.TypeID}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(b.O),t.Y36(h._W),t.Y36(j.WI),t.Y36(j.so),t.Y36(gt),t.Y36(u.N))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-item"]],decls:13,vars:9,consts:[[3,"config","onOk","onCancel","onClose"],[1,"container","w-100","h-100"],[1,"row","border-bottom"],[1,"btn","btn-link",3,"ngClass","click"],["class","btn btn-link",3,"ngClass","click",4,"ngIf"],[4,"ngIf"],[1,"container-fluid","mt-5"],["class","row",4,"ngIf"],[1,"row","mt-5"],[1,"col-auto"],["type","text","autoNum","",1,"mt-5","form-control",2,"width","100px",3,"ngModel","disabled","ngModelChange"],["qty",""],[1,"col-auto","ps-0"],["type","text","autoNum","",1,"mt-5","form-control",2,"width","100px",3,"ngModel","ngModelChange"],["class","col-auto ps-0",4,"ngIf"],["class","row mt-5",4,"ngIf"],[1,"row"],[1,"col-12"],["placeholder","Search product by name / code","requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"input-left","w-100",3,"onSelect","keyup.enter","onInputEnter"],[1,"mb-5"],["height","220px",3,"value","valueChange"],[1,"col-sm-4","d-flex","justify-content-center","flex-column","align-items-center","text-muted"],["target","_blank",2,"color","inherit",3,"routerLink","queryParams"],[4,"ngIf","ngIfElse"],["SHOW_IMAGE",""],[1,"col-sm-6"],[1,"d-flex"],["aria-hidden","true",1,"fa-archive","fa-solid","fa-1x","pt-3","pe-2"],[2,"font-size","15px","font-family","Roboto Slab"],[1,"table","table-bordered","text-center","inventory-table"],[1,"table-light","text-start",2,"width","100px"],[1,"text-end"],[1,"table-light","text-start"],["aria-hidden","true",1,"fa-solid","fa-image","fa-5x"],[1,"border","rounded",3,"src"],[3,"entityID","cartItem","serials","disabled","cartItemChange","onFocus","onBlur","serialsChange"]],template:function(e,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"div")(5,"a",3),t.NdJ("click",function(){return o.onTabChange(o.modalItemState.INPUT)}),t._uU(6," Cart "),t.qZA(),t.YNc(7,We,2,3,"a",4),t.YNc(8,Xe,3,3,"ng-container",5),t.qZA()()(),t.TgZ(9,"div",6),t.YNc(10,on,15,6,"ng-container",5),t.YNc(11,cn,45,22,"ng-container",5),t.YNc(12,dn,2,4,"ng-container",5),t.qZA()()()),2&e&&(t.Q6J("config",o.config),t.xp6(5),t.Q6J("ngClass",t.VKq(7,ft,o.modalItemState.INPUT==o.currentStateTab)),t.xp6(2),t.Q6J("ngIf",o.roleService.inventory.View&&(null==o.item||null==o.item.Variant?null:o.item.Variant.Name)),t.xp6(1),t.Q6J("ngIf",1==o.adjusmentType&&o.isItemSerial),t.xp6(2),t.Q6J("ngIf",o.modalItemState.INPUT==o.currentStateTab),t.xp6(1),t.Q6J("ngIf",o.modalItemState.INVENTORY==o.currentStateTab),t.xp6(1),t.Q6J("ngIf",o.modalItemState.SERIAL==o.currentStateTab))},dependencies:[l.mk,l.O5,I.rH,c.Fj,c.JJ,c.On,Nt.J,V.M,H.b,jt.V,$e,l.JJ],styles:[".bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px,#f5c6cb 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#28a745,#28a745 15px,#a2dbb0 15px,#a2dbb0 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#FCF3CF,#FCF3CF 15px,#F9E79F 15px,#F9E79F 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}autocompleteV2[_ngcontent-%COMP%] mat-form-field input{padding:10px 15px!important}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:4px solid #07a519}.inventory-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .inventory-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:6px!important}p-chips[_ngcontent-%COMP%] ul.p-inputtext{width:570px;max-width:570px;border:1px solid #C8D3DF}p-chips[_ngcontent-%COMP%] ul.p-inputtext li.p-chips-input-token>input[type=text]{border:none}p-chips[_ngcontent-%COMP%] .p-chips .p-chips-multiple-container:not(.p-disabled):hover{border:1px solid #C8D3DF}p-chips[_ngcontent-%COMP%] .p-chips-multiple-container{display:inline-block}p-chips[_ngcontent-%COMP%] .p-chips-multiple-container .p-chips-token{margin:2px;background:#96bf48}"]})),n})(),un=(()=>{class n{constructor(e,o){(0,a.Z)(this,"data",void 0),(0,a.Z)(this,"dialogRef",void 0),(0,a.Z)(this,"adjustmentData",void 0),(0,a.Z)(this,"config",void 0),this.data=e,this.dialogRef=o,this.config=new it.O,this.config.title="Note",this.adjustmentData=this.data}onOk(e){"Enter"!=e&&this.dialogRef.close()}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(j.WI),t.Y36(j.so))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-note"]],decls:9,vars:3,consts:[[3,"config","onOk","onCancel","onClose"],[1,"container-fluid"],[1,"row"],[1,"col-12"],["type","text","placeholder","PIC",1,"text","w-100",3,"ngModel","ngModelChange"],[1,"row","mt-5"],["placeholder","Notes",2,"width","250px","height","120px",3,"ngModel","ngModelChange"]],template:function(e,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(s){return o.onOk(s)})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"input",4),t.NdJ("ngModelChange",function(s){return o.adjustmentData.Order.PIC=s}),t.qZA()()(),t.TgZ(6,"div",5)(7,"div",3)(8,"textarea",6),t.NdJ("ngModelChange",function(s){return o.adjustmentData.Order.Note=s}),t.qZA()()()()()()),2&e&&(t.Q6J("config",o.config),t.xp6(5),t.Q6J("ngModel",o.adjustmentData.Order.PIC),t.xp6(3),t.Q6J("ngModel",o.adjustmentData.Order.Note))},dependencies:[c.Fj,c.JJ,c.On,V.M]})),n})(),mn=(()=>{class n{constructor(e,o,i){(0,a.Z)(this,"backEndService",void 0),(0,a.Z)(this,"data",void 0),(0,a.Z)(this,"dialogRef",void 0),(0,a.Z)(this,"adjustmentData",void 0),(0,a.Z)(this,"config",void 0),this.backEndService=e,this.data=o,this.dialogRef=i,this.config=new it.O,this.config.title="Adjustment Progress",this.config.hideFooter=!0,this.config.hideOk=!0,this.config.hideCancel=!0,this.adjustmentData=this.data}submit(e){this.adjustmentData.Items.forEach(o=>delete o.UnitPriceOriginal),this.adjustmentData.Order.StateID=e,this.backEndService.submitTransaction(this.adjustmentData,q.W.SubmitAdjustment).subscribe(o=>{this.dialogRef.close(o)})}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(ht.M),t.Y36(j.WI),t.Y36(j.so))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-submit"]],decls:9,vars:1,consts:[[3,"config","onCancel"],[1,"container-fluid",2,"width","500px","display","flex","justify-content","space-around"],[1,"btn","btn-outline-secondary",2,"font-size","18px","width","250px",3,"click"],[1,"fa-solid","fa-file-pen"],[1,"btn","btn-outline-secondary","ms-5",2,"font-size","18px","width","250px",3,"click"],[1,"fa-solid","fa-user-magnifying-glass"]],template:function(e,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return o.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2),t.NdJ("click",function(){return o.submit(1)}),t._UZ(4,"i",3),t._uU(5," Save as Draft "),t.qZA(),t.TgZ(6,"div",4),t.NdJ("click",function(){return o.submit(2)}),t._UZ(7,"i",5),t._uU(8," Submit for Review "),t.qZA()()()()),2&e&&t.Q6J("config",o.config)},dependencies:[V.M]})),n})();var qt=d(23945),_n=d(26128),hn=d(241);function gn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",1)(1,"div",2),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.openOutletModal())}),t._UZ(2,"i",3)(3,"input",4),t.ALo(4,"limitTo"),t.qZA(),t.TgZ(5,"div",5)(6,"datepicker",6),t.NdJ("dateChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.adjustmentData.Order.Date=i)}),t.qZA()(),t.TgZ(7,"div",7),t._UZ(8,"i",8),t.TgZ(9,"input",9),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.adjustmentData.Order.Number=i)}),t.qZA()(),t.TgZ(10,"div",10)(11,"ng-select",11),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.adjustmentData.Order.TypeID=i)}),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("value",t.xi3(4,7,e.outletName,20))("placeholder",e.outletName),t.xp6(3),t.Q6J("date",e.adjustmentData.Order.Date),t.xp6(3),t.Q6J("ngModel",e.adjustmentData.Order.Number),t.xp6(2),t.Q6J("disabled",e.isEdit)("ngModel",e.adjustmentData.Order.TypeID)("items",e.adjustmentTypes)}}let fn=(()=>{class n{constructor(){(0,a.Z)(this,"adjustmentData",void 0),(0,a.Z)(this,"adjustmentTypes",void 0),(0,a.Z)(this,"outletName",void 0),(0,a.Z)(this,"isEdit",void 0),(0,a.Z)(this,"onOpenOutletModal",new t.vpe)}openOutletModal(){this.onOpenOutletModal.emit()}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-toolbar"]],inputs:{adjustmentData:"adjustmentData",adjustmentTypes:"adjustmentTypes",outletName:"outletName",isEdit:"isEdit"},outputs:{onOpenOutletModal:"onOpenOutletModal"},decls:1,vars:1,consts:[["class","row header g-0 py-4 border-bottom",4,"ngIf"],[1,"row","header","g-0","py-4","border-bottom"],[1,"col-auto",3,"click"],["matTooltipPosition","above","matTooltip","Outlet",1,"fa-solid","fa-house"],["readonly","",1,"outlet","cursor",3,"value","placeholder"],[1,"col-auto","me-5","date"],["appearance","fill","name","orderDate",3,"date","dateChange"],[1,"col-auto","me-5"],["aria-hidden","true","matTooltipPosition","above","matTooltip","Order number",1,"fa-regular","fa-file-lines"],["type","text","placeholder","Adjustment Number",1,"number",2,"width","180px",3,"ngModel","ngModelChange"],[1,"col-auto","me-5","d-flex"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",1,"outlet-multiple",2,"width","381px",3,"disabled","ngModel","items","ngModelChange"]],template:function(e,o){1&e&&t.YNc(0,gn,12,10,"div",0),2&e&&t.Q6J("ngIf",o.adjustmentData)},dependencies:[l.O5,c.Fj,c.JJ,c.On,P.QB,T.w9,g.gM,C.OI],styles:[".bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px,#f5c6cb 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#28a745,#28a745 15px,#a2dbb0 15px,#a2dbb0 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#FCF3CF,#FCF3CF 15px,#F9E79F 15px,#F9E79F 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.date[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{top:3px!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-form-field-flex{background-color:#e9ecef!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-form-field-flex input{opacity:1!important;color:#00000061!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] mat-form-field{padding-right:0!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] mat-form-field .mat-mdc-text-field-wrapper{padding-bottom:0;background-color:#fff;padding-left:0}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-flex{width:147px;height:35px;border:1px solid rgb(207,207,207);margin-left:40px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-infix{border:none!important;top:5px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-infix input{font-size:14px;color:#000}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix{padding-top:4px;padding-bottom:4px;padding-left:8px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-icon-suffix{position:relative;left:-140px;top:1px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-icon-suffix .mat-mdc-button-persistent-ripple{color:#000}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-icon-suffix button.mat-mdc-icon-button.mat-mdc-button-base{padding:0}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mdc-line-ripple{display:none}.date[_ngcontent-%COMP%] datepicker.date-warnings[_ngcontent-%COMP%] .mat-mdc-form-field-flex{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px,#f9e79f 30px)!important}.small[_ngcontent-%COMP%]{margin-right:5px!important}.small[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{width:143px}.col-auto[_ngcontent-%COMP%]{font-size:.875rem;height:-moz-fit-content;height:fit-content}.col-auto[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1.25rem;color:#3b3b3b;margin-right:5px;line-height:unset!important;position:relative;top:2px}.col-auto[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .col-auto[_ngcontent-%COMP%] span.outlet[_ngcontent-%COMP%]{padding:4px 8px 3px 5px;border:1px solid #dddddd;font-size:.875rem}.col-auto[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:36px}.col-auto[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled{background-color:#e9ecef!important;opacity:1!important;color:#00000061!important}.col-auto[_ngcontent-%COMP%] .outlet[_ngcontent-%COMP%]{width:165px;color:#337ab7;background:#ffffff}.col-auto[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{width:150px}.col-auto.supplier[_ngcontent-%COMP%] autocompleteV2[_ngcontent-%COMP%] input{font-size:14px}"]})),n})(),xn=(()=>{class n{constructor(){(0,a.Z)(this,"onSubmit",new t.vpe),(0,a.Z)(this,"onOpenVoidModal",new t.vpe),(0,a.Z)(this,"onOpenNoteModal",new t.vpe)}submit(){this.onSubmit.emit()}openVoidModal(){this.onOpenVoidModal.emit()}openNoteModal(){this.onOpenNoteModal.emit()}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-cart-action"]],outputs:{onSubmit:"onSubmit",onOpenVoidModal:"onOpenVoidModal",onOpenNoteModal:"onOpenNoteModal"},decls:10,vars:0,consts:[[1,"mt-5","d-flex","action-button","justify-content-between",2,"padding-left","120px"],[1,"btn","btn-gray","fw-bold","border","text-dark",2,"height","60px","width","120px",3,"click"],[1,"fa-solid","fa-note-sticky"],[1,"btn","btn-gray","fw-bold","border","text-dark","mx-5",2,"height","60px","width","120px",3,"click"],[1,"fa-solid","fa-rectangle-xmark"],[1,"btn","btn-success","d-flex","justify-content-around","align-items-center",2,"height","60px","width","200px",3,"click"],[1,"fw-bold"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"button",1),t.NdJ("click",function(){return o.openNoteModal()}),t._UZ(2,"i",2),t._uU(3," NOTE "),t.qZA(),t.TgZ(4,"button",3),t.NdJ("click",function(){return o.openVoidModal()}),t._UZ(5,"i",4),t._uU(6," VOID "),t.qZA(),t.TgZ(7,"button",5),t.NdJ("click",function(){return o.submit()}),t.TgZ(8,"span",6),t._uU(9,"PROCESS"),t.qZA()()())},styles:[".btn-gray[_ngcontent-%COMP%]{background:linear-gradient(to bottom,#fff 0%,#eee 100%)}.action-button[_ngcontent-%COMP%]{width:550px}"]})),n})();function vn(n,r){if(1&n&&(t.TgZ(0,"div",21)(1,"div",20),t._uU(2),t.qZA(),t.TgZ(3,"div",20),t._uU(4),t.ALo(5,"number"),t.qZA()()),2&n){const e=r.$implicit;t.xp6(2),t.Oqu(e.Variant.Name),t.xp6(2),t.Oqu(t.lcZ(5,2,e.Quantity))}}const Jt=function(n){return{ID:n}},Cn=function(){return["/menu/Adjustment/Adjustment/Archive/Info"]};let bn=(()=>{class n{constructor(){(0,a.Z)(this,"total",void 0),(0,a.Z)(this,"cartItems",void 0),(0,a.Z)(this,"completeInfo",void 0),(0,a.Z)(this,"onUndo",new t.vpe),(0,a.Z)(this,"onNewForm",new t.vpe)}undo(){this.onUndo.emit()}newForm(){this.onNewForm.emit()}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-complete"]],inputs:{total:"total",cartItems:"cartItems",completeInfo:"completeInfo"},outputs:{onUndo:"onUndo",onNewForm:"onNewForm"},decls:31,vars:16,consts:[[1,"row"],[1,"col-8"],[1,"card"],[1,"card-header",2,"padding-bottom","15px"],[1,"fw-normal",2,"font-size","32px"],[1,"fa-solid","fa-check","me-3"],[1,"card-body","border-top"],[1,"row",2,"height","150px"],[1,"col","text-center","my-auto"],[1,"btn","btn-success","w-50",2,"font-size","20px",3,"click"],[1,"card-footer","bg-light-gray","py-3"],["type","button","routerLink","/print/Adjustment","target","_blank",1,"btn","btn-light-gray",3,"queryParams"],[1,"fa-solid","fa-print","me-2"],[1,"col-4"],[1,"card-header","bg-light-gray",2,"padding-bottom","15px","border-bottom","1px solid rgba(0, 0, 0, 0.125)"],[1,"fst-italic"],["target","_blank",3,"routerLink","queryParams"],[1,"card-body"],["class","row justify-content-between mb-5",4,"ngFor","ngForOf"],[1,"row","justify-content-between","border-top",2,"margin-top","15px","padding-top","15px"],[1,"col","text-start"],[1,"row","justify-content-between","mb-5"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h1",4),t._UZ(5,"i",5),t._uU(6,"Inventory Adjustment Complete"),t.qZA()(),t.TgZ(7,"div",6)(8,"div",7)(9,"div",8)(10,"a",9),t.NdJ("click",function(){return o.newForm()}),t._uU(11,"New Adjustment (F8)"),t.qZA()()()(),t.TgZ(12,"div",10)(13,"a",11),t._UZ(14,"i",12),t._uU(15,"Print "),t.qZA()()()(),t.TgZ(16,"div",13)(17,"div",2)(18,"div",14)(19,"h2",15)(20,"a",16),t._uU(21),t.qZA()()(),t.TgZ(22,"div",17),t.YNc(23,vn,6,4,"div",18),t.TgZ(24,"div",19)(25,"div",20),t._uU(26,"Total Quantity:"),t.qZA(),t.TgZ(27,"div",20),t._uU(28),t.ALo(29,"number"),t.ALo(30,"sum"),t.qZA()()()()()()),2&e&&(t.xp6(13),t.Q6J("queryParams",t.VKq(11,Jt,o.completeInfo.OrderID)),t.xp6(7),t.Q6J("routerLink",t.DdM(13,Cn))("queryParams",t.VKq(14,Jt,o.completeInfo.OrderID)),t.xp6(1),t.hij("#",o.completeInfo.InvoiceNumber,""),t.xp6(2),t.Q6J("ngForOf",o.cartItems),t.xp6(5),t.Oqu(t.lcZ(29,6,t.xi3(30,8,o.cartItems,"Quantity"))))},dependencies:[l.sg,I.rH,l.JJ,C.qU]})),n})();var rt=d(41206),B=d(28255),Zn=d(67376);const Tn=["cartContainer"];function In(n,r){1&n&&t._UZ(0,"th",19)}function yn(n,r){1&n&&t._UZ(0,"th",20)}function Sn(n,r){1&n&&(t.TgZ(0,"th",21),t._uU(1,"Cost"),t.qZA())}function An(n,r){1&n&&(t.TgZ(0,"th",22),t._uU(1,"Total"),t.qZA())}function Mn(n,r){if(1&n&&(t.TgZ(0,"td")(1,"small"),t._uU(2),t.qZA()()),2&n){const e=t.oxw().index;t.xp6(2),t.hij("",e+1,".")}}function Dn(n,r){if(1&n&&(t.TgZ(0,"i"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("",e.Variant.CategoryName," ")}}function On(n,r){if(1&n&&(t.ynx(0),t._UZ(1,"span",30),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("innerHTML",e.Note,t.oJD)}}function wn(n,r){if(1&n&&(t.TgZ(0,"td",28),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu("null"!=e.Variant.UOM?e.Variant.UOMName:"")}}function Pn(n,r){if(1&n&&(t.TgZ(0,"td",28),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Cost))}}function kn(n,r){if(1&n&&(t.TgZ(0,"td",28),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Cost*e.Quantity))}}function Nn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"tr",23),t.NdJ("click",function(){const i=t.CHM(e),s=i.$implicit,p=i.index,S=t.oxw();return t.KtG(S.onSelect({item:s,index:p}))})("contextmenu",function(i){const s=t.CHM(e),p=s.$implicit,S=s.index,yt=t.oxw();return t.KtG(yt.onContextMenu(i,p,S))}),t.TgZ(1,"td",24)(2,"i",25),t.NdJ("click",function(){const i=t.CHM(e),s=i.$implicit,p=i.index,S=t.oxw();return t.KtG(S.onRemove({item:s,index:p}))}),t.qZA()(),t.YNc(3,Mn,3,1,"td",26),t.TgZ(4,"td")(5,"span",27),t._uU(6),t.qZA(),t.YNc(7,Dn,2,1,"i",26),t.YNc(8,On,2,1,"ng-container",26),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.qZA(),t.TgZ(11,"td",28),t._uU(12),t.ALo(13,"number"),t.TgZ(14,"span"),t._uU(15),t.qZA()(),t.YNc(16,wn,2,1,"td",29),t.YNc(17,Pn,3,3,"td",29),t.YNc(18,kn,3,3,"td",29),t.qZA()}if(2&n){const e=r.$implicit,o=t.oxw();t.xp6(3),t.Q6J("ngIf",o.appConfig.ModuleSell.Grid.RowNumberVisible),t.xp6(3),t.Oqu(e.Variant.Name),t.xp6(1),t.Q6J("ngIf",o.appConfig.ModuleSell.Grid.CategoryVisible),t.xp6(1),t.Q6J("ngIf",e.Note),t.xp6(2),t.Oqu(e.Variant.Code),t.xp6(2),t.hij(" ",t.lcZ(13,10,e.Quantity),""),t.xp6(3),t.Oqu(e.UnitQuantity>1?"@"+e.UnitQuantity:""),t.xp6(1),t.Q6J("ngIf",o.appConfig.ModuleSell.Grid.UOMVisible),t.xp6(1),t.Q6J("ngIf",o.roleService.product.Cost),t.xp6(1),t.Q6J("ngIf",o.roleService.product.Cost)}}function jn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"button",31),t.NdJ("click",function(){const s=t.CHM(e).item,p=t.oxw();return t.KtG(p.onReverse(s,!0))}),t._uU(1,"Return"),t.qZA(),t.TgZ(2,"button",31),t.NdJ("click",function(){const s=t.CHM(e).item,p=t.oxw();return t.KtG(p.onReverse(s,!1))}),t._uU(3,"Purchase"),t.qZA()}}let Un=(()=>{class n{onContextMenu(e,o,i){e.preventDefault(),this.contextMenuPosition.x=e.clientX+"px",this.contextMenuPosition.y=e.clientY+"px",o.Index=i,this.contextMenu.menuData={item:o},this.contextMenu.openMenu()}onDrop(e){(0,rt.bA)(this.cartItems,e.previousIndex,e.currentIndex),this.cartItemService.updateCartItem(this.cartItems),this.onDragItem.emit(this.cartItems),this.cartItemsChange.emit(this.cartItems)}constructor(e,o,i){(0,a.Z)(this,"loadService",void 0),(0,a.Z)(this,"cartItemService",void 0),(0,a.Z)(this,"roleService",void 0),(0,a.Z)(this,"cartItems",void 0),(0,a.Z)(this,"cartItemsChange",void 0),(0,a.Z)(this,"onSelectItem",void 0),(0,a.Z)(this,"onReturnItem",void 0),(0,a.Z)(this,"onPurchaseItem",void 0),(0,a.Z)(this,"onRemoveItem",void 0),(0,a.Z)(this,"onDragItem",void 0),(0,a.Z)(this,"entities",void 0),(0,a.Z)(this,"cartContainer",void 0),(0,a.Z)(this,"contextMenu",void 0),(0,a.Z)(this,"contextMenuPosition",{x:"0px",y:"0px"}),(0,a.Z)(this,"destroy$",void 0),(0,a.Z)(this,"appConfig",void 0),this.loadService=e,this.cartItemService=o,this.roleService=i,this.cartItems=[],this.destroy$=new Y.x,this.onSelectItem=new t.vpe,this.onReturnItem=new t.vpe,this.onPurchaseItem=new t.vpe,this.onRemoveItem=new t.vpe,this.onDragItem=new t.vpe,this.cartItemsChange=new t.vpe,this.cartItemService.notifyNewItem$.pipe((0,F.h)(s=>Z.gT.IsNotEmpty(s))).subscribe({next:s=>{setTimeout(()=>{this.cartContainer.nativeElement.scrollTop=this.cartContainer.nativeElement.scrollHeight},1)}})}ngOnInit(){this.initAppConfig()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}initAppConfig(){this.appConfig=this.loadService.Data.AppConfigJSON,this.entities=this.loadService.Data.Entities}onRemove(e){this.onRemoveItem.emit(e)}onSelect(e){this.onSelectItem.emit(e)}onReverse(e,o){o?(e.Quantity>0&&(e.Quantity=-1*e.Quantity),this.onReturnItem.emit(e)):(e.Quantity<0&&(e.Quantity=-1*e.Quantity),this.onPurchaseItem.emit(e))}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(qt.O),t.Y36(gt),t.Y36(u.N))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-cart-display"]],viewQuery:function(e,o){if(1&e&&(t.Gf(Tn,5),t.Gf(B.p6,7)),2&e){let i;t.iGM(i=t.CRH())&&(o.cartContainer=i.first),t.iGM(i=t.CRH())&&(o.contextMenu=i.first)}},inputs:{cartItems:"cartItems"},outputs:{cartItemsChange:"cartItemsChange",onSelectItem:"onSelectItem",onReturnItem:"onReturnItem",onPurchaseItem:"onPurchaseItem",onRemoveItem:"onRemoveItem",onDragItem:"onDragItem"},decls:24,vars:10,consts:[[1,"cashier"],[1,"row","g-0","cart-table","border-bottom"],["cdkScrollable","",1,"col"],["cartContainer",""],[1,"table"],[1,"border-start-0"],[2,"width","18px"],["style","width: 36px",4,"ngIf"],[1,"text-start",2,"width","250px"],[2,"cursor","pointer","width","60px"],[1,"text-end",2,"width","50px"],["class","text-end","style","width: 0.75rem",4,"ngIf"],["class","text-end","style","width: 90px;",4,"ngIf"],["class","text-end","style","width: 85px;",4,"ngIf"],["cdkDropList","",1,"itemList",3,"cdkDropListDropped"],["class","item","cdkDrag","",3,"click","contextmenu",4,"ngFor","ngForOf"],[2,"visibility","hidden","position","fixed",3,"matMenuTriggerFor"],["contextMenu","matMenu"],["matMenuContent",""],[2,"width","36px"],[1,"text-end",2,"width","0.75rem"],[1,"text-end",2,"width","90px"],[1,"text-end",2,"width","85px"],["cdkDrag","",1,"item",3,"click","contextmenu"],[1,"cursor"],["aria-hidden","true","matTooltipPosition","above","matTooltip","Click to Remove",1,"fa","fa-xmark","text-danger",3,"click"],[4,"ngIf"],[1,"d-block"],[1,"text-end"],["class","text-end",4,"ngIf"],[3,"innerHTML"],["mat-menu-item","",3,"click"]],template:function(e,o){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2,3)(4,"table",4)(5,"thead")(6,"tr",5),t._UZ(7,"th",6),t.YNc(8,In,1,0,"th",7),t.TgZ(9,"th",8),t._uU(10,"Item"),t.qZA(),t.TgZ(11,"th",9),t._uU(12,"Code"),t.qZA(),t.TgZ(13,"th",10),t._uU(14,"Qty"),t.qZA(),t.YNc(15,yn,1,0,"th",11),t.YNc(16,Sn,2,0,"th",12),t.YNc(17,An,2,0,"th",13),t.qZA()(),t.TgZ(18,"tbody",14),t.NdJ("cdkDropListDropped",function(s){return o.onDrop(s)}),t.YNc(19,Nn,19,12,"tr",15),t.qZA()()()(),t._UZ(20,"div",16),t.TgZ(21,"mat-menu",null,17),t.YNc(23,jn,4,0,"ng-template",18),t.qZA()()),2&e){const i=t.MAs(22);t.xp6(8),t.Q6J("ngIf",o.appConfig.ModuleSell.Grid.RowNumberVisible),t.xp6(7),t.Q6J("ngIf",o.appConfig.ModuleSell.Grid.UOMVisible),t.xp6(1),t.Q6J("ngIf",o.roleService.product.Cost),t.xp6(1),t.Q6J("ngIf",o.roleService.product.Cost),t.xp6(2),t.Q6J("ngForOf",o.cartItems),t.xp6(1),t.Udp("left",o.contextMenuPosition.x)("top",o.contextMenuPosition.y),t.Q6J("matMenuTriggerFor",i)}},dependencies:[l.sg,l.O5,Zn.PQ,B.VK,B.OP,B.KA,B.p6,rt.Wj,rt.Zt,g.gM,l.JJ],styles:[".cashier[_ngcontent-%COMP%]{width:550px;max-width:37rem;min-width:33rem}div.row.cart-table[_ngcontent-%COMP%]{border-left:solid 1px #CFCFCF}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%]{overflow:auto;height:250px}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background:#FBFBF7}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-size:.75rem;padding:9px 5px!important}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:.75rem;padding:6px 5px;border-bottom:1px solid #CFCFCF}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-right:0}.cdk-drag-preview[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.item[_ngcontent-%COMP%]:last-child{border:none}.itemList.cdk-drop-list-dragging[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"]})),n})();const qn=function(){return["/menu/Adjustment/Adjustment/Archive"]};function Jn(n,r){1&n&&(t.TgZ(0,"a",4),t._uU(1,"Cancel"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,qn))}function En(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",11)(1,"POS-cart-header",12),t.NdJ("onCreateItem",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.selectItem())})("onOpenUploadModal",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openUploadModal())})("onAddItem",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.addItem(i))})("onScanCode",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.onScanBarcode(i))}),t.qZA(),t.TgZ(2,"POS-cart-display",13),t.NdJ("onRemoveItem",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.removeItem(i))})("onSelectItem",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.selectItem(i))})("onDragItem",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.saveItemAfterDrag(i))}),t.qZA(),t.TgZ(3,"POS-cart-action",14),t.NdJ("onSubmit",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.submit())})("onOpenVoidModal",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openVoidModal())})("onOpenNoteModal",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openNoteModal())}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("cartItems",e.cartItems)("isUpload",!0),t.xp6(1),t.Q6J("cartItems",e.cartItems)}}function Fn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",5)(1,"POS-toolbar",6),t.NdJ("onOpenOutletModal",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.openOutletModal())}),t.qZA(),t.TgZ(2,"div",7)(3,"div",8),t._UZ(4,"pos-quick-key",9),t.qZA(),t.YNc(5,En,4,3,"div",10),t.qZA()()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("adjustmentData",e.adjustmentData)("adjustmentTypes",e.adjustmentTypes)("outletName",e.outletName)("isEdit",e.isEdit),t.xp6(3),t.Q6J("quickKeyId",e.quickKeyId)("outletID",e.outletID),t.xp6(1),t.Q6J("ngIf",e.adjustmentStorage)}}function Qn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",15)(1,"POS-complete",16),t.NdJ("onUndo",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.undo())})("onNewForm",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.newForm())}),t.qZA()()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("total",e.total)("cartItems",e.cartItems)("completeInfo",e.completeInfo)}}let Ln=(()=>{class n extends ut.M{constructor(e,o,i,s,p,S,yt,ra,sa,la){super(e),(0,a.Z)(this,"adjustmentDataService",void 0),(0,a.Z)(this,"firstLoadService",void 0),(0,a.Z)(this,"matDialog",void 0),(0,a.Z)(this,"backEndService",void 0),(0,a.Z)(this,"quickKeyService",void 0),(0,a.Z)(this,"cartItemService",void 0),(0,a.Z)(this,"toastr",void 0),(0,a.Z)(this,"router",void 0),(0,a.Z)(this,"route",void 0),(0,a.Z)(this,"quickKeyId",void 0),(0,a.Z)(this,"adjustmentData",void 0),(0,a.Z)(this,"adjustmentStorage",void 0),(0,a.Z)(this,"adjustmentTypes",void 0),(0,a.Z)(this,"outletID",Z.gT.GuidEmpty),(0,a.Z)(this,"outletName","Choose an Outlet"),(0,a.Z)(this,"entities",void 0),(0,a.Z)(this,"cartItems",void 0),(0,a.Z)(this,"completeInfo",void 0),(0,a.Z)(this,"isComplete",void 0),(0,a.Z)(this,"total",0),(0,a.Z)(this,"destroy$",void 0),(0,a.Z)(this,"isEdit",void 0),this.adjustmentDataService=o,this.firstLoadService=i,this.matDialog=s,this.backEndService=p,this.quickKeyService=S,this.cartItemService=yt,this.toastr=ra,this.router=sa,this.route=la,this.destroy$=new Y.x,this.adjustmentDataService.Data$.pipe((0,R.R)(this.destroy$)).subscribe(Q=>{this.adjustmentData=Q,this.fillCartItems()}),this.quickKeyService.onSelectQuickeyItem$.pipe((0,R.R)(this.destroy$),(0,F.h)(Q=>Z.gT.IsNotEmpty(Q.id)),(0,$.b)(Q=>this.cartItemService.getItemById(Q.id,Q.entityID))).subscribe(Q=>this.cartItemService.addNewItem(Q))}handleF8(){this.isComplete&&this.newForm()}ngOnInit(){this.initLoadForm()}ngOnDestroy(){this.adjustmentDataService.pushNewValue(new _t),this.quickKeyService.Data=new qe.AM,this.destroy$.next(!0),this.destroy$.complete()}initLoadForm(){this.menuData$.subscribe(()=>{let e=this.adjustmentData.Order.ID;Z.gT.IsEmpty(e)&&Z.gT.IsNotEmpty(this.route.snapshot.queryParams.ID)&&(e=this.route.snapshot.queryParams.ID,this.isEdit=!0),this.firstLoadService.getStorage(q.W.LoadFormAdjustment,e,this.adjustmentData.Order.EntityID).subscribe(i=>{this.fillData(i),Z.gT.IsEmpty(e)&&this.entities.length>1?this.openOutletModal():1==this.entities.length&&(0,Mt.a)([this.backEndService.generateNumber(this.outletID,q.W.AdjustmentGenerateNumber),this.backEndService.getQuickKey(this.outletID,q.W.GetQuickKey)]).subscribe(([s,p])=>{this.adjustmentData.Order.Number=s.Number,this.initQuickKey(p)})})})}fillData(e){if(this.adjustmentStorage=e,this.isEdit&&(this.menuData.H=`Edit Adjustment #${e.Data.Order.Number}`),this.firstLoadService.pageState=Je.U.AdjustmentPage,this.entities=this.adjustmentStorage.Entities,1==this.entities.length&&(this.outletID=this.entities[0].ID,this.outletName=this.entities[0].Name,this.adjustmentData.Order.EntityID=this.outletID),this.adjustmentTypes=this.adjustmentStorage.AdjustmentTypes,this.adjustmentData.Order.TypeID=this.adjustmentStorage.AppConfigJSON.ModuleAdjustment.Advance.AdjustmentInputType,Z.gT.IsEmpty(this.adjustmentData.Order.Date)&&(this.adjustmentData.Order.Date=this.adjustmentStorage.ServerTime.toString()),Z.gT.IsNotEmpty(e.Data)){this.adjustmentDataService.pushNewValue(e.Data),this.outletID=e.Data.Order.EntityID;const o=this.entities.find(i=>i.ID==this.outletID);this.outletName=o.Name,this.quickKeyId=o.QuickKeyTemplateID,this.backEndService.getQuickKey(this.outletID,q.W.GetQuickKey).subscribe(i=>this.initQuickKey(i))}}fillCartItems(){let e;this.cartItems=[],this.adjustmentData.Items.forEach(o=>{e=new z.t,o.Variant.Serial=o.Serial,e.Quantity=o.Quantity,e.patchByVariant(o.Variant),this.cartItems.push(e)})}openOutletModal(){this.isEdit||this.matDialog.open(Dt.X,{data:{Entities:this.entities}}).afterClosed().pipe((0,F.h)(e=>Z.gT.IsNotEmpty(e)),(0,W.b)(e=>{this.outletName=e.outlet.Name,this.outletID=e.outlet.ID,this.quickKeyId=e.outlet.QuickKeyTemplateID,this.adjustmentData.Order.EntityID=this.outletID}),(0,$.b)(()=>(0,Mt.a)([this.backEndService.generateNumber(this.outletID,q.W.AdjustmentGenerateNumber),this.backEndService.getQuickKey(this.outletID,q.W.GetQuickKey)]))).subscribe(([e,o])=>{this.adjustmentData.Order.Number=e.Number,this.initQuickKey(o)})}initQuickKey(e){this.quickKeyService.Data=e,this.quickKeyService.EntityID=this.outletID}saveItemAfterDrag(e){this.cartItemService.updateCartItem(e)}removeItem(e){this.cartItemService.removeItem(e)}selectItem(e){this.matDialog.open(pn,{data:{itemInfo:e,entityID:this.outletID,adjustmentType:this.adjustmentData.Order.TypeID,isAdjustmentEdit:this.isEdit}})}addItem(e){this.cartItemService.getItemById(e,this.outletID).subscribe(o=>this.cartItemService.addNewItem(o))}onScanBarcode(e){this.cartItemService.addCartItemByCode(e,this.outletID)}openUploadModal(){this.matDialog.open(Ot.h).afterClosed().pipe((0,F.h)(e=>Z.gT.IsNotEmpty(e)&&e.length>0)).subscribe(e=>e.forEach(o=>this.cartItemService.addNewItem(o,!0)))}openNoteModal(){this.matDialog.open(un,{data:this.adjustmentData})}openVoidModal(){this.matDialog.open(wt.s).afterClosed().pipe((0,F.h)(e=>e)).subscribe(()=>{const e=this.adjustmentData.Order.Number;this.adjustmentDataService.pushNewValue(new _t),this.adjustmentData.Order.EntityID=this.outletID,this.adjustmentData.Order.Number=e,this.initLoadForm()})}submit(){if(Z.gT.IsEmpty(this.adjustmentData.Order.EntityID))return this.toastr.error("Please select outlet before proceeding..",v.n.Error),void this.openOutletModal();0!=this.cartItems.length?Z.gT.IsEmpty(this.adjustmentData.Order.Number)?this.toastr.error("Number cannot be empty.",v.n.Error):1===this.adjustmentStorage.AppConfigJSON.ModuleAdjustment.Basic.Workflow?(this.adjustmentData.Order.StateID=4,this.adjustmentData.Items.forEach(e=>delete e.UnitPriceOriginal),this.backEndService.submitTransaction(this.adjustmentData,q.W.SubmitAdjustment).subscribe(e=>{this.completeInfo=e,this.isComplete=!0,this.adjustmentData.Order.ID=e.OrderID,this.calculateTotal()})):this.isEdit?(this.adjustmentData.Items.forEach(e=>delete e.UnitPriceOriginal),this.backEndService.submitTransaction(this.adjustmentData,q.W.SubmitAdjustment).subscribe(e=>{this.completeInfo=e,this.isComplete=!0,this.adjustmentData.Order.ID=e.OrderID,this.calculateTotal()})):this.matDialog.open(mn,{data:this.adjustmentData}).afterClosed().pipe((0,F.h)(e=>Z.gT.IsNotEmpty(e))).subscribe(e=>{this.completeInfo=e,this.isComplete=!0,this.adjustmentData.Order.ID=e.OrderID,this.calculateTotal()}):this.toastr.error("You must have at least one item.",v.n.Error)}calculateTotal(){this.cartItems.forEach(e=>this.total+=e.Cost)}undo(){this.isComplete=!1,this.initLoadForm()}newForm(){this.router.navigate(["/menu/Adjustment/Adjustment/Archive/Form"]).then(()=>window.location.reload())}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(b.O),t.Y36(kt),t.Y36(qt.O),t.Y36(j.uw),t.Y36(ht.M),t.Y36(_n.w),t.Y36(gt),t.Y36(h._W),t.Y36(I.F0),t.Y36(I.gz))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-new-inventory-adjustment"]],hostBindings:function(e,o){1&e&&t.NdJ("keydown.F8",function(){return o.handleF8()},!1,t.Jf7)},features:[t.qOj],decls:6,vars:6,consts:[[3,"hideSearchDropdown","hideSearchBox","pageData"],["class","btn btn-outline-secondary",3,"routerLink",4,"ngIf"],["class","container-fluid",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"container-fluid"],[3,"adjustmentData","adjustmentTypes","outletName","isEdit","onOpenOutletModal"],[1,"row","row","body","g-0","mt-4","justify-content-start"],[1,"col-auto","quickKey"],[3,"quickKeyId","outletID"],["class","col-auto cart ms-5",4,"ngIf"],[1,"col-auto","cart","ms-5"],[3,"cartItems","isUpload","onCreateItem","onOpenUploadModal","onAddItem","onScanCode"],[3,"cartItems","onRemoveItem","onSelectItem","onDragItem"],[3,"onSubmit","onOpenVoidModal","onOpenNoteModal"],[1,"container-fluid","mt-5"],[3,"total","cartItems","completeInfo","onUndo","onNewForm"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0)(1,"actions"),t.YNc(2,Jn,2,2,"a",1),t.qZA(),t.TgZ(3,"content"),t.YNc(4,Fn,6,7,"div",2),t.YNc(5,Qn,2,3,"div",3),t.qZA()()),2&e&&(t.Q6J("hideSearchDropdown",!0)("hideSearchBox",!0)("pageData",o.menuData),t.xp6(2),t.Q6J("ngIf",!o.isComplete),t.xp6(2),t.Q6J("ngIf",!o.isComplete),t.xp6(1),t.Q6J("ngIf",o.isComplete))},dependencies:[l.O5,I.rH,A.p,hn.w,D.H,fn,xn,bn,Un]})),n})(),Hn=(()=>{class n{constructor(e){(0,a.Z)(this,"dialogRef",void 0),(0,a.Z)(this,"pageNumber",1),(0,a.Z)(this,"pageSize",100),(0,a.Z)(this,"config",void 0),this.dialogRef=e,this.config=new it.O,this.config.title="Export Adjustment Report",this.config.customWidth="382px"}onOk(){this.dialogRef.close({pageNumber:this.pageNumber,pageSize:this.pageSize})}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(j.so))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-export-report"]],decls:11,vars:3,consts:[[3,"config","onCancel","onClose","onOk"],[1,"container-fluid"],[1,"form-floating-outline"],["type","text","name","pageNumber","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["for","pageNumber"],["type","text","name","pageSize","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["for","pageSize"]],template:function(e,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()})("onOk",function(){return o.onOk()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"input",3),t.NdJ("ngModelChange",function(s){return o.pageNumber=s}),t.qZA(),t.TgZ(5,"label",4),t._uU(6,"Page Number"),t.qZA()(),t.TgZ(7,"div",2)(8,"input",5),t.NdJ("ngModelChange",function(s){return o.pageSize=s}),t.qZA(),t.TgZ(9,"label",6),t._uU(10,"Page Size"),t.qZA()()()()()),2&e&&(t.Q6J("config",o.config),t.xp6(4),t.Q6J("ngModel",o.pageNumber),t.xp6(4),t.Q6J("ngModel",o.pageSize))},dependencies:[c.Fj,c.JJ,c.On,V.M,H.b]})),n})();var Rn=d(11365),Yn=d(75026);let xt=(()=>{class n{constructor(e){(0,a.Z)(this,"http",void 0),(0,a.Z)(this,"currentUntilPage",void 0),(0,a.Z)(this,"toggleFetchTotalData",void 0),(0,a.Z)(this,"totalData",void 0),(0,a.Z)(this,"pageNumber",void 0),(0,a.Z)(this,"isNextBtnDisabled",void 0),(0,a.Z)(this,"isOnLastPage",void 0),this.http=e}calcCurrentUntilPage(e,o,i){this.currentUntilPage=e*(o-1)+i}setPageNumber(e){this.pageNumber=e}setPaginationButtonState(e,o,i){this.isNextBtnDisabled=0==i||!(i<e*o)}setTotalData(e,o,i){this.toggleFetchTotalData=!0,this.http.post(e,o).pipe((0,W.b)(i)).subscribe(s=>this.totalData=s)}setPaginationState(e,o,i){this.calcCurrentUntilPage(e,o,i),this.setPageNumber(o),this.setPaginationButtonState(e,o,i)}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.LFG(b.O))}),(0,a.Z)(n,"\u0275prov",t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"})),n})(),Vn=(()=>{class n{constructor(e,o){(0,a.Z)(this,"state",void 0),(0,a.Z)(this,"filter$",new Pt.X(void 0)),(0,a.Z)(this,"fetchData$",void 0),(0,a.Z)(this,"fetchLoader$",void 0),this.state=o,this.fetchData$=i=>s=>e.post(i,s).pipe((0,tt.U)(p=>p.Data),(0,W.b)(p=>this.state.setPaginationState(s.RowCount,s.PageNumber,p.length))),this.fetchLoader$=i=>()=>e.post(i)}getLoader$(e,o){return e.pipe((0,$.b)(this.fetchLoader$(o)),(0,W.b)(i=>this.filter$.next(i.Filter)))}getInfiniteListData$(e){return this.filter$.pipe((0,F.h)(o=>void 0!==o),(0,$.b)(this.fetchData$(e)),(0,Rn.M)(this.filter$),(0,W.b)(([o,i])=>this.state.setPaginationState(i.RowCount,i.PageNumber,o.length)),(0,Yn.R)((o,i)=>{const[s,p]=o,[S]=i;return 1==p.PageNumber?[S,p]:[s.concat(S),p]}),(0,tt.U)(([o])=>o))}filterFromFirstPage(e){e.PageNumber=1,this.filter$.next(e)}nextPage(e){e.PageNumber+=1,this.filter$.next(e)}fetchTotalData(e,o){this.state.setTotalData(e,o)}fetchAllData(e,o){this.state.setTotalData(e,o,i=>{const s={...o};s.PageNumber=1,s.RowCount=i,this.filter$.next(s)})}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.LFG(b.O),t.LFG(xt))}),(0,a.Z)(n,"\u0275prov",t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"})),n})();function Bn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"span",8),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onFetchTotalData())}),t.TgZ(1,"i",9),t._uU(2,"?"),t.qZA()()}}function Kn(n,r){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(t.lcZ(2,1,e.state.totalData))}}function Gn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",10),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onNextPage())}),t._UZ(1,"i",11),t._uU(2," Next"),t.qZA()}}function zn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",12),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onConcatAllData())}),t._UZ(1,"i",13),t._uU(2," Show All"),t.qZA()}}let $n=(()=>{class n{constructor(e){(0,a.Z)(this,"state",void 0),(0,a.Z)(this,"fetchTotalData",new t.vpe),(0,a.Z)(this,"fetchAllData",new t.vpe),(0,a.Z)(this,"nextPage",new t.vpe),this.state=e}ngOnInit(){}onFetchTotalData(){this.fetchTotalData.emit()}onNextPage(){this.nextPage.emit()}onConcatAllData(){this.fetchAllData.emit()}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(xt))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-infinite-list"]],outputs:{fetchTotalData:"fetchTotalData",fetchAllData:"fetchAllData",nextPage:"nextPage"},decls:11,vars:8,consts:[[1,"d-flex","justify-content-between","mt-5"],[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"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","matTooltipPosition","above","matTooltip","Load next page",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","matTooltipPosition","above","matTooltip","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retrieve rows count",1,"border","p-3"],["role","button","matTooltipPosition","above","matTooltip","Load next page",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],["role","button","matTooltipPosition","above","matTooltip","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-share"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._uU(3),t.ALo(4,"number"),t.YNc(5,Bn,3,0,"span",3),t.YNc(6,Kn,3,3,"span",4),t._uU(7),t.qZA()(),t.TgZ(8,"div",5),t.YNc(9,Gn,3,0,"a",6),t.YNc(10,zn,3,0,"a",7),t.qZA()()),2&e&&(t.xp6(3),t.hij(" Showing 1 - ",t.lcZ(4,6,o.state.currentUntilPage)," of "),t.xp6(2),t.Q6J("ngIf",!o.state.toggleFetchTotalData),t.xp6(1),t.Q6J("ngIf",o.state.toggleFetchTotalData),t.xp6(1),t.hij(" records ~ ",o.state.pageNumber," Page "),t.xp6(2),t.Q6J("ngIf",o.state.isNextBtnDisabled&&!o.state.isOnLastPage),t.xp6(1),t.Q6J("ngIf",o.state.isNextBtnDisabled&&!o.state.isOnLastPage))},dependencies:[l.O5,l.JJ]})),n})(),Wn=(()=>{class n{}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,a.Z)(n,"\u0275mod",t.oAB({type:n})),(0,a.Z)(n,"\u0275inj",t.cJS({imports:[l.ez]})),n})();function Xn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"button",17),t.NdJ("click",function(){t.CHM(e);const i=t.oxw().ngIf,s=t.oxw();return t.KtG(s.openExportModal(i.Filter))}),t._UZ(1,"i",18),t._uU(2," Export"),t.qZA()}}function to(n,r){1&n&&(t.TgZ(0,"th",19),t._uU(1,"@ Cost"),t.qZA())}function eo(n,r){1&n&&(t.TgZ(0,"th",19),t._uU(1,"@ Price"),t.qZA())}function no(n,r){if(1&n&&(t.TgZ(0,"th",33),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.UnitCost),"")}}function oo(n,r){if(1&n&&(t.TgZ(0,"th",33),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.UnitPrice),"")}}function io(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"th",29),t._uU(2),t.qZA(),t.TgZ(3,"th",30),t._uU(4),t.qZA(),t.TgZ(5,"th",31),t._uU(6),t.ALo(7,"number"),t.qZA(),t.YNc(8,no,3,3,"th",32),t.YNc(9,oo,3,3,"th",32),t.qZA()),2&n){const e=r.$implicit,o=t.oxw(3);t.xp6(2),t.hij(" ",e.VariantName,""),t.xp6(2),t.hij(" ",e.VariantCode,""),t.xp6(2),t.Oqu(t.lcZ(7,5,e.Quantity)),t.xp6(2),t.Q6J("ngIf",o.roleService.product.Cost),t.xp6(1),t.Q6J("ngIf",o.roleService.sell.UnitPriceEditor)}}const ao=function(){return["/menu/Adjustment/Adjustment/Archive/Info"]},ro=function(n){return{ID:n}};function so(n,r){if(1&n&&(t.TgZ(0,"div")(1,"div",20)(2,"div",21)(3,"a",22),t._UZ(4,"span",23),t.ALo(5,"date"),t._UZ(6,"small",24),t.ALo(7,"date"),t.TgZ(8,"small",25),t._uU(9),t.qZA()()()(),t.TgZ(10,"div")(11,"strong",26),t._uU(12),t.qZA(),t._UZ(13,"div",27),t.qZA(),t.TgZ(14,"table",28)(15,"tbody"),t.YNc(16,io,10,7,"tr",15),t.qZA()()()),2&n){const e=r.$implicit;t.xp6(3),t.Q6J("routerLink",t.DdM(14,ao))("queryParams",t.VKq(15,ro,e.ID)),t.xp6(1),t.Q6J("innerHTML",e.EntityName+" #"+e.Number+" - "+t.xi3(5,8,e.Created,"dd MMM yyyy"),t.oJD),t.xp6(2),t.Q6J("innerHTML","("+t.xi3(7,11,e.Created,"HH:mm")+")",t.oJD),t.xp6(3),t.hij(" ",e.PIC,""),t.xp6(3),t.hij("[Q:",e.Quantity,"]"),t.xp6(1),t.Q6J("innerHTML",e.Note,t.oJD),t.xp6(3),t.Q6J("ngForOf",e.Items)}}function lo(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(i){const p=t.CHM(e).ngIf;return t.KtG(p.Filter.Number=i)})("onSubmit",function(){const s=t.CHM(e).ngIf,p=t.oxw();return t.KtG(p.search(s.Filter))}),t.TgZ(1,"actions"),t.YNc(2,Xn,3,0,"button",2),t.qZA(),t.TgZ(3,"filters")(4,"div",3)(5,"div",4)(6,"div")(7,"h6"),t._uU(8,"Outlets"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(i){const p=t.CHM(e).ngIf;return t.KtG(p.Filter.EntityID=i)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"From"),t.qZA(),t.TgZ(13,"datepicker",6),t.NdJ("dateChange",function(i){const p=t.CHM(e).ngIf;return t.KtG(p.Filter.From=i)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"To"),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(i){const p=t.CHM(e).ngIf;return t.KtG(p.Filter.To=i)}),t.qZA()()()()(),t.TgZ(18,"content")(19,"div",8)(20,"table",9)(21,"thead",10)(22,"tr")(23,"th",11),t._uU(24,"Name"),t.qZA(),t.TgZ(25,"th",12),t._uU(26,"Code"),t.qZA(),t.TgZ(27,"th",13),t._uU(28,"Qty"),t.qZA(),t.YNc(29,to,2,0,"th",14),t.YNc(30,eo,2,0,"th",14),t.qZA()()(),t.YNc(31,so,17,17,"div",15),t.ALo(32,"async"),t.TgZ(33,"POS-infinite-list",16),t.NdJ("nextPage",function(){const s=t.CHM(e).ngIf,p=t.oxw();return t.KtG(p.nextPage(s.Filter))})("fetchTotalData",function(){const s=t.CHM(e).ngIf,p=t.oxw();return t.KtG(p.fetchTotalData(s.Filter))})("fetchAllData",function(){const s=t.CHM(e).ngIf,p=t.oxw();return t.KtG(p.fetchAllData(s.Filter))}),t.qZA()()()()}if(2&n){const e=r.ngIf,o=t.oxw();t.Q6J("pageData",o.menuData)("text",e.Filter.Number),t.xp6(2),t.Q6J("ngIf",o.roleService.global.Export),t.xp6(7),t.Q6J("items",e.Entities)("ngModel",e.Filter.EntityID),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.Filter.From),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.Filter.To),t.xp6(12),t.Q6J("ngIf",o.roleService.product.Cost),t.xp6(1),t.Q6J("ngIf",o.roleService.sell.UnitPriceEditor),t.xp6(1),t.Q6J("ngForOf",t.lcZ(32,12,o.data$))}}let co=(()=>{class n extends ut.M{constructor(e,o,i,s,p,S){super(e),(0,a.Z)(this,"infPagination",void 0),(0,a.Z)(this,"matDialog",void 0),(0,a.Z)(this,"csvConverter",void 0),(0,a.Z)(this,"roleService",void 0),(0,a.Z)(this,"dataEndpoint","/api/Adjustment/AuditAdjustmentReport"),(0,a.Z)(this,"loaderEndpoint","api/AdjustmentLoader/AuditAdjustmentReport"),(0,a.Z)(this,"countEndpoint","/api/Adjustment/AuditAdjustmentReportCount"),(0,a.Z)(this,"data$",void 0),(0,a.Z)(this,"loader$",void 0),(0,a.Z)(this,"loader",void 0),this.infPagination=o,this.matDialog=s,this.csvConverter=p,this.roleService=S,this.loader$=o.getLoader$(this.menuData$,this.loaderEndpoint),this.data$=o.getInfiniteListData$(this.dataEndpoint)}search(e){this.infPagination.filterFromFirstPage(e)}nextPage(e){this.infPagination.nextPage(e)}fetchTotalData(e){this.infPagination.fetchTotalData(this.countEndpoint,e)}fetchAllData(e){this.infPagination.fetchAllData(this.countEndpoint,e)}onOpenExportDialog(e){this.matDialog.open(Hn).afterClosed().pipe((0,F.h)(o=>Z.gT.IsNotEmpty(o))).subscribe(o=>{e.RowCount=o.pageSize,e.PageNumber=o.pageNumber,this.exportCSV("AdjustmentExport/AuditAdjustmentReport","AdjustmentReport.csv",e)})}exportCSV(e,o,i){this.httpService.post(`/api/${e}`,i).subscribe(s=>{this.csvConverter.convertToCSV(s,o)})}openExportModal(e){this.matDialog.open(ot.H,{data:{title:"Adjustment Report",exportTypes:[{ID:"AdjustmentExport/AuditAdjustmentReport",Value:"Default",FileName:"Adjustment Report"}],filterExport:e,getAllDataLengthAPI:"Adjustment/AuditAdjustmentReportCount",pagination:!0}})}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(b.O),t.Y36(Vn),t.Y36(xt),t.Y36(j.uw),t.Y36(M.O),t.Y36(u.N))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-adjustment-reports"]],features:[t.qOj],decls:2,vars:3,consts:[[3,"pageData","text","textChange","onSubmit",4,"ngIf"],[3,"pageData","text","textChange","onSubmit"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["placeholder","Choose an outlet","bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline",3,"isFloatingLabel","date","dateChange"],["placeholder","To","appearance","outline",3,"isFloatingLabel","date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table","w-100"],[1,"thead-light","sticky-top-thead"],[2,"width","645px"],[1,"text-end",2,"width","60px"],[1,"text-end",2,"width","50px"],["class","text-end","style","width: 80px",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"nextPage","fetchTotalData","fetchAllData"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"text-end",2,"width","80px"],[1,"d-lg-flex","mt-sm-0"],[1,"mt-5","ms-3"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber",3,"innerHTML"],[1,"fst-italic","text-dark",3,"innerHTML"],[1,"fst-italic","text-dark"],[1,"text-danger","ms-3"],[3,"innerHTML"],[1,"table","table-bordered"],[1,"fw-normal",2,"width","645px","word-break","break-all"],[1,"fw-normal","text-end",2,"width","60px","word-break","break-all"],[1,"fw-normal","text-end",2,"width","50px"],["class","fw-normal text-end","style","width: 80px",4,"ngIf"],[1,"fw-normal","text-end",2,"width","80px"]],template:function(e,o){1&e&&(t.YNc(0,lo,34,14,"mainpanel-cmp",0),t.ALo(1,"async")),2&e&&t.Q6J("ngIf",t.lcZ(1,1,o.loader$))},dependencies:[l.sg,l.O5,I.rH,A.p,c.JJ,c.On,P.QB,T.w9,$n,l.Ov,l.JJ,l.uU]})),n})();function po(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"button",24),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.ok())}),t._uU(1,"Upload"),t.qZA()}}function uo(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"button",24),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.confirmAdjustment())}),t._uU(1,"Confirm Adjustment"),t.qZA()}}function mo(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",25)(1,"button",26),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.downloadData())}),t._UZ(2,"i",27),t._uU(3,"Download current inventory "),t.qZA()()}}function _o(n,r){if(1&n&&(t.TgZ(0,"tr",33),t._UZ(1,"td",34)(2,"td",34)(3,"td",35),t.ALo(4,"number"),t._UZ(5,"td",35),t.ALo(6,"number"),t._UZ(7,"td",35),t.ALo(8,"number"),t.qZA()),2&n){const e=r.$implicit;t.Tol(e.QuantityDifferences<0?"danger":"success"),t.xp6(1),t.Q6J("innerHTML",e.Name,t.oJD),t.xp6(1),t.Q6J("innerHTML",e.Code,t.oJD),t.xp6(1),t.Q6J("innerHTML",t.lcZ(4,9,e.Expected),t.oJD),t.xp6(2),t.Q6J("innerHTML",t.lcZ(6,11,e.Counted),t.oJD),t.xp6(2),t.Tol(e.QuantityDifferences<0?"text-danger":"text-success"),t.Q6J("innerHTML",t.lcZ(8,13,e.QuantityDifferences),t.oJD)}}function ho(n,r){if(1&n&&(t.TgZ(0,"table",28)(1,"thead",29)(2,"tr")(3,"th"),t._uU(4,"Name"),t.qZA(),t.TgZ(5,"th",30),t._uU(6,"Code"),t.qZA(),t.TgZ(7,"th",31),t._uU(8,"Expected Stock"),t.qZA(),t.TgZ(9,"th",31),t._uU(10,"Counted Stock\t"),t.qZA(),t.TgZ(11,"th",31),t._uU(12,"Differences\t"),t.qZA()()(),t.TgZ(13,"tbody"),t.YNc(14,_o,9,15,"tr",32),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(14),t.Q6J("ngForOf",e.opNames)}}const go=function(n){return{show:n}};function fo(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,po,2,0,"button",2),t.YNc(3,uo,2,0,"button",2),t.qZA(),t.TgZ(4,"content")(5,"div",3)(6,"div",4)(7,"div",5)(8,"h5",6),t._uU(9,"Outlet"),t.qZA(),t.TgZ(10,"small",7),t._uU(11,"Stock take location"),t.qZA()(),t.TgZ(12,"div",8)(13,"div",9)(14,"div",10)(15,"div")(16,"ng-select",11),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.formData.EntityID=i)})("change",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.getEntityName(i))}),t.qZA()(),t.YNc(17,mo,4,0,"div",12),t.qZA()()()(),t.TgZ(18,"div",4)(19,"div",5)(20,"h5",6),t._uU(21,"Counted Inventory"),t.qZA(),t.TgZ(22,"small",7),t._uU(23,".csv format"),t.qZA()(),t.TgZ(24,"div",8)(25,"div",9)(26,"div",13)(27,"input",14),t.NdJ("change",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.onSelectFile(i.target))}),t.qZA()()()()(),t.TgZ(28,"div",15)(29,"div",5)(30,"h5",6),t._uU(31,"Advanced"),t.qZA(),t.TgZ(32,"small",7),t._uU(33,"More Options"),t.qZA()(),t.TgZ(34,"div",8)(35,"div",9)(36,"div",16)(37,"label",6),t._uU(38,"Product Without Inventory"),t.qZA(),t.TgZ(39,"small",17),t._uU(40,"Download product Without Inventories"),t.qZA(),t.TgZ(41,"div",18)(42,"radio-options",19),t.NdJ("modelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.formData.ProductWithoutInventory=i)}),t.qZA()()()()(),t.YNc(43,ho,15,1,"table",20),t.qZA(),t.TgZ(44,"a",21),t._uU(45,"More Options"),t.qZA(),t.TgZ(46,"div",22)(47,"div",23),t._uU(48,"Tips"),t.qZA(),t.TgZ(49,"ol")(50,"li"),t._uU(51,"Choose your outlet then download the csv spreadsheet"),t.qZA(),t.TgZ(52,"li"),t._uU(53,"Fill the Quantity column beside the Expected column"),t.qZA(),t.TgZ(54,"li"),t._uU(55,"Upload your file using the Green Button on the top right corner"),t.qZA(),t.TgZ(56,"li"),t._uU(57,"Analyze the upload file on your screen and Confirm the Adjustment."),t.qZA(),t.TgZ(58,"li"),t._uU(59,'Inventory Adjustment only works for Product with type "Standard" / product with stock.'),t.qZA(),t.TgZ(60,"li"),t._uU(61,'"Composite" Product is not shown in the CSV you Download.'),t.qZA()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",e.roleService.adjustment.Create&&!e.uploaded),t.xp6(1),t.Q6J("ngIf",e.uploaded),t.xp6(13),t.Q6J("items",e.pageData.Entities)("ngModel",e.formData.EntityID),t.xp6(1),t.Q6J("ngIf",e.roleService.adjustment.Create||e.roleService.adjustment.Edit),t.xp6(11),t.Tol(t.VKq(13,go,e.opNames.length>0)),t.xp6(14),t.Q6J("options",e.productOptions)("model",e.formData.ProductWithoutInventory),t.xp6(1),t.Q6J("ngIf",e.opNames.length>0)}}let xo=(()=>{class n extends x.n{constructor(e,o,i,s,p){super(e,null,"Outlet/GetByUserAccessWrite"),(0,a.Z)(this,"toastr",void 0),(0,a.Z)(this,"csvConverter",void 0),(0,a.Z)(this,"router",void 0),(0,a.Z)(this,"roleService",void 0),(0,a.Z)(this,"formData",void 0),(0,a.Z)(this,"outletName",void 0),(0,a.Z)(this,"flag",void 0),(0,a.Z)(this,"uploaded",!1),(0,a.Z)(this,"opNames",void 0),(0,a.Z)(this,"productOptions",[{Key:"0",Value:"No"},{Key:"1",Value:"Yes"},{Key:"-1",Value:"Exclude Zero"}]),(0,a.Z)(this,"csvResult",void 0),(0,a.Z)(this,"file",void 0),this.toastr=o,this.csvConverter=i,this.router=s,this.roleService=p,this.formData={},this.opNames=[]}preInitList(){this.formData.EntityID=this.pageData.Entities[0].ID,this.outletName=this.pageData.Entities[0].Name,this.formData.ProductWithoutInventory="1"}onSelectFile(e){this.file=e.files[0]}ok(){const e=new FormData;e.append("Data",this.file),e.append("EntityID",this.formData.EntityID),e.append("ProductWithoutInventory",this.formData.ProductWithoutInventory),this.httpService.postFormData("/API/Adjustment/GetPreviewImportCSV",e).subscribe({next:o=>{this.opNames=o,this.uploaded=!0},error:o=>{this.toastr.error(o.error.Message?o.error.Message:o.error,v.n.Error)}})}downloadData(){const e="StockTake_"+this.outletName+"_"+this.getFormatedDate();this.httpService.post("/API/InventoryExport/GetStockTakeSpreadsheet",JSON.stringify(this.formData)).subscribe(o=>this.csvConverter.convertToCSV(o,e))}getEntityName(e){this.outletName=e.Name}getFormatedDate(){const e=new Date;return(e.getDate()<10?"0":"")+e.getDate()+(e.getMonth()+1<10?"0":"")+(e.getMonth()+1)+e.getFullYear().toString().substr(-2)}confirmAdjustment(){let e=[];if(this.opNames.forEach(s=>{e.push({VariantID:s.ID,Quantity:s.QuantityDifferences,Cost:s.UnitCost,Price:s.UnitPrice})}),e.length<1)return alert("You must atleast have one item to adjust!"),!1;let o=new Date;null!=this.formData.InventoryDate&&(o=new Date(this.formData.InventoryDate)),this.httpService.post("/API/Adjustment/SubmitUseDefault",{Order:{EntityID:this.formData.EntityID,Date:o},Items:e,TypeID:1}).subscribe({next:s=>{this.router.navigate(["/menu/Adjustment/Adjustment/Archive/Info"],{queryParams:{ID:s.OrderID}}).then(()=>window.location.reload())},error:s=>{this.toastr.error(s,v.n.Error)}})}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(b.O),t.Y36(h._W),t.Y36(M.O),t.Y36(I.F0),t.Y36(u.N))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-csv-stock-take"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"row","border-bottom","mt-10","ms-2"],[1,"col-md-2"],[1,"fw-bold"],[1,"h6","fst-italic"],[1,"col-md-10"],[1,"row"],[1,"col-md-12","mb-10",2,"display","flex"],["bindLabel","Name","bindValue","ID",2,"width","200px",3,"items","ngModel","ngModelChange","change"],["class","ms-5",4,"ngIf"],["id","import-section",1,"col-md-6","mb-10"],["accept",".csv","id","csv","type","file","name","myfile",1,"form-control",3,"change"],[1,"row","extra-options","border-bottom","mt-10","ms-2","collapse"],[1,"col-md-5"],[1,"ms-3","h6","fst-italic"],[1,"form-floating-outline","radio","border","rounded",2,"padding-top","14px"],["name","productInventory",3,"options","model","modelChange"],["class","table table-bordered mt-3",4,"ngIf"],["data-bs-toggle","collapse","data-bs-target",".extra-options","aria-expanded","true",1,"more","ms-2"],[1,"border","mt-5","ms-2"],[1,"fst-italic","text-primary","fw-bold","h5","ms-12","mt-3"],[1,"btn","btn-success",3,"click"],[1,"ms-5"],[1,"btn","btn-outline-secondary",2,"height","37px !important","font-size","13px !important",3,"click"],[1,"fa","fa-download","me-3"],[1,"table","table-bordered","mt-3"],[1,"thead-light","sticky-top-thead"],[2,"width","150px"],[1,"text-end",2,"width","120px"],["class","red",3,"class",4,"ngFor","ngForOf"],[1,"red"],[3,"innerHTML"],[1,"text-end",3,"innerHTML"]],template:function(e,o){1&e&&t.YNc(0,fo,62,15,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.pageData)},dependencies:[l.sg,l.O5,A.p,c.JJ,c.On,T.w9,pt.P,l.JJ],styles:[".col-md-5[_ngcontent-%COMP%]{font-size:.875rem;height:-moz-fit-content;height:fit-content}.col-md-5.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-infix input{font-size:14px;padding-bottom:3px}"]})),n})();var vo=d(54147);class Co extends ut.M{constructor(r){super(r),(0,a.Z)(this,"loaderData",void 0),(0,a.Z)(this,"products",void 0),(0,a.Z)(this,"originalProducts",void 0),(0,a.Z)(this,"adjustmentID",void 0),(0,a.Z)(this,"completeInfo",void 0),(0,a.Z)(this,"error",void 0),(0,a.Z)(this,"loaderApi",void 0),(0,a.Z)(this,"productsApi",void 0),(0,a.Z)(this,"submitApi",void 0),(0,a.Z)(this,"requestPayload",void 0),this.loaderApi="/API/AdjustmentLoader/StockTakeByCSV",this.productsApi="/API/Adjustment/GetSpreadsheet",this.submitApi="/API/Adjustment/SubmitUseDefault",this.requestPayload=3,this.products=this.originalProducts=[],this.getDataFromLoader()}getDataFromLoader(){this.menuData$.pipe((0,$.b)(()=>this.httpService.post(this.loaderApi,JSON.stringify(this.requestPayload)))).subscribe(r=>this.loaderData=r)}getProduct(r){this.products=[],this.httpService.post(this.productsApi,JSON.stringify(r)).subscribe(e=>{e.forEach(o=>{o.Counted="",this.products.push(o),this.originalProducts.push(o)})})}submitAdjustment(r){this.httpService.post(this.submitApi,JSON.stringify(r)).subscribe({next:e=>{this.adjustmentID=e.OrderID,this.completeInfo=e,this.error=null,this.onSubmitSuccess()},error:e=>{this.error=e}})}onSubmitSuccess(){}}var vt=d(84080),Et=d(12693),Ct=d(40445),K=d(21281),bo=d(83353),Zo=d(39646),st=d(68675);function To(n,r){1&n&&t.Hsn(0)}const Io=["*"];let Ft=(()=>{class n{constructor(e){this._elementRef=e}focus(){this._elementRef.nativeElement.focus()}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(t.SBq))},n.\u0275dir=t.lG2({type:n,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"]}),n})(),Qt=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(t.Rgc))},n.\u0275dir=t.lG2({type:n,selectors:[["","cdkStepLabel",""]]}),n})(),yo=0;const Lt=new t.OlP("STEPPER_GLOBAL_OPTIONS");let bt=(()=>{class n{get editable(){return this._editable}set editable(e){this._editable=(0,K.Ig)(e)}get optional(){return this._optional}set optional(e){this._optional=(0,K.Ig)(e)}get completed(){return null==this._completedOverride?this._getDefaultCompleted():this._completedOverride}set completed(e){this._completedOverride=(0,K.Ig)(e)}_getDefaultCompleted(){return this.stepControl?this.stepControl.valid&&this.interacted:this.interacted}get hasError(){return null==this._customError?this._getDefaultError():this._customError}set hasError(e){this._customError=(0,K.Ig)(e)}_getDefaultError(){return this.stepControl&&this.stepControl.invalid&&this.interacted}constructor(e,o){this._stepper=e,this.interacted=!1,this.interactedStream=new t.vpe,this._editable=!0,this._optional=!1,this._completedOverride=null,this._customError=null,this._stepperOptions=o||{},this._displayDefaultIndicatorType=!1!==this._stepperOptions.displayDefaultIndicatorType}select(){this._stepper.selected=this}reset(){this.interacted=!1,null!=this._completedOverride&&(this._completedOverride=!1),null!=this._customError&&(this._customError=!1),this.stepControl&&this.stepControl.reset()}ngOnChanges(){this._stepper._stateChanged()}_markAsInteracted(){this.interacted||(this.interacted=!0,this.interactedStream.emit(this))}_showError(){return this._stepperOptions.showError??null!=this._customError}}return n.\u0275fac=function(e){return new(e||n)(t.Y36((0,t.Gpc)(()=>et)),t.Y36(Lt,8))},n.\u0275cmp=t.Xpm({type:n,selectors:[["cdk-step"]],contentQueries:function(e,o,i){if(1&e&&t.Suo(i,Qt,5),2&e){let s;t.iGM(s=t.CRH())&&(o.stepLabel=s.first)}},viewQuery:function(e,o){if(1&e&&t.Gf(t.Rgc,7),2&e){let i;t.iGM(i=t.CRH())&&(o.content=i.first)}},inputs:{stepControl:"stepControl",label:"label",errorMessage:"errorMessage",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],state:"state",editable:"editable",optional:"optional",completed:"completed",hasError:"hasError"},outputs:{interactedStream:"interacted"},exportAs:["cdkStep"],features:[t.TTD],ngContentSelectors:Io,decls:1,vars:0,template:function(e,o){1&e&&(t.F$t(),t.YNc(0,To,1,0,"ng-template"))},encapsulation:2,changeDetection:0}),n})(),et=(()=>{class n{get linear(){return this._linear}set linear(e){this._linear=(0,K.Ig)(e)}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){const o=(0,K.su)(e);this.steps&&this._steps?(this._isValidIndex(o),this.selected?._markAsInteracted(),this._selectedIndex!==o&&!this._anyControlsInvalidOrPending(o)&&(o>=this._selectedIndex||this.steps.toArray()[o].editable)&&this._updateSelectedItemIndex(o)):this._selectedIndex=o}get selected(){return this.steps?this.steps.toArray()[this.selectedIndex]:void 0}set selected(e){this.selectedIndex=e&&this.steps?this.steps.toArray().indexOf(e):-1}get orientation(){return this._orientation}set orientation(e){this._orientation=e,this._keyManager&&this._keyManager.withVerticalOrientation("vertical"===e)}constructor(e,o,i){this._dir=e,this._changeDetectorRef=o,this._elementRef=i,this._destroyed=new Y.x,this.steps=new t.n_E,this._sortedHeaders=new t.n_E,this._linear=!1,this._selectedIndex=0,this.selectionChange=new t.vpe,this._orientation="horizontal",this._groupId=yo++}ngAfterContentInit(){this._steps.changes.pipe((0,st.O)(this._steps),(0,R.R)(this._destroyed)).subscribe(e=>{this.steps.reset(e.filter(o=>o._stepper===this)),this.steps.notifyOnChanges()})}ngAfterViewInit(){this._stepHeader.changes.pipe((0,st.O)(this._stepHeader),(0,R.R)(this._destroyed)).subscribe(e=>{this._sortedHeaders.reset(e.toArray().sort((o,i)=>o._elementRef.nativeElement.compareDocumentPosition(i._elementRef.nativeElement)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),this._sortedHeaders.notifyOnChanges()}),this._keyManager=new Et.Em(this._sortedHeaders).withWrap().withHomeAndEnd().withVerticalOrientation("vertical"===this._orientation),(this._dir?this._dir.change:(0,Zo.of)()).pipe((0,st.O)(this._layoutDirection()),(0,R.R)(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e)),this._keyManager.updateActiveItem(this._selectedIndex),this.steps.changes.subscribe(()=>{this.selected||(this._selectedIndex=Math.max(this._selectedIndex-1,0))}),this._isValidIndex(this._selectedIndex)||(this._selectedIndex=0)}ngOnDestroy(){this._keyManager?.destroy(),this.steps.destroy(),this._sortedHeaders.destroy(),this._destroyed.next(),this._destroyed.complete()}next(){this.selectedIndex=Math.min(this._selectedIndex+1,this.steps.length-1)}previous(){this.selectedIndex=Math.max(this._selectedIndex-1,0)}reset(){this._updateSelectedItemIndex(0),this.steps.forEach(e=>e.reset()),this._stateChanged()}_getStepLabelId(e){return`cdk-step-label-${this._groupId}-${e}`}_getStepContentId(e){return`cdk-step-content-${this._groupId}-${e}`}_stateChanged(){this._changeDetectorRef.markForCheck()}_getAnimationDirection(e){const o=e-this._selectedIndex;return o<0?"rtl"===this._layoutDirection()?"next":"previous":o>0?"rtl"===this._layoutDirection()?"previous":"next":"current"}_getIndicatorType(e,o="number"){const i=this.steps.toArray()[e],s=this._isCurrentStep(e);return i._displayDefaultIndicatorType?this._getDefaultIndicatorLogic(i,s):this._getGuidelineLogic(i,s,o)}_getDefaultIndicatorLogic(e,o){return e._showError()&&e.hasError&&!o?"error":!e.completed||o?"number":e.editable?"edit":"done"}_getGuidelineLogic(e,o,i="number"){return e._showError()&&e.hasError&&!o?"error":e.completed&&!o?"done":e.completed&&o?i:e.editable&&o?"edit":i}_isCurrentStep(e){return this._selectedIndex===e}_getFocusIndex(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex}_updateSelectedItemIndex(e){const o=this.steps.toArray();this.selectionChange.emit({selectedIndex:e,previouslySelectedIndex:this._selectedIndex,selectedStep:o[e],previouslySelectedStep:o[this._selectedIndex]}),this._containsFocus()?this._keyManager.setActiveItem(e):this._keyManager.updateActiveItem(e),this._selectedIndex=e,this._stateChanged()}_onKeydown(e){const o=(0,X.Vb)(e),i=e.keyCode,s=this._keyManager;null==s.activeItemIndex||o||i!==X.L_&&i!==X.K5?s.setFocusOrigin("keyboard").onKeydown(e):(this.selectedIndex=s.activeItemIndex,e.preventDefault())}_anyControlsInvalidOrPending(e){return!!(this._linear&&e>=0)&&this.steps.toArray().slice(0,e).some(o=>{const i=o.stepControl;return(i?i.invalid||i.pending||!o.interacted:!o.completed)&&!o.optional&&!o._completedOverride})}_layoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_containsFocus(){const e=this._elementRef.nativeElement,o=(0,bo.ht)();return e===o||e.contains(o)}_isValidIndex(e){return e>-1&&(!this.steps||e<this.steps.length)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(Ct.Is,8),t.Y36(t.sBO),t.Y36(t.SBq))},n.\u0275dir=t.lG2({type:n,selectors:[["","cdkStepper",""]],contentQueries:function(e,o,i){if(1&e&&(t.Suo(i,bt,5),t.Suo(i,Ft,5)),2&e){let s;t.iGM(s=t.CRH())&&(o._steps=s),t.iGM(s=t.CRH())&&(o._stepHeader=s)}},inputs:{linear:"linear",selectedIndex:"selectedIndex",selected:"selected",orientation:"orientation"},outputs:{selectionChange:"selectionChange"},exportAs:["cdkStepper"]}),n})(),So=(()=>{class n{constructor(e){this._stepper=e,this.type="submit"}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(et))},n.\u0275dir=t.lG2({type:n,selectors:[["button","cdkStepperNext",""]],hostVars:1,hostBindings:function(e,o){1&e&&t.NdJ("click",function(){return o._stepper.next()}),2&e&&t.Ikx("type",o.type)},inputs:{type:"type"}}),n})(),Ao=(()=>{class n{constructor(e){this._stepper=e,this.type="button"}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(et))},n.\u0275dir=t.lG2({type:n,selectors:[["button","cdkStepperPrevious",""]],hostVars:1,hostBindings:function(e,o){1&e&&t.NdJ("click",function(){return o._stepper.previous()}),2&e&&t.Ikx("type",o.type)},inputs:{type:"type"}}),n})(),Ht=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[Ct.vT]}),n})();var E=d(3238),lt=d(97392),Mo=d(50727),Do=d(63900),Oo=d(71884),w=d(37340);function wo(n,r){if(1&n&&t.GkF(0,8),2&n){const e=t.oxw();t.Q6J("ngTemplateOutlet",e.iconOverrides[e.state])("ngTemplateOutletContext",e._getIconContext())}}function Po(n,r){if(1&n&&(t.TgZ(0,"span",13),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e._getDefaultTextForState(e.state))}}function ko(n,r){if(1&n&&(t.TgZ(0,"span",14),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e._intl.completedLabel)}}function No(n,r){if(1&n&&(t.TgZ(0,"span",14),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e._intl.editableLabel)}}function jo(n,r){if(1&n&&(t.TgZ(0,"mat-icon",13),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e._getDefaultTextForState(e.state))}}function Uo(n,r){if(1&n&&(t.ynx(0,9),t.YNc(1,Po,2,1,"span",10),t.YNc(2,ko,2,1,"span",11),t.YNc(3,No,2,1,"span",11),t.YNc(4,jo,2,1,"mat-icon",12),t.BQk()),2&n){const e=t.oxw();t.Q6J("ngSwitch",e.state),t.xp6(1),t.Q6J("ngSwitchCase","number"),t.xp6(1),t.Q6J("ngIf","done"===e.state),t.xp6(1),t.Q6J("ngIf","edit"===e.state)}}function qo(n,r){if(1&n&&(t.TgZ(0,"div",15),t.GkF(1,16),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngTemplateOutlet",e._templateLabel().template)}}function Jo(n,r){if(1&n&&(t.TgZ(0,"div",15),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.label)}}function Eo(n,r){if(1&n&&(t.TgZ(0,"div",17),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e._intl.optionalLabel)}}function Fo(n,r){if(1&n&&(t.TgZ(0,"div",18),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.errorMessage)}}function Qo(n,r){}function Lo(n,r){if(1&n&&(t.Hsn(0),t.YNc(1,Qo,0,0,"ng-template",0)),2&n){const e=t.oxw();t.xp6(1),t.Q6J("cdkPortalOutlet",e._portal)}}const Ho=["*"];function Ro(n,r){1&n&&t._UZ(0,"div",11)}const Rt=function(n,r){return{step:n,i:r}};function Yo(n,r){if(1&n&&(t.ynx(0),t.GkF(1,9),t.YNc(2,Ro,1,0,"div",10),t.BQk()),2&n){const e=r.$implicit,o=r.index,i=r.last;t.oxw(2);const s=t.MAs(4);t.xp6(1),t.Q6J("ngTemplateOutlet",s)("ngTemplateOutletContext",t.WLB(3,Rt,e,o)),t.xp6(1),t.Q6J("ngIf",!i)}}const Yt=function(n){return{animationDuration:n}},Vt=function(n,r){return{value:n,params:r}};function Vo(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",12),t.NdJ("@horizontalStepTransition.done",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s._animationDone.next(i))}),t.GkF(1,13),t.qZA()}if(2&n){const e=r.$implicit,o=r.index,i=t.oxw(2);t.ekj("mat-horizontal-stepper-content-inactive",i.selectedIndex!==o),t.Q6J("@horizontalStepTransition",t.WLB(8,Vt,i._getAnimationDirection(o),t.VKq(6,Yt,i._getAnimationDuration())))("id",i._getStepContentId(o)),t.uIk("aria-labelledby",i._getStepLabelId(o)),t.xp6(1),t.Q6J("ngTemplateOutlet",e.content)}}function Bo(n,r){if(1&n&&(t.TgZ(0,"div",4)(1,"div",5),t.YNc(2,Yo,3,6,"ng-container",6),t.qZA(),t.TgZ(3,"div",7),t.YNc(4,Vo,2,11,"div",8),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngForOf",e.steps),t.xp6(2),t.Q6J("ngForOf",e.steps)}}function Ko(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",15),t.GkF(1,9),t.TgZ(2,"div",16)(3,"div",17),t.NdJ("@verticalStepTransition.done",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s._animationDone.next(i))}),t.TgZ(4,"div",18),t.GkF(5,13),t.qZA()()()()}if(2&n){const e=r.$implicit,o=r.index,i=r.last,s=t.oxw(2),p=t.MAs(4);t.xp6(1),t.Q6J("ngTemplateOutlet",p)("ngTemplateOutletContext",t.WLB(10,Rt,e,o)),t.xp6(1),t.ekj("mat-stepper-vertical-line",!i),t.xp6(1),t.ekj("mat-vertical-stepper-content-inactive",s.selectedIndex!==o),t.Q6J("@verticalStepTransition",t.WLB(15,Vt,s._getAnimationDirection(o),t.VKq(13,Yt,s._getAnimationDuration())))("id",s._getStepContentId(o)),t.uIk("aria-labelledby",s._getStepLabelId(o)),t.xp6(2),t.Q6J("ngTemplateOutlet",e.content)}}function Go(n,r){if(1&n&&(t.ynx(0),t.YNc(1,Ko,6,18,"div",14),t.BQk()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngForOf",e.steps)}}function zo(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mat-step-header",19),t.NdJ("click",function(){const s=t.CHM(e).step;return t.KtG(s.select())})("keydown",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s._onKeydown(i))}),t.qZA()}if(2&n){const e=r.step,o=r.i,i=t.oxw();t.ekj("mat-horizontal-stepper-header","horizontal"===i.orientation)("mat-vertical-stepper-header","vertical"===i.orientation),t.Q6J("tabIndex",i._getFocusIndex()===o?0:-1)("id",i._getStepLabelId(o))("index",o)("state",i._getIndicatorType(o,e.state))("label",e.stepLabel||e.label)("selected",i.selectedIndex===o)("active",i._stepIsNavigable(o,e))("optional",e.optional)("errorMessage",e.errorMessage)("iconOverrides",i._iconOverrides)("disableRipple",i.disableRipple||!i._stepIsNavigable(o,e))("color",e.color||i.color),t.uIk("aria-posinset",o+1)("aria-setsize",i.steps.length)("aria-controls",i._getStepContentId(o))("aria-selected",i.selectedIndex==o)("aria-label",e.ariaLabel||null)("aria-labelledby",!e.ariaLabel&&e.ariaLabelledby?e.ariaLabelledby:null)("aria-disabled",!i._stepIsNavigable(o,e)||null)}}let ct=(()=>{class n extends Qt{}return n.\u0275fac=function(){let r;return function(o){return(r||(r=t.n5z(n)))(o||n)}}(),n.\u0275dir=t.lG2({type:n,selectors:[["","matStepLabel",""]],features:[t.qOj]}),n})(),dt=(()=>{class n{constructor(){this.changes=new Y.x,this.optionalLabel="Optional",this.completedLabel="Completed",this.editableLabel="Editable"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Wo={provide:dt,deps:[[new t.FiY,new t.tp0,dt]],useFactory:function $o(n){return n||new dt}},Xo=(0,E.pj)(class extends Ft{constructor(r){super(r)}},"primary");let Bt=(()=>{class n extends Xo{constructor(e,o,i,s){super(i),this._intl=e,this._focusMonitor=o,this._intlSubscription=e.changes.subscribe(()=>s.markForCheck())}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._intlSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._elementRef)}focus(e,o){e?this._focusMonitor.focusVia(this._elementRef,e,o):this._elementRef.nativeElement.focus(o)}_stringLabel(){return this.label instanceof ct?null:this.label}_templateLabel(){return this.label instanceof ct?this.label:null}_getHostElement(){return this._elementRef.nativeElement}_getIconContext(){return{index:this.index,active:this.active,optional:this.optional}}_getDefaultTextForState(e){return"number"==e?`${this.index+1}`:"edit"==e?"create":"error"==e?"warning":e}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(dt),t.Y36(Et.tE),t.Y36(t.SBq),t.Y36(t.sBO))},n.\u0275cmp=t.Xpm({type:n,selectors:[["mat-step-header"]],hostAttrs:["role","tab",1,"mat-step-header"],inputs:{color:"color",state:"state",label:"label",errorMessage:"errorMessage",iconOverrides:"iconOverrides",index:"index",selected:"selected",active:"active",optional:"optional",disableRipple:"disableRipple"},features:[t.qOj],decls:10,vars:19,consts:[["matRipple","",1,"mat-step-header-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-step-icon-content",3,"ngSwitch"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngSwitchCase"],[3,"ngSwitch",4,"ngSwitchDefault"],[1,"mat-step-label"],["class","mat-step-text-label",4,"ngIf"],["class","mat-step-optional",4,"ngIf"],["class","mat-step-sub-label-error",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngSwitch"],["aria-hidden","true",4,"ngSwitchCase"],["class","cdk-visually-hidden",4,"ngIf"],["aria-hidden","true",4,"ngSwitchDefault"],["aria-hidden","true"],[1,"cdk-visually-hidden"],[1,"mat-step-text-label"],[3,"ngTemplateOutlet"],[1,"mat-step-optional"],[1,"mat-step-sub-label-error"]],template:function(e,o){1&e&&(t._UZ(0,"div",0),t.TgZ(1,"div")(2,"div",1),t.YNc(3,wo,1,2,"ng-container",2),t.YNc(4,Uo,5,4,"ng-container",3),t.qZA()(),t.TgZ(5,"div",4),t.YNc(6,qo,2,1,"div",5),t.YNc(7,Jo,2,1,"div",5),t.YNc(8,Eo,2,1,"div",6),t.YNc(9,Fo,2,1,"div",7),t.qZA()),2&e&&(t.Q6J("matRippleTrigger",o._getHostElement())("matRippleDisabled",o.disableRipple),t.xp6(1),t.Gre("mat-step-icon-state-",o.state," mat-step-icon"),t.ekj("mat-step-icon-selected",o.selected),t.xp6(1),t.Q6J("ngSwitch",!(!o.iconOverrides||!o.iconOverrides[o.state])),t.xp6(1),t.Q6J("ngSwitchCase",!0),t.xp6(2),t.ekj("mat-step-label-active",o.active)("mat-step-label-selected",o.selected)("mat-step-label-error","error"==o.state),t.xp6(1),t.Q6J("ngIf",o._templateLabel()),t.xp6(1),t.Q6J("ngIf",o._stringLabel()),t.xp6(1),t.Q6J("ngIf",o.optional&&"error"!=o.state),t.xp6(1),t.Q6J("ngIf","error"==o.state))},dependencies:[l.O5,l.tP,l.RF,l.n9,l.ED,lt.Hw,E.wG],styles:['.mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-step-header:focus .mat-focus-indicator::before{content:""}.cdk-high-contrast-active .mat-step-header{outline:solid 1px}.cdk-high-contrast-active .mat-step-header[aria-selected=true] .mat-step-label{text-decoration:underline}.cdk-high-contrast-active .mat-step-header[aria-disabled=true]{outline-color:GrayText}.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-label,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-icon,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-optional{color:GrayText}.mat-step-optional,.mat-step-sub-label-error{font-size:12px}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative}.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,changeDetection:0}),n})();const zt={horizontalStepTransition:(0,w.X$)("horizontalStepTransition",[(0,w.SB)("previous",(0,w.oB)({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"})),(0,w.SB)("current",(0,w.oB)({transform:"none",visibility:"inherit"})),(0,w.SB)("next",(0,w.oB)({transform:"translate3d(100%, 0, 0)",visibility:"hidden"})),(0,w.eR)("* => *",(0,w.jt)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)"),{params:{animationDuration:"500ms"}})]),verticalStepTransition:(0,w.X$)("verticalStepTransition",[(0,w.SB)("previous",(0,w.oB)({height:"0px",visibility:"hidden"})),(0,w.SB)("next",(0,w.oB)({height:"0px",visibility:"hidden"})),(0,w.SB)("current",(0,w.oB)({height:"*",visibility:"inherit"})),(0,w.eR)("* <=> current",(0,w.jt)("{{animationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)"),{params:{animationDuration:"225ms"}})])};let ti=(()=>{class n{constructor(e){this.templateRef=e}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(t.Rgc))},n.\u0275dir=t.lG2({type:n,selectors:[["ng-template","matStepperIcon",""]],inputs:{name:["matStepperIcon","name"]}}),n})(),ei=(()=>{class n{constructor(e){this._template=e}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(t.Rgc))},n.\u0275dir=t.lG2({type:n,selectors:[["ng-template","matStepContent",""]]}),n})(),$t=(()=>{class n extends bt{constructor(e,o,i,s){super(e,s),this._errorStateMatcher=o,this._viewContainerRef=i,this._isSelected=Mo.w0.EMPTY}ngAfterContentInit(){this._isSelected=this._stepper.steps.changes.pipe((0,Do.w)(()=>this._stepper.selectionChange.pipe((0,tt.U)(e=>e.selectedStep===this),(0,st.O)(this._stepper.selected===this)))).subscribe(e=>{e&&this._lazyContent&&!this._portal&&(this._portal=new vt.UE(this._lazyContent._template,this._viewContainerRef))})}ngOnDestroy(){this._isSelected.unsubscribe()}isErrorState(e,o){return this._errorStateMatcher.isErrorState(e,o)||!!(e&&e.invalid&&this.interacted)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36((0,t.Gpc)(()=>Wt)),t.Y36(E.rD,4),t.Y36(t.s_b),t.Y36(Lt,8))},n.\u0275cmp=t.Xpm({type:n,selectors:[["mat-step"]],contentQueries:function(e,o,i){if(1&e&&(t.Suo(i,ct,5),t.Suo(i,ei,5)),2&e){let s;t.iGM(s=t.CRH())&&(o.stepLabel=s.first),t.iGM(s=t.CRH())&&(o._lazyContent=s.first)}},inputs:{color:"color"},exportAs:["matStep"],features:[t._Bn([{provide:E.rD,useExisting:n},{provide:bt,useExisting:n}]),t.qOj],ngContentSelectors:Ho,decls:1,vars:0,consts:[[3,"cdkPortalOutlet"]],template:function(e,o){1&e&&(t.F$t(),t.YNc(0,Lo,2,1,"ng-template"))},dependencies:[vt.Pl],encapsulation:2,changeDetection:0}),n})(),Wt=(()=>{class n extends et{get animationDuration(){return this._animationDuration}set animationDuration(e){this._animationDuration=/^\d+$/.test(e)?e+"ms":e}constructor(e,o,i){super(e,o,i),this.steps=new t.n_E,this.animationDone=new t.vpe,this.labelPosition="end",this.headerPosition="top",this._iconOverrides={},this._animationDone=new Y.x,this._animationDuration="";const s=i.nativeElement.nodeName.toLowerCase();this.orientation="mat-vertical-stepper"===s?"vertical":"horizontal"}ngAfterContentInit(){super.ngAfterContentInit(),this._icons.forEach(({name:e,templateRef:o})=>this._iconOverrides[e]=o),this.steps.changes.pipe((0,R.R)(this._destroyed)).subscribe(()=>{this._stateChanged()}),this._animationDone.pipe((0,Oo.x)((e,o)=>e.fromState===o.fromState&&e.toState===o.toState),(0,R.R)(this._destroyed)).subscribe(e=>{"current"===e.toState&&this.animationDone.emit()})}_stepIsNavigable(e,o){return o.completed||this.selectedIndex===e||!this.linear}_getAnimationDuration(){return this.animationDuration?this.animationDuration:"horizontal"===this.orientation?"500ms":"225ms"}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(Ct.Is,8),t.Y36(t.sBO),t.Y36(t.SBq))},n.\u0275cmp=t.Xpm({type:n,selectors:[["mat-stepper"],["mat-vertical-stepper"],["mat-horizontal-stepper"],["","matStepper",""]],contentQueries:function(e,o,i){if(1&e&&(t.Suo(i,$t,5),t.Suo(i,ti,5)),2&e){let s;t.iGM(s=t.CRH())&&(o._steps=s),t.iGM(s=t.CRH())&&(o._icons=s)}},viewQuery:function(e,o){if(1&e&&t.Gf(Bt,5),2&e){let i;t.iGM(i=t.CRH())&&(o._stepHeader=i)}},hostAttrs:["role","tablist"],hostVars:11,hostBindings:function(e,o){2&e&&(t.uIk("aria-orientation",o.orientation),t.ekj("mat-stepper-horizontal","horizontal"===o.orientation)("mat-stepper-vertical","vertical"===o.orientation)("mat-stepper-label-position-end","horizontal"===o.orientation&&"end"==o.labelPosition)("mat-stepper-label-position-bottom","horizontal"===o.orientation&&"bottom"==o.labelPosition)("mat-stepper-header-position-bottom","bottom"===o.headerPosition))},inputs:{selectedIndex:"selectedIndex",disableRipple:"disableRipple",color:"color",labelPosition:"labelPosition",headerPosition:"headerPosition",animationDuration:"animationDuration"},outputs:{animationDone:"animationDone"},exportAs:["matStepper","matVerticalStepper","matHorizontalStepper"],features:[t._Bn([{provide:et,useExisting:n}]),t.qOj],decls:5,vars:3,consts:[[3,"ngSwitch"],["class","mat-horizontal-stepper-wrapper",4,"ngSwitchCase"],[4,"ngSwitchCase"],["stepTemplate",""],[1,"mat-horizontal-stepper-wrapper"],[1,"mat-horizontal-stepper-header-container"],[4,"ngFor","ngForOf"],[1,"mat-horizontal-content-container"],["class","mat-horizontal-stepper-content","role","tabpanel",3,"id","mat-horizontal-stepper-content-inactive",4,"ngFor","ngForOf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","mat-stepper-horizontal-line",4,"ngIf"],[1,"mat-stepper-horizontal-line"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id"],[3,"ngTemplateOutlet"],["class","mat-step",4,"ngFor","ngForOf"],[1,"mat-step"],[1,"mat-vertical-content-container"],["role","tabpanel",1,"mat-vertical-stepper-content",3,"id"],[1,"mat-vertical-content"],[3,"tabIndex","id","index","state","label","selected","active","optional","errorMessage","iconOverrides","disableRipple","color","click","keydown"]],template:function(e,o){1&e&&(t.ynx(0,0),t.YNc(1,Bo,5,2,"div",1),t.YNc(2,Go,2,1,"ng-container",2),t.BQk(),t.YNc(3,zo,1,23,"ng-template",null,3,t.W1O)),2&e&&(t.Q6J("ngSwitch",o.orientation),t.xp6(1),t.Q6J("ngSwitchCase","horizontal"),t.xp6(1),t.Q6J("ngSwitchCase","vertical"))},dependencies:[l.sg,l.O5,l.tP,l.RF,l.n9,Bt],styles:['.mat-stepper-vertical,.mat-stepper-horizontal{display:block}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-header-position-bottom .mat-horizontal-stepper-header-container{order:1}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{border-top-width:1px;border-top-style:solid;content:"";display:inline-block;height:0;position:absolute;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;height:24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-wrapper{display:flex;flex-direction:column}.mat-horizontal-stepper-content{outline:0}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-inactive{height:0;overflow:hidden}.mat-horizontal-stepper-content:not(.mat-horizontal-stepper-content-inactive){visibility:inherit !important}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.cdk-high-contrast-active .mat-horizontal-content-container{outline:solid 1px}.mat-stepper-header-position-bottom .mat-horizontal-content-container{padding:24px 24px 0 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}.cdk-high-contrast-active .mat-vertical-content-container{outline:solid 1px}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:"";position:absolute;left:0;border-left-width:1px;border-left-style:solid}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0}.mat-vertical-stepper-content:not(.mat-vertical-stepper-content-inactive){visibility:inherit !important}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}'],encapsulation:2,data:{animation:[zt.horizontalStepTransition,zt.verticalStepTransition]},changeDetection:0}),n})(),ni=(()=>{class n extends So{}return n.\u0275fac=function(){let r;return function(o){return(r||(r=t.n5z(n)))(o||n)}}(),n.\u0275dir=t.lG2({type:n,selectors:[["button","matStepperNext",""]],hostAttrs:[1,"mat-stepper-next"],hostVars:1,hostBindings:function(e,o){2&e&&t.Ikx("type",o.type)},inputs:{type:"type"},features:[t.qOj]}),n})(),oi=(()=>{class n extends Ao{}return n.\u0275fac=function(){let r;return function(o){return(r||(r=t.n5z(n)))(o||n)}}(),n.\u0275dir=t.lG2({type:n,selectors:[["button","matStepperPrevious",""]],hostAttrs:[1,"mat-stepper-previous"],hostVars:1,hostBindings:function(e,o){2&e&&t.Ikx("type",o.type)},inputs:{type:"type"},features:[t.qOj]}),n})(),ii=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({providers:[Wo,E.rD],imports:[E.BQ,l.ez,vt.eL,Ht,lt.Ps,E.si,E.BQ]}),n})();var Zt=d(96308);const ai=["stepper"];function ri(n,r){1&n&&(t._UZ(0,"i",47),t._uU(1,"Filter"))}function si(n,r){1&n&&(t.TgZ(0,"small",48),t._uU(1,"Outlet option is required."),t.qZA())}function li(n,r){1&n&&(t._UZ(0,"i",49),t._uU(1,"Input"))}function ci(n,r){1&n&&(t.TgZ(0,"th",34),t._uU(1,"Expected"),t.qZA())}function di(n,r){1&n&&(t.TgZ(0,"th",34),t._uU(1,"Changes"),t.qZA())}function pi(n,r){if(1&n&&(t.TgZ(0,"td"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Quantity)}}function ui(n,r){if(1&n&&(t.TgZ(0,"td"),t._uU(1),t._UZ(2,"i",56),t._uU(3),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("",e.Quantity," "),t.xp6(2),t.AsE(" ",e.Counted," (",(e.Counted-e.Quantity>0?"+":"")+(e.Counted-e.Quantity),")")}}function mi(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"i",57),t.NdJ("click",function(){t.CHM(e);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.clear(i))}),t.qZA()}}const Xt=function(){return["/menu/Products/Catalog/Variants/Info"]},Tt=function(n){return{ID:n}},_i=function(n){return{"bg-gradient-warning":n}};function hi(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",50),t._uU(4),t.qZA(),t.TgZ(5,"td",50),t._uU(6),t.qZA(),t.TgZ(7,"td")(8,"a",51),t._uU(9),t.qZA()(),t.TgZ(10,"td"),t._uU(11),t.qZA(),t.YNc(12,pi,2,1,"td",52),t.TgZ(13,"td")(14,"input",53),t.NdJ("ngModelChange",function(i){const p=t.CHM(e).$implicit;return t.KtG(p.Counted=i)}),t.qZA()(),t.YNc(15,ui,4,3,"td",52),t.TgZ(16,"td",54),t.YNc(17,mi,1,0,"i",55),t.qZA()()}if(2&n){const e=r.$implicit,o=r.index,i=t.oxw(3);t.xp6(2),t.Oqu(o+1+"."),t.xp6(2),t.Oqu(e.CategoryName),t.xp6(2),t.Oqu(e.ProductName),t.xp6(2),t.Q6J("routerLink",t.DdM(14,Xt))("queryParams",t.VKq(15,Tt,e.ID)),t.xp6(1),t.Oqu(e.Model),t.xp6(2),t.Oqu(e.Code),t.xp6(1),t.Q6J("ngIf",i.roleService.inventory.View),t.xp6(2),t.Tol(t.VKq(17,_i,""!==e.Counted&&e.Counted!=e.Quantity&&!i.roleService.inventory.View)),t.Q6J("modifyValueOnWheel",!1)("ngModel",e.Counted),t.xp6(1),t.Q6J("ngIf",""!==e.Counted&&i.roleService.inventory.View),t.xp6(2),t.Q6J("ngIf",""!==e.Counted)}}const It=function(n){return{"nb-button-override":n}};function gi(n,r){if(1&n&&(t.TgZ(0,"div",22)(1,"button",43),t._uU(2," Back "),t.qZA(),t.TgZ(3,"button",58),t._uU(4," Next "),t.qZA()()),2&n){const e=t.oxw(3);t.Q6J("ngClass",t.VKq(1,It,e.currentSubStatus!=e.subStatusEnum.PAID))}}function fi(n,r){1&n&&(t._UZ(0,"i",59),t._uU(1,"Review"))}function xi(n,r){1&n&&(t.TgZ(0,"th",34),t._uU(1,"Expected"),t.qZA())}function vi(n,r){1&n&&(t.TgZ(0,"th",34),t._uU(1,"Differences"),t.qZA())}function Ci(n,r){if(1&n&&(t.TgZ(0,"td"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2).$implicit;t.xp6(1),t.Oqu(e.Quantity)}}function bi(n,r){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3).$implicit;t.xp6(1),t.hij("+",e.Counted-e.Quantity,"")}}function Zi(n,r){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3).$implicit;t.xp6(1),t.Oqu(e.Counted-e.Quantity)}}function Ti(n,r){if(1&n&&(t.TgZ(0,"td"),t.YNc(1,bi,2,1,"span",52),t.YNc(2,Zi,2,1,"span",52),t.qZA()),2&n){const e=t.oxw(2).$implicit;t.xp6(1),t.Q6J("ngIf",e.Counted>e.Quantity),t.xp6(1),t.Q6J("ngIf",e.Counted<e.Quantity)}}function Ii(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",50),t._uU(4),t.qZA(),t.TgZ(5,"td")(6,"a",51),t._uU(7),t.qZA()(),t.TgZ(8,"td"),t._uU(9),t.qZA(),t.YNc(10,Ci,2,1,"td",52),t.TgZ(11,"td"),t._uU(12),t.qZA(),t.YNc(13,Ti,3,2,"td",52),t.qZA()),2&n){const e=t.oxw(),o=e.$implicit,i=e.index,s=t.oxw(3);t.Tol(o.Counted<o.Quantity?"soft-yellow":"soft-green"),t.xp6(2),t.Oqu(i+1+"."),t.xp6(2),t.Oqu(o.ProductName),t.xp6(2),t.Q6J("routerLink",t.DdM(11,Xt))("queryParams",t.VKq(12,Tt,o.ID)),t.xp6(1),t.Oqu(o.Model),t.xp6(2),t.Oqu(o.Code),t.xp6(1),t.Q6J("ngIf",s.roleService.inventory.View),t.xp6(2),t.hij(" ",o.Counted," "),t.xp6(1),t.Q6J("ngIf",s.roleService.inventory.View)}}function yi(n,r){if(1&n&&(t.ynx(0),t.YNc(1,Ii,14,14,"tr",60),t.BQk()),2&n){const e=r.$implicit;t.xp6(1),t.Q6J("ngIf",""!==e.Counted&&e.Counted!=e.Quantity)}}function Si(n,r){1&n&&(t._UZ(0,"i",61),t._uU(1,"Finish"))}function Ai(n,r){if(1&n&&(t.TgZ(0,"div",62),t._UZ(1,"i",63),t._uU(2),t.qZA()),2&n){const e=t.oxw(3);t.xp6(2),t.Oqu(e.error.error.Message)}}const Mi=function(n){return{custom:n}};function Di(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mat-stepper",4,5),t.NdJ("selectionChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.onNextStep(i))}),t.TgZ(2,"mat-step",6),t.YNc(3,ri,2,0,"ng-template",7),t.TgZ(4,"div",8)(5,"div",9)(6,"div",10)(7,"div",9)(8,"h3",11),t._uU(9,"Outlet"),t.qZA()(),t.TgZ(10,"div",12)(11,"ng-select",13,14),t.NdJ("change",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.toggleIsFilterFilled())})("ngModelChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.filter.EntityID=i)}),t.qZA(),t.YNc(13,si,2,0,"small",15),t.qZA()()(),t.TgZ(14,"div",16)(15,"div",10)(16,"div",9)(17,"h3",11),t._uU(18,"Category "),t.TgZ(19,"small",17)(20,"em"),t._uU(21,"Optional"),t.qZA()()()(),t.TgZ(22,"div",12)(23,"ng-select",18),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.filter.CategoryID=i)}),t.qZA()()()(),t.TgZ(24,"div",16)(25,"div",10)(26,"div",9)(27,"h3",11),t._uU(28,"Contain Text "),t.TgZ(29,"small",17)(30,"em"),t._uU(31,"Optional"),t.qZA()()()(),t.TgZ(32,"div",19)(33,"input",20),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.filter.ProductName=i)}),t.qZA()()()(),t.TgZ(34,"div",16)(35,"div",10)(36,"div",9)(37,"h3",11),t._uU(38,"Note "),t.TgZ(39,"small",17)(40,"em"),t._uU(41,"Optional"),t.qZA()()()(),t.TgZ(42,"div",12)(43,"textarea",21),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.note=i)}),t.qZA()()()()(),t.TgZ(44,"div",22)(45,"button",23),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.validateFilter())}),t._uU(46,"Next"),t.qZA()()(),t.TgZ(47,"mat-step",24),t.YNc(48,li,2,0,"ng-template",7),t.TgZ(49,"div",25)(50,"table",26),t.NdJ("matSortChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.sortData(i))}),t.TgZ(51,"thead",27)(52,"tr")(53,"th",28),t._uU(54,"No"),t.qZA(),t.TgZ(55,"th",29),t._uU(56,"Category"),t.qZA(),t.TgZ(57,"th",30),t._uU(58,"Product"),t.qZA(),t.TgZ(59,"th",31),t._uU(60,"Variant"),t.qZA(),t.TgZ(61,"th",32),t._uU(62,"Code"),t.qZA(),t.YNc(63,ci,2,0,"th",33),t.TgZ(64,"th",34),t._uU(65,"Counted"),t.qZA(),t.YNc(66,di,2,0,"th",35),t._UZ(67,"th",28),t.qZA()(),t.TgZ(68,"tbody"),t.YNc(69,hi,18,19,"tr",36),t.qZA()()(),t.YNc(70,gi,5,3,"div",37),t.qZA(),t.TgZ(71,"mat-step",38),t.YNc(72,fi,2,0,"ng-template",7),t.TgZ(73,"div",25)(74,"div",39)(75,"table",40),t.NdJ("matSortChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.sortData(i))}),t.TgZ(76,"thead",27)(77,"tr"),t._UZ(78,"th",28),t.TgZ(79,"th",41),t._uU(80,"Name"),t.qZA(),t.TgZ(81,"th",42),t._uU(82,"Variant"),t.qZA(),t.TgZ(83,"th",34),t._uU(84,"Code"),t.qZA(),t.YNc(85,xi,2,0,"th",33),t.TgZ(86,"th",34),t._uU(87,"Counted"),t.qZA(),t.YNc(88,vi,2,0,"th",33),t.qZA()(),t.TgZ(89,"tbody"),t.YNc(90,yi,2,1,"ng-container",36),t.qZA()()()(),t.TgZ(91,"div",22)(92,"button",43),t._uU(93," Back "),t.qZA(),t.TgZ(94,"button",44),t._uU(95," Confirm Adjustment "),t.qZA()()(),t.TgZ(96,"mat-step",45),t.YNc(97,Si,2,0,"ng-template",7),t.YNc(98,Ai,3,1,"div",46),t.qZA()()}if(2&n){const e=t.MAs(12),o=t.oxw(2);t.Q6J("linear",!0),t.xp6(2),t.Q6J("completed",o.isFilterFilled),t.xp6(9),t.Tol(t.VKq(23,Mi,e.touched&&null==o.filter.EntityID)),t.Q6J("items",o.loaderData.Entities)("ngModel",o.filter.EntityID)("clearable",!1),t.xp6(2),t.Q6J("ngIf",e.touched&&null==o.filter.EntityID),t.xp6(10),t.Q6J("items",o.loaderData.Categories)("ngModel",o.filter.CategoryID),t.xp6(10),t.Q6J("ngModel",o.filter.ProductName),t.xp6(10),t.Q6J("ngModel",o.note),t.xp6(1),t.Q6J("ngClass",t.VKq(25,It,o.currentSubStatus!=o.subStatusEnum.PAID)),t.xp6(1),t.Q6J("disabled",!o.roleService.adjustment.Create),t.xp6(18),t.Q6J("ngIf",o.roleService.inventory.View),t.xp6(3),t.Q6J("ngIf",o.roleService.inventory.View),t.xp6(3),t.Q6J("ngForOf",o.products),t.xp6(1),t.Q6J("ngIf",o.products.length>0),t.xp6(15),t.Q6J("ngIf",o.roleService.inventory.View),t.xp6(3),t.Q6J("ngIf",o.roleService.inventory.View),t.xp6(2),t.Q6J("ngForOf",o.products),t.xp6(1),t.Q6J("ngClass",t.VKq(27,It,o.currentSubStatus!=o.subStatusEnum.PAID)),t.xp6(7),t.Q6J("ngIf",o.error)}}function Oi(n,r){1&n&&(t.TgZ(0,"div",80),t._uU(1," Difference"),t.qZA())}function wi(n,r){if(1&n&&(t.TgZ(0,"div",85),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.Tol(e.Quantity-e.OriginalQuantity<0?"text-danger":"text-success"),t.xp6(1),t.Oqu((e.Quantity-e.OriginalQuantity>0?"+":" ")+(e.Quantity-e.OriginalQuantity))}}function Pi(n,r){if(1&n&&(t.TgZ(0,"div",87)(1,"div",84),t._uU(2),t.qZA(),t.TgZ(3,"div",85),t._uU(4),t.qZA(),t.YNc(5,wi,2,3,"div",86),t.qZA()),2&n){const e=r.$implicit,o=t.oxw(3);t.xp6(2),t.AsE("",e.Name," (",e.Model,")"),t.xp6(2),t.Oqu(e.Quantity),t.xp6(1),t.Q6J("ngIf",o.roleService.inventory.View)}}function ki(n,r){if(1&n&&(t.TgZ(0,"div",85),t.ALo(1,"sum"),t.ALo(2,"sum"),t._uU(3),t.ALo(4,"sum"),t.ALo(5,"sum"),t.ALo(6,"sum"),t.ALo(7,"sum"),t.qZA()),2&n){const e=t.oxw(3);t.Tol(t.xi3(1,3,e.Items,"Quantity")-t.xi3(2,6,e.Items,"OriginalQuantity")<0?"text-danger":"text-success"),t.xp6(3),t.hij(" ",(t.xi3(4,9,e.Items,"Quantity")-t.xi3(5,12,e.Items,"OriginalQuantity")>0?"+":" ")+(t.xi3(6,15,e.Items,"Quantity")-t.xi3(7,18,e.Items,"OriginalQuantity"))," ")}}const Ni=function(){return["/menu/Adjustment/Adjustment/Archive/Info"]};function ji(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",64)(1,"div",65)(2,"div",66)(3,"div",67)(4,"h1",68),t._UZ(5,"i",61),t._uU(6,"Inventory Adjustment Completed"),t.qZA()(),t.TgZ(7,"div",69)(8,"div",70)(9,"div",71)(10,"a",72),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.newStockCount())}),t._uU(11,"New Adjustment (F8)"),t.qZA()()()()()(),t.TgZ(12,"div",73)(13,"div",66)(14,"div",74)(15,"h2",75)(16,"a",76),t._uU(17),t.qZA()()(),t.TgZ(18,"div",77)(19,"div",78)(20,"div",79),t._uU(21,"Product Name (Variant)"),t.qZA(),t.TgZ(22,"div",80),t._uU(23,"Counted"),t.qZA(),t.YNc(24,Oi,2,0,"div",81),t.qZA(),t.YNc(25,Pi,6,4,"div",82),t.TgZ(26,"div",83)(27,"div",84),t._uU(28,"Total"),t.qZA(),t.TgZ(29,"div",85),t._uU(30),t.ALo(31,"sum"),t.qZA(),t.YNc(32,ki,8,21,"div",86),t.qZA()()()()()}if(2&n){const e=t.oxw(2);t.xp6(16),t.Q6J("routerLink",t.DdM(10,Ni))("queryParams",t.VKq(11,Tt,e.adjustmentID)),t.xp6(1),t.hij("Adjustment #",e.completeInfo.InvoiceNumber,""),t.xp6(7),t.Q6J("ngIf",e.roleService.inventory.View),t.xp6(1),t.Q6J("ngForOf",e.Items),t.xp6(5),t.Oqu(t.xi3(31,7,e.Items,"Quantity")),t.xp6(2),t.Q6J("ngIf",e.roleService.inventory.View)}}function Ui(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.filter.ProductName=i)})("onSubmit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.filterProduct(i.filter.ProductName))}),t.TgZ(1,"content"),t.YNc(2,Di,99,29,"mat-stepper",2),t.YNc(3,ji,33,13,"div",3),t.qZA()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("text",e.filter.ProductName)("hideSearchBox","input"!=e.currentStep)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",e.loaderData&&!e.isCompleted),t.xp6(1),t.Q6J("ngIf",e.isCompleted)}}let qi=(()=>{class n extends Co{constructor(e,o,i,s){super(e),(0,a.Z)(this,"toastr",void 0),(0,a.Z)(this,"ngZone",void 0),(0,a.Z)(this,"roleService",void 0),(0,a.Z)(this,"stepper",void 0),(0,a.Z)(this,"isFilterFilled",void 0),(0,a.Z)(this,"currentStep",void 0),(0,a.Z)(this,"Items",void 0),(0,a.Z)(this,"note",void 0),(0,a.Z)(this,"isCompleted",!1),(0,a.Z)(this,"filter",void 0),(0,a.Z)(this,"oldFilter",void 0),(0,a.Z)(this,"currentSubStatus",void 0),(0,a.Z)(this,"subStatusEnum",vo.y),this.toastr=o,this.ngZone=i,this.roleService=s,this.isFilterFilled=!1,this.filter={CategoryID:null,EntityID:null,ProductName:"",SupplierID:Z.gT.GuidEmpty},this.oldFilter={CategoryID:"dummy",EntityID:"dummy",ProductName:"dummy",SupplierID:"dummy"},this.Items=[],this.initSubscriptionStatus()}initSubscriptionStatus(){this.currentSubStatus=parseInt(localStorage.getItem("SubscriptionStatus"))}handleF8(){"finish"==this.currentStep&&this.newStockCount()}handleNextButton(){this.stepper&&this.ngZone.run(()=>{this.roleService.adjustment.Create&&(this.isFilterFilled?this.stepper.next():this.validateFilter())})}handlePreviousButton(){this.stepper&&this.ngZone.run(()=>{this.stepper.previous()})}toggleIsFilterFilled(){this.isFilterFilled=!0}onNextStep(e){if("filter"==e.selectedStep.label)this.currentStep="filter";else if("input"==e.selectedStep.label)this.currentStep="input",(this.oldFilter.CategoryID!=this.filter.CategoryID||this.oldFilter.EntityID!=this.filter.EntityID||this.filter.ProductName!=this.oldFilter.ProductName)&&(this.getProduct(this.filter),this.oldFilter=Object.assign({},this.filter));else if("review"==e.selectedStep.label){this.products=this.originalProducts,this.currentStep="review";let o=0;this.products.forEach(i=>{""!==i.Counted&&i.Counted!=i.Quantity&&(i.Status=i.Counted>i.Quantity?"Over":"Under",o++)}),o&&!this.roleService.inventory.View&&this.toastr.warning("There are some items inventory that does not match! Click next to automatically adjust inventory.",v.n.Warning)}else"finish"==e.selectedStep.label&&(this.products=this.originalProducts,this.currentStep="finish",this.Items=[],this.products.forEach(s=>{""!==s.Counted&&s.Counted!=s.Quantity&&this.Items.push({Name:s.ProductName,Cost:s.UnitCost,Price:s.UnitQuantity,Quantity:s.Counted,OriginalQuantity:s.Quantity,VariantID:s.ID,Model:s.Model})}),this.Items.length>0?this.submitAdjustment({Items:this.Items,Order:{Date:new Date,EntityID:this.filter.EntityID,Note:this.note,ID:this.adjustmentID||Z.gT.GuidEmpty},TypeID:2}):this.toastr.error("Adjust at least 1 product",v.n.Error))}validateFilter(){this.isFilterFilled||this.toastr.error("Outlet is required",v.n.Error)}clear(e){e.Counted=""}newStockCount(){window.location.reload()}onSubmitSuccess(){this.isCompleted=!0}sortData(e){const o=this.products.slice();this.products=e.active&&""!==e.direction?o.sort((i,s)=>{const p="asc"===e.direction,S=typeof i[e.active];switch(Z.gT.IsEmpty(i.Code)&&(i.Code=""),Z.gT.IsEmpty(s.Code)&&(s.Code=""),S){case"string":return this.compare(i[e.active].toLocaleLowerCase(),s[e.active].toLocaleLowerCase(),p);case"number":return this.compare(i[e.active],s[e.active],p);default:return 0}}):this.originalProducts}compare(e,o,i){return(e<o?-1:1)*(i?1:-1)}filterProduct(e){""!=e?(e=e.toLowerCase(),this.products=this.originalProducts.filter(o=>o.ProductName.toLowerCase().includes(e))):this.products=this.originalProducts}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(b.O),t.Y36(h._W),t.Y36(t.R0b),t.Y36(u.N))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-spreadsheet-stock-take"]],viewQuery:function(e,o){if(1&e&&t.Gf(ai,5),2&e){let i;t.iGM(i=t.CRH())&&(o.stepper=i.first)}},hostBindings:function(e,o){1&e&&t.NdJ("keydown.F8",function(){return o.handleF8()},!1,t.Jf7)("keydown.ArrowRight",function(){return o.handleNextButton()},!1,t.Jf7)("keydown.ArrowLeft",function(){return o.handlePreviousButton()},!1,t.Jf7)},features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","text","hideSearchBox","hideSearchDropdown","textChange","onSubmit",4,"ngIf"],[3,"pageData","text","hideSearchBox","hideSearchDropdown","textChange","onSubmit"],[3,"linear","selectionChange",4,"ngIf"],["class","container-fluid row mt-5",4,"ngIf"],[3,"linear","selectionChange"],["stepper",""],["label","filter",3,"completed"],["matStepLabel",""],[1,"row","px-5","w-50","mx-auto"],[1,"col-12"],[1,"row"],[1,"fw-normal","text-dark","m-0"],[1,"col-12","mt-3"],["placeholder","Choose an outlet","bindLabel","Name","bindValue","ID",3,"items","ngModel","clearable","change","ngModelChange"],["outletFilter","ngModel"],["style","color: red;",4,"ngIf"],[1,"col-12",2,"margin-top","25px"],[1,"text-muted","h6"],["placeholder","Choose a category","bindLabel","Value","bindValue","Key",3,"items","ngModel","ngModelChange"],[1,"col-12","mt-3","mb-0"],["type","text","name","text","placeholder","Type the product name you want to adjust",1,"form-control",3,"ngModel","ngModelChange"],["rows","6","type","text","name","note",1,"form-control",3,"ngModel","ngModelChange"],[1,"mt-5","nb-button",3,"ngClass"],["mat-button","","matStepperNext","","mat-raised-button","","matTooltip","Press right arrow key to go to the next page",1,"btn","btn-outline-secondary","ms-auto","me-0","d-block",3,"disabled","click"],["label","input"],[1,"container-fluid","px-0"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light"],[2,"width","30px"],["mat-sort-header","CategoryName",2,"width","175px"],["mat-sort-header","ProductName",2,"width","200px"],["mat-sort-header","Model",2,"width","100px"],["mat-sort-header","Code",2,"width","75px"],["style","width: 75px;",4,"ngIf"],[2,"width","75px"],["style","width: 75px",4,"ngIf"],[4,"ngFor","ngForOf"],["class","mt-5 nb-button",3,"ngClass",4,"ngIf"],["label","review"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom","w-100",2,"table-layout","fixed",3,"matSortChange"],["mat-sort-header","ProductName",2,"width","175px"],[2,"width","150px"],["mat-button","","matStepperPrevious","","mat-raised-button","","matTooltip","Press left arrow key to go to the next page",1,"btn","btn-outline-secondary","me-5"],["mat-button","","matStepperNext","","mat-raised-button","","matTooltip","Press right arrow key to go to the next page",1,"btn","btn-success"],["label","finish"],["class","alert",4,"ngIf"],[1,"fa-solid","fa-filter","me-3"],[2,"color","red"],[1,"fa-solid","fa-calculator","me-3"],[2,"word-break","break-word"],["target","_blank",2,"color","#0976b4 !important",3,"routerLink","queryParams"],[4,"ngIf"],["type","text","autoNum","",1,"form-control",3,"modifyValueOnWheel","ngModel","ngModelChange"],[1,"text-center"],["class","fa-solid fa-delete-left fa-2x clear align-middle","matTooltipPosition","above","matTooltip","reset counter",3,"click",4,"ngIf"],[1,"fa-solid","fa-right-long"],["matTooltipPosition","above","matTooltip","reset counter",1,"fa-solid","fa-delete-left","fa-2x","clear","align-middle",3,"click"],["mat-button","","matStepperNext","","mat-raised-button","","matTooltip","Press right arrow key to go to the next page",1,"btn","btn-outline-secondary"],[1,"fa-solid","fa-user-check","me-3"],[3,"class",4,"ngIf"],[1,"fa-solid","fa-check","me-3"],[1,"alert"],[1,"fa-solid","fa-circle-exclamation","me-3"],[1,"container-fluid","row","mt-5"],[1,"col-8"],[1,"card"],[1,"card-header",2,"padding-bottom","15px"],[1,"fw-normal",2,"font-size","32px"],[1,"card-body","border-top"],[1,"row",2,"height","150px"],[1,"col","text-center","my-auto"],[1,"btn","btn-success","w-50",2,"font-size","20px",3,"click"],[1,"col-4"],[1,"card-header","bg-light-gray",2,"padding-bottom","15px","border-bottom","1px solid rgba(0, 0, 0, 0.125)","background-color","rgba(203, 203, 210, 0.15) !important"],[1,"fst-italic"],["target","_blank",3,"routerLink","queryParams"],[1,"card-body"],[1,"row","justify-content-between"],[1,"col-6",2,"font-size","14px"],[1,"col-3",2,"font-size","14px"],["class","col-3","style","font-size: 14px;",4,"ngIf"],["class","row justify-content-between my-5",4,"ngFor","ngForOf"],[1,"row","justify-content-between","fw-bold"],[1,"col-6"],[1,"col-3"],["class","col-3",3,"class",4,"ngIf"],[1,"row","justify-content-between","my-5"]],template:function(e,o){1&e&&t.YNc(0,Ui,4,6,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.loaderData)},dependencies:[l.mk,l.sg,l.O5,I.rH,A.p,c.Fj,c.JJ,c.On,T.w9,$t,ct,Wt,ni,oi,H.b,g.gM,Zt.YE,Zt.nU,C.qU],styles:['@import"https://fonts.googleapis.com/icon?family=Material+Icons";ng-select.custom[_ngcontent-%COMP%] .ng-select-container{border:1px solid red!important}.soft-green[_ngcontent-%COMP%]{background-color:#acd1af}.soft-yellow[_ngcontent-%COMP%]{background-color:#eeee9b}.alert[_ngcontent-%COMP%]{color:#691917;background-color:#f4d6d5;border-color:#f0c5c4}input[_ngcontent-%COMP%]::-webkit-outer-spin-button, input[_ngcontent-%COMP%]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.nb-button[_ngcontent-%COMP%]{position:absolute;right:10px;top:-2px;z-index:9999}.nb-button-override[_ngcontent-%COMP%]{top:40px!important}']})),n})();function Ji(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.confirmAdjust())}),t._uU(1,"Confirm Adjustment"),t.qZA()}}const Ei=function(){return["/menu/Products/Catalog/Products/Info"]},Fi=function(n){return{ID:n}};function Qi(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"tr",16)(1,"td"),t._UZ(2,"a",17),t.qZA(),t._UZ(3,"td",18)(4,"td",18)(5,"td",18)(6,"td",19)(7,"td",19),t.TgZ(8,"td",20)(9,"input",21),t.NdJ("ngModelChange",function(i){const p=t.CHM(e).$implicit;return t.KtG(p.NewQuantity=i)}),t.qZA()(),t.TgZ(10,"td",20),t._uU(11),t.ALo(12,"number"),t.qZA(),t.TgZ(13,"td")(14,"a",22),t.NdJ("click",function(){const s=t.CHM(e).$implicit,p=t.oxw(2);return t.KtG(p.confirmAdjust(s))}),t._uU(15,"Adjust"),t.qZA()()()}if(2&n){const e=r.$implicit;t.xp6(2),t.Q6J("routerLink",t.DdM(12,Ei))("queryParams",t.VKq(13,Fi,e.ProductID))("innerHTML",e.ProductName,t.oJD),t.xp6(1),t.Q6J("innerHTML",e.ParentCode,t.oJD),t.xp6(1),t.Q6J("innerHTML",e.Model,t.oJD),t.xp6(1),t.Q6J("innerHTML",e.ParentModel,t.oJD),t.xp6(1),t.Q6J("innerHTML",e.Ratio,t.oJD),t.xp6(1),t.Q6J("innerHTML",e.Inventory,t.oJD),t.xp6(2),t.Q6J("ngModel",e.NewQuantity),t.xp6(2),t.hij(" ",t.lcZ(12,10,e.Inventory-e.NewQuantity*e.Ratio)," ")}}function Li(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,Ji,2,0,"button",2),t.qZA(),t.TgZ(3,"filters")(4,"div",3)(5,"div",4)(6,"div")(7,"h6"),t._uU(8,"Outlets"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.pageData.Filter.EntityID=i)}),t.qZA()()()()(),t.TgZ(10,"content")(11,"div",6)(12,"div",7)(13,"table",8)(14,"thead",9)(15,"tr")(16,"th"),t._uU(17,"Product Name"),t.qZA(),t.TgZ(18,"th",10),t._uU(19,"Code"),t.qZA(),t.TgZ(20,"th",10),t._uU(21,"From"),t.qZA(),t.TgZ(22,"th",10),t._uU(23,"To"),t.qZA(),t.TgZ(24,"th",11),t._uU(25,"Ratio"),t.qZA(),t.TgZ(26,"th",11),t._uU(27,"Inventory"),t.qZA(),t.TgZ(28,"th",12),t._uU(29,"Convert Qty "),t.qZA(),t.TgZ(30,"th",12),t._uU(31,"Remaining"),t.qZA(),t._UZ(32,"th",13),t.qZA()(),t.TgZ(33,"tbody"),t.YNc(34,Qi,16,15,"tr",14),t.qZA()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.roleService.adjustment.Create),t.xp6(7),t.Q6J("items",e.pageData.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(25),t.Q6J("ngForOf",e.Items)}}let Hi=(()=>{class n extends x.n{constructor(e,o,i,s){super(e,"Adjustment/GetAdjustToParentList","Outlet/GetByUserAccessWrite"),(0,a.Z)(this,"toastr",void 0),(0,a.Z)(this,"router",void 0),(0,a.Z)(this,"roleService",void 0),(0,a.Z)(this,"Items",void 0),this.toastr=o,this.router=i,this.roleService=s}preGetList(){Z.gT.IsEmpty(this.pageData.Filter.EntityID)&&(this.pageData.Filter.EntityID=this.pageData.Entities[0].ID)}postInit(e){this.Items=e,this.Items.forEach(o=>o.NewQuantity=Math.floor(o.Inventory/o.Ratio))}confirmAdjust(e){let o=[],i=[];return e?i.push(e):i=this.Items,i.forEach(p=>{let S={VariantID:p.ParentID,Quantity:p.NewQuantity,Cost:p.UnitCost*p.Ratio,Price:p.UnitPrice*p.Ratio};o.push(S),S={VariantID:p.ID,Quantity:p.NewQuantity*p.Ratio*-1,Cost:p.UnitCost,Price:p.UnitPrice},o.push(S)}),o.length<1?(alert("You must atleast have one item to adjust!"),!1):Z.gT.IsEmpty(this.pageData.Filter.EntityID)?(alert("Outlet is require"),!1):void this.httpService.post("/API/Adjustment/SubmitUseDefault",JSON.stringify({Order:{EntityID:this.pageData.Filter.EntityID},Items:o})).subscribe({next:p=>{p.Success?this.router.navigate(["/menu/Adjustment/Adjustment/Archive/Info"],{queryParams:{ID:p.OrderID}}).then(()=>window.location.reload()):this.toastr.success(p.Message,v.n.Success)},error:p=>{this.toastr.error(p,v.n.Error)}})}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(b.O),t.Y36(h._W),t.Y36(I.F0),t.Y36(u.N))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-convert-inventory"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange"],[1,"container-fluid"],[1,"table-responsive"],["id","tableGrid",1,"table","hidden-xxs"],[1,"thead-light","sticky-top-thead"],[2,"width","125px"],[1,"text-end",2,"width","125px"],[1,"text-end",2,"width","100px"],[2,"width","80px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"btn","btn-success",3,"click"],[1,"border-bottom"],[3,"routerLink","queryParams","innerHTML"],[3,"innerHTML"],[1,"text-end",3,"innerHTML"],[1,"text-end"],["type","text","autoNum","",1,"text-end",3,"ngModel","ngModelChange"],[3,"click"]],template:function(e,o){1&e&&t.YNc(0,Li,35,6,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[l.sg,l.O5,I.rH,A.p,c.Fj,c.JJ,c.On,T.w9,H.b,l.JJ]})),n})();function Ri(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"button",16),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.openExportModal())}),t._UZ(1,"i",17),t._uU(2," Export"),t.qZA()}}function Yi(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"td",14)(1,"input",21),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw().$implicit;return t.KtG(s.Quantity=i)}),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.Quantity)}}function Vi(n,r){if(1&n&&(t.TgZ(0,"td",14),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",e.Quantity,"")}}function Bi(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"tr",18)(1,"td")(2,"i",19),t.NdJ("click",function(){const s=t.CHM(e).index,p=t.oxw();return t.KtG(p.products.splice(s,1))}),t.qZA()(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td",14),t._uU(6),t.qZA(),t.YNc(7,Yi,2,1,"td",20),t.YNc(8,Vi,2,1,"td",20),t.qZA()}if(2&n){const e=r.$implicit,o=t.oxw();t.xp6(4),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(1),t.Q6J("ngIf",o.roleService.adjustment.InventoryProductCount),t.xp6(1),t.Q6J("ngIf",!o.roleService.adjustment.InventoryProductCount)}}function Gi(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"button",19),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openExportModal())}),t._UZ(1,"i",20),t._uU(2," Export"),t.qZA()}}function zi(n,r){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=r.$implicit;t.xp6(1),t.Oqu(e+" ")}}function $i(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td",18),t._uU(6),t.ALo(7,"number"),t.qZA(),t.TgZ(8,"td",18),t._uU(9),t.ALo(10,"number"),t.qZA(),t.TgZ(11,"td",21),t.YNc(12,zi,2,1,"span",15),t.qZA()()),2&n){const e=r.$implicit;t.xp6(2),t.Oqu(e.ProductCode),t.xp6(2),t.Oqu(e.ProductName),t.xp6(2),t.Oqu(t.lcZ(7,5,e.UnitPrice)),t.xp6(3),t.Oqu(t.lcZ(10,7,e.Qty)),t.xp6(3),t.Q6J("ngForOf",e.Models)}}function Wi(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,Gi,3,0,"button",2),t.qZA(),t.TgZ(3,"filters")(4,"div",3)(5,"div",4)(6,"div")(7,"h6"),t._uU(8,"Outlets"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.pageData.Filter.EntityID=i)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"Categories"),t.qZA(),t.TgZ(13,"ng-select",6),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.pageData.Filter.CategoryID=i)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"Sort By"),t.qZA(),t.TgZ(17,"ng-select",7),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.pageData.Filter.SortByid=i)}),t.qZA()()()()(),t.TgZ(18,"content")(19,"div",8)(20,"table",9)(21,"thead",10)(22,"tr")(23,"th",11),t._uU(24,"Code"),t.qZA(),t.TgZ(25,"th",12),t._uU(26,"Name"),t.qZA(),t.TgZ(27,"th",13),t._uU(28,"UnitPrice"),t.qZA(),t.TgZ(29,"th",14),t._uU(30,"Qty"),t.qZA(),t.TgZ(31,"th"),t._uU(32,"Available Models"),t.qZA()()(),t.TgZ(33,"tbody"),t.YNc(34,$i,13,9,"tr",15),t.qZA(),t.TgZ(35,"tfoot")(36,"tr",16),t._UZ(37,"td",17),t.TgZ(38,"td",18),t._uU(39),t.ALo(40,"number"),t.ALo(41,"sum"),t.qZA(),t._UZ(42,"td"),t.qZA()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(7),t.Q6J("items",e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("items",e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(4),t.Q6J("items",e.pageData.Options.SortBy)("ngModel",e.pageData.Filter.SortByid),t.xp6(17),t.Q6J("ngForOf",e.data.Data),t.xp6(5),t.Oqu(t.lcZ(40,11,t.xi3(41,13,e.data.Data,"Qty")))}}const Xi=[{path:"Adjustment/Archive",component:Ue},{path:"Adjustment/Archive/Info",component:ve},{path:"Adjustment/Archive/Form",component:Ln},{path:"Tools/Count_Product_Inventory",component:(()=>{class n extends x.n{constructor(e,o,i,s){super(e),(0,a.Z)(this,"csvConverter",void 0),(0,a.Z)(this,"roleService",void 0),(0,a.Z)(this,"matDialog",void 0),(0,a.Z)(this,"productCode",void 0),(0,a.Z)(this,"products",void 0),this.csvConverter=o,this.roleService=i,this.matDialog=s,this.products=[]}onBarcodeEnter(e){const o=this.products.findIndex(i=>i.Code===e);-1!=o?this.products[o].Quantity++:this.httpService.post("/API/catalog/product/ProductCountByCode",JSON.stringify({code:e})).subscribe(i=>{i.Quantity=1,this.products.push(i)}),this.productCode=null}openExportModal(){this.matDialog.open(ot.H,{data:{title:"Count Product Inventory",exportTypes:[{ID:"ProductExport/ProductCountInventory",Value:"Default",FileName:"Count Product Inventory"}],filterExport:{Products:this.products,Export:!0,FormatType:this.pageData.Filter.FormatType},getAllDataLengthAPI:"",pagination:!1}})}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(b.O),t.Y36(M.O),t.Y36(u.N),t.Y36(j.uw))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-count-product-inventory"]],features:[t.qOj],decls:27,vars:6,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"cashier"],[1,"cart","big-cart","scan-cart"],[1,"barcode","barcode_counter","text-end"],[1,"me-5"],["aria-hidden","true",1,"fa-solid","fa-barcode","fa-2x","icon"],["type","text","placeholder","Scan Barcode Here","autofocus","",2,"width","200px",3,"ngModel","keyup.enter","ngModelChange"],[1,"content"],[1,"table"],["id","tableGrid",1,"cart","table","hidden-xxs"],[1,"thead-light","sticky-top-thead"],["width","15px"],[1,"text-end"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"border-bottom"],[1,"fa","fa-xmark","text-danger",2,"cursor","pointer",3,"click"],["class","text-end",4,"ngIf"],["type","text","autoNum","",1,"text-end",3,"ngModel","ngModelChange"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0)(1,"actions"),t.YNc(2,Ri,3,0,"button",1),t.qZA(),t.TgZ(3,"content")(4,"div",2)(5,"section",3)(6,"main")(7,"section",4)(8,"div",5)(9,"span",6),t._uU(10,"Barcode"),t.qZA(),t._UZ(11,"i",7),t.TgZ(12,"input",8),t.NdJ("keyup.enter",function(){return o.onBarcodeEnter(o.productCode)})("ngModelChange",function(s){return o.productCode=s}),t.qZA()(),t.TgZ(13,"div",9)(14,"div",10)(15,"table",11)(16,"thead",12)(17,"tr"),t._UZ(18,"th",13),t.TgZ(19,"th"),t._uU(20,"Name"),t.qZA(),t.TgZ(21,"th",14),t._uU(22,"Code"),t.qZA(),t.TgZ(23,"th",14),t._uU(24,"Qty"),t.qZA()()(),t.TgZ(25,"tbody"),t.YNc(26,Bi,9,4,"tr",15),t.qZA()()()()()()()()()()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.roleService.global.Export),t.xp6(10),t.Q6J("ngModel",o.productCode),t.xp6(14),t.Q6J("ngForOf",o.products))},dependencies:[l.sg,l.O5,A.p,c.Fj,c.JJ,c.On,H.b],styles:[".barcode_counter[_ngcontent-%COMP%]{position:fixed;right:10px;bottom:20px;background:#ffffff;border:1px solid #ddd;padding:8px 10px;border-radius:3px}.barcode_counter[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border-radius:3px;border:1px solid #b7b7b7;background-repeat:no-repeat;background-position:5px -211px;padding:4px 5px 4px 35px}.barcode_counter[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{position:relative;left:35px;vertical-align:middle}.barcode_counter[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:5px;color:#868686;left:30px;position:relative;margin-left:-25px}"]})),n})()},{path:"Tools/Convert_Inventory_to_Parent_UOM",component:Hi},{path:"Tools/Product_Sheet",component:(()=>{class n extends x.n{constructor(e,o,i,s){super(e,"catalog/product/GetOutletProductSheet","catalog/ProductLoader/GetOutletProductSheet"),(0,a.Z)(this,"csvConverter",void 0),(0,a.Z)(this,"roleService",void 0),(0,a.Z)(this,"matDialog",void 0),this.csvConverter=o,this.roleService=i,this.matDialog=s}openExportModal(){this.matDialog.open(ot.H,{data:{title:"Product Sheet",exportTypes:[{ID:"ProductExport/GetOutletProductSheet",Value:"Default",FileName:"Product Sheet"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(b.O),t.Y36(M.O),t.Y36(u.N),t.Y36(j.uw))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-product-sheet"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["placeholder","Choose an outlet","bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange"],["placeholder","Choose a category","bindLabel","Value","bindValue","Key",3,"items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key",3,"items","ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table","hidden-xxs"],[1,"thead-light","sticky-top-thead"],[2,"width","70px"],[2,"width","260px"],[1,"text-end",2,"width","120px"],[1,"text-end",2,"width","100px"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","3"],[1,"text-end"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[2,"word-spacing","20px"]],template:function(e,o){1&e&&t.YNc(0,Wi,43,16,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[l.sg,l.O5,A.p,c.JJ,c.On,T.w9,l.JJ,C.qU]})),n})()},{path:"Report/Adjustment",component:co},{path:"Adjustment/Stock_Take_by_Web_Spreadsheet",component:qi},{path:"Adjustment/Stock_Take_by_CSV",component:xo},{path:"",redirectTo:"Adjustment/Archive",pathMatch:"full"}];let ta=(()=>{class n{}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,a.Z)(n,"\u0275mod",t.oAB({type:n})),(0,a.Z)(n,"\u0275inj",t.cJS({imports:[I.Bz.forChild(Xi),I.Bz]})),n})();var ea=d(65131),na=d(59549),oa=d(77331),ia=d(56709);let aa=(()=>{class n{}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,a.Z)(n,"\u0275mod",t.oAB({type:n})),(0,a.Z)(n,"\u0275inj",t.cJS({imports:[l.ez,ta,A.R,c.u5,C.dr,P.ZU,T.A0,N.S,D.D,Nt.Q,V.d,B.Tx,rt._t,At.T,V.d,ii,Ht,lt.Ps,pt.K,ea.X,g.AV,na.lN,oa.Hi,E.XK,ia.p9,lt.Ps,Zt.JX,Dt.U,wt.G,Ot.E,jt.O,Ut.Gg,Wn]})),n})()},69753:(G,k,d)=>{d.d(k,{O:()=>l});var a=d(81180);class l{constructor(){(0,a.Z)(this,"ID",void 0),(0,a.Z)(this,"Name",void 0),(0,a.Z)(this,"Code",void 0),(0,a.Z)(this,"UnitCost",void 0),(0,a.Z)(this,"UnitPrice",void 0),(0,a.Z)(this,"UnitExpense",void 0),(0,a.Z)(this,"Start",void 0),(0,a.Z)(this,"Finish",void 0),(0,a.Z)(this,"UnitQuantity",void 0),(0,a.Z)(this,"PriceDiscount",void 0),(0,a.Z)(this,"UnitPriceOriginal",void 0),(0,a.Z)(this,"Description",void 0),(0,a.Z)(this,"UOM",void 0),(0,a.Z)(this,"UOMName",void 0),(0,a.Z)(this,"ImageUrl",void 0),(0,a.Z)(this,"TypeID",void 0),(0,a.Z)(this,"SellPriceType",void 0),(0,a.Z)(this,"UnitsInStock",void 0),(0,a.Z)(this,"Ordered",void 0),(0,a.Z)(this,"OrderPrice",void 0),(0,a.Z)(this,"OrderPriceDiscount",void 0),(0,a.Z)(this,"Taxable",void 0),(0,a.Z)(this,"LoyaltyPoint",void 0),(0,a.Z)(this,"LoyaltyPointRedeemable",void 0),(0,a.Z)(this,"CategoryName",void 0),(0,a.Z)(this,"CategoryID",void 0),(0,a.Z)(this,"CategoryTypeID",void 0),(0,a.Z)(this,"Serial",void 0),(0,a.Z)(this,"PriceTypeID",void 0),(0,a.Z)(this,"PriceNote",void 0),(0,a.Z)(this,"PaymentTypeID",void 0),(0,a.Z)(this,"Config",void 0),(0,a.Z)(this,"ThumbnailUrl",void 0),(0,a.Z)(this,"Storage",void 0),(0,a.Z)(this,"DiscountAmount",void 0),(0,a.Z)(this,"Component",void 0),(0,a.Z)(this,"PriceBook",void 0),(0,a.Z)(this,"VariantUnitQuantity",void 0),(0,a.Z)(this,"SerialNote",void 0)}}},3077:(G,k,d)=>{d.d(k,{T:()=>b,v:()=>t});var a=d(81180),l=d(36895),c=d(94650),T=d(24006),P=d(65131),C=d(89156),A=d(83902);function D(h,M){if(1&h&&(c.TgZ(0,"span"),c._uU(1),c.qZA()),2&h){const u=c.oxw();c.xp6(1),c.AsE(" Showing ",u.pageData.Filter.PageNumber*u.total-u.total+1," - ",u.pageData.Filter.PageNumber*u.total," ")}}function N(h,M){if(1&h&&(c.TgZ(0,"span"),c._uU(1),c.qZA()),2&h){const u=c.oxw();c.xp6(1),c.AsE(" Showing ",u.pageData.Filter.RowCount*u.pageData.Filter.PageNumber-u.pageData.Filter.RowCount+1," - ",u.pageData.Filter.RowCount*u.pageData.Filter.PageNumber-u.pageData.Filter.RowCount+u.total," ")}}function I(h,M){if(1&h){const u=c.EpF();c.TgZ(0,"span",8),c.NdJ("click",function(){c.CHM(u);const m=c.oxw();return c.KtG(m.StoreRowsCountAPIResult())}),c.TgZ(1,"i",9),c._uU(2,"?"),c.qZA()()}}function x(h,M){if(1&h&&(c.TgZ(0,"span"),c._uU(1),c.ALo(2,"number"),c.qZA()),2&h){const u=c.oxw();c.xp6(1),c.hij(" of ",c.lcZ(2,1,u.listTotal),"")}}function v(h,M){if(1&h){const u=c.EpF();c.TgZ(0,"a",10),c.NdJ("click",function(){c.CHM(u);const m=c.oxw();return c.KtG(m.onPreviousPage())}),c._UZ(1,"i",11),c._uU(2," Previous"),c.qZA()}}function y(h,M){if(1&h){const u=c.EpF();c.TgZ(0,"a",10),c.NdJ("click",function(){c.CHM(u);const m=c.oxw();return c.KtG(m.onNextPage())}),c._UZ(1,"i",12),c._uU(2," Next"),c.qZA()}}let t=(()=>{class h{constructor(u){(0,a.Z)(this,"httpService",void 0),(0,a.Z)(this,"pageData",void 0),(0,a.Z)(this,"total",void 0),(0,a.Z)(this,"api",void 0),(0,a.Z)(this,"jumpToPage",new c.vpe),(0,a.Z)(this,"previousPage",new c.vpe),(0,a.Z)(this,"nextPage",new c.vpe),(0,a.Z)(this,"pageNumber",1),(0,a.Z)(this,"showingNumber",this.pageNumber),(0,a.Z)(this,"listTotal",-1),this.httpService=u}onJumpToPage(u){"Enter"===u.key&&(this.pageData.Filter.PageNumber=this.pageNumber,this.showingNumber=this.pageNumber,this.jumpToPage.emit())}onPreviousPage(){this.pageData.Filter.PageNumber-=1,this.pageNumber=this.pageData.Filter.PageNumber,this.showingNumber=this.pageNumber,this.previousPage.emit()}onNextPage(){this.pageData.Filter.PageNumber+=1,this.pageNumber=this.pageData.Filter.PageNumber,this.showingNumber=this.pageNumber,this.nextPage.emit()}StoreRowsCountAPIResult(){this.httpService.post("/api/"+this.api,JSON.stringify(this.pageData.Filter)).subscribe(u=>{this.listTotal=u.Count?u.Count:u,this.pageData.HideStoreApiCount=!0})}}return(0,a.Z)(h,"\u0275fac",function(u){return new(u||h)(c.Y36(C.O))}),(0,a.Z)(h,"\u0275cmp",c.Xpm({type:h,selectors:[["POS-complex-pagination"]],inputs:{pageData:"pageData",total:"total",api:"api"},outputs:{jumpToPage:"jumpToPage",previousPage:"previousPage",nextPage:"nextPage"},decls:12,vars:7,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],[4,"ngIf"],["style","cursor: pointer",3,"click",4,"ngIf"],["type","text","autoNum","",1,"text-end",2,"width","45px",3,"ngModel","keyup","ngModelChange"],[1,"btn-group"],["class","btn btn-outline-secondary btn-sm text-primary",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],[1,"border","p-3"],[1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-left"],[1,"fa-solid","fa-arrow-right"]],template:function(u,g){1&u&&(c.TgZ(0,"div",0)(1,"div",1)(2,"div",2),c.YNc(3,D,2,2,"span",3),c.YNc(4,N,2,2,"span",3),c.YNc(5,I,3,0,"span",4),c.YNc(6,x,3,3,"span",3),c._uU(7," records ~ Page "),c.TgZ(8,"input",5),c.NdJ("keyup",function(_){return g.onJumpToPage(_)})("ngModelChange",function(_){return g.pageNumber=_}),c.qZA()()(),c.TgZ(9,"div",6),c.YNc(10,v,3,0,"a",7),c.YNc(11,y,3,0,"a",7),c.qZA()()),2&u&&(c.xp6(3),c.Q6J("ngIf",g.pageData.Filter.RowCount==g.total),c.xp6(1),c.Q6J("ngIf",g.pageData.Filter.RowCount!=g.total),c.xp6(1),c.Q6J("ngIf",!g.pageData.HideStoreApiCount),c.xp6(1),c.Q6J("ngIf",g.pageData.HideStoreApiCount),c.xp6(2),c.Q6J("ngModel",g.pageNumber),c.xp6(2),c.Q6J("ngIf",1!=g.pageData.Filter.PageNumber),c.xp6(1),c.Q6J("ngIf",g.total>=g.pageData.Filter.RowCount))},dependencies:[l.O5,T.Fj,T.JJ,T.On,A.b,l.JJ]})),h})(),b=(()=>{class h{}return(0,a.Z)(h,"\u0275fac",function(u){return new(u||h)}),(0,a.Z)(h,"\u0275mod",c.oAB({type:h})),(0,a.Z)(h,"\u0275inj",c.cJS({imports:[l.ez,T.u5,T.UX,P.X]})),h})()},11594:(G,k,d)=>{d.d(k,{K:()=>I,P:()=>N});var a=d(81180),l=d(94650),c=d(10266),T=d(71948),P=d(36895),C=d(24006);const A=function(x,v){return{color:x,"font-weight":v}};function D(x,v){if(1&x&&(l.TgZ(0,"mat-radio-button",2),l._uU(1),l.qZA()),2&x){const y=v.$implicit,t=v.index,b=l.oxw();l.Akn(l.WLB(7,A,b.model==y.Key&&b.activeBold?"#0976b4":"",b.model==y.Key&&b.activeBold?"700":"")),l.Q6J("disabled",b.exception==y.Value)("matTooltip",b.title.length>0?b.title[t]:"")("value",y.Key)("name",b.name),l.xp6(1),l.hij("",y.Value," ")}}let N=(()=>{class x{constructor(){(0,a.Z)(this,"model",void 0),(0,a.Z)(this,"disabled",void 0),(0,a.Z)(this,"modelChange",new l.vpe),(0,a.Z)(this,"options",[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"}]),(0,a.Z)(this,"border",!1),(0,a.Z)(this,"name",void 0),(0,a.Z)(this,"title",[]),(0,a.Z)(this,"exception",void 0),(0,a.Z)(this,"activeBold",void 0)}change(y){this.modelChange.emit(y)}}return(0,a.Z)(x,"\u0275fac",function(y){return new(y||x)}),(0,a.Z)(x,"\u0275cmp",l.Xpm({type:x,selectors:[["radio-options"]],inputs:{model:"model",disabled:"disabled",options:"options",border:"border",name:"name",title:"title",exception:"exception",activeBold:"activeBold"},outputs:{modelChange:"modelChange"},decls:2,vars:3,consts:[["color","primary",3,"disabled","ngModel","ngModelChange"],["matTooltipPosition","above","class","me-4 mt-1",3,"style","disabled","matTooltip","value","name",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"me-4","mt-1",3,"disabled","matTooltip","value","name"]],template:function(y,t){1&y&&(l.TgZ(0,"mat-radio-group",0),l.NdJ("ngModelChange",function(h){return t.change(h)}),l.YNc(1,D,2,10,"mat-radio-button",1),l.qZA()),2&y&&(l.Q6J("disabled",t.disabled)("ngModel",t.model),l.xp6(1),l.Q6J("ngForOf",t.options))},dependencies:[T.VQ,T.U0,P.sg,C.JJ,C.On,c.gM],styles:[".mat-mdc-radio-button .mdc-radio{padding:8px;margin:0}.mat-mdc-radio-button .mdc-radio .mdc-radio__background:before{top:-8px;left:-8px;width:36px;height:36px}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control{top:0;right:0;left:0;width:36px;height:36px}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#0976b4!important}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{background-color:#0976b4!important;border-color:#0976b4!important}\n"],encapsulation:2})),x})(),I=(()=>{class x{}return(0,a.Z)(x,"\u0275fac",function(y){return new(y||x)}),(0,a.Z)(x,"\u0275mod",l.oAB({type:x})),(0,a.Z)(x,"\u0275inj",l.cJS({imports:[T.Fk,P.ez,C.u5,c.AV]})),x})()},29766:(G,k,d)=>{d.d(k,{Gg:()=>M,cL:()=>h});var a=d(36895),l=d(94650),c=d(24006),T=d(10805),P=d(51740);const C=["inputtext"];function A(u,g){1&u&&l.GkF(0)}function D(u,g){if(1&u&&(l.TgZ(0,"span",12),l._uU(1),l.qZA()),2&u){const m=l.oxw().$implicit,_=l.oxw();l.xp6(1),l.Oqu(_.field?_.resolveFieldData(m,_.field):m)}}function N(u,g){if(1&u){const m=l.EpF();l.TgZ(0,"span",13),l.NdJ("click",function(f){l.CHM(m);const O=l.oxw().index,U=l.oxw();return l.KtG(U.removeItem(f,O))}),l.qZA()}}const I=function(u){return{$implicit:u}};function x(u,g){if(1&u){const m=l.EpF();l.TgZ(0,"li",7,8),l.NdJ("click",function(f){const U=l.CHM(m).$implicit,L=l.oxw();return l.KtG(L.onItemClick(f,U))}),l.YNc(2,A,1,0,"ng-container",9),l.YNc(3,D,2,1,"span",10),l.YNc(4,N,1,0,"span",11),l.qZA()}if(2&u){const m=g.$implicit,_=l.oxw();l.xp6(2),l.Q6J("ngTemplateOutlet",_.itemTemplate)("ngTemplateOutletContext",l.VKq(4,I,m)),l.xp6(1),l.Q6J("ngIf",!_.itemTemplate),l.xp6(1),l.Q6J("ngIf",!_.disabled)}}function v(u,g){if(1&u){const m=l.EpF();l.TgZ(0,"li")(1,"i",14),l.NdJ("click",function(){l.CHM(m);const f=l.oxw();return l.KtG(f.clear())}),l.qZA()()}}const y=function(u,g){return{"p-inputtext p-chips-multiple-container":!0,"p-focus":u,"p-disabled":g}},t=function(u){return{"p-chips-clearable":u}},b={provide:c.JU,useExisting:(0,l.Gpc)(()=>h),multi:!0};let h=(()=>{class u{constructor(m,_){this.el=m,this.cd=_,this.allowDuplicate=!0,this.showClear=!1,this.onAdd=new l.vpe,this.onRemove=new l.vpe,this.onFocus=new l.vpe,this.onBlur=new l.vpe,this.onChipClick=new l.vpe,this.onClear=new l.vpe,this.onModelChange=()=>{},this.onModelTouched=()=>{}}ngAfterContentInit(){this.templates.forEach(m=>{m.getType(),this.itemTemplate=m.template}),this.updateFilledState()}onClick(){this.inputViewChild.nativeElement.focus()}onInput(){this.updateFilledState()}onPaste(m){this.disabled||(this.separator&&((m.clipboardData||window.clipboardData).getData("Text").split(this.separator).forEach(f=>{this.addItem(m,f,!0)}),this.inputViewChild.nativeElement.value=""),this.updateFilledState())}updateFilledState(){this.filled=!(!this.value||0===this.value.length)||this.inputViewChild&&this.inputViewChild.nativeElement&&""!=this.inputViewChild.nativeElement.value}onItemClick(m,_){this.onChipClick.emit({originalEvent:m,value:_})}writeValue(m){this.value=m,this.updateMaxedOut(),this.updateFilledState(),this.cd.markForCheck()}registerOnChange(m){this.onModelChange=m}registerOnTouched(m){this.onModelTouched=m}setDisabledState(m){this.disabled=m,this.cd.markForCheck()}resolveFieldData(m,_){if(m&&_){if(-1==_.indexOf("."))return m[_];{let U=_.split("."),L=m;for(var f=0,O=U.length;f<O;++f)L=L[U[f]];return L}}return null}onInputFocus(m){this.focus=!0,this.onFocus.emit(m)}onInputBlur(m){this.focus=!1,this.addOnBlur&&this.inputViewChild.nativeElement.value&&this.addItem(m,this.inputViewChild.nativeElement.value,!1),this.onModelTouched(),this.onBlur.emit(m)}removeItem(m,_){if(this.disabled)return;let f=this.value[_];this.value=this.value.filter((O,U)=>U!=_),this.onModelChange(this.value),this.onRemove.emit({originalEvent:m,value:f}),this.updateFilledState(),this.updateMaxedOut()}addItem(m,_,f){this.value=this.value||[],_&&_.trim().length&&(this.allowDuplicate||-1===this.value.indexOf(_))&&(this.value=[...this.value,_],this.onModelChange(this.value),this.onAdd.emit({originalEvent:m,value:_})),this.updateFilledState(),this.updateMaxedOut(),this.inputViewChild.nativeElement.value="",f&&m.preventDefault()}clear(){this.value=null,this.updateFilledState(),this.onModelChange(this.value),this.onClear.emit()}onKeydown(m){switch(m.which){case 8:if(0===this.inputViewChild.nativeElement.value.length&&this.value&&this.value.length>0){this.value=[...this.value];let _=this.value.pop();this.onModelChange(this.value),this.onRemove.emit({originalEvent:m,value:_}),this.updateFilledState()}break;case 13:this.addItem(m,this.inputViewChild.nativeElement.value,!0);break;case 9:this.addOnTab&&""!==this.inputViewChild.nativeElement.value&&this.addItem(m,this.inputViewChild.nativeElement.value,!0);break;default:this.max&&this.value&&this.max===this.value.length?m.preventDefault():this.separator&&(this.separator===m.key||m.key.match(this.separator))&&this.addItem(m,this.inputViewChild.nativeElement.value,!0)}}updateMaxedOut(){this.inputViewChild&&this.inputViewChild.nativeElement&&(this.max&&this.value&&this.max===this.value.length?(this.inputViewChild.nativeElement.blur(),this.inputViewChild.nativeElement.disabled=!0):(this.disabled&&this.inputViewChild.nativeElement.blur(),this.inputViewChild.nativeElement.disabled=this.disabled||!1))}}return u.\u0275fac=function(m){return new(m||u)(l.Y36(l.SBq),l.Y36(l.sBO))},u.\u0275cmp=l.Xpm({type:u,selectors:[["p-chips"]],contentQueries:function(m,_,f){if(1&m&&l.Suo(f,T.jx,4),2&m){let O;l.iGM(O=l.CRH())&&(_.templates=O)}},viewQuery:function(m,_){if(1&m&&l.Gf(C,5),2&m){let f;l.iGM(f=l.CRH())&&(_.inputViewChild=f.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(m,_){2&m&&l.ekj("p-inputwrapper-filled",_.filled)("p-inputwrapper-focus",_.focus)("p-chips-clearable",_.showClear)},inputs:{style:"style",styleClass:"styleClass",disabled:"disabled",field:"field",placeholder:"placeholder",max:"max",ariaLabelledBy:"ariaLabelledBy",tabindex:"tabindex",inputId:"inputId",allowDuplicate:"allowDuplicate",inputStyle:"inputStyle",inputStyleClass:"inputStyleClass",addOnTab:"addOnTab",addOnBlur:"addOnBlur",separator:"separator",showClear:"showClear"},outputs:{onAdd:"onAdd",onRemove:"onRemove",onFocus:"onFocus",onBlur:"onBlur",onChipClick:"onChipClick",onClear:"onClear"},features:[l._Bn([b])],decls:7,vars:21,consts:[[3,"ngClass","ngStyle","click"],[3,"ngClass"],["class","p-chips-token",3,"click",4,"ngFor","ngForOf"],[1,"p-chips-input-token",3,"ngClass"],["type","text",3,"disabled","ngStyle","keydown","input","paste","focus","blur"],["inputtext",""],[4,"ngIf"],[1,"p-chips-token",3,"click"],["token",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-chips-token-label",4,"ngIf"],["class","p-chips-token-icon pi pi-times-circle",3,"click",4,"ngIf"],[1,"p-chips-token-label"],[1,"p-chips-token-icon","pi","pi-times-circle",3,"click"],[1,"p-chips-clear-icon","pi","pi-times",3,"click"]],template:function(m,_){1&m&&(l.TgZ(0,"div",0),l.NdJ("click",function(){return _.onClick()}),l.TgZ(1,"ul",1),l.YNc(2,x,5,6,"li",2),l.TgZ(3,"li",3)(4,"input",4,5),l.NdJ("keydown",function(O){return _.onKeydown(O)})("input",function(){return _.onInput()})("paste",function(O){return _.onPaste(O)})("focus",function(O){return _.onInputFocus(O)})("blur",function(O){return _.onInputBlur(O)}),l.qZA()(),l.YNc(6,v,2,0,"li",6),l.qZA()()),2&m&&(l.Tol(_.styleClass),l.Q6J("ngClass","p-chips p-component")("ngStyle",_.style),l.xp6(1),l.Q6J("ngClass",l.WLB(16,y,_.focus,_.disabled)),l.xp6(1),l.Q6J("ngForOf",_.value),l.xp6(1),l.Q6J("ngClass",l.VKq(19,t,_.showClear&&!_.disabled)),l.xp6(1),l.Tol(_.inputStyleClass),l.Q6J("disabled",_.disabled)("ngStyle",_.inputStyle),l.uIk("id",_.inputId)("placeholder",_.value&&_.value.length?null:_.placeholder)("tabindex",_.tabindex)("aria-labelledby",_.ariaLabelledBy),l.xp6(2),l.Q6J("ngIf",null!=_.value&&_.filled&&!_.disabled&&_.showClear))},dependencies:[a.mk,a.sg,a.O5,a.tP,a.PC],styles:[".p-chips{display:inline-flex}.p-chips-multiple-container{margin:0;padding:0;list-style-type:none;cursor:text;overflow:hidden;display:flex;align-items:center;flex-wrap:wrap}.p-chips-token{cursor:default;display:inline-flex;align-items:center;flex:0 0 auto;max-width:100%}.p-chips-token-label{min-width:0%;overflow:auto}.p-chips-token-label::-webkit-scrollbar{display:none}.p-chips-input-token{flex:1 1 auto;display:inline-flex}.p-chips-token-icon{cursor:pointer}.p-chips-input-token input{border:0 none;outline:0 none;background-color:transparent;margin:0;padding:0;box-shadow:none;border-radius:0;width:100%}.p-fluid .p-chips{display:flex}.p-chips-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-chips-clearable .p-inputtext{position:relative}\n"],encapsulation:2,changeDetection:0}),u})(),M=(()=>{class u{}return u.\u0275fac=function(m){return new(m||u)},u.\u0275mod=l.oAB({type:u}),u.\u0275inj=l.cJS({imports:[a.ez,P.j,T.m8,P.j,T.m8]}),u})()},51740:(G,k,d)=>{d.d(k,{j:()=>P,o:()=>T});var a=d(94650),l=d(36895),c=d(24006);let T=(()=>{class C{constructor(D,N,I){this.el=D,this.ngModel=N,this.cd=I}ngAfterViewInit(){this.updateFilledState(),this.cd.detectChanges()}ngDoCheck(){this.updateFilledState()}onInput(D){this.updateFilledState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model}}return C.\u0275fac=function(D){return new(D||C)(a.Y36(a.SBq),a.Y36(c.On,8),a.Y36(a.sBO))},C.\u0275dir=a.lG2({type:C,selectors:[["","pInputText",""]],hostAttrs:[1,"p-inputtext","p-component","p-element"],hostVars:2,hostBindings:function(D,N){1&D&&a.NdJ("input",function(x){return N.onInput(x)}),2&D&&a.ekj("p-filled",N.filled)}}),C})(),P=(()=>{class C{}return C.\u0275fac=function(D){return new(D||C)},C.\u0275mod=a.oAB({type:C}),C.\u0275inj=a.cJS({imports:[l.ez]}),C})()}}]);
|