dealpos 11.5.4 → 11.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/POS/1262.b7489dfe20fd336f.js +1 -0
  2. package/POS/1754.26cac5cccc3ad791.js +1 -0
  3. package/POS/2141.efcbc77105e546a7.js +1 -0
  4. package/POS/{3411.1cc794e7676314c6.js → 3411.892af55c19b6dcf1.js} +1 -1
  5. package/POS/3651.a01d487639fd9135.js +1 -0
  6. package/POS/3751.4f0c38f2d0658ef8.js +1 -0
  7. package/POS/4806.70527d855509c90d.js +1 -0
  8. package/POS/4927.10796f94d8788d11.js +1 -0
  9. package/POS/{5591.157a42b8d7d31c9e.js → 4941.88c16e44b2573ad4.js} +1 -1
  10. package/POS/{5263.f330c6663246bbcc.js → 5263.e7a0f4665913ce73.js} +1 -1
  11. package/POS/6173.8aa8ef86dd7b31a9.js +1 -0
  12. package/POS/{6485.ab0e9ca8db8c16cc.js → 6485.d0714cc1f9915298.js} +1 -1
  13. package/POS/{8589.4217047acff15c98.js → 8589.c34d10f9a3074ad6.js} +1 -1
  14. package/POS/9951.1aa1e543b7146f56.js +1 -0
  15. package/POS/{9997.b8037d3046163b2c.js → 9997.a477c7c50da5ba91.js} +1 -1
  16. package/POS/{common.a6a64a4451ad067d.js → common.629cc5391cf0a968.js} +1 -1
  17. package/POS/index.html +2 -2
  18. package/POS/main.b001b51a09ac8c56.js +1 -0
  19. package/POS/{runtime.023a1c9a4a378eff.js → runtime.b1612200266b5c12.js} +1 -1
  20. package/package.json +1 -1
  21. package/POS/1262.f37b281b6c21a872.js +0 -1
  22. package/POS/1754.955584599aaad375.js +0 -1
  23. package/POS/2141.9857218363a60e8e.js +0 -1
  24. package/POS/3651.f9cb9160484a9aeb.js +0 -1
  25. package/POS/3751.9056b6aaf2694520.js +0 -1
  26. package/POS/4806.758c779485bf399b.js +0 -1
  27. package/POS/4927.d656776c0bc4cde1.js +0 -1
  28. package/POS/6173.eb0360f8cfac6102.js +0 -1
  29. package/POS/9951.b067a6211081203e.js +0 -1
  30. package/POS/main.ed7897e4c2a95003.js +0 -1
@@ -0,0 +1 @@
1
+ (self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[1262],{81262:(Vt,A,u)=>{"use strict";u.r(A),u.d(A,{ProductModule:()=>tu});var c=u(69808),l=u(71787),v=u(4077),b=u(48966),Q=u(42046),t=u(5e3),N=u(63165),y=u(24376),s=u(93075);let et=(()=>{class n{constructor(e,o){this.dialogRef=e,this.data=o,this.Model=o,this.configModal=new Q.O,this.configModal.showMoreButton=!0,this.configModal.title="Move to Category",this.configModal.hideCancel=!0,this.configModal.hideOk=!0}onOk(){this.dialogRef.close({Model:this.Model})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.so),t.Y36(b.WI))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-modal-move-category"]],decls:12,vars:3,consts:[[3,"config","onOk","onCancel","onClose"],[1,"section-content",2,"width","332px","max-width","100%"],[1,"row"],[1,"col-sm-12"],["bindLabel","Value","bindValue","Key","appendTo","body","placeholder","Choose a Category",3,"items","ngModel","ngModelChange"],[1,"col-12"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","me-4",3,"click"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","ng-scope","ng-isolate-scope",3,"click"]],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",3)(5,"ng-select",4),t.NdJ("ngModelChange",function(r){return o.Model.Form.CategoryID=r}),t.qZA()()()()(),t.TgZ(6,"footer")(7,"div",5)(8,"a",6),t.NdJ("click",function(){return o.dialogRef.close()}),t._uU(9," Cancel "),t.qZA(),t.TgZ(10,"a",7),t.NdJ("click",function(){return o.onOk()}),t._uU(11,"Ok (F2) "),t.qZA()()()()),2&e&&(t.Q6J("config",o.configModal),t.xp6(5),t.Q6J("items",null==o.Model.Options?null:o.Model.Options.Categories)("ngModel",o.Model.Form.CategoryID))},directives:[N.M,y.w9,s.JJ,s.On],styles:[""]}),n})();var L=u(55411),ct=u.n(L),_=u(89156),f=u(22290),g=u(24424),m=u(30273),q=u(11594),E=u(6553),F=u(29772),w=u(93669);function st(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"input",12),t.NdJ("change",function(a){return t.CHM(e),t.oxw(2).onSelectAllProducts(a.target.checked)}),t.qZA()}}function pt(n,i){if(1&n&&(t.TgZ(0,"th",10),t.YNc(1,st,1,0,"input",11),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.data.CheckBoxVisible)}}function ht(n,i){1&n&&(t.TgZ(0,"th",13),t._uU(1,"Price"),t.qZA())}function at(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"input",24),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).$implicit.selected=a}),t.qZA()}if(2&n){const e=t.oxw(2).$implicit;t.Q6J("ngModel",e.selected)}}function xt(n,i){if(1&n&&(t.TgZ(0,"td",10),t.YNc(1,at,1,1,"input",23),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.data.CheckBoxVisible)}}const it=function(n){return{width:n}};function dt(n,i){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"img",25),t.NdJ("click",function(a){t.CHM(e);const r=t.oxw().$implicit;return t.oxw().onOpenBigPicture(r,a)}),t.qZA(),t.BQk()}if(2&n){const e=t.oxw().$implicit,o=t.oxw();t.xp6(1),t.Akn(t.VKq(3,it,o.data.ThumbnailWidth+"px")),t.Q6J("src",e.ThumbnailUrl,t.LSH)}}const M=function(){return["/menu/Products/Catalog/Products/Info"]},D=function(n){return{ID:n}};function nt(n,i){if(1&n&&(t.TgZ(0,"a",26),t._UZ(1,"img",27),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw();t.Q6J("routerLink",t.DdM(5,M))("queryParams",t.VKq(6,D,e.ID)),t.xp6(1),t.Akn(t.VKq(8,it,o.data.ThumbnailWidth+"px")),t.MGl("src","//res.cloudinary.com/pos/image/upload/w_",o.data.ThumbnailWidth,"/POS/Images/Icon/products_thumb.png",t.LSH)}}function X(n,i){if(1&n&&(t.TgZ(0,"i",28),t._UZ(1,"br"),t._uU(2),t.ALo(3,"number"),t.ALo(4,"sum"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(2),t.hij(" ( ",t.lcZ(3,1,t.xi3(4,3,e.Variants,"Inventory"))," On Hand ) ")}}function ut(n,i){if(1&n&&(t.TgZ(0,"i",35),t._uU(1),t.qZA()),2&n){const e=t.oxw(2).$implicit;t.xp6(1),t.Oqu(" - "+e.Allocated+" Allocated ")}}function J(n,i){if(1&n&&(t.ynx(0),t.TgZ(1,"i",28),t._uU(2),t.qZA(),t.YNc(3,ut,2,1,"i",34),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(2),t.hij("( ",e.Inventory," On Hand )"),t.xp6(1),t.Q6J("ngIf",e.Allocated)}}function S(n,i){if(1&n&&(t.TgZ(0,"i",35),t._uU(1),t.qZA()),2&n){const e=t.oxw(2).$implicit;t.xp6(1),t.Oqu(" - "+e.Allocated+" Allocated ")}}function V(n,i){if(1&n&&(t.ynx(0),t.TgZ(1,"i",28),t._uU(2,"( 0 On Hand )"),t.qZA(),t.YNc(3,S,2,1,"i",34),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(3),t.Q6J("ngIf",e.Allocated)}}const R=function(){return["/menu/Products/Catalog/Variants/Info"]},Dt=function(n){return{"text-decoration-line-through":n}};function kt(n,i){if(1&n&&(t.TgZ(0,"li",31)(1,"a",32)(2,"span"),t._uU(3),t.qZA()(),t.TgZ(4,"small",33),t._uU(5),t.qZA(),t.YNc(6,J,4,2,"ng-container",16),t.YNc(7,V,4,1,"ng-container",16),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(3);t.xp6(1),t.s9C("target",o.pageData.LinkTarget),t.Q6J("routerLink",t.DdM(9,R))("queryParams",t.VKq(10,D,e.ID)),t.xp6(1),t.Tol(t.VKq(12,Dt,e.Discontinued)),t.xp6(1),t.Oqu(e.Model),t.xp6(2),t.Oqu(e.Code),t.xp6(1),t.Q6J("ngIf",null!=e.Inventory&&o.pageData.Roles.HasInventoryView),t.xp6(1),t.Q6J("ngIf",null==e.Inventory&&o.pageData.IsAlwaysRendered&&o.pageData.Roles.HasInventoryView)}}function At(n,i){if(1&n&&(t.TgZ(0,"ul",29),t.YNc(1,kt,8,14,"li",30),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",e.Variants)}}function Ft(n,i){if(1&n&&(t.TgZ(0,"td",36),t._uU(1),t.ALo(2,"MinToMax"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.Variants,"UnitPrice")," ")}}function Qt(n,i){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,xt,2,1,"td",3),t.TgZ(2,"td")(3,"div",14)(4,"div",15),t.YNc(5,dt,2,5,"ng-container",16),t.ynx(6),t.YNc(7,nt,2,10,"a",17),t.BQk(),t.qZA(),t.TgZ(8,"div",18)(9,"a",19),t._uU(10),t.qZA()()()(),t.TgZ(11,"td"),t._uU(12),t.YNc(13,X,5,6,"i",20),t.qZA(),t.TgZ(14,"td"),t._uU(15),t.qZA(),t.TgZ(16,"td"),t.YNc(17,At,2,1,"ul",21),t.qZA(),t.YNc(18,Ft,3,4,"td",22),t.TgZ(19,"td"),t._uU(20),t.ALo(21,"date"),t.qZA()()),2&n){const e=i.$implicit,o=t.oxw();t.xp6(1),t.Q6J("ngIf",o.pageData.Roles.HasProductEditor),t.xp6(4),t.Q6J("ngIf",e.ImageUrl),t.xp6(2),t.Q6J("ngIf",!e.ImageUrl),t.xp6(2),t.Tol(t.VKq(18,Dt,e.Discontinued)),t.Q6J("routerLink",t.DdM(20,M))("queryParams",t.VKq(21,D,e.ID))("target",o.pageData.LinkTarget),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.hij("",e.Code," "),t.xp6(1),t.Q6J("ngIf",o.pageData.IsAlwaysRendered),t.xp6(2),t.Oqu(e.Category),t.xp6(2),t.Q6J("ngIf",e.Variants),t.xp6(1),t.Q6J("ngIf",o.data.PriceVisible),t.xp6(2),t.Oqu(t.xi3(21,15,e.Released,"dd MMM yy"))}}let K=(()=>{class n{constructor(){this.selectAllProducts=new t.vpe,this.openBigPicture=new t.vpe}onSelectAllProducts(e){this.selectAllProducts.emit(e)}onOpenBigPicture(e,o){this.openBigPicture.emit({product:e,pEvent:o})}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-product-list-desktop"]],inputs:{data:"data",pageData:"pageData"},outputs:{selectAllProducts:"selectAllProducts",openBigPicture:"openBigPicture"},decls:17,vars:3,consts:[["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],["style","width: 14px",4,"ngIf"],[2,"width","320px"],[2,"width","120px"],[2,"width","110px"],["class","text-end","style","width: 140px;",4,"ngIf"],[2,"width","80px"],[4,"ngFor","ngForOf"],[2,"width","14px"],["type","checkbox",3,"change",4,"ngIf"],["type","checkbox",3,"change"],[1,"text-end",2,"width","140px"],[1,"d-flex","flex-row"],[2,"cursor","pointer"],[4,"ngIf"],["class","d-block",3,"routerLink","queryParams",4,"ngIf"],[1,"ps-2"],[1,"align-top",3,"routerLink","queryParams","target"],["class","text-danger small",4,"ngIf"],["class","nav",4,"ngIf"],["class","text-end",4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange"],["matTooltip","Click to zoom",3,"src","click"],[1,"d-block",3,"routerLink","queryParams"],[1,"border","rounded",3,"src"],[1,"text-danger","small"],[1,"nav"],["class","nav-item me-8",4,"ngFor","ngForOf"],[1,"nav-item","me-8"],[1,"nav-link",2,"padding","0",3,"routerLink","queryParams","target"],[1,"d-block"],["class","small",4,"ngIf"],[1,"small"],[1,"text-end"]],template:function(e,o){1&e&&(t.TgZ(0,"table",0)(1,"thead",1)(2,"tr",2),t.YNc(3,pt,2,1,"th",3),t.TgZ(4,"th",4),t._uU(5,"Product"),t.qZA(),t.TgZ(6,"th",5),t._uU(7,"Code"),t.qZA(),t.TgZ(8,"th",6),t._uU(9,"Category"),t.qZA(),t.TgZ(10,"th"),t._uU(11,"Variants"),t.qZA(),t.YNc(12,ht,2,0,"th",7),t.TgZ(13,"th",8),t._uU(14,"Released"),t.qZA()()(),t.TgZ(15,"tbody"),t.YNc(16,Qt,22,23,"tr",9),t.qZA()()),2&e&&(t.xp6(3),t.Q6J("ngIf",o.pageData.Roles.HasProductEditor),t.xp6(9),t.Q6J("ngIf",o.data.PriceVisible),t.xp6(4),t.Q6J("ngForOf",o.data.Data))},directives:[c.O5,c.sg,s.Wl,s.JJ,s.On,F.gM,l.yS],pipes:[c.JJ,w.qU,w.Mj,c.uU],styles:[""],changeDetection:0}),n})();var rt=u(3077);function Lt(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",21),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).httpPostListID("catalog/product/DeleteProductList")}),t._UZ(1,"i",22),t._uU(2," Delete"),t.qZA()}}function Ct(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",23),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).mergeData()}),t._UZ(1,"i",24),t._uU(2," Merge "),t.qZA()}}function vt(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",25),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).moveProduct("catalog/product/MoveProduct")}),t._UZ(1,"i",26),t._uU(2," Move "),t.qZA()}}const ot=function(){return["/menu/Products/Catalog/Products/Import"]};function _t(n,i){1&n&&(t.TgZ(0,"a",27),t._UZ(1,"i",28),t._uU(2," Import"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,ot))}function Nt(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",29),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ProductExport/ExportProductList","Product.csv")}),t._UZ(1,"i",30),t._uU(2," Export "),t.qZA()}}function tt(n,i){1&n&&t._UZ(0,"button",31)}function Tt(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"ul",32)(1,"li",33)(2,"a",34),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ProductExport/ExportProductListWithOutletPrice","ProductWithOutletPrice.csv")}),t._uU(3," Export With Outlet Price "),t.qZA()(),t.TgZ(4,"li",33)(5,"a",34),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ProductExport/ExportProductListWithPricebook","ProductWithPricebook.csv")}),t._uU(6," Export With Pricebook "),t.qZA()(),t.TgZ(7,"li",33)(8,"a",34),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ProductExport/ExportProductListWithComponents","ProductListWithComponents.csv")}),t._uU(9," Export With Components "),t.qZA()(),t.TgZ(10,"li",33)(11,"a",34),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ProductExport/ExportProductListWithParent","ProductListWithParent.csv")}),t._uU(12,"Export With Parent"),t.qZA()(),t.TgZ(13,"li",33)(14,"a",34),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ProductExport/ExportProductListWithSerial","ProductListWithSerial.csv")}),t._uU(15," Export With Serial "),t.qZA()(),t.TgZ(16,"li",33)(17,"a",34),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ProductExport/ExportProductListWithSerialAndRow","ProductListWithSerialAndRow.csv")}),t._uU(18," Export With Serial / Row "),t.qZA()(),t.TgZ(19,"li",33)(20,"a",34),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ProductExport/ExportProductListWithTags","ProductListWithTags.csv")}),t._uU(21," Export With Tags "),t.qZA()(),t.TgZ(22,"li",33)(23,"a",34),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ProductExport/ExportProductListWithSalesGroupCommission","ProductListWithSalesGroupCommission.csv")}),t._uU(24," Export With Commission "),t.qZA()(),t.TgZ(25,"li",33)(26,"a",34),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ProductExport/ExportProductListWithInventory","ProductListWithInventory.csv")}),t._uU(27," Export With Inventory "),t.qZA()(),t.TgZ(28,"li",33)(29,"a",34),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ProductExport/ExportProductListMinMaxWithInventory","ProductListMinMaxWithInventory.csv")}),t._uU(30," Export With Min&Max Inventory "),t.qZA()(),t.TgZ(31,"li",33)(32,"a",34),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ProductExport/ExportProductListWithPreapaid","ProductListWithPrepaid.csv")}),t._uU(33," Export With Prepaid "),t.qZA()(),t.TgZ(34,"li",33)(35,"a",34),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ProductExport/ExportProductListWithStorageLocation","ProductListWithStorageLocationcsv")}),t._uU(36," Export With Storage Location "),t.qZA()()()}}const Zt=function(){return["/menu/Products/Catalog/Products/Form"]};function k(n,i){1&n&&(t.TgZ(0,"a",35),t._uU(1,"Add"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,Zt))}function d(n,i){if(1&n&&(t.TgZ(0,"div",42),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function h(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",36)(1,"div",37)(2,"h6"),t._uU(3,"Category"),t.qZA(),t.TgZ(4,"ng-select",38),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.CategoryID=a}),t.YNc(5,d,2,2,"ng-template",39),t.qZA()(),t.TgZ(6,"div")(7,"h6"),t._uU(8,"Brand"),t.qZA(),t.TgZ(9,"ng-select",38),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.BrandID=a}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"Product Discontinued"),t.qZA(),t.TgZ(13,"radio-options",40),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.ProductDiscontinued=a}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"Variant Discontinued"),t.qZA(),t.TgZ(17,"radio-options",41),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.VariantDiscontinued=a}),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(5),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Brands)("ngModel",e.pageData.Filter.BrandID),t.xp6(4),t.Q6J("model",e.pageData.Filter.ProductDiscontinued)("options",e.radioOption),t.xp6(4),t.Q6J("model",e.pageData.Filter.VariantDiscontinued)("options",e.radioOption)}}function T(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div")(1,"h6"),t._uU(2,"Inventory By Group"),t.qZA(),t.TgZ(3,"ng-select",38),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(3).pageData.Filter.EntityGroupID=a}),t.qZA()()}if(2&n){const e=t.oxw(3);t.xp6(3),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.EntityGroups)("ngModel",e.pageData.Filter.EntityGroupID)}}const U=function(n){return{show:n}};function H(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",43)(1,"div")(2,"h6"),t._uU(3,"Tags"),t.qZA(),t.TgZ(4,"ng-select",44),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.TagsID=a}),t.qZA()(),t.TgZ(5,"div")(6,"h6"),t._uU(7,"From - To"),t.qZA(),t.TgZ(8,"datepicker",45),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.From=a}),t.qZA(),t.TgZ(9,"datepicker",46),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.To=a}),t.qZA()(),t.YNc(10,T,4,2,"div",47),t.qZA()}if(2&n){const e=t.oxw(2);t.Tol(t.VKq(7,U,e.more)),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Tags)("ngModel",e.pageData.Filter.TagsID),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(1),t.Q6J("ngIf",e.pageData.Options.EntityGroups.length>0)}}const I=function(n){return{width:n}};function P(n,i){if(1&n&&(t.TgZ(0,"a",57),t._UZ(1,"img",58),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw(3);t.s9C("href",e.ImageUrl?e.ImageUrl:"Info?ID="+e.ID,t.LSH),t.s9C("target",o.pageData.LinkTarget),t.xp6(1),t.Akn(t.VKq(5,I,o.data.ThumbnailWidth+"px")),t.s9C("src",e.ThumbnailUrl,t.LSH)}}const O=function(){return["/menu/Products/Catalog/Products/Info"]},W=function(n){return{ID:n}};function ye(n,i){if(1&n&&(t.TgZ(0,"a",59),t._UZ(1,"img",60),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw(3);t.s9C("target",o.pageData.LinkTarget),t.Q6J("routerLink",t.DdM(4,O))("queryParams",t.VKq(5,W,e.ID)),t.xp6(1),t.MGl("src","//res.cloudinary.com/pos/image/upload/w_",o.data.ThumbnailWidth,"/POS/Images/Icon/products_thumb.png",t.LSH)}}function Ie(n,i){if(1&n&&(t.TgZ(0,"small"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" - ",e.Code,"")}}function Me(n,i){if(1&n&&(t.TgZ(0,"span")(1,"s"),t._uU(2),t.qZA()()),2&n){const e=t.oxw().$implicit;t.xp6(2),t.Oqu(e.Model)}}function Pe(n,i){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Model)}}function De(n,i){if(1&n&&(t.TgZ(0,"i",66),t._uU(1),t.qZA()),2&n){const e=t.oxw(2).$implicit;t.xp6(1),t.Oqu(" - "+e.Allocated+" Allocated ")}}function Ae(n,i){if(1&n&&(t.ynx(0),t.TgZ(1,"i",64),t._uU(2),t.qZA(),t.YNc(3,De,2,1,"i",65),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(2),t.hij("( ",e.Inventory," On Hand )"),t.xp6(1),t.Q6J("ngIf",e.Allocated)}}function Ne(n,i){if(1&n&&(t.TgZ(0,"i",66),t._uU(1),t.qZA()),2&n){const e=t.oxw(2).$implicit;t.xp6(1),t.Oqu(" - "+e.Allocated+" Allocated ")}}function qe(n,i){if(1&n&&(t.ynx(0),t.TgZ(1,"i",64),t._uU(2,"( 0 On Hand )"),t.qZA(),t.YNc(3,Ne,2,1,"i",65),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(3),t.Q6J("ngIf",e.Allocated)}}const we=function(){return["/menu/Products/Catalog/Variants/Info"]};function Se(n,i){if(1&n&&(t.TgZ(0,"li",61)(1,"a",62),t.YNc(2,Me,3,1,"span",47),t.YNc(3,Pe,2,1,"span",47),t.qZA(),t.TgZ(4,"small",63),t._uU(5),t.qZA(),t.YNc(6,Ae,4,2,"ng-container",47),t.YNc(7,qe,4,1,"ng-container",47),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(4);t.xp6(1),t.s9C("target",o.pageData.LinkTarget),t.Q6J("routerLink",t.DdM(8,we))("queryParams",t.VKq(9,W,e.ID)),t.xp6(1),t.Q6J("ngIf",e.Discontinued),t.xp6(1),t.Q6J("ngIf",!e.Discontinued),t.xp6(2),t.Oqu(e.Code),t.xp6(1),t.Q6J("ngIf",null!=e.Inventory&&o.pageData.Roles.HasInventoryView),t.xp6(1),t.Q6J("ngIf",null==e.Inventory&&o.pageData.IsAlwaysRendered&&o.pageData.Roles.HasInventoryView)}}const Ue=function(n){return{"text-decoration-line-through":n}};function Oe(n,i){if(1&n&&(t.TgZ(0,"div",50),t.YNc(1,P,2,7,"a",51),t.YNc(2,ye,2,7,"a",52),t.TgZ(3,"div",53)(4,"a",54),t._uU(5),t.qZA(),t.YNc(6,Ie,2,1,"small",47),t.TgZ(7,"ul",55),t.YNc(8,Se,8,11,"li",56),t.qZA()(),t.TgZ(9,"div"),t._uU(10),t.ALo(11,"MinToMax"),t.qZA()()),2&n){const e=i.$implicit,o=t.oxw(3);t.xp6(1),t.Q6J("ngIf",e.ImageUrl),t.xp6(1),t.Q6J("ngIf",!e.ImageUrl),t.xp6(2),t.Tol(t.VKq(14,Ue,e.Discontinued)),t.s9C("target",o.pageData.LinkTarget),t.Q6J("routerLink",t.DdM(16,O))("queryParams",t.VKq(17,W,e.ID)),t.xp6(1),t.Oqu(e.Name),t.xp6(1),t.Q6J("ngIf",e.Code),t.xp6(2),t.Q6J("ngForOf",e.Variants),t.xp6(2),t.hij(" ",t.xi3(11,11,e.Variants,"UnitPrice")," ")}}function Je(n,i){if(1&n&&(t.TgZ(0,"div",48),t.YNc(1,Oe,12,19,"div",49),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.data.Data)}}function Ve(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.Text=a})("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Lt,3,0,"a",2),t.YNc(3,Ct,3,0,"a",3),t.YNc(4,vt,3,0,"a",4),t.TgZ(5,"div",5),t.YNc(6,_t,3,2,"a",6),t.YNc(7,Nt,3,0,"a",7),t.YNc(8,tt,1,0,"button",8),t.YNc(9,Tt,37,0,"ul",9),t.qZA(),t.YNc(10,k,2,2,"a",10),t.qZA(),t.TgZ(11,"filters")(12,"div",11),t.YNc(13,h,18,8,"div",12),t.YNc(14,H,11,9,"div",13),t.TgZ(15,"a",14),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.more=!a.more}),t._uU(16,"More "),t._UZ(17,"i",15),t.qZA()()(),t.TgZ(18,"content")(19,"div",16)(20,"div",17)(21,"POS-product-list-desktop",18),t.NdJ("selectAllProducts",function(a){return t.CHM(e),t.oxw().onSelectAllData(a)})("openBigPicture",function(a){return t.CHM(e),t.oxw().openBigPicture(a)}),t.qZA()(),t.YNc(22,Je,2,1,"div",19),t.TgZ(23,"POS-complex-pagination",20),t.NdJ("jumpToPage",function(){return t.CHM(e),t.oxw().getListData()})("previousPage",function(){return t.CHM(e),t.oxw().getListData()})("nextPage",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("text",e.pageData.Filter.Text),t.xp6(2),t.Q6J("ngIf",(null==e.pageData.Roles?null:e.pageData.Roles.HasProductEditor)&&e.getSelectedData().length>0),t.xp6(1),t.Q6J("ngIf",(null==e.pageData.Roles?null:e.pageData.Roles.HasProductEditor)&&e.getSelectedData().length>1),t.xp6(1),t.Q6J("ngIf",(null==e.pageData.Roles?null:e.pageData.Roles.HasProductEditor)&&e.getSelectedData().length>0),t.xp6(2),t.Q6J("ngIf",null==e.pageData.Roles?null:e.pageData.Roles.HasProductCreate),t.xp6(1),t.Q6J("ngIf",null==e.pageData.Roles?null:e.pageData.Roles.HasExport),t.xp6(1),t.Q6J("ngIf",null==e.pageData.Roles?null:e.pageData.Roles.HasExport),t.xp6(1),t.Q6J("ngIf",null==e.pageData.Roles?null:e.pageData.Roles.HasExport),t.xp6(1),t.Q6J("ngIf",null==e.pageData.Roles?null:e.pageData.Roles.HasProductCreate),t.xp6(3),t.Q6J("ngIf",e.data&&e.pageData.Filter),t.xp6(1),t.Q6J("ngIf",e.data&&e.pageData.Filter),t.xp6(7),t.Q6J("data",e.data)("pageData",e.pageData),t.xp6(1),t.Q6J("ngIf",e.data),t.xp6(1),t.Q6J("total",e.data.Data.length)("pageData",e.pageData)}}let ke=(()=>{class n extends v.n{constructor(e,o,a,r){super(e,"catalog/product/GetProductList","catalog/ProductLoader/ProductList",o),this.httpService=e,this.csvConverter=a,this.matDialog=r,this.radioOption=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"},{Key:null,Value:"All"}]}moveProduct(e){const o=this.getSelectedData();this.matDialog.open(et,{data:{Form:{CategoryID:null},Options:this.pageData.Options}}).afterClosed().subscribe(r=>{if(r){const p=r.Model.Form.CategoryID,x=o.map(j=>j.ID);this.postData(e,{ID:p,List:x})}})}mergeData(){this.httpPostListID("catalog/product/MergeProduct","Are you sure you want to merge these records?")}openBigPicture(e){L({el:e.pEvent.target,imgSrc:e.product.ImageUrl,noLoader:!1})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(f._W),t.Y36(g.O),t.Y36(b.uw))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-product"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","text","textChange","onSubmit",4,"ngIf"],[3,"pageData","text","textChange","onSubmit"],["role","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary ms-5",3,"click",4,"ngIf"],["title","Move","class","btn btn-outline-secondary ms-5",3,"click",4,"ngIf"],[1,"btn-group","ms-5","me-5"],["class","btn btn-outline-secondary",3,"routerLink",4,"ngIf"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],["class","btn btn-outline-secondary btn-sm dropdown-toggle","data-bs-toggle","dropdown",4,"ngIf"],["class","dropdown-menu",4,"ngIf"],["class","btn btn-success","role","button","title","Add Product",3,"routerLink",4,"ngIf"],[1,"d-flex"],["container","",4,"ngIf"],["id","more-filter","class","ms-6","class","collapse","container","",3,"class",4,"ngIf"],[1,"more",3,"click"],[1,"fa-solid","fa-caret-down"],[1,"container-fluid","mt-5"],[1,"d-none","d-sm-block"],[3,"data","pageData","selectAllProducts","openBigPicture"],["class","table d-sm-none",4,"ngIf"],["api","catalog/product/ProductRowsCount",3,"total","pageData","jumpToPage","previousPage","nextPage"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-trash"],["role","button",1,"btn","btn-outline-secondary","ms-5",3,"click"],[1,"fa-solid","fa-network-wired"],["title","Move",1,"btn","btn-outline-secondary","ms-5",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrows-alt"],[1,"btn","btn-outline-secondary",3,"routerLink"],["aria-hidden","true",1,"fa-solid","fa-download"],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu"],[1,"dropdown-item"],[3,"click"],["role","button","title","Add Product",1,"btn","btn-success",3,"routerLink"],["container",""],[1,"category-filter"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["ng-option-tmp",""],["name","ProductDiscontinued",3,"model","options","modelChange"],["name","VariantDiscontinued",3,"model","options","modelChange"],[3,"title"],["id","more-filter","container","",1,"collapse"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[4,"ngIf"],[1,"table","d-sm-none"],["class","d-flex border-1 border-bottom m-2",4,"ngFor","ngForOf"],[1,"d-flex","border-1","border-bottom","m-2"],[3,"href","target",4,"ngIf"],["class","d-block float-start",3,"routerLink","queryParams","target",4,"ngIf"],[1,"flex-grow-1"],[1,"ms-3",3,"routerLink","queryParams","target"],[1,"list-inline","mt-5"],["class","list-inline-item",4,"ngFor","ngForOf"],[3,"href","target"],[3,"src"],[1,"d-block","float-start",3,"routerLink","queryParams","target"],[1,"border","rounded",3,"src"],[1,"list-inline-item"],[1,"d-block","ms-3",3,"routerLink","queryParams","target"],[1,"me-3"],[1,"text-danger","small"],["class","small",4,"ngIf"],[1,"small"]],template:function(e,o){1&e&&t.YNc(0,Ve,24,17,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.pageData&&o.data)},directives:[c.O5,m.p,l.yS,y.w9,s.JJ,s.On,y.ir,q.P,E.QB,K,c.sg,rt.v],pipes:[w.Mj],styles:[".category-filter[_ngcontent-%COMP%] .ng-dropdown-panel .ng-dropdown-panel-items .ng-option {\n white-space: normal;\n word-break: break-word;\n}"]}),n})();var G=u(53737),Xt=u(91159),Y=u(88651),Z=u(96700),qt=u(16571),C=u(67327),Ht=u(77579),Fe=u(54968),Qe=u(78372),Et=u(82722),Yt=u(39300);let Le=(()=>{class n{constructor(e,o){switch(this.dialogRef=e,this.data=o,this.Title="",this.Model=o,this.configModal=new Q.O,o.form.Status){case"Category":this.Model.form.url="CreateProductCategory",this.configModal.title="New Category",this.Title="Name";break;case"Brand":this.Model.form.url="CreateBrand",this.configModal.title="New Brand",this.Title="Add New Brand";break;case"Tag":this.Model.form.url="CreateTags",this.configModal.title="New Tags",this.Title="Add New Tags";break;case"UOM":this.Model.form.url="CreateProductUOM",this.configModal.title="New UOM",this.Title="Add New UOM"}}onOk(){this.dialogRef.close(this.Model.form)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.so),t.Y36(b.WI))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-modal-form-product-attribute"]],decls:6,vars:3,consts:[[3,"config","onOk","onCancel","onClose"],[1,"form-floating-outline"],["id","name","type","text","placeholder","Buying Cost",1,"form-control",2,"width","300px",3,"ngModel","ngModelChange"],["for","name"]],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,"input",2),t.NdJ("ngModelChange",function(r){return o.Model.form.Name=r}),t.qZA(),t.TgZ(4,"label",3),t._uU(5),t.qZA()()()()),2&e&&(t.Q6J("config",o.configModal),t.xp6(3),t.Q6J("ngModel",o.Model.form.Name),t.xp6(2),t.Oqu(o.Title))},directives:[N.M,s.Fj,s.JJ,s.On],styles:[""]}),n})(),te=(()=>{class n{constructor(e,o){this.data=e,this.dialogRef=o,this.modalConfig=new Q.O,this.modalConfig.title=e.title,this.modalConfig.headerType=Z.n.Error}onOk(){this.dialogRef.close("REMOVE")}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.WI),t.Y36(b.so))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-modal-confirm-remove"]],decls:7,vars:2,consts:[[3,"config","onOk","onCancel","onClose"],[1,"section-content",2,"width","100%"],[1,"row"],[1,"col-sm-12"]],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",3)(5,"h5"),t._uU(6),t.qZA()()()()()()),2&e&&(t.Q6J("config",o.modalConfig),t.xp6(6),t.Oqu(o.data.message))},directives:[N.M],styles:[""]}),n})();var B=u(83902);function He(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",12)(1,"div",5)(2,"input",42),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().item.UnitCost=a}),t.qZA(),t.TgZ(3,"label",43),t._uU(4,"Cost"),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.item.UnitCost)}}function Ee(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",29)(1,"div",5)(2,"input",44),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().item.Ratio=a}),t.qZA(),t.TgZ(3,"label",45),t._uU(4,"Ratio"),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.item.Ratio)}}const Rt=function(n){return{selected:n}},Ye=function(n){return{"Choose UOM":n}};let Re=(()=>{class n{constructor(e,o){this.dialogRef=e,this.data=o,this.item=Object.assign({},o.form),this.configModal=new Q.O,this.configModal.title="Add New Variant?",C.gT.IsNotEmpty(this.item)&&(this.configModal.title="Edit Variant"),this.configModal.headerType=Z.n.Success,this.configModal.showMoreButton=!0}onOk(){this.setVariantName(),this.dialogRef.close(this.item)}setVariantName(){this.item.Name=this.data.productName+`(${this.item.Model})`}IsEmpty(e){return C.gT.IsEmpty(e)}IsNotEmpty(e){return C.gT.IsNotEmpty(e)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.so),t.Y36(b.WI))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-modal-add-variant-product"]],decls:76,vars:37,consts:[[3,"config","keydown.F2","onOk","onCancel","onClose"],[1,"container-fluid","w-100"],[1,"card-body","pb-0","px-0"],[1,"row"],[1,"col-sm-8"],[1,"form-floating-outline"],["type","text","id","inputModel","placeholder","Model",1,"form-control",3,"ngModel","ngModelChange"],["for","inputModel"],[1,"col-sm-4"],["type","text","id","inputCode","placeholder","Variant Code",1,"w-100",3,"ngModel","ngModelChange"],["for","inputCode"],["class","col-sm-3",4,"ngIf"],[1,"col-sm-3"],["id","txtPrice","type","text","autoNum","","placeholder","Price",1,"w-100",3,"ngModel","ngModelChange"],["for","txtPrice"],[1,"col-sm-2"],["type","text","id","txtDisc","autoNum","","maxlength","5","placeholder","Disc%",1,"d-inline","w-70","form-control","percentage-input",3,"ngModel","ngModelChange"],["for","txtDisc"],[1,"col-sm"],["id","txtWeight","type","text","autoNum","","placeholder","Weight",1,"w-100",3,"ngModel","ngModelChange"],["for","txtWeight"],[1,"mb-8"],["id","variantDesc","placeholder","Description",1,"form-control","border-top-1","border-start-1","border-end-1",2,"height","120px",3,"ngModel","ngModelChange"],["for","variantDesc"],[1,"card-body","py-0"],[1,"col-sm-3","ps-0"],["for","type-uom",1,"ng-select",2,"z-index","9999"],["appendTo","body","id","type-uom","bindLabel","Value","bindValue","Key","placeholder","Choose Type",3,"clearable","ngModel","items","ngModelChange"],["class","col",4,"ngIf"],[1,"col"],["id","unitQTY","type","text","placeholder","Unit Qty","autoNum","",1,"w-100",3,"ngModel","ngModelChange"],["for","unitQTY"],["appendTo","body","id","inputUOM","bindLabel","Name","bindValue","ID",1,"productform",3,"clearable","ngModel","items","ngModelChange"],["for","inputUOM",1,"ng-select"],[1,"col-sm-3","pe-0"],["appendTo","body","id","labelUOM","bindLabel","Name","bindValue","ID",3,"clearable","ngModel","items","ngModelChange"],["for","labelUOM",1,"ng-select"],[1,"col-sm-6"],["type","text","id","generator-name","maxlength","5","placeholder","Disc%",1,"d-inline","form-control","percentage-input",3,"ngModel","ngModelChange"],["for","generator-name"],[1,"form-floating-outline","radio","border","rounded",2,"padding-top","20px"],["name","discontinued",3,"disabled","model","modelChange"],["id","txtCost","type","text","autoNum","","placeholder","Cost",1,"w-100",3,"ngModel","ngModelChange"],["for","txtCost"],["type","text","autoNum","","id","ratio","placeholder","Ratio",1,"w-100",3,"ngModel","ngModelChange"],["for","ratio"]],template:function(e,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("keydown.F2",function(){return o.onOk()})("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",3)(5,"div",4)(6,"div",5)(7,"input",6),t.NdJ("ngModelChange",function(r){return o.item.Model=r}),t.qZA(),t.TgZ(8,"label",7),t._uU(9,"Model"),t.qZA()()(),t.TgZ(10,"div",8)(11,"div",5)(12,"input",9),t.NdJ("ngModelChange",function(r){return o.item.Code=r}),t.qZA(),t.TgZ(13,"label",10),t._uU(14,"Variant Code"),t.qZA()()()(),t.TgZ(15,"div",3),t.YNc(16,He,5,1,"div",11),t.TgZ(17,"div",12)(18,"div",5)(19,"input",13),t.NdJ("ngModelChange",function(r){return o.item.UnitPrice=r}),t.qZA(),t.TgZ(20,"label",14),t._uU(21,"Price"),t.qZA()()(),t.TgZ(22,"div",15)(23,"div",5)(24,"input",16),t.NdJ("ngModelChange",function(r){return o.item.Discount=r}),t.qZA(),t.TgZ(25,"label",17),t._uU(26,"Disc%"),t.qZA()()(),t.TgZ(27,"div",18)(28,"div",5)(29,"input",19),t.NdJ("ngModelChange",function(r){return o.item.Weight=r}),t.qZA(),t.TgZ(30,"label",20),t._uU(31,"Weight"),t.qZA()()()(),t.TgZ(32,"div",21)(33,"div",5)(34,"textarea",22),t.NdJ("ngModelChange",function(r){return o.item.Description=r}),t.qZA(),t.TgZ(35,"label",23),t._uU(36,"Description"),t.qZA()()()()()(),t.TgZ(37,"more-content")(38,"div",1)(39,"div",24)(40,"div",3)(41,"div",25)(42,"div",5)(43,"label",26),t._uU(44,"Type"),t.qZA(),t.TgZ(45,"ng-select",27),t.NdJ("ngModelChange",function(r){return o.item.TypeID=r}),t.qZA()()(),t.YNc(46,Ee,5,1,"div",28),t.TgZ(47,"div",29)(48,"div",5)(49,"input",30),t.NdJ("ngModelChange",function(r){return o.item.UnitQuantity=r}),t.qZA(),t.TgZ(50,"label",31),t._uU(51,"Unit Qty"),t.qZA()()(),t.TgZ(52,"div",12)(53,"div",5)(54,"ng-select",32),t.NdJ("ngModelChange",function(r){return o.item.UOM=r}),t.qZA(),t.TgZ(55,"label",33),t._uU(56,"Choose UOM"),t.qZA()()(),t.TgZ(57,"div",34)(58,"div",5)(59,"ng-select",35),t.NdJ("ngModelChange",function(r){return o.item.UOMQ=r}),t.qZA(),t.TgZ(60,"label",36)(61,"i"),t._uU(62,"Sub UOM"),t.qZA()()()()()(),t.TgZ(63,"div",3)(64,"div",37)(65,"div",5)(66,"input",38),t.NdJ("ngModelChange",function(r){return o.item.Name=r}),t.qZA(),t.TgZ(67,"label",39)(68,"i"),t._uU(69,"Name "),t.qZA(),t._uU(70,"(Auto Generated)"),t.qZA()()(),t.TgZ(71,"div",37)(72,"div",40)(73,"label"),t._uU(74,"Discontinued"),t.qZA(),t.TgZ(75,"radio-options",41),t.NdJ("modelChange",function(r){return o.item.Discontinued=r}),t.qZA()()()()()()()),2&e&&(t.Q6J("config",o.configModal),t.xp6(7),t.Q6J("ngModel",o.item.Model),t.xp6(5),t.Q6J("ngModel",o.item.Code),t.xp6(4),t.Q6J("ngIf",o.data.Role.HasCostRole),t.xp6(3),t.Q6J("ngModel",o.item.UnitPrice),t.xp6(5),t.Q6J("ngModel",o.item.Discount),t.xp6(5),t.Q6J("ngModel",o.item.Weight),t.xp6(5),t.Q6J("ngModel",o.item.Description),t.xp6(8),t.Tol(t.VKq(29,Rt,null!=o.item.TypeID)),t.xp6(3),t.Q6J("clearable",!1)("ngModel",o.item.TypeID)("items",o.data.Options.Types),t.xp6(1),t.Q6J("ngIf",7==o.item.TypeID),t.xp6(3),t.Q6J("ngModel",o.item.UnitQuantity),t.xp6(4),t.Tol(t.VKq(31,Rt,o.IsNotEmpty(o.item.UOM))),t.xp6(1),t.Q6J("clearable",!1)("ngModel",o.item.UOM)("items",o.data.Options.UOMs),t.uIk("placeholder",t.VKq(33,Ye,o.IsEmpty(o.item.UOM))),t.xp6(4),t.Tol(t.VKq(35,Rt,o.IsNotEmpty(o.item.UOMQ))),t.xp6(1),t.Q6J("clearable",o.IsNotEmpty(o.item.UOMQ))("ngModel",o.item.UOMQ)("items",o.data.Options.UOMs),t.xp6(7),t.Q6J("ngModel",o.item.Name),t.xp6(9),t.Q6J("disabled",o.data.parentDiscontinued)("model",o.item.Discontinued))},directives:[N.M,s.Fj,s.JJ,s.On,c.O5,B.b,s.nD,y.w9,q.P],styles:[""]}),n})();var ee=u(22414),Be=u(14170),z=u(59783),lt=u(41777),mt=u(75730),gt=u(42629),wt=u(85921);const $e=["container"],je=["focusInput"],Ke=["filter"],We=["tree"];function Ge(n,i){1&n&&t.GkF(0)}const ze=function(n,i){return{$implicit:n,placeholder:i}};function Xe(n,i){if(1&n&&(t.ynx(0),t.YNc(1,Ge,1,0,"ng-container",13),t.BQk()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngTemplateOutlet",e.valueTemplate)("ngTemplateOutletContext",t.WLB(2,ze,e.value,e.placeholder))}}function tn(n,i){if(1&n&&(t.ynx(0),t._uU(1),t.BQk()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",e.label||"empty"," ")}}function en(n,i){if(1&n&&(t.TgZ(0,"div",17)(1,"span",18),t._uU(2),t.qZA()()),2&n){const e=i.$implicit;t.xp6(2),t.Oqu(e.label)}}function nn(n,i){if(1&n&&(t.ynx(0),t._uU(1),t.BQk()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.placeholder||"empty")}}function on(n,i){if(1&n&&(t.YNc(0,en,3,1,"div",15),t.YNc(1,nn,2,1,"ng-container",16)),2&n){const e=t.oxw(2);t.Q6J("ngForOf",e.value),t.xp6(1),t.Q6J("ngIf",e.emptyValue)}}function an(n,i){if(1&n&&(t.YNc(0,tn,2,1,"ng-container",7),t.YNc(1,on,2,2,"ng-template",null,14,t.W1O)),2&n){const e=t.MAs(2),o=t.oxw();t.Q6J("ngIf","comma"===o.display)("ngIfElse",e)}}function rn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"i",19),t.NdJ("click",function(a){return t.CHM(e),t.oxw().clear(a)}),t.qZA()}}function ln(n,i){1&n&&t.GkF(0)}function cn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",26)(1,"div",27)(2,"input",28,29),t.NdJ("keydown.enter",function(a){return a.preventDefault()})("input",function(a){return t.CHM(e),t.oxw(2).onFilterInput(a)}),t.qZA(),t._UZ(4,"span",30),t.qZA(),t.TgZ(5,"button",31),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).hide()}),t._UZ(6,"span",32),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("value",e.filterValue),t.uIk("placeholder",e.filterPlaceholder)}}function sn(n,i){1&n&&t.GkF(0)}function pn(n,i){if(1&n&&t.YNc(0,sn,1,0,"ng-container",34),2&n){const e=t.oxw(3);t.Q6J("ngTemplateOutlet",e.emptyTemplate)}}function dn(n,i){1&n&&(t.ynx(0),t.YNc(1,pn,1,1,"ng-template",33),t.BQk())}function un(n,i){1&n&&t.GkF(0)}const _n=function(n,i){return{showTransitionParams:n,hideTransitionParams:i}},mn=function(n){return{value:"visible",params:n}},ne=function(n,i){return{$implicit:n,options:i}},gn=function(n){return{"max-height":n}};function fn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",20,21),t.NdJ("click",function(a){return t.CHM(e),t.oxw().onOverlayClick(a)})("@overlayAnimation.start",function(a){return t.CHM(e),t.oxw().onOverlayAnimationStart(a)})("@overlayAnimation.done",function(a){return t.CHM(e),t.oxw().onOverlayAnimationDone(a)}),t.YNc(2,ln,1,0,"ng-container",13),t.YNc(3,cn,7,2,"div",22),t.TgZ(4,"div",23)(5,"p-tree",24,25),t.NdJ("selectionChange",function(a){return t.CHM(e),t.oxw().onSelectionChange(a)})("onNodeExpand",function(a){return t.CHM(e),t.oxw().nodeExpand(a)})("onNodeCollapse",function(a){return t.CHM(e),t.oxw().nodeCollapse(a)})("onNodeSelect",function(a){return t.CHM(e),t.oxw().onSelect(a)})("onNodeUnselect",function(a){return t.CHM(e),t.oxw().onUnselect(a)}),t.YNc(7,dn,2,0,"ng-container",16),t.qZA()(),t.YNc(8,un,1,0,"ng-container",13),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("@overlayAnimation",t.VKq(24,mn,t.WLB(21,_n,e.showTransitionOptions,e.hideTransitionOptions))),t.xp6(2),t.Q6J("ngTemplateOutlet",e.headerTemplate)("ngTemplateOutletContext",t.WLB(26,ne,e.value,e.options)),t.xp6(1),t.Q6J("ngIf",e.filter),t.xp6(1),t.Q6J("ngStyle",t.VKq(29,gn,e.scrollHeight)),t.xp6(1),t.Q6J("value",e.options)("propagateSelectionDown",e.propagateSelectionDown)("propagateSelectionUp",e.propagateSelectionUp)("selectionMode",e.selectionMode)("selection",e.value)("metaKeySelection",e.metaKeySelection)("emptyMessage",e.emptyMessage)("filterBy",e.filterBy)("filterMode",e.filterMode)("filterPlaceholder",e.filterPlaceholder)("filterLocale",e.filterLocale)("filterInputAutoFocus",e.filterInputAutoFocus)("filteredNodes",e.filteredNodes),t.xp6(2),t.Q6J("ngIf",e.emptyTemplate),t.xp6(1),t.Q6J("ngTemplateOutlet",e.footerTemplate)("ngTemplateOutletContext",t.WLB(31,ne,e.value,e.options))}}const hn={provide:s.JU,useExisting:(0,t.Gpc)(()=>oe),multi:!0};let oe=(()=>{class n{constructor(e,o,a,r){this.config=e,this.cd=o,this.el=a,this.overlayService=r,this.type="button",this.scrollHeight="400px",this.metaKeySelection=!0,this.display="comma",this.selectionMode="single",this.emptyMessage="",this.filter=!1,this.filterBy="label",this.filterMode="lenient",this.filterInputAutoFocus=!0,this.propagateSelectionDown=!0,this.propagateSelectionUp=!0,this.showClear=!1,this.resetFilterOnHide=!0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onNodeExpand=new t.vpe,this.onNodeCollapse=new t.vpe,this.onShow=new t.vpe,this.onHide=new t.vpe,this.onClear=new t.vpe,this.onFilter=new t.vpe,this.onNodeUnselect=new t.vpe,this.onNodeSelect=new t.vpe,this.filterValue=null,this.expandedNodes=[],this.onModelChange=()=>{},this.onModelTouched=()=>{}}get options(){return this._options}set options(e){this._options=e,this.updateTreeState()}ngOnInit(){this.updateTreeState()}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"value":default:this.valueTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}onOverlayAnimationStart(e){"visible"===e.toState&&(this.overlayEl=e.element,this.onOverlayEnter())}onOverlayAnimationDone(e){"void"===e.toState&&this.onOverlayLeave()}onSelectionChange(e){this.value=e,this.onModelChange(this.value),this.cd.markForCheck()}onClick(e){!this.disabled&&(!this.overlayEl||!this.overlayEl.contains(e.target))&&!mt.p.hasClass(e.target,"p-treeselect-close")&&(this.overlayVisible?this.hide():this.show(),this.focusInput.nativeElement.focus())}onKeyDown(e){switch(e.which){case 40:if(!this.overlayVisible&&e.altKey)this.show(),e.preventDefault();else if(this.overlayVisible&&this.overlayEl){let o=mt.p.getFocusableElements(this.overlayEl);o&&o.length>0&&o[0].focus(),e.preventDefault()}break;case 32:this.overlayVisible||(this.show(),e.preventDefault());break;case 13:case 27:this.overlayVisible&&(this.hide(),e.preventDefault());break;case 9:this.hide()}}onFilterInput(e){this.filterValue=e.target.value,this.treeViewChild._filter(this.filterValue),this.onFilter.emit({originalEvent:e,filteredValue:this.treeViewChild.filteredNodes})}show(){this.overlayVisible=!0}hide(){this.overlayVisible=!1,this.resetFilter(),this.cd.markForCheck()}clear(e){this.value=null,this.resetExpandedNodes(),this.onModelChange(this.value),this.onClear.emit(),e.stopPropagation()}checkValue(){return null!==this.value&&wt.gb.isNotEmpty(this.value)}resetFilter(){this.filter&&!this.resetFilterOnHide?(this.filteredNodes=this.treeViewChild.filteredNodes,this.treeViewChild.resetFilter()):this.filterValue=null}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement})}updateTreeState(){if(this.value){let e="single"===this.selectionMode?[this.value]:[...this.value];this.resetExpandedNodes(),e&&this.options&&this.updateTreeBranchState(null,null,e)}}updateTreeBranchState(e,o,a){if(e){if(this.isSelected(e)&&(this.expandPath(o),a.splice(a.indexOf(e),1)),a.length>0&&e.children)for(let r of e.children)o.push(e),this.updateTreeBranchState(r,o,a)}else for(let r of this.options)this.updateTreeBranchState(r,[],a)}expandPath(e){for(let o of e)o.expanded=!0;this.expandedNodes=[...e]}nodeExpand(e){this.onNodeExpand.emit(e),this.expandedNodes.push(e.node)}nodeCollapse(e){this.onNodeCollapse.emit(e),this.expandedNodes.splice(this.expandedNodes.indexOf(e.node),1)}resetExpandedNodes(){for(let e of this.expandedNodes)e.expanded=!1;this.expandedNodes=[]}findSelectedNodes(e,o,a){if(e){if(this.isSelected(e)&&(a.push(e),delete o[e.key]),Object.keys(o).length&&e.children)for(let r of e.children)this.findSelectedNodes(r,o,a)}else for(let r of this.options)this.findSelectedNodes(r,o,a)}isSelected(e){return-1!=this.findIndexInSelection(e)}findIndexInSelection(e){let o=-1;if(this.value)if("single"===this.selectionMode)o=this.value.key&&this.value.key===e.key||this.value==e?0:-1;else for(let a=0;a<this.value.length;a++){let r=this.value[a];if(r.key&&r.key===e.key||r==e){o=a;break}}return o}onSelect(e){this.onNodeSelect.emit(e),"single"===this.selectionMode&&this.hide()}onUnselect(e){this.onNodeUnselect.emit(e)}onOverlayEnter(){wt.P9.set("overlay",this.overlayEl,this.config.zIndex.overlay),this.filter&&this.filterInputAutoFocus&&this.filterViewChild.nativeElement.focus(),this.appendContainer(),this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.onShow.emit()}onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),wt.P9.clear(this.overlayEl),this.overlayEl=null,this.onHide.emit()}onFocus(){this.focused=!0}onBlur(){this.focused=!1}writeValue(e){this.value=e,this.updateTreeState(),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}appendContainer(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.overlayEl):document.getElementById(this.appendTo).appendChild(this.overlayEl))}restoreAppend(){this.overlayEl&&this.appendTo&&("body"===this.appendTo?document.body.removeChild(this.overlayEl):document.getElementById(this.appendTo).removeChild(this.overlayEl))}alignOverlay(){this.appendTo?(mt.p.absolutePosition(this.overlayEl,this.containerEl.nativeElement),this.overlayEl.style.minWidth=mt.p.getOuterWidth(this.containerEl.nativeElement)+"px"):mt.p.relativePosition(this.overlayEl,this.containerEl.nativeElement)}bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlayEl&&!this.containerEl.nativeElement.contains(e.target)&&!this.overlayEl.contains(e.target)&&this.hide()},document.addEventListener("click",this.outsideClickListener))}unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new mt.V(this.containerEl.nativeElement,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&this.hide()},window.addEventListener("resize",this.resizeListener))}unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}ngOnDestroy(){this.restoreAppend(),this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlayEl&&(wt.P9.clear(this.overlayEl),this.overlayEl=null)}containerClass(){return{"p-treeselect p-component p-inputwrapper":!0,"p-treeselect-chip":"chip"===this.display,"p-disabled":this.disabled,"p-focus":this.focused}}labelClass(){return{"p-treeselect-label":!0,"p-placeholder":this.label===this.placeholder,"p-treeselect-label-empty":!this.placeholder&&this.emptyValue}}get emptyValue(){return!this.value||0===Object.keys(this.value).length}get emptyOptions(){return!this.options||0===this.options.length}get label(){let e=this.value||[];return e.length?e.map(o=>o.label).join(", "):"single"===this.selectionMode&&this.value?e.label:this.placeholder}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(z.b4),t.Y36(t.sBO),t.Y36(t.SBq),t.Y36(z.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["p-treeSelect"]],contentQueries:function(e,o,a){if(1&e&&t.Suo(a,z.jx,4),2&e){let r;t.iGM(r=t.CRH())&&(o.templates=r)}},viewQuery:function(e,o){if(1&e&&(t.Gf($e,5),t.Gf(je,5),t.Gf(Ke,5),t.Gf(We,5)),2&e){let a;t.iGM(a=t.CRH())&&(o.containerEl=a.first),t.iGM(a=t.CRH())&&(o.focusInput=a.first),t.iGM(a=t.CRH())&&(o.filterViewChild=a.first),t.iGM(a=t.CRH())&&(o.treeViewChild=a.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(e,o){2&e&&t.ekj("p-inputwrapper-filled",!o.emptyValue)("p-inputwrapper-focus",o.focused||o.overlayVisible)("p-treeselect-clearable",o.showClear&&!o.disabled)},inputs:{type:"type",inputId:"inputId",scrollHeight:"scrollHeight",disabled:"disabled",metaKeySelection:"metaKeySelection",display:"display",selectionMode:"selectionMode",tabindex:"tabindex",ariaLabelledBy:"ariaLabelledBy",placeholder:"placeholder",panelClass:"panelClass",emptyMessage:"emptyMessage",appendTo:"appendTo",filter:"filter",filterBy:"filterBy",filterMode:"filterMode",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",filterInputAutoFocus:"filterInputAutoFocus",propagateSelectionDown:"propagateSelectionDown",propagateSelectionUp:"propagateSelectionUp",showClear:"showClear",resetFilterOnHide:"resetFilterOnHide",options:"options",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onNodeExpand:"onNodeExpand",onNodeCollapse:"onNodeCollapse",onShow:"onShow",onHide:"onHide",onClear:"onClear",onFilter:"onFilter",onNodeUnselect:"onNodeUnselect",onNodeSelect:"onNodeSelect"},features:[t._Bn([hn])],decls:14,vars:11,consts:[[3,"ngClass","click"],["container",""],[1,"p-hidden-accessible"],["type","text","role","listbox","readonly","","aria-haspopup","true",3,"disabled","focus","blur","keydown"],["focusInput",""],[1,"p-treeselect-label-container"],[3,"ngClass"],[4,"ngIf","ngIfElse"],["defaultValueTemplate",""],["class","p-treeselect-clear-icon pi pi-times",3,"click",4,"ngIf"],[1,"p-treeselect-trigger"],[1,"p-treeselect-trigger-icon","pi","pi-chevron-down"],["class","p-treeselect-panel p-component",3,"click",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["chipsValueTemplate",""],["class","p-treeselect-token",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"p-treeselect-token"],[1,"p-treeselect-token-label"],[1,"p-treeselect-clear-icon","pi","pi-times",3,"click"],[1,"p-treeselect-panel","p-component",3,"click"],["overlayRef",""],["class","p-treeselect-header",4,"ngIf"],[1,"p-treeselect-items-wrapper",3,"ngStyle"],[3,"value","propagateSelectionDown","propagateSelectionUp","selectionMode","selection","metaKeySelection","emptyMessage","filterBy","filterMode","filterPlaceholder","filterLocale","filterInputAutoFocus","filteredNodes","selectionChange","onNodeExpand","onNodeCollapse","onNodeSelect","onNodeUnselect"],["tree",""],[1,"p-treeselect-header"],[1,"p-treeselect-filter-container"],["type","text","autocomplete","off",1,"p-treeselect-filter","p-inputtext","p-component",3,"value","keydown.enter","input"],["filter",""],[1,"p-treeselect-filter-icon","pi","pi-search"],[1,"p-treeselect-close","p-link",3,"click"],[1,"p-treeselect-filter-icon","pi","pi-times"],["pTemplate","empty"],[4,"ngTemplateOutlet"]],template:function(e,o){if(1&e&&(t.TgZ(0,"div",0,1),t.NdJ("click",function(r){return o.onClick(r)}),t.TgZ(2,"div",2)(3,"input",3,4),t.NdJ("focus",function(){return o.onFocus()})("blur",function(){return o.onBlur()})("keydown",function(r){return o.onKeyDown(r)}),t.qZA()(),t.TgZ(5,"div",5)(6,"div",6),t.YNc(7,Xe,2,5,"ng-container",7),t.YNc(8,an,3,2,"ng-template",null,8,t.W1O),t.qZA(),t.YNc(10,rn,1,0,"i",9),t.qZA(),t.TgZ(11,"div",10),t._UZ(12,"span",11),t.qZA(),t.YNc(13,fn,9,34,"div",12),t.qZA()),2&e){const a=t.MAs(9);t.Q6J("ngClass",o.containerClass()),t.xp6(3),t.Q6J("disabled",o.disabled),t.uIk("id",o.inputId)("tabindex",o.tabindex)("aria-expanded",o.overlayVisible)("aria-labelledby",o.ariaLabelledBy),t.xp6(3),t.Q6J("ngClass",o.labelClass()),t.xp6(1),t.Q6J("ngIf",o.valueTemplate)("ngIfElse",a),t.xp6(3),t.Q6J("ngIf",o.checkValue()&&!o.disabled&&o.showClear),t.xp6(3),t.Q6J("ngIf",o.overlayVisible)}},directives:[gt.mp,c.mk,c.O5,c.tP,c.sg,c.PC,z.jx],styles:[".p-treeselect{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.p-treeselect-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.p-treeselect-label-container{overflow:hidden;flex:1 1 auto;cursor:pointer}.p-treeselect-label{display:block;white-space:nowrap;cursor:pointer;overflow:hidden;text-overflow:ellipsis}.p-treeselect-label-empty{overflow:hidden;visibility:hidden}.p-treeselect-token{cursor:default;display:inline-flex;align-items:center;flex:0 0 auto}.p-treeselect .p-treeselect-panel{min-width:100%}.p-treeselect-panel{position:absolute;top:0;left:0}.p-treeselect-items-wrapper{overflow:auto}.p-treeselect-header{display:flex;align-items:center;justify-content:space-between}.p-treeselect-filter-container{position:relative;flex:1 1 auto}.p-treeselect-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-treeselect-filter-container .p-inputtext{width:100%}.p-treeselect-close{display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;position:relative;margin-left:auto}.p-treeselect-clear-icon{position:absolute;top:50%;margin-top:-.5rem}.p-fluid .p-treeselect{display:flex}.p-treeselect-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-treeselect-clearable{position:relative}\n"],encapsulation:2,data:{animation:[(0,lt.X$)("overlayAnimation",[(0,lt.eR)(":enter",[(0,lt.oB)({opacity:0,transform:"scaleY(0.8)"}),(0,lt.jt)("{{showTransitionParams}}")]),(0,lt.eR)(":leave",[(0,lt.jt)("{{hideTransitionParams}}",(0,lt.oB)({opacity:0}))])])]},changeDetection:0}),n})(),xn=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[[c.ez,Be.T,z.m8,gt.xc],z.m8,gt.xc]}),n})();var Cn=u(67322),bt=u(26688),$=u(84847),Bt=u(54478),ft=u(58393);function vn(n,i){1&n&&(t.TgZ(0,"span",50),t._uU(1," Name required."),t.qZA())}function Tn(n,i){1&n&&(t.TgZ(0,"span",50),t._uU(1," Product name + code combination already exists"),t.qZA())}function Zn(n,i){if(1&n&&(t.TgZ(0,"div",51),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("matTooltip",e.selectedCategoryLabel),t.xp6(1),t.hij(" ",e.selectedCategoryLabel," ")}}function bn(n,i){1&n&&(t.TgZ(0,"div",69),t._uU(1,"Main Image"),t.qZA())}function yn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",60),t.NdJ("click",function(){const r=t.CHM(e).$implicit;return r.Selected=!r.Selected})("cdkDropListDropped",function(a){return t.CHM(e),t.oxw(3).drop(a)}),t.TgZ(1,"div",61),t._UZ(2,"img",62),t.TgZ(3,"div",63)(4,"a",64),t.NdJ("click",function(a){const p=t.CHM(e).$implicit;return t.oxw(3).onZoomImage(p.URL,a)}),t._UZ(5,"i",65),t.qZA(),t.TgZ(6,"a",66),t.NdJ("click",function(){const r=t.CHM(e).index;return t.oxw(3).onRemoveImage(r)}),t._UZ(7,"i",67),t.qZA()(),t.YNc(8,bn,2,0,"div",68),t.qZA()()}if(2&n){const e=i.$implicit,o=i.index;t.Q6J("cdkDropListData",o),t.xp6(2),t.Q6J("src",e.URL,t.LSH),t.xp6(6),t.Q6J("ngIf",0==o)}}function In(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",5)(1,"div",10)(2,"fieldset",52)(3,"legend",53),t._uU(4,"Image "),t.TgZ(5,"span"),t._uU(6),t.qZA()(),t.TgZ(7,"div",54)(8,"div",55)(9,"div",56),t.YNc(10,yn,9,3,"div",57),t.TgZ(11,"button",58),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).uploadPicture()}),t._UZ(12,"i",59),t._uU(13," Upload "),t.qZA()()()()()()()}if(2&n){const e=t.oxw(2);t.xp6(6),t.hij("",e.productImages.length,"/5"),t.xp6(4),t.Q6J("ngForOf",e.productImages),t.xp6(1),t.Q6J("disabled",(null==e.productImages?null:e.productImages.length)>4)}}function Mn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",82)(1,"div",11)(2,"input",83),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(3).data.Product.VariantUnitCost=a})("ngModelChange",function(){t.CHM(e);const a=t.oxw(3);return a.ChangeVariant(a.data.Product.VariantUnitCost,"UnitCost")}),t.qZA(),t.TgZ(3,"label",84),t._uU(4,"Buying Cost"),t.qZA()()()}if(2&n){const e=t.oxw(3);t.xp6(2),t.Q6J("ngModel",e.data.Product.VariantUnitCost)}}function Pn(n,i){1&n&&(t.TgZ(0,"span",85),t._uU(1,"[override all variants price]"),t.qZA())}const Dn=function(n){return{"mb-4":n}};function An(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",70)(1,"div",8)(2,"h3"),t._uU(3,"Pricing and Variants"),t.qZA()(),t.TgZ(4,"div",9)(5,"div",5),t.YNc(6,Mn,5,1,"div",71),t.TgZ(7,"div",72)(8,"div",11)(9,"input",73),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).data.Product.VariantUnitPrice=a})("ngModelChange",function(){t.CHM(e);const a=t.oxw(2);return a.ChangeVariant(a.data.Product.VariantUnitPrice,"UnitPrice")}),t.qZA(),t.TgZ(10,"label",74),t._uU(11,"Selling Price"),t.qZA(),t.YNc(12,Pn,2,0,"span",75),t.qZA()(),t.TgZ(13,"div",31)(14,"div",16)(15,"div",76)(16,"div",77),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).FocusOnTagsInput(!1)}),t.TgZ(17,"div"),t._UZ(18,"i",78),t.qZA(),t.TgZ(19,"div",79),t._uU(20," Single "),t.qZA()()(),t.TgZ(21,"div",76)(22,"div",80),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).FocusOnTagsInput(!0)}),t.TgZ(23,"div"),t._UZ(24,"i",81),t.qZA(),t.TgZ(25,"div",79),t._uU(26," Multiple "),t.qZA()()()()()()()()}if(2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(6,Dn,e.multipleVariants)),t.xp6(6),t.Q6J("ngIf",e.data.Role.HasCostRole),t.xp6(3),t.Q6J("ngModel",e.data.Product.VariantUnitPrice),t.xp6(3),t.Q6J("ngIf",e.EditMode),t.xp6(4),t.Q6J("ngClass",e.multipleVariants?" border-end-0":"bg-info text-white"),t.xp6(6),t.Q6J("ngClass",e.multipleVariants?"bg-info text-white":" border-start-0")}}function Nn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mat-chip",100),t.NdJ("removed",function(){const r=t.CHM(e).$implicit;return t.oxw(3).removeVariant(r)}),t._uU(1),t.TgZ(2,"mat-icon",101),t._uU(3,"x"),t.qZA()()}if(2&n){const e=i.$implicit;t.Q6J("selectable",!0)("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function qn(n,i){1&n&&(t.TgZ(0,"th",119),t._uU(1,"UnitCost "),t.qZA())}function wn(n,i){1&n&&(t.TgZ(0,"th",120),t._uU(1,"Ratio"),t.qZA())}function Sn(n,i){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw().index;t.xp6(1),t.Oqu(e+1)}}function Un(n,i){if(1&n&&(t.TgZ(0,"td",123),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.UnitCost))}}function On(n,i){if(1&n&&(t.TgZ(0,"td",116),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",0==e.Ratio&&7!=e.TypeID?1:t.lcZ(2,1,e.Ratio),"")}}const Jn=function(n){return{"text-decoration":n}};function Vn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"tr",121),t.NdJ("click",function(){const a=t.CHM(e),r=a.$implicit,p=a.index;return t.oxw(4).openDialogVariant(r,p)}),t.TgZ(1,"td")(2,"i",122),t.NdJ("click",function(){const r=t.CHM(e).index;return t.oxw(4).data.Product.Variants.splice(r,1)}),t.qZA()(),t.TgZ(3,"td"),t._uU(4),t.YNc(5,Sn,2,1,"span",115),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td",123),t._uU(9),t.ALo(10,"number"),t.qZA(),t.YNc(11,Un,3,3,"td",124),t.TgZ(12,"td",123),t._uU(13),t.ALo(14,"number"),t.qZA(),t.TgZ(15,"td",125),t._uU(16),t.ALo(17,"number"),t.qZA(),t.YNc(18,On,3,3,"td",126),t.qZA()}if(2&n){const e=i.$implicit,o=t.oxw(4);t.Q6J("cdkDragDisabled","small"==o.screenSize),t.xp6(3),t.Akn(t.VKq(19,Jn,e.Discontinued?"line-through":"none")),t.ekj("bg-gradient-warning",e.Discontinued),t.xp6(1),t.hij("",e.Model," "),t.xp6(1),t.Q6J("ngIf",!e.Model),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(10,13,e.Weight)),t.xp6(2),t.Q6J("ngIf",o.data.Role.HasCostRole),t.xp6(2),t.Oqu(t.lcZ(14,15,e.UnitPrice)),t.xp6(3),t.Oqu(t.lcZ(17,17,e.Discount)),t.xp6(2),t.Q6J("ngIf",o.hasMultipleUOM)}}function kn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"td")(1,"input",127),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(4).data.Product.VariantWeight=a})("ngModelChange",function(){t.CHM(e);const a=t.oxw(4);return a.ChangeVariant(a.data.Product.VariantWeight,"Weight")}),t.qZA()()}if(2&n){const e=t.oxw(4);t.xp6(1),t.Q6J("ngModel",e.data.Product.VariantWeight)}}function Fn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",102)(1,"div",55)(2,"div",103)(3,"table",104),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw(3).sortData(a)})("cdkDropListDropped",function(a){return t.CHM(e),t.oxw(3).dropVariant(a)}),t.TgZ(4,"thead",105)(5,"tr"),t._UZ(6,"th",106),t.TgZ(7,"th",107),t._uU(8,"Variant"),t.qZA(),t.TgZ(9,"th",108),t._uU(10,"Code"),t.qZA(),t.TgZ(11,"th",109),t._uU(12,"Weight (GR)"),t.qZA(),t.YNc(13,qn,2,0,"th",110),t.TgZ(14,"th",111),t._uU(15,"UnitPrice"),t.qZA(),t.TgZ(16,"th",111),t._uU(17,"%"),t.qZA(),t.YNc(18,wn,2,0,"th",112),t.qZA()(),t.TgZ(19,"tbody"),t.YNc(20,Vn,19,21,"tr",113),t.qZA(),t.TgZ(21,"tfoot")(22,"tr"),t._UZ(23,"td",114),t.YNc(24,kn,2,1,"td",115),t.TgZ(25,"td",116)(26,"input",117),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(3).data.Product.VariantUnitCost=a})("ngModelChange",function(){t.CHM(e);const a=t.oxw(3);return a.ChangeVariant(a.data.Product.VariantUnitCost,"UnitCost")}),t.qZA()(),t.TgZ(27,"td",116)(28,"input",117),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(3).data.Product.VariantUnitPrice=a})("ngModelChange",function(){t.CHM(e);const a=t.oxw(3);return a.ChangeVariant(a.data.Product.VariantUnitPrice,"UnitPrice")}),t.qZA()(),t.TgZ(29,"td")(30,"input",118),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(3).VariantDiscount=a})("keyup",function(){return t.CHM(e),t.oxw(3).UpdateVariantDiscount()}),t.qZA()()()()()()()()}if(2&n){const e=t.oxw(3);t.xp6(13),t.Q6J("ngIf",e.data.Role.HasCostRole),t.xp6(5),t.Q6J("ngIf",e.hasMultipleUOM),t.xp6(2),t.Q6J("ngForOf",e.data.Product.Variants),t.xp6(4),t.Q6J("ngIf",e.data.Role.HasCostRole),t.xp6(2),t.Q6J("ngModel",e.data.Product.VariantUnitCost),t.xp6(2),t.Q6J("ngModel",e.data.Product.VariantUnitPrice),t.xp6(2),t.Q6J("ngModel",e.VariantDiscount)}}const Qn=function(n,i){return{"mb-6":n,"mb-3":i}},Ln=function(n){return{"text-danger":n}};function Hn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",7)(1,"div",8)(2,"h3"),t._uU(3,"Variants"),t.qZA()(),t.TgZ(4,"div",86)(5,"div",87)(6,"div",88)(7,"mat-form-field",89)(8,"mat-chip-list",90,91),t.YNc(10,Nn,4,3,"mat-chip",92),t.TgZ(11,"input",93),t.NdJ("matChipInputTokenEnd",function(a){return t.CHM(e),t.oxw(2).addVariant(a)}),t.qZA()()()(),t.TgZ(12,"div",94)(13,"div",95),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).addMultipleVariants()}),t.TgZ(14,"span",96),t._UZ(15,"i",97),t.TgZ(16,"strong",98),t._uU(17,"ADD"),t.qZA()()()()(),t.YNc(18,Fn,31,7,"div",99),t.qZA()()}if(2&n){const e=t.MAs(9),o=t.oxw(2);t.xp6(5),t.Q6J("ngClass",t.WLB(8,Qn,o.EditMode||o.data.Product.Variants.length>0,!(o.EditMode||o.data.Product.Variants.length>0))),t.xp6(2),t.uIk("disabled",!!o.isNameAndCodeExist||null),t.xp6(3),t.Q6J("ngForOf",o.NewVariantInputs),t.xp6(1),t.Q6J("matChipInputFor",e)("ngClass",t.VKq(11,Ln,o.statVariantAdd.length>0))("matChipInputSeparatorKeyCodes",o.separatorKeysCodes)("matChipInputAddOnBlur",!0),t.xp6(7),t.Q6J("ngIf",o.EditMode||o.data.Product.Variants.length>0)}}const En=function(n){return{"bg-light":n}};function Yn(n,i){if(1&n&&t._UZ(0,"span",142),2&n){const e=t.oxw(4);t.Q6J("ngClass",t.VKq(1,En,!e.data.Role.HasInventoryEdit))}}function Rn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"input",141),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().$implicit.UnitsInStock=a}),t.qZA()}if(2&n){const e=t.oxw().$implicit;t.Q6J("ngModel",e.UnitsInStock)}}function Bn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"tr")(1,"td",138),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t.TgZ(5,"td"),t.YNc(6,Yn,1,3,"span",139),t.YNc(7,Rn,1,1,"input",140),t.qZA(),t.TgZ(8,"td")(9,"input",141),t.NdJ("ngModelChange",function(a){return t.CHM(e).$implicit.MinStock=a}),t.qZA()(),t.TgZ(10,"td")(11,"input",141),t.NdJ("ngModelChange",function(a){return t.CHM(e).$implicit.MaxStock=a}),t.qZA()()()}if(2&n){const e=i.$implicit,o=t.oxw(3);t.xp6(2),t.Oqu(e.Name),t.xp6(4),t.Q6J("ngIf",!o.data.Role.HasInventoryEdit),t.xp6(1),t.Q6J("ngIf",o.data.Role.HasInventoryEdit),t.xp6(2),t.Q6J("ngModel",e.MinStock),t.xp6(2),t.Q6J("ngModel",e.MaxStock)}}function $n(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"input",147),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(4).Stock=a})("keyup",function(a){return t.CHM(e),t.oxw(4).UpdateStock(a)}),t.qZA()}if(2&n){const e=t.oxw(4);t.Q6J("ngModel",e.Stock)}}function jn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"tfoot")(1,"tr"),t._UZ(2,"td",143),t.TgZ(3,"td"),t.YNc(4,$n,1,1,"input",144),t.qZA(),t.TgZ(5,"td")(6,"input",145),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(3).MinStock=a})("keyup",function(a){return t.CHM(e),t.oxw(3).UpdateMinStock(a)}),t.qZA()(),t.TgZ(7,"td")(8,"input",146),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(3).MaxStock=a})("keyup",function(a){return t.CHM(e),t.oxw(3).UpdateMaxStock(a)}),t.qZA()()()()}if(2&n){const e=t.oxw(3);t.xp6(4),t.Q6J("ngIf",e.data.Role.IsInventoryEditor),t.xp6(2),t.Q6J("ngModel",e.MinStock),t.xp6(2),t.Q6J("ngModel",e.MaxStock)}}function Kn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",7)(1,"div",8)(2,"h3"),t._uU(3,"Inventory"),t.qZA()(),t.TgZ(4,"div",9)(5,"div",103)(6,"table",128),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw(2).sortDataInventrory(a)}),t.TgZ(7,"thead",129)(8,"tr",130)(9,"th",131),t._uU(10,"Outlet "),t._UZ(11,"i",132),t.qZA(),t._UZ(12,"th",133),t.TgZ(13,"th",134),t._uU(14,"On Hand"),t.qZA(),t.TgZ(15,"th",135),t._uU(16," ROP "),t.qZA(),t.TgZ(17,"th",136),t._uU(18," Max "),t.qZA()()(),t.TgZ(19,"tbody"),t.YNc(20,Bn,12,5,"tr",137),t.qZA(),t.YNc(21,jn,9,3,"tfoot",115),t.qZA()()()()}if(2&n){const e=t.oxw(2);t.xp6(20),t.Q6J("ngForOf",e.data.Options.Entities),t.xp6(1),t.Q6J("ngIf",e.data.Options.Entities.length>1)}}const St=function(n){return{selected:n}};function Wn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",35)(1,"ng-select",148),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).data.Product.VariantTypeID=a})("ngModelChange",function(a){return t.CHM(e),t.oxw(2).onSelectVariantType(a)}),t.qZA(),t.TgZ(2,"label",149),t._uU(3,"Type"),t.qZA()()}if(2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(4,St,e.IsNotEmpty(e.data.Product.VariantTypeID))),t.xp6(1),t.Q6J("ngModel",e.data.Product.VariantTypeID)("clearable",!1)("items",e.data.Options.Types)}}function Gn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",5)(1,"div",32)(2,"div",11)(3,"input",150),t.NdJ("ngModelChange",function(){t.CHM(e);const a=t.oxw(2);return a.ChangeVariant(a.data.Product.VariantWeight,"Weight")})("ngModelChange",function(a){return t.CHM(e),t.oxw(2).data.Product.VariantWeight=a}),t.qZA(),t.TgZ(4,"label",151),t._uU(5,"Weight (gr)"),t.qZA()()()()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.data.Product.VariantWeight)}}function zn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",16)(1,"div",32)(2,"div",35)(3,"ng-select",152),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).data.Product.VariantUOM=a}),t.qZA(),t.TgZ(4,"label",153),t._uU(5,"Units of Measurement"),t.qZA()()(),t.TgZ(6,"div",38)(7,"h2",154),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).openDialog("UOM")}),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("ngClass",t.VKq(4,St,e.IsNotEmpty(e.data.Product.VariantUOM))),t.xp6(1),t.Q6J("clearable",!1)("ngModel",e.data.Product.VariantUOM)("items",e.data.Options.UOMs)}}function Xn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td")(4,"ng-select",157),t.NdJ("ngModelChange",function(a){const p=t.CHM(e).index;return t.oxw(3).selectedStorages[p].Key=a})("change",function(a){const p=t.CHM(e).$implicit;return t.oxw(3).onSelectStorage(p.ID,a)}),t.qZA()()()}if(2&n){const e=i.$implicit,o=i.index,a=t.oxw(3);t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Q6J("items",a.options.Storages)("ngModel",a.selectedStorages[o].Key)}}function to(n,i){if(1&n&&(t.TgZ(0,"div",9)(1,"div",103)(2,"table",155)(3,"thead",105)(4,"tr")(5,"th",156),t._uU(6,"Outlet"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"Storage"),t.qZA()()(),t.TgZ(9,"tbody"),t.YNc(10,Xn,5,3,"tr",137),t.qZA()()()()),2&n){const e=t.oxw(2);t.xp6(10),t.Q6J("ngForOf",e.options.Entities)}}const eo=function(){return["/menu/Products/Catalog/Products"]},no=function(n){return{"border border-danger":n}};function oo(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"a",2),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"button",3),t.NdJ("click",function(){return t.CHM(e),t.oxw().validate()}),t._uU(5,"Save"),t.qZA()(),t.TgZ(6,"content")(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h3"),t._uU(13,"General"),t.qZA()(),t.TgZ(14,"div",9)(15,"div",5)(16,"div",10)(17,"div",11)(18,"input",12,13),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().data.Product.Name=a})("change",function(){return t.CHM(e),t.oxw().ValidateNameCode()}),t.qZA(),t.TgZ(20,"label",14),t._uU(21,"Name"),t.qZA(),t.YNc(22,vn,2,0,"span",15),t.YNc(23,Tn,2,0,"span",15),t.qZA(),t.TgZ(24,"div",16)(25,"div",17)(26,"div",11)(27,"input",18),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().data.Product.Code=a})("change",function(){return t.CHM(e),t.oxw().ValidateNameCode()}),t.qZA(),t.TgZ(28,"label",19),t._uU(29,"Code"),t.qZA()()(),t.TgZ(30,"div",20)(31,"span",21)(32,"p-treeSelect",22),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().selectedCategory=a})("onNodeSelect",function(a){return t.CHM(e),t.oxw().onSelectCategory(a.node)}),t.YNc(33,Zn,2,2,"ng-template",23),t.qZA(),t.TgZ(34,"label",24),t._uU(35,"Category"),t.qZA()()(),t.TgZ(36,"div",25)(37,"h2",26),t.NdJ("click",function(){return t.CHM(e),t.oxw().openDialog("Category")}),t.qZA()()(),t.YNc(38,In,14,3,"div",27),t.qZA()()()(),t.YNc(39,An,27,8,"div",28),t.YNc(40,Hn,19,13,"div",29),t.YNc(41,Kn,22,2,"div",29),t.TgZ(42,"div",7)(43,"div",8)(44,"h3"),t._uU(45,"Description"),t.qZA()(),t.TgZ(46,"div",9)(47,"div",11)(48,"POS-tinymce-editor",30),t.NdJ("valueChange",function(a){return t.CHM(e),t.oxw().data.Product.Description=a}),t.qZA()()()()(),t.TgZ(49,"div",31)(50,"div",7)(51,"div",8)(52,"h3"),t._uU(53,"Properties"),t.qZA()(),t.TgZ(54,"div",9)(55,"div",5)(56,"div",32),t.YNc(57,Wn,4,6,"div",33),t.qZA()(),t.TgZ(58,"div",5)(59,"div",32)(60,"div",11)(61,"autocompleteV2",34),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().data.Product.SupplierID=a}),t.qZA()()()(),t.TgZ(62,"div",16)(63,"div",32)(64,"div",35)(65,"ng-select",36),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().data.Product.BrandID=a}),t.qZA(),t.TgZ(66,"label",37),t._uU(67,"Brands"),t.qZA()()(),t.TgZ(68,"div",38)(69,"h2",39),t.NdJ("click",function(){return t.CHM(e),t.oxw().openDialog("Brand")}),t.qZA()()(),t.TgZ(70,"div",16)(71,"div",32)(72,"div",35)(73,"ng-select",40),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().data.Product.TagIDs=a}),t.qZA(),t.TgZ(74,"label",41),t._uU(75,"Tags"),t.qZA()()(),t.TgZ(76,"div",38)(77,"h2",42),t.NdJ("click",function(){return t.CHM(e),t.oxw().openDialog("Tag")}),t.qZA()()()()(),t.TgZ(78,"div",7)(79,"div",8)(80,"h3"),t._uU(81,"Extras"),t.qZA()(),t.TgZ(82,"div",9),t.YNc(83,Gn,6,1,"div",27),t.TgZ(84,"div",5)(85,"div",32)(86,"datepicker",43),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().data.Product.Released=a}),t.qZA()()(),t.TgZ(87,"div",44)(88,"label"),t._uU(89,"Discontinued"),t.qZA(),t.TgZ(90,"radio-options",45),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw().data.Product.Discontinued=a})("modelChange",function(){return t.CHM(e),t.oxw().toggleDiscontinue()}),t.qZA()(),t.YNc(91,zn,8,6,"div",46),t.TgZ(92,"div",11)(93,"input",47),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().data.NextProductName=a})("ngModelChange",function(a){return t.CHM(e),t.oxw().data.Product.NextProductID=a}),t.qZA(),t.TgZ(94,"label",48),t._uU(95,"Cross Sell Product"),t.qZA()()()(),t.TgZ(96,"div",7)(97,"div",8)(98,"h3"),t._uU(99,"Storage Location"),t.qZA()(),t.YNc(100,to,11,1,"div",49),t.qZA()()()()()()}if(2&n){const e=t.MAs(19),o=t.oxw();t.Q6J("pageData",o.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(39,eo)),t.xp6(2),t.Q6J("disabled",!(null!=o.data.Product&&o.data.Product.Name)),t.xp6(14),t.Q6J("ngClass",t.VKq(40,no,o.isNameAndCodeExist))("ngModel",o.data.Product.Name),t.xp6(4),t.Q6J("ngIf",e.invalid&&(e.dirty||e.touched)),t.xp6(1),t.Q6J("ngIf",o.isNameAndCodeExist),t.xp6(4),t.Q6J("ngModel",o.data.Product.Code),t.xp6(5),t.Q6J("options",null==o.data||null==o.data.Options?null:o.data.Options.Categories)("ngModel",o.selectedCategory),t.xp6(6),t.Q6J("ngIf",o.data.Role.HasImageEditor),t.xp6(1),t.Q6J("ngIf",!o.EditMode),t.xp6(1),t.Q6J("ngIf",o.multipleVariants||o.EditMode),t.xp6(1),t.Q6J("ngIf",!o.EditMode),t.xp6(7),t.Q6J("value",o.data.Product.Description),t.xp6(9),t.Q6J("ngIf",!o.EditMode),t.xp6(4),t.Q6J("customStyle",!0)("customLabel","Supplier")("ngModel",o.data.Product.SupplierID)("inputTextValue",o.data.SupplierName),t.xp6(3),t.Q6J("ngClass",t.VKq(42,St,o.IsNotEmpty(o.data.Product.BrandID))),t.xp6(1),t.Q6J("clearable",o.IsNotEmpty(o.data.Product.BrandID))("ngModel",o.data.Product.BrandID)("items",o.data.Options.Brands),t.xp6(7),t.Q6J("ngClass",t.VKq(44,St,o.IsNotEmpty(0!=o.data.Product.TagIDs.length))),t.xp6(1),t.Q6J("multiple",!0)("clearable",!1)("ngModel",o.data.Product.TagIDs)("items",o.data.Options.Tags),t.xp6(10),t.Q6J("ngIf",!o.EditMode),t.xp6(3),t.Q6J("date",o.data.Product.Released)("showPlaceholder",!0),t.xp6(4),t.Q6J("model",o.data.Product.Discontinued),t.xp6(1),t.Q6J("ngIf",!o.EditMode),t.xp6(2),t.Q6J("ngModel",o.data.NextProductName)("ngModel",o.data.Product.NextProductID),t.xp6(7),t.Q6J("ngIf",(null==o.selectedStorages?null:o.selectedStorages.length)>0)}}let ao=(()=>{class n extends Y.U{constructor(e,o,a,r,p,x){super(e,"catalog/ProductLoader/ProductForm",o),this.httpService=e,this.activatedRoute=o,this.router=a,this.toaster=r,this.cloudinaryService=p,this.matDialog=x,this.separatorKeysCodes=[Xt.K5,Xt.OC],this.statVariantAdd=[],this.NewVariantInputs=[],this.selectedStorages=[],this.smallBreakpoints=576,this.selectedCategoryLabel=null,this.destroy$=new Ht.x,this.EditMode=!1,this.NewVariantInputs=[],this.Stock=0,this.MinStock=null,this.MaxStock=null,this.screenSize=this.getCurrentBreakpoints(window.innerWidth),this.subscribeWindowSizeChanges()}getCurrentBreakpoints(e){return e<=this.smallBreakpoints?"small":"large"}subscribeWindowSizeChanges(){(0,Fe.R)(window,"resize").pipe((0,Qe.b)(500),(0,Et.R)(this.destroy$)).subscribe(e=>this.screenSize=this.getCurrentBreakpoints(e.target.innerWidth))}postBindForm(e){this.menuData.H=e.PageTitle,this.ProductName=e.Product.Name,this.data.Options.Entities=e.Options.Entities.sort(this.dynamicSort("Name")),this.EditMode=C.gT.IsNotEmpty(this.data.Product.CategoryID),e.Options.Entities.forEach(o=>{const a=e.ProductLocations.find(r=>r.OutletID==o.ID);o.Key=C.gT.IsEmpty(a)?null:a.StorageID}),this.selectedStorages=e.Options.Entities,this.initCloudinary(),this.productImages=this.data.Product.ProductImages,this.initSelectedCategory()}initSelectedCategory(){this.EditMode?(this.selectedCategory=this.findSelectedCategory(this.data.Options.Categories,this.data.Product.CategoryID),this.generateLabelSelectedCategory(this.selectedCategory)):(this.data.Product.CategoryID=null,this.selectedCategoryLabel=null,this.selectedCategory=null)}initCloudinary(){this.productImages=[],this.cloudinaryService.initUploadImageWidget(cloudinary,this.data.CloudinaryFolder).pipe((0,Et.R)(this.destroy$)).subscribe(e=>{this.productImages=[...this.productImages,{URL:e.ImageURL}]})}onRemoveImage(e){this.matDialog.open(te,{data:{message:"Are you sure you want to delete this image?",title:"Confirm Delete"},width:"335px"}).afterClosed().subscribe(o=>{"REMOVE"==o&&(this.productImages=this.productImages.filter((a,r)=>r!=e))})}drop(e){(0,G.bA)(this.productImages,e.previousContainer.data,e.container.data)}dropVariant(e){(0,G.bA)(this.data.Product.Variants,e.previousIndex,e.currentIndex)}uploadPicture(){this.productImages.length<5&&this.cloudinaryService.openUploadWidget()}IsNotEmpty(e){return C.gT.IsNotEmpty(e)}validate(){let e=this.data.Product.Description;e&&e.length>500?this.toaster.warning("Maximum 500 characters allowed","Warning"):this.isNameAndCodeExist?this.toaster.error("Product with the same name is already exist",Z.n.Error):this.onSubmit("catalog/product/SubmitProduct")}ValidateNameCode(){if(this.EditMode&&this.data.Product.Name.toLowerCase()===this.ProductName.toLowerCase())return void(this.isNameAndCodeExist=!1);const e={Name:this.data.Product.Name,Code:this.data.Product.Code};null!=e&&this.httpService.post("/API/catalog/product/IsExistNameCode",JSON.stringify(e)).subscribe(o=>{this.isNameAndCodeExist=o.exist})}openDialog(e){this.matDialog.open(Le,{data:{form:{Name:null,Status:e}}}).afterClosed().subscribe(r=>{r&&this.httpService.post(`/api/catalog/${"CreateProductCategory"==r.url?"category":"product"}/${r.url}`,{name:r.Name,parentID:"undefined"}).subscribe(j=>{switch(r.Status){case"Category":let zt={children:[],collapsedIcon:"fas fa-folder",expandedIcon:"fas fa-folder-open",id:j.ID,label:r.Name};this.data.Options.Categories=[...this.data.Options.Categories,zt],this.data.Product.CategoryID=j.ID,this.selectedCategory=zt,this.generateLabelSelectedCategory(zt);break;case"Brand":this.data.Options.Brands=[...this.data.Options.Brands,{ID:j.ObjectID,Name:r.Name}],this.data.Product.BrandID=j.ObjectID;break;case"Tag":this.data.Options.Tags=[...this.data.Options.Tags,{ID:j.ObjectID,Name:r.Name}],this.data.Product.TagIDs=[...this.data.Product.TagIDs,j.ObjectID];break;case"UOM":this.data.Options.UOMs=[...this.data.Options.UOMs,{ID:j.ObjectID,Name:r.Name}],this.data.Product.VariantUOM=j.ObjectID}})})}onSelectVariantType(e){e==qt.J.MultipleUOM&&this.handlingVariantTypeUOM()}handlingVariantTypeUOM(){const e=this.data.Product.Variants;this.data.Product.Variants=e.map((o,a)=>(o.TypeID=this.data.Product.VariantTypeID,a===e.length-1&&(o.TypeID=1,o.Ratio=1),o))}ChangeVariant(e,o){for(const a of this.data.Product.Variants)a[o]=e}FocusOnTagsInput(e){this.multipleVariants=e}removeVariant(e){const o=this.NewVariantInputs.indexOf(e);o>=0&&this.NewVariantInputs.splice(o,1)}addVariant(e){const o=e.input,a=e.value;a&&(this.statVariantAdd=this.NewVariantInputs.filter(function(r){return r==a}),0==this.statVariantAdd.length&&(this.NewVariantInputs.push(a),o.value=""))}openDialogVariant(e,o){this.matDialog.open(Re,{data:{form:e,Options:this.data.Options,Role:this.data.Role,parentDiscontinued:this.data.Product.Discontinued,productName:this.data.Product.Name}}).afterClosed().pipe((0,Yt.h)(a=>C.gT.IsNotEmpty(a))).subscribe(a=>{this.data.Product.Variants[o]=a})}AddOrUpdateVariant(e){!e.Model||!e.Name||(void 0===e.index?(e.ID=C.gT.GuidEmpty,this.data.Product.ID!==C.gT.GuidEmpty?(e.ProductID=this.data.Product.ID,e.TypeID=1,e.CostCurrencyID=1,e.PriceCurrencyID=1):e.ProductID=C.gT.GuidEmpty,this.data.Product.Variants.push(e)):this.data.Product.Variants[e.index]=e)}addMultipleVariants(){this.hasMultipleUOM=7===this.data.Product.VariantTypeID;const e=this.NewVariantInputs.length;let o;for(let a=0;a<e;a++){const r=this.NewVariantInputs[a];o={Index:a+1,Name:this.data.Product.Name+"("+r+")",Model:r,UnitCost:this.data.Product.VariantUnitCost,UnitPrice:this.data.Product.VariantUnitPrice,TypeID:this.data.Product.VariantTypeID,Weight:this.data.Product.VariantWeight,UOM:this.data.Product.VariantUOM,Discount:this.VariantDiscount},this.hasMultipleUOM&&a===e-1&&(o.TypeID=1,o.Ratio=1),this.AddOrUpdateVariant(o)}this.NewVariantInputs=[]}UpdateVariantDiscount(){for(const e of this.data.Product.Variants)e.Discount=this.VariantDiscount}sortData(e){const o=this.data.Product.Variants.slice();this.data.Product.Variants=e.active&&""!==e.direction?o.sort((a,r)=>"Variant"===e.active?(a.Model<r.Model?-1:1)*("asc"===e.direction?1:-1):0):o}sortDataInventrory(e){let a="desc"==e.direction?"-":"";a+="Name",this.data.Options.Entities=this.data.Options.Entities.sort(this.dynamicSort(a))}dynamicSort(e){let o=1;return"-"===e[0]&&(o=-1,e=e.substr(1)),function(a,r){return-1==o?r[e].localeCompare(a[e]):a[e].localeCompare(r[e])}}UpdateStock(e){for(const o of this.data.Options.Entities)o.UnitsInStock=e.target.value}UpdateMinStock(e){for(const o of this.data.Options.Entities)o.MinStock=e.target.value}UpdateMaxStock(e){for(const o of this.data.Options.Entities)o.MaxStock=e.target.value}preSubmitForm(){if(this.checkVariantInput(),!this.EditMode){this.data.Product.OutletStocks=[];for(const e of this.data.Options.Entities){let o={},a={},r={};e.UnitsInStock&&(r={UnitsInStock:e.UnitsInStock}),e.MinStock&&(o={MinStock:e.MinStock}),e.MaxStock&&(a={MaxStock:e.MaxStock}),this.data.Product.OutletStocks.push(Object.assign(Object.assign(Object.assign({EntityID:e.ID,Name:e.Name},o),a),r))}}this.data.Product.ProductImages=this.getProductImage(),this.data.Product.ImageUrl=this.productImages[0]?this.productImages[0].URL:null,this.data.Form=this.data.Product}getProductImage(){return this.isRemoveImg&&(this.productImages=this.productImages.filter(e=>!e.Selected)),this.productImages=this.productImages.map(e=>(delete e.Selected,e.URL=e.URL.substring(e.URL.lastIndexOf("/")+1),e)),this.productImages}onZoomImage(e,o){ct()({el:o.target,imgSrc:e,noLoader:!1})}checkVariantInput(){let e;this.NewVariantInputs.forEach((o,a)=>{e={Index:a+1,Name:this.data.Product.Name+"("+o+")",Model:o,UnitCost:this.data.Product.VariantUnitCost,UnitPrice:this.data.Product.VariantUnitPrice,TypeID:this.data.Product.VariantTypeID,Weight:this.data.Product.VariantWeight,UOM:this.data.Product.VariantUOM,Ratio:0},this.AddOrUpdateVariant(e)})}onSubmitSuccess(e){this.toaster.success("Product has been submitted successfully!",Z.n.Success),"Variant"==e.RedirectTo?this.router.navigate(["/menu/Products/Catalog/Variants/Form"],{queryParams:{ID:e.FirstVariantID}}):this.router.navigate(["/menu/Products/Catalog/Products"])}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}toggleDiscontinue(){this.data.Product.Variants.forEach(this.data.Product.Discontinued?e=>e.Discontinued=!0:e=>e.Discontinued=!1)}onSelectStorage(e,o){let a;C.gT.IsEmpty(this.data.Product.ProductLocations)&&(this.data.Product.ProductLocations=[]),a=C.gT.IsEmpty(o)?C.gT.GuidEmpty:o.Key,C.gT.IsEmpty(this.data.Product.ProductLocations.find(r=>r.OutletID==e))&&this.data.Product.ProductLocations.push({OutletID:e,StorageID:a})}onSelectCategory(e){this.generateLabelSelectedCategory(e),this.data.Product.CategoryID=e.id}generateLabelSelectedCategory(e){if(e){let o=[];this.selectedCategoryLabel="";do{o=[...o,e.label],e=e.parent}while(void 0!==e);this.selectedCategoryLabel=o.reverse().join("/")}else this.selectedCategoryLabel="Select Category"}findSelectedCategory(e,o){if(!C.gT.IsNotEmpty(o))return null;for(const a of e){if(a.id===o)return a;{a.children=a.children?a.children:[],a.children=a.children.map(p=>(p.parent=a,p));const r=this.findSelectedCategory(a.children,o);if(r)return r}}}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(l.gz),t.Y36(l.F0),t.Y36(f._W),t.Y36(ee.q),t.Y36(b.uw))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-form-product"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],["role","button",1,"btn","btn-outline-secondary","me-5",3,"routerLink"],["type","button","role","button",1,"btn","btn-success",3,"disabled","click"],[1,"container-fluid","bg-light-gray","pt-5"],[1,"row"],[1,"col-md-8"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-12"],[1,"form-floating-outline"],["type","text","placeholder","Name","name","productName","required","",1,"form-control",3,"ngClass","ngModel","ngModelChange","change"],["productName","ngModel"],["for","productName"],["class","control-label text-danger",4,"ngIf"],[1,"row","g-0"],[1,"col-4","pe-6"],["id","inputCode","type","text","placeholder","Code",1,"form-control",3,"ngModel","ngModelChange","change"],["for","inputCode"],[1,"col-7","pe-2","field"],[1,"p-float-label"],["selectionMode","single","filter","true","filterInputAutoFocus","true","scrollHeight","250px","inputId","selectCategory",3,"options","ngModel","ngModelChange","onNodeSelect"],["pTemplate","value"],["for","selectCategory"],[1,"col","text-center"],["id","btnCategory","matTooltip","Add New Category?",1,"fas","fa-plus-circle","align-middle","pt-10","pointer",3,"click"],["class","row",4,"ngIf"],["class","card",3,"ngClass",4,"ngIf"],["class","card",4,"ngIf"],["height","210px",3,"value","valueChange"],[1,"col-md-4"],[1,"col"],["class","form-floating-outline",3,"ngClass",4,"ngIf"],["id","inputSupplier","placeholder","Supplier","requestUrl","/API/AC/GetSupplierSuggestion",1,"w-100",3,"customStyle","customLabel","ngModel","inputTextValue","ngModelChange"],[1,"form-floating-outline",3,"ngClass"],["id","inputBrand","bindLabel","Name","bindValue","ID",1,"productform",3,"clearable","ngModel","items","ngModelChange"],[1,"ng-select"],[1,"col-auto"],["matTooltip","Add New Brand?",1,"fa","fa-plus-circle","align-middle","ps-5","pt-10",3,"click"],["bindLabel","Name","bindValue","ID","id","inputTags",1,"productform",3,"multiple","clearable","ngModel","items","ngModelChange"],["for","inputTags",1,"ng-select"],["matTooltip","Add New Tags?",1,"fa","fa-plus-circle","align-middle","ps-5","pt-10",3,"click"],["name","expired","placeholder","Release Date","appearance","outline",2,"height","auto","font-size","16px","width","100%",3,"date","showPlaceholder","dateChange"],[1,"form-floating-outline","radio","border","rounded",2,"padding-top","20px"],[3,"model","modelChange"],["class","row g-0",4,"ngIf"],["type","text","id","inputNextProduct","placeholder","Cross Sell Product","autocomplete","on","wsmethod","GetProductSuggestion",1,"form-control",3,"ngModel","ngModelChange"],["for","inputNextProduct"],["class","card-body",4,"ngIf"],[1,"control-label","text-danger"],["matTooltipPosition","above",3,"matTooltip"],[1,"form-group","p-3","border","rounded"],[1,"w-auto","px-2","text-secondary"],[1,"row","mt-3"],[1,"col-md-12"],["cdkDropListGroup","",1,"upload_trigger","d-flex","align-items-center"],["class","image_temporary\n productUpload_defaultSize me-2 image-upload","cdkDropList","","cdkDropListOrientation","horizontal",3,"cdkDropListData","click","cdkDropListDropped",4,"ngFor","ngForOf"],["type","button",1,"btn","btn-light","btn-sm",2,"height","32px",3,"disabled","click"],[1,"fa","fa-upload"],["cdkDropList","","cdkDropListOrientation","horizontal",1,"image_temporary","productUpload_defaultSize","me-2","image-upload",3,"cdkDropListData","click","cdkDropListDropped"],["cdkDrag","",1,"imgContainer"],[1,"imgUpload",3,"src"],[1,"overlay","d-flex","align-items-center","justify-content-center"],["title","Zoom image",1,"eye-icon","image_upload_icon",3,"click"],[1,"fa","fa-eye"],["title","Remove image",1,"trash-icon","image_upload_icon",3,"click"],[1,"fa","fa-trash"],["class","overlay-title",4,"ngIf"],[1,"overlay-title"],[1,"card",3,"ngClass"],["class","col-md-4 pe-3",4,"ngIf"],[1,"col-md-4","ps-3"],["id","inputPrice","placeholder","Selling Price","type","text","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["for","inputPrice"],["class","notes",4,"ngIf"],[1,"col-6"],["data-toggle","tooltip","data-placement","bottom","matTooltip","This product only has 1 variant",1,"text-center","py-4","pointer","rounded-left","border",3,"ngClass","click"],[1,"fa-solid","fa-archive","fa-lg"],[1,"h5","mt-3"],["data-toggle","tooltip","data-placement","bottom","data-html","true","matTooltip","This product has multiple variants e.g. Multiple sizes or colors",1,"text-center","py-4","pointer","rounded-end","border",3,"ngClass","click"],[1,"fa-solid","fa-boxes","fa-lg"],[1,"col-md-4","pe-3"],["id","inputCost","type","text","placeholder","Buying Cost","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["for","inputCost"],[1,"notes"],[1,"card-body","mat-chip-custom"],[1,"input-group",3,"ngClass"],[1,"col","px-0"],["appearance","outline",1,"w-100","pe-0"],["aria-label","New Variant Inputs"],["chipList",""],[3,"selectable","removable","removed",4,"ngFor","ngForOf"],["placeholder","e.g. Red, Green, Blue",3,"matChipInputFor","ngClass","matChipInputSeparatorKeyCodes","matChipInputAddOnBlur","matChipInputTokenEnd"],[1,"col-auto","px-0"],[1,"input-group-append","pointer",3,"click"],[1,"input-group-text","rounded-right"],["aria-hidden","true",1,"fa","fa-plus","me-3"],[1,"headings-font-family","h4","font-weight-bold"],["class","form-group row",4,"ngIf"],[3,"selectable","removable","removed"],["matChipRemove",""],[1,"form-group","row"],[1,"table-responsive"],["matSort","","cdkDropList","",1,"table","table-bordered",3,"matSortChange","cdkDropListDropped"],[1,"table-light"],["width","15px",1,"border-end"],["mat-sort-header","Variant",1,"border-end"],["width","120px",1,"border-end"],["width","120px",1,"text-end","border-end","pe-10"],["width","100px","class","text-end border-end pe-10",4,"ngIf"],["width","110px",1,"text-end","border-end","pe-10"],["width","40px","class","text-end border-end",4,"ngIf"],["style","cursor: pointer;","cdkDrag","",3,"cdkDragDisabled","click",4,"ngFor","ngForOf"],["colspan","3"],[4,"ngIf"],[1,"text-end"],["type","text","placeholder","set all price","autoNum","",1,"form-control","text-end",3,"ngModel","ngModelChange"],["type","text","placeholder","set all discount","autoNum","","percentage","",1,"form-control","text-end",3,"ngModel","ngModelChange","keyup"],["width","100px",1,"text-end","border-end","pe-10"],["width","40px",1,"text-end","border-end"],["cdkDrag","",2,"cursor","pointer",3,"cdkDragDisabled","click"],["aria-hidden","true",1,"fa","fa-times","text-danger","fa-2x",3,"click"],[1,"text-end","pe-10"],["class","text-end pe-10",4,"ngIf"],[1,"text-end","text-danger","pe-10"],["class","text-end",4,"ngIf"],["type","text","placeholder","set all weight","autoNum","",1,"form-control","text-end",3,"ngModel","ngModelChange"],["matSort","",1,"table","table-bordered","custom-table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"border-bottom-0"],["mat-sort-header","Outlet",1,"border-end"],[1,"glyphicon","glyphicon-sort"],[1,"border-end",2,"width","10px"],[1,"text-end","border-end",2,"width","120px"],["title","ROP Inventory for this outlet before it gets re-alerted",1,"text-end","border-end",2,"width","120px"],["title","Max Inventory that this outlet should have",1,"text-end","border-end",2,"width","120px"],[4,"ngFor","ngForOf"],[1,"align-middle"],["class","form-control text-end",3,"ngClass",4,"ngIf"],["type","text","class","form-control text-end","autoNum","",3,"ngModel","ngModelChange",4,"ngIf"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModel","ngModelChange"],[1,"form-control","text-end",3,"ngClass"],["colspan","2"],["type","text","placeholder","set all outlet","class","form-control text-end","name","Stock","autoNum","",3,"ngModel","ngModelChange","keyup",4,"ngIf"],["type","text","placeholder","set all outlet","name","MinStock","autoNum","",1,"form-control","text-end",3,"ngModel","ngModelChange","keyup"],["type","text","placeholder","set all outlet","name","MaxStock","autoNum","",1,"form-control","text-end",3,"ngModel","ngModelChange","keyup"],["type","text","placeholder","set all outlet","name","Stock","autoNum","",1,"form-control","text-end",3,"ngModel","ngModelChange","keyup"],["id","inputType","bindLabel","Value","bindValue","Key",1,"productform","w-100",3,"ngModel","clearable","items","ngModelChange"],["for","inputType",1,"ng-select"],["id","extra-weight","placeholder","Weight","type","text","autoNum","",1,"form-control","w-100",3,"ngModel","ngModelChange"],["for","extra-weight"],["id","inputUOM","bindLabel","Name","bindValue","ID",1,"productform",3,"clearable","ngModel","items","ngModelChange"],["for","inputUOM",1,"ng-select"],["matTooltip","Add New UOM?",1,"fa","fa-plus-circle","ps-5","pt-10",3,"click"],[1,"table","table-bordered"],[1,"border-end",2,"width","40%"],["bindLabel","Value","bindValue","Key",3,"items","ngModel","ngModelChange","change"]],template:function(e,o){1&e&&t.YNc(0,oo,101,46,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data.Options)},directives:[c.O5,m.p,l.yS,s.Fj,s.Q7,c.mk,s.JJ,s.On,oe,z.jx,F.gM,G.Fd,c.sg,G.Wj,G.Zt,B.b,Cn.KE,bt.qn,bt.HS,bt.qH,bt.oH,$.YE,$.nU,Bt.V,y.w9,ft.J,E.QB,q.P],pipes:[c.JJ],styles:[".mat-chip-custom .mat-form-field-infix {\n border: 0;\n height: 37px !important;\n}\n .mat-chip-custom .mat-form-field-wrapper {\n margin: 0 !important;\n}\n .mat-chip-custom .mat-form-field-outline-end {\n border-radius: unset !important;\n}\n .mat-chip-custom .mat-standard-chip {\n min-height: auto;\n height: auto;\n}\n .mat-chip-custom .mat-chip-list-wrapper input.mat-input-element, .mat-chip-custom .mat-chip-list-wrapper .mat-standard-chip {\n margin: 1.5px !important;\n height: 22px;\n}\n .mat-chip-custom .mat-standard-chip.mat-chip-with-trailing-icon {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n padding-right: 8px;\n}\n .mat-chip-custom .mat-standard-chip .mat-chip-remove, .mat-chip-custom .mat-standard-chip .mat-chip-trailing-icon {\n margin-left: 4px;\n margin-right: 0;\n}\n .mat-chip-custom .mat-standard-chip .mat-chip-remove, .mat-chip-custom .mat-standard-chip .mat-chip-trailing-icon {\n width: 8px;\n}\n.upload_trigger[_ngcontent-%COMP%] {\n cursor: pointer;\n display: inline-block;\n vertical-align: top;\n width: 100%;\n}\n.image_temporary[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n align-items: center;\n background: #fff;\n border: 1px solid #dde2f0;\n border-radius: 6px;\n cursor: auto;\n}\n.productUpload_defaultSize[_ngcontent-%COMP%] {\n width: 100px;\n height: 100px;\n}\n.imgUpload[_ngcontent-%COMP%] {\n position: absolute;\n overflow: hidden;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n object-fit: scale-down;\n}\n.imgContainer[_ngcontent-%COMP%] {\n width: 95px;\n height: 95px;\n}\n.fa-camera[_ngcontent-%COMP%] {\n font-size: 26px;\n color: #5f5f5f75;\n}\n.image_upload_icon[_ngcontent-%COMP%] {\n font-size: 20px;\n color: #5f5f5f75;\n}\n.image-upload[_ngcontent-%COMP%] {\n border: 1px solid #dde2f0;\n position: relative;\n}\n.overlay[_ngcontent-%COMP%] {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n height: 100%;\n width: 100%;\n opacity: 0;\n transition: 0.3s ease;\n background-color: rgba(110, 110, 110, 0.603);\n border: 1px solid rgba(110, 110, 110, 0.603);\n border-radius: 6px;\n}\n.imgContainer[_ngcontent-%COMP%]:hover .overlay[_ngcontent-%COMP%] {\n opacity: 1;\n}\n.overlay-title[_ngcontent-%COMP%] {\n position: absolute;\n bottom: 0px;\n left: 0px;\n background: rgba(0, 0, 0, 0.5);\n width: 100%;\n transition: 0.5s ease;\n opacity: 1;\n color: white;\n font-size: 12px;\n padding-top: 0px;\n text-align: center;\n top: 80px;\n border: 1px solid rgba(88, 88, 88, 0.5);\n border-bottom-right-radius: 6px;\n border-bottom-left-radius: 6px;\n}\n.eye-icon[_ngcontent-%COMP%] {\n color: #d4d4d4;\n font-size: 18px;\n position: absolute;\n top: 50%;\n left: 35%;\n transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n text-align: center;\n cursor: pointer;\n}\n.eye-icon-center[_ngcontent-%COMP%] {\n position: static;\n top: 0;\n left: 0;\n transform: none;\n}\n.trash-icon[_ngcontent-%COMP%] {\n color: #d4d4d4;\n font-size: 18px;\n position: absolute;\n top: 50%;\n left: 65%;\n transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n text-align: center;\n cursor: pointer;\n}\n@media only screen and (max-width: 650px) {\n .upload_trigger[_ngcontent-%COMP%] {\n flex-wrap: wrap;\n margin-top: 0.625rem !important;\n justify-content: center;\n }\n}\n@media only screen and (min-device-width: 768px) and (max-device-width: 1112px) {\n .upload_trigger[_ngcontent-%COMP%] {\n flex-wrap: wrap;\n margin-top: 0.625rem !important;\n justify-content: center;\n }\n}\nfieldset[_ngcontent-%COMP%], legend[_ngcontent-%COMP%] {\n all: revert;\n}\nlegend[_ngcontent-%COMP%] {\n color: #9da2a6 !important;\n}\n[_nghost-%COMP%] .p-treeselect {\n width: 100%;\n display: inline-flex;\n border: 1px solid #ced4da;\n padding: 11px;\n font-size: 0.875rem !important;\n min-height: 3.6rem;\n}\n .p-treeselect-panel {\n z-index: 10002 !important;\n}"]}),n})();var io=u(29881),ae=u(22313),yt=u(1591);const lo=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold/Invoice_Items"]},ie=function(n){return{ProductID:n}},so=function(){return["/menu/Reports/Purchases_Report/Product_Purchase_History"]};function po(n,i){if(1&n&&(t.TgZ(0,"div",18)(1,"a",41),t._UZ(2,"i",42),t._uU(3," Sales History"),t.qZA(),t._UZ(4,"button",43),t.TgZ(5,"ul",44)(6,"li",45)(7,"a",46),t._uU(8,"Purchase History "),t.qZA()()()()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("routerLink",t.DdM(4,lo))("queryParams",t.VKq(5,ie,e.data.Product.ID)),t.xp6(6),t.Q6J("routerLink",t.DdM(7,so))("queryParams",t.VKq(8,ie,e.data.Product.ID))}}const uo=function(){return["/menu/Products/Catalog/Products/Form"]},It=function(n){return{ID:n}};function _o(n,i){if(1&n&&(t.TgZ(0,"a",47),t._UZ(1,"i",48),t._uU(2," Edit"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("routerLink",t.DdM(2,uo))("queryParams",t.VKq(3,It,e.data.Product.ID))}}function mo(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",49),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).removeProduct()}),t._UZ(1,"i",50),t._uU(2," Delete"),t.qZA()}}function go(n,i){1&n&&(t.TgZ(0,"div",68),t._uU(1,"Main Image"),t.qZA())}function fo(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",60),t.NdJ("click",function(){const r=t.CHM(e).$implicit;return r.Selected=!r.Selected})("cdkDropListDropped",function(a){return t.CHM(e),t.oxw(3).drop(a)}),t.TgZ(1,"div",61),t._UZ(2,"img",62),t.TgZ(3,"div",63)(4,"a",64),t.NdJ("click",function(a){const p=t.CHM(e).$implicit;return t.oxw(3).onZoomImage(p.URL,a)}),t._UZ(5,"i",65),t.qZA(),t.TgZ(6,"a",66),t.NdJ("click",function(){const r=t.CHM(e).index;return t.oxw(3).onRemoveImage(r)}),t._UZ(7,"i",50),t.qZA()(),t.YNc(8,go,2,0,"div",67),t.qZA()()}if(2&n){const e=i.$implicit,o=i.index;t.Q6J("cdkDropListData",o),t.xp6(2),t.Q6J("src",e.URL,t.LSH),t.xp6(6),t.Q6J("ngIf",0==o)}}function ho(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",7)(1,"div",51)(2,"fieldset",52)(3,"legend",53),t._uU(4,"Image "),t.TgZ(5,"span"),t._uU(6),t.qZA()(),t.TgZ(7,"div",54)(8,"div",55)(9,"div",56),t.YNc(10,fo,9,3,"div",57),t.TgZ(11,"button",58),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).uploadPicture()}),t._UZ(12,"i",59),t._uU(13," Upload "),t.qZA()()()()()()()}if(2&n){const e=t.oxw(2);t.xp6(6),t.hij("",e.productImages.length,"/5"),t.xp6(4),t.Q6J("ngForOf",e.productImages),t.xp6(1),t.Q6J("disabled",(null==e.productImages?null:e.productImages.length)>4)}}const xo=function(){return["/menu/Products/Catalog/Products/Inventory"]};function Co(n,i){if(1&n&&(t.TgZ(0,"a",69),t._uU(1,"Outlet Inventory"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("routerLink",t.DdM(2,xo))("queryParams",t.VKq(3,It,e.data.Product.ID))}}function vo(n,i){1&n&&(t.TgZ(0,"th",70),t._uU(1,"UnitCost"),t.qZA())}function To(n,i){1&n&&(t.TgZ(0,"th",70),t._uU(1," UnitPrice"),t.qZA())}function Zo(n,i){1&n&&(t.TgZ(0,"th",26),t._uU(1,"Ratio"),t.qZA())}function bo(n,i){if(1&n&&(t.TgZ(0,"td",72),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.UnitCost))}}function yo(n,i){if(1&n&&(t.TgZ(0,"td",72),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.UnitPrice))}}function Io(n,i){if(1&n&&(t.TgZ(0,"td",72),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.RatioDisplay)}}const Mo=function(n){return{"text-decoration":n}},Po=function(){return["/menu/Products/Catalog/Variants/Info"]};function Do(n,i){if(1&n&&(t.TgZ(0,"tr")(1,"td")(2,"a",71),t._uU(3),t.qZA()(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td",72),t._uU(7),t.ALo(8,"number"),t.qZA(),t.YNc(9,bo,3,3,"td",73),t.YNc(10,yo,3,3,"td",73),t.TgZ(11,"td",72),t._uU(12),t.ALo(13,"number"),t.qZA(),t.YNc(14,Io,2,1,"td",73),t.TgZ(15,"td",72),t._uU(16),t.ALo(17,"number"),t.qZA()()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Akn(t.VKq(20,Mo,e.Discontinued?"line-through":"none")),t.ekj("bg-gradient-warning",e.Discontinued),t.xp6(1),t.Q6J("routerLink",t.DdM(22,Po))("queryParams",t.VKq(23,It,e.ID)),t.xp6(1),t.Oqu(e.Model),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(8,14,e.Weight)),t.xp6(2),t.Q6J("ngIf",!o.data.Roles.Cost||!o.data.Roles.UserRole),t.xp6(1),t.Q6J("ngIf",!o.data.Roles.Price),t.xp6(2),t.Oqu(t.lcZ(13,16,e.PriceDiscount)),t.xp6(2),t.Q6J("ngIf",o.data.Roles.Ratio),t.xp6(2),t.Oqu(t.lcZ(17,18,e.Inventory))}}function Ao(n,i){if(1&n&&(t.TgZ(0,"span",78),t._uU(1),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.Oqu(e)}}function No(n,i){if(1&n&&(t.TgZ(0,"div",74)(1,"div",75),t.YNc(2,Ao,2,1,"span",76),t.qZA(),t.TgZ(3,"label",77),t._uU(4,"Tags"),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("ngForOf",e.data.Form.Tags)}}function qo(n,i){1&n&&t._UZ(0,"POS-info-page-input",79)}function wo(n,i){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA()()),2&n){const e=i.$implicit;t.xp6(2),t.Oqu(e.OutletName),t.xp6(2),t.hij(" ",e.StorageName," ")}}function So(n,i){if(1&n&&(t.TgZ(0,"div",80),t._UZ(1,"i",81),t.TgZ(2,"span")(3,"b"),t._uU(4,"Created:"),t.qZA(),t._uU(5),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(5),t.AsE("\xa0",e.data.Product.Created," / ",e.data.CreatedBy," ")}}const Uo=function(){return["/menu/Contacts/Contact/Suppliers/Info"]};function Oo(n,i){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,po,9,10,"div",2),t.TgZ(3,"div",3),t.YNc(4,_o,3,5,"a",4),t.YNc(5,mo,3,0,"a",5),t.qZA()(),t.TgZ(6,"content")(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"div",10)(12,"h3"),t._uU(13,"General"),t.qZA()(),t.TgZ(14,"div",11)(15,"div",12)(16,"div",13),t._UZ(17,"POS-info-page-input",14),t.qZA(),t.TgZ(18,"div",8),t._UZ(19,"POS-info-page-input",15),t.qZA()(),t.YNc(20,ho,14,3,"div",16),t.qZA()(),t.TgZ(21,"div",9)(22,"div",17)(23,"div")(24,"h2"),t._uU(25,"Pricing and Variants"),t.qZA()(),t.TgZ(26,"div",18),t.YNc(27,Co,2,5,"a",19),t.qZA()(),t.TgZ(28,"div",11)(29,"div",20)(30,"table",21)(31,"thead",22)(32,"tr")(33,"th",23),t._uU(34,"Variant"),t.qZA(),t.TgZ(35,"th",24),t._uU(36,"Code"),t.qZA(),t.TgZ(37,"th",24),t._uU(38,"Weight (gr)"),t.qZA(),t.YNc(39,vo,2,0,"th",25),t.YNc(40,To,2,0,"th",25),t.TgZ(41,"th",26),t._uU(42,"%"),t.qZA(),t.YNc(43,Zo,2,0,"th",27),t.TgZ(44,"th",28),t._uU(45,"Inventory"),t.qZA()()(),t.TgZ(46,"tbody"),t.YNc(47,Do,18,25,"tr",29),t.qZA()()()()(),t.TgZ(48,"div",9)(49,"div",10)(50,"h3"),t._uU(51,"Description"),t.qZA()(),t.TgZ(52,"div",11),t._UZ(53,"POS-info-page-input",30),t.qZA()()(),t.TgZ(54,"div",13)(55,"div",31)(56,"div",10)(57,"h3"),t._uU(58,"Properties"),t.qZA()(),t.TgZ(59,"div",11),t._UZ(60,"POS-info-page-input",32)(61,"POS-info-page-input",33),t.YNc(62,No,5,1,"div",34),t.YNc(63,qo,1,0,"ng-template",null,35,t.W1O),t.qZA()(),t.TgZ(65,"div",9)(66,"div",10)(67,"h3"),t._uU(68,"Extras"),t.qZA()(),t.TgZ(69,"div",11),t._UZ(70,"POS-info-page-input",36),t.ALo(71,"date"),t._UZ(72,"POS-info-page-input",37),t.ALo(73,"YesNo"),t._UZ(74,"POS-info-page-input",38),t.qZA()(),t.TgZ(75,"div",9)(76,"div",10)(77,"h3"),t._uU(78,"Storage Location"),t.qZA()(),t.TgZ(79,"div",11)(80,"div",20)(81,"table",21)(82,"thead",22)(83,"tr")(84,"th",39),t._uU(85,"Outlet"),t.qZA(),t.TgZ(86,"th"),t._uU(87,"Storage"),t.qZA()()(),t.TgZ(88,"tbody"),t.YNc(89,wo,5,2,"tr",29),t.qZA()()()()()()(),t.YNc(90,So,6,2,"div",40),t.qZA()()()),2&n){const e=t.MAs(64),o=t.oxw();t.Q6J("pageData",o.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",!o.data.Roles.SalesHistory),t.xp6(2),t.Q6J("ngIf",o.data.Roles.HasProductEditor),t.xp6(1),t.Q6J("ngIf",o.data.Roles.HasProductDelete),t.xp6(12),t.Q6J("inputValue",o.data.Product.Code),t.xp6(2),t.Q6J("queryParams",t.VKq(33,It,o.data.Product.CategoryID))("inputValue",o.data.Form.Name),t.xp6(1),t.Q6J("ngIf",o.data.Roles.ImageEditor),t.xp6(7),t.Q6J("ngIf",o.data.Roles.HasInventoryView),t.xp6(12),t.Q6J("ngIf",!o.data.Roles.Cost||!o.data.Roles.UserRole),t.xp6(1),t.Q6J("ngIf",!o.data.Roles.Price),t.xp6(3),t.Q6J("ngIf",o.data.Roles.Ratio),t.xp6(4),t.Q6J("ngForOf",o.data.Variant),t.xp6(6),t.Q6J("inputValue",o.data.Product.Description)("labelVisible",!1),t.xp6(7),t.Q6J("routerLink",t.DdM(35,Uo))("queryParams",t.VKq(36,It,o.data.Product.SupplierID))("inputValue",o.data.Product.SupplierName),t.xp6(1),t.Q6J("inputValue",o.data.Product.BrandName),t.xp6(1),t.Q6J("ngIf",o.data.Form.Tags)("ngIfElse",e),t.xp6(8),t.Q6J("inputValue",t.xi3(71,28,o.data.Product.Released,"dd MMM yyyy")),t.xp6(2),t.Q6J("inputValue",t.lcZ(73,31,o.data.Product.Discontinued)),t.xp6(2),t.Q6J("inputValue",o.data.Product.NextProductName),t.xp6(15),t.Q6J("ngForOf",o.data.ProductLocation),t.xp6(1),t.Q6J("ngIf",o.data.Roles.LogRestriction)}}let Jo=(()=>{class n extends io.O{constructor(e,o,a,r,p,x,j){super(e,"catalog/ProductLoader/ProductInfoInitial",o),this.httpService=e,this.activatedRoute=o,this.router=a,this.toaster=r,this.cloudinaryService=p,this.matDialog=x,this.title=j,this.productImages=[],this.destroy$=new Ht.x}postBindData(){this.menuData.H=this.data.PageTitle;const e=this.title.getTitle().split("|")[0];this.title.setTitle(`${e}| ${this.data.Product.Name}`),this.initCloudinaryService(),this.productImages=this.data.ProductImages}initCloudinaryService(){this.productImages=[],this.cloudinaryService.initUploadImageWidget(cloudinary,this.data.CloudinaryFolder).pipe((0,Et.R)(this.destroy$)).subscribe(e=>{this.productImages=[...this.productImages,{URL:e.ImageURL}],this.uploadEditedImage()})}uploadEditedImage(){this.sliceImageUrl(),this.httpService.post(C.Wz.UpdateProductImage,{ID:this.data.Product.ID,ImageUrl:this.productImages[0]?this.productImages[0].URL:null,ProductImages:this.productImages}).subscribe(o=>{this.productImages=o.ProductImages,this.toaster.success("Image has been updated",Z.n.Success)})}sliceImageUrl(){this.productImages=this.productImages.map(e=>(e.URL=e.URL.substring(e.URL.lastIndexOf("/")+1),e))}onRemoveImage(e){this.matDialog.open(te,{data:{message:"Are you sure you want to delete this image?",title:"Confirm Delete"},width:"335px"}).afterClosed().subscribe(o=>{"REMOVE"==o&&(this.productImages=this.productImages.filter((a,r)=>r!=e),this.uploadEditedImage())})}IsNotEmpty(e){return C.gT.IsNotEmpty(e)?e:""}uploadPicture(){this.productImages.length<5&&this.cloudinaryService.openUploadWidget()}removeProduct(){confirm("Are you sure you want to delete this record?")&&(this.redirect=!0,this.data.Form={ID:this.data.Product.ID},this.httpService.post("/API/catalog/product/DeleteProductInfo",JSON.stringify(this.data.Form)).subscribe({next:o=>{this.onDeleteSuccess(o)}}))}onDeleteSuccess(e){let o;this.redirect?(o=e,this.router.navigate(["/menu/Products/Catalog/Products"])):o="Image success change",this.toaster.success(o,Z.n.Success)}onZoomImage(e,o){BigPicture({el:o.target,imgSrc:e,noLoader:!1})}drop(e){(0,G.bA)(this.productImages,e.previousContainer.data,e.container.data),this.uploadEditedImage()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(l.gz),t.Y36(l.F0),t.Y36(f._W),t.Y36(ee.q),t.Y36(b.uw),t.Y36(ae.Dx))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-product"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],["class","btn-group",4,"ngIf"],[1,"btn-group","ms-5"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["role","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"container-fluid","bg-light-gray","pt-5"],[1,"row"],[1,"col-md-8"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-10"],[1,"col-md-4"],["labelValue","Code",3,"inputValue"],["routerLink","/menu/Products/Catalog/Categories/Info","labelValue","Category",3,"queryParams","inputValue"],["class","row",4,"ngIf"],[1,"card-header","d-flex","justify-content-between"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm","title","Send Delivery",3,"routerLink","queryParams",4,"ngIf"],[1,"table-responsive"],[1,"table","table-bordered"],[1,"table-light"],[1,"border-end"],[1,"border-end",2,"width","100px"],["class","border-end text-end","style","width: 120px",4,"ngIf"],[1,"border-end",2,"width","25px"],["class","border-end","style","width: 25px",4,"ngIf"],[1,"border-end","text-end",2,"width","100px"],[4,"ngFor","ngForOf"],["labelValue","Description","inputType","textarea",3,"inputValue","labelVisible"],[1,"card","pb-8"],["labelValue","Supplier",3,"routerLink","queryParams","inputValue"],["labelValue","Brand",3,"inputValue"],["class","form-floating-outline label-floating",4,"ngIf","ngIfElse"],["emptyTags",""],["labelValue","Release Date",3,"inputValue"],["labelValue","Discontinued",3,"inputValue"],["labelValue","Cross Sell Product",3,"inputValue"],[1,"border-end",2,"width","40%"],["class","alert alert-warning",4,"ngIf"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa-solid","fa-chart-bar"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu"],[1,"dropdown-item"],["role","button",3,"routerLink","queryParams"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa-solid","fa-edit"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-trash"],[1,"col-12"],[1,"form-group","p-3","border","rounded"],[1,"w-auto","px-2","text-secondary"],[1,"row","mt-3"],[1,"col-md-12"],["cdkDropListGroup","",1,"upload_trigger","d-flex","align-items-center"],["class","image_temporary\n productUpload_defaultSize me-2 image-upload","cdkDropList","","cdkDropListOrientation","horizontal",3,"cdkDropListData","click","cdkDropListDropped",4,"ngFor","ngForOf"],["type","button",1,"btn","btn-light","btn-sm",2,"height","32px",3,"disabled","click"],[1,"fa","fa-upload"],["cdkDropList","","cdkDropListOrientation","horizontal",1,"image_temporary","productUpload_defaultSize","me-2","image-upload",3,"cdkDropListData","click","cdkDropListDropped"],["cdkDrag","",1,"imgContainer"],[1,"imgUpload",3,"src"],[1,"overlay","d-flex","align-items-center","justify-content-center"],["title","Zoom image",1,"eye-icon","image_upload_icon",3,"click"],[1,"fa","fa-eye"],["title","Remove image",1,"trash-icon","image_upload_icon",3,"click"],["class","overlay-title",4,"ngIf"],[1,"overlay-title"],["role","button","title","Send Delivery",1,"btn","btn-outline-secondary","btn-sm",3,"routerLink","queryParams"],[1,"border-end","text-end",2,"width","120px"],[3,"routerLink","queryParams"],[1,"text-end"],["class","text-end",4,"ngIf"],[1,"form-floating-outline","label-floating"],[1,"form-control","tags"],["class","bg-secondary",4,"ngFor","ngForOf"],["for","inputTitle"],[1,"bg-secondary"],["labelValue","Tags",3,"inputValue"],[1,"alert","alert-warning"],["aria-hidden","true",1,"fa-regular","fa-file","me-3"]],template:function(e,o){1&e&&t.YNc(0,Oo,91,38,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",null==o.data?null:o.data.Product)},directives:[c.O5,m.p,l.yS,yt.o,l.rH,G.Fd,c.sg,G.Wj,G.Zt],pipes:[c.JJ,c.uU,w.l],styles:[".supplier-info[_ngcontent-%COMP%] div.form-floating-outline input {\n color: #0976b4 !important;\n}\n\n.upload_trigger[_ngcontent-%COMP%] {\n cursor: pointer;\n display: inline-block;\n vertical-align: top;\n width: 100%;\n}\n\n.image_temporary[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n align-items: center;\n background: #fff;\n border: 1px solid #dde2f0;\n border-radius: 6px;\n cursor: auto;\n}\n\n.productUpload_defaultSize[_ngcontent-%COMP%] {\n width: 100px;\n height: 100px;\n}\n\n.imgUpload[_ngcontent-%COMP%] {\n position: absolute;\n overflow: hidden;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n object-fit: scale-down;\n}\n\n.imgContainer[_ngcontent-%COMP%] {\n width: 95px;\n height: 95px;\n}\n\n.fa-camera[_ngcontent-%COMP%] {\n font-size: 26px;\n color: #5f5f5f75;\n}\n\n.image_upload_icon[_ngcontent-%COMP%] {\n font-size: 20px;\n color: #5f5f5f75;\n}\n\n.image-upload[_ngcontent-%COMP%] {\n border: 1px solid #dde2f0;\n position: relative;\n}\n\n.overlay[_ngcontent-%COMP%] {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n height: 100%;\n width: 100%;\n opacity: 0;\n transition: 0.3s ease;\n background-color: rgba(110, 110, 110, 0.603);\n border: 1px solid rgba(110, 110, 110, 0.603);\n border-radius: 6px;\n}\n\n.imgContainer[_ngcontent-%COMP%]:hover .overlay[_ngcontent-%COMP%] {\n opacity: 1;\n}\n\n.overlay-title[_ngcontent-%COMP%] {\n position: absolute;\n bottom: 0px;\n left: 0px;\n background: rgba(0, 0, 0, 0.5);\n width: 100%;\n transition: 0.5s ease;\n opacity: 1;\n color: white;\n font-size: 12px;\n padding-top: 0px;\n text-align: center;\n top: 80px;\n border: 1px solid rgba(88, 88, 88, 0.5);\n border-bottom-right-radius: 6px;\n border-bottom-left-radius: 6px;\n}\n\n.eye-icon[_ngcontent-%COMP%] {\n color: #d4d4d4;\n font-size: 18px;\n position: absolute;\n top: 50%;\n left: 35%;\n transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n text-align: center;\n cursor: pointer;\n}\n\n.eye-icon-center[_ngcontent-%COMP%] {\n position: static;\n top: 0;\n left: 0;\n transform: none;\n}\n\n.trash-icon[_ngcontent-%COMP%] {\n color: #d4d4d4;\n font-size: 18px;\n position: absolute;\n top: 50%;\n left: 65%;\n transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n text-align: center;\n cursor: pointer;\n}\n\n@media only screen and (max-width: 650px) {\n .upload_trigger[_ngcontent-%COMP%] {\n flex-wrap: wrap;\n margin-top: 0.625rem !important;\n justify-content: center;\n }\n}\n\n@media only screen and (min-device-width: 768px) and (max-device-width: 1112px) {\n .upload_trigger[_ngcontent-%COMP%] {\n flex-wrap: wrap;\n margin-top: 0.625rem !important;\n justify-content: center;\n }\n}\n\nfieldset[_ngcontent-%COMP%], legend[_ngcontent-%COMP%] {\n all: revert;\n}\n\nlegend[_ngcontent-%COMP%] {\n color: #9da2a6 !important;\n}"]}),n})();var Ut=u(63892);function Vo(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",17),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).httpPostListID("catalog/variant/DeleteVariantList")}),t._UZ(1,"i",18),t._uU(2," Delete "),t.qZA()}}const ko=function(){return["/menu/Products/Add-Ons/Variant_History"]};function Fo(n,i){1&n&&(t.TgZ(0,"a",19),t._UZ(1,"i",20),t._uU(2," Update Log "),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,ko))}function Qo(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",21),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ProductExport/VariantExport","Variant.csv")}),t._UZ(1,"i",22),t._uU(2," Export "),t.qZA()}}const Lo=function(){return["Form"]};function Ho(n,i){1&n&&(t.TgZ(0,"a",23),t._uU(1," Add Variant "),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,Lo))}function Eo(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"th",34)(1,"input",35),t.NdJ("change",function(a){return t.CHM(e),t.oxw(3).onSelectAllData(a.target.checked)}),t.qZA()()}}function Yo(n,i){1&n&&(t.TgZ(0,"th"),t._uU(1,"Description"),t.qZA())}function Ro(n,i){1&n&&(t.TgZ(0,"th",36),t._uU(1,"Buying Cost "),t.qZA())}function Bo(n,i){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Last Buy Cost "),t.qZA())}function $o(n,i){1&n&&(t.TgZ(0,"th",36),t._uU(1,"Selling Price"),t.qZA())}function jo(n,i){1&n&&(t.TgZ(0,"th",36),t._uU(1,"%"),t.qZA())}function Ko(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"td",34)(1,"input",45),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().$implicit.selected=a})("ngModelChange",function(a){return t.CHM(e),t.oxw().$implicit.selected=a}),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.selected)("ngModel",e.selected)}}function Wo(n,i){if(1&n&&t._UZ(0,"td",46),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",e.Description,t.oJD)}}function Go(n,i){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.UnitCost))}}function zo(n,i){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.OrderPrice))}}function Xo(n,i){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.UnitPrice))}}function ta(n,i){if(1&n&&(t.TgZ(0,"td",47),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",0!=e.PriceDiscount?e.PriceDiscount:"","")}}const ea=function(n){return{ID:n}},na=function(n){return{"text-decoration-line-through":n}};function oa(n,i){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,Ko,2,2,"td",27),t.TgZ(2,"td",38)(3,"a",39)(4,"span",40),t._uU(5),t.qZA()()(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td"),t._uU(9),t.qZA(),t.YNc(10,Wo,1,1,"td",41),t.YNc(11,Go,3,3,"td",42),t.YNc(12,zo,3,3,"td",42),t.YNc(13,Xo,3,3,"td",42),t.YNc(14,ta,2,1,"td",43),t.TgZ(15,"td",44),t._uU(16),t.ALo(17,"number"),t.qZA()()),2&n){const e=i.$implicit,o=t.oxw(3);t.xp6(1),t.Q6J("ngIf",null==o.pageData||null==o.pageData.Roles?null:o.pageData.Roles.HasProductDelete),t.xp6(2),t.Q6J("routerLink","/menu/Products/Catalog/Variants/Info")("queryParams",t.VKq(15,ea,e.ID)),t.xp6(1),t.Q6J("ngClass",t.VKq(17,na,null==e?null:e.Discontinued)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.hij(" ",e.TypeLabel," "),t.xp6(2),t.Oqu(e.Code),t.xp6(1),t.Q6J("ngIf",o.data.Description),t.xp6(1),t.Q6J("ngIf",null==o.pageData||null==o.pageData.Roles?null:o.pageData.Roles.HasCostRole),t.xp6(1),t.Q6J("ngIf",null==o.pageData||null==o.pageData.Roles?null:o.pageData.Roles.HasCostRole),t.xp6(1),t.Q6J("ngIf",null==o.pageData||null==o.pageData.Roles?null:o.pageData.Roles.HasPriceRole),t.xp6(1),t.Q6J("ngIf",null==o.pageData||null==o.pageData.Roles?null:o.pageData.Roles.IsDiscountRole),t.xp6(2),t.Oqu(t.lcZ(17,13,e.UnitsInStock))}}function aa(n,i){if(1&n&&(t.TgZ(0,"table",24)(1,"thead",25)(2,"tr",26),t.YNc(3,Eo,2,0,"th",27),t.TgZ(4,"th"),t._uU(5,"Name"),t.qZA(),t.TgZ(6,"th",28),t._uU(7,"Type"),t.qZA(),t.TgZ(8,"th",28),t._uU(9,"Code"),t.qZA(),t.YNc(10,Yo,2,0,"th",29),t.YNc(11,Ro,2,0,"th",30),t.YNc(12,Bo,2,0,"th",31),t.YNc(13,$o,2,0,"th",30),t.YNc(14,jo,2,0,"th",30),t.TgZ(15,"th",32),t._uU(16,"Inventory"),t.qZA()()(),t.TgZ(17,"tbody"),t.YNc(18,oa,18,19,"tr",33),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngIf",null==e.pageData||null==e.pageData.Roles?null:e.pageData.Roles.HasProductDelete),t.xp6(7),t.Q6J("ngIf",e.data.Description),t.xp6(1),t.Q6J("ngIf",null==e.pageData||null==e.pageData.Roles?null:e.pageData.Roles.HasCostRole),t.xp6(1),t.Q6J("ngIf",null==e.pageData||null==e.pageData.Roles?null:e.pageData.Roles.HasCostRole),t.xp6(1),t.Q6J("ngIf",null==e.pageData||null==e.pageData.Roles?null:e.pageData.Roles.HasPriceRole),t.xp6(1),t.Q6J("ngIf",null==e.pageData||null==e.pageData.Roles?null:e.pageData.Roles.IsDiscountRole),t.xp6(4),t.Q6J("ngForOf",e.data.Data)}}function ia(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mat-paginator",50),t.NdJ("page",function(a){return t.CHM(e),t.oxw(3).onPaginationChange(a)}),t.qZA()}if(2&n){const e=t.oxw(3);t.Q6J("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("showFirstLastButtons",!0)("pageIndex",0==e.pageData.Filter.PageNumber?0:e.pageData.Filter.PageNumber-1)}}function ra(n,i){if(1&n&&(t.TgZ(0,"div",48),t.YNc(1,ia,1,4,"mat-paginator",49),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.pagination.listTotal>0)}}function la(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.Text=a})("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Vo,3,0,"a",2),t.YNc(3,Fo,3,2,"a",3),t.YNc(4,Qo,3,0,"a",4),t.YNc(5,Ho,2,2,"a",5),t.qZA(),t.TgZ(6,"filters")(7,"div",6)(8,"div",7)(9,"div",8)(10,"h6"),t._uU(11,"Category"),t.qZA(),t.TgZ(12,"ng-select",9),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.qZA()(),t.TgZ(13,"div")(14,"h6"),t._uU(15,"Supplier"),t.qZA(),t.TgZ(16,"autocompleteV2",10),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.SupplierID=a}),t.qZA()(),t.TgZ(17,"div")(18,"h6"),t._uU(19,"Type"),t.qZA(),t.TgZ(20,"ng-select",9),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.TypeID=a}),t.qZA()(),t.TgZ(21,"div")(22,"h6"),t._uU(23,"Discontinued"),t.qZA(),t.TgZ(24,"radio-options",11),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.Discontinued=a}),t.qZA()(),t.TgZ(25,"div")(26,"h6"),t._uU(27,"Description"),t.qZA(),t.TgZ(28,"radio-options",12),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.Description=a}),t.qZA()()()()(),t.TgZ(29,"content")(30,"div",13)(31,"div",14),t.YNc(32,aa,19,7,"table",15),t.qZA(),t.YNc(33,ra,2,1,"div",16),t.qZA()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("text",e.pageData.Filter.Text),t.xp6(2),t.Q6J("ngIf",(null==e.pageData.Roles?null:e.pageData.Roles.HasProductDelete)&&e.getSelectedData().length>0),t.xp6(1),t.Q6J("ngIf",e.pageData.Roles.HasProductEditor),t.xp6(1),t.Q6J("ngIf",e.pageData.Roles.HasExport),t.xp6(1),t.Q6J("ngIf",e.pageData.Roles.HasProductCreate),t.xp6(7),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SupplierID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Types)("ngModel",e.pageData.Filter.TypeID),t.xp6(4),t.Q6J("options",e.options)("model",e.pageData.Filter.Discontinued),t.xp6(4),t.Q6J("options",e.options)("model",e.pageData.Filter.Description),t.xp6(4),t.Q6J("ngIf",e.data),t.xp6(1),t.Q6J("ngIf",e.pageData.Filter)}}let ca=(()=>{class n extends v.n{constructor(e,o,a){super(e,"catalog/variant/GetVariantList","catalog/VariantLoader/VariantList",o),this.httpService=e,this.csvConverter=a,this.options=[{Key:0,Value:"No"},{Key:1,Value:"Yes"}]}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(f._W),t.Y36(g.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-variant"]],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-6","role","button","confirm-message","Are you sure you want to delete this record?",3,"click",4,"ngIf"],["class","btn btn-outline-secondary me-6","role","button",3,"routerLink",4,"ngIf"],["class","btn btn-outline-secondary me-6",3,"click",4,"ngIf"],["class","btn btn-success","role","button","title","Add Variant",3,"routerLink",4,"ngIf"],[1,"d-flex"],["container",""],[1,"category-filter"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetSupplierSuggestion","notFoundMessageFor","supplier",1,"w-100",3,"ngModel","ngModelChange"],["name","Discontinued",3,"options","model","modelChange"],["name","Description",3,"options","model","modelChange"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid","class","table border-bottom",4,"ngIf"],["class","d-sm-block mt-2",4,"ngIf"],["role","button","confirm-message","Are you sure you want to delete this record?",1,"btn","btn-outline-secondary","me-6",3,"click"],[1,"fa","fa-trash"],["role","button",1,"btn","btn-outline-secondary","me-6",3,"routerLink"],["aria-hidden","true",1,"fa","fa-list-ul"],[1,"btn","btn-outline-secondary","me-6",3,"click"],[1,"fa","fa-upload"],["role","button","title","Add Variant",1,"btn","btn-success",3,"routerLink"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],["style","width: 14px",4,"ngIf"],[2,"width","100px"],[4,"ngIf"],["class","text-end","style","width: 100px;",4,"ngIf"],["class","text-end","style","width: 200px;",4,"ngIf"],[2,"width","85px"],[4,"ngFor","ngForOf"],[2,"width","14px"],["type","checkbox",3,"change"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","200px"],[2,"max-width","10px"],[1,"text-break",3,"routerLink","queryParams"],[3,"ngClass"],[3,"innerHTML",4,"ngIf"],["class","text-end",4,"ngIf"],["class","text-end","style","color: red;",4,"ngIf"],[1,"text-end"],["type","checkbox",3,"ngModel","ngModelChange"],[3,"innerHTML"],[1,"text-end",2,"color","red"],[1,"d-sm-block","mt-2"],[3,"length","pageSize","showFirstLastButtons","pageIndex","page",4,"ngIf"],[3,"length","pageSize","showFirstLastButtons","pageIndex","page"]],template:function(e,o){1&e&&t.YNc(0,la,34,17,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.pageData&&o.data)},directives:[c.O5,m.p,l.yS,y.w9,s.JJ,s.On,ft.J,q.P,c.sg,s.Wl,c.mk,Ut.NW],pipes:[c.JJ],styles:[".break-word[_ngcontent-%COMP%] {\n overflow-wrap: break-word;\n word-wrap: break-word;\n}\n\n.category-filter[_ngcontent-%COMP%] .ng-dropdown-panel .ng-dropdown-panel-items .ng-option {\n white-space: normal;\n word-break: break-word;\n}"]}),n})();class re{}class le{}class sa{constructor(){this.CostCurrencyID=1,this.Discontinued=!1,this.LoyaltyPoint=!0,this.PackSize=1,this.PaymentTypeID=0,this.PriceCurrencyID=1,this.Taxable=!0,this.UnitPrice=0}}var pa=u(50494),Mt=u(79814);const $t=function(n){return{"bg-light":n}};function da(n,i){if(1&n&&(t.TgZ(0,"span",13),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw(2);t.Tol(t.VKq(3,$t,!o.data.HasInventoryEdit)),t.xp6(1),t.Oqu(e.UnitsInStock)}}function ua(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"input",14),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().$implicit.UnitsInStock=a}),t.qZA()}if(2&n){const e=t.oxw().$implicit;t.Q6J("ngModel",e.UnitsInStock)}}function _a(n,i){if(1&n&&(t.TgZ(0,"span",13),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw(2);t.Tol(t.VKq(3,$t,!o.data.HasProductCreate&&!o.data.HasProductEditor)),t.xp6(1),t.hij(" ",e.MinStock," ")}}function ma(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"input",14),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().$implicit.MinStock=a}),t.qZA()}if(2&n){const e=t.oxw().$implicit;t.Q6J("ngModel",e.MinStock)}}function ga(n,i){if(1&n&&(t.TgZ(0,"span",13),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw(2);t.Tol(t.VKq(3,$t,!o.data.HasProductCreate&&!o.data.HasProductEditor)),t.xp6(1),t.hij(" ",e.MaxStock," ")}}function fa(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"input",14),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().$implicit.MaxStock=a}),t.qZA()}if(2&n){const e=t.oxw().$implicit;t.Q6J("ngModel",e.MaxStock)}}function ha(n,i){if(1&n&&(t.TgZ(0,"tr")(1,"td",10),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t.TgZ(5,"td"),t.YNc(6,da,2,5,"span",11),t.YNc(7,ua,1,1,"input",12),t.qZA(),t.TgZ(8,"td"),t.YNc(9,_a,2,5,"span",11),t.YNc(10,ma,1,1,"input",12),t.qZA(),t.TgZ(11,"td"),t.YNc(12,ga,2,5,"span",11),t.YNc(13,fa,1,1,"input",12),t.qZA()()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.Name),t.xp6(4),t.Q6J("ngIf",!o.data.HasInventoryEdit),t.xp6(1),t.Q6J("ngIf",o.data.HasInventoryEdit),t.xp6(2),t.Q6J("ngIf",!o.data.HasProductCreate&&!o.data.HasProductEditor),t.xp6(1),t.Q6J("ngIf",o.data.HasProductCreate||o.data.HasProductEditor),t.xp6(2),t.Q6J("ngIf",!o.data.HasProductCreate&&!o.data.HasProductEditor),t.xp6(1),t.Q6J("ngIf",o.data.HasProductCreate||o.data.HasProductEditor)}}function xa(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"input",17),t.NdJ("input",function(a){return t.CHM(e),t.oxw(3).updateMinStock(a.target.value)}),t.qZA()}}function Ca(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"input",17),t.NdJ("input",function(a){return t.CHM(e),t.oxw(3).updateMaxStock(a.target.value)}),t.qZA()}}function va(n,i){if(1&n&&(t.TgZ(0,"tfoot")(1,"tr"),t._UZ(2,"td",15),t.TgZ(3,"td"),t.YNc(4,xa,1,0,"input",16),t.qZA(),t.TgZ(5,"td"),t.YNc(6,Ca,1,0,"input",16),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("ngIf",e.data.HasProductCreate||e.data.HasProductEditor),t.xp6(2),t.Q6J("ngIf",e.data.HasProductCreate||e.data.HasProductEditor)}}function Ta(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"table",1),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortDataInventrory(a)}),t.TgZ(1,"thead")(2,"tr",2)(3,"th",3),t._uU(4," Outlet "),t.qZA(),t._UZ(5,"th",4),t.TgZ(6,"th",5),t._uU(7," ON HAND "),t.qZA(),t.TgZ(8,"th",6),t._uU(9," ROP "),t.qZA(),t.TgZ(10,"th",7),t._uU(11," Max "),t.qZA()()(),t.TgZ(12,"tbody"),t.YNc(13,ha,14,7,"tr",8),t.qZA(),t.YNc(14,va,7,2,"tfoot",9),t.qZA()}if(2&n){const e=t.oxw();t.xp6(13),t.Q6J("ngForOf",e.form),t.xp6(1),t.Q6J("ngIf",e.form.length>1)}}let Za=(()=>{class n{dynamicSort(e){var o=1;return"-"===e[0]&&(o=-1,e=e.substr(1)),function(a,r){return-1==o?r[e].localeCompare(a[e]):a[e].localeCompare(r[e])}}ngOnInit(){this.form&&(this.form=this.form.sort(this.dynamicSort("Name")))}ngOnChanges(){this.editForm&&(this.form=this.form.sort(this.dynamicSort("Name")))}sortDataInventrory(e){let a="desc"==e.direction?"-":"";"Variant"===e.active&&(a+="Name"),a+="Name",this.form=this.form.sort(this.dynamicSort(a))}updateMaxStock(e){this.form.map(o=>{o.MaxStock=e})}updateMinStock(e){this.form.map(o=>{o.MinStock=e})}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-form-variant-tab-inventory"]],inputs:{form:"form",data:"data",editForm:"editForm"},features:[t.TTD],decls:1,vars:1,consts:[["class","table table-bordered custom-table","matSort","",3,"matSortChange",4,"ngIf"],["matSort","",1,"table","table-bordered","custom-table",3,"matSortChange"],[1,"table-light"],["mat-sort-header","Outlet",1,"border-end"],[1,"border-end",2,"width","10px"],["title","the number of Physical Inventory at your Outlet",1,"border-end","text-end",2,"width","120px"],["title","Reorder Point Threshold - calculate by multiplying [Lead Time] with [Average Daily Sales]",1,"border-end","text-end",2,"width","120px"],["title","Maximum Inventory you should have after PurchaseOrder or TransferOrder operation",1,"border-end","text-end",2,"width","120px"],[4,"ngFor","ngForOf"],[4,"ngIf"],[2,"vertical-align","middle"],["class","form-control text-end",3,"class",4,"ngIf"],["type","text","class","form-control text-end","autoNum","",3,"ngModel","ngModelChange",4,"ngIf"],[1,"form-control","text-end"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModel","ngModelChange"],["colspan","3"],["placeholder","set all outlet","class","form-control text-end","autoNum","",3,"input",4,"ngIf"],["placeholder","set all outlet","autoNum","",1,"form-control","text-end",3,"input"]],template:function(e,o){1&e&&t.YNc(0,Ta,15,2,"table",0),2&e&&t.Q6J("ngIf",o.data)},directives:[c.O5,$.YE,$.nU,c.sg,s.Fj,B.b,s.JJ,s.On],styles:[""]}),n})();class ce{}let ba=(()=>{class n{constructor(e,o,a){this._httpService=o,this.dialogRef=a,this.composite=Object.assign(new ce,e)}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new Q.O,this.modalConfig.title="Add New Composite?"}onSelectProduct(e){this._httpService.post("/API/catalog/variant/GetVariantByID",JSON.stringify({id:e})).pipe((0,Yt.h)(o=>C.gT.IsNotEmpty(o))).subscribe(o=>{this.setComposite(o)})}setComposite(e){let o={ComponentID:e.ID,Variant:{Variant:{Code:e.Code,Name:e.Name,UOMName:e.UOMName,UnitCost:e.UnitCost}},CostCurrency:e.CostCurrencyID,PriceCurrency:e.PriceCurrencyID};this.composite=Object.assign(new ce,o)}onOk(){this.composite.Quantity>0&&this.dialogRef.close(this.composite)}onClose(){this.dialogRef.close()}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.WI),t.Y36(_.O),t.Y36(b.so))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-modal-variant-component"]],decls:12,vars:6,consts:[[3,"config","onOk","onCancel"],[1,"container-fluid"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],["id","inputSupplier","placeholder","Input product name / code :","requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"w-100",3,"customStyle","customLabel","inputTextValue","displayText","onSelect"],[1,"col-sm-12",2,"width","100%"],["type","text","id","QtyComposite","placeholder","Quantity","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["for","QtyComposite"]],template:function(e,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"autocompleteV2",5),t.NdJ("onSelect",function(r){return o.onSelectProduct(r)}),t.qZA()()(),t.TgZ(7,"div",6)(8,"div",4)(9,"input",7),t.NdJ("ngModelChange",function(r){return o.composite.Quantity=r}),t.qZA(),t.TgZ(10,"label",8),t._uU(11,"Quantity"),t.qZA()()()()()()()),2&e&&(t.Q6J("config",o.modalConfig),t.xp6(6),t.Q6J("customStyle",!0)("customLabel","Input product name / code :")("inputTextValue",null==o.composite||null==o.composite.Variant||null==o.composite.Variant.Variant?null:o.composite.Variant.Variant.Name)("displayText",null==o.composite||null==o.composite.Variant||null==o.composite.Variant.Variant?null:o.composite.Variant.Variant.Name),t.xp6(3),t.Q6J("ngModel",o.composite.Quantity))},directives:[N.M,ft.J,s.Fj,B.b,s.JJ,s.On],styles:[""]}),n})();function ya(n,i){1&n&&(t.TgZ(0,"th",12),t._uU(1,"Unit Cost"),t.qZA())}function Ia(n,i){1&n&&(t.TgZ(0,"th",12),t._uU(1,"Total"),t.qZA())}function Ma(n,i){if(1&n&&(t.TgZ(0,"td",16),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.Variant.Variant.UnitCost))}}function Pa(n,i){if(1&n&&(t.TgZ(0,"td",16),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.Variant.Variant.UnitCost*e.Quantity))}}function Da(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"tr",13),t.NdJ("click",function(){const a=t.CHM(e),r=a.$implicit,p=a.index;return t.oxw().onEditComposite(r,p)}),t.TgZ(1,"td",14)(2,"i",15),t.NdJ("click",function(){const r=t.CHM(e).index;return t.oxw().form.splice(r,1)}),t.qZA()(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.TgZ(7,"td",16),t._uU(8),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.qZA(),t.YNc(11,Ma,3,3,"td",17),t.YNc(12,Pa,3,3,"td",17),t.qZA()}if(2&n){const e=i.$implicit,o=t.oxw();t.xp6(4),t.Oqu(e.Variant.Variant.Name),t.xp6(2),t.Oqu(e.Variant.Variant.Code),t.xp6(2),t.Oqu(e.Quantity),t.xp6(2),t.Oqu(e.Variant.Variant.UOMName),t.xp6(1),t.Q6J("ngIf",o.data.HasRoleCost),t.xp6(1),t.Q6J("ngIf",o.data.HasRoleCost)}}function Aa(n,i){if(1&n&&(t.TgZ(0,"tfoot")(1,"tr")(2,"td",18),t._uU(3,"Total"),t.qZA(),t.TgZ(4,"td",16),t._uU(5),t.ALo(6,"number"),t.qZA()()()),2&n){const e=t.oxw();t.xp6(5),t.hij(" ",t.lcZ(6,1,e.calculateComposite()),"")}}let Na=(()=>{class n{constructor(e){this.matDialog=e,this.formChange=new t.vpe}ngOnInit(){}onAddComposite(){this.openDialog()}onEditComposite(e,o){this.openDialog(e,o)}calculateComposite(){let e=0;return this.form.forEach(o=>{e+=o.Variant.Variant.UnitCost*o.Quantity}),e}checkingList(e){let o=null;return this.form.forEach((a,r)=>{a.ComponentID==e&&(o=r)}),o}openDialog(e,o){let a={ComponentID:C.gT.GuidEmpty,Quantity:0};e&&(a=e),this.matDialog.open(ba,{data:a}).afterClosed().subscribe(p=>{p&&(e?this.form[o]=p:null==this.checkingList(p.ComponentID)?this.form.push(p):this.form[this.checkingList(p.ComponentID)]=p)})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.uw))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-form-variant-tab-component"]],inputs:{form:"form",data:"data"},outputs:{formChange:"formChange"},decls:19,vars:4,consts:[[1,"table","table-bordered","custom-table"],[1,"table-light"],["width","15px",1,"border-end"],["type","button","title","Add Component",1,"btn","btn-outline-dark","btn-sm","bg-white","text-black",3,"click"],["aria-hidden","true",1,"fa","fa-plus"],[1,"border-end"],["width","200px",1,"border-end"],["width","65px",1,"border-end","text-end"],["width","65px",1,"border-end"],["class","border-end text-end","width","100px",4,"ngIf"],[3,"click",4,"ngFor","ngForOf"],[4,"ngIf"],["width","100px",1,"border-end","text-end"],[3,"click"],[1,"text-center"],[1,"fa","fa-times","text-danger",2,"cursor","pointer",3,"click"],[1,"text-end"],["class","text-end",4,"ngIf"],["colspan","6"]],template:function(e,o){1&e&&(t.TgZ(0,"table",0)(1,"thead")(2,"tr",1)(3,"th",2)(4,"button",3),t.NdJ("click",function(){return o.onAddComposite()}),t._UZ(5,"i",4),t.qZA()(),t.TgZ(6,"th",5),t._uU(7,"Name"),t.qZA(),t.TgZ(8,"th",6),t._uU(9,"Code"),t.qZA(),t.TgZ(10,"th",7),t._uU(11,"Qty"),t.qZA(),t.TgZ(12,"th",8),t._uU(13,"Uom"),t.qZA(),t.YNc(14,ya,2,0,"th",9),t.YNc(15,Ia,2,0,"th",9),t.qZA()(),t.TgZ(16,"tbody"),t.YNc(17,Da,13,6,"tr",10),t.qZA(),t.YNc(18,Aa,7,3,"tfoot",11),t.qZA()),2&e&&(t.xp6(14),t.Q6J("ngIf",o.data.HasRoleCost),t.xp6(1),t.Q6J("ngIf",o.data.HasRoleCost),t.xp6(2),t.Q6J("ngForOf",o.form),t.xp6(1),t.Q6J("ngIf",o.data.HasRoleCost))},directives:[c.O5,c.sg],pipes:[c.JJ],styles:[""]}),n})();class qa{}function wa(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",2)(1,"div",8)(2,"div",9)(3,"input",17),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().outletPrice.ExtraCost=a}),t.qZA(),t.TgZ(4,"label",18),t._uU(5,"Extra Cost"),t.qZA()()(),t.TgZ(6,"div",12)(7,"div",13)(8,"ng-select",14),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().outletPrice.CostCurrencyID=a}),t.qZA()()()()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("ngModel",e.outletPrice.ExtraCost)("disabled",!e.data.HasRoleCost),t.xp6(5),t.Q6J("items",e.data.Currencies)("ngModel",e.outletPrice.CostCurrencyID)("clearable",!1)}}const Sa=function(n){return{selected:n}};let Ua=(()=>{class n{constructor(e,o){this.dialogRef=o,this.outletPrice=Object.assign(new qa,e.form),this.data=e.data,this.initModalConfig()}IsNotEmpty(e){return C.gT.IsNotEmpty(e)}onOk(){this.dialogRef.close(this.outletPrice)}onClose(){this.dialogRef.close()}initModalConfig(){this.modalConfig=new Q.O,this.modalConfig.title="Add New Outlet Price?"}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.WI),t.Y36(b.so))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-modal-variant-outlet-price"]],decls:25,vars:13,consts:[[3,"config","onOk","onCancel"],[1,"container-fluid",2,"width","500px"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline","flexRow",3,"ngClass"],["id","typeID","bindLabel","Name","bindValue","ID","appendTo","body",1,"productform",3,"items","clearable","ngModel","ngModelChange"],["for","selectedOutlet",1,"ng-select"],["class","row",4,"ngIf"],[1,"col-sm-8"],[1,"form-floating-outline","flexRow"],["type","text","appendTo","body","id","outletPrice","placeholder","Price","autoNum","",1,"form-control","with-currency","me-3",3,"ngModel","ngModelChange"],["for","outletPrice"],[1,"col-sm-4"],[1,"form-floating-outline"],["id","typeID","bindLabel","Symbol","bindValue","ID","appendTo","body",1,"productform",3,"items","ngModel","clearable","ngModelChange"],["type","text","id","outletDisc","placeholder","Disc%","autoNum","",1,"form-control","percentage-input",3,"ngModel","ngModelChange"],["for","outletDisc"],["type","text","id","outletCost","placeholder","Extra Cost","autoNum","",1,"form-control","with-currency","me-3",3,"ngModel","disabled","ngModelChange"],["for","outletCost"]],template:function(e,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"ng-select",5),t.NdJ("ngModelChange",function(r){return o.outletPrice.EntityID=r}),t.qZA(),t.TgZ(7,"label",6),t._uU(8,"Choose Outlet"),t.qZA()()()(),t.YNc(9,wa,9,5,"div",7),t.TgZ(10,"div",2)(11,"div",8)(12,"div",9)(13,"input",10),t.NdJ("ngModelChange",function(r){return o.outletPrice.UnitPrice=r}),t.qZA(),t.TgZ(14,"label",11),t._uU(15,"Price"),t.qZA()()(),t.TgZ(16,"div",12)(17,"div",13)(18,"ng-select",14),t.NdJ("ngModelChange",function(r){return o.outletPrice.PriceCurrencyID=r}),t.qZA()()()(),t.TgZ(19,"div",2)(20,"div",8)(21,"div",13)(22,"input",15),t.NdJ("ngModelChange",function(r){return o.outletPrice.PriceDiscount=r}),t.qZA(),t.TgZ(23,"label",16),t._uU(24,"Disc%"),t.qZA()()()()()()()),2&e&&(t.Q6J("config",o.modalConfig),t.xp6(5),t.Q6J("ngClass",t.VKq(11,Sa,o.IsNotEmpty(o.outletPrice.EntityID))),t.xp6(1),t.Q6J("items",o.data.Entities)("clearable",!1)("ngModel",o.outletPrice.EntityID),t.xp6(3),t.Q6J("ngIf",o.data.HasRoleCost),t.xp6(4),t.Q6J("ngModel",o.outletPrice.UnitPrice),t.xp6(5),t.Q6J("items",o.data.Currencies)("ngModel",o.outletPrice.PriceCurrencyID)("clearable",!1),t.xp6(4),t.Q6J("ngModel",o.outletPrice.PriceDiscount))},directives:[N.M,c.mk,y.w9,s.JJ,s.On,c.O5,s.Fj,B.b],styles:[""]}),n})();function Oa(n,i){1&n&&(t.TgZ(0,"th",7),t._uU(1,"Extra Cost"),t.qZA())}function Ja(n,i){if(1&n&&(t.TgZ(0,"td"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw();t.xp6(1),t.Oqu(null==e.ExtraCost?"":o.getCurrencySymbolByID(e.CostCurrencyID)+" "+t.lcZ(2,1,e.ExtraCost))}}function Va(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"tr",10),t.NdJ("click",function(){const a=t.CHM(e),r=a.$implicit,p=a.index;return t.oxw().onUpdateOutletPrice(r,p)}),t.TgZ(1,"td")(2,"i",11),t.NdJ("click",function(){const r=t.CHM(e).index;return t.oxw().form.splice(r,1)}),t.qZA()(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.YNc(5,Ja,3,3,"td",12),t.TgZ(6,"td"),t._uU(7),t.ALo(8,"number"),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.qZA()()}if(2&n){const e=i.$implicit,o=t.oxw();t.xp6(4),t.Oqu(o.getEntityNameByID(e.EntityID)),t.xp6(1),t.Q6J("ngIf",o.data.HasRoleCost),t.xp6(2),t.Oqu(null==e.UnitPrice?"":o.getCurrencySymbolByID(e.PriceCurrencyID)+" "+t.lcZ(8,4,e.UnitPrice)),t.xp6(3),t.Oqu(null==e.PriceDiscount?"":e.PriceDiscount+"%")}}let ka=(()=>{class n{constructor(e){this.matDialog=e}ngOnInit(){}onAddOutletPrice(){this.openDialog({data:this.data,form:{EntityID:C.gT.GuidEmpty,CostCurrencyID:this.data.Currencies[0].ID,PriceCurrencyID:this.data.Currencies[0].ID}})}onUpdateOutletPrice(e,o){this.openDialog({data:this.data,form:e},o)}getCurrencySymbolByID(e){let a;return this.data.Currencies.forEach(r=>{r.ID==e&&(a=r.Symbol)}),a}getEntityNameByID(e){let a;return this.data.Entities.forEach(r=>{r.ID==e&&(a=r.Name)}),a}openDialog(e,o){let a={data:e.data,form:e.form};o&&(a=e),this.matDialog.open(Ua,{data:a}).afterClosed().pipe((0,Yt.h)(p=>C.gT.IsNotEmpty(p))).subscribe(p=>{p&&(o||0==o?this.form[o]=p:this.form.push(p))})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.uw))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-form-variant-tab-outlet-price"]],inputs:{data:"data",form:"form"},decls:15,vars:2,consts:[[1,"table","table-bordered","custom-table"],[1,"table-light"],["width","15px",1,"border-end"],["type","button","title","Add Outlet Price",1,"btn","btn-outline-dark","btn-sm","bg-white","text-black",3,"click"],["aria-hidden","true",1,"fa","fa-plus"],[1,"border-end"],["class","border-end","width","150px",4,"ngIf"],["width","150px",1,"border-end"],["width","50px",1,"border-end"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"fa","fa-times","text-danger",2,"cursor","pointer",3,"click"],[4,"ngIf"]],template:function(e,o){1&e&&(t.TgZ(0,"table",0)(1,"thead")(2,"tr",1)(3,"th",2)(4,"button",3),t.NdJ("click",function(){return o.onAddOutletPrice()}),t._UZ(5,"i",4),t.qZA()(),t.TgZ(6,"th",5),t._uU(7,"Outlet"),t.qZA(),t.YNc(8,Oa,2,0,"th",6),t.TgZ(9,"th",7),t._uU(10,"Price"),t.qZA(),t.TgZ(11,"th",8),t._uU(12,"Disc."),t.qZA()()(),t.TgZ(13,"tbody"),t.YNc(14,Va,11,6,"tr",9),t.qZA()()),2&e&&(t.xp6(8),t.Q6J("ngIf",o.data.HasRoleCost),t.xp6(6),t.Q6J("ngForOf",o.form))},directives:[c.O5,c.sg],pipes:[c.JJ],styles:[""]}),n})();function Fa(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",7),t._uU(4),t.qZA(),t.TgZ(5,"td")(6,"input",8),t.NdJ("ngModelChange",function(a){return t.CHM(e).$implicit.UnitPrice=a})("ngModelChange",function(){return t.CHM(e),t.oxw().onChange()}),t.qZA()(),t.TgZ(7,"td")(8,"input",9),t.NdJ("ngModelChange",function(a){return t.CHM(e).$implicit.PriceDiscount=a})("ngModelChange",function(){return t.CHM(e),t.oxw().onChange()}),t.qZA()()()}if(2&n){const e=i.$implicit;t.xp6(2),t.Oqu(e.Name?e.Name:e.PricebookName),t.xp6(2),t.Oqu(e.MinimumQuantity),t.xp6(2),t.Q6J("ngModel",e.UnitPrice),t.xp6(2),t.Q6J("ngModel",e.PriceDiscount)}}let Qa=(()=>{class n{constructor(){this.formChange=new t.vpe}ngOnInit(){}onChange(){this.formChange.emit(this.form)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-form-variant-tab-pricebook"]],inputs:{form:"form",data:"data"},outputs:{formChange:"formChange"},decls:13,vars:1,consts:[[1,"table","table-bordered","custom-table"],[1,"table-light"],[1,"border-end"],["width","120px",1,"border-end"],["width","150px",1,"border-end"],["width","100px",1,"border-end"],[4,"ngFor","ngForOf"],[1,"text-end"],["type","text","onchange","","autoNum","",1,"form-control","text-end",3,"ngModel","ngModelChange"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModel","ngModelChange"]],template:function(e,o){1&e&&(t.TgZ(0,"table",0)(1,"thead")(2,"tr",1)(3,"th",2),t._uU(4,"Name"),t.qZA(),t.TgZ(5,"th",3),t._uU(6,"Minimum Quantity"),t.qZA(),t.TgZ(7,"th",4),t._uU(8,"Price"),t.qZA(),t.TgZ(9,"th",5),t._uU(10,"Price Discount %"),t.qZA()()(),t.TgZ(11,"tbody"),t.YNc(12,Fa,9,4,"tr",6),t.qZA()()),2&e&&(t.xp6(12),t.Q6J("ngForOf",o.form))},directives:[c.sg,s.Fj,B.b,s.JJ,s.On],styles:[""]}),n})();function La(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td")(4,"input",18),t.NdJ("ngModelChange",function(a){return t.CHM(e).$implicit.Amount=a})("ngModelChange",function(){return t.CHM(e),t.oxw().onChange()}),t.qZA()()()}if(2&n){const e=i.$implicit;t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Q6J("ngModel",e.Amount)}}let Ha=(()=>{class n{constructor(){this.formChange=new t.vpe}ngOnInit(){}calculateCommission(){this.salesCommission.commission=this.salesCommission.discount/100*this.data.UnitPrice}onChange(){this.formChange.emit(this.form)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-form-variant-nav-commission"]],inputs:{salesCommission:"salesCommission",form:"form",data:"data"},outputs:{formChange:"formChange"},decls:28,vars:3,consts:[[1,"row","bg-white"],[1,"col-sm-6"],[1,"form-floating-outline"],["type","text","id","inputCommission","placeholder","Commission","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["for","inputCommission"],[1,"col-sm-6","bg-white"],[1,"row"],[1,"col-sm-11"],["type","text","id","inputPercentage","placeholder","Commission (%) Calculator","max","100","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["for","inputPercentage"],[1,"col-sm-1","ps-0"],[1,"mt-10"],[1,"col-sm-12","bg-white"],[1,"table","table-bordered","custom-table"],[1,"table-light"],[1,"border-end"],[1,"border-end",2,"width","120px"],[4,"ngFor","ngForOf"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModel","ngModelChange"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"input",3),t.NdJ("ngModelChange",function(r){return o.salesCommission.commission=r}),t.qZA(),t.TgZ(4,"label",4),t._uU(5,"Commission"),t.qZA()()(),t.TgZ(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",2)(10,"input",8),t.NdJ("ngModelChange",function(r){return o.salesCommission.discount=r})("ngModelChange",function(){return o.calculateCommission(),o.onChange()}),t.qZA(),t.TgZ(11,"label",9),t._uU(12,"Commission (%) Calculator"),t.qZA()()(),t.TgZ(13,"div",10)(14,"label",11),t._uU(15,"%"),t.qZA()()()()(),t.TgZ(16,"div",6)(17,"div",12)(18,"div",2)(19,"table",13)(20,"thead")(21,"tr",14)(22,"th",15),t._uU(23,"Sales Group"),t.qZA(),t.TgZ(24,"th",16),t._uU(25,"Commission"),t.qZA()()(),t.TgZ(26,"tbody"),t.YNc(27,La,5,2,"tr",17),t.qZA()()()()()),2&e&&(t.xp6(3),t.Q6J("ngModel",o.salesCommission.commission),t.xp6(7),t.Q6J("ngModel",o.salesCommission.discount),t.xp6(17),t.Q6J("ngForOf",o.form))},directives:[s.Fj,B.b,s.JJ,s.On,c.sg],styles:[""]}),n})(),Ea=(()=>{class n{constructor(){this.formChange=new t.vpe}onChange(){this.formChange.emit(this.form)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-form-variant-nav-description"]],inputs:{form:"form"},outputs:{formChange:"formChange"},decls:2,vars:1,consts:[[1,"form-floating-outline"],["height","210px",3,"value","valueChange"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"POS-tinymce-editor",1),t.NdJ("valueChange",function(r){return o.form.Description=r}),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("value",o.form.Description))},directives:[Bt.V],styles:[""]}),n})();var Ya=u(77890);function Ra(n,i){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",0)(2,"div",30)(3,"div",31)(4,"label"),t._uU(5,"Sell Price Type"),t.qZA(),t.TgZ(6,"div",32)(7,"radio-options",33),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw().form.SellPriceType=a}),t.qZA()()()()(),t.BQk()}if(2&n){const e=t.oxw();t.xp6(7),t.Q6J("model",e.form.SellPriceType)("options",e.sellPriceOptions)("title",e.sellPriceTootips)}}const Ot=function(n){return{selected:n}};let Ba=(()=>{class n{constructor(){this.paymentType=Ya._,this.sellPriceOptions=[{Key:0,Value:"Require Authorization"},{Key:1,Value:"Do Not Require Authorization"},{Key:2,Value:"Do Not Require Authorization and Sync Cost"}],this.sellPriceTootips=["Only user with UnitPriceEditor can change the price","All user can change the price","All user can change the price and the cost will follow the price"],this.formChange=new t.vpe}isNotEmpty(e){return C.gT.IsNotEmpty(e)}onChange(){this.formChange.emit(this.form)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-form-variant-nav-advanced"]],inputs:{form:"form",data:"data"},outputs:{formChange:"formChange"},decls:59,vars:32,consts:[[1,"row"],[1,"col-sm-4","bg-white"],[1,"form-floating-outline","radio","border","rounded"],["aria-label","Select an option",3,"ngModel","ngModelChange"],[3,"value"],[1,"ps-3","mt-4",3,"value"],[1,"form-floating-outline","flexRow",3,"ngClass"],["id","inputCostCurrency","bindLabel","Symbol","bindValue","ID",1,"productform",3,"items","clearable","ngModel","ngModelChange"],["for","inputCostCurrency"],["id","inputPriceCurrency","bindLabel","Symbol","bindValue","ID",1,"productform",3,"items","clearable","ngModel"],["for","inputPriceCurrency"],[1,"col-sm-6","bg-white"],[1,"col-sm-4"],[1,"col-sm-8"],[1,"form-floating-outline"],["type","text","id","inputContent","placeholder","Content","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["for","inputContent"],[1,"col-sm-4","ps-0"],[1,"mt-10"],["type","text","id","inputPackSize","placeholder","Pack Size",1,"form-control",3,"ngModel","ngModelChange"],["for","inputPackSize"],["type","text","id","inputIndex","placeholder","Index",1,"form-control",3,"ngModel","ngModelChange"],["for","inputIndex"],[1,"col-sm-6"],[1,"form-floating-outline",3,"ngClass"],["id","CategoryID","bindLabel","Name","bindValue","ID",1,"productform",3,"clearable","items","ngModel","ngModelChange"],["for","inputUOMSubQuantity"],["id","inputMeasurement","bindLabel","Name","bindValue","ID",1,"productform",3,"clearable","items","ngModel","ngModelChange"],["for","inputMeasurement"],[4,"ngIf"],[1,"col-sm-12","bg-white"],[1,"form-floating-outline","radio","border","rounded","mt-5"],[1,"mt-4"],[3,"model","options","title","modelChange"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"label"),t._uU(4,"Payment Type"),t.qZA(),t.TgZ(5,"mat-radio-group",3),t.NdJ("ngModelChange",function(r){return o.form.PaymentTypeID=r}),t.TgZ(6,"mat-radio-button",4),t._uU(7,"Cash And Point"),t.qZA(),t._uU(8,"\xa0 "),t.TgZ(9,"mat-radio-button",4),t._uU(10,"Cash"),t.qZA(),t.TgZ(11,"mat-radio-button",5),t._uU(12,"Point"),t.qZA()()()(),t.TgZ(13,"div",1)(14,"div",6)(15,"ng-select",7),t.NdJ("ngModelChange",function(r){return o.form.CostCurrencyID=r}),t.qZA(),t.TgZ(16,"label",8),t._uU(17,"Cost Currency"),t.qZA()()(),t.TgZ(18,"div",1)(19,"div",6),t._UZ(20,"ng-select",9),t.TgZ(21,"label",10),t._uU(22,"Price Currency"),t.qZA()()()(),t.TgZ(23,"div",0)(24,"div",11)(25,"div",0)(26,"div",12)(27,"div",0)(28,"div",13)(29,"div",14)(30,"input",15),t.NdJ("ngModelChange",function(r){return o.form.UnitQuantity=r}),t.qZA(),t.TgZ(31,"label",16),t._uU(32,"Content"),t.qZA()()(),t.TgZ(33,"div",17)(34,"label",18),t._uU(35,"/ unit"),t.qZA()()()(),t.TgZ(36,"div",1)(37,"div",14)(38,"input",19),t.NdJ("ngModelChange",function(r){return o.form.PackSize=r}),t.qZA(),t.TgZ(39,"label",20),t._uU(40,"Pack Size"),t.qZA()()(),t.TgZ(41,"div",1)(42,"div",14)(43,"input",21),t.NdJ("ngModelChange",function(r){return o.form.ProductIndex=r}),t.qZA(),t.TgZ(44,"label",22),t._uU(45,"Index"),t.qZA()()()()(),t.TgZ(46,"div",23)(47,"div",0)(48,"div",11)(49,"div",24)(50,"ng-select",25),t.NdJ("ngModelChange",function(r){return o.form.UOMQ=r}),t.qZA(),t.TgZ(51,"label",26),t._uU(52,"UOM Sub Quantity"),t.qZA()()(),t.TgZ(53,"div",11)(54,"div",24)(55,"ng-select",27),t.NdJ("ngModelChange",function(r){return o.form.MeasurementID=r}),t.qZA(),t.TgZ(56,"label",28),t._uU(57,"Measurements"),t.qZA()()()()()(),t.YNc(58,Ra,8,3,"ng-container",29)),2&e&&(t.xp6(5),t.Q6J("ngModel",o.form.PaymentTypeID),t.xp6(1),t.Q6J("value",o.paymentType.CashAndPoint),t.xp6(3),t.Q6J("value",o.paymentType.Cash),t.xp6(2),t.Q6J("value",o.paymentType.Point),t.xp6(3),t.Q6J("ngClass",t.VKq(24,Ot,o.isNotEmpty(o.form.CostCurrencyID))),t.xp6(1),t.Q6J("items",o.data.Currencies)("clearable",!1)("ngModel",o.form.CostCurrencyID),t.xp6(4),t.Q6J("ngClass",t.VKq(26,Ot,o.isNotEmpty(o.form.PriceCurrencyID))),t.xp6(1),t.Q6J("items",o.data.Currencies)("clearable",!1)("ngModel",o.form.PriceCurrencyID),t.xp6(10),t.Q6J("ngModel",o.form.UnitQuantity),t.xp6(8),t.Q6J("ngModel",o.form.PackSize),t.xp6(5),t.Q6J("ngModel",o.form.ProductIndex),t.xp6(6),t.Q6J("ngClass",t.VKq(28,Ot,o.isNotEmpty(o.form.UOMQ))),t.xp6(1),t.Q6J("clearable",!0)("items",o.data.UOMs)("ngModel",o.form.UOMQ),t.xp6(4),t.Q6J("ngClass",t.VKq(30,Ot,o.isNotEmpty(o.form.MeasurementID))),t.xp6(1),t.Q6J("clearable",!0)("items",o.data.Measurements)("ngModel",o.form.MeasurementID),t.xp6(3),t.Q6J("ngIf",2==o.form.TypeID))},directives:[Mt.VQ,s.JJ,s.On,Mt.U0,c.mk,y.w9,s.Fj,B.b,c.O5,q.P],styles:[""]}),n})(),$a=(()=>{class n{constructor(){this.formChange=new t.vpe}set _form(e){this.form=e||new le}onChange(){this.formChange.emit(this.form)}ngOnInit(){}onSelectParent(e){this.form.ParentID=e}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-form-variant-tab-multi-UOM"]],inputs:{_form:["form","_form"],variant:"variant",option:"option"},outputs:{formChange:"formChange"},decls:20,vars:5,consts:[[1,"card"],[1,"card-body"],[1,"row"],[1,"col-sm-auto","pt-8"],[1,"col-sm-4","ps-2"],[1,"form-floating-outline","flexRow"],["id","inputType","placeholder","Parent","bindLabel","Name","bindValue","ID",1,"productform",3,"items","clearable","ngModel","ngModelChange"],[1,"col-sm-auto","ms-0",2,"width","40px"],[1,"text-start","pt-8"],[1,"col-sm-3"],[1,"form-floating-outline"],["type","text","id","inputRatio","placeholder","Ratio","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["for","inputRatio"],[1,"col-sm-auto"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h3"),t._uU(5,"1 (one)"),t.qZA()(),t.TgZ(6,"div",4)(7,"div",5)(8,"ng-select",6),t.NdJ("ngModelChange",function(r){return o.onSelectParent(r)}),t.qZA()()(),t.TgZ(9,"div",7)(10,"h3",8),t._uU(11," = "),t.qZA()(),t.TgZ(12,"div",9)(13,"div",10)(14,"input",11),t.NdJ("ngModelChange",function(r){return o.form.Ratio=r})("ngModelChange",function(){return o.onChange()}),t.qZA(),t.TgZ(15,"label",12),t._uU(16,"Ratio"),t.qZA()()(),t.TgZ(17,"div",13)(18,"h3",8),t._uU(19),t.qZA()()()()()),2&e&&(t.xp6(8),t.Q6J("items",o.option)("clearable",!1)("ngModel",null==o.form?null:o.form.ParentID),t.xp6(6),t.Q6J("ngModel",o.form.Ratio),t.xp6(5),t.Oqu(o.variant.Model))},directives:[y.w9,s.JJ,s.On,s.Fj,B.b],styles:[""]}),n})();function ja(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",10)(1,"div",5)(2,"div",26)(3,"div",11)(4,"input",70),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).variant.UnitCost=a}),t.qZA(),t.TgZ(5,"label",71),t._uU(6,"Buying Cost"),t.qZA()()(),t.TgZ(7,"div",29)(8,"div",11)(9,"input",72),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).variant.OrderPriceDiscount=a}),t.qZA(),t.TgZ(10,"label",73),t._uU(11,"Disc %"),t.qZA()()()()()}if(2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("ngModel",null==e.variant?null:e.variant.UnitCost),t.xp6(5),t.Q6J("ngModel",null==e.variant?null:e.variant.OrderPriceDiscount)}}function Ka(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",5)(1,"div",33)(2,"div",11)(3,"input",74),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).VariantPoint.Point=a}),t.qZA(),t.TgZ(4,"label",75),t._uU(5,"Point"),t.qZA()()()()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",null==e.VariantPoint?null:e.VariantPoint.Point)}}function Wa(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",5)(1,"div",10)(2,"div",11)(3,"input",76),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).VariantPoint.ExpiredDay=a}),t.qZA(),t.TgZ(4,"label",77),t._uU(5,"Day(s) +"),t.qZA()()(),t.TgZ(6,"div",10)(7,"div",11)(8,"input",78),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).VariantPoint.ExpiredMonth=a}),t.qZA(),t.TgZ(9,"label",79),t._uU(10,"Month(s)"),t.qZA()()()()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",null==e.VariantPoint?null:e.VariantPoint.ExpiredDay),t.xp6(5),t.Q6J("ngModel",null==e.VariantPoint?null:e.VariantPoint.ExpiredMonth)}}function Ga(n,i){1&n&&(t.TgZ(0,"li",42)(1,"a",80),t._uU(2,"Component"),t.qZA()())}function za(n,i){1&n&&(t.TgZ(0,"a",81),t._uU(1,"MultiUOM"),t.qZA())}function Xa(n,i){1&n&&(t.ynx(0),t.TgZ(1,"div",7)(2,"div",84)(3,"p"),t._uU(4," This variant type does not have an inventory "),t.qZA()()(),t.BQk())}function ti(n,i){if(1&n&&t._UZ(0,"POS-form-variant-tab-inventory",85),2&n){const e=t.oxw(3);t.Q6J("form",e.entities)("editForm",e.getQueryParams)("data",e.data)}}function ei(n,i){if(1&n&&(t.TgZ(0,"div",58),t.YNc(1,Xa,5,0,"ng-container",82),t.YNc(2,ti,1,3,"ng-template",null,83,t.W1O),t.qZA()),2&n){const e=t.MAs(3),o=t.oxw(2);t.xp6(1),t.Q6J("ngIf",o.variant.TypeID==o.variantTypeID.NonInventory||o.variant.TypeID==o.variantTypeID.Composite||o.variant.TypeID==o.variantTypeID.PrepaidPoint||o.variant.TypeID==o.variantTypeID.PrepaidPackage)("ngIfElse",e)}}function ni(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"POS-form-variant-tab-multi-UOM",86),t.NdJ("formChange",function(a){return t.CHM(e),t.oxw(2).variantParent=a}),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("form",e.variantParent)("variant",e.variant)("option",e.variantParentList)}}const oi=function(){return["/menu/Products/Catalog/Products"]},se=function(n){return{selected:n}};function ai(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"a",2),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"button",3),t.NdJ("click",function(){return t.CHM(e),t.oxw().validateSubmit()}),t._uU(5,"Submit"),t.qZA()(),t.TgZ(6,"content")(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h3"),t._uU(13,"General"),t.qZA()(),t.TgZ(14,"div",9)(15,"div",5)(16,"div",10)(17,"div",11)(18,"autocompleteV2",12),t.NdJ("optionSelected",function(a){return t.CHM(e),t.oxw().onSelectProduct(a)})("ngModel",function(a){return t.CHM(e),t.oxw().variant.ProductID=a}),t.qZA()()(),t.TgZ(19,"div",13)(20,"div",11)(21,"input",14),t.NdJ("ngModelChange",function(a){t.CHM(e);const r=t.oxw();return r.variant.Model=a,r.updateDisplayName()}),t.qZA(),t.TgZ(22,"label",15),t._uU(23,"Variant"),t.qZA()()(),t.TgZ(24,"div",13)(25,"div",11)(26,"input",16),t.NdJ("ngModelChange",function(a){t.CHM(e);const r=t.oxw();return r.variant.Code=a,r.updateDisplayName()}),t.qZA(),t.TgZ(27,"label",17),t._uU(28,"Code"),t.qZA()()()(),t.TgZ(29,"div",5)(30,"div",10)(31,"div",11)(32,"input",18),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().variant.Name=a}),t.qZA(),t.TgZ(33,"label",19),t._uU(34,"Display Name"),t.qZA()()(),t.TgZ(35,"div",13)(36,"div",11)(37,"input",20),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().variant.Weight=a}),t.qZA(),t.TgZ(38,"label",21),t._uU(39,"Weight (gr)"),t.qZA()()(),t.TgZ(40,"div",13)(41,"div",22)(42,"ng-select",23),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().variant.UOM=a}),t.qZA(),t.TgZ(43,"label",24),t._uU(44,"UOM"),t.qZA()()()()()(),t.TgZ(45,"div",7)(46,"div",8)(47,"h3"),t._uU(48,"Pricing and Discount"),t.qZA()(),t.TgZ(49,"div",9)(50,"div",5),t.YNc(51,ja,12,2,"div",25),t.TgZ(52,"div",10)(53,"div",5)(54,"div",26)(55,"div",11)(56,"input",27),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().variant.UnitPrice=a}),t.qZA(),t.TgZ(57,"label",28),t._uU(58,"Selling Price"),t.qZA()()(),t.TgZ(59,"div",29)(60,"div",11)(61,"input",30),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().variant.PriceDiscount=a}),t.qZA(),t.TgZ(62,"label",31),t._uU(63,"Disc %"),t.qZA()()()()()()()()(),t.TgZ(64,"div",32)(65,"div",5)(66,"div",33)(67,"div",7)(68,"div",8)(69,"h3"),t._uU(70,"Properties"),t.qZA()(),t.TgZ(71,"div",9)(72,"div",5)(73,"div",33)(74,"div",22)(75,"ng-select",34),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().getVariantWithSameProductID(a)}),t.qZA(),t.TgZ(76,"label",35),t._uU(77,"Type"),t.qZA()()()(),t.YNc(78,Ka,6,1,"div",36),t.YNc(79,Wa,11,2,"div",36),t.TgZ(80,"div",5)(81,"div",33)(82,"div",37)(83,"label"),t._uU(84,"Taxable"),t.qZA(),t.TgZ(85,"mat-radio-group",38),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().variant.Taxable=a}),t.TgZ(86,"mat-radio-button",39),t._uU(87,"No"),t.qZA(),t.TgZ(88,"mat-radio-button",40),t._uU(89,"Yes"),t.qZA()()()()(),t.TgZ(90,"div",5)(91,"div",33)(92,"div",37)(93,"label"),t._uU(94,"Loyalty Point Enabled"),t.qZA(),t.TgZ(95,"mat-radio-group",38),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().variant.LoyaltyPoint=a}),t.TgZ(96,"mat-radio-button",39),t._uU(97,"No"),t.qZA(),t.TgZ(98,"mat-radio-button",40),t._uU(99,"Yes"),t.qZA()()()()(),t.TgZ(100,"div",5)(101,"div",33)(102,"div",37)(103,"label"),t._uU(104,"Discontinued"),t.qZA(),t.TgZ(105,"mat-radio-group",38),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().variant.Discontinued=a}),t.TgZ(106,"mat-radio-button",39),t._uU(107,"No"),t.qZA(),t.TgZ(108,"mat-radio-button",40),t._uU(109,"Yes"),t.qZA()()()()()()()()()()(),t.TgZ(110,"div",5)(111,"div",33)(112,"ul",41)(113,"li",42)(114,"a",43),t._uU(115,"Inventory"),t.qZA()(),t.YNc(116,Ga,3,0,"li",44),t.TgZ(117,"li",42)(118,"a",45),t._uU(119,"Outlet Price"),t.qZA()(),t.TgZ(120,"li",42)(121,"a",46),t._uU(122,"Pricebook"),t.qZA()(),t.TgZ(123,"li",42)(124,"a",47),t._uU(125,"Commission"),t.qZA()(),t.TgZ(126,"li",42)(127,"a",48),t._uU(128,"Description"),t.qZA()(),t.TgZ(129,"li",42)(130,"a",49),t._uU(131,"Advanced"),t.qZA()(),t.TgZ(132,"li",42),t.YNc(133,za,2,0,"a",50),t.qZA()(),t.TgZ(134,"div",51)(135,"div",52)(136,"div",53)(137,"div",9)(138,"div",54)(139,"div",5)(140,"div",55)(141,"div",5),t.YNc(142,ei,4,2,"div",56),t.qZA()()()()()()(),t.TgZ(143,"div",57)(144,"div",53)(145,"div",9)(146,"div",54)(147,"div",5)(148,"div",55)(149,"div",5)(150,"div",58)(151,"POS-form-variant-tab-component",59),t.NdJ("formChange",function(a){return t.CHM(e),t.oxw().composites=a}),t.qZA()()()()()()()()(),t.TgZ(152,"div",60)(153,"div",53)(154,"div",9)(155,"div",54)(156,"div",5)(157,"div",55)(158,"div",5)(159,"div",58)(160,"POS-form-variant-tab-outlet-price",59),t.NdJ("formChange",function(a){return t.CHM(e),t.oxw().outletPrices=a}),t.qZA()()()()()()()()(),t.TgZ(161,"div",61)(162,"div",53)(163,"div",9)(164,"div",54)(165,"div",5)(166,"div",55)(167,"div",5)(168,"div",58)(169,"POS-form-variant-tab-pricebook",59),t.NdJ("formChange",function(a){return t.CHM(e),t.oxw().pricebooks=a}),t.qZA()()()()()()()()(),t.TgZ(170,"div",62)(171,"div",53)(172,"div",9)(173,"div",54)(174,"div",5)(175,"div",55)(176,"div",5)(177,"div",58)(178,"POS-form-variant-nav-commission",63),t.NdJ("formChange",function(a){return t.CHM(e),t.oxw().salesGroups=a}),t.qZA()()()()()()()()(),t.TgZ(179,"div",64)(180,"div",53)(181,"div",9)(182,"div",54)(183,"div",5)(184,"div",55)(185,"div",5)(186,"div",58)(187,"POS-form-variant-nav-description",65),t.NdJ("formChange",function(a){return t.CHM(e),t.oxw().variant=a}),t.qZA()()()()()()()()(),t.TgZ(188,"div",66)(189,"div",53)(190,"div",9)(191,"div",54)(192,"div",67)(193,"div",55)(194,"div",5)(195,"div",58)(196,"POS-form-variant-nav-advanced",59),t.NdJ("formChange",function(a){return t.CHM(e),t.oxw().variant=a}),t.qZA()()()()()()()()(),t.TgZ(197,"div",68)(198,"div",53)(199,"div",9)(200,"div",54)(201,"div",67)(202,"div",55)(203,"div",5)(204,"div",58),t.YNc(205,ni,1,3,"POS-form-variant-tab-multi-UOM",69),t.qZA()()()()()()()()()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(51,oi)),t.xp6(2),t.Q6J("disabled",!e.productName),t.xp6(14),t.Q6J("customStyle",!0)("customLabel","Selected Product")("inputTextValue",e.productName)("displayText",e.productName),t.xp6(3),t.Q6J("ngModel",null==e.variant?null:e.variant.Model),t.xp6(5),t.Q6J("ngModel",null==e.variant?null:e.variant.Code),t.xp6(6),t.Q6J("ngModel",null==e.variant?null:e.variant.Name),t.xp6(5),t.Q6J("ngModel",null==e.variant?null:e.variant.Weight),t.xp6(4),t.Q6J("ngClass",t.VKq(52,se,e.IsNotEmpty(e.variant.UOM))),t.xp6(1),t.Q6J("items",e.data.UOMs)("clearable",e.IsNotEmpty(e.variant.UOM))("ngModel",null==e.variant?null:e.variant.UOM),t.xp6(9),t.Q6J("ngIf",e.data.HasRoleCost),t.xp6(5),t.Q6J("ngModel",null==e.variant?null:e.variant.UnitPrice),t.xp6(5),t.Q6J("ngModel",null==e.variant?null:e.variant.PriceDiscount),t.xp6(13),t.Q6J("ngClass",t.VKq(54,se,e.IsNotEmpty(e.variant.TypeID))),t.xp6(1),t.Q6J("items",null==e.data?null:e.data.Types)("clearable",!1)("ngModel",null==e.variant?null:e.variant.TypeID),t.xp6(3),t.Q6J("ngIf",10==(null==e.variant?null:e.variant.TypeID)||8==(null==e.variant?null:e.variant.TypeID)),t.xp6(1),t.Q6J("ngIf",10==(null==e.variant?null:e.variant.TypeID)||8==(null==e.variant?null:e.variant.TypeID)),t.xp6(6),t.Q6J("ngModel",null==e.variant?null:e.variant.Taxable),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0),t.xp6(7),t.Q6J("ngModel",null==e.variant?null:e.variant.LoyaltyPoint),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0),t.xp6(7),t.Q6J("ngModel",null==e.variant?null:e.variant.Discontinued),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0),t.xp6(8),t.Q6J("ngIf",e.variant.TypeID==e.variantTypeID.Standard||e.variant.TypeID==e.variantTypeID.NonInventory||e.variant.TypeID==e.variantTypeID.Composite||e.variant.TypeID==e.variantTypeID.Manufactured||e.variant.TypeID==e.variantTypeID.MultipleUOM),t.xp6(17),t.Q6J("ngIf",e.variant.TypeID==e.variantTypeID.MultipleUOM),t.xp6(9),t.Q6J("ngIf",e.entities.length>0&&e.data),t.xp6(9),t.Q6J("form",e.composites)("data",e.data),t.xp6(9),t.Q6J("form",e.outletPrices)("data",e.data),t.xp6(9),t.Q6J("form",e.pricebooks)("data",e.data),t.xp6(9),t.Q6J("salesCommission",e.sales)("form",e.salesGroups)("data",e.variant),t.xp6(9),t.Q6J("form",e.variant),t.xp6(9),t.Q6J("form",e.variant)("data",e.data),t.xp6(9),t.Q6J("ngIf",e.variant.TypeID==e.variantTypeID.MultipleUOM)}}let ii=(()=>{class n extends Y.U{constructor(e,o,a,r,p){super(e,"catalog/variant/GetVariantFormInitialData",o),this.httpService=e,this.activatedRoute=o,this.router=a,this.toaster=r,this.matDialog=p,this.variantTypeID=qt.J,this.getQueryParams=null,this.variantParentList=[],this.variant=new sa,this.composites=[],this.outletPrices=[],this.pricebooks=[],this.salesGroups=[],this.entities=[],this.VariantPoint={ExpiredDay:0,Point:0,ExpiredMonth:0},this.variantParent=new le,this.sales={commission:0,discount:0}}onSelectProduct(e){let o=JSON.parse(e);this.variant.ProductID=o.Key,this.productName=o.Value,this.updateDisplayName()}updateDisplayName(){this.variant.Name=JSON.parse(JSON.stringify(this.productName?this.productName:"")),this.variant.Model&&(this.variant.Name=`${this.productName} (${this.variant.Model})`)}preSubmitForm(){this.data.Form=this.generateVariantSubmitData()}generateOutletStock(e){let o;return e.map(r=>(o=new re,C.gT.IsEmpty(r.EntityID)&&(r.EntityID=r.ID),o=(0,pa.d8)(re,r),o))}calculateCompositeCost(e){let a,r,o=0;return e.forEach(p=>{a=p.Variant.Variant.UnitCost,r=p.Quantity,o+=a*r}),o}generateVariantSubmitData(){var e,o;let a=this.generateOutletStock(this.entities),r=this.calculateCompositeCost(this.composites),p={};((null===(e=this.variant)||void 0===e?void 0:e.TypeID)==this.variantTypeID.PrepaidPackage||(null===(o=this.variant)||void 0===o?void 0:o.TypeID)==this.variantTypeID.PrepaidPoint)&&(p=this.VariantPoint);let x={Composites:this.composites,OutletPrices:this.outletPrices,OutletStocks:a,Pricebooks:this.pricebooks,QueryString:null,TotalCompositeCost:r,Variant:this.variant,VariantParent:this.variantParent,VariantPoint:p};return C.gT.IsNotEmpty(this.getQueryParams.ID)?(x.Commission=this.salesGroups,x.QueryString=this.getQueryParams.ID,x.Entities=this.entities,x.PageTitle=this.PageTitle,x.ParentName=this.ParentName,x.ProductName=this.ProductName,x.SupplierName=this.SupplierName,x.VariantParent=this.variantParent?this.variantParent:{}):x.Commision=this.salesGroups,x.Variant.SalesCommission=this.sales.commission,x}IsNotEmpty(e){return C.gT.IsNotEmpty(e)}postBindForm(e){this.variant.TypeID=e.Types[0].Key,this.pricebooks=e.Pricebooks,this.salesGroups=e.SalesGroup,this.loadEditForm()}loadEditForm(){this.getQueryParams=this.activatedRoute.snapshot.queryParams,Object.entries(this.getQueryParams).length>0&&this.httpService.post("/API/catalog/variant/GetVariantFormModelById",JSON.stringify(this.getQueryParams)).subscribe(e=>{this.productName=e.ProductName,this.menuData.H=e.PageTitle,this.variant=e.Variant,this.composites=e.Composites,this.outletPrices=e.OutletPrices,this.pricebooks=e.Pricebooks,this.salesGroups=e.Commission,this.entities=e.OutletStocks,this.VariantPoint=C.gT.IsEmpty(e.VariantPoint)?{ExpiredDay:0,Point:0,ExpiredMonth:0}:e.VariantPoint,e.Variant.SalesCommission>0&&(this.sales.commission=e.Variant.SalesCommission,this.sales.discount=e.Variant.SalesCommission/e.Variant.UnitPrice*100),this.variantParent=e.VariantParent?e.VariantParent:this.variantParent,this.PageTitle=e.PageTitle,this.ParentName=e.ParentName,this.ProductName=e.ProductName,this.SupplierName=e.SupplierName,this.initVariantParentList(e.Variant.TypeID),this.getVariantWithSameProductID(e.Variant.TypeID,!0)})}getVariantWithSameProductID(e,o=!1){this.variant.TypeID==qt.J.MultipleUOM&&!o&&(this.variantParent=null),this.variant.TypeID=e,this.initVariantParentList(e)}initVariantParentList(e){e==this.variantTypeID.MultipleUOM&&this.httpService.post("/API/catalog/variant/GetVariantWithSameProductID",JSON.stringify({productID:this.variant.ProductID,variantID:this.variant.ID})).subscribe(a=>{this.variantParentList=a})}validateSubmit(){let e=this.variant.Description;e&&e.length>500?this.toaster.warning("Maximum 500 characters allowed","Warning"):this.onSubmit("catalog/variant/SubmitVariant")}onSubmitSuccess(e){this.toaster.success("Success Submit Variants",Z.n.Success),this.router.navigate(["/menu/Products/Catalog/Variants/Info"],{queryParams:{ID:e}})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(l.gz),t.Y36(l.F0),t.Y36(f._W),t.Y36(b.uw))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-form-variant"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],["role","button",1,"btn","btn-outline-secondary","me-5",3,"routerLink"],["type","button","role","button",1,"btn","btn-success",3,"disabled","click"],[1,"container-fluid","bg-light-gray"],[1,"row"],[1,"col-md-8","mt-5"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-6"],[1,"form-floating-outline"],["id","inputSupplier","placeholder","Selected Product","requestUrl","/API/AC/GetProductSuggestionByCodeNName",1,"w-100",3,"customStyle","customLabel","inputTextValue","displayText","optionSelected","ngModel"],[1,"col-sm-3"],["type","text","id","inputVariant","placeholder","Variant","name","variant",1,"form-control",3,"ngModel","ngModelChange"],["for","inputVariant"],["type","text","id","inputCode","name","code","placeholder","Code",1,"form-control",3,"ngModel","ngModelChange"],["for","inputCode"],["type","text","id","inputName","placeholder","Display Name","name","name",1,"form-control",3,"ngModel","ngModelChange"],["for","inputName"],["type","text","id","inputWeight","placeholder","Weight (gr)","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["for","inputWeight"],[1,"form-floating-outline",3,"ngClass"],["id","CategoryID","bindLabel","Name","bindValue","ID",1,"productform",3,"items","clearable","ngModel","ngModelChange"],["for","CategoryID"],["class","col-sm-6",4,"ngIf"],[1,"col"],["type","text","id","inputPrice","placeholder","Price","autoNum","",1,"form-control","with-currency",3,"ngModel","ngModelChange"],["for","inputPrice"],[1,"ps-0","col-auto",2,"width","75px"],["type","text","id","inputDiscPrice","placeholder","Disc %","autoNum","",1,"form-control","percentage-input",3,"ngModel","ngModelChange"],["for","inputDiscPrice"],[1,"col-sm-4","mt-5"],[1,"col-sm-12"],["id","typeID","bindLabel","Value","bindValue","Key",1,"productform",3,"items","clearable","ngModel","ngModelChange"],["for","typeID",1,"ng-select"],["class","row",4,"ngIf"],[1,"form-floating-outline","radio","border","rounded"],["aria-label","Select an option",3,"ngModel","ngModelChange"],[3,"value"],[1,"ps-3","mt-4",3,"value"],["id","myTab","role","tablist",1,"nav","nav-tabs"],[1,"nav-item"],["id","inventory-tab","data-bs-toggle","tab","href","#inventory","role","tab","aria-controls","inventory","aria-selected","true",1,"nav-link","active"],["class","nav-item",4,"ngIf"],["id","pricing-tab","data-bs-toggle","tab","href","#outlet-price","role","tab","aria-controls","pricing","aria-selected","false",1,"nav-link"],["id","pricebook-tab","data-bs-toggle","tab","href","#pricebook","role","tab","aria-controls","pricebook","aria-selected","false",1,"nav-link"],["id","commission-tab","data-bs-toggle","tab","href","#commission","role","tab","aria-controls","commission","aria-selected","false",1,"nav-link"],["id","description-tab","data-bs-toggle","tab","href","#description","role","tab","aria-controls","description","aria-selected","false",1,"nav-link"],["id","advanced-tab","data-bs-toggle","tab","href","#advanced","role","tab","aria-controls","advanced","aria-selected","false",1,"nav-link"],["class","nav-link","id","multi-UOM-tab","data-bs-toggle","tab","href","#multi-UOM","role","tab","aria-controls","multiuom","aria-selected","false",4,"ngIf"],["id","myTabContent",1,"tab-content"],["id","inventory","role","tabpanel",1,"tab-pane","fade","show","active","mt-0","pt-0"],[1,"card","border-top-0"],[1,"container-fluid","ps-5","pe-5"],[1,"col-sm-12","p-0"],["class","col-sm-12 bg-white",4,"ngIf"],["id","component","role","tabpanel",1,"tab-pane","fade","show","mt-0","pt-0"],[1,"col-sm-12","bg-white"],[3,"form","data","formChange"],["id","outlet-price","role","tabpanel",1,"tab-pane","fade","show","mt-0","pt-0"],["id","pricebook","role","tabpanel",1,"tab-pane","fade","show","mt-0","pt-0"],["id","commission","role","tabpanel",1,"tab-pane","fade","show","mt-0","pt-0"],[3,"salesCommission","form","data","formChange"],["id","description","role","tabpanel",1,"tab-pane","fade","show","mt-0","pt-0"],[3,"form","formChange"],["id","advanced","role","tabpanel",1,"tab-pane","fade","show","mt-0","pt-0"],[1,"row","border-bottom"],["id","multi-UOM","role","tabpanel",1,"tab-pane","fade","show","mt-0","pt-0"],[3,"form","variant","option","formChange",4,"ngIf"],["type","text","id","inputCost","placeholder","Cost","autoNum","",1,"form-control","with-currency",3,"ngModel","ngModelChange"],["for","inputCost"],["type","text","id","inputDiscCost","placeholder","Disc %","maxlength","5","autoNum","",1,"form-control","percentage-input",3,"ngModel","ngModelChange"],["for","inputDiscCost"],["type","text","id","inputPoint","placeholder","Point","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["for","inputPoint"],["type","text","id","inputDays","placeholder","Day(s) +","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["for","inputDays"],["type","text","id","inputMonth","placeholder","Month(s)","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["for","inputMonth"],["id","component-tab","data-bs-toggle","tab","href","#component","role","tab","aria-controls","component","aria-selected","false",1,"nav-link"],["id","multi-UOM-tab","data-bs-toggle","tab","href","#multi-UOM","role","tab","aria-controls","multiuom","aria-selected","false",1,"nav-link"],[4,"ngIf","ngIfElse"],["TABLE",""],[1,"card-body","mb-10"],[3,"form","editForm","data"],[3,"form","variant","option","formChange"]],template:function(e,o){1&e&&t.YNc(0,ai,206,56,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},directives:[c.O5,m.p,l.yS,ft.J,s.JJ,s.On,s.Fj,B.b,c.mk,y.w9,s.nD,Mt.VQ,Mt.U0,Za,Na,ka,Qa,Ha,Ea,Ba,$a],styles:[""]}),n})();function ri(n,i){1&n&&(t.TgZ(0,"div",1)(1,"div",2)(2,"p"),t._uU(3," This variant type does not have an inventory "),t.qZA()()())}const pe=function(){return["/menu/Products/Catalog/Variants/Log"]},li=function(n){return{ID:n}};function ci(n,i){if(1&n&&(t.TgZ(0,"a",25),t._uU(1,"Log"),t.qZA()),2&n){const e=t.oxw(3);t.Q6J("routerLink",t.DdM(2,pe))("queryParams",t.VKq(3,li,e.variant.ID))}}function si(n,i){if(1&n&&(t.TgZ(0,"div",23),t.YNc(1,ci,2,5,"a",24),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.variantParent&&e.variantParent.Ratio>0||e.role.IsMultipleOUM||e.role.IsSerialNumber||1==e.variant.TypeID||6==e.variant.TypeID||5==e.variant.TypeID)}}function pi(n,i){1&n&&(t.TgZ(0,"span"),t._uU(1,"Direct"),t.qZA())}function di(n,i){1&n&&(t.TgZ(0,"th",26),t._uU(1,"Indirect Allocated"),t.qZA())}function ui(n,i){1&n&&(t.TgZ(0,"th",27),t._uU(1,"ROP"),t.qZA())}function _i(n,i){1&n&&(t.TgZ(0,"th",28),t._uU(1,"Max"),t.qZA())}function mi(n,i){1&n&&(t.TgZ(0,"th"),t._uU(1,"Serial"),t.qZA())}function gi(n,i){1&n&&t._UZ(0,"th")}function fi(n,i){if(1&n&&(t.TgZ(0,"td",32),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.IndirectAllocated)," ")}}function hi(n,i){if(1&n&&(t.TgZ(0,"td",36),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.Q6J("ngClass",e.MinStock>=e.UnitsInStock&&0!=e.MinStock?"bg-gradient-warning":""),t.xp6(1),t.hij(" ",t.lcZ(2,2,e.MinStock),"")}}function xi(n,i){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.Q6J("ngClass",e.MaxStock>=e.UnitsInStock&&0!=e.MaxStock?"bg-gradient-warning":""),t.xp6(1),t.hij(" ",t.lcZ(2,2,e.MaxStock),"")}}function Ci(n,i){if(1&n&&(t.TgZ(0,"li",40),t._uU(1),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.hij(" ",e," ")}}function vi(n,i){if(1&n&&(t.TgZ(0,"td")(1,"ul",38),t.YNc(2,Ci,2,1,"li",39),t.qZA()()),2&n){const e=t.oxw().$implicit;t.xp6(2),t.Q6J("ngForOf",e.SerialNumber)}}const Ti=function(){return["/menu/Products/Catalog/Variants/Serial_Form"]},Zi=function(n,i){return{VariantID:n,EntityID:i}};function bi(n,i){if(1&n&&(t.TgZ(0,"td")(1,"a",31),t._UZ(2,"i",41),t.qZA()()),2&n){const e=t.oxw().$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("routerLink",t.DdM(2,Ti))("queryParams",t.WLB(3,Zi,o.variant.ID,e.EntityID))}}const yi=function(n,i){return{ID:n,EntityID:i}},de=function(){return["/menu/Fulfillment/Allocated/Unfulfilled_Products"]},Ii=function(n,i){return{VariantID:n,OutletID:i}};function Mi(n,i){if(1&n&&(t.TgZ(0,"tr")(1,"td",29),t._uU(2),t.qZA(),t.TgZ(3,"td",30)(4,"a",31),t._uU(5),t.ALo(6,"number"),t.qZA()(),t.TgZ(7,"td",32)(8,"a",21),t._uU(9),t.ALo(10,"number"),t.qZA()(),t.YNc(11,fi,3,3,"td",33),t.TgZ(12,"td",32),t._uU(13),t.ALo(14,"number"),t.qZA(),t.YNc(15,hi,3,4,"td",34),t.ALo(16,"sum"),t.YNc(17,xi,3,4,"td",35),t.ALo(18,"sum"),t.YNc(19,vi,3,1,"td",13),t.YNc(20,bi,3,6,"td",13),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.Name),t.xp6(1),t.Q6J("ngClass",e.MinStock>=e.UnitsInStock&&0!=e.MinStock?"bg-gradient-warning":""),t.xp6(1),t.Q6J("routerLink",t.DdM(26,pe))("queryParams",t.WLB(27,yi,o.variant.ID,e.EntityID)),t.xp6(1),t.Oqu(t.lcZ(6,14,e.UnitsInStock)),t.xp6(3),t.Q6J("routerLink",t.DdM(30,de))("queryParams",t.WLB(31,Ii,o.variant.ID,e.EntityID)),t.xp6(1),t.hij(" ",t.lcZ(10,16,e.Allocated),""),t.xp6(2),t.Q6J("ngIf",o.totalAllocatedIndrection>0),t.xp6(2),t.hij(" ",t.lcZ(14,18,e.Available)," "),t.xp6(2),t.Q6J("ngIf",0!=t.xi3(16,20,o.entityStock,"MinStock")),t.xp6(2),t.Q6J("ngIf",0!=t.xi3(18,23,o.entityStock,"MaxStock")),t.xp6(2),t.Q6J("ngIf",o.role.IsSerialNumber),t.xp6(1),t.Q6J("ngIf",o.role.IsSerialNumber)}}function Pi(n,i){if(1&n&&(t.TgZ(0,"td",20),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.entityStock,"IndirectAllocated"))," ")}}function Di(n,i){if(1&n&&(t.TgZ(0,"td",20),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.entityStock,"Available"))," ")}}function Ai(n,i){if(1&n&&(t.TgZ(0,"td",20),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.entityStock,"MinStock"))," ")}}function Ni(n,i){if(1&n&&(t.TgZ(0,"td",20),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.entityStock,"MaxStock"))," ")}}const qi=function(n){return{VariantID:n}};function wi(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6)(6,"table",7),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),t.TgZ(7,"thead",8)(8,"tr",9)(9,"th"),t._uU(10," Outlet "),t.YNc(11,si,2,1,"div",10),t.qZA(),t.TgZ(12,"th",11),t._uU(13," On Hand "),t.qZA(),t.TgZ(14,"th",12),t.YNc(15,pi,2,0,"span",13),t._uU(16," Allocated"),t.qZA(),t.YNc(17,di,2,0,"th",14),t.TgZ(18,"th",15),t._uU(19,"Available "),t.qZA(),t.YNc(20,ui,2,0,"th",16),t.ALo(21,"sum"),t.YNc(22,_i,2,0,"th",17),t.ALo(23,"sum"),t.YNc(24,mi,2,0,"th",13),t.YNc(25,gi,1,0,"th",13),t.qZA()(),t.TgZ(26,"tbody"),t.YNc(27,Mi,21,34,"tr",18),t.qZA(),t.TgZ(28,"tfoot")(29,"tr"),t._UZ(30,"td",19),t.TgZ(31,"td",20),t._uU(32),t.ALo(33,"number"),t.ALo(34,"sum"),t.qZA(),t.TgZ(35,"td",20)(36,"a",21),t._uU(37),t.ALo(38,"number"),t.ALo(39,"sum"),t.qZA()(),t.YNc(40,Pi,4,6,"td",22),t.YNc(41,Di,4,6,"td",22),t.ALo(42,"sum"),t.YNc(43,Ai,4,6,"td",22),t.ALo(44,"sum"),t.YNc(45,Ni,4,6,"td",22),t.ALo(46,"sum"),t.qZA()()()()()()()()()}if(2&n){const e=t.oxw();t.xp6(11),t.Q6J("ngIf",e.role.HasInventoryView&&e.role.LogRestriction),t.xp6(4),t.Q6J("ngIf",e.totalAllocatedIndrection>0),t.xp6(2),t.Q6J("ngIf",e.totalAllocatedIndrection>0),t.xp6(3),t.Q6J("ngIf",0!=t.xi3(21,16,e.entityStock,"MinStock")),t.xp6(2),t.Q6J("ngIf",0!=t.xi3(23,19,e.entityStock,"MaxStock")),t.xp6(2),t.Q6J("ngIf",e.role.IsSerialNumber),t.xp6(1),t.Q6J("ngIf",e.role.IsSerialNumber),t.xp6(2),t.Q6J("ngForOf",e.entityStock),t.xp6(5),t.hij(" ",t.lcZ(33,22,t.xi3(34,24,e.entityStock,"UnitsInStock"))," "),t.xp6(4),t.Q6J("routerLink",t.DdM(41,de))("queryParams",t.VKq(42,qi,e.variant.ID)),t.xp6(1),t.hij(" ",t.lcZ(38,27,t.xi3(39,29,e.entityStock,"Allocated")),""),t.xp6(3),t.Q6J("ngIf",e.totalAllocatedIndrection>0),t.xp6(1),t.Q6J("ngIf",0!==t.xi3(42,32,e.entityStock,"Available")),t.xp6(2),t.Q6J("ngIf",0!==t.xi3(44,35,e.entityStock,"MinStock")),t.xp6(2),t.Q6J("ngIf",0!==t.xi3(46,38,e.entityStock,"MaxStock"))}}let Si=(()=>{class n{constructor(){this.totalAllocatedIndrection=0}ngOnInit(){for(let e of this.entityStock)this.totalAllocatedIndrection+=e.IndirectAllocated}ngOnChanges(){this.variantInfoModel&&(this.variantParent=this.variantInfoModel.Data.VariantParent,this.variant=this.variantInfoModel.Data.Variant,this.role=this.variantInfoModel.Roles,this.entityStock=this.variantInfoModel.Data.EntityStockOutlet,this.originalStock=this.entityStock)}sortData(e){const o=this.entityStock.slice();this.entityStock=e.active&&""!==e.direction?o.sort((a,r)=>this.compare(a[e.active],r[e.active],"asc"===e.direction)):this.originalStock}compare(e,o,a){return(e<o?-1:1)*(a?1:-1)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-nav-inventory"]],inputs:{variantInfoModel:"variantInfoModel"},features:[t.TTD],decls:2,vars:2,consts:[["class","card border-top-0",4,"ngIf"],[1,"card","border-top-0"],[1,"card-body"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],[1,"content"],["matSort","",1,"table","custom-table","mt-5",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"table-secondary"],["class","btn-group bg-white ml-5",4,"ngIf"],["mat-sort-header","UnitsInStock","title","the number of Physical Inventory at your Outlet",1,"text-end","border-end",2,"width","100px"],["title","Inventory which is already reserved for customer's order",1,"text-end",2,"width","100px"],[4,"ngIf"],["class","text-end","title","Reserved because this product is a dependancy of other Product","style","width:100px",4,"ngIf"],["title","Do not sell above this to avoid OverSelling",1,"text-end",2,"width","100px"],["class","text-end","title","Reorder Point Threshold - calculate by multiplying [Lead Time] with [Average Daily Sales]","style","width:70px",4,"ngIf"],["class","text-end","title","Maximum Inventory you should have after PurchaseOrder or TransferOrder operation","style","width:70px",4,"ngIf"],[4,"ngFor","ngForOf"],["colspan","1"],[1,"text-end","border-end"],["target","_blank",3,"routerLink","queryParams"],["class","text-end border-end",4,"ngIf"],[1,"btn-group","bg-white","ml-5"],["class","btn btn-outline-secondary btn-sm ","style","font-size: 10px !important;",3,"routerLink","queryParams",4,"ngIf"],[1,"btn","btn-outline-secondary","btn-sm",2,"font-size","10px !important",3,"routerLink","queryParams"],["title","Reserved because this product is a dependancy of other Product",1,"text-end",2,"width","100px"],["title","Reorder Point Threshold - calculate by multiplying [Lead Time] with [Average Daily Sales]",1,"text-end",2,"width","70px"],["title","Maximum Inventory you should have after PurchaseOrder or TransferOrder operation",1,"text-end",2,"width","70px"],[2,"vertical-align","middle"],[1,"text-end","border-end",2,"vertical-align","middle",3,"ngClass"],[3,"routerLink","queryParams"],[1,"text-end","border-bottom"],["class","text-end border-bottom",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],["class","text-end bg-warning",3,"ngClass",4,"ngIf"],[1,"text-end",3,"ngClass"],[1,"text-end","bg-warning",3,"ngClass"],[1,"list-inline"],["class","float-left mr-7",4,"ngFor","ngForOf"],[1,"float-left","mr-7"],["aria-hidden","true",1,"fa","fa-barcode","fa-lg"]],template:function(e,o){1&e&&(t.YNc(0,ri,4,0,"div",0),t.YNc(1,wi,47,44,"div",0)),2&e&&(t.Q6J("ngIf",!(o.variantParent&&o.variantParent.Ratio>0||o.role.IsMultipleOUM||o.role.IsSerialNumber||1==o.variant.TypeID||6==o.variant.TypeID||5==o.variant.TypeID)),t.xp6(1),t.Q6J("ngIf",o.variantParent&&o.variantParent.Ratio>0||o.role.IsMultipleOUM||o.role.IsSerialNumber||1==o.variant.TypeID||6==o.variant.TypeID||5==o.variant.TypeID))},directives:[c.O5,$.YE,l.yS,$.nU,c.sg,c.mk],pipes:[w.qU,c.JJ],styles:[""]}),n})();function Ui(n,i){1&n&&(t.TgZ(0,"th",11),t._uU(1,"Unit Cost"),t.qZA())}function Oi(n,i){1&n&&(t.TgZ(0,"th",11),t._uU(1,"Total Cost"),t.qZA())}function Ji(n,i){1&n&&t._UZ(0,"i",16)}function Vi(n,i){if(1&n&&(t.TgZ(0,"td"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw();t.xp6(1),t.hij(" ",o.findCurrencySymbolById(null==e?null:e.PriceCurrencyID)+" "+t.lcZ(2,1,null==e?null:e.TotalCost)," ")}}function ki(n,i){if(1&n&&(t.TgZ(0,"td"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw();t.xp6(1),t.hij(" ",o.findCurrencySymbolById(null==e?null:e.PriceCurrencyID)+" "+t.lcZ(2,1,null==e?null:e.TotalCost)," ")}}const Fi=function(){return["/menu/Products/Catalog/Variants/Info"]},Qi=function(n){return{ID:n}};function Li(n,i){if(1&n&&(t.TgZ(0,"tr")(1,"td")(2,"div",12)(3,"a",13),t._uU(4),t.qZA(),t.YNc(5,Ji,1,0,"i",14),t.qZA()(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td"),t._uU(9),t.qZA(),t.TgZ(10,"td"),t._uU(11),t.qZA(),t.YNc(12,Vi,3,3,"td",15),t.YNc(13,ki,3,3,"td",15),t.qZA()),2&n){const e=i.$implicit,o=t.oxw();t.xp6(3),t.Q6J("routerLink",t.DdM(9,Fi))("queryParams",t.VKq(10,Qi,e.ID)),t.xp6(1),t.Oqu(null==e?null:e.Name),t.xp6(1),t.Q6J("ngIf",null==e?null:e.HasComponent),t.xp6(2),t.Oqu(null==e?null:e.Code),t.xp6(2),t.Oqu(null==e?null:e.Quantity),t.xp6(2),t.Oqu(null==e?null:e.UomName),t.xp6(1),t.Q6J("ngIf",null==o.role?null:o.role.RoleCost),t.xp6(1),t.Q6J("ngIf",null==o.role?null:o.role.RoleCost)}}let Hi=(()=>{class n{constructor(){}findCurrencySymbolById(e){let o;return this.currencies.forEach(a=>{a.ID===e&&(o=a.Symbol)}),o}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-nav-component"]],inputs:{composites:"composites",role:"role",currencies:"currencies"},decls:19,vars:3,consts:[[1,"card","border-top-0"],[1,"card-body"],[1,"row"],[1,"col-sm-12"],[1,"table","table-bordered","custom-table"],[1,"table-light"],[1,"border-end"],[1,"border-end",2,"width","120px"],[1,"border-end",2,"width","70px"],["class","border-end number cost","style","width:120px",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"border-end","number","cost",2,"width","120px"],[1,"d-flex","justify-content-between"],["target","_blank",3,"routerLink","queryParams"],["class","fa-solid fa-code-branch","title","This component has a component",4,"ngIf"],[4,"ngIf"],["title","This component has a component",1,"fa-solid","fa-code-branch"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"table",4)(5,"thead")(6,"tr",5)(7,"th",6),t._uU(8,"Variant"),t.qZA(),t.TgZ(9,"th",7),t._uU(10,"Code"),t.qZA(),t.TgZ(11,"th",8),t._uU(12,"Qty"),t.qZA(),t.TgZ(13,"th",8),t._uU(14,"Uom"),t.qZA(),t.YNc(15,Ui,2,0,"th",9),t.YNc(16,Oi,2,0,"th",9),t.qZA()(),t.TgZ(17,"tbody"),t.YNc(18,Li,14,12,"tr",10),t.qZA()()()()()()),2&e&&(t.xp6(15),t.Q6J("ngIf",null==o.role?null:o.role.RoleCost),t.xp6(1),t.Q6J("ngIf",null==o.role?null:o.role.RoleCost),t.xp6(2),t.Q6J("ngForOf",o.composites))},directives:[c.O5,c.sg,l.yS],pipes:[c.JJ],styles:[""]}),n})();function Ei(n,i){1&n&&(t.TgZ(0,"th",9),t._uU(1,"Extra Cost"),t.qZA())}function Yi(n,i){1&n&&(t.TgZ(0,"th",12),t._uU(1,"Disc."),t.qZA())}function Ri(n,i){if(1&n&&(t.TgZ(0,"td"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",(null==e?null:e.PriceCurrency)+" "+t.lcZ(2,1,e.ExtraCost)," ")}}function Bi(n,i){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.PriceDiscount+"%")}}function $i(n,i){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.YNc(3,Ri,3,3,"td",13),t.TgZ(4,"td"),t._uU(5),t.ALo(6,"number"),t.qZA(),t.YNc(7,Bi,2,1,"td",13),t.qZA()),2&n){const e=i.$implicit,o=t.oxw();t.xp6(2),t.Oqu(null==e?null:e.EntityName),t.xp6(1),t.Q6J("ngIf",null==o.role?null:o.role.OutLetPriceVisible),t.xp6(2),t.hij(" ",(null==e?null:e.PriceCurrency)+" "+t.lcZ(6,4,e.UnitPrice)," "),t.xp6(2),t.Q6J("ngIf",null==o.role?null:o.role.OutLetPriceVisible)}}let ji=(()=>{class n{constructor(){}ngOnChanges(){this.variantInfoModel&&(this.role=this.variantInfoModel.Roles,this.outletPrices=this.variantInfoModel.Data.OutletPrice,this.currencies=this.variantInfoModel.Data.Currencies)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-nav-outlet-price"]],inputs:{variantInfoModel:"variantInfoModel"},features:[t.TTD],decls:16,vars:3,consts:[[1,"card","border-top-0"],[1,"card-body"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],[1,"table","table-bordered","custom-table"],[1,"table-light"],[1,"border-end"],["class","border-end","width","100px",4,"ngIf"],["width","100px",1,"border-end"],["class","border-end","width","50px",4,"ngIf"],[4,"ngFor","ngForOf"],["width","50px",1,"border-end"],[4,"ngIf"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"table",5)(6,"thead")(7,"tr",6)(8,"th",7),t._uU(9,"Outlet"),t.qZA(),t.YNc(10,Ei,2,0,"th",8),t.TgZ(11,"th",9),t._uU(12,"Price"),t.qZA(),t.YNc(13,Yi,2,0,"th",10),t.qZA()(),t.TgZ(14,"tbody"),t.YNc(15,$i,8,6,"tr",11),t.qZA()()()()()()()),2&e&&(t.xp6(10),t.Q6J("ngIf",null==o.role?null:o.role.OutLetPriceVisible),t.xp6(3),t.Q6J("ngIf",null==o.role?null:o.role.OutLetPriceVisible),t.xp6(2),t.Q6J("ngForOf",o.outletPrices))},directives:[c.O5,c.sg],pipes:[c.JJ],styles:[""]}),n})();function Ki(n,i){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"),t._uU(6),t.ALo(7,"number"),t.qZA(),t.TgZ(8,"td"),t._uU(9),t.ALo(10,"number"),t.qZA()()),2&n){const e=i.$implicit;t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.MinimumQuantity),t.xp6(2),t.Oqu("Rp "+t.lcZ(7,4,e.UnitPrice)),t.xp6(3),t.Oqu(t.lcZ(10,6,e.PriceDiscount)+"%")}}let Wi=(()=>{class n{constructor(){}ngOnInit(){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-nav-pricebook"]],inputs:{pricebooks:"pricebooks"},decls:18,vars:1,consts:[[1,"card","border-top-0"],[1,"card-body"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],[1,"table","table-bordered","custom-table"],[1,"table-light"],[1,"border-end"],["width","120px",1,"border-end"],["width","100px",1,"border-end"],["width","50px",1,"border-end"],[4,"ngFor","ngForOf"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"table",5)(6,"thead")(7,"tr",6)(8,"th",7),t._uU(9,"Name"),t.qZA(),t.TgZ(10,"th",8),t._uU(11,"Minimum Quantity"),t.qZA(),t.TgZ(12,"th",9),t._uU(13,"Unit Price"),t.qZA(),t.TgZ(14,"th",10),t._uU(15,"Unit Disc."),t.qZA()()(),t.TgZ(16,"tbody"),t.YNc(17,Ki,11,8,"tr",11),t.qZA()()()()()()()),2&e&&(t.xp6(17),t.Q6J("ngForOf",o.pricebooks))},directives:[c.sg],pipes:[c.JJ],styles:[""]}),n})();function Gi(n,i){1&n&&(t.TgZ(0,"th",11),t._uU(1,"Cost"),t.qZA())}function zi(n,i){1&n&&(t.TgZ(0,"th",12),t._uU(1,"Cost Disc."),t.qZA())}function Xi(n,i){if(1&n&&(t.TgZ(0,"td"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu("Rp "+t.lcZ(2,1,e.UnitCost))}}function tr(n,i){if(1&n&&(t.TgZ(0,"td"),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.CostDiscount)+"%")}}function er(n,i){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.ALo(5,"number"),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.ALo(8,"number"),t.qZA(),t.YNc(9,Xi,3,3,"td",14),t.YNc(10,tr,3,3,"td",14),t.TgZ(11,"td"),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"td"),t._uU(15),t.ALo(16,"number"),t.qZA()()),2&n){const e=i.$implicit,o=t.oxw();t.xp6(2),t.Oqu(e.PromotionName),t.xp6(2),t.Oqu(e.MinimumQty>0?t.lcZ(5,7,e.MinimumQty):"-"),t.xp6(3),t.Oqu(e.MinimumAmount>0?"Rp "+t.lcZ(8,9,e.MinimumAmount):"-"),t.xp6(2),t.Q6J("ngIf",o.costRole),t.xp6(1),t.Q6J("ngIf",o.costRole),t.xp6(2),t.Oqu("Rp "+t.lcZ(13,11,e.UnitPrice)),t.xp6(3),t.Oqu(t.lcZ(16,13,e.Discount)+"%")}}let nr=(()=>{class n{constructor(){}ngOnInit(){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-nav-promotion"]],inputs:{promotions:"promotions",costRole:"costRole"},decls:22,vars:3,consts:[[1,"card","border-top-0"],[1,"card-body"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],[1,"table","table-bordered","custom-table"],[1,"table-light"],[1,"border-end"],["width","120px",1,"border-end"],["class","border-end","width","100px",4,"ngIf"],["class","border-end","width","50px",4,"ngIf"],["width","100px",1,"border-end"],["width","50px",1,"border-end"],[4,"ngFor","ngForOf"],[4,"ngIf"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"table",5)(6,"thead")(7,"tr",6)(8,"th",7),t._uU(9,"Name"),t.qZA(),t.TgZ(10,"th",8),t._uU(11,"Minimum Quantity"),t.qZA(),t.TgZ(12,"th",8),t._uU(13,"Minimum Amount"),t.qZA(),t.YNc(14,Gi,2,0,"th",9),t.YNc(15,zi,2,0,"th",10),t.TgZ(16,"th",11),t._uU(17,"Unit Price"),t.qZA(),t.TgZ(18,"th",12),t._uU(19,"Unit Disc."),t.qZA()()(),t.TgZ(20,"tbody"),t.YNc(21,er,17,15,"tr",13),t.qZA()()()()()()()),2&e&&(t.xp6(14),t.Q6J("ngIf",o.costRole),t.xp6(1),t.Q6J("ngIf",o.costRole),t.xp6(6),t.Q6J("ngForOf",o.promotions))},directives:[c.O5,c.sg],pipes:[c.JJ],styles:[""]}),n})(),or=(()=>{class n{constructor(){}ngOnInit(){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-nav-purchase"]],inputs:{variant:"variant"},decls:8,vars:1,consts:[[1,"card","border-top-0"],[1,"card-body"],[1,"row"],[1,"col-sm-4"],[1,"form-floating-outline"],["type","text","id","expense","placeholder","Unit Expense","name","Unit Expense","readonly","",1,"form-control",3,"ngModel"],["for","expense"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"input",5),t.TgZ(6,"label",6),t._uU(7,"Unit Expense"),t.qZA()()()()()()),2&e&&(t.xp6(5),t.Q6J("ngModel",null==o.variant?null:o.variant.UnitExpense))},directives:[s.Fj,s.JJ,s.On],styles:[""]}),n})();function ar(n,i){if(1&n&&(t.TgZ(0,"div",5)(1,"div",6),t._UZ(2,"input",7),t.ALo(3,"number"),t.TgZ(4,"label",8),t._uU(5,"Commission"),t.qZA()()()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",t.lcZ(3,1,null==e.variant?null:e.variant.SalesCommission))}}function ir(n,i){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",15),t._uU(4),t.ALo(5,"number"),t.qZA()()),2&n){const e=i.$implicit;t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(t.lcZ(5,2,e.Amount))}}function rr(n,i){if(1&n&&(t.TgZ(0,"div",9)(1,"table",10)(2,"thead")(3,"tr",11)(4,"th",12),t._uU(5,"Name"),t.qZA(),t.TgZ(6,"th",13),t._uU(7,"Comission"),t.qZA()()(),t.TgZ(8,"tbody"),t.YNc(9,ir,6,4,"tr",14),t.qZA()()()),2&n){const e=t.oxw();t.xp6(9),t.Q6J("ngForOf",e.commisions)}}let lr=(()=>{class n{constructor(){}ngOnChanges(){this.variantInfoModel&&(this.commisions=this.variantInfoModel.Data.Commission,this.variant=this.variantInfoModel.Data.Variant)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-nav-commision"]],inputs:{variantInfoModel:"variantInfoModel"},features:[t.TTD],decls:7,vars:2,consts:[[1,"card","border-top-0"],[1,"card-body"],[1,"row"],["class","col-sm-4",4,"ngIf"],["class","col-sm-12",4,"ngIf"],[1,"col-sm-4"],[1,"form-floating-outline"],["type","text","id","commision","placeholder","Commission","name","Commission","readonly","",1,"form-control",3,"ngModel"],["for","commision"],[1,"col-sm-12"],[1,"table","table-bordered","custom-table"],[1,"table-light"],[1,"border-end"],[1,"border-end","text-end",2,"width","120px"],[4,"ngFor","ngForOf"],[1,"text-end"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,ar,6,3,"div",3),t.qZA(),t.TgZ(5,"div",2),t.YNc(6,rr,10,1,"div",4),t.qZA()()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",0!==(null==o.variant?null:o.variant.SalesCommission)),t.xp6(2),t.Q6J("ngIf",0!==(null==o.commisions?null:o.commisions.length)))},directives:[c.O5,s.Fj,s.JJ,s.On,c.sg],pipes:[c.JJ],styles:[""]}),n})();function cr(n,i){if(1&n&&(t.TgZ(0,"div",3)(1,"div",4),t._UZ(2,"input",12),t.TgZ(3,"label",13),t._uU(4,"UOM Sub Quantity"),t.qZA()()()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",null==e.categoryMeasurement?null:e.categoryMeasurement.UOMQ)}}function sr(n,i){if(1&n&&(t.TgZ(0,"div",3)(1,"div",4),t._UZ(2,"input",14),t.TgZ(3,"label",15),t._uU(4,"Measurements"),t.qZA()()()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",null==e.categoryMeasurement?null:e.categoryMeasurement.Measurement)}}function pr(n,i){if(1&n&&(t.TgZ(0,"div",3)(1,"div",4),t._UZ(2,"input",16),t.TgZ(3,"label",17),t._uU(4,"Sell Price Type"),t.qZA()()()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.variant.SellPriceTypeString)}}let dr=(()=>{class n{constructor(){}ngOnChanges(){this.variantInfoModel&&(this.variant=this.variantInfoModel.Data.Variant,this.categoryMeasurement=this.variantInfoModel.Data.CategoryMeasurement)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-nav-advanced"]],inputs:{variantInfoModel:"variantInfoModel"},features:[t.TTD],decls:22,vars:6,consts:[[1,"card","border-top-0"],[1,"card-body"],[1,"row"],[1,"col-sm-4"],[1,"form-floating-outline"],["type","text","id","unitQty","placeholder","Content","name","Content","readonly","",1,"bg-white","form-control",3,"ngModel"],["for","unitQty"],["type","text","id","index","placeholder","Index","name","Index","readonly","",1,"bg-white","form-control",3,"ngModel"],["for","index"],["type","text","id","size","placeholder","Pack Size","name","Pack Size","readonly","",1,"bg-white","form-control",3,"ngModel"],["for","size"],["class","col-sm-4",4,"ngIf"],["type","text","id","uomSub","placeholder","UOM Sub Quantity","name","UOM Sub Quantity","readonly","",1,"bg-white","form-control",3,"ngModel"],["for","uomSub"],["type","text","id","measurement","placeholder","Measurements","name","Measurements","readonly","",1,"bg-white","form-control",3,"ngModel"],["for","measurement"],["type","text","id","sellPrice","placeholder","Sell Price Type","name","Sell Price Type","readonly","",1,"bg-white","form-control",3,"ngModel"],["for","sellPrice"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"input",5),t.TgZ(6,"label",6),t._uU(7,"Content"),t.qZA()()(),t.TgZ(8,"div",3)(9,"div",4),t._UZ(10,"input",7),t.TgZ(11,"label",8),t._uU(12,"Index"),t.qZA()()(),t.TgZ(13,"div",3)(14,"div",4),t._UZ(15,"input",9),t.TgZ(16,"label",10),t._uU(17,"Pack Size"),t.qZA()()()(),t.TgZ(18,"div",2),t.YNc(19,cr,5,1,"div",11),t.YNc(20,sr,5,1,"div",11),t.YNc(21,pr,5,1,"div",11),t.qZA()()()),2&e&&(t.xp6(5),t.Q6J("ngModel",o.variant.UnitQuantity),t.xp6(5),t.Q6J("ngModel",o.variant.ProductIndex),t.xp6(5),t.Q6J("ngModel",o.variant.PackSize),t.xp6(4),t.Q6J("ngIf",null==o.categoryMeasurement?null:o.categoryMeasurement.UOMQ),t.xp6(1),t.Q6J("ngIf",null==o.categoryMeasurement?null:o.categoryMeasurement.Measurement),t.xp6(1),t.Q6J("ngIf",2==o.variant.TypeID))},directives:[s.Fj,s.JJ,s.On,c.O5],styles:[""]}),n})(),ur=(()=>{class n{constructor(){}ngOnInit(){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-nav-description"]],inputs:{variant:"variant"},decls:8,vars:1,consts:[[1,"card","border-top-0"],[1,"card-body"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],["type","text","id","desc","placeholder","Description","name","Description","readonly","",1,"form-control",3,"value"],["for","desc"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"input",5),t.TgZ(6,"label",6),t._uU(7,"Description"),t.qZA()()()()()()),2&e&&(t.xp6(5),t.Q6J("value",o.variant.Description))},styles:[""]}),n})(),_r=(()=>{class n{constructor(){}ngOnInit(){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-nav-multiuom"]],inputs:{variantParent:"variantParent",variant:"variant"},decls:26,vars:3,consts:[[1,"card","border-top-0"],[1,"card-body"],[1,"col-sm-12"],[1,"row"],[1,"float-none","col-sm-2"],[1,"col-sm-4","ps-1"],[1,"form-floating-outline"],["type","text","id","parent","placeholder","Parent","name","Parent","readonly","",1,"form-control",3,"ngModel"],["for","parent"],[1,"col-sm-auto","ms-0",2,"width","40px"],[1,"text-start"],[1,"col-sm-3"],["type","text","id","ratio","placeholder","Ratio","name","Ratio","readonly","",1,"form-control",3,"ngModel"],["for","ratio"],[1,"col-sm-auto"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t._UZ(5,"br"),t.TgZ(6,"h3"),t._uU(7,"1 (one)"),t.qZA()(),t.TgZ(8,"div",5)(9,"div",6),t._UZ(10,"input",7),t.TgZ(11,"label",8),t._uU(12,"Parent"),t.qZA()()(),t.TgZ(13,"div",9),t._UZ(14,"br"),t.TgZ(15,"h3",10),t._uU(16," = "),t.qZA()(),t.TgZ(17,"div",11)(18,"div",6),t._UZ(19,"input",12),t.TgZ(20,"label",13),t._uU(21,"Ratio"),t.qZA()()(),t.TgZ(22,"div",14),t._UZ(23,"br"),t.TgZ(24,"h3",10),t._uU(25),t.qZA()()()()()()),2&e&&(t.xp6(10),t.Q6J("ngModel",null==o.variantParent?null:o.variantParent.ParentName),t.xp6(9),t.Q6J("ngModel",null==o.variantParent?null:o.variantParent.Ratio),t.xp6(6),t.Oqu(null==o.variant?null:o.variant.Model))},directives:[s.Fj,s.JJ,s.On],styles:[""]}),n})();var mr=u(19835);function gr(n,i){1&n&&(t.TgZ(0,"span"),t._uU(1,"Direct"),t.qZA())}function fr(n,i){1&n&&(t.TgZ(0,"th",19)(1,"span",20),t._uU(2,"Indirect Allocated"),t.qZA()())}function hr(n,i){if(1&n&&(t.TgZ(0,"td",17),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.IndirectAllocated)}}const xr=function(){return["/menu/Fulfillment/Allocated/Unfulfilled_Products"]},Cr=function(n){return{VariantID:n}};function vr(n,i){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",17),t._uU(4),t.qZA(),t.TgZ(5,"td",21)(6,"a",22),t._uU(7),t.ALo(8,"number"),t.qZA()(),t.YNc(9,hr,2,1,"td",18),t.TgZ(10,"td",17),t._uU(11),t.qZA()()),2&n){const e=i.$implicit,o=t.oxw();t.xp6(2),t.Oqu(e.Outlet),t.xp6(2),t.Oqu(e.OnHand),t.xp6(2),t.Q6J("routerLink",t.DdM(9,xr))("queryParams",t.VKq(10,Cr,o.variantID)),t.xp6(1),t.hij(" ",t.lcZ(8,7,e.Allocated),""),t.xp6(2),t.Q6J("ngIf",o.TotalIndirect>0),t.xp6(2),t.Oqu(e.Available)}}function Tr(n,i){if(1&n&&(t.TgZ(0,"td",17),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.totalCompositeInventory.IndirectAllocated)}}let Zr=(()=>{class n{constructor(){this.TotalIndirect=0}ngOnInit(){for(let e of this.compositeInventories)this.TotalIndirect+=e.IndirectAllocated}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-nav-composite-inventory"]],inputs:{compositeInventories:"compositeInventories",variantID:"variantID",totalCompositeInventory:"totalCompositeInventory"},decls:33,vars:11,consts:[[1,"card","border-top-0"],[1,"card-body"],[1,"row"],[1,"col-sm-12"],[1,"table","table-bordered","custom-table"],[1,"table-secondary"],[1,"border-end"],["ng-click","compositeSortDirec = !compositeSortDirec",1,"border-end","text-end",2,"width","100px"],[1,"pointer"],[1,"fa-solid","fa-sort"],["matTooltip","Allocated that associate directly with the product","matTooltipPosition","above",1,"border-end","pointer","text-end",2,"width","100px"],["customTooltip","Allocated that associate directly with the product","position","top"],[4,"ngIf"],["class","border-end text-end pointer","style","width:100px",4,"ngIf"],[1,"border-end","text-end",2,"width","100px"],[4,"ngFor","ngForOf"],["colspan","1"],[1,"text-end"],["class","text-end",4,"ngIf"],[1,"border-end","text-end","pointer",2,"width","100px"],["customTooltip","Allocated that associate indirectly with the product (either its parent, or its component)","position","top"],[1,"text-end","border-bottom"],["target","_blank",3,"routerLink","queryParams"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"table",4)(5,"thead")(6,"tr",5)(7,"th",6),t._uU(8,"Outlet"),t.qZA(),t.TgZ(9,"th",7),t._uU(10," On Hand "),t.TgZ(11,"span",8),t._UZ(12,"i",9),t.qZA()(),t.TgZ(13,"th",10)(14,"div",11),t.YNc(15,gr,2,0,"span",12),t._uU(16," Allocated "),t.qZA()(),t.YNc(17,fr,3,0,"th",13),t.TgZ(18,"th",14),t._uU(19," Available "),t.qZA()()(),t.TgZ(20,"tbody"),t.YNc(21,vr,12,12,"tr",15),t.ALo(22,"sortBy"),t.qZA(),t.TgZ(23,"tfoot")(24,"tr"),t._UZ(25,"td",16),t.TgZ(26,"td",17),t._uU(27),t.qZA(),t.TgZ(28,"td",17),t._uU(29),t.qZA(),t.YNc(30,Tr,2,1,"td",18),t.TgZ(31,"td",17),t._uU(32),t.qZA()()()()()()()()),2&e&&(t.xp6(15),t.Q6J("ngIf",o.TotalIndirect>0),t.xp6(2),t.Q6J("ngIf",o.TotalIndirect>0),t.xp6(4),t.Q6J("ngForOf",t.Dn7(22,7,o.compositeInventories,"desc","OnHand")),t.xp6(6),t.hij(" ",o.totalCompositeInventory.OnHand," "),t.xp6(2),t.hij(" ",o.totalCompositeInventory.Allocated," "),t.xp6(1),t.Q6J("ngIf",o.TotalIndirect>0),t.xp6(2),t.hij(" ",o.totalCompositeInventory.Available," "))},directives:[F.gM,mr.i,c.O5,c.sg,l.yS],pipes:[w.W7,c.JJ],styles:[""]}),n})();const br=function(n){return{ID:n}};function yr(n,i){if(1&n&&(t.TgZ(0,"tr")(1,"td")(2,"a",9),t._uU(3),t.qZA()(),t.TgZ(4,"td",10),t._uU(5),t.ALo(6,"number"),t.qZA()()),2&n){const e=i.$implicit;t.xp6(2),t.Q6J("queryParams",t.VKq(5,br,e.ID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(t.lcZ(6,3,e.Quantity))}}let Ir=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-nav-dependency-of"]],inputs:{dependencyOf:"dependencyOf"},decls:13,vars:1,consts:[[1,"card","border-top-0"],[1,"card-body"],[1,"row"],[1,"col-sm-12"],[1,"table","table-bordered","custom-table"],[1,"table-light"],[1,"border-end"],[1,"border-end","text-end",2,"width","80px"],[4,"ngFor","ngForOf"],["routerLink","/menu/Products/Catalog/Variants/Info",1,"link",2,"cursor","pointer",3,"queryParams"],[1,"text-end"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"table",4)(5,"thead")(6,"tr",5)(7,"th",6),t._uU(8,"Variant"),t.qZA(),t.TgZ(9,"th",7),t._uU(10,"Quantity"),t.qZA()()(),t.TgZ(11,"tbody"),t.YNc(12,yr,7,7,"tr",8),t.qZA()()()()()()),2&e&&(t.xp6(12),t.Q6J("ngForOf",o.dependencyOf))},directives:[c.sg,l.yS],pipes:[c.JJ],styles:["a[_ngcontent-%COMP%] {\n color: #0976b4;\n text-decoration: none;\n background-color: transparent;\n}"]}),n})();function Mr(n,i){1&n&&(t.TgZ(0,"div",1)(1,"div",2)(2,"p"),t._uU(3," This variant type does not have an inventory "),t.qZA()()())}function Pr(n,i){1&n&&(t.TgZ(0,"span"),t._uU(1,"Direct"),t.qZA())}function Dr(n,i){1&n&&(t.TgZ(0,"th",11),t._uU(1,"Indirect Allocated"),t.qZA())}function Ar(n,i){1&n&&(t.TgZ(0,"th",22),t._uU(1,"ROP"),t.qZA())}function Nr(n,i){1&n&&(t.TgZ(0,"th",23),t._uU(1,"Max"),t.qZA())}function qr(n,i){1&n&&(t.TgZ(0,"th"),t._uU(1,"Serial"),t.qZA())}function wr(n,i){1&n&&t._UZ(0,"th")}function Sr(n,i){if(1&n&&(t.TgZ(0,"td",27),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.IndirectAllocated)," ")}}function Ur(n,i){if(1&n&&(t.TgZ(0,"td",31),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.Q6J("ngClass",e.MinStock>=e.UnitsInStock&&0!=e.MinStock?"bg-gradient-warning":""),t.xp6(1),t.hij(" ",t.lcZ(2,2,e.MinStock),"")}}function Or(n,i){if(1&n&&(t.TgZ(0,"td",32),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.Q6J("ngClass",e.MaxStock>=e.UnitsInStock&&0!=e.MaxStock?"bg-gradient-warning":""),t.xp6(1),t.hij(" ",t.lcZ(2,2,e.MaxStock),"")}}function Jr(n,i){if(1&n&&(t.TgZ(0,"li",35),t._uU(1),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.hij(" ",e," ")}}function Vr(n,i){if(1&n&&(t.TgZ(0,"td")(1,"ul",33),t.YNc(2,Jr,2,1,"li",34),t.qZA()()),2&n){const e=t.oxw().$implicit;t.xp6(2),t.Q6J("ngForOf",e.SerialNumber)}}const kr=function(){return["/menu/Products/Catalog/Variants/Serial_Form"]},Fr=function(n,i){return{VariantID:n,EntityID:i}};function Qr(n,i){if(1&n&&(t.TgZ(0,"td")(1,"a",26),t._UZ(2,"i",36),t.qZA()()),2&n){const e=t.oxw().$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("routerLink",t.DdM(2,kr))("queryParams",t.WLB(3,Fr,o.variant.ID,e.EntityID))}}const Lr=function(){return["/menu/Products/Catalog/Variants/Log"]},Hr=function(n,i){return{ID:n,EntityID:i}},ue=function(){return["/menu/Fulfillment/Allocated/Unfulfilled_Products"]},Er=function(n,i){return{VariantID:n,OutletID:i}};function Yr(n,i){if(1&n&&(t.TgZ(0,"tr")(1,"td",24),t._uU(2),t.qZA(),t.TgZ(3,"td",25)(4,"a",26),t._uU(5),t.ALo(6,"number"),t.qZA()(),t.TgZ(7,"td",27)(8,"a",20),t._uU(9),t.ALo(10,"number"),t.qZA()(),t.YNc(11,Sr,3,3,"td",28),t.TgZ(12,"td",27),t._uU(13),t.ALo(14,"number"),t.qZA(),t.YNc(15,Ur,3,4,"td",29),t.ALo(16,"sum"),t.YNc(17,Or,3,4,"td",30),t.ALo(18,"sum"),t.YNc(19,Vr,3,1,"td",12),t.YNc(20,Qr,3,6,"td",12),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.EntityGroupName),t.xp6(1),t.Q6J("ngClass",e.MinStock>=e.UnitsInStock&&0!=e.MinStock?"bg-gradient-warning":""),t.xp6(1),t.Q6J("routerLink",t.DdM(26,Lr))("queryParams",t.WLB(27,Hr,o.variant.ID,e.EntityID)),t.xp6(1),t.hij(" ",t.lcZ(6,14,e.UnitsInStock),""),t.xp6(3),t.Q6J("routerLink",t.DdM(30,ue))("queryParams",t.WLB(31,Er,o.variant.ID,e.EntityID)),t.xp6(1),t.hij(" ",t.lcZ(10,16,e.Allocated),""),t.xp6(2),t.Q6J("ngIf",o.totalAllocatedIndrection>0),t.xp6(2),t.hij(" ",t.lcZ(14,18,e.Available)," "),t.xp6(2),t.Q6J("ngIf",0!=t.xi3(16,20,o.entityStock,"MinStock")),t.xp6(2),t.Q6J("ngIf",0!=t.xi3(18,23,o.entityStock,"MaxStock")),t.xp6(2),t.Q6J("ngIf",o.role.IsSerialNumber),t.xp6(1),t.Q6J("ngIf",o.role.IsSerialNumber)}}function Rr(n,i){if(1&n&&(t.TgZ(0,"td",19),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.entityStock,"IndirectAllocated"))," ")}}function Br(n,i){if(1&n&&(t.TgZ(0,"td",19),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.entityStock,"Available"))," ")}}function $r(n,i){if(1&n&&(t.TgZ(0,"td",19),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.entityStock,"MinStock"))," ")}}function jr(n,i){if(1&n&&(t.TgZ(0,"td",19),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.entityStock,"MaxStock"))," ")}}const Kr=function(n){return{VariantID:n}};function Wr(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6)(6,"table",7),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),t.TgZ(7,"thead",8)(8,"tr",9)(9,"th"),t._uU(10," Group "),t.qZA(),t.TgZ(11,"th",10),t._uU(12," On Hand "),t.qZA(),t.TgZ(13,"th",11),t.YNc(14,Pr,2,0,"span",12),t._uU(15," Allocated"),t.qZA(),t.YNc(16,Dr,2,0,"th",13),t.TgZ(17,"th",14),t._uU(18,"Available "),t.qZA(),t.YNc(19,Ar,2,0,"th",15),t.ALo(20,"sum"),t.YNc(21,Nr,2,0,"th",16),t.ALo(22,"sum"),t.YNc(23,qr,2,0,"th",12),t.YNc(24,wr,1,0,"th",12),t.qZA()(),t.TgZ(25,"tbody"),t.YNc(26,Yr,21,34,"tr",17),t.qZA(),t.TgZ(27,"tfoot")(28,"tr"),t._UZ(29,"td",18),t.TgZ(30,"td",19),t._uU(31),t.ALo(32,"number"),t.ALo(33,"sum"),t.qZA(),t.TgZ(34,"td",19)(35,"a",20),t._uU(36),t.ALo(37,"number"),t.ALo(38,"sum"),t.qZA()(),t.YNc(39,Rr,4,6,"td",21),t.YNc(40,Br,4,6,"td",21),t.ALo(41,"sum"),t.YNc(42,$r,4,6,"td",21),t.ALo(43,"sum"),t.YNc(44,jr,4,6,"td",21),t.ALo(45,"sum"),t.qZA()()()()()()()()()}if(2&n){const e=t.oxw();t.xp6(14),t.Q6J("ngIf",e.totalAllocatedIndrection>0),t.xp6(2),t.Q6J("ngIf",e.totalAllocatedIndrection>0),t.xp6(3),t.Q6J("ngIf",0!=t.xi3(20,15,e.entityStock,"MinStock")),t.xp6(2),t.Q6J("ngIf",0!=t.xi3(22,18,e.entityStock,"MaxStock")),t.xp6(2),t.Q6J("ngIf",e.role.IsSerialNumber),t.xp6(1),t.Q6J("ngIf",e.role.IsSerialNumber),t.xp6(2),t.Q6J("ngForOf",e.entityStock),t.xp6(5),t.hij(" ",t.lcZ(32,21,t.xi3(33,23,e.entityStock,"UnitsInStock"))," "),t.xp6(4),t.Q6J("routerLink",t.DdM(40,ue))("queryParams",t.VKq(41,Kr,e.variant.ID)),t.xp6(1),t.hij(" ",t.lcZ(37,26,t.xi3(38,28,e.entityStock,"Allocated")),""),t.xp6(3),t.Q6J("ngIf",e.totalAllocatedIndrection>0),t.xp6(1),t.Q6J("ngIf",0!==t.xi3(41,31,e.entityStock,"Available")),t.xp6(2),t.Q6J("ngIf",0!==t.xi3(43,34,e.entityStock,"MinStock")),t.xp6(2),t.Q6J("ngIf",0!==t.xi3(45,37,e.entityStock,"MaxStock"))}}let Gr=(()=>{class n{constructor(){this.totalAllocatedIndrection=0}ngOnInit(){for(let e of this.entityStock)this.totalAllocatedIndrection+=e.IndirectAllocated}ngOnChanges(){this.variantInfoModel&&(this.variantParent=this.variantInfoModel.Data.VariantParent,this.variant=this.variantInfoModel.Data.Variant,this.role=this.variantInfoModel.Roles,this.entityStock=this.variantInfoModel.Data.EntityStockGroup,this.originalStock=this.entityStock)}sortData(e){const o=this.entityStock.slice();this.entityStock=e.active&&""!==e.direction?o.sort((a,r)=>this.compare(a[e.active],r[e.active],"asc"===e.direction)):this.originalStock}compare(e,o,a){return(e<o?-1:1)*(a?1:-1)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-nav-group-inventory"]],inputs:{variantInfoModel:"variantInfoModel"},features:[t.TTD],decls:2,vars:2,consts:[["class","card border-top-0",4,"ngIf"],[1,"card","border-top-0"],[1,"card-body"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],[1,"content"],["matSort","",1,"table","custom-table","mt-5",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"table-secondary"],["mat-sort-header","UnitsInStock","title","How many you have in your warehouse right now",1,"text-end","border-end",2,"width","100px"],["title","How many have been Allocated, but not shipped out yet",1,"text-end",2,"width","100px"],[4,"ngIf"],["class","text-end","title","How many have been Allocated, but not shipped out yet","style","width:100px",4,"ngIf"],["title","How many can be purchased by customers",1,"text-end",2,"width","100px"],["class","text-end","title","ROP Inventory for this outlet before it gets re-alerted","style","width:70px",4,"ngIf"],["class","text-end","title","Max Inventory that this outlet should have","style","width:70px",4,"ngIf"],[4,"ngFor","ngForOf"],["colspan","1"],[1,"text-end","border-end"],["target","_blank",3,"routerLink","queryParams"],["class","text-end border-end",4,"ngIf"],["title","ROP Inventory for this outlet before it gets re-alerted",1,"text-end",2,"width","70px"],["title","Max Inventory that this outlet should have",1,"text-end",2,"width","70px"],[2,"vertical-align","middle"],[1,"text-end","border-end",2,"vertical-align","middle",3,"ngClass"],[3,"routerLink","queryParams"],[1,"text-end","border-bottom"],["class","text-end border-bottom",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],["class","text-end bg-warning",3,"ngClass",4,"ngIf"],[1,"text-end",3,"ngClass"],[1,"text-end","bg-warning",3,"ngClass"],[1,"list-inline"],["class","float-left mr-7",4,"ngFor","ngForOf"],[1,"float-left","mr-7"],["aria-hidden","true",1,"fa","fa-barcode","fa-lg"]],template:function(e,o){1&e&&(t.YNc(0,Mr,4,0,"div",0),t.YNc(1,Wr,46,43,"div",0)),2&e&&(t.Q6J("ngIf",!(o.variantParent&&o.variantParent.Ratio>0||o.role.IsMultipleOUM||o.role.IsSerialNumber||1==o.variant.TypeID||6==o.variant.TypeID||5==o.variant.TypeID)),t.xp6(1),t.Q6J("ngIf",o.variantParent&&o.variantParent.Ratio>0||o.role.IsMultipleOUM||o.role.IsSerialNumber||1==o.variant.TypeID||6==o.variant.TypeID||5==o.variant.TypeID))},directives:[c.O5,$.YE,$.nU,c.sg,c.mk,l.yS],pipes:[w.qU,c.JJ],styles:[""]}),n})();function zr(n,i){1&n&&(t.TgZ(0,"li",2)(1,"button",23),t._uU(2,"Inventory"),t.qZA()())}function Xr(n,i){1&n&&(t.TgZ(0,"li",2)(1,"button",24),t._uU(2,"Component"),t.qZA()())}function tl(n,i){1&n&&(t.TgZ(0,"li",2)(1,"button",25),t._uU(2,"Outlet Price"),t.qZA()())}function el(n,i){1&n&&(t.TgZ(0,"li",2)(1,"button",26),t._uU(2,"Pricebook"),t.qZA()())}function nl(n,i){1&n&&(t.TgZ(0,"li",2)(1,"button",27),t._uU(2,"Promotion"),t.qZA()())}function ol(n,i){1&n&&(t.TgZ(0,"li",2)(1,"button",28),t._uU(2,"Purchase"),t.qZA()())}function al(n,i){1&n&&(t.TgZ(0,"li",2)(1,"button",29),t._uU(2,"Description"),t.qZA()())}function il(n,i){1&n&&(t.TgZ(0,"li",2)(1,"button",30),t._uU(2,"Commission"),t.qZA()())}function rl(n,i){1&n&&(t.TgZ(0,"li",2)(1,"button",31),t._uU(2,"MultiUOM"),t.qZA()())}function ll(n,i){1&n&&(t.TgZ(0,"li",2)(1,"button",32),t._uU(2,"Composite Inventory"),t.qZA()())}function cl(n,i){1&n&&(t.TgZ(0,"li",2)(1,"button",33),t._uU(2,"Dependency Of"),t.qZA()())}function sl(n,i){1&n&&(t.TgZ(0,"li",2)(1,"button",34),t._uU(2,"Group"),t.qZA()())}function pl(n,i){if(1&n&&(t.TgZ(0,"div",35),t._UZ(1,"POS-info-variant-nav-inventory",8),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("variantInfoModel",e.data)}}function dl(n,i){if(1&n&&(t.TgZ(0,"div",36),t._UZ(1,"POS-info-variant-nav-component",37),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("composites",e.composites)("role",e.role)("currencies",e.currencies)}}function ul(n,i){1&n&&(t.TgZ(0,"div",38),t._UZ(1,"POS-info-variant-nav-purchase"),t.qZA())}function _l(n,i){if(1&n&&(t.TgZ(0,"div",39),t._UZ(1,"POS-info-variant-nav-multiuom",40),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("variant",e.variant)("variantParent",e.variantParent)}}function ml(n,i){if(1&n&&(t.TgZ(0,"div",41),t._UZ(1,"POS-info-variant-nav-composite-inventory",42),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("totalCompositeInventory",e.totalCompositeInventory)("compositeInventories",e.compositeInventories)("variantID",null==e.data||null==e.data.Data||null==e.data.Data.Variant?null:e.data.Data.Variant.ID)}}function gl(n,i){if(1&n&&(t.TgZ(0,"div",43),t._UZ(1,"POS-info-variant-nav-group-inventory",8),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("variantInfoModel",e.data)}}let fl=(()=>{class n{constructor(){this.promotions=[],this.dependencyOf=[],this.composites=[],this.variantType=qt.J,this.outletPrices=[],this.pricebooks=[],this.commisions=[],this.compositeInventories=[]}ngAfterViewInit(){document.querySelector(".inventory-nav-tab .nav-link").classList.add("active");const o=document.querySelector(".inventory-content.tab-content .tab-pane");o.classList.add("show"),o.classList.add("active")}ngOnChanges(){this.data.Data&&(this.outletPrices=this.data.Data.OutletPrice,this.commisions=this.data.Data.Commission,this.pricebooks=this.data.Data.Pricebook,this.promotions=this.data.Data.Promotion,this.compositeInventories=this.data.Data.CompositeInventory,this.dependencyOf=this.data.Data.DependencyOf,this.composites=this.data.Data.Composites,this.variant=this.data.Data.Variant,this.variantParent=this.data.Data.VariantParent,this.role=this.data.Roles,this.currencies=this.data.Data.Currencies,this.totalCompositeInventory=this.data.Data.TotalCompositeInventory)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-nav"]],inputs:{data:"data"},features:[t.TTD],decls:37,vars:26,consts:[["id","myTab","role","tablist",1,"nav","nav-tabs","inventory-nav-tab"],["class","nav-item",4,"ngIf"],[1,"nav-item"],["id","advance-tab","data-bs-toggle","tab","data-bs-target","#advance","role","tab","aria-controls","advance","aria-selected","false",1,"nav-link"],["id","myTabContent",1,"inventory-content","tab-content"],["class","tab-pane fade show active mt-0 pt-0","id","inventory","role","tabpanel",4,"ngIf"],["class","tab-pane fade mt-0 pt-0","id","component","role","tabpanel",4,"ngIf"],["id","price","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[3,"variantInfoModel"],["id","pricebook","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[3,"pricebooks"],["id","promotion","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[3,"costRole","promotions"],["class","tab-pane fade mt-0 pt-0","id","purchase","role","tabpanel",4,"ngIf"],["id","commission","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],["id","advance","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],["id","description","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[3,"variant"],["class","tab-pane fade mt-0 pt-0","id","multiuom","role","tabpanel",4,"ngIf"],["class","tab-pane fade mt-0 pt-0","id","composite-inventory","role","tabpanel",4,"ngIf"],["id","dependency-of","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[3,"dependencyOf"],["class","tab-pane fade mt-0 pt-0","id","group-inventory","role","tabpanel",4,"ngIf"],["id","inventory-tab","data-bs-toggle","tab","data-bs-target","#inventory","role","tab","aria-controls","inventory","aria-selected","false",1,"nav-link","active"],["id","component-tab","data-bs-toggle","tab","data-bs-target","#component","role","tab","aria-controls","component","aria-selected","false",1,"nav-link"],["id","price-tab","data-bs-toggle","tab","data-bs-target","#price","role","tab","aria-controls","price","aria-selected","false",1,"nav-link"],["id","pricebook-tab","data-bs-toggle","tab","data-bs-target","#pricebook","role","tab","aria-controls","pricebook","aria-selected","false",1,"nav-link"],["id","promotion-tab","data-bs-toggle","tab","data-bs-target","#promotion","role","tab","aria-controls","promotion","aria-selected","false",1,"nav-link"],["id","purchase-tab","data-bs-toggle","tab","data-bs-target","#purchase","role","tab","aria-controls","purchase","aria-selected","false",1,"nav-link"],["id","description-tab","data-bs-toggle","tab","data-bs-target","#description","role","tab","aria-controls","description","aria-selected","true",1,"nav-link"],["id","commission-tab","data-bs-toggle","tab","data-bs-target","#commission","role","tab","aria-controls","commission","aria-selected","false",1,"nav-link"],["id","multiuom-tab","data-bs-toggle","tab","data-bs-target","#multiuom","role","tab","aria-controls","multiuom","aria-selected","false",1,"nav-link"],["id","composite-inventory-tab","data-bs-toggle","tab","data-bs-target","#composite-inventory","role","tab","aria-controls","composite-inventory","aria-selected","false",1,"nav-link"],["id","dependency-of-tab","data-bs-toggle","tab","data-bs-target","#dependency-of","role","tab","aria-controls","dependency-of","aria-selected","false",1,"nav-link"],["id","group-inventory-tab","data-bs-toggle","tab","data-bs-target","#group-inventory","role","tab","aria-controls","group-inventory","aria-selected","false",1,"nav-link"],["id","inventory","role","tabpanel",1,"tab-pane","fade","show","active","mt-0","pt-0"],["id","component","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[3,"composites","role","currencies"],["id","purchase","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],["id","multiuom","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[3,"variant","variantParent"],["id","composite-inventory","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[3,"totalCompositeInventory","compositeInventories","variantID"],["id","group-inventory","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"]],template:function(e,o){1&e&&(t.TgZ(0,"ul",0),t.YNc(1,zr,3,0,"li",1),t.YNc(2,Xr,3,0,"li",1),t.YNc(3,tl,3,0,"li",1),t.YNc(4,el,3,0,"li",1),t.YNc(5,nl,3,0,"li",1),t.YNc(6,ol,3,0,"li",1),t.TgZ(7,"li",2)(8,"button",3),t._uU(9,"Advanced"),t.qZA()(),t.YNc(10,al,3,0,"li",1),t.YNc(11,il,3,0,"li",1),t.YNc(12,rl,3,0,"li",1),t.YNc(13,ll,3,0,"li",1),t.YNc(14,cl,3,0,"li",1),t.YNc(15,sl,3,0,"li",1),t.qZA(),t.TgZ(16,"div",4),t.YNc(17,pl,2,1,"div",5),t.YNc(18,dl,2,3,"div",6),t.TgZ(19,"div",7),t._UZ(20,"POS-info-variant-nav-outlet-price",8),t.qZA(),t.TgZ(21,"div",9),t._UZ(22,"POS-info-variant-nav-pricebook",10),t.qZA(),t.TgZ(23,"div",11),t._UZ(24,"POS-info-variant-nav-promotion",12),t.qZA(),t.YNc(25,ul,2,0,"div",13),t.TgZ(26,"div",14),t._UZ(27,"POS-info-variant-nav-commision",8),t.qZA(),t.TgZ(28,"div",15),t._UZ(29,"POS-info-variant-nav-advanced",8),t.qZA(),t.TgZ(30,"div",16),t._UZ(31,"POS-info-variant-nav-description",17),t.qZA(),t.YNc(32,_l,2,2,"div",18),t.YNc(33,ml,2,3,"div",19),t.TgZ(34,"div",20),t._UZ(35,"POS-info-variant-nav-dependency-of",21),t.qZA(),t.YNc(36,gl,2,1,"div",22),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",o.role.HasInventoryView),t.xp6(1),t.Q6J("ngIf",(null==o.composites?null:o.composites.length)>0),t.xp6(1),t.Q6J("ngIf",o.outletPrices.length>0),t.xp6(1),t.Q6J("ngIf",0!==o.pricebooks.length),t.xp6(1),t.Q6J("ngIf",0!==o.promotions.length),t.xp6(1),t.Q6J("ngIf",0!==(null==o.variant?null:o.variant.UnitExpense)),t.xp6(4),t.Q6J("ngIf",null==o.variant?null:o.variant.Description),t.xp6(1),t.Q6J("ngIf",0!=(null==o.variant?null:o.variant.SalesCommission)||0!==(null==o.commisions?null:o.commisions.length)),t.xp6(1),t.Q6J("ngIf",(null==o.variant?null:o.variant.TypeID)==o.variantType.MultipleUOM),t.xp6(1),t.Q6J("ngIf",(null==o.variant?null:o.variant.TypeID)===o.variantType.Composite),t.xp6(1),t.Q6J("ngIf",0!==o.dependencyOf.length),t.xp6(1),t.Q6J("ngIf",o.role.HasInventoryView),t.xp6(2),t.Q6J("ngIf",o.role.HasInventoryView),t.xp6(1),t.Q6J("ngIf",o.composites.length>0),t.xp6(2),t.Q6J("variantInfoModel",o.data),t.xp6(2),t.Q6J("pricebooks",o.pricebooks),t.xp6(2),t.Q6J("costRole",o.role.RoleCost)("promotions",o.promotions),t.xp6(1),t.Q6J("ngIf",(null==o.role?null:o.role.ExpenseRole)&&0!==(null==o.variant?null:o.variant.UnitExpense)),t.xp6(2),t.Q6J("variantInfoModel",o.data),t.xp6(2),t.Q6J("variantInfoModel",o.data),t.xp6(2),t.Q6J("variant",o.variant),t.xp6(1),t.Q6J("ngIf",(null==o.role?null:o.role.IsMultipleOUM)&&(null==o.variantParent?null:o.variantParent.ParentName)&&(null==o.variantParent?null:o.variantParent.Ratio)>0),t.xp6(1),t.Q6J("ngIf",(null==o.variant?null:o.variant.TypeID)===o.variantType.Composite),t.xp6(2),t.Q6J("dependencyOf",o.dependencyOf),t.xp6(1),t.Q6J("ngIf",o.role.HasInventoryView))},directives:[c.O5,Si,Hi,ji,Wi,nr,or,lr,dr,ur,_r,Zr,Ir,Gr],styles:[""]}),n})();function hl(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",10),t.NdJ("click",function(){return t.CHM(e),t.oxw().getSalesHistory()}),t._uU(1,"View"),t.qZA()}}const Cl=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold/Invoice_Items"]},vl=function(n){return{VariantID:n}};function Tl(n,i){if(1&n&&(t.TgZ(0,"a",11),t._uU(1,"more"),t.qZA()),2&n){const e=t.oxw();t.Q6J("routerLink",t.DdM(2,Cl))("queryParams",t.VKq(3,vl,null==e.variant?null:e.variant.ID))}}function Zl(n,i){1&n&&(t.TgZ(0,"th",18),t._uU(1,"Price"),t.qZA())}function bl(n,i){1&n&&(t.TgZ(0,"th",19),t._uU(1,"%"),t.qZA())}function yl(n,i){1&n&&(t.TgZ(0,"th",18),t._uU(1,"Net "),t.qZA())}function Il(n,i){if(1&n&&(t.TgZ(0,"td",18),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.Total),"")}}function Ml(n,i){if(1&n&&(t.TgZ(0,"td",18),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.Discount),"")}}function Pl(n,i){if(1&n&&(t.TgZ(0,"td",18),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.TotalAfterDiscount),"")}}const Dl=function(){return["/menu/Orders/Orders/Customer_Invoice/Info"]},Al=function(n){return{ID:n}};function Nl(n,i){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.ALo(3,"date"),t.qZA(),t.TgZ(4,"td")(5,"a",20),t._uU(6),t.qZA()(),t.TgZ(7,"td"),t._uU(8),t.ALo(9,"number"),t.qZA(),t.YNc(10,Il,3,3,"td",15),t.YNc(11,Ml,3,3,"td",15),t.YNc(12,Pl,3,3,"td",15),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(t.xi3(3,8,e.Date,"dd/MM/yy")),t.xp6(3),t.Q6J("routerLink",t.DdM(13,Dl))("queryParams",t.VKq(14,Al,e.InvoiceID)),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.Oqu(t.lcZ(9,11,e.Quantity)),t.xp6(2),t.Q6J("ngIf",!(null!=o.role&&o.role.UnitPriceRestriction)),t.xp6(1),t.Q6J("ngIf",!(null!=o.role&&o.role.UnitPriceRestriction)&&(null==o.salesHistory?null:o.salesHistory.DiscountCount)>0),t.xp6(1),t.Q6J("ngIf",!(null!=o.role&&o.role.UnitPriceRestriction)&&(null==o.salesHistory?null:o.salesHistory.DiscountCount)>0)}}function ql(n,i){if(1&n&&(t.TgZ(0,"div",12)(1,"table",13)(2,"thead")(3,"tr",14)(4,"th"),t._uU(5,"Date"),t.qZA(),t.TgZ(6,"th"),t._uU(7,"Invoice"),t.qZA(),t.TgZ(8,"th"),t._uU(9,"Qty"),t.qZA(),t.YNc(10,Zl,2,0,"th",15),t.YNc(11,bl,2,0,"th",16),t.YNc(12,yl,2,0,"th",15),t.qZA()(),t.TgZ(13,"tbody"),t.YNc(14,Nl,13,16,"tr",17),t.qZA()()()),2&n){const e=t.oxw();t.xp6(10),t.Q6J("ngIf",!(null!=e.role&&e.role.UnitPriceRestriction)),t.xp6(1),t.Q6J("ngIf",!(null!=e.role&&e.role.UnitPriceRestriction)&&(null==e.salesHistory?null:e.salesHistory.DiscountCount)>0),t.xp6(1),t.Q6J("ngIf",!(null!=e.role&&e.role.UnitPriceRestriction)&&(null==e.salesHistory?null:e.salesHistory.DiscountCount)>0),t.xp6(2),t.Q6J("ngForOf",null==e.salesHistory?null:e.salesHistory.Data)}}let wl=(()=>{class n{constructor(e){this.httpService=e}ngOnInit(){}getSalesHistory(){this.httpService.post("/Api/catalog/product/GetSalesHistory",this.variant).subscribe(e=>{this.salesHistory=e,this.salesHistoryRequested=!this.salesHistoryRequested})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-sales-history"]],inputs:{variant:"variant",role:"role"},decls:13,vars:3,consts:[[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"btn-group"],["class","btn btn-outline-secondary btn-sm",3,"click",4,"ngIf"],["class","btn btn-outline-secondary btn-sm","target","_blank",3,"routerLink","queryParams",4,"ngIf"],[1,"card-body"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],["class","content",4,"ngIf"],[1,"btn","btn-outline-secondary","btn-sm",3,"click"],["target","_blank",1,"btn","btn-outline-secondary","btn-sm",3,"routerLink","queryParams"],[1,"content"],[1,"table","mt-5"],[1,"table-light"],["class","text-end",4,"ngIf"],["style","width: 45px;","class","text-end",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"text-end"],[1,"text-end",2,"width","45px"],["target","_blank",3,"routerLink","queryParams"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),t._uU(4,"Sales History"),t.qZA()(),t.TgZ(5,"div",2),t.YNc(6,hl,2,0,"a",3),t.YNc(7,Tl,2,5,"a",4),t.qZA()(),t.TgZ(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8),t.YNc(12,ql,15,4,"div",9),t.qZA()()()()()),2&e&&(t.xp6(6),t.Q6J("ngIf",!o.salesHistoryRequested),t.xp6(1),t.Q6J("ngIf",o.salesHistoryRequested),t.xp6(5),t.Q6J("ngIf",(null==o.salesHistory?null:o.salesHistory.Data.length)>0))},directives:[c.O5,l.yS,c.sg],pipes:[c.uU,c.JJ],styles:[""]}),n})();function Sl(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",10),t.NdJ("click",function(){return t.CHM(e),t.oxw().getPurchaseHistory()}),t._uU(1,"View"),t.qZA()}}const Ol=function(){return["/menu/Reports/Purchases_Report/Product_Purchase_History"]},Jl=function(n){return{VariantID:n}};function Vl(n,i){if(1&n&&(t.TgZ(0,"a",11),t._uU(1,"more"),t.qZA()),2&n){const e=t.oxw();t.Q6J("routerLink",t.DdM(2,Ol))("queryParams",t.VKq(3,Jl,e.variant.ID))}}function kl(n,i){1&n&&(t.TgZ(0,"th",18),t._uU(1,"Price"),t.qZA())}function Fl(n,i){1&n&&(t.TgZ(0,"th",19),t._uU(1,"%"),t.qZA())}function Ql(n,i){1&n&&(t.TgZ(0,"th",18),t._uU(1,"Net"),t.qZA())}function Ll(n,i){if(1&n&&(t.TgZ(0,"td",18),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.UnitPrice*e.Quantity))}}function Hl(n,i){if(1&n&&(t.TgZ(0,"td",18),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.Discount))}}function El(n,i){if(1&n&&(t.TgZ(0,"td",18),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.Total))}}const Yl=function(){return["/menu/Orders/Orders/Supplier_Bill/Info"]},Rl=function(n){return{ID:n}};function Bl(n,i){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.ALo(3,"date"),t.qZA(),t.TgZ(4,"td")(5,"a",20),t._uU(6),t.qZA()(),t.TgZ(7,"td"),t._uU(8),t.ALo(9,"number"),t.qZA(),t.YNc(10,Ll,3,3,"td",15),t.YNc(11,Hl,3,3,"td",15),t.YNc(12,El,3,3,"td",15),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(t.xi3(3,8,e.Date,"dd/MM/yy")),t.xp6(3),t.Q6J("routerLink",t.DdM(13,Yl))("queryParams",t.VKq(14,Rl,e.ID)),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.Oqu(t.lcZ(9,11,e.Quantity)),t.xp6(2),t.Q6J("ngIf",null==o.role?null:o.role.RoleCost),t.xp6(1),t.Q6J("ngIf",(null==o.role?null:o.role.RoleCost)&&(null==o.purchaseHistory?null:o.purchaseHistory.DiscountCount)>0),t.xp6(1),t.Q6J("ngIf",(null==o.role?null:o.role.RoleCost)&&(null==o.purchaseHistory?null:o.purchaseHistory.DiscountCount)>0)}}function $l(n,i){if(1&n&&(t.TgZ(0,"div",12)(1,"table",13)(2,"thead")(3,"tr",14)(4,"th"),t._uU(5,"Date"),t.qZA(),t.TgZ(6,"th"),t._uU(7,"Invoice"),t.qZA(),t.TgZ(8,"th"),t._uU(9,"Qty"),t.qZA(),t.YNc(10,kl,2,0,"th",15),t.YNc(11,Fl,2,0,"th",16),t.YNc(12,Ql,2,0,"th",15),t.qZA()(),t.TgZ(13,"tbody"),t.YNc(14,Bl,13,16,"tr",17),t.qZA()()()),2&n){const e=t.oxw();t.xp6(10),t.Q6J("ngIf",null==e.role?null:e.role.RoleCost),t.xp6(1),t.Q6J("ngIf",(null==e.role?null:e.role.RoleCost)&&(null==e.purchaseHistory?null:e.purchaseHistory.DiscountCount)>0),t.xp6(1),t.Q6J("ngIf",(null==e.role?null:e.role.RoleCost)&&(null==e.purchaseHistory?null:e.purchaseHistory.DiscountCount)>0),t.xp6(2),t.Q6J("ngForOf",null==e.purchaseHistory?null:e.purchaseHistory.Data)}}let jl=(()=>{class n{constructor(e){this.httpService=e}ngOnInit(){}getPurchaseHistory(){this.httpService.post("/api/catalog/product/GetPurchaseHistory",this.variant).subscribe(e=>{this.purchaseHistory=e,this.purchaseHistoryRequested=!this.purchaseHistoryRequested})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-purchase-history"]],inputs:{variant:"variant",role:"role"},decls:13,vars:3,consts:[[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"btn-group"],["class","btn btn-outline-secondary btn-sm",3,"click",4,"ngIf"],["target","_blank","class","btn btn-outline-secondary btn-sm",3,"routerLink","queryParams",4,"ngIf"],[1,"card-body"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],["class","content",4,"ngIf"],[1,"btn","btn-outline-secondary","btn-sm",3,"click"],["target","_blank",1,"btn","btn-outline-secondary","btn-sm",3,"routerLink","queryParams"],[1,"content"],[1,"table","mt-5"],[1,"table-light"],["class","text-end",4,"ngIf"],["style","width: 45px;","class","text-end",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"text-end"],[1,"text-end",2,"width","45px"],["target","_blank",3,"routerLink","queryParams"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),t._uU(4,"Purchase History"),t.qZA()(),t.TgZ(5,"div",2),t.YNc(6,Sl,2,0,"a",3),t.YNc(7,Vl,2,5,"a",4),t.qZA()(),t.TgZ(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8),t.YNc(12,$l,15,4,"div",9),t.qZA()()()()()),2&e&&(t.xp6(6),t.Q6J("ngIf",!o.purchaseHistoryRequested),t.xp6(1),t.Q6J("ngIf",(null==o.purchaseHistory?null:o.purchaseHistory.Data.length)>0&&o.purchaseHistoryRequested),t.xp6(5),t.Q6J("ngIf",(null==o.purchaseHistory?null:o.purchaseHistory.Data.length)>0))},directives:[c.O5,l.yS,c.sg],pipes:[c.uU,c.JJ],styles:[""]}),n})();function Kl(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",10),t.NdJ("click",function(){return t.CHM(e),t.oxw().getParkedHistory()}),t._uU(1,"View"),t.qZA()}}const Wl=function(){return["/menu/Orders/Order/Parked_Order"]},_e=function(n){return{ID:n}};function Gl(n,i){if(1&n&&(t.TgZ(0,"a",11),t._uU(1,"more"),t.qZA()),2&n){const e=t.oxw();t.Q6J("queryParams",t.DdM(2,Wl))("queryParams",t.VKq(3,_e,null==e.variant?null:e.variant.ID))}}function zl(n,i){1&n&&(t.TgZ(0,"th",18),t._uU(1,"Price"),t.qZA())}function Xl(n,i){1&n&&(t.TgZ(0,"th",19),t._uU(1,"%"),t.qZA())}function tc(n,i){1&n&&(t.TgZ(0,"th",18),t._uU(1,"Net "),t.qZA())}function ec(n,i){if(1&n&&(t.TgZ(0,"td",18),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.Total))}}function nc(n,i){if(1&n&&(t.TgZ(0,"td",18),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.Discount),"")}}function oc(n,i){if(1&n&&(t.TgZ(0,"td",18),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.TotalAfterDiscount),"")}}const ac=function(){return["/menu/Orders/Order/Sales_Order/Info"]};function ic(n,i){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.ALo(3,"date"),t.qZA(),t.TgZ(4,"td")(5,"a",20),t._uU(6),t.qZA()(),t.TgZ(7,"td"),t._uU(8),t.ALo(9,"number"),t.qZA(),t.YNc(10,ec,3,3,"td",15),t.YNc(11,nc,3,3,"td",15),t.YNc(12,oc,3,3,"td",15),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(t.xi3(3,8,e.Date,"dd/MM/yy")),t.xp6(3),t.Q6J("routerLink",t.DdM(13,ac))("queryParams",t.VKq(14,_e,e.ID)),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.Oqu(t.lcZ(9,11,e.Quantity)),t.xp6(2),t.Q6J("ngIf",!(null!=o.role&&o.role.UnitPriceRestriction)),t.xp6(1),t.Q6J("ngIf",!(null!=o.role&&o.role.UnitPriceRestriction)&&(null==o.parkedHistory?null:o.parkedHistory.DiscountCount)>0),t.xp6(1),t.Q6J("ngIf",!(null!=o.role&&o.role.UnitPriceRestriction)&&(null==o.parkedHistory?null:o.parkedHistory.DiscountCount)>0)}}function rc(n,i){if(1&n&&(t.TgZ(0,"div",12)(1,"table",13)(2,"thead")(3,"tr",14)(4,"th"),t._uU(5,"Date"),t.qZA(),t.TgZ(6,"th"),t._uU(7,"Sales order"),t.qZA(),t.TgZ(8,"th"),t._uU(9,"Qty"),t.qZA(),t.YNc(10,zl,2,0,"th",15),t.YNc(11,Xl,2,0,"th",16),t.YNc(12,tc,2,0,"th",15),t.qZA()(),t.TgZ(13,"tbody"),t.YNc(14,ic,13,16,"tr",17),t.qZA()()()),2&n){const e=t.oxw();t.xp6(10),t.Q6J("ngIf",!(null!=e.role&&e.role.UnitPriceRestriction)),t.xp6(1),t.Q6J("ngIf",!(null!=e.role&&e.role.UnitPriceRestriction)&&(null==e.parkedHistory?null:e.parkedHistory.DiscountCount)>0),t.xp6(1),t.Q6J("ngIf",!(null!=e.role&&e.role.UnitPriceRestriction)&&(null==e.parkedHistory?null:e.parkedHistory.DiscountCount)>0),t.xp6(2),t.Q6J("ngForOf",null==e.parkedHistory?null:e.parkedHistory.Data)}}let lc=(()=>{class n{constructor(e){this.httpService=e}ngOnInit(){}getParkedHistory(){this.httpService.post("/api/catalog/product/GetParkOrder",this.variant).subscribe(e=>{this.parkedHistory=e,this.parkHistoryRequested=!this.parkHistoryRequested})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant-parked-history"]],inputs:{variant:"variant",role:"role"},decls:13,vars:3,consts:[[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"btn-group"],["class","btn btn-outline-secondary btn-sm",3,"click",4,"ngIf"],["class","btn btn-outline-secondary btn-sm","target","_blank",3,"queryParams",4,"ngIf"],[1,"card-body"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],["class","content",4,"ngIf"],[1,"btn","btn-outline-secondary","btn-sm",3,"click"],["target","_blank",1,"btn","btn-outline-secondary","btn-sm",3,"queryParams"],[1,"content"],[1,"table","mt-5"],[1,"table-light"],["class","text-end",4,"ngIf"],["style","width: 45px;","class","text-end",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"text-end"],[1,"text-end",2,"width","45px"],["target","_blank",3,"routerLink","queryParams"]],template:function(e,o){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),t._uU(4,"Parked Order History"),t.qZA()(),t.TgZ(5,"div",2),t.YNc(6,Kl,2,0,"a",3),t.YNc(7,Gl,2,5,"a",4),t.qZA()(),t.TgZ(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8),t.YNc(12,rc,15,4,"div",9),t.qZA()()()()()),2&e&&(t.xp6(6),t.Q6J("ngIf",!o.parkHistoryRequested),t.xp6(1),t.Q6J("ngIf",(null==o.parkedHistory?null:o.parkedHistory.Data.length)>0&&o.parkHistoryRequested),t.xp6(5),t.Q6J("ngIf",(null==o.parkedHistory?null:o.parkedHistory.Data.length)>0))},directives:[c.O5,c.sg,l.yS],pipes:[c.uU,c.JJ],styles:[""]}),n})();const sc=function(){return["/menu/Products/Catalog/Variants/Inventory_Cost_History"]},jt=function(n){return{VariantID:n}};function pc(n,i){if(1&n&&(t.TgZ(0,"a",46),t._UZ(1,"i",47),t._uU(2,"\xa0\xa0Inventory Cost"),t.qZA()),2&n){const e=t.oxw(3);t.Q6J("routerLink",t.DdM(2,sc))("queryParams",t.VKq(3,jt,null==e.data||null==e.data.Data||null==e.data.Data.Variant?null:e.data.Data.Variant.ID))}}function dc(n,i){if(1&n&&(t.TgZ(0,"div",45),t.YNc(1,pc,3,5,"a",6),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.data.Roles.HasProductEditor)}}const me=function(){return["/menu/Products/Add-Ons/Variant_History"]};function uc(n,i){if(1&n&&(t.TgZ(0,"a",48),t._UZ(1,"i",49),t._uU(2,"\xa0\xa0Update History "),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("routerLink",t.DdM(2,me))("queryParams",t.VKq(3,jt,null==e.data||null==e.data.Data||null==e.data.Data.Variant?null:e.data.Data.Variant.ID))}}function _c(n,i){if(1&n&&(t.TgZ(0,"a",50),t._UZ(1,"i",51),t._uU(2,"\xa0\xa0Print Barcode"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("href","https://barcode.dealpos.app/pages?ID="+e.data.Data.Variant.ID,t.LSH)}}const mc=function(){return["/menu/Products/Catalog/Variants/Form"]},ge=function(n){return{ID:n}};function gc(n,i){if(1&n&&(t.TgZ(0,"a",46),t._UZ(1,"i",52),t._uU(2,"\xa0\xa0Edit"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("routerLink",t.DdM(2,mc))("queryParams",t.VKq(3,ge,e.data.Data.Variant.ID))}}function fc(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",53),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).deleteVariantInfo()}),t._UZ(1,"i",54),t._uU(2,"\xa0\xa0Delete"),t.qZA()}}function hc(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div")(1,"img",55),t.NdJ("click",function(a){t.CHM(e);const r=t.oxw(2);return r.openBigPicture(r.data.Data.Variant,a)}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("src",e.data.Data.Variant.Image,t.LSH)}}function xc(n,i){1&n&&(t.TgZ(0,"div",56),t._UZ(1,"i",57),t.qZA())}function Cc(n,i){if(1&n&&(t.TgZ(0,"p",58),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",e.data.Data.UOM.Name," ")}}function vc(n,i){1&n&&(t.TgZ(0,"p",59),t._uU(1,"Point(s)"),t.qZA())}function Tc(n,i){1&n&&(t.TgZ(0,"p",60),t._uU(1," Expiration "),t.qZA())}function Zc(n,i){if(1&n&&(t.TgZ(0,"p",61),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.AsE(" ",null==e.data.Data.VariantPoint?null:e.data.Data.VariantPoint.ExpiredDay," Days + ",null==e.data.Data.VariantPoint?null:e.data.Data.VariantPoint.ExpiredMonth," Month(s) ")}}function bc(n,i){if(1&n&&(t.TgZ(0,"div",30)(1,"div",62)(2,"a",63),t._uU(3),t.ALo(4,"number"),t.qZA(),t.TgZ(5,"label"),t._uU(6,"Buying Cost"),t.qZA()()()),2&n){const e=t.oxw(2);t.Q6J("ngClass",e.data.Data.Variant.OrderPriceDiscount>0?"col-sm-3":""),t.xp6(2),t.Q6J("routerLink",t.DdM(6,me))("queryParams",t.VKq(7,jt,e.data.Data.Variant.ID)),t.xp6(1),t.Oqu(t.lcZ(4,4,e.data.Data.Variant.UnitCost))}}function yc(n,i){if(1&n&&(t.TgZ(0,"div",64)(1,"div",31),t._UZ(2,"POS-info-page-input",65),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("inputValue",e.data.Data.Variant.OrderPriceDiscount+"%")}}function Ic(n,i){if(1&n&&(t.TgZ(0,"div",64)(1,"div",31),t._UZ(2,"POS-info-page-input",65),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("inputValue",e.data.Data.Variant.PriceDiscount+"%")}}function Mc(n,i){if(1&n&&(t.TgZ(0,"div",34)(1,"div",31),t._UZ(2,"POS-info-page-input",66),t.ALo(3,"number"),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("inputValue",t.lcZ(3,1,e.data.Data.Variant.OrderPrice))}}function Pc(n,i){if(1&n&&(t.TgZ(0,"div",37),t._UZ(1,"POS-info-variant-sales-history",67),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("variant",e.data.Data.Variant)}}function Dc(n,i){if(1&n&&(t.TgZ(0,"div",9)(1,"div",68),t._UZ(2,"POS-info-variant-purchase-history",69),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("variant",e.data.Data.Variant)("role",e.data.Roles)}}function Ac(n,i){if(1&n&&(t.TgZ(0,"div",9)(1,"div",68),t._UZ(2,"POS-info-variant-parked-history",69),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("variant",e.data.Data.Variant)("role",e.data.Roles)}}const Nc=function(){return["/menu/Products/Catalog/Products/Info"]};function qc(n,i){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"pre"),t._uU(2),t.ALo(3,"json"),t.qZA(),t.TgZ(4,"actions"),t.YNc(5,dc,2,1,"div",2),t.YNc(6,uc,3,5,"a",3),t.TgZ(7,"div",4),t.YNc(8,_c,3,1,"a",5),t.qZA(),t.TgZ(9,"div",4),t.YNc(10,gc,3,5,"a",6),t.YNc(11,fc,3,0,"a",7),t.qZA()(),t.TgZ(12,"content")(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",9)(17,"div",11)(18,"div",12)(19,"div",13),t.YNc(20,hc,2,1,"div",14),t.YNc(21,xc,2,0,"div",15),t.TgZ(22,"p",16)(23,"a",17),t._uU(24),t.qZA()(),t.TgZ(25,"p",18),t._uU(26),t.qZA(),t.TgZ(27,"p",19),t._uU(28),t.qZA(),t.YNc(29,Cc,2,1,"p",20),t.YNc(30,vc,2,0,"p",21),t.TgZ(31,"p",22),t._uU(32),t.qZA(),t.YNc(33,Tc,2,0,"p",23),t.YNc(34,Zc,2,2,"p",24),t.qZA()()(),t.TgZ(35,"div",25)(36,"div",26)(37,"div",27)(38,"h3"),t._uU(39,"Pricing"),t.qZA()(),t.TgZ(40,"div",13)(41,"div",9),t.YNc(42,bc,7,9,"div",28),t.YNc(43,yc,3,1,"div",29),t.TgZ(44,"div",30)(45,"div",31),t._UZ(46,"POS-info-page-input",32),t.ALo(47,"number"),t.qZA()(),t.YNc(48,Ic,3,1,"div",29),t.qZA(),t.TgZ(49,"div",9),t.YNc(50,Mc,4,3,"div",33),t.TgZ(51,"div",34)(52,"div",31),t._UZ(53,"POS-info-page-input",35),t.ALo(54,"number"),t.qZA()(),t.TgZ(55,"div",34)(56,"div",31),t._UZ(57,"POS-info-page-input",36),t.qZA()()()()()()(),t.TgZ(58,"div",9)(59,"div",37),t._UZ(60,"POS-info-variant-nav",38),t.qZA()()(),t.TgZ(61,"div",34)(62,"div",9)(63,"div",37)(64,"div",26)(65,"div",27)(66,"h3"),t._uU(67,"Properties"),t.qZA()(),t.TgZ(68,"div",13)(69,"div",9)(70,"div",37)(71,"div",31),t._UZ(72,"POS-info-page-input",39),t.qZA()(),t.TgZ(73,"div",37)(74,"div",31),t._UZ(75,"POS-info-page-input",40),t.qZA()(),t.TgZ(76,"div",37)(77,"div",31),t._UZ(78,"POS-info-page-input",41),t.qZA()(),t.TgZ(79,"div",37)(80,"div",31),t._UZ(81,"POS-info-page-input",42),t.qZA()()()()()(),t.YNc(82,Pc,2,1,"div",43),t.qZA(),t.YNc(83,Dc,3,2,"div",44),t.YNc(84,Ac,3,2,"div",44),t.qZA()()()()()),2&n){const e=t.oxw();t.Q6J("hideSearchDropdown",!0)("hideSearchBox",!0)("pageData",e.menuData),t.xp6(2),t.Oqu(t.lcZ(3,40,e.data)),t.xp6(3),t.Q6J("ngIf",e.data.Roles.IsFIFO),t.xp6(1),t.Q6J("ngIf",e.data.Roles.HasProductEditor),t.xp6(2),t.Q6J("ngIf",e.data.Roles.isBarcodePrinting),t.xp6(2),t.Q6J("ngIf",e.data.Roles.HasProductEditor),t.xp6(1),t.Q6J("ngIf",e.data.Roles.HasProductDelete),t.xp6(9),t.Q6J("ngIf",e.data.Data.Variant.Image),t.xp6(1),t.Q6J("ngIf",!e.data.Data.Variant.Image),t.xp6(2),t.Q6J("routerLink",t.DdM(46,Nc))("queryParams",t.VKq(47,ge,e.data.Data.Variant.ProductID)),t.xp6(1),t.Oqu(e.data.Data.Product.Name),t.xp6(2),t.Oqu(e.data.Data.Variant.Model),t.xp6(1),t.s9C("placeholder",e.AutoGenerateCode?"Leave Blank for Auto Generate":""),t.xp6(1),t.hij(" ",e.data.Data.Variant.Code," "),t.xp6(1),t.Q6J("ngIf",e.data.Data.UOM),t.xp6(1),t.Q6J("ngIf",e.data.Data.UOM),t.xp6(2),t.hij(" ",null==e.data.Data.VariantPoint?null:e.data.Data.VariantPoint.Point," "),t.xp6(1),t.Q6J("ngIf",e.data.Roles.IsUsingPoint),t.xp6(1),t.Q6J("ngIf",e.data.Roles.IsUsingPoint),t.xp6(8),t.Q6J("ngIf",e.data.Roles.RoleCost),t.xp6(1),t.Q6J("ngIf",e.data.Roles.RoleCost&&e.data.Data.Variant.OrderPriceDiscount),t.xp6(1),t.Q6J("ngClass",e.data.Data.Variant.OrderPriceDiscount>0?"col-sm-3":"")("ngClass",e.data.Roles.RoleCost?"ps-0":""),t.xp6(2),t.Q6J("inputValue",t.lcZ(47,42,e.data.Data.Variant.UnitPrice)),t.xp6(2),t.Q6J("ngIf",e.data.Data.Variant.PriceDiscount),t.xp6(2),t.Q6J("ngIf",e.data.Roles.OutLetPriceVisible),t.xp6(3),t.Q6J("inputValue",t.lcZ(54,44,e.data.Data.Variant.Weight)),t.xp6(4),t.Q6J("inputValue",e.data.Data.Variant.PaymentTypeString),t.xp6(3),t.Q6J("data",e.data)("role",e.data),t.xp6(12),t.Q6J("inputValue",e.data.Data.Variant.VariantType),t.xp6(3),t.Q6J("inputValue",e.data.Data.Variant.Taxable?"Yes":"No"),t.xp6(3),t.Q6J("inputValue",e.data.Data.Variant.LoyaltyPoint?"Yes":"No"),t.xp6(3),t.Q6J("inputValue",e.data.Data.Variant.Discontinued?"Yes":"No"),t.xp6(1),t.Q6J("ngIf",e.data.Roles.IsSalesRoleHistory),t.xp6(1),t.Q6J("ngIf",e.data.Roles.IsPurchaseRoleHistory),t.xp6(1),t.Q6J("ngIf",e.data.Roles.IsSalesRoleHistory)}}let wc=(()=>{class n extends Y.U{constructor(e,o,a,r,p){super(e,"catalog/variant/GetVariantInfoModelById",o),this.httpService=e,this.activatedRoute=o,this.router=a,this.toaster=r,this.title=p,this.destroy$=new Ht.x,this.router.routeReuseStrategy.shouldReuseRoute=function(){return!1}}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}postBindForm(e){this.menuData.H=e.Data.PageTitle;const o=this.title.getTitle().split("|")[0];this.title.setTitle(`${o}| ${this.data.Data.Variant.Name}`),console.log(this.data)}deleteVariantInfo(){confirm("Are you sure you want to delete this record?")&&(this.data.Form={ID:this.data.Data.Variant.ID},this.onSubmit("catalog/variant/DeleteVariantInfo"))}onSubmitSuccess(){this.router.navigate(["/menu/Products/Catalog/Variants"]),this.toaster.success("Success Delete Variant",Z.n.Success)}openBigPicture(e,o){BigPicture({el:o.target,imgSrc:e.Image.replace("w_80",""),noLoader:!1})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(l.gz),t.Y36(l.F0),t.Y36(f._W),t.Y36(ae.Dx))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-variant"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"hideSearchDropdown","hideSearchBox","pageData",4,"ngIf"],[3,"hideSearchDropdown","hideSearchBox","pageData"],["class","btn-group",4,"ngIf"],["class","btn btn-outline-secondary ms-5","role","button","title","Variant Update History",3,"routerLink","queryParams",4,"ngIf"],[1,"btn-group","ms-5"],["target","_blank","class","btn btn-outline-secondary","role","button",3,"href",4,"ngIf"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["role","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"container-fluid","bg-light-gray","pt-4","m-0"],[1,"row"],[1,"col-sm-8"],[1,"col-sm-3"],[1,"card","text-center"],[1,"card-body"],[4,"ngIf"],["class","my-lg-7",4,"ngIf"],[1,"h3","text-primary","fw-bold","d-block"],["tar","_blank",3,"routerLink","queryParams"],[1,"mb-1","h5"],[1,"mb-1",3,"placeholder"],["class","mb-1",4,"ngIf"],["class","mb-0",4,"ngIf"],[1,"mb-0",2,"color","#9da2a6","font-size","14px"],["class","mb-0 h5",4,"ngIf"],["style","color: #9da2a6; font-size: 14px",4,"ngIf"],[1,"col-sm-9"],[1,"card"],[1,"card-header"],["class","col",3,"ngClass",4,"ngIf"],["class","col-2 ps-0",4,"ngIf"],[1,"col",3,"ngClass"],[1,"form-floating-outline"],["labelValue","Selling Price",3,"inputValue"],["class","col-sm-4",4,"ngIf"],[1,"col-sm-4"],["labelValue","Weight (gr)",3,"inputValue"],["labelValue","Payment Type",3,"inputValue"],[1,"col-sm-12"],[3,"data","role"],["labelValue","Type",3,"inputValue"],["labelValue","Taxable",3,"inputValue"],["labelValue","Loyalty Point Enabled",3,"inputValue"],["labelValue","Discontinued",3,"inputValue"],["class","col-sm-12",4,"ngIf"],["class","row",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa-solid","fa-history"],["role","button","title","Variant Update History",1,"btn","btn-outline-secondary","ms-5",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa","fa-history"],["target","_blank","role","button",1,"btn","btn-outline-secondary",3,"href"],["aria-hidden","true",1,"fa-solid","fa-barcode"],["aria-hidden","true",1,"fa-solid","fa-edit"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to zoom",3,"src","click"],[1,"my-lg-7"],[1,"fa","fa-cube","fa-i-block",2,"font-size","60px"],[1,"mb-1"],[1,"mb-0"],[1,"mb-0","h5"],[2,"color","#9da2a6","font-size","14px"],[1,"form-floating-outline","floating-url"],[1,"form-control",3,"routerLink","queryParams"],[1,"col-2","ps-0"],["labelValue","Disc",3,"inputValue"],["labelValue","Last Buy Cost",3,"inputValue"],[3,"variant"],[1,"col-12"],[3,"variant","role"]],template:function(e,o){1&e&&t.YNc(0,qc,85,49,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data.Roles)},directives:[c.O5,m.p,l.yS,F.gM,c.mk,yt.o,fl,wl,jl,lc],pipes:[c.Ts,c.JJ],styles:[".floating-url[_ngcontent-%COMP%] > label[_ngcontent-%COMP%] {\n background-color: white;\n font-size: 0.75rem !important;\n color: #9da2a6;\n top: -10px !important;\n padding: 0 0.25rem;\n left: 0.5rem;\n}\n\n.floating-url[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] {\n height: 3.625rem;\n padding: 0.75rem !important;\n font-size: 0.875rem;\n border-radius: 0.25rem !important;\n display: flex;\n align-items: center;\n color: #0976b4;\n}\n\n.floating-url[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] [_ngcontent-%COMP%]:hover {\n color: #05466b;\n}"]}),n})();var Pt=(()=>{return(n=Pt||(Pt={}))[n.PurchaseOrder=2]="PurchaseOrder",n[n.Archive=3]="Archive",Pt;var n})();function Sc(n,i){1&n&&(t.TgZ(0,"th"),t._uU(1,"Variant"),t.qZA())}function Uc(n,i){1&n&&(t.TgZ(0,"th",22),t._uU(1,"Buying Cost"),t.qZA())}function Oc(n,i){1&n&&(t.TgZ(0,"th",23),t._uU(1,"Selling Price"),t.qZA())}const Jc=function(){return["/menu/Products/Catalog/Variants/Info"]},fe=function(n){return{ID:n}};function Vc(n,i){if(1&n&&(t.TgZ(0,"td")(1,"a",28),t._uU(2),t.qZA()()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("routerLink",t.DdM(3,Jc))("queryParams",t.VKq(4,fe,e.ParentID)),t.xp6(1),t.Oqu(e.VariantName)}}function kc(n,i){if(1&n&&(t.TgZ(0,"td",29),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.UnitCost,"1.2-2"))}}function Fc(n,i){if(1&n&&(t.TgZ(0,"td",29),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.UnitPrice,"1.2-2"))}}const Qc=function(n){return[n]};function Lc(n,i){if(1&n&&(t.TgZ(0,"tr",24),t.YNc(1,Vc,3,6,"td",18),t.TgZ(2,"td"),t._uU(3),t.ALo(4,"date"),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA(),t._UZ(7,"td",25),t.ALo(8,"newlines"),t.TgZ(9,"td"),t._uU(10),t.qZA(),t.YNc(11,kc,3,4,"td",26),t.YNc(12,Fc,3,4,"td",26),t.TgZ(13,"td"),t._uU(14),t.qZA(),t.TgZ(15,"td")(16,"a",27),t._uU(17),t.qZA()()()),2&n){const e=i.$implicit,o=t.oxw(3);t.xp6(1),t.Q6J("ngIf",o.data.ShowColumnVariant),t.xp6(2),t.Oqu(t.xi3(4,11,e.Created,"dd MMM yyyy HH:mm")),t.xp6(3),t.Oqu(e.UserName),t.xp6(1),t.Q6J("innerHTML",t.lcZ(8,14,e.Note),t.oJD),t.xp6(3),t.Oqu(e.Code),t.xp6(1),t.Q6J("ngIf",o.pageData.HasRoleCost),t.xp6(1),t.Q6J("ngIf",o.pageData.HasRolePrice),t.xp6(2),t.Oqu(e.EntityName),t.xp6(2),t.Q6J("queryParams",t.VKq(16,fe,e.ReferenceID))("routerLink",t.VKq(18,Qc,o.linkReference(e.TypeID))),t.xp6(1),t.hij(" ",e.DisplayReference," ")}}function Hc(n,i){if(1&n&&(t.TgZ(0,"table",16)(1,"thead",17)(2,"tr"),t.YNc(3,Sc,2,0,"th",18),t.TgZ(4,"th"),t._uU(5,"Modified"),t.qZA(),t.TgZ(6,"th"),t._uU(7,"Modify By"),t.qZA(),t.TgZ(8,"th"),t._uU(9,"Note"),t.qZA(),t.TgZ(10,"th"),t._uU(11,"Code"),t.qZA(),t.YNc(12,Uc,2,0,"th",19),t.YNc(13,Oc,2,0,"th",20),t.TgZ(14,"th"),t._uU(15,"Outlet"),t.qZA(),t.TgZ(16,"th"),t._uU(17,"Reference"),t.qZA()()(),t.TgZ(18,"tbody"),t.YNc(19,Lc,18,20,"tr",21),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngIf",e.data.ShowColumnVariant),t.xp6(9),t.Q6J("ngIf",e.pageData.HasRoleCost),t.xp6(1),t.Q6J("ngIf",e.pageData.HasRolePrice),t.xp6(6),t.Q6J("ngForOf",e.data.Data)}}function Ec(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mat-paginator",30),t.NdJ("page",function(a){return t.CHM(e),t.oxw(2).onPaginationChange(a)}),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",0==e.pageData.Filter.PageNumber?0:e.pageData.Filter.PageNumber-1)}}const Yc=function(){return["/menu/Products/Catalog/Variants"]};function Rc(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.UserName=a})("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions")(2,"a",2),t.NdJ("click",function(){return t.CHM(e),t.oxw().onExportToCsv()}),t._UZ(3,"i",3),t._uU(4," Export "),t.qZA(),t.TgZ(5,"a",4),t._uU(6," Return to Variant "),t.qZA()(),t.TgZ(7,"filters")(8,"div",5)(9,"div")(10,"h6"),t._uU(11,"Outlet"),t.qZA(),t.TgZ(12,"ng-select",6),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),t.qZA()(),t.TgZ(13,"div")(14,"h6"),t._uU(15,"Variant"),t.qZA(),t.TgZ(16,"autocompleteV2",7),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.VariantID=a}),t.qZA()(),t.TgZ(17,"div")(18,"h6"),t._uU(19,"From - To"),t.qZA(),t.TgZ(20,"datepicker",8),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(21,"datepicker",9),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),t.qZA()(),t.TgZ(22,"div")(23,"h6"),t._uU(24,"Note"),t.qZA(),t.TgZ(25,"input",10),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.Note=a}),t.qZA()(),t.TgZ(26,"div")(27,"h6"),t._uU(28,"Page Size"),t.qZA(),t.TgZ(29,"input",10),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.RowCount=a}),t.qZA()()()(),t.TgZ(30,"content")(31,"div",11)(32,"div",12),t.YNc(33,Hc,20,4,"table",13),t.qZA(),t.TgZ(34,"div",14),t.YNc(35,Ec,1,3,"mat-paginator",15),t.qZA()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("text",e.pageData.Filter.UserName),t.xp6(5),t.Q6J("routerLink",t.DdM(15,Yc)),t.xp6(7),t.Q6J("items",e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.VariantID)("inputTextValue",e.variantName)("displayText",e.variantName),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Note),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RowCount),t.xp6(4),t.Q6J("ngIf",e.pageData),t.xp6(2),t.Q6J("ngIf",e.pagination.listTotal>0)}}let Bc=(()=>{class n extends v.n{constructor(e,o,a,r){super(a,"catalog/variant/VariantHistoryList","catalog/VariantLoader/VariantHistoryLoader",r,o),this.csvConverter=e,this.activatedRoute=o,this.httpService=a,this.urlParams=this.activatedRoute.snapshot.queryParams}onExportToCsv(){this.convertToCSV(this.csvConverter,this.data.Data,"Variant_Update_History")}postInit(e){this.menuData.H=e.PageTitle,Object.entries(this.urlParams).length>0&&(this.variantName=this.pageData.VariantName);const o=this.data.Data.map(a=>{let r=a.Note.replace(/"/g,'""');return Object.assign(Object.assign({},a),{Note:r})});this.data.Data=o}preInitList(){Object.entries(this.urlParams).length>0&&(this.pageData.Filter=Object.assign(this.pageData.Filter,this.urlParams))}linkReference(e){let o="";switch(e){case Pt.PurchaseOrder:o="/menu/Orders/Order/Purchase_Order/Info";break;case Pt.Archive:o="/menu/Manufacture/Job_Order/Archive/Info"}return o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(g.O),t.Y36(l.gz),t.Y36(_.O),t.Y36(f._W))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-history-variant"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","text","textChange","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","text","textChange","onSubmit"],[1,"btn","btn-outline-secondary","me-6",3,"click"],[1,"fa","fa-upload"],["role","button","title","Return to Variant",1,"btn","btn-success",3,"routerLink"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",1,"w-100",3,"items","ngModel","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"w-100",3,"ngModel","inputTextValue","displayText","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid","class","table border-bottom",4,"ngIf"],[1,"d-sm-block","mt-2"],[3,"length","pageSize","pageIndex","page",4,"ngIf"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[4,"ngIf"],["class","text-end","style","width: 78px;",4,"ngIf"],["class","text-end","style","width: 80px;",4,"ngIf"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"text-end",2,"width","78px"],[1,"text-end",2,"width","80px"],[1,"border-bottom"],[3,"innerHTML"],["class","text-end",4,"ngIf"],[3,"queryParams","routerLink"],[3,"routerLink","queryParams"],[1,"text-end"],[3,"length","pageSize","pageIndex","page"]],template:function(e,o){1&e&&t.YNc(0,Rc,36,16,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},directives:[c.O5,m.p,l.yS,y.w9,s.JJ,s.On,ft.J,E.QB,s.Fj,c.sg,Ut.NW],pipes:[c.uU,w.sH,c.JJ],styles:[""]}),n})();function $c(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",20),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).deleteRowCustomOutlet()}),t._UZ(1,"i",21),t._uU(2,"Delete "),t.qZA()}}function jc(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"th",22)(1,"input",23),t.NdJ("change",function(a){return t.CHM(e),t.oxw(2).onSelectAllData(a.target.checked)}),t.qZA()()}}function Kc(n,i){1&n&&(t.TgZ(0,"th",16),t._uU(1,"Unit Cost"),t.qZA())}function Wc(n,i){1&n&&(t.TgZ(0,"th",16),t._uU(1,"Extra Cost"),t.qZA())}function Gc(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"td")(1,"input",26),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().$implicit.selected=a}),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.selected)}}function zc(n,i){if(1&n&&(t.TgZ(0,"td",16),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.UnitCost))}}function Xc(n,i){if(1&n&&(t.TgZ(0,"td",16),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.ExtraCost))}}function ts(n,i){if(1&n&&(t.TgZ(0,"tr",24),t.YNc(1,Gc,2,1,"td",25),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td"),t._uU(9),t.qZA(),t.YNc(10,zc,3,3,"td",15),t.TgZ(11,"td",16),t._uU(12),t.ALo(13,"number"),t.qZA(),t.YNc(14,Xc,3,3,"td",15),t.TgZ(15,"td",16),t._uU(16),t.ALo(17,"number"),t.qZA(),t.TgZ(18,"td",16),t._uU(19),t.ALo(20,"number"),t.qZA()()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngIf",o.pageData.Roles.HasProductDelete),t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.CategoryName),t.xp6(2),t.Oqu(e.VariantName),t.xp6(2),t.Oqu(e.VariantCode),t.xp6(1),t.Q6J("ngIf",o.pageData.Roles.HasProductCost),t.xp6(2),t.Oqu(t.lcZ(13,10,e.UnitPrice)),t.xp6(2),t.Q6J("ngIf",o.pageData.Roles.HasProductCost),t.xp6(2),t.Oqu(t.lcZ(17,12,e.OutletPrice)),t.xp6(3),t.Oqu(t.lcZ(20,14,e.PriceDiscount))}}function es(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mat-paginator",27),t.NdJ("page",function(a){return t.CHM(e),t.oxw(2).onPaginationChange(a)}),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",0==e.pageData.Filter.PageNumber?0:e.pageData.Filter.PageNumber-1)}}function ns(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,$c,3,0,"a",2),t.TgZ(3,"a",3),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ProductExport/OutletPrice","Outlet Price")}),t._UZ(4,"i",4),t._uU(5," Export "),t.qZA()(),t.TgZ(6,"filters")(7,"div",5)(8,"div",6)(9,"div")(10,"h6"),t._uU(11,"Outlet"),t.qZA(),t.TgZ(12,"ng-select",7),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),t.qZA()(),t.TgZ(13,"div")(14,"h6"),t._uU(15,"Category"),t.qZA(),t.TgZ(16,"ng-select",8),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.qZA()()()()(),t.TgZ(17,"content")(18,"div",9)(19,"div",10)(20,"table",11)(21,"thead",12)(22,"tr",13),t.YNc(23,jc,2,0,"th",14),t.TgZ(24,"th"),t._uU(25,"Name"),t.qZA(),t.TgZ(26,"th"),t._uU(27,"Category"),t.qZA(),t.TgZ(28,"th"),t._uU(29,"Variant"),t.qZA(),t.TgZ(30,"th"),t._uU(31,"Code"),t.qZA(),t.YNc(32,Kc,2,0,"th",15),t.TgZ(33,"th",16),t._uU(34,"Unit Price"),t.qZA(),t.YNc(35,Wc,2,0,"th",15),t.TgZ(36,"th",16),t._uU(37,"Outlet Price"),t.qZA(),t.TgZ(38,"th",16),t._uU(39,"%"),t.qZA()()(),t.TgZ(40,"tbody"),t.YNc(41,ts,21,16,"tr",17),t.qZA()()(),t.TgZ(42,"div",18),t.YNc(43,es,1,3,"mat-paginator",19),t.qZA()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.pageData.Roles.HasProductDelete&&e.getSelectedData().length>0),t.xp6(10),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(7),t.Q6J("ngIf",e.pageData.Roles.HasProductDelete),t.xp6(9),t.Q6J("ngIf",e.pageData.Roles.HasProductCost),t.xp6(3),t.Q6J("ngIf",e.pageData.Roles.HasProductCost),t.xp6(6),t.Q6J("ngForOf",e.data.Data),t.xp6(2),t.Q6J("ngIf",e.pagination.listTotal>0)}}let os=(()=>{class n extends v.n{constructor(e,o,a,r){super(o,"catalog/product/OutletPrice","catalog/ProductLoader/OutletPrice",a),this.csvConverter=e,this.httpService=o,this.toasterClient=r}deleteRowCustomOutlet(){const o=this.getSelectedData().map(a=>({key1:a.VariantID,key2:a.EntityID}));this.httpService.post("/api/catalog/product/DeleteOutletPrice",JSON.stringify({Data:o})).subscribe(a=>{this.toasterClient.success("Success Custom Outlet Price",Z.n.Success),this.getListData()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(g.O),t.Y36(_.O),t.Y36(f._W),t.Y36(f._W))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-custom-outlet-price"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["value","Delete","title","Delete","class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","me-6",3,"click"],[1,"fa","fa-upload"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",1,"w-100",3,"items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose an outlet",1,"w-100",3,"items","ngModel","ngModelChange"],[1,"container-fluid"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],["style","width: 24px;",4,"ngIf"],["class","text-end",4,"ngIf"],[1,"text-end"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"d-sm-block","mt-2"],[3,"length","pageSize","pageIndex","page",4,"ngIf"],["value","Delete","title","Delete",1,"btn","btn-outline-secondary","me-3",3,"click"],[1,"fa-solid","fa-trash","me-3"],[2,"width","24px"],["type","checkbox",3,"change"],[1,"border-bottom"],[4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange"],[3,"length","pageSize","pageIndex","page"]],template:function(e,o){1&e&&t.YNc(0,ns,44,12,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},directives:[c.O5,m.p,y.w9,s.JJ,s.On,c.sg,s.Wl,Ut.NW],pipes:[c.JJ],styles:[""]}),n})();function as(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",10),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).httpPostListID("ProductSetup/RemoveBrands")}),t._UZ(1,"i",11),t._uU(2," Delete"),t.qZA()}}const he=function(){return["/menu/Products/Setup/Brand/Brand_Form"]};function is(n,i){1&n&&(t.TgZ(0,"a",12),t._uU(1,"Add"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,he))}function rs(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"th",13)(1,"input",14),t.NdJ("change",function(a){return t.CHM(e),t.oxw(2).onSelectAllData(a.target.checked)}),t.qZA()()}}function ls(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"td")(1,"input",17),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().$implicit.selected=a})("ngModelChange",function(a){return t.CHM(e),t.oxw().$implicit.selected=a}),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.selected)("ngModel",e.selected)}}const cs=function(n){return{ID:n}};function ss(n,i){if(1&n&&(t.TgZ(0,"span")(1,"a",18),t._uU(2),t.qZA()()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("routerLink",t.DdM(3,he))("queryParams",t.VKq(4,cs,e.ID)),t.xp6(1),t.Oqu(e.Name)}}function ps(n,i){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Name)}}function ds(n,i){if(1&n&&(t.TgZ(0,"tr",15),t.YNc(1,ls,2,2,"td",16),t.TgZ(2,"td"),t.YNc(3,ss,3,6,"span",16),t.YNc(4,ps,2,1,"span",16),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA()()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngIf",o.data.Roles.HasProductDelete),t.xp6(2),t.Q6J("ngIf",o.data.Roles.HasProductEditor),t.xp6(1),t.Q6J("ngIf",!o.data.Roles.HasProductEditor),t.xp6(2),t.Oqu(e.Code)}}function us(n,i){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,as,3,0,"a",2),t.YNc(3,is,2,2,"a",3),t.qZA(),t.TgZ(4,"content")(5,"div",4)(6,"table",5)(7,"thead",6)(8,"tr"),t.YNc(9,rs,2,0,"th",7),t.TgZ(10,"th",8),t._uU(11,"Name"),t.qZA(),t.TgZ(12,"th"),t._uU(13,"Code"),t.qZA()()(),t.TgZ(14,"tbody"),t.YNc(15,ds,7,4,"tr",9),t.qZA()()()()()),2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",e.data.Roles.HasProductDelete&&e.getSelectedData().length>0),t.xp6(1),t.Q6J("ngIf",e.data.Roles.HasProductCreate),t.xp6(6),t.Q6J("ngIf",e.data.Roles.HasProductDelete),t.xp6(6),t.Q6J("ngForOf",e.data.Data)}}let _s=(()=>{class n extends v.n{constructor(e,o){super(e,"ProductSetup/GetBrandsList",null,o),this.httpService=e}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(f._W))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-brands"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["role","button","class","btn btn-outline-secondary btn-lg ms-2 me-4",3,"click",4,"ngIf"],["class","button btn btn-success",3,"routerLink",4,"ngIf"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["style","width: 14px",4,"ngIf"],[2,"width","200px"],["class","border-bottom ng-scope",4,"ngFor","ngForOf"],["role","button",1,"btn","btn-outline-secondary","btn-lg","ms-2","me-4",3,"click"],[1,"fa-solid","fa-trash"],[1,"button","btn","btn-success",3,"routerLink"],[2,"width","14px"],["type","checkbox",3,"change"],[1,"border-bottom","ng-scope"],[4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange"],[3,"routerLink","queryParams"]],template:function(e,o){1&e&&t.YNc(0,us,16,7,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.pageData&&o.data)},directives:[c.O5,m.p,l.yS,c.sg,s.Wl,s.JJ,s.On],styles:[""]}),n})();function ms(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).httpPostListID("ProductSetup/RemoveMeasurements")}),t._UZ(1,"i",12),t._uU(2," Delete"),t.qZA()}}const xe=function(){return["/menu/Products/Setup/Measurement/Form"]};function gs(n,i){1&n&&(t.TgZ(0,"a",13),t._uU(1,"Add"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,xe))}function fs(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"th",14)(1,"input",15),t.NdJ("change",function(a){return t.CHM(e),t.oxw(2).onSelectAllData(a.target.checked)}),t.qZA()()}}function hs(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"td")(1,"input",18),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().$implicit.selected=a})("ngModelChange",function(a){return t.CHM(e),t.oxw().$implicit.selected=a}),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.selected)("ngModel",e.selected)}}const xs=function(n){return{ID:n}};function Cs(n,i){if(1&n&&(t.TgZ(0,"span")(1,"a",19),t._uU(2),t.qZA()()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("routerLink",t.DdM(3,xe))("queryParams",t.VKq(4,xs,e.ID)),t.xp6(1),t.Oqu(e.Name)}}function vs(n,i){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Name)}}function Ts(n,i){if(1&n&&(t.TgZ(0,"tr",16),t.YNc(1,hs,2,2,"td",17),t.TgZ(2,"td"),t.YNc(3,Cs,3,6,"span",17),t.YNc(4,vs,2,1,"span",17),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA()()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngIf",o.data.Roles.HasProductDelete),t.xp6(2),t.Q6J("ngIf",o.data.Roles.HasProductEditor),t.xp6(1),t.Q6J("ngIf",!o.data.Roles.HasProductEditor),t.xp6(2),t.Oqu(e.Description)}}function Zs(n,i){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,ms,3,0,"a",2),t.YNc(3,gs,2,2,"a",3),t.qZA(),t.TgZ(4,"content")(5,"div",4)(6,"table",5)(7,"thead",6)(8,"tr",7),t.YNc(9,fs,2,0,"th",8),t.TgZ(10,"th",9),t._uU(11,"Name"),t.qZA(),t.TgZ(12,"th"),t._uU(13,"Description"),t.qZA()()(),t.TgZ(14,"tbody"),t.YNc(15,Ts,7,4,"tr",10),t.qZA()()()()()),2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",e.data.Roles.HasProductDelete&&e.getSelectedData().length>0),t.xp6(1),t.Q6J("ngIf",e.data.Roles.HasProductCreate),t.xp6(6),t.Q6J("ngIf",e.data.Roles.HasProductDelete),t.xp6(6),t.Q6J("ngForOf",e.data.Data)}}let bs=(()=>{class n extends v.n{constructor(e,o){super(e,"ProductSetup/GetMeasurementList",null,o),this.httpService=e}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(f._W))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-measurement"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["role","button","class","btn btn-outline-secondary btn-lg ms-2 me-4",3,"click",4,"ngIf"],["class","button btn btn-success",3,"routerLink",4,"ngIf"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],["style","width: 14px",4,"ngIf"],[2,"width","100px"],["class","border-bottom ng-scope",4,"ngFor","ngForOf"],["role","button",1,"btn","btn-outline-secondary","btn-lg","ms-2","me-4",3,"click"],[1,"fa-solid","fa-trash"],[1,"button","btn","btn-success",3,"routerLink"],[2,"width","14px"],["type","checkbox",3,"change"],[1,"border-bottom","ng-scope"],[4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange"],[3,"routerLink","queryParams"]],template:function(e,o){1&e&&t.YNc(0,Zs,16,7,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.pageData&&o.data)},directives:[c.O5,m.p,l.yS,c.sg,s.Wl,s.JJ,s.On],styles:[""]}),n})();function ys(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",9),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).httpPostListID("ProductSetup/RemoveTags")}),t._UZ(1,"i",10),t._uU(2," Delete"),t.qZA()}}const Ce=function(){return["/menu/Products/Setup/Tags/Tags_Form"]};function Is(n,i){1&n&&(t.TgZ(0,"a",11),t._uU(1,"Add"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,Ce))}function Ms(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"th",12)(1,"input",13),t.NdJ("change",function(a){return t.CHM(e),t.oxw(2).onSelectAllData(a.target.checked)}),t.qZA()()}}function Ps(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"td")(1,"input",16),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().$implicit.selected=a})("ngModelChange",function(a){return t.CHM(e),t.oxw().$implicit.selected=a}),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.selected)("ngModel",e.selected)}}const Ds=function(n){return{ID:n}};function As(n,i){if(1&n&&(t.TgZ(0,"span")(1,"a",17),t._uU(2),t.qZA()()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("routerLink",t.DdM(3,Ce))("queryParams",t.VKq(4,Ds,e.ID)),t.xp6(1),t.Oqu(e.Name)}}function Ns(n,i){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Name)}}function qs(n,i){if(1&n&&(t.TgZ(0,"tr",14),t.YNc(1,Ps,2,2,"td",15),t.TgZ(2,"td"),t.YNc(3,As,3,6,"span",15),t.YNc(4,Ns,2,1,"span",15),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.data.Roles.HasProductDelete),t.xp6(2),t.Q6J("ngIf",e.data.Roles.HasProductEditor),t.xp6(1),t.Q6J("ngIf",!e.data.Roles.HasProductEditor)}}function ws(n,i){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,ys,3,0,"a",2),t.YNc(3,Is,2,2,"a",3),t.qZA(),t.TgZ(4,"content")(5,"div",4)(6,"table",5)(7,"thead",6)(8,"tr"),t.YNc(9,Ms,2,0,"th",7),t.TgZ(10,"th"),t._uU(11,"Name"),t.qZA()()(),t.TgZ(12,"tbody"),t.YNc(13,qs,5,3,"tr",8),t.qZA()()()()()),2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",e.data.Roles.HasProductDelete&&e.getSelectedData().length>0),t.xp6(1),t.Q6J("ngIf",e.data.Roles.HasProductCreate),t.xp6(6),t.Q6J("ngIf",e.data.Roles.HasProductDelete),t.xp6(4),t.Q6J("ngForOf",e.data.Data)}}let Ss=(()=>{class n extends v.n{constructor(e,o){super(e,"ProductSetup/GetTagsList",null,o),this.httpService=e}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(f._W))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-tags"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["role","button","class","btn btn-outline-secondary btn-lg ms-2 me-4",3,"click",4,"ngIf"],["class","button btn btn-success",3,"routerLink",4,"ngIf"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],["style","width: 14px",4,"ngIf"],["class","border-bottom ng-scope",4,"ngFor","ngForOf"],["role","button",1,"btn","btn-outline-secondary","btn-lg","ms-2","me-4",3,"click"],[1,"fa-solid","fa-trash"],[1,"button","btn","btn-success",3,"routerLink"],[2,"width","14px"],["type","checkbox",3,"change"],[1,"border-bottom","ng-scope"],[4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange"],[3,"routerLink","queryParams"]],template:function(e,o){1&e&&t.YNc(0,ws,14,7,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},directives:[c.O5,m.p,l.yS,c.sg,s.Wl,s.JJ,s.On],styles:[""]}),n})();function Us(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",10),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).httpPostListID("ProductSetup/RemoveUOMs")}),t._UZ(1,"i",11),t._uU(2," Delete"),t.qZA()}}const ve=function(){return["/menu/Products/Setup/UOM/Form"]};function Os(n,i){1&n&&(t.TgZ(0,"a",12),t._uU(1,"Add"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,ve))}function Js(n,i){1&n&&(t.TgZ(0,"th",13),t._UZ(1,"input",14),t.qZA())}function Vs(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"td")(1,"input",18),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().$implicit.selected=a})("ngModelChange",function(a){return t.CHM(e),t.oxw().$implicit.selected=a}),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.selected)("ngModel",e.selected)}}const ks=function(n){return{ID:n}};function Fs(n,i){if(1&n&&(t.TgZ(0,"span")(1,"a",19),t._uU(2),t.qZA()()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("routerLink",t.DdM(3,ve))("queryParams",t.VKq(4,ks,e.ID)),t.xp6(1),t.Oqu(e.Name)}}function Qs(n,i){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Name)}}function Ls(n,i){if(1&n&&(t.TgZ(0,"tr",15),t.YNc(1,Vs,2,2,"td",16),t.TgZ(2,"td"),t.YNc(3,Fs,3,6,"span",16),t.YNc(4,Qs,2,1,"span",16),t.qZA(),t._UZ(5,"td",17),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngIf",o.data.Roles.HasProductDelete),t.xp6(2),t.Q6J("ngIf",o.data.Roles.HasProductEditor),t.xp6(1),t.Q6J("ngIf",!o.data.Roles.HasProductEditor),t.xp6(1),t.Q6J("innerText",e.Description)}}function Hs(n,i){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,Us,3,0,"a",2),t.YNc(3,Os,2,2,"a",3),t.qZA(),t.TgZ(4,"content")(5,"div",4)(6,"table",5)(7,"thead",6)(8,"tr"),t.YNc(9,Js,2,0,"th",7),t.TgZ(10,"th",8),t._uU(11,"Name"),t.qZA(),t.TgZ(12,"th"),t._uU(13,"Description"),t.qZA()()(),t.TgZ(14,"tbody"),t.YNc(15,Ls,6,4,"tr",9),t.qZA()()()()()),2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",e.data.Roles.HasProductDelete&&e.getSelectedData().length>0),t.xp6(1),t.Q6J("ngIf",e.data.Roles.HasProductCreate),t.xp6(6),t.Q6J("ngIf",e.data.Roles.HasProductDelete),t.xp6(6),t.Q6J("ngForOf",e.data.Data)}}let Es=(()=>{class n extends v.n{constructor(e,o){super(e,"ProductSetup/GetUOMList",null,o),this.httpService=e}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(f._W))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-uom"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["role","button","class","btn btn-outline-secondary btn-lg ms-2 me-4",3,"click",4,"ngIf"],["class","button btn btn-success",3,"routerLink",4,"ngIf"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],["style","width: 14px",4,"ngIf"],[2,"width","100px"],["class","border-bottom ng-scope",4,"ngFor","ngForOf"],["role","button",1,"btn","btn-outline-secondary","btn-lg","ms-2","me-4",3,"click"],[1,"fa-solid","fa-trash"],[1,"button","btn","btn-success",3,"routerLink"],[2,"width","14px"],["type","checkbox","ng-model","checkAll","ng-change","ctrl.SelectAll(checkAll, data.Data)",1,"ng-pristine","ng-untouched","ng-valid","ng-empty"],[1,"border-bottom","ng-scope"],[4,"ngIf"],[1,"ng-binding",3,"innerText"],["type","checkbox",3,"ngModel","ngModelChange"],[3,"routerLink","queryParams"]],template:function(e,o){1&e&&t.YNc(0,Hs,16,7,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.pageData&&o.data)},directives:[c.O5,m.p,l.yS,c.sg,s.Wl,s.JJ,s.On],styles:[""]}),n})();var Kt=u(86617);const Ys=["inputRename"],Rs=["inputAdd"],Bs=function(){return["/menu/Products/Setup/Storages/Form"]};function $s(n,i){1&n&&(t.TgZ(0,"a",18),t._uU(1,"Add"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,Bs))}function js(n,i){if(1&n&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.Oqu(e.label)}}function Ks(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"input",19,20),t.NdJ("keyup",function(a){t.CHM(e);const r=t.MAs(1);return t.oxw(2).onKeydownEvent(a,"/API/catalog/product/RenameProductStorage",r.dirty)})("focusout",function(){t.CHM(e);const a=t.MAs(1);return t.oxw(2).saveRename("/API/catalog/product/RenameProductStorage",a.dirty)})("ngModelChange",function(a){return t.CHM(e).$implicit.label=a}),t.qZA()}2&n&&t.Q6J("ngModel",i.$implicit.label)}function Ws(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"input",19,21),t.NdJ("keyup",function(a){return t.CHM(e),t.oxw(2).onKeydownEvent(a,"/API/catalog/product/CreateProductStorage")})("focusout",function(){return t.CHM(e),t.oxw(2).saveAdd("/API/catalog/product/CreateProductStorage")})("ngModelChange",function(a){return t.CHM(e).$implicit.label=a}),t.qZA()}2&n&&t.Q6J("ngModel",i.$implicit.label)}function Gs(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,$s,2,2,"a",2),t.qZA(),t.TgZ(3,"content")(4,"div",3)(5,"div",4)(6,"p-contextMenu",5,6),t.NdJ("onShow",function(){return t.CHM(e),t.oxw().changeContextMenu()}),t.qZA(),t.TgZ(8,"p-tree",7),t.NdJ("onNodeDrop",function(a){return t.CHM(e),t.oxw().onDrop(a)})("selectionChange",function(a){return t.CHM(e),t.oxw().selectedNode=a}),t.YNc(9,js,2,1,"ng-template",8),t.YNc(10,Ks,3,1,"ng-template",9),t.YNc(11,Ws,2,1,"ng-template",10),t.qZA()(),t.TgZ(12,"div",11)(13,"div",12)(14,"div",13)(15,"h2",14),t._uU(16,"Tips"),t.qZA()(),t.TgZ(17,"div",15)(18,"ol",16)(19,"li"),t._uU(20,"Right click on any node to activate Context Menu and Create new storages"),t.qZA(),t.TgZ(21,"li",17),t._uU(22,"Drag & Drop is supported to move node to different locations"),t.qZA()()()()()()()()}if(2&n){const e=t.MAs(7),o=t.oxw();t.Q6J("pageData",o.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",o.data.Roles.HasProductCreate),t.xp6(4),t.Q6J("model",o.items),t.xp6(2),t.Q6J("value",o.data.Data)("selection",o.selectedNode)("contextMenu",e)}}let zs=(()=>{class n extends v.n{constructor(e,o,a){super(e,"catalog/product/GetProductStorageTreeNew"),this.router=o,this.toastr=a}postInit(){this.data.Data[0].children&&(this.data.Data[0].expanded=!0)}checkedHome(){return"Home"==this.selectedNode.label&&"disabled"}changeContextMenu(){this.items=[],this.items.push({label:"Add",icon:"fas fa-plus fa-fw",command:()=>this.add(this.selectedNode)}),this.items.push({label:"Rename",icon:`fas fa-edit fa-fw ${this.checkedHome()}`,command:()=>{this.checkedHome()||this.rename(this.selectedNode)}}),this.items.push({label:"Delete",icon:`fas fa-trash fa-fw ${this.checkedHome()}`,command:()=>this.checkedHome()?"":this.delete(this.selectedNode)}),this.items.push({label:"Properties",icon:`fas fa-tools fa-fw ${this.checkedHome()}`,command:()=>this.checkedHome()?"":this.properties(this.selectedNode)})}properties(e){C.gT.IsEmpty(e.id)||this.router.navigate(["/menu/Products/Setup/Storages/Info"],{queryParams:{ID:e.id}})}onDrop(e){this.httpService.post("/API/catalog/product/UpdateParentStorage",JSON.stringify({guidID:e.dragNode.id,parentID:e.dropNode.id})).subscribe(p=>{p.Success?e.dropNode.icon="fas fa-folder":this.toastr.error(p.Message,Z.n.Success)})}delete(e){if(!e.parent)return this.toastr.error("Can not delete Home",Z.n.Error),void(this.selectedNode=null);this.httpService.post("/API/catalog/product/DeleteProductStorage",JSON.stringify(e.id)).subscribe(a=>{if(a.Success){let r=e.parent.children.indexOf(e);e.parent.children.splice(r,1),this.toastr.success(a.Message,Z.n.Success)}else this.toastr.error(a.Message,Z.n.Error)})}rename(e){e.type="rename",this.oldLabel=e.label,setTimeout(()=>{this.inputNodeRename.nativeElement.focus()},100)}add(e){let o={label:"",type:"add",icon:"far fa-folder",children:[]};C.gT.IsEmpty(e.children)&&(e.children=[]),C.gT.IsNotEmpty(e.icon)&&delete e.icon,e.children.push(o),e.expandedIcon="fas fa-folder-open",e.collapsedIcon="fas fa-folder",e.expanded=!0,this.oldParent=e,this.selectedNode=o,setTimeout(()=>{this.inputNodeAdd.nativeElement.focus()},100)}saveAdd(e){this.selectedNode.type="default";let o={name:this.selectedNode.label,ID:this.selectedNode.id,parentID:this.selectedNode.parent.id};if(""==o.name)return this.toastr.error("Name is required",Z.n.Error),this.selectedNode.parent.children.pop(),this.selectedNode=null,void(0==this.selectedNode.parent.children.length&&(this.oldParent.icon="far fa-folder"));this.httpService.post(e,JSON.stringify(o)).subscribe({next:a=>{this.selectedNode.id=a.ObjectID,this.selectedNode=null},error:a=>{this.toastr.error(a.error,Z.n.Error),this.selectedNode.parent.children.pop(),this.selectedNode=null}})}saveRename(e,o){var a,r;this.selectedNode.type="default";let p={name:this.selectedNode.label,parentID:null===(r=null===(a=this.selectedNode)||void 0===a?void 0:a.parent)||void 0===r?void 0:r.id,guidID:this.selectedNode.id};""==p.name?(this.toastr.error("Name is required",Z.n.Error),this.selectedNode.label=this.oldLabel,this.selectedNode=null):o?this.httpService.post(e,JSON.stringify(p)).subscribe(x=>{this.selectedNode=null},x=>{this.toastr.error(x.error,Z.n.Error),this.selectedNode.label=this.oldLabel,this.selectedNode=null}):this.selectedNode=null}onKeydownEvent(e,o,a){"Enter"===e.key&&("rename"==this.selectedNode.type?this.saveRename(o,a):this.saveAdd(o))}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(l.F0),t.Y36(f._W))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-storage"]],viewQuery:function(e,o){if(1&e&&(t.Gf(Ys,5),t.Gf(Rs,5)),2&e){let a;t.iGM(a=t.CRH())&&(o.inputNodeRename=a.first),t.iGM(a=t.CRH())&&(o.inputNodeAdd=a.first)}},features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["class","button btn btn-success",3,"routerLink",4,"ngIf"],[1,"container-fluid","mt-5","d-flex"],[2,"width","70%"],["appendTo","body",3,"model","onShow"],["cm",""],["draggableNodes","true","droppableNodes","true","selectionMode","single",3,"value","selection","contextMenu","onNodeDrop","selectionChange"],["pTemplate","default"],["pTemplate","rename"],["pTemplate","add"],[2,"width","30%"],[1,"card"],[1,"card-header","py-5"],[1,"text-info"],[1,"card-body",2,"padding-left","18px"],[1,"mb-0",2,"padding-left","15px"],[1,"mt-3"],[1,"button","btn","btn-success",3,"routerLink"],["type","text",3,"ngModel","keyup","focusout","ngModelChange"],["dirtyRename","ngModel","inputRename",""],["inputAdd",""]],template:function(e,o){1&e&&t.YNc(0,Gs,23,8,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.pageData&&o.data)},directives:[c.O5,m.p,l.yS,Kt.xV,gt.mp,z.jx,s.Fj,s.JJ,s.On],styles:["p-tree[_ngcontent-%COMP%] div.p-tree {\n padding-top: 0 !important;\n padding-left: 0 !important;\n border: none !important;\n}\np-tree[_ngcontent-%COMP%] span.far.fa-folder {\n color: #d2d2cf !important;\n}\n.card-header[_ngcontent-%COMP%] {\n background-color: rgba(0, 0, 0, 0.03);\n}"]}),n})();function Xs(n,i){1&n&&(t.TgZ(0,"span",18),t._uU(1," Name required!"),t.qZA())}const tp=function(){return["/menu/Products/Setup/Brand"]};function ep(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"a",2),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"button",3),t.NdJ("click",function(){return t.CHM(e),t.oxw().onSubmit("ProductSetup/UpdateBrandsList")}),t._uU(5,"Save"),t.qZA()(),t.TgZ(6,"content")(7,"div",4),t._UZ(8,"alert",5),t.TgZ(9,"div",6)(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",7)(14,"h3"),t._uU(15,"General"),t.qZA()()(),t.TgZ(16,"div",10)(17,"div",7)(18,"div",11)(19,"input",12,13),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.Name=a}),t.qZA(),t.TgZ(21,"label",14),t._uU(22,"Name"),t.qZA(),t.YNc(23,Xs,2,0,"span",15),t.qZA(),t.TgZ(24,"div",11)(25,"input",16),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.Code=a}),t.qZA(),t.TgZ(26,"label",17),t._uU(27,"Code"),t.qZA()()()()()()()()()()}if(2&n){const e=t.MAs(20),o=t.oxw();t.Q6J("pageData",o.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(8,tp)),t.xp6(2),t.Q6J("disabled",!(null!=o.formData&&o.formData.Name)),t.xp6(15),t.Q6J("ngModel",o.formData.Name),t.xp6(4),t.Q6J("ngIf",e.touched&&e.invalid),t.xp6(2),t.Q6J("ngModel",o.formData.Code)}}let np=(()=>{class n extends Y.U{constructor(e,o,a,r){super(e,"ProductSetup/BrandFormInitial",o),this.activatedRoute=o,this.router=a,this.toaster=r}onSubmitSuccess(e){this.toaster.success("Success Submit Brand",Z.n.Success),this.router.navigate(["/menu/Products/Setup/Brand"])}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(l.gz),t.Y36(l.F0),t.Y36(f._W))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-form-brands"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"btn","btn-outline-secondary","btn-lg","me-4",3,"routerLink"],["title","Save",1,"button","btn","btn-success",3,"disabled","click"],[1,"container-fluid","bg-light-gray","form-horizontal"],["data","ctrl.Alert"],[1,"row"],[1,"col-sm-12"],[1,"card","mt-10"],[1,"card-header"],[1,"card-body"],[1,"form-floating-outline"],["type","text","id","inputName","placeholder","Name","autofocus","","required","","name","Name",1,"form-control",3,"ngModel","ngModelChange"],["Name","ngModel"],["for","inputName"],["class","control-label text-danger",4,"ngIf"],["type","text","id","inputCode","placeholder","Code","maxlength","100",1,"form-control",3,"ngModel","ngModelChange"],["for","inputCode"],[1,"control-label","text-danger"]],template:function(e,o){1&e&&t.YNc(0,ep,28,9,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.formData&&o.data)},directives:[c.O5,m.p,l.yS,s.Fj,s.Q7,s.JJ,s.On,s.nD],styles:[""]}),n})();function op(n,i){1&n&&(t.TgZ(0,"span",18),t._uU(1," Name required!"),t.qZA())}const ap=function(){return["/menu/Products/Setup/Measurement"]};function ip(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"a",2),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"button",3),t.NdJ("click",function(){return t.CHM(e),t.oxw().onSubmit("ProductSetup/UpdateMeasurementList")}),t._uU(5,"Save"),t.qZA()(),t.TgZ(6,"content")(7,"div",4),t._UZ(8,"alert",5),t.TgZ(9,"div",6)(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",7)(14,"h3"),t._uU(15,"General"),t.qZA()()(),t.TgZ(16,"div",10)(17,"div",7)(18,"div",11)(19,"input",12,13),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.Name=a}),t.qZA(),t.TgZ(21,"label",14),t._uU(22,"Name"),t.qZA(),t.YNc(23,op,2,0,"span",15),t.qZA(),t.TgZ(24,"div",11)(25,"textarea",16),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.Description=a}),t.qZA(),t.TgZ(26,"label",17),t._uU(27,"Description"),t.qZA()()()()()()()()()()}if(2&n){const e=t.MAs(20),o=t.oxw();t.Q6J("pageData",o.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(8,ap)),t.xp6(2),t.Q6J("disabled",!(null!=o.formData&&o.formData.Name)),t.xp6(15),t.Q6J("ngModel",o.formData.Name),t.xp6(4),t.Q6J("ngIf",e.touched&&e.invalid),t.xp6(2),t.Q6J("ngModel",o.formData.Description)}}let rp=(()=>{class n extends Y.U{constructor(e,o,a,r){super(e,"ProductSetup/MeasurementFormInitial",o),this.activatedRoute=o,this.router=a,this.toaster=r}onSubmitSuccess(e){this.toaster.success("Success Submit Measurement",Z.n.Success),this.router.navigate(["/menu/Products/Setup/Measurement"])}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(l.gz),t.Y36(l.F0),t.Y36(f._W))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-form-measurement"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"btn","btn-outline-secondary","btn-lg","me-4",3,"routerLink"],["title","Save",1,"button","btn","btn-lg","btn-success",3,"disabled","click"],[1,"container-fluid","bg-light-gray","form-horizontal"],["data","ctrl.Alert"],[1,"row"],[1,"col-sm-12"],[1,"card","mt-10"],[1,"card-header"],[1,"card-body"],[1,"form-floating-outline"],["type","text","id","inputName","placeholder","Name","autofocus","","required","","name","Name",1,"form-control",3,"ngModel","ngModelChange"],["Name","ngModel"],["for","inputName"],["class","control-label text-danger",4,"ngIf"],["id","inputDescription","placeholder","Description",1,"form-control",3,"ngModel","ngModelChange"],["for","inputDescription"],[1,"control-label","text-danger"]],template:function(e,o){1&e&&t.YNc(0,ip,28,9,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.formData&&o.data)},directives:[c.O5,m.p,l.yS,s.Fj,s.Q7,s.JJ,s.On],styles:[""]}),n})();function lp(n,i){1&n&&(t.TgZ(0,"span",16),t._uU(1," Name required!"),t.qZA())}const cp=function(){return["/menu/Products/Setup/Tags"]};function sp(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"a",2),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"button",3),t.NdJ("click",function(){return t.CHM(e),t.oxw().onSubmit("ProductSetup/UpdateTagsList")}),t._uU(5,"Save"),t.qZA()(),t.TgZ(6,"content")(7,"div",4),t._UZ(8,"alert",5),t.TgZ(9,"div",6)(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",7)(14,"h3"),t._uU(15,"General"),t.qZA()()(),t.TgZ(16,"div",10)(17,"div",7)(18,"div",11)(19,"input",12,13),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.Name=a}),t.qZA(),t.TgZ(21,"label",14),t._uU(22,"Name"),t.qZA(),t.YNc(23,lp,2,0,"span",15),t.qZA()()()()()()()()()}if(2&n){const e=t.MAs(20),o=t.oxw();t.Q6J("pageData",o.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(7,cp)),t.xp6(2),t.Q6J("disabled",!(null!=o.formData&&o.formData.Name)),t.xp6(15),t.Q6J("ngModel",o.formData.Name),t.xp6(4),t.Q6J("ngIf",e.touched&&e.invalid)}}let pp=(()=>{class n extends Y.U{constructor(e,o,a,r){super(e,"ProductSetup/TagFormInitials",o),this.activatedRoute=o,this.router=a,this.toaster=r}onSubmitSuccess(e){this.toaster.success("Success Submit Tags",Z.n.Success),this.router.navigate(["/menu/Products/Setup/Tags"])}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(l.gz),t.Y36(l.F0),t.Y36(f._W))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-form-tags"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"btn","btn-outline-secondary","btn-lg","me-4",3,"routerLink"],["title","Save",1,"button","btn","btn-lg","btn-success",3,"disabled","click"],[1,"container-fluid","bg-light-gray","form-horizontal"],["data","ctrl.Alert"],[1,"row"],[1,"col-sm-12"],[1,"card","mt-10"],[1,"card-header"],[1,"card-body"],[1,"form-floating-outline"],["type","text","id","inputName","placeholder","Name","autofocus","","required","","name","Name",1,"form-control",3,"ngModel","ngModelChange"],["Name","ngModel"],["for","inputName"],["class","control-label text-danger",4,"ngIf"],[1,"control-label","text-danger"]],template:function(e,o){1&e&&t.YNc(0,sp,24,8,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.formData&&o.data)},directives:[c.O5,m.p,l.yS,s.Fj,s.Q7,s.JJ,s.On],styles:[""]}),n})();function dp(n,i){1&n&&(t.TgZ(0,"span",18),t._uU(1," Name required!"),t.qZA())}const up=function(){return["/menu/Products/Setup/UOM"]};function _p(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"a",2),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"button",3),t.NdJ("click",function(){return t.CHM(e),t.oxw().onSubmit("ProductSetup/PostUOM")}),t._uU(5,"Save"),t.qZA()(),t.TgZ(6,"content")(7,"div",4),t._UZ(8,"alert",5),t.TgZ(9,"div",6)(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",7)(14,"h3"),t._uU(15,"General"),t.qZA()()(),t.TgZ(16,"div",10)(17,"div",7)(18,"div",11)(19,"input",12,13),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.Name=a}),t.qZA(),t.TgZ(21,"label",14),t._uU(22,"Name"),t.qZA(),t.YNc(23,dp,2,0,"span",15),t.qZA(),t.TgZ(24,"div",11)(25,"textarea",16),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.Description=a}),t.qZA(),t.TgZ(26,"label",17),t._uU(27,"Description"),t.qZA()()()()()()()()()()}if(2&n){const e=t.MAs(20),o=t.oxw();t.Q6J("pageData",o.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(8,up)),t.xp6(2),t.Q6J("disabled",!(null!=o.formData&&o.formData.Name)),t.xp6(15),t.Q6J("ngModel",o.formData.Name),t.xp6(4),t.Q6J("ngIf",e.touched&&e.invalid),t.xp6(2),t.Q6J("ngModel",o.formData.Description)}}let mp=(()=>{class n extends Y.U{constructor(e,o,a,r){super(e,"ProductSetup/UOMFormInitial",o),this.activatedRoute=o,this.router=a,this.toaster=r}onSubmitSuccess(e){this.toaster.success("Success Submit UOM",Z.n.Success),this.router.navigate(["/menu/Products/Setup/UOM"])}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(l.gz),t.Y36(l.F0),t.Y36(f._W))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-form-uom"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"btn","btn-outline-secondary","btn-lg","me-4",3,"routerLink"],["title","Save",1,"button","btn","btn-lg","btn-success",3,"disabled","click"],[1,"container-fluid","bg-light-gray","form-horizontal"],["data","ctrl.Alert"],[1,"row"],[1,"col-sm-12"],[1,"card","mt-10"],[1,"card-header"],[1,"card-body"],[1,"form-floating-outline"],["type","text","id","inputName","placeholder","Name","autofocus","","required","","name","Name",1,"form-control",3,"ngModel","ngModelChange"],["Name","ngModel"],["for","inputName"],["class","control-label text-danger",4,"ngIf"],["id","inputDescription","placeholder","Description",1,"form-control",3,"ngModel","ngModelChange"],["for","inputDescription"],[1,"control-label","text-danger"]],template:function(e,o){1&e&&t.YNc(0,_p,28,9,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.formData&&o.data)},directives:[c.O5,m.p,l.yS,s.Fj,s.Q7,s.JJ,s.On],styles:[""]}),n})();function gp(n,i){1&n&&(t.TgZ(0,"span",21),t._uU(1," Name required."),t.qZA())}const fp=function(){return["/menu/Products/Setup/Storages"]},hp=function(n){return{invalid:n}},xp=function(n){return{selected:n}};function Cp(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"a",2),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"button",3),t.NdJ("click",function(){return t.CHM(e),t.oxw().onSubmit("catalog/product/ProductStorageSubmit")}),t._uU(5,"Save"),t.qZA()(),t.TgZ(6,"content")(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h3"),t._uU(13,"General"),t.qZA()(),t.TgZ(14,"div",9)(15,"div",10)(16,"input",11,12),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.Model=a})("ngModelChange",function(){return t.CHM(e),t.oxw().changeName()}),t.qZA(),t.TgZ(18,"label",13),t._uU(19,"Name"),t.qZA(),t.YNc(20,gp,2,0,"span",14),t.qZA(),t.TgZ(21,"div",15)(22,"div",16)(23,"ng-select",17),t.NdJ("change",function(){return t.CHM(e),t.oxw().changeName()})("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.ParentID=a}),t.qZA(),t.TgZ(24,"label",18),t._uU(25,"Parent"),t.qZA()()(),t.TgZ(26,"div",10),t._UZ(27,"input",19),t.TgZ(28,"label",20),t._uU(29,"Display"),t.qZA()()()()()()()()()}if(2&n){const e=t.MAs(17),o=t.oxw();t.Q6J("pageData",o.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(12,fp)),t.xp6(2),t.Q6J("disabled",!(null!=o.formData&&o.formData.Name)),t.xp6(12),t.Q6J("ngModel",o.formData.Model)("ngClass",t.VKq(13,hp,o.ValidNameCode)),t.xp6(4),t.Q6J("ngIf",e.touched&&e.invalid),t.xp6(2),t.Q6J("ngClass",t.VKq(15,xp,o.IsNotEmpty(o.formData.ParentID))),t.xp6(1),t.Q6J("items",o.options.Storages)("ngModel",o.formData.ParentID),t.xp6(4),t.Q6J("ngModel",o.formData.Name)}}let vp=(()=>{class n extends Y.U{constructor(e,o,a,r){super(e,"catalog/ProductLoader/ProductStorageForm",o),this.activatedRoute=o,this.router=a,this.toaster=r}postBindForm(e){this.activatedRoute.queryParams?this.menuData.H=e.PageTitle:this.formData.ParentID=null}onSubmitSuccess(e){this.toaster.success("Success Submit Storages",Z.n.Success),this.router.navigate(["/menu/Products/Setup/Storages"])}changeName(){const e=this.options.Storages,o=this.formData.Model?this.formData.Model:"";let a;this.IsNotEmpty(this.formData.ParentID)&&e.forEach(r=>{r.Key==this.formData.ParentID&&(a=r.Value)}),this.formData.Name=a?`${a}/${o}`:o}IsNotEmpty(e){return C.gT.IsNotEmpty(e)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(l.gz),t.Y36(l.F0),t.Y36(f._W))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-form-storage"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"btn","btn-outline-secondary","btn-lg","me-4",3,"routerLink"],["title","Save",1,"button","btn","btn-lg","btn-success",3,"disabled","click"],[1,"container-fluid","bg-light-gray","form-horizontal","pt-4"],[1,"row"],[1,"col-md-8"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"form-floating-outline"],["type","text","id","inputName","placeholder","Name","name","productName","ng-model-options","{ debounce: 400 }","autofocus","","required","",1,"form-control",3,"ngModel","ngClass","ngModelChange"],["productName","ngModel"],["for","inputName"],["class","control-label text-danger",4,"ngIf"],[1,"row","g-0"],[1,"form-floating-outline","col",3,"ngClass"],["bindLabel","Value","bindValue","Key",1,"productform",3,"items","ngModel","change","ngModelChange"],["for","inputParent",1,"ng-select"],["type","text","id","inputDisplay","placeholder","Display","name","categoryDisplay","disabled","",1,"form-control",3,"ngModel"],["for","inputDisplay"],[1,"control-label","text-danger"]],template:function(e,o){1&e&&t.YNc(0,Cp,30,17,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.formData&&o.data)},directives:[c.O5,m.p,l.yS,s.Fj,s.Q7,s.JJ,s.On,c.mk,y.w9],styles:[""]}),n})();const Tp=function(){return["/menu/Products/Setup/Storages/Form"]},Te=function(n){return{ID:n}},Zp=function(){return["/menu/Products/Setup/Storages/Info"]};function bp(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"div",2)(3,"a",3),t._UZ(4,"i",4),t._uU(5," Edit"),t.qZA(),t.TgZ(6,"a",5),t.NdJ("click",function(){return t.CHM(e),t.oxw().onSubmit("catalog/product/ProductStorageDelete")}),t._UZ(7,"i",6),t._uU(8," Delete"),t.qZA()()(),t.TgZ(9,"content")(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"div",11)(15,"h3"),t._uU(16,"General"),t.qZA()(),t.TgZ(17,"div",12)(18,"div",13),t._UZ(19,"POS-info-page-input",14),t.qZA(),t.TgZ(20,"div",15)(21,"div",16)(22,"a",17),t._uU(23),t.qZA(),t.TgZ(24,"label"),t._uU(25,"Parent"),t.qZA()()(),t.TgZ(26,"div",13),t._UZ(27,"POS-info-page-input",18),t.qZA()()()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(3),t.Q6J("routerLink",t.DdM(10,Tp))("queryParams",t.VKq(11,Te,e.formData.ID)),t.xp6(16),t.Q6J("inputValue",e.formData.Model),t.xp6(3),t.Q6J("routerLink",t.DdM(13,Zp))("queryParams",t.VKq(14,Te,e.formData.ParentID)),t.xp6(1),t.Oqu(e.parentName),t.xp6(4),t.Q6J("inputValue",e.formData.Name)}}let yp=(()=>{class n extends Y.U{constructor(e,o,a,r){super(e,"catalog/ProductLoader/ProductStorageForm",o),this.httpService=e,this.activatedRoute=o,this.toaster=a,this.router=r}postBindForm(){this.options.Storages.forEach(e=>{e.Key==this.formData.ParentID&&(this.parentName=e.Value)})}onSubmitSuccess(e){this.toaster.success("Success Delete Storages",Z.n.Success),this.router.navigate(["/menu/Products/Setup/Storages"])}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(l.gz),t.Y36(f._W),t.Y36(l.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-storage"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa-solid","fa-edit"],["role","button",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-trash"],[1,"container-fluid","bg-light-gray","form-horizontal","pt-4"],[1,"row"],[1,"col-md-8"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"form-floating-outline"],["labelValue","Name",3,"inputValue"],[1,"row","g-0"],[1,"form-floating-outline","floating-url","w-100"],["target","_blank",1,"form-control",3,"routerLink","queryParams"],["labelValue","Display",3,"inputValue"]],template:function(e,o){1&e&&t.YNc(0,bp,28,16,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.formData&&o.data)},directives:[c.O5,m.p,l.yS,yt.o],styles:[".floating-url[_ngcontent-%COMP%] > label[_ngcontent-%COMP%] {\n background-color: white;\n font-size: 0.75rem !important;\n color: #9da2a6;\n top: -10px !important;\n padding: 0 0.25rem;\n left: 0.5rem;\n}\n\n.floating-url[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] {\n height: 3.625rem;\n padding: 0.75rem !important;\n font-size: 0.875rem;\n border-radius: 0.25rem !important;\n display: flex;\n align-items: center;\n color: #0976b4;\n}\n\n.floating-url[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] [_ngcontent-%COMP%]:hover {\n color: #05466b;\n}"]}),n})();var Ip=u(22863),Mp=u(24351);const Pp=["inputRename"],Dp=["inputAdd"],Ap=function(){return["/menu/Products/Catalog/Categories/Form"]};function Np(n,i){1&n&&(t.TgZ(0,"a",18),t._uU(1,"Add"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,Ap))}function qp(n,i){if(1&n&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.Oqu(e.label)}}function wp(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"input",19,20),t.NdJ("keyup",function(a){t.CHM(e);const r=t.MAs(1);return t.oxw(2).onKeydownEvent(a,"/API/catalog/category/RenameProductCategory",r.dirty)})("focusout",function(){t.CHM(e);const a=t.MAs(1);return t.oxw(2).saveRename("/API/catalog/category/RenameProductCategory",a.dirty)})("ngModelChange",function(a){return t.CHM(e).$implicit.label=a}),t.qZA()}2&n&&t.Q6J("ngModel",i.$implicit.label)}function Sp(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"input",19,21),t.NdJ("keyup",function(a){return t.CHM(e),t.oxw(2).onKeydownEvent(a,"/API/catalog/category/CreateProductCategory")})("focusout",function(){return t.CHM(e),t.oxw(2).saveAdd("/API/catalog/category/CreateProductCategory")})("ngModelChange",function(a){return t.CHM(e).$implicit.label=a}),t.qZA()}2&n&&t.Q6J("ngModel",i.$implicit.label)}function Up(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,Np,2,2,"a",2),t.qZA(),t.TgZ(3,"content")(4,"div",3)(5,"div",4),t._UZ(6,"p-contextMenu",5,6),t.TgZ(8,"p-tree",7),t.NdJ("onNodeDrop",function(a){return t.CHM(e),t.oxw().onDrop(a)})("selectionChange",function(a){return t.CHM(e),t.oxw().selectedNode=a}),t.YNc(9,qp,2,1,"ng-template",8),t.YNc(10,wp,3,1,"ng-template",9),t.YNc(11,Sp,2,1,"ng-template",10),t.qZA()(),t.TgZ(12,"div",11)(13,"div",12)(14,"div",13)(15,"h2"),t._uU(16,"Tips"),t.qZA()(),t.TgZ(17,"div",14)(18,"ol",15)(19,"li"),t._uU(20,"Context menu is available to ADD or Delete a Category (Activate by using right click on your Mouse)"),t.qZA(),t.TgZ(21,"li",16),t._uU(22,"You can Drag and Drop folder to a new Location (Example: move a folder to be inside another folder)"),t.qZA(),t.TgZ(23,"li",16),t._uU(24,"Read Product Category in this "),t.TgZ(25,"a",17),t._uU(26,"article"),t.qZA()()()()()()()()()}if(2&n){const e=t.MAs(7),o=t.oxw();t.Q6J("pageData",o.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",o.data.Roles.HasProductCreate),t.xp6(4),t.Q6J("model",o.items),t.xp6(2),t.Q6J("value",o.data.Data)("selection",o.selectedNode)("contextMenu",e)}}let Op=(()=>{class n extends Ip.M{constructor(e,o,a){super(e),this.Router=o,this.toastr=a,this.menuData$.pipe((0,Mp.b)(()=>this.httpService.post("/API/catalog/category/GetProductCategoryTreeNew"))).subscribe(r=>{this.data=r,this.data.Data[0].children&&(this.data.Data[0].expanded=!0)})}ngOnInit(){this.items=[],this.items.push({label:"Add",icon:"fas fa-plus fa-fw",command:e=>this.add(this.selectedNode)}),this.items.push({label:"Delete",icon:"fas fa-trash fa-fw",command:e=>this.delete(this.selectedNode)}),this.items.push({label:"Rename",icon:"fas fa-edit fa-fw",command:e=>this.rename(this.selectedNode)}),this.items.push({label:"Properties",icon:"fas fa-tools fa-fw",command:e=>this.properties(this.selectedNode)})}properties(e){C.gT.IsEmpty(e.id)||this.Router.navigate(["/menu/Products/Catalog/Categories/Info"],{queryParams:{ID:e.id}})}onDrop(e){this.httpService.post("/API/catalog/category/UpdateParentCategory",JSON.stringify({guidID:e.dragNode.id,parentID:e.dropNode.id})).subscribe(p=>{p.Success?e.dropNode.icon="fas fa-folder":this.toastr.error(p.Message,Z.n.Error)})}delete(e){if(!e.parent)return this.toastr.error("Can not delete Home",Z.n.Error),void(this.selectedNode=null);this.httpService.post("/API/catalog/category/DeleteProductCategory",JSON.stringify({ID:e.id})).subscribe(a=>{let r=e.parent.children.indexOf(e);e.parent.children.splice(r,1),this.toastr.success(a.Message,Z.n.Success)})}rename(e){e.type="rename",this.oldLabel=e.label,setTimeout(()=>{this.inputNodeRename.nativeElement.focus()},100)}add(e){let o={label:"",type:"add",icon:"far fa-folder",children:[]};C.gT.IsEmpty(e.children)&&(e.children=[]),C.gT.IsNotEmpty(e.icon)&&delete e.icon,e.children.push(o),e.expandedIcon="fas fa-folder-open",e.collapsedIcon="fas fa-folder",e.expanded=!0,this.oldParent=e,this.selectedNode=o,setTimeout(()=>{this.inputNodeAdd.nativeElement.focus()},100)}saveAdd(e){this.selectedNode.type="default";let o={name:this.selectedNode.label,ID:this.selectedNode.id,parentID:this.selectedNode.parent.id};if(""==o.name)return this.toastr.error("Name is required",Z.n.Error),this.selectedNode.parent.children.pop(),0==this.selectedNode.parent.children.length&&(this.oldParent.icon="far fa-folder"),void(this.selectedNode=null);this.httpService.post(e,JSON.stringify(o)).subscribe({next:a=>{this.selectedNode.id=a.ID,this.selectedNode=null},error:a=>{this.selectedNode.parent.children.pop(),this.selectedNode=null}})}saveRename(e,o){var a,r;this.selectedNode.type="default";let p={name:this.selectedNode.label,parentID:null===(r=null===(a=this.selectedNode)||void 0===a?void 0:a.parent)||void 0===r?void 0:r.id,guidID:this.selectedNode.id};""==p.name?(this.toastr.error("Name is required",Z.n.Error),this.selectedNode.label=this.oldLabel,this.selectedNode=null):o?this.httpService.post(e,JSON.stringify(p)).subscribe({next:x=>{this.selectedNode=null,this.toastr.success("Successfully rename category",Z.n.Success)},error:x=>{this.selectedNode.label=this.oldLabel,this.selectedNode=null}}):this.selectedNode=null}onKeydownEvent(e,o,a){"Enter"===e.key&&("rename"==this.selectedNode.type?this.saveRename(o,a):this.saveAdd(o))}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(l.F0),t.Y36(f._W))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-category"]],viewQuery:function(e,o){if(1&e&&(t.Gf(Pp,5),t.Gf(Dp,5)),2&e){let a;t.iGM(a=t.CRH())&&(o.inputNodeRename=a.first),t.iGM(a=t.CRH())&&(o.inputNodeAdd=a.first)}},features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["class","button btn btn-success",3,"routerLink",4,"ngIf"],[1,"container-fluid","mt-5","d-flex"],[2,"width","70%"],["appendTo","body",3,"model"],["cm",""],["draggableNodes","true","droppableNodes","true","selectionMode","single",3,"value","selection","contextMenu","onNodeDrop","selectionChange"],["pTemplate","default"],["pTemplate","rename"],["pTemplate","add"],[2,"width","30%"],[1,"card"],[1,"card-header","py-5"],[1,"card-body","ps-6"],[1,"mb-0","ps-5"],[1,"mt-3"],["href","https://support.dealpos.com/en/articles/4773748-product-introduction","target","blank"],[1,"button","btn","btn-success",3,"routerLink"],["type","text",3,"ngModel","keyup","focusout","ngModelChange"],["dirtyRename","ngModel","inputRename",""],["inputAdd",""]],template:function(e,o){1&e&&t.YNc(0,Up,27,8,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},directives:[c.O5,m.p,l.yS,Kt.xV,gt.mp,z.jx,s.Fj,s.JJ,s.On],styles:["p-tree[_ngcontent-%COMP%] div.p-tree {\n padding-top: 0 !important;\n padding-left: 0 !important;\n border: none !important;\n}\np-tree[_ngcontent-%COMP%] span.far.fa-folder {\n color: #D2D2CF !important;\n}\n.card-header[_ngcontent-%COMP%] {\n background-color: rgba(0, 0, 0, 0.03);\n}\n.card-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n color: #2596be;\n}"]}),n})();function Jp(n,i){1&n&&(t.TgZ(0,"span",39),t._uU(1," Name required."),t.qZA())}const Vp=function(){return["/menu/Products/Catalog/Categories"]},Jt=function(n){return{selected:n}};function kp(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"a",2),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"button",3),t.NdJ("click",function(){return t.CHM(e),t.oxw().onSubmit("catalog/category/ProductCategorySubmit")}),t._uU(5,"Submit"),t.qZA()(),t.TgZ(6,"content")(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h3"),t._uU(13,"General"),t.qZA()(),t.TgZ(14,"div",9)(15,"div",10)(16,"input",11,12),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.Model=a})("ngModelChange",function(){return t.CHM(e),t.oxw().changeCategory()}),t.qZA(),t.TgZ(18,"label",13),t._uU(19,"Name"),t.qZA(),t.YNc(20,Jp,2,0,"span",14),t.qZA(),t.TgZ(21,"div",15)(22,"div",16)(23,"ng-select",17),t.NdJ("change",function(){return t.CHM(e),t.oxw().changeCategory()})("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.ParentID=a}),t.qZA(),t.TgZ(24,"label",18),t._uU(25,"Parent"),t.qZA()()(),t.TgZ(26,"div",10)(27,"input",19),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.Name=a}),t.qZA(),t.TgZ(28,"label",20),t._uU(29,"Display"),t.qZA()(),t.TgZ(30,"div",5)(31,"div",21)(32,"div",10)(33,"input",22),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.Code=a}),t.qZA(),t.TgZ(34,"label",23),t._uU(35,"SKU Prefix"),t.qZA()()(),t.TgZ(36,"div",21)(37,"div",10)(38,"input",24),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.SKUSeed=a}),t.qZA(),t.TgZ(39,"label",25),t._uU(40,"SKU Seed"),t.qZA()()()()()()(),t.TgZ(41,"div",26)(42,"div",7)(43,"div",8)(44,"h3"),t._uU(45,"Advanced"),t.qZA()(),t.TgZ(46,"div",9)(47,"div",5)(48,"div",27)(49,"div",28)(50,"ng-select",29),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.UOM=a}),t.qZA(),t.TgZ(51,"label",30),t._uU(52,"UOM"),t.qZA()()(),t.TgZ(53,"div",27)(54,"div",28)(55,"ng-select",29),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.UOMQ=a}),t.qZA(),t.TgZ(56,"label",31),t._uU(57,"UOMQ"),t.qZA()()()(),t.TgZ(58,"div",5)(59,"div",32)(60,"div",28)(61,"ng-select",29),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.MeasurementID=a}),t.qZA(),t.TgZ(62,"label",33),t._uU(63,"Measurement"),t.qZA()()()(),t.TgZ(64,"div",5)(65,"div",32)(66,"div",34)(67,"ng-select",35),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.TypeID=a}),t.qZA(),t.TgZ(68,"label",36),t._uU(69,"Type"),t.qZA()()()(),t.TgZ(70,"div",5)(71,"div",32)(72,"div",10)(73,"textarea",37),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.Description=a}),t.qZA(),t.TgZ(74,"label",38),t._uU(75,"Description"),t.qZA()()()()()()()()()()()}if(2&n){const e=t.MAs(17),o=t.oxw();t.Q6J("pageData",o.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(26,Vp)),t.xp6(2),t.Q6J("disabled",!(null!=o.formData&&o.formData.Name)),t.xp6(12),t.Q6J("ngModel",o.formData.Model),t.xp6(4),t.Q6J("ngIf",e.touched&&e.invalid),t.xp6(2),t.Q6J("ngClass",t.VKq(27,Jt,o.IsNotEmpty(o.formData.ParentID))),t.xp6(1),t.Q6J("items",o.options.Categories)("ngModel",o.formData.ParentID),t.xp6(4),t.Q6J("ngModel",o.formData.Name),t.xp6(6),t.Q6J("ngModel",o.formData.Code),t.xp6(5),t.Q6J("ngModel",o.formData.SKUSeed),t.xp6(11),t.Q6J("ngClass",t.VKq(29,Jt,o.IsNotEmpty(o.formData.UOM))),t.xp6(1),t.Q6J("items",o.options.UOMs)("ngModel",o.formData.UOM),t.xp6(4),t.Q6J("ngClass",t.VKq(31,Jt,o.IsNotEmpty(o.formData.UOMQ))),t.xp6(1),t.Q6J("items",o.options.UOMQ)("ngModel",o.formData.UOMQ),t.xp6(5),t.Q6J("ngClass",t.VKq(33,Jt,o.IsNotEmpty(o.formData.MeasurementID))),t.xp6(1),t.Q6J("items",o.options.Measurements)("ngModel",o.formData.MeasurementID),t.xp6(6),t.Q6J("clearable",!1)("items",o.options.CategoryTypes)("ngModel",o.formData.TypeID),t.xp6(6),t.Q6J("ngModel",o.formData.Description)}}let Fp=(()=>{class n extends Y.U{constructor(e,o,a,r){super(e,"catalog/ProductCategoryLoader/ProductCategoryForm",o),this.activatedRoute=o,this.router=a,this.toaster=r}postBindForm(e){this.menuData.H=e.PageTitle}IsNotEmpty(e){return C.gT.IsNotEmpty(e)}changeCategory(){const e=this.options.Categories,o=this.formData.Model?this.formData.Model:"";let a;this.IsNotEmpty(this.formData.ParentID)&&e.forEach(r=>{r.Key==this.formData.ParentID&&(a=r.Value)}),this.formData.Name=a?`${a}/${o}`:o}onSubmitSuccess(e){this.toaster.success("Success Submit Category",Z.n.Success),this.router.navigate(["/menu/Products/Catalog/Categories"])}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(l.gz),t.Y36(l.F0),t.Y36(f._W))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-form-category"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-outline-secondary","btn-lg","ms-2","me-5",3,"routerLink"],["type","button",1,"btn","btn-success","btn-lg",3,"disabled","click"],[1,"container-fluid","bg-light-gray","pt-5"],[1,"row"],[1,"col-md-8"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"form-floating-outline"],["type","text","id","inputName","placeholder","Name","name","productName","autofocus","","required","",1,"form-control",3,"ngModel","ngModelChange"],["productName","ngModel"],["for","inputName"],["class","control-label text-danger",4,"ngIf"],[1,"row","g-0"],[1,"form-floating-outline","col",3,"ngClass"],["bindLabel","Value","bindValue","Key",1,"productform",3,"items","ngModel","change","ngModelChange"],["for","inputParent",1,"ng-select"],["type","text","id","inputDisplay","placeholder","Display","name","categoryDisplay","disabled","",1,"form-control",3,"ngModel","ngModelChange"],["for","inputDisplay"],[1,"col-sm-6"],["type","text","id","inputSKUPrefix","placeholder","SKU Prefix","name","SKUPrefix",1,"form-control",3,"ngModel","ngModelChange"],["for","inputSKUPrefix"],["type","text","id","inputSKUSeed","placeholder","SKU Seed","name","SKUSeed","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["for","inputSKUSeed"],[1,"col-md-4"],[1,"col-md-6"],[1,"form-floating-outline",3,"ngClass"],["bindLabel","Name","bindValue","ID",1,"productform",3,"items","ngModel","ngModelChange"],["for","inputUOM",1,"ng-select"],["for","inputUOMQ",1,"ng-select"],[1,"col-sm-12"],["for","inputMeasurement",1,"ng-select"],[1,"form-floating-outline","flexRow","selected"],["bindLabel","Value","bindValue","Key",1,"productform",3,"clearable","items","ngModel","ngModelChange"],["for","inputType",1,"ng-select"],["id","inputDescription","placeholder","Description","ng-keyup","ctrl.setHeightTextarea('inputDescription')",1,"form-control",3,"ngModel","ngModelChange"],["for","inputDescription"],[1,"control-label","text-danger"]],template:function(e,o){1&e&&t.YNc(0,kp,76,35,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.formData&&o.data)},directives:[c.O5,m.p,l.yS,s.Fj,s.Q7,s.JJ,s.On,c.mk,y.w9,B.b],styles:[""]}),n})();const Qp=function(){return["/menu/Products/Catalog/Categories/Form"]},Wt=function(n){return{ID:n}};function Lp(n,i){if(1&n&&(t.TgZ(0,"a",24),t._UZ(1,"i",25),t._uU(2," Edit"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("routerLink",t.DdM(2,Qp))("queryParams",t.VKq(3,Wt,e.formData.ID))}}function Hp(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",26),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).removeCategory()}),t._UZ(1,"i",27),t._uU(2," Delete"),t.qZA()}}const Ep=function(){return["/menu/Inventory/Quantity/Valuation"]},Yp=function(){return["/menu/Products/Catalog/Categories/Info"]};function Rp(n,i){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"a",2),t._uU(3,"View Inventory"),t.qZA(),t.TgZ(4,"div",3),t.YNc(5,Lp,3,5,"a",4),t.YNc(6,Hp,3,0,"a",5),t.qZA()(),t.TgZ(7,"content")(8,"div",6)(9,"div",7)(10,"div",8)(11,"div",9)(12,"div",10)(13,"h3"),t._uU(14,"General"),t.qZA()(),t.TgZ(15,"div",11)(16,"div",7)(17,"div",12)(18,"div",13),t._UZ(19,"POS-info-page-input",14),t.qZA()()(),t.TgZ(20,"div",7)(21,"div",12)(22,"div",15)(23,"a",16),t._uU(24),t.qZA(),t.TgZ(25,"label"),t._uU(26,"Parent"),t.qZA()()()(),t.TgZ(27,"div",7)(28,"div",12)(29,"div",13),t._UZ(30,"POS-info-page-input",17),t.qZA()()(),t.TgZ(31,"div",7)(32,"div",18)(33,"div",13),t._UZ(34,"POS-info-page-input",19),t.qZA()(),t.TgZ(35,"div",18)(36,"div",13),t._UZ(37,"POS-info-page-input",20),t.qZA()()()()()(),t.TgZ(38,"div",21)(39,"div",9)(40,"div",10)(41,"h3"),t._uU(42,"Advanced"),t.qZA()(),t.TgZ(43,"div",11)(44,"div",7)(45,"div",12)(46,"div",13),t._UZ(47,"POS-info-page-input",22),t.qZA()()(),t.TgZ(48,"div",7)(49,"div",12)(50,"div",13),t._UZ(51,"POS-info-page-input",23),t.qZA()()()()()()()()()()),2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(16,Ep))("queryParams",t.VKq(17,Wt,e.formData.ID)),t.xp6(3),t.Q6J("ngIf",e.Roles.HasProductEditor),t.xp6(1),t.Q6J("ngIf",e.Roles.HasProductDelete),t.xp6(13),t.Q6J("inputValue",e.formData.Model),t.xp6(4),t.Q6J("routerLink",t.DdM(19,Yp))("queryParams",t.VKq(20,Wt,e.formData.ParentID)),t.xp6(1),t.Oqu(e.data.ParentName),t.xp6(6),t.Q6J("inputValue",e.formData.Name),t.xp6(4),t.Q6J("inputValue",e.formData.Code),t.xp6(3),t.Q6J("inputValue",e.formData.SKUSeed),t.xp6(10),t.Q6J("inputValue",e.formData.TypeName),t.xp6(4),t.Q6J("inputValue",e.formData.Description)}}let Bp=(()=>{class n extends Y.U{constructor(e,o,a,r){super(e,"catalog/ProductCategoryLoader/ProductCategoryInfoLoader",o),this.httpService=e,this.activatedRoute=o,this.toaster=a,this.router=r}postBindForm(){this.options.Categories&&this.options.Categories.forEach(e=>{e.Key==this.formData.ParentID&&(this.parentName=e.Value)})}removeCategory(){confirm("Are you sure you want to delete this record?")&&this.onSubmit("catalog/category/ProductCategoryDelete")}onSubmitSuccess(e){this.toaster.success("Success Delete Category",Z.n.Success),this.router.navigate(["/menu/Products/Catalog/Categories"])}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(l.gz),t.Y36(f._W),t.Y36(l.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-info-category"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-success","me-5",3,"routerLink","queryParams"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["role","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"container-fluid","bg-light-gray","form-horizontal","pt-4"],[1,"row"],[1,"col-sm-8"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-12"],[1,"form-floating-outline"],["labelValue","Name",3,"inputValue"],[1,"form-floating-outline","floating-url","w-100"],["target","_blank",1,"form-control",3,"routerLink","queryParams"],["labelValue","Display",3,"inputValue"],[1,"col-sm-6"],["labelValue","SKU Prefix",3,"inputValue"],["labelValue","SKU Seed",3,"inputValue"],[1,"col-sm-4"],["labelValue","Category Type",3,"inputValue"],["labelValue","Description",3,"inputValue"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa-solid","fa-edit"],["role","button",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-trash"]],template:function(e,o){1&e&&t.YNc(0,Rp,52,22,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.formData&&o.data)},directives:[c.O5,m.p,l.yS,yt.o],styles:[".floating-url[_ngcontent-%COMP%] > label[_ngcontent-%COMP%] {\n background-color: white;\n font-size: 0.75rem !important;\n color: #9da2a6;\n top: -10px !important;\n padding: 0 0.25rem;\n left: 0.5rem;\n}\n\n.floating-url[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] {\n height: 3.625rem;\n padding: 0.75rem !important;\n font-size: 0.875rem;\n border-radius: 0.25rem !important;\n display: flex;\n align-items: center;\n color: #0976b4;\n}\n\n.floating-url[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] [_ngcontent-%COMP%]:hover {\n color: #05466b;\n}"]}),n})();const $p=["fileInput"];function jp(n,i){if(1&n&&(t.TgZ(0,"div",38),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("ngClass",e.ctrl.Alert?"alert-success":"alert-danger"),t.xp6(1),t.hij(" ",e.ctrl.Message," ")}}function Kp(n,i){if(1&n&&(t.TgZ(0,"h4",48),t._UZ(1,"i",49),t._uU(2),t.qZA()),2&n){const e=t.oxw(4);t.xp6(2),t.hij(" There is ",e.ctrl.Issues.length," things you could improve your csv ")}}function Wp(n,i){if(1&n&&(t.TgZ(0,"tr",50)(1,"td",51),t._uU(2),t.qZA(),t.TgZ(3,"td",51),t._uU(4),t.qZA(),t.TgZ(5,"td",51),t._uU(6),t.qZA()()),2&n){const e=i.$implicit;t.xp6(2),t.Oqu(e.Issue),t.xp6(2),t.hij(" ",e.FirstRow==e.LastRow?e.FirstRow:e.FirstRow+" - "+e.LastRow," "),t.xp6(2),t.Oqu(e.Solution)}}function Gp(n,i){if(1&n&&(t.TgZ(0,"div",41),t.YNc(1,Kp,3,1,"h4",42),t.TgZ(2,"table",43)(3,"thead",44)(4,"tr")(5,"th",45),t._uU(6,"Issue"),t.qZA(),t.TgZ(7,"th",46),t._uU(8," Row Number "),t.qZA(),t.TgZ(9,"th"),t._uU(10,"Solution"),t.qZA()()(),t.TgZ(11,"tbody"),t.YNc(12,Wp,7,3,"tr",47),t.qZA()()()),2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",1==e.ctrl.Issues[0].Level),t.xp6(11),t.Q6J("ngForOf",e.ctrl.Issues)}}function zp(n,i){if(1&n&&(t.TgZ(0,"div",39),t.YNc(1,Gp,13,2,"div",40),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.ctrl.Issues.length>0)}}const Xp=function(n){return{show:n}};function td(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"div",2)(3,"a",3),t._UZ(4,"i",4),t._uU(5," Download Sample"),t.qZA(),t._UZ(6,"button",5),t.TgZ(7,"ul",6)(8,"li",7)(9,"a",8),t._uU(10,"Download Sample Serial"),t.qZA()(),t.TgZ(11,"li",7)(12,"a",9),t._uU(13,"Download Sample Composite"),t.qZA()(),t.TgZ(14,"li",7)(15,"a",10),t._uU(16,"Google Sheet"),t.qZA()(),t.TgZ(17,"li",7)(18,"a",11),t._uU(19,"Online Sheet"),t.qZA()()()(),t.TgZ(20,"input",12),t.NdJ("click",function(){return t.CHM(e),t.oxw().UploadFileCSV("catalog/product/Upload")}),t.qZA()(),t.TgZ(21,"content")(22,"div",13),t.YNc(23,jp,2,2,"div",14),t.TgZ(24,"div",15)(25,"div",16)(26,"div",17)(27,"h5",18),t._uU(28,"File"),t.qZA(),t.TgZ(29,"i"),t._uU(30,".csv format"),t.qZA()(),t.TgZ(31,"div",19)(32,"input",20,21),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().ctrl.FileToBeUploaded=a}),t.qZA(),t.TgZ(34,"a",22),t._uU(35,"Learn More"),t.qZA()()()(),t.TgZ(36,"div",23)(37,"div",24)(38,"div",25)(39,"div",26)(40,"h5",18),t._uU(41,"Inventory"),t.qZA(),t.TgZ(42,"i"),t._uU(43,"import options"),t.qZA()(),t.TgZ(44,"div",27)(45,"div",28)(46,"div",29)(47,"label",18),t._uU(48,"Update"),t.qZA(),t.TgZ(49,"i",30),t._uU(50," replace existing inventory count"),t.qZA(),t.TgZ(51,"div",31)(52,"radio-options",32),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw().formData.InventoryUpdate=a}),t.qZA()()()()()(),t.TgZ(53,"div",25)(54,"div",26)(55,"h5",18),t._uU(56,"Advanced"),t.qZA(),t.TgZ(57,"i"),t._uU(58,"more options"),t.qZA()(),t.TgZ(59,"div",27)(60,"div",28)(61,"div",29)(62,"label",18),t._uU(63,"Category"),t.qZA(),t.TgZ(64,"i",30),t._uU(65," import destination"),t.qZA(),t.TgZ(66,"ng-select",33),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.CategoryID=a}),t.qZA()(),t.TgZ(67,"div",29)(68,"label",18),t._uU(69,"Import Row Range"),t.qZA(),t.TgZ(70,"i",30),t._uU(71," import subset rows for huge dataset"),t.qZA(),t.TgZ(72,"div")(73,"input",34),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.StartRow=a}),t.qZA(),t._uU(74," - "),t.TgZ(75,"input",34),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.EndRow=a}),t.qZA()()()(),t.TgZ(76,"div",35)(77,"div",29)(78,"label",18),t._uU(79,"Allow Duplicate SKU "),t.qZA(),t.TgZ(80,"i",30),t._uU(81," file may contain duplicate SKU"),t.qZA(),t.TgZ(82,"div",31)(83,"radio-options",32),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw().formData.SKU=a}),t.qZA()()(),t.TgZ(84,"div",29)(85,"label",18),t._uU(86,"Apply 0 Cost"),t.qZA(),t.TgZ(87,"i",30),t._uU(88," file may contain duplicate SKU"),t.qZA(),t.TgZ(89,"div",31)(90,"radio-options",32),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw().formData.CostZeroSupport=a}),t.qZA()()()()()()()(),t.TgZ(91,"a",36),t.NdJ("click",function(){return t.CHM(e),t.oxw().toogle()}),t._uU(92,"More Options"),t.qZA(),t.TgZ(93,"div",28),t.YNc(94,zp,2,1,"div",37),t.qZA()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(20),t.Q6J("value",e.ctrl.IgnoreWarning?"Proceed":"Upload"),t.xp6(3),t.Q6J("ngIf",null!=e.ctrl.Alert),t.xp6(9),t.Q6J("ngModel",e.ctrl.FileToBeUploaded),t.xp6(4),t.Q6J("ngClass",t.VKq(16,Xp,e.extraOption)),t.xp6(16),t.Q6J("model",e.formData.InventoryUpdate),t.xp6(14),t.Q6J("ngModel",e.formData.CategoryID)("items",e.options.Categories)("clearable",!1),t.xp6(7),t.Q6J("ngModel",e.formData.StartRow),t.xp6(2),t.Q6J("ngModel",e.formData.EndRow),t.xp6(8),t.Q6J("model",e.formData.SKU),t.xp6(7),t.Q6J("model",e.formData.CostZeroSupport),t.xp6(4),t.Q6J("ngIf",e.ctrl.Issues)}}let ed=(()=>{class n extends Y.U{constructor(e,o){super(e,"catalog/ProductLoader/ProductImportLoader",o),this.activatedRoute=o,this.ctrl={IgnoreWarning:!1,Alert:null}}UploadFileCSV(e){if(!confirm(this.formData.InventoryUpdate?"Update Inventory is YES. This is will replace current inventory. Do you want to proceed?":"Update inventory is NO. Do you want to proceed?"))return!1;const a=new FormData,p=JSON.stringify(Object.assign(this.formData,{IgnoreWarning:this.ctrl.IgnoreWarning}));a.append("Data",p),a.append("Info","Customer"),a.append("File",this.fileInput.nativeElement.files[0]),this.httpService.postFormData(`/api/${e}`,a).subscribe({next:x=>{this.ctrl.Alert=x.Success,this.ctrl.Message=x.Message,this.ctrl.Issues=null,this.ctrl.IgnoreWarning=!1},error:x=>{this.ctrl.Alert=x.error.Success,this.ctrl.Message=x.error.Message,this.ctrl.Issues=x.error.Issues,this.ctrl.IgnoreWarning=!0}})}ShowProceed(){return!1}toogle(){this.extraOption=!this.extraOption}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(l.gz))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-import-product"]],viewQuery:function(e,o){if(1&e&&t.Gf($p,5),2&e){let a;t.iGM(a=t.CRH())&&(o.fileInput=a.first)}},features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"btn-group","me-4"],["href","//res.cloudinary.com/pos/raw/upload/POS/CSV/Products_DealPOS2.csv","matTooltip","Download csv sample and edit it with installed Spreadsheet Application",1,"btn","btn-outline-secondary"],["aria-hidden","true",1,"fa-solid","fa-download"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu",2,"cursor","pointer"],[1,"dropdown-item"],["href","https://res.cloudinary.com/pos/raw/upload/POS/CSV/Products_Serial_DealPOS.csv","matTooltip","Download Sample Serial"],["href","https://res.cloudinary.com/pos/raw/upload/POS/CSV/Products_Composite_DealPOS.csv","matTooltip","Download Sample Composite"],["target","_blank","href","http://bit.ly/dealpos-products-template","matTooltip","Create & Edit your products database online with Google Sheet"],["href","https://tools.dealpos.app/menu/product/new","target","_blank","matTooltip","Create & Edit your products database online with Google Sheet"],["type","button",1,"btn","btn-success",3,"value","click"],[1,"container-fluid","mt-5"],["class","alert ng-binding ng-scope","role","alert",3,"ngClass",4,"ngIf"],[1,"form-horizontal"],[1,"row","border-bottom","mt-10","ms-2",2,"height","60px"],[1,"col-md-2"],[1,"fw-bold","mb-5"],[1,"col-md-6","mb-5"],["type","file",1,"form-control","form-control-md","bg-light-gray","d-inline",2,"width","305px",3,"ngModel","ngModelChange"],["fileInput",""],["role","button","target","_blank","href","//support.dealpos.com/en/articles/4773747-import-product-list-using-excel-csv-file","title","Import products using CSV file","target","_blank",1,"btn","btn-outline-secondary","ms-4","d-inline","align-items-center"],[1,"row","extra-options","collapse",3,"ngClass"],[1,"container-fluid","form-horizontal"],[1,"row","border-bottom","mt-10","ms-2"],[1,"col-sm-2"],[1,"col-sm-10"],[1,"row"],[1,"col-sm-6"],[1,"text-secondary"],[1,"form-floating-outline","border","rounded","pt-4","px-5",2,"padding-bottom","10px"],["name","Date Filter",3,"model","modelChange"],["placeholder","Select an Option","id","labelCity","bindLabel","Value","bindValue","Key","appendTo","body",1,"category-select",3,"ngModel","items","clearable","ngModelChange"],["autoNum","",2,"width","20%","padding","7px !important","border","1px solid #C8D3DF",3,"ngModel","ngModelChange"],[1,"row",2,"margin-top","10px"],["data-bs-toggle","collapse",1,"more","float-end",3,"click"],["class","col-md-12",4,"ngIf"],["role","alert",1,"alert","ng-binding","ng-scope",3,"ngClass"],[1,"col-md-12"],["class","mt-5 ng-scope",4,"ngIf"],[1,"mt-5","ng-scope"],["class","ng-binding ng-scope",4,"ngIf"],[1,"table","table-bordered","mt-3"],[1,"text-dark","fw-bold","p-3",2,"background-color","#FCECA3 !important"],[2,"width","200px"],[2,"width","100px"],["class","ng-scope",4,"ngFor","ngForOf"],[1,"ng-binding","ng-scope"],[1,"fa-solid","fa-exclamation-triangle","text-warning"],[1,"ng-scope"],[1,"ng-binding"]],template:function(e,o){1&e&&t.YNc(0,td,95,18,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.formData&&o.data)},directives:[c.O5,m.p,F.gM,c.mk,s.Fj,s.JJ,s.On,q.P,y.w9,B.b,c.sg],styles:[""]}),n})();const od=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold/Invoice_Items"]},Ze=function(n){return{VariantID:n}},id=function(){return["/menu/Reports/Purchases_Report/Product_Purchase_History"]};function rd(n,i){if(1&n&&(t.TgZ(0,"div",29)(1,"a",30),t._UZ(2,"i",31),t._uU(3,"\xa0Sales History "),t.qZA(),t._UZ(4,"button",32),t.TgZ(5,"ul",33)(6,"li",34)(7,"a",35),t._uU(8,"Purchase History"),t.qZA()()()()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("routerLink",t.DdM(4,od))("queryParams",t.VKq(5,Ze,e.pageData.Filter.ID)),t.xp6(6),t.Q6J("routerLink",t.DdM(7,id))("queryParams",t.VKq(8,Ze,e.pageData.Filter.ID))}}function ld(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",29)(1,"a",36),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"Inventory/GetStockLog",a.data.PageTitle)}),t._UZ(2,"i",37),t._uU(3,"\xa0Export "),t.qZA(),t._UZ(4,"button",32),t.TgZ(5,"ul",33)(6,"li",34)(7,"a",38),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ReportExport/GetExport","Transaction History All")}),t._uU(8,"Transaction History"),t.qZA()()()()}}function cd(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",5)(1,"div")(2,"h6"),t._uU(3,"Order"),t.qZA(),t.TgZ(4,"ng-select",39),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.OrderBy=a}),t.qZA()(),t.TgZ(5,"div")(6,"h6"),t._uU(7,"Hide Canceled Transaction"),t.qZA(),t.TgZ(8,"radio-options",40),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.HideCancelled=a}),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("clearable",!1)("items",e.sort)("ngModel",e.pageData.Filter.OrderBy),t.xp6(4),t.Q6J("model",e.pageData.Filter.HideCancelled)}}function sd(n,i){1&n&&(t.TgZ(0,"th",41),t._uU(1,"Outlet"),t.qZA())}function pd(n,i){1&n&&(t.TgZ(0,"th",42),t._uU(1," Price"),t.qZA())}const dd=function(){return["/menu/Outlets/Master/Outlets"]},Gt=function(n){return{ID:n}};function ud(n,i){if(1&n&&(t.TgZ(0,"td")(1,"a",35),t._uU(2),t.qZA()()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("routerLink",t.DdM(3,dd))("queryParams",t.VKq(4,Gt,e.EntityID)),t.xp6(1),t.Oqu(e.Outlet)}}function _d(n,i){if(1&n&&(t.TgZ(0,"small",48),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw(2).$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.UnitCost))}}function md(n,i){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw(3).$implicit;t.xp6(1),t.hij("- ",t.lcZ(2,1,e.PriceDiscount),"%")}}function gd(n,i){if(1&n&&(t.ynx(0),t.TgZ(1,"small",52),t._uU(2),t.ALo(3,"number"),t.YNc(4,md,3,3,"span",44),t.qZA(),t.BQk()),2&n){const e=t.oxw(2).$implicit;t.xp6(2),t.hij(" ",t.lcZ(3,2,e.UnitPrice)," "),t.xp6(2),t.Q6J("ngIf",0!=e.PriceDiscount)}}function fd(n,i){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw(3).$implicit;t.xp6(1),t.hij(" - ",t.lcZ(2,1,e.PriceDiscount),"%")}}function hd(n,i){if(1&n&&(t.ynx(0),t.TgZ(1,"small",53)(2,"span"),t._uU(3),t.ALo(4,"number"),t.qZA(),t.YNc(5,fd,3,3,"span",44),t.qZA(),t.BQk()),2&n){const e=t.oxw(2).$implicit;t.xp6(3),t.Oqu(t.lcZ(4,2,e.UnitCost)),t.xp6(2),t.Q6J("ngIf",0!=e.PriceDiscount)}}function xd(n,i){if(1&n&&(t.TgZ(0,"td",49),t.YNc(1,_d,3,3,"small",51),t.YNc(2,gd,5,4,"ng-container",44),t.YNc(3,hd,6,4,"ng-container",44),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngIf",o.pageData.CostVisible&&2!=e.SourceTypeID),t.xp6(1),t.Q6J("ngIf",1==e.SourceTypeID&&o.pageData.PriceVisible),t.xp6(1),t.Q6J("ngIf",2==e.SourceTypeID&&o.pageData.CostVisible)}}const Cd=function(n){return[n]};function vd(n,i){if(1&n&&(t.TgZ(0,"tr",43),t.YNc(1,ud,3,6,"td",44),t.TgZ(2,"td",45),t._uU(3),t.ALo(4,"IsMinDate"),t.qZA(),t.TgZ(5,"td")(6,"a",46),t._uU(7),t.qZA()(),t.TgZ(8,"td"),t._uU(9),t._UZ(10,"br"),t._uU(11),t.qZA(),t.TgZ(12,"td"),t._uU(13),t._UZ(14,"br"),t.TgZ(15,"i"),t._uU(16),t.qZA()(),t.TgZ(17,"td",47),t._uU(18),t.ALo(19,"number"),t.qZA(),t.TgZ(20,"td",48),t._uU(21),t.ALo(22,"number"),t.qZA(),t.TgZ(23,"td",49),t._uU(24),t.ALo(25,"number"),t.qZA(),t.YNc(26,xd,4,3,"td",50),t.TgZ(27,"td"),t._uU(28),t.ALo(29,"date"),t._UZ(30,"br"),t._uU(31),t.qZA()()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngIf",o.data.EntityColumnVisible),t.xp6(2),t.Oqu(t.xi3(4,17,e.LogDate,"dd MMM yyyy")),t.xp6(3),t.Q6J("routerLink",t.VKq(29,Cd,e.NavUrl))("queryParams",t.VKq(31,Gt,e.ReferenceID)),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.hij(" ",e.Name,""),t.xp6(2),t.hij(" ",e.Note," "),t.xp6(2),t.hij(" ",e.SourceTypeLabel," "),t.xp6(2),t.ekj("text-warning",1===e.TypeID),t.xp6(1),t.Oqu(e.Type),t.xp6(2),t.Oqu(0==e.In?"-":t.lcZ(19,20,e.In)),t.xp6(3),t.Oqu(0==e.Out?"-":t.lcZ(22,22,e.Out)),t.xp6(3),t.Oqu(t.lcZ(25,24,e.UnitsInStock)),t.xp6(2),t.Q6J("ngIf",o.pageData.CostVisible||o.pageData.PriceVisible),t.xp6(2),t.hij(" ",t.xi3(29,26,e.EntryDate,"dd MMM yyyy, HH:mm "),""),t.xp6(3),t.hij(" ",e.UserName," ")}}function Td(n,i){1&n&&(t.TgZ(0,"td",54)(1,"b"),t._uU(2,"Total"),t.qZA()())}function Zd(n,i){1&n&&(t.TgZ(0,"td",55)(1,"b"),t._uU(2,"Total"),t.qZA()())}const bd=function(){return["/menu/Products/Catalog/Variants/Info"]};function yd(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.Code=a})("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,rd,9,10,"div",2),t.YNc(3,ld,9,0,"div",2),t.TgZ(4,"a",3),t._uU(5,"Back"),t.qZA()(),t.TgZ(6,"filters")(7,"div",4)(8,"div",5)(9,"div")(10,"h6"),t._uU(11,"Outlet"),t.qZA(),t.TgZ(12,"ng-select",6),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),t.qZA()(),t.TgZ(13,"div")(14,"h6"),t._uU(15,"From - To"),t.qZA(),t.TgZ(16,"datepicker",7),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(17,"datepicker",8),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),t.qZA()(),t.TgZ(18,"div")(19,"h6"),t._uU(20,"Page Size"),t.qZA(),t.TgZ(21,"input",9),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.RowCount=a}),t.qZA()()(),t.YNc(22,cd,9,4,"div",10),t.qZA(),t.TgZ(23,"a",11),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.more=!a.more}),t._uU(24,"More "),t._UZ(25,"i",12),t.qZA()(),t.TgZ(26,"content")(27,"div",13)(28,"div",14)(29,"table",15)(30,"thead",16)(31,"tr"),t.YNc(32,sd,2,0,"th",17),t.TgZ(33,"th",18),t._uU(34,"Date"),t.qZA(),t.TgZ(35,"th",19),t._uU(36,"Number"),t.qZA(),t.TgZ(37,"th",19),t._uU(38," Name"),t._UZ(39,"br"),t.TgZ(40,"i"),t._uU(41,"Note"),t.qZA()(),t.TgZ(42,"th",20),t._uU(43," Log Type"),t._UZ(44,"br"),t.TgZ(45,"i"),t._uU(46,"DB Type"),t.qZA()(),t.TgZ(47,"th",21),t._uU(48,"In"),t.qZA(),t.TgZ(49,"th",21),t._uU(50,"Out"),t.qZA(),t.TgZ(51,"th",21),t._uU(52,"Inventory"),t.qZA(),t.YNc(53,pd,2,0,"th",22),t.TgZ(54,"th",18),t._uU(55," Created"),t._UZ(56,"br"),t.TgZ(57,"i"),t._uU(58,"By"),t.qZA()()()(),t.TgZ(59,"tbody"),t.YNc(60,vd,32,33,"tr",23),t.qZA(),t.TgZ(61,"tfoot")(62,"tr"),t.YNc(63,Td,3,0,"td",24),t.YNc(64,Zd,3,0,"td",25),t.TgZ(65,"td",26)(66,"b"),t._uU(67),t.ALo(68,"number"),t.ALo(69,"sum"),t.qZA()(),t.TgZ(70,"td",27)(71,"b"),t._uU(72),t.ALo(73,"number"),t.ALo(74,"sum"),t.qZA()()()()()(),t.TgZ(75,"POS-complex-pagination",28),t.NdJ("jumpToPage",function(){return t.CHM(e),t.oxw().getListData()})("previousPage",function(){return t.CHM(e),t.oxw().getListData()})("nextPage",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("text",e.pageData.Filter.Code),t.xp6(2),t.Q6J("ngIf",e.pageData.Report),t.xp6(1),t.Q6J("ngIf",e.pageData.IsExport),t.xp6(1),t.Q6J("routerLink",t.DdM(33,bd))("queryParams",t.VKq(34,Gt,e.pageData.Filter.ID)),t.xp6(8),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(1),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RowCount),t.xp6(1),t.Q6J("ngIf",e.more),t.xp6(10),t.Q6J("ngIf",e.data.EntityColumnVisible),t.xp6(21),t.Q6J("ngIf",e.pageData.CostVisible||e.pageData.PriceVisible),t.xp6(7),t.Q6J("ngForOf",e.data.Data),t.xp6(3),t.Q6J("ngIf",e.data.EntityColumnVisible),t.xp6(1),t.Q6J("ngIf",!e.data.EntityColumnVisible),t.xp6(3),t.Oqu(t.lcZ(68,23,t.xi3(69,25,e.data.Data,"In"))),t.xp6(5),t.Oqu(t.lcZ(73,28,t.xi3(74,30,e.data.Data,"Out"))),t.xp6(3),t.Q6J("total",e.data.Data.length)("pageData",e.pageData)}}let Id=(()=>{class n extends v.n{constructor(e,o,a,r){super(e,"Inventory/GetStockLog","InventoryLoader/StockLogLoader",o,r),this.csvConverter=a,this.sort=[{ID:0,Name:"Ascending"},{ID:1,Name:"Descending"}],this.pageData.Filter.OrderBy=0}postInit(){this.menuData.H=this.data.PageTitle?this.data.PageTitle:this.menuData.H}preInitList(){this.pageData.Filter.EntityID=this.route.snapshot.queryParams.EntityID}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(f._W),t.Y36(g.O),t.Y36(l.gz))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-log-variant"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","text","textChange","onSubmit",4,"ngIf"],[3,"pageData","text","textChange","onSubmit"],["class","btn-group me-4",4,"ngIf"],["title","Back to variant info",1,"btn","btn-success",3,"routerLink","queryParams"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Outlet",1,"outlet",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","dateChange"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],["type","text",3,"ngModel","ngModelChange"],["container","",4,"ngIf"],[1,"more",3,"click"],[1,"fa-solid","fa-caret-down"],[1,"container-fluid"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light"],["style","width: 120px",4,"ngIf"],[2,"width","150px"],[2,"width","200px"],[2,"width","100px"],[1,"text-end",2,"width","50px"],["class","text-end","style","width: 100px",4,"ngIf"],["class","border-bottom",4,"ngFor","ngForOf"],["colspan","5","class","text-end",4,"ngIf"],["colspan","4","class","text-end",4,"ngIf"],[1,"text-end","empty-column","text-success",2,"background-color","lemonchiffon"],[1,"text-end","empty-column","text-danger",2,"background-color","lemonchiffon"],["api","Inventory/GetStockLogRowsCount",3,"total","pageData","jumpToPage","previousPage","nextPage"],[1,"btn-group","me-4"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-chart-area"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu"],[1,"dropdown-item"],[3,"routerLink","queryParams"],["title","Export",1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-upload"],[2,"cursor","pointer",3,"click"],["bindLabel","Name","bindValue","ID","placeholder","Outlet",1,"outlet",3,"clearable","items","ngModel","ngModelChange"],[3,"model","modelChange"],[2,"width","120px"],[1,"text-end",2,"width","100px"],[1,"border-bottom"],[4,"ngIf"],[1,"text-start"],["target","_blank",3,"routerLink","queryParams"],[1,"text-end","text-success"],[1,"text-end","text-danger"],[1,"text-end"],["class","text-end",4,"ngIf"],["class","text-end text-danger",4,"ngIf"],[1,"d-block","text-end","text-success"],[1,"d-block","text-end","text-danger"],["colspan","5",1,"text-end"],["colspan","4",1,"text-end"]],template:function(e,o){1&e&&t.YNc(0,yd,76,36,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},directives:[c.O5,m.p,l.yS,y.w9,s.JJ,s.On,E.QB,s.Fj,q.P,c.sg,rt.v],pipes:[w.$k,c.JJ,c.uU,w.qU],styles:[""]}),n})();function Md(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",17),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).SubmitForm()}),t._uU(1,"Submit"),t.qZA()}}const Pd=function(n,i){return{alert:!0,"alert-success":n,"alert-danger":i}},Dd=function(n,i){return{"fas ":!0,"fa-check-circle":n,"fa-exclamation-circle":i}};function Ad(n,i){if(1&n&&(t.TgZ(0,"div",18),t._UZ(1,"span",19)(2,"span",20),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.WLB(3,Pd,e.alert.Success,!e.alert.Success)),t.xp6(1),t.Q6J("ngClass",t.WLB(6,Dd,e.alert.Success,!e.alert.Success)),t.xp6(1),t.Q6J("innerHtml",e.alert.Message,t.oJD)}}function Nd(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",6)(1,"div",7)(2,"h5",8),t._uU(3,"Import"),t.qZA()(),t.TgZ(4,"div",21)(5,"div",10)(6,"div",11)(7,"input",22),t.NdJ("change",function(){return t.CHM(e),t.oxw(2).UploadCSV()}),t.qZA()()()()()}}function qd(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"li",23)(1,"div",24)(2,"span",25),t._uU(3),t.qZA(),t._UZ(4,"i",26),t.qZA(),t.TgZ(5,"div",27)(6,"span",28),t._uU(7,"S/N"),t.qZA(),t.TgZ(8,"input",29),t.NdJ("ngModelChange",function(a){return t.CHM(e).$implicit.Serial=a}),t.qZA()()()}if(2&n){const e=i.$implicit,o=i.index,a=t.oxw(2);t.xp6(3),t.hij("#",o+1,""),t.xp6(5),t.Q6J("ngModel",e.Serial)("disabled",!a.data.HasEditRole)}}const wd=function(){return["/menu/Products/Catalog/Variants/Info"]},Sd=function(n){return{ID:n}};function Ud(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"a",2),t._uU(3,"Return to Product"),t.qZA(),t.YNc(4,Md,2,0,"a",3),t.qZA(),t.TgZ(5,"content")(6,"div",4),t.YNc(7,Ad,3,9,"div",5),t.TgZ(8,"div",6)(9,"div",7)(10,"h5",8),t._uU(11,"Outlet"),t.qZA()(),t.TgZ(12,"div",9)(13,"div",10)(14,"div",11)(15,"ng-select",12),t.NdJ("change",function(a){return t.CHM(e),t.oxw().changeOutlet(a)})("ngModelChange",function(a){return t.CHM(e),t.oxw().formData.EntityID=a}),t.qZA()()()()(),t.YNc(16,Nd,8,0,"div",13),t.TgZ(17,"div",14)(18,"ul",15),t.YNc(19,qd,9,3,"li",16),t.qZA()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(11,wd))("queryParams",t.VKq(12,Sd,e.data.VariantID)),t.xp6(2),t.Q6J("ngIf",e.data.HasEditRole),t.xp6(3),t.Q6J("ngIf",e.alert.Visible),t.xp6(8),t.Q6J("items",e.options.Entities)("ngModel",e.formData.EntityID),t.xp6(1),t.Q6J("ngIf",e.data.HasEditRole),t.xp6(3),t.Q6J("ngForOf",e.formData.Data)}}let Od=(()=>{class n extends Y.U{constructor(e,o){super(e,"ProductLoader/VariantSerialFormLoader",o),this.httpService=e,this.activeRoute=o,this.alert={Error:!1,Success:!1,Visible:!1,Message:null}}UploadCSV(){}preSubmitForm(){let e=Object.assign({},this.formData);e.VariantID=this.data.VariantID,this.data.Form=e}changeOutlet(e){this.httpService.post("/API/catalog/VariantLoader/GetVariantSerialForm",{VariantID:this.data.VariantID,EntityID:e.ID}).subscribe(a=>{this.data.Form.Data=a})}SubmitForm(){this.onSubmit("catalog/variant/SubmitSerialVariant")}onSubmitSuccess(e){this.alert.Error=!1,this.alert.Success=!0,this.alert.Visible=!0,this.alert.Message=e}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(l.gz))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-serial-form-variant"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-outline-secondary","me-4",3,"routerLink","queryParams"],["title","Submit","role","button","class","btn btn-success",3,"click",4,"ngIf"],[1,"container-fluid","form-horizontal","pt-4"],["class","alert alert-success",3,"ngClass",4,"ngIf"],[1,"row","border-bottom","mt-10","ms-2",2,"height","50px"],[1,"col-sm-2"],[1,"fw-bold"],[1,"col-sm-6"],[1,"row"],[1,"col-sm-12"],["placeholder","Choose an outlet","bindLabel","Name","bindValue","ID",3,"items","ngModel","change","ngModelChange"],["class","row border-bottom mt-10 ms-2","style","height: 50px;",4,"ngIf"],[1,"ms-5"],[1,"serial","p-0"],["class","mt-8 rounded ms-6 border border-secondary",4,"ngFor","ngForOf"],["title","Submit","role","button",1,"btn","btn-success",3,"click"],[1,"alert","alert-success",3,"ngClass"],["aria-hidden","true",1,"fa-solid","fa-check-circle","me-2",3,"ngClass"],[3,"innerHtml"],[1,"col-sm-10"],["type","file","ng-file-model","ctrl.FileToBeUploaded",1,"form-control","bg-light-gray",2,"width","400px",3,"change"],[1,"mt-8","rounded","ms-6","border","border-secondary"],[1,"title","clearfix"],[1,"text-center","fw-bold","pt-3"],["aria-hidden","true",1,"fa","fa-barcode","fa-2x","ps-6",2,"transform","scale(2.5,1)"],[1,"txtbox","mt-1"],[1,"pt-4","fw-bold","text-center"],["type","text",1,"mt-4","px-3","py-4","border","border-secondary",3,"ngModel","disabled","ngModelChange"]],template:function(e,o){1&e&&t.YNc(0,Ud,20,14,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.formData)},directives:[c.O5,m.p,l.yS,c.mk,y.w9,s.JJ,s.On,c.sg,s.Fj],styles:["ul.serial[_ngcontent-%COMP%] {\n list-style: none;\n}\n\nul.serial[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] {\n float: left;\n width: 195px;\n height: 63px;\n background: #eeeeee;\n}\n\nul.serial[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:nth-child(5n+2), ul.serial[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:nth-child(5n+4) {\n background: #f0e1b8;\n}\n\nul.serial[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > div.title[_ngcontent-%COMP%] {\n height: 25px;\n}\n\nul.serial[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > div.title[_ngcontent-%COMP%] > span[_ngcontent-%COMP%] {\n width: 43px;\n height: 14px;\n float: left;\n background: #479ccf;\n font-size: 12px;\n color: white;\n border-top-left-radius: 3px;\n}\n\nul.serial[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:nth-child(5n+2) > div.title[_ngcontent-%COMP%] > span[_ngcontent-%COMP%], ul.serial[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]:nth-child(5n+4) > div.title[_ngcontent-%COMP%] > span[_ngcontent-%COMP%] {\n background: #333333;\n}\n\nul.serial[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > div.txtbox[_ngcontent-%COMP%] {\n height: 28px;\n}\n\nul.serial[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > div.txtbox[_ngcontent-%COMP%] > span[_ngcontent-%COMP%] {\n float: left;\n font-size: 12px;\n width: 43px;\n height: 14px;\n color: #666666;\n}\n\nul.serial[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > div.txtbox[_ngcontent-%COMP%] > input[_ngcontent-%COMP%] {\n float: left;\n width: 110px;\n height: 18px;\n}\n\nul.serial[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > div.title[_ngcontent-%COMP%] > span[_ngcontent-%COMP%] {\n width: 43px;\n height: 24px;\n float: left;\n background: #479ccf;\n font-size: 12px;\n border-top-left-radius: 3px;\n}\n\nng-select[_ngcontent-%COMP%] div.ng-select-container {\n width: 200px;\n}"]}),n})();function Jd(n,i){1&n&&t._UZ(0,"th",11),2&n&&t.Q6J("innerHtml",i.$implicit.Name,t.oJD)}function Vd(n,i){if(1&n&&(t.TgZ(0,"thead",7)(1,"tr")(2,"th",8),t._uU(3,"Model"),t.qZA(),t.YNc(4,Jd,1,1,"th",9),t.TgZ(5,"th",10),t._uU(6,"Total"),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("ngForOf",e.data.Entity)}}function kd(n,i){if(1&n&&(t.TgZ(0,"td",10),t._uU(1),t.ALo(2,"find"),t.qZA()),2&n){const e=i.$implicit,o=t.oxw().$implicit;let a;t.xp6(1),t.Oqu(null==(a=t.Dn7(2,1,o.Outlet,"EntityID",e.ID))?null:a.Stock)}}function Fd(n,i){if(1&n&&(t.TgZ(0,"tr",12)(1,"td"),t._uU(2),t.qZA(),t.YNc(3,kd,3,5,"td",13),t.TgZ(4,"td",10),t._uU(5),t.ALo(6,"number"),t.qZA()()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.Model),t.xp6(1),t.Q6J("ngForOf",o.data.Entity),t.xp6(2),t.Oqu(t.lcZ(6,3,e.Total))}}function Qd(n,i){if(1&n&&(t.TgZ(0,"td",10),t._uU(1),t.ALo(2,"sum"),t.ALo(3,"GetChildrenArray"),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(3);t.xp6(1),t.Oqu(t.gM2(2,1,t.xi3(3,6,o.data.Data,"Outlet"),"Stock","EntityID",e.ID))}}function Ld(n,i){if(1&n&&(t.TgZ(0,"tfoot",14)(1,"tr")(2,"td",15),t._uU(3,"Total"),t.qZA(),t.YNc(4,Qd,4,9,"td",13),t.TgZ(5,"td",10),t._uU(6),t.ALo(7,"number"),t.ALo(8,"sum"),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("ngForOf",e.data.Entity),t.xp6(2),t.Oqu(t.lcZ(7,2,t.xi3(8,4,e.data.Data,"Total")))}}function Hd(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSelect",function(a){return t.CHM(e),t.oxw().selectItem(a)})("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"content")(2,"div",2)(3,"table",3),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),t.YNc(4,Vd,7,1,"thead",4),t.TgZ(5,"tbody"),t.YNc(6,Fd,7,5,"tr",5),t.qZA(),t.YNc(7,Ld,9,7,"tfoot",6),t.qZA()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("text",e.pageData.Filter.ProductName)("filterAutoComplete",!0)("requestUrl","/API/AC/GetProductSuggestionByCodeNName")("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(4),t.Q6J("ngIf",e.data.Data),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.data.Data)}}const Ed=[{path:"Catalog/Categories",component:Op},{path:"Catalog/Categories/Form",component:Fp},{path:"Catalog/Categories/Info",component:Bp},{path:"Catalog/Products",component:ke},{path:"Catalog/Products/Form",component:ao},{path:"Catalog/Products/Info",component:Jo},{path:"Catalog/Products/Import",component:ed},{path:"Catalog/Products/Inventory",component:(()=>{class n extends v.n{constructor(e,o,a,r){super(o,"catalog/product/GetEntityStock","catalog/ProductLoader/EntityStockLoader",null,e),this.activeRoute=e,this.httpService=o,this.location=a,this.router=r}selectItem(e){const o=JSON.parse(e);this.pageData.Filter.ProductName=o.Value,this.pageData.Filter.ProductID=o.Key;const a=this.router.createUrlTree([],{relativeTo:this.activeRoute,queryParams:{ID:this.pageData.Filter.ProductID}}).toString();this.location.go(a),this.searchFromPageOne()}postInit(){this.menuData.H=`${this.pageData.Filter.ProductName} Inventory`,this.originalStock=this.data.Data}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,r)=>{const p="asc"===e.direction;return this.compare(a[e.active].toLocaleLowerCase(),r[e.active].toLocaleLowerCase(),p)}):this.originalStock}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(l.gz),t.Y36(_.O),t.Y36(c.Ye),t.Y36(l.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-inventory-product"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","text","filterAutoComplete","requestUrl","hideSearchBox","hideSearchDropdown","onSelect","onSubmit",4,"ngIf"],[3,"pageData","text","filterAutoComplete","requestUrl","hideSearchBox","hideSearchDropdown","onSelect","onSubmit"],[1,"container-fluid","pt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],["class","thead-light",4,"ngIf"],["class","border-bottom",4,"ngFor","ngForOf"],["class","table-footer",4,"ngIf"],[1,"thead-light"],["mat-sort-header","Model",2,"width","90px"],["style","width: 90px","class","text-end",3,"innerHtml",4,"ngFor","ngForOf"],[1,"text-end"],[1,"text-end",2,"width","90px",3,"innerHtml"],[1,"border-bottom"],["class","text-end",4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-start"]],template:function(e,o){1&e&&t.YNc(0,Hd,8,9,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.pageData&&o.data)},directives:[c.O5,m.p,$.YE,$.nU,c.sg],pipes:[w.Z0,c.JJ,w.qU,w.J1],styles:[""]}),n})()},{path:"Catalog/Variants",component:ca},{path:"Catalog/Variants/Form",component:ii},{path:"Catalog/Variants/Info",component:wc},{path:"Catalog/Variants/Log",component:Id},{path:"Catalog/Variants/Serial_Form",component:Od},{path:"Add-Ons/Variant_History",component:Bc},{path:"Price_Editor/Custom_Outlet_Price",component:os},{path:"Setup/Brand",component:_s},{path:"Setup/Brand/Brand_Form",component:np},{path:"Setup/Measurement",component:bs},{path:"Setup/Measurement/Form",component:rp},{path:"Setup/Tags",component:Ss},{path:"Setup/Tags/Tags_Form",component:pp},{path:"Setup/UOM",component:Es},{path:"Setup/UOM/Form",component:mp},{path:"Setup/Storages",component:zs},{path:"Setup/Storages/Form",component:vp},{path:"Setup/Storages/Info",component:yp},{path:"",redirectTo:"Catalog/Products",pathMatch:"full"}];let Yd=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[[l.Bz.forChild(Ed)],l.Bz]}),n})();var Rd=u(46510),Bd=u(32075),$d=u(86856),be=u(90508),jd=u(77531),Kd=u(53251),Wd=u(69832),Gd=u(65131),zd=u(35355),Xd=u(94673);let tu=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({providers:[z.Y],imports:[[gt.xc,Kt.vI,zd.V,G._t,F.AV,m.R,c.ez,w.dr,Yd,N.d,Rd.Z,s.u5,s.UX,$d.FA,be.XK,Mt.Fk,jd.c,be.Ng,Kd.Nh,Ut.TU,Wd.vV,y.A0,$.JX,Bd.p0,E.ZU,q.K,Gd.X,bt.Hi,ft.Q,rt.T,yt.F,$.JX,Xd.z,Bt.O,xn]]}),n})()},3077:(Vt,A,u)=>{"use strict";u.d(A,{v:()=>L,T:()=>ct});var c=u(69808),l=u(5e3),v=u(93075),b=u(89156);function Q(_,f){if(1&_&&(l.TgZ(0,"span"),l._uU(1),l.qZA()),2&_){const g=l.oxw();l.xp6(1),l.AsE(" Showing ",g.pageData.Filter.PageNumber*g.total-g.total+1," - ",g.pageData.Filter.PageNumber*g.total," ")}}function t(_,f){if(1&_&&(l.TgZ(0,"span"),l._uU(1),l.qZA()),2&_){const g=l.oxw();l.xp6(1),l.AsE(" Showing ",g.pageData.Filter.RowCount*g.pageData.Filter.PageNumber-g.pageData.Filter.RowCount+1," - ",g.pageData.Filter.RowCount*g.pageData.Filter.PageNumber-g.pageData.Filter.RowCount+g.total," ")}}function N(_,f){if(1&_){const g=l.EpF();l.TgZ(0,"span",8),l.NdJ("click",function(){return l.CHM(g),l.oxw().StoreRowsCountAPIResult()}),l.TgZ(1,"i",9),l._uU(2,"?"),l.qZA()()}}function y(_,f){if(1&_&&(l.TgZ(0,"span"),l._uU(1),l.ALo(2,"number"),l.qZA()),2&_){const g=l.oxw();l.xp6(1),l.hij(" of ",l.lcZ(2,1,g.listTotal),"")}}function s(_,f){if(1&_){const g=l.EpF();l.TgZ(0,"a",10),l.NdJ("click",function(){return l.CHM(g),l.oxw().onPreviousPage()}),l._UZ(1,"i",11),l._uU(2," Previous"),l.qZA()}}function et(_,f){if(1&_){const g=l.EpF();l.TgZ(0,"a",10),l.NdJ("click",function(){return l.CHM(g),l.oxw().onNextPage()}),l._UZ(1,"i",12),l._uU(2," Next"),l.qZA()}}let L=(()=>{class _{constructor(g){this.httpService=g,this.jumpToPage=new l.vpe,this.previousPage=new l.vpe,this.nextPage=new l.vpe,this.pageNumber=1,this.showingNumber=this.pageNumber,this.listTotal=-1}onJumpToPage(g){"Enter"===g.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(g=>{this.listTotal=g.Count?g.Count:g,this.pageData.HideStoreApiCount=!0})}}return _.\u0275fac=function(g){return new(g||_)(l.Y36(b.O))},_.\u0275cmp=l.Xpm({type:_,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","number","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(g,m){1&g&&(l.TgZ(0,"div",0)(1,"div",1)(2,"div",2),l.YNc(3,Q,2,2,"span",3),l.YNc(4,t,2,2,"span",3),l.YNc(5,N,3,0,"span",4),l.YNc(6,y,3,3,"span",3),l._uU(7," records ~ Page "),l.TgZ(8,"input",5),l.NdJ("keyup",function(E){return m.onJumpToPage(E)})("ngModelChange",function(E){return m.pageNumber=E}),l.qZA()()(),l.TgZ(9,"div",6),l.YNc(10,s,3,0,"a",7),l.YNc(11,et,3,0,"a",7),l.qZA()()),2&g&&(l.xp6(3),l.Q6J("ngIf",m.pageData.Filter.RowCount==m.total),l.xp6(1),l.Q6J("ngIf",m.pageData.Filter.RowCount!=m.total),l.xp6(1),l.Q6J("ngIf",!m.pageData.HideStoreApiCount),l.xp6(1),l.Q6J("ngIf",m.pageData.HideStoreApiCount),l.xp6(2),l.Q6J("ngModel",m.pageNumber),l.xp6(2),l.Q6J("ngIf",1!=m.pageData.Filter.PageNumber),l.xp6(1),l.Q6J("ngIf",m.total>=m.pageData.Filter.RowCount))},directives:[c.O5,v.wV,v.Fj,v.JJ,v.On],pipes:[c.JJ],styles:[""]}),_})(),ct=(()=>{class _{}return _.\u0275fac=function(g){return new(g||_)},_.\u0275mod=l.oAB({type:_}),_.\u0275inj=l.cJS({imports:[[c.ez,v.u5,v.UX]]}),_})()},55411:Vt=>{var A,u,c,l,v,b,Q,t,N,y,s,et,L,ct,_,f,g,m,q,E,F,w,pt,ht,at,xt,it,dt,M,D,nt,ut,J,st=[],X={},S="appendChild",V="createElement",R="removeChild";function At(){var d=A.getBoundingClientRect();return"transform:translate3D("+(d.left-(c.clientWidth-d.width)/2)+"px, "+(d.top-(c.clientHeight-d.height)/2)+"px, 0) scale3D("+A.clientWidth/l.clientWidth+", "+A.clientHeight/l.clientHeight+", 0)"}function K(d){var h=D.length-1;if(!L){if(d>0&&M===h||d<0&&!M){if(!J.loop)return k(v,""),void setTimeout(k,9,v,"animation:"+(d>0?"bpl":"bpf")+" .3s;transition:transform .35s");M=d>0?-1:h+1}if([(M=Math.max(0,Math.min(M+d,h)))-1,M,M+1].forEach(function(U){if(U=Math.max(0,Math.min(U,h)),!X[U]){var H=D[U].src,I=document[V]("IMG");I.addEventListener("load",Nt.bind(null,H)),I.src=H,X[U]=I}}),X[M].complete)return rt(d);L=!0,k(_,"opacity:.4;"),c[S](_),X[M].onload=function(){F&&rt(d)},X[M].onerror=function(){D[M]={error:"Error loading image"},F&&rt(d)}}}function rt(d){L&&(c[R](_),L=!1);var h=D[M];if(h.error)alert(h.error);else{var T=c.querySelector("img:last-of-type");k(v=l=X[M],"animation:"+(d>0?"bpfl":"bpfr")+" .35s;transition:transform .35s"),k(T,"animation:"+(d>0?"bpfol":"bpfor")+" .35s both"),c[S](v),h.el&&(A=h.el)}nt.innerHTML=M+1+"/"+D.length,_t(D[M].caption),xt&&xt([v,D[M]])}function Ct(){var d,h,T=.95*window.innerHeight,U=.95*window.innerWidth,I=J.dimensions||[1920,1080],P=I[0],O=I[1],W=O/P;W>T/U?h=(d=Math.min(O,T))/W:d=(h=Math.min(P,U))*W,t.style.cssText+="width:"+h+"px;height:"+d+"px;"}function vt(d){~[1,4].indexOf(l.readyState)?(tt(),setTimeout(function(){l.play()},99)):l.error?tt(d):ct=setTimeout(vt,35,d)}function ot(d){J.noLoader||(d&&k(_,"top:"+A.offsetTop+"px;left:"+A.offsetLeft+"px;height:"+A.clientHeight+"px;width:"+A.clientWidth+"px"),A.parentElement[d?S:R](_),L=d)}function _t(d){d&&(g.innerHTML=d),k(f,"opacity:"+(d?"1;pointer-events:auto":"0"))}function Nt(d){!~st.indexOf(d)&&st.push(d)}function tt(d){if(L&&ot(),ht&&ht(),"string"==typeof d)return Zt(),J.onError?J.onError():alert("Error: The requested "+d+" could not be loaded.");pt&&Nt(y),l.style.cssText+=At(),k(c,"opacity:1;pointer-events:auto"),at&&(at=setTimeout(at,410)),E=!0,F=!!D,setTimeout(function(){l.style.cssText+="transition:transform .35s;transform:none",m&&setTimeout(_t,250,m)},60)}function Tt(d){var h=d?d.target:c,T=[f,q,b,Q,g,dt,it,_];h.blur(),!w&&!~T.indexOf(h)&&(l.style.cssText+=At(),k(c,"pointer-events:auto"),setTimeout(Zt,350),clearTimeout(at),E=!1,w=!0)}function Zt(){if((l===t?N:l).removeAttribute("src"),document.body[R](c),c[R](l),k(c,""),k(l,""),_t(!1),F){for(var h=c.querySelectorAll("img"),T=0;T<h.length;T++)c[R](h[T]);L&&c[R](_),c[R](nt),F=D=!1,X={},ut||c[R](it),ut||c[R](dt),v.onload=tt,v.onerror=tt.bind(null,"image")}J.onClose&&J.onClose(),w=L=!1}function k(d,h){d.style.cssText=h}Vt.exports=function Dt(d){return u||function kt(){var d,h;function T(I){var P=document[V]("button");return P.className=I,P.innerHTML='<svg viewBox="0 0 48 48"><path d="M28 24L47 5a3 3 0 1 0-4-4L24 20 5 1a3 3 0 1 0-4 4l19 19L1 43a3 3 0 1 0 4 4l19-19 19 19a3 3 0 0 0 4 0v-4L28 24z"/></svg>',P}function U(I,P){var O=document[V]("button");return O.className="bp-lr",O.innerHTML='<svg viewBox="0 0 129 129" height="70" fill="#fff"><path d="M88.6 121.3c.8.8 1.8 1.2 2.9 1.2s2.1-.4 2.9-1.2a4.1 4.1 0 0 0 0-5.8l-51-51 51-51a4.1 4.1 0 0 0-5.8-5.8l-54 53.9a4.1 4.1 0 0 0 0 5.8l54 53.9z"/></svg>',k(O,P),O.onclick=function(W){W.stopPropagation(),K(I)},O}var H=document[V]("STYLE");H.innerHTML="#bp_caption,#bp_container{bottom:0;left:0;right:0;position:fixed;opacity:0}#bp_container>*,#bp_loader{position:absolute;right:0;z-index:10}#bp_container,#bp_caption,#bp_container svg{pointer-events:none}#bp_container{top:0;z-index:9999;background:rgba(0,0,0,.7);opacity:0;transition:opacity .35s}#bp_loader{top:0;left:0;bottom:0;display:flex;align-items:center;cursor:wait;background:0;z-index:9}#bp_loader svg{width:50%;max-width:300px;max-height:50%;margin:auto;animation:bpturn 1s infinite linear}#bp_aud,#bp_container img,#bp_sv,#bp_vid{user-select:none;max-height:96%;max-width:96%;top:0;bottom:0;left:0;margin:auto;box-shadow:0 0 3em rgba(0,0,0,.4);z-index:-1}#bp_sv{background:#111}#bp_sv svg{width:66px}#bp_caption{font-size:.9em;padding:1.3em;background:rgba(15,15,15,.94);color:#fff;text-align:center;transition:opacity .3s}#bp_aud{width:650px;top:calc(50% - 20px);bottom:auto;box-shadow:none}#bp_count{left:0;right:auto;padding:14px;color:rgba(255,255,255,.7);font-size:22px;cursor:default}#bp_container button{position:absolute;border:0;outline:0;background:0;cursor:pointer;transition:all .1s}#bp_container>.bp-x{padding:0;height:41px;width:41px;border-radius:100%;top:8px;right:14px;opacity:.8;line-height:1}#bp_container>.bp-x:focus,#bp_container>.bp-x:hover{background:rgba(255,255,255,.2)}.bp-x svg,.bp-xc svg{height:21px;width:20px;fill:#fff;vertical-align:top;}.bp-xc svg{width:16px}#bp_container .bp-xc{left:2%;bottom:100%;padding:9px 20px 7px;background:#d04444;border-radius:2px 2px 0 0;opacity:.85}#bp_container .bp-xc:focus,#bp_container .bp-xc:hover{opacity:1}.bp-lr{top:50%;top:calc(50% - 130px);padding:99px 0;width:6%;background:0;border:0;opacity:.4;transition:opacity .1s}.bp-lr:focus,.bp-lr:hover{opacity:.8}@keyframes bpf{50%{transform:translatex(15px)}100%{transform:none}}@keyframes bpl{50%{transform:translatex(-15px)}100%{transform:none}}@keyframes bpfl{0%{opacity:0;transform:translatex(70px)}100%{opacity:1;transform:none}}@keyframes bpfr{0%{opacity:0;transform:translatex(-70px)}100%{opacity:1;transform:none}}@keyframes bpfol{0%{opacity:1;transform:none}100%{opacity:0;transform:translatex(-70px)}}@keyframes bpfor{0%{opacity:1;transform:none}100%{opacity:0;transform:translatex(70px)}}@keyframes bpturn{0%{transform:none}100%{transform:rotate(360deg)}}@media (max-width:600px){.bp-lr{font-size:15vw}}",document.head[S](H),(c=document[V]("DIV")).id="bp_container",c.onclick=Tt,s=T("bp-x"),c[S](s),"ontouchend"in window&&window.visualViewport&&(ut=!0,c.ontouchstart=function(I){h=I.touches.length>1,d=I.changedTouches[0].pageX},c.ontouchend=function(I){if(F&&!h&&window.visualViewport.scale<=1){var O=I.changedTouches[0].pageX-d;O<-30&&K(1),O>30&&K(-1)}}),v=document[V]("IMG"),(b=document[V]("VIDEO")).id="bp_vid",b.setAttribute("playsinline",!0),b.controls=!0,b.loop=!0,(Q=document[V]("audio")).id="bp_aud",Q.controls=!0,Q.loop=!0,(nt=document[V]("span")).id="bp_count",(f=document[V]("DIV")).id="bp_caption",(q=T("bp-xc")).onclick=_t.bind(null,!1),f[S](q),g=document[V]("SPAN"),f[S](g),c[S](f),it=U(1,"transform:scalex(-1)"),dt=U(-1,"left:0;right:auto"),(_=document[V]("DIV")).id="bp_loader",_.innerHTML='<svg viewbox="0 0 32 32" fill="#fff" opacity=".8"><path d="M16 0a16 16 0 0 0 0 32 16 16 0 0 0 0-32m0 4a12 12 0 0 1 0 24 12 12 0 0 1 0-24" fill="#000" opacity=".5"/><path d="M16 0a16 16 0 0 1 16 16h-4A12 12 0 0 0 16 4z"/></svg>',(t=document[V]("DIV")).id="bp_sv",(N=document[V]("IFRAME")).setAttribute("allowfullscreen",!0),N.allow="autoplay; fullscreen",N.onload=function(){return t[R](_)},k(N,"border:0;position:absolute;height:100%;width:100%;left:0;top:0"),t[S](N),v.onload=tt,v.onerror=tt.bind(null,"image"),window.addEventListener("resize",function(){F||L&&ot(!0),l===t&&Ct()}),document.addEventListener("keyup",function(I){var P=I.keyCode;27===P&&E&&Tt(),F&&(39===P&&K(1),37===P&&K(-1),38===P&&K(10),40===P&&K(-10))}),document.addEventListener("keydown",function(I){F&&~[37,38,39,40].indexOf(I.keyCode)&&I.preventDefault()}),document.addEventListener("focus",function(I){E&&!c.contains(I.target)&&(I.stopPropagation(),s.focus())},!0),u=!0}(),L&&(clearTimeout(ct),Zt()),J=d,et=d.ytSrc||d.vimeoSrc,ht=d.animationStart,at=d.animationEnd,xt=d.onChangeImage,pt=!1,m=(A=d.el).getAttribute("data-caption"),d.gallery?function Qt(d,h){var T=J.galleryAttribute||"data-bp";if(Array.isArray(d))D=d,m=d[M=h||0].caption;else{var U=(D=[].slice.call("string"==typeof d?document.querySelectorAll(d+" ["+T+"]"):d)).indexOf(A);M=0===h||h?h:-1!==U?U:0,D=D.map(function(H){return{el:H,src:H.getAttribute(T),caption:H.getAttribute("data-caption")}})}pt=!0,!~st.indexOf(y=D[M].src)&&ot(!0),D.length>1?(c[S](nt),nt.innerHTML=M+1+"/"+D.length,ut||(c[S](it),c[S](dt))):D=!1,(l=v).src=y}(d.gallery,d.position):et||d.iframeSrc?(l=t,function Lt(){var d,h="https://",T="autoplay=1";J.ytSrc?d=h+"www.youtube"+(J.ytNoCookie?"-nocookie":"")+".com/embed/"+et+"?html5=1&rel=0&playsinline=1&"+T:J.vimeoSrc?d=h+"player.vimeo.com/video/"+et+"?"+T:J.iframeSrc&&(d=J.iframeSrc),k(_,""),t[S](_),N.src=d,Ct(),setTimeout(tt,9)}()):d.imgSrc?(pt=!0,!~st.indexOf(y=d.imgSrc)&&ot(!0),(l=v).src=y):d.audio?(ot(!0),(l=Q).src=d.audio,vt("audio file")):d.vidSrc?(ot(!0),d.dimensions&&k(b,"width:"+d.dimensions[0]+"px"),function Ft(d){Array.isArray(d)?(l=b.cloneNode(),d.forEach(function(h){var T=document[V]("SOURCE");T.src=h,T.type="video/"+h.match(/.(\w+)$/)[1],l[S](T)})):(l=b).src=d}(d.vidSrc),vt("video")):(l=v).src="IMG"===A.tagName?A.src:window.getComputedStyle(A).backgroundImage.replace(/^url|[(|)|'|"]/g,""),c[S](l),document.body[S](c),{close:Tt,opts:J,updateDimensions:Ct,display:l,next:function(){return K(1)},prev:function(){return K(-1)}}}}}]);