dealpostools 2.6.0 → 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"dealpostools","version":"2.6.0"}
1
+ {"name":"dealpostools","version":"2.6.2"}
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkweb_tools=self.webpackChunkweb_tools||[]).push([[574],{1574:(O,i,a)=>{a.r(i),a.d(i,{ManufactureOutputCostComponent:()=>v});var p=a(6814),t=a(5879),d=a(4387),f=a(4807),h=a(8745),l=a(6223),C=a(8017);let m=(()=>{var n;class o{constructor(){this.httpService=(0,t.f3M)(C.O),this.url=`https://${localStorage.getItem("Domain")}/API/`}recalculateManufactureOutputCost(e,s,r){return this.httpService.post(`${this.url}tools/UnitCost/ManufactureCost`,{From:e,To:s,ListIDs:r})}getOutletList(){return this.httpService.get(`${this.url}Outlet/SelectOptions/2`)}}return(n=o).\u0275fac=function(e){return new(e||n)},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac}),o})();var g=a(2425);let v=(()=>{var n;class o{constructor(){this.manufacturOutputCostService=(0,t.f3M)(m),this.toastr=(0,t.f3M)(g._W),this.outletList$=this.manufacturOutputCostService.getOutletList()}onDateChange(e){this.from=e.from,this.to=e.to}onProcess(){this.from&&this.to&&this.selectedOutlet?this.manufacturOutputCostService.recalculateManufactureOutputCost(this.from,this.to,this.selectedOutlet).subscribe({next:e=>{e.Affected>0?this.toastr.success(`<div class="text-nowrap"><span class="fw-bold">${e.Affected} job orders</span> successfully recalculated.</div>\n <div><span class="fw-bold">${e.NotAffected} job orders</span> not affected.</div>\n `,"Success",{timeOut:3e4,enableHtml:!0}):this.toastr.info("No items affected by the recalculation.","Info")}}):this.toastr.error("Please select a date range and an outlet.","Error")}}return(n=o).\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-manufacture-output-cost"]],standalone:!0,features:[t._Bn([m]),t.jDz],decls:20,vars:7,consts:[["Title","Manufacture Output Cost",3,"hideSearchBox","hideSearchDropdown"],["type","button",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"container-fluid"],[1,"d-inline","ms-10","mt-6"],["bindLabel","v","bindValue","k","placeholder","Select an Outlet",2,"width","250px",3,"clearable","items","ngModel","ngModelChange"],[1,"mb-0","mt-8","ms-1"],[2,"width","250px"],[1,"net-sales-filter",3,"dateChange"],[1,"d-inline","ms-10","text-danger"],[1,"mt-2"]],template:function(e,s){1&e&&(t.TgZ(0,"mainpanel",0)(1,"actions")(2,"button",1),t.NdJ("click",function(){return s.onProcess()}),t._uU(3," Process "),t.qZA()(),t.TgZ(4,"content")(5,"div",2)(6,"div",3)(7,"h6"),t._uU(8,"Outlet"),t.qZA(),t.TgZ(9,"ng-select",4),t.NdJ("ngModelChange",function(u){return s.selectedOutlet=u}),t.ALo(10,"async"),t.qZA(),t.TgZ(11,"h6",5),t._uU(12,"From - To"),t.qZA(),t.TgZ(13,"div",6)(14,"app-datepicker-range",7),t.NdJ("dateChange",function(u){return s.onDateChange(u)}),t.qZA()()(),t.TgZ(15,"div",8)(16,"h6"),t._uU(17,"NOTES"),t.qZA(),t.TgZ(18,"p",9),t._uU(19," Recalculate will sum material and expense costs, and apply it to the output cost only if there's a single output item. No recalculation if multiple outputs exist. "),t.qZA()()()()()),2&e&&(t.Q6J("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(9),t.Q6J("clearable",!0)("items",t.lcZ(10,5,s.outletList$))("ngModel",s.selectedOutlet))},dependencies:[p.ez,p.Ov,d.R,d.p,f.A0,f.w9,h.C8,h.Pg,l.u5,l.JJ,l.On]}),o})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkweb_tools=self.webpackChunkweb_tools||[]).push([[696],{5696:(y,C,i)=>{i.r(C),i.d(C,{CssEditorComponent:()=>F});var d=i(6814),e=i(5879),h=i(4387),p=i(4807),a=i(6223),m=i(8017);let u=(()=>{var n;class r{constructor(){this.domain=localStorage.getItem("Domain"),this.httpService=(0,e.f3M)(m.O)}saveCssFile(t,s){return this.httpService.post("/API/UploadStyles/Submit",{Domain:this.domain,FileName:t,RequestBody:s})}getCssFile(t,s){return this.httpService.post(`https://${this.domain}/API/tools/Advanced/FileTextEditor`,{Filter:{Label:t,Url:s}})}}return(n=r).\u0275fac=function(t){return new(t||n)},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac}),r})();var f=i(7398),S=i(9397),g=i(7081),v=i(2425);function b(n,r){1&n&&e.GkF(0)}let F=(()=>{var n;class r{constructor(){this.cssEditorService=(0,e.f3M)(u),this.toastr=(0,e.f3M)(v._W),this.editedCssContent=(0,e.tdS)(""),this.cssContentSource=(0,e.tdS)(""),this.cssOptions=(0,e.Flj)(()=>[{label:"PaperSizeA4_custom.css",url:"Styles\\Print\\PaperSizeA4_custom.css",backupUrl:"StylesB\\Print\\PaperSizeA4_custom.css"},{label:"PaperSize8cm_custom.css",url:"Styles\\Print\\PaperSize8cm_custom.css",backupUrl:"StylesB\\Print\\PaperSize8cm_custom.css"}]),this.filterSelectedCss=(0,e.tdS)({label:this.cssOptions()[0].label,url:`${this.cssOptions()[0].url}&${this.cssOptions()[0].backupUrl}`})}ngOnInit(){this.initGetCssFile()}initGetCssFile(){this.cssFileContent$=this.cssEditorService.getCssFile(this.filterSelectedCss().label,this.filterSelectedCss().url).pipe((0,f.U)(t=>(t.Url=`https://styles.dealpos.app${t.Url}`,t)),(0,S.b)(t=>{this.editedCssContent.set(t.Text),this.cssContentSource.set(t.Text)}),(0,g.d)(1))}onCssChange(t){this.filterSelectedCss.update(()=>({label:t.label,url:`${t.url}&${t.backupUrl}`})),this.initGetCssFile()}onSaveCssFile(){if(this.cssContentSource()===this.editedCssContent())return void this.toastr.info("No changes detected","Info");const t=this.filterSelectedCss().label,s=this.editedCssContent();this.cssEditorService.saveCssFile(t,s).subscribe(()=>{this.toastr.success("File saved successfully","Success"),this.initGetCssFile()})}}return(n=r).\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-css-editor"]],standalone:!0,features:[e._Bn([u]),e.jDz],decls:23,vars:15,consts:[["Title","Css Editor",3,"hideSearchBox","hideSearchDropdown"],["type","button",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"container-fluid"],[1,"d-none","d-sm-block"],[1,"mt-5","d-flex","align-items-center","w-100"],[1,"d-flex","align-items-center","me-4"],["bindLabel","label","bindValue","label","placeholder","Choose css file",1,"ms-5",2,"width","200px",3,"clearable","items","ngModel","change"],[2,"margin-top","6px"],[4,"ngIf"],[2,"width","100%","height","440px","font-size","15px","font-family","Cambria",3,"ngModel","ngModelChange"],[1,"me-3"],["target","_blank",1,"fw-normal",3,"href"]],template:function(t,s){if(1&t&&(e.TgZ(0,"mainpanel",0)(1,"actions")(2,"button",1),e.NdJ("click",function(){return s.onSaveCssFile()}),e._uU(3,"Save"),e.qZA()(),e.TgZ(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"label"),e._uU(10,"File Name"),e.qZA(),e.TgZ(11,"ng-select",6),e.NdJ("change",function(o){return s.onCssChange(o)}),e.qZA()()(),e.TgZ(12,"div",7),e.YNc(13,b,1,0,"ng-container",8),e.ALo(14,"async"),e.TgZ(15,"textarea",9),e.NdJ("ngModelChange",function(o){return s.editedCssContent.set(o)}),e.qZA(),e.TgZ(16,"h6")(17,"span",10),e._uU(18,"Css Url:"),e.qZA(),e.TgZ(19,"a",11),e.ALo(20,"async"),e._uU(21),e.ALo(22,"async"),e.qZA()()()()()()()),2&t){let l,o;e.Q6J("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(11),e.Q6J("clearable",!1)("items",s.cssOptions())("ngModel",s.filterSelectedCss().label),e.xp6(2),e.Q6J("ngIf",e.lcZ(14,9,s.cssFileContent$)),e.xp6(2),e.Q6J("ngModel",s.editedCssContent()),e.xp6(4),e.Q6J("href",null==(l=e.lcZ(20,11,s.cssFileContent$))?null:l.Url,e.LSH),e.xp6(2),e.Oqu(null==(o=e.lcZ(22,13,s.cssFileContent$))?null:o.Url)}},dependencies:[d.ez,d.O5,d.Ov,h.R,h.p,p.A0,p.w9,a.u5,a.Fj,a.JJ,a.On]}),r})()}}]);