dealpos 25.51.0 → 25.51.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/browser/{chunk-OURNAI65.js → chunk-243EB36Y.js} +2 -2
  2. package/browser/{chunk-5HIJCKLY.js → chunk-3K2A4Z67.js} +1 -1
  3. package/browser/{chunk-43G72GH2.js → chunk-4OP4E5Q4.js} +1 -1
  4. package/browser/{chunk-V6NXOOJA.js → chunk-4PDGY62B.js} +1 -1
  5. package/browser/{chunk-WR54IKY6.js → chunk-54SK3PVO.js} +1 -1
  6. package/browser/{chunk-VQKO557Q.js → chunk-55Z32OLJ.js} +1 -1
  7. package/browser/{chunk-SVUFU2AS.js → chunk-5XTMPVSF.js} +1 -1
  8. package/browser/{chunk-67UFIJ2O.js → chunk-6OULAYGH.js} +1 -1
  9. package/browser/{chunk-HIA4J5DB.js → chunk-6VYP636I.js} +1 -1
  10. package/browser/{chunk-PV27CMZ2.js → chunk-7264OPXA.js} +1 -1
  11. package/browser/{chunk-XWV7AI2C.js → chunk-7OQXKVTC.js} +1 -1
  12. package/browser/{chunk-6UY42XOC.js → chunk-AB7O2ERM.js} +1 -1
  13. package/browser/{chunk-T5IJP474.js → chunk-ABOSNV75.js} +1 -1
  14. package/browser/{chunk-HHCNN3XR.js → chunk-BCGNQKO5.js} +1 -1
  15. package/browser/{chunk-RU3GD3GY.js → chunk-BRQVQGLJ.js} +1 -1
  16. package/browser/{chunk-2EHLYOAD.js → chunk-BWVEZ3MZ.js} +1 -1
  17. package/browser/{chunk-RHDU4PR2.js → chunk-CAGFIP4G.js} +1 -1
  18. package/browser/{chunk-4MWVPOV6.js → chunk-CJ4ET4PG.js} +1 -1
  19. package/browser/{chunk-CRKJEU3Z.js → chunk-CR5CHTI7.js} +1 -1
  20. package/browser/{chunk-4CYACZL5.js → chunk-DAH4EEQV.js} +1 -1
  21. package/browser/{chunk-SCHTN7VQ.js → chunk-DBRZ7F2Z.js} +1 -1
  22. package/browser/{chunk-VA6MHJ5E.js → chunk-DNY4JYTC.js} +1 -1
  23. package/browser/{chunk-IM3B5EF2.js → chunk-E5TUY2II.js} +1 -1
  24. package/browser/chunk-EFDMYOLZ.js +4 -0
  25. package/browser/{chunk-NRTKHF45.js → chunk-EMHEIQNS.js} +1 -1
  26. package/browser/{chunk-QS2AUXB7.js → chunk-FEHMPX43.js} +1 -1
  27. package/browser/{chunk-WQMYMJLR.js → chunk-FVFTYYCC.js} +1 -1
  28. package/browser/{chunk-BVOUQJCA.js → chunk-GE5I6JYL.js} +1 -1
  29. package/browser/{chunk-ZNPC63ZV.js → chunk-GZ6OVEDL.js} +1 -1
  30. package/browser/{chunk-NQQB5U5S.js → chunk-H6RHVRGW.js} +1 -1
  31. package/browser/{chunk-6LZENMYE.js → chunk-HLCZLXPS.js} +1 -1
  32. package/browser/{chunk-N6EBK52R.js → chunk-IF6EZMOM.js} +2 -2
  33. package/browser/{chunk-OTLU2WY3.js → chunk-ISZRZRCT.js} +2 -2
  34. package/browser/{chunk-I7AQHKKG.js → chunk-JHBK7LOJ.js} +1 -1
  35. package/browser/{chunk-PQSGJR4P.js → chunk-KDISSQKT.js} +1 -1
  36. package/browser/{chunk-5ZPO7V26.js → chunk-KFC3V2GW.js} +1 -1
  37. package/browser/{chunk-KEILLJ6G.js → chunk-KHB5Q7IN.js} +1 -1
  38. package/browser/{chunk-P5XKSQ34.js → chunk-KIYO2YC2.js} +1 -1
  39. package/browser/{chunk-HVFYCXLX.js → chunk-KKM7I2BT.js} +1 -1
  40. package/browser/{chunk-DX56EYRS.js → chunk-LHTHIOAY.js} +1 -1
  41. package/browser/{chunk-A5LIALQE.js → chunk-M4FNFZNJ.js} +1 -1
  42. package/browser/{chunk-TOJPS7BJ.js → chunk-MEL6Z4NI.js} +1 -1
  43. package/browser/{chunk-XVTXHAKW.js → chunk-MHPLYS7O.js} +1 -1
  44. package/browser/{chunk-ZO3XZXWW.js → chunk-MJCLLJBB.js} +1 -1
  45. package/browser/{chunk-2GIDUMXS.js → chunk-MZDVGN2B.js} +1 -1
  46. package/browser/{chunk-SUCJCOST.js → chunk-NYMHQHNP.js} +1 -1
  47. package/browser/{chunk-6AHKVKAZ.js → chunk-O7SYLGUB.js} +2 -2
  48. package/browser/{chunk-OZ2R2K2V.js → chunk-OF3BZHBQ.js} +1 -1
  49. package/browser/{chunk-H2RXYP7A.js → chunk-OFWJY5WB.js} +1 -1
  50. package/browser/{chunk-3HDEMBWS.js → chunk-ORTAUDOX.js} +1 -1
  51. package/browser/{chunk-4OTZNFYS.js → chunk-PSLGWGNP.js} +1 -1
  52. package/browser/{chunk-MUWJSYXR.js → chunk-Q22HR52N.js} +1 -1
  53. package/browser/{chunk-ZNJ4JTTS.js → chunk-QEL7CGCP.js} +1 -1
  54. package/browser/{chunk-57WKDIDF.js → chunk-QHGZQ2IG.js} +1 -1
  55. package/browser/{chunk-6F45DEGR.js → chunk-R6DRKF4V.js} +8 -8
  56. package/browser/{chunk-HHM4L75O.js → chunk-RDASAJA5.js} +1 -1
  57. package/browser/{chunk-HSLDD424.js → chunk-RPBIQ4ME.js} +1 -1
  58. package/browser/{chunk-DJUOMCAV.js → chunk-RT7OZJYZ.js} +1 -1
  59. package/browser/{chunk-3PKJLXTC.js → chunk-RWW55Z7V.js} +1 -1
  60. package/browser/{chunk-V36Z6WRV.js → chunk-RWZGTR3S.js} +1 -1
  61. package/browser/{chunk-YXRJV3RQ.js → chunk-SQAFHZEO.js} +1 -1
  62. package/browser/{chunk-RF5FWMSR.js → chunk-T43ISYOP.js} +1 -1
  63. package/browser/{chunk-6O6OE4KQ.js → chunk-TKHSLAZH.js} +13 -13
  64. package/browser/{chunk-OAVGNXY4.js → chunk-TYVVSM36.js} +1 -1
  65. package/browser/{chunk-D7YMUC3H.js → chunk-U6FO6TSU.js} +1 -1
  66. package/browser/{chunk-XPN6EISF.js → chunk-UFVN6MTY.js} +1 -1
  67. package/browser/{chunk-VOY3BJZP.js → chunk-UI6U53UY.js} +1 -1
  68. package/browser/{chunk-B6TCVVAN.js → chunk-UPV6ZIB5.js} +1 -1
  69. package/browser/{chunk-6GCAXVFO.js → chunk-VG3B7TDX.js} +1 -1
  70. package/browser/{chunk-OR4H5IKL.js → chunk-VS6CGXUJ.js} +1 -1
  71. package/browser/{chunk-T6GXIGYG.js → chunk-WDUPZI6X.js} +1 -1
  72. package/browser/{chunk-TCW7SVU5.js → chunk-WTIIZBRC.js} +1 -1
  73. package/browser/{chunk-HQGZC4Y3.js → chunk-XCSDEGWL.js} +1 -1
  74. package/browser/{chunk-WFTIOB7Q.js → chunk-XDFUPYND.js} +1 -1
  75. package/browser/{chunk-3XDE3GJ3.js → chunk-XFU3EMCG.js} +1 -1
  76. package/browser/{chunk-7JBFR3T4.js → chunk-XGXXFTMA.js} +1 -1
  77. package/browser/{chunk-DCONKX6G.js → chunk-XMPWQ5UV.js} +1 -1
  78. package/browser/{chunk-ECW7GAZQ.js → chunk-XPM7J5AN.js} +1 -1
  79. package/browser/{chunk-HZP6OUOI.js → chunk-XW7VJLDW.js} +1 -1
  80. package/browser/{chunk-MTUBVUM5.js → chunk-Y6SAXN2J.js} +1 -1
  81. package/browser/{chunk-A2EDYIYP.js → chunk-YLXBICIW.js} +1 -1
  82. package/browser/{chunk-IHIJW73V.js → chunk-Z5HEFUTD.js} +1 -1
  83. package/browser/{chunk-YC2LQSY3.js → chunk-ZRJU5XBX.js} +1 -1
  84. package/browser/index.html +2 -2
  85. package/browser/{main-PHIUFC5R.js → main-6NLSRECT.js} +2 -2
  86. package/package.json +1 -1
  87. package/browser/chunk-QERITLZK.js +0 -4
@@ -1 +1 @@
1
- import{a as _e}from"./chunk-MUWJSYXR.js";import{a as Pe}from"./chunk-PNFJVQUF.js";import{a as Oe}from"./chunk-VQKO557Q.js";import{a as Se}from"./chunk-BAXZ74LK.js";import{b as Me,c as Ce}from"./chunk-V6D6TV7B.js";import{a as me}from"./chunk-UIVJ2JQT.js";import"./chunk-EQLHPWVB.js";import"./chunk-N7OS7SFI.js";import{F as ve,b as fe,h as he,o as ge}from"./chunk-7MRUPBXU.js";import{a as T,c as f}from"./chunk-T5IJP474.js";import{a as be}from"./chunk-DJUOMCAV.js";import"./chunk-5RYL4EJ2.js";import{b as I}from"./chunk-KBLVOO4J.js";import{a as M}from"./chunk-WUV22SZ4.js";import{a as ue}from"./chunk-NQQB5U5S.js";import{p as de}from"./chunk-TANYEHMZ.js";import{$ as Y,Ac as te,Bc as ie,E,Eb as j,Fb as F,Gb as V,Hb as h,Hc as ne,Ib as o,Jb as s,Jc as re,Kb as u,Od as se,Qd as le,Rd as b,Sa as W,Sd as ce,Td as pe,Ub as C,Ud as G,Wb as K,Xa as p,d as q,da as D,eb as v,gc as X,ib as Q,ic as $,id as oe,jb as x,jc as m,kc as B,la as d,lc as z,ma as y,oa as _,pa as c,vc as ee,wb as Z,xd as ae}from"./chunk-L3U6V3BF.js";import"./chunk-WFMAM73Y.js";import{a as J}from"./chunk-SNAKHGZS.js";var r=class e{constructor(n,t){this.authService=n;this.router=t}canLoad(n,t){return this.authService.isTokenExpired()?(this.authService.returnUrl=this.getUrlRedirect(t),this.router.navigate(["/"]),!1):!0}getUrlRedirect(n){let t="/menu";n.forEach(a=>t+=`/${a.path}`);let i=this.router.currentNavigation().extractedUrl.queryParams;return Object.keys(i).forEach((a,g)=>{g==0?t=`${t}?${a}=${i[a]}`:t=`${t}&${a}=${i[a]}`}),t}static \u0275fac=function(t){return new(t||e)(_(f),_(b))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var w=class e{constructor(n){this.toastrService=n;this.initPermissionToastr=!1}isPermissionGranted;initPermissionToastr;initPermission(){try{this.initPermissionToastr||Notification.requestPermission().then(t=>{this.isPermissionGranted=!1,t=="granted"&&(this.isPermissionGranted=!0),this.initPermissionToastr=!0})}catch(n){console.error(n)}}showAlert(n,t,i,l){let a=6e4;if(this.isPermissionGranted)try{let g=new Notification(t,{body:n,icon:l});g.onerror=(N=>{this.toastrService.info(this.setBody(n,i),t,{timeOut:a,enableHtml:this.hasUrl(i)})})}catch(g){console.error(g)}else this.toastrService.info(this.setBody(n,i),t,{timeOut:a,enableHtml:this.hasUrl(i)})}setBody(n,t){return this.hasUrl(t)&&(n=`<a href="${t}" target="_blank" class="ps-0">${n}</a>`),n}hasUrl(n){return!!(n&&n.length!==0)}static \u0275fac=function(t){return new(t||e)(_(de))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var ye=[{T:"Dashboard",U:"/menu/Dashboard",I:"fa-solid fa-chart-pie"},{T:"Products",U:"/menu/Products",I:"fa-solid fa-tag"},{T:"Estimate",U:"/menu/Estimate",I:"fa-solid fa-clipboard"},{T:"Sell",U:"/menu/Sell",I:"fa-solid fa-cart-shopping"},{T:"Shift",U:"/menu/Shift/",I:"fa-solid fa-user-clock"},{T:"Reports",U:"/menu/Reports",I:"fa-solid fa-chart-area"},{T:"Contacts",U:"/menu/Contacts",I:"fas fa-address-book"},{T:"Orders",U:"/menu/Orders",I:"fas fa-file-invoice"},{T:"Payment",U:"/menu/Payment",I:"fas fa-money-bill-alt"},{T:"Debt",U:"/menu/Debt",I:"fas fa-dollar-sign"},{T:"Inventory",U:"/menu/Inventory",I:"fas fa-archive"},{T:"Adjustment",U:"/menu/Adjustment",I:"fas fa-scanner-gun"},{T:"Buy",U:"/menu/Buy",I:"fa-solid fa-cart-arrow-down"},{T:"Logistics",U:"/menu/Logistics",I:"fas fa-truck"},{T:"Fulfillment",U:"/menu/Fulfillment",I:"fas fa-dolly"},{T:"Manufacture",U:"/menu/Manufacture",I:"fas fa-industry"},{T:"Prepaid Package",U:"/menu/Prepaid_Package",I:"fa-solid fa-id-card"},{T:"Promotion",U:"/menu/Promotion",I:"fas fa-bullhorn"},{T:"Users",U:"/menu/Users",I:"fas fa-user"},{T:"Outlets",U:"/menu/Outlets",I:"fas fa-map-marker-alt"},{T:"Setup",U:"/menu/Setup",I:"fas fa-gear"},{T:"Developer",U:"/menu/Developer",I:"fas fa-code"}];var k=class e{role=c(I);authService=c(f);menu=ye;filteredMenu=[];initFilteredMenu(){let n=this.menu.map(i=>J({},i)),t=n.findIndex(i=>i.T==="Reports");if(t!==-1){let i=!!this.role.report?.View,l=!!this.role.report?.Advanced,a=!!this.role.report?.Periodic;i?n[t].U="/menu/Reports":l?n[t].U="/menu/Reports/Sales_Report/Standard/Top_Customers":a?n[t].U="/menu/Reports/Sales_Report/Standard/Daily":n[t].U="/menu/Reports"}this.filteredMenu=n.filter(i=>i.T==="Dashboard"?this.role.dashboard.View:i.T==="Products"?this.role.product.View:i.T==="Estimate"?this.role.estimate.Create:i.T==="Sell"?this.role.sell.Create:i.T==="Shift"?this.role.sell.Create:i.T==="Reports"?!!this.role.report?.View||!!this.role.report?.Advanced||!!this.role.report?.Periodic:i.T==="Contacts"?this.role.contact.View:i.T==="Orders"?this.role.order.View:i.T==="Payment"?this.role.payment.View:i.T==="Debt"?this.role.debt.View:i.T==="Inventory"?this.role.inventory.View:i.T==="Adjustment"?this.role.adjustment.View:i.T==="Buy"?this.role.buy.Create:i.T==="Logistics"?this.role.logistic.View:i.T==="Manufacture"?this.role.manufacture.View:i.T==="Fulfillment"?this.role.fulfillment.View:i.T==="Prepaid Package"?this.role.prepaidPackage.View:i.T==="Promotion"?this.role.promotion.View:i.T==="Users"?this.role.users.View:i.T==="Outlets"?this.role.outlets.View:i.T==="Setup"?this.role.setup.View:i.T==="Developer"?this.role.developer.View:!0),this.filterBySubscriptionStatus()}filterBySubscriptionStatus(){let n=this.authService.getSubscriptionStatus();this.filteredMenu=this.filteredMenu.filter(t=>{switch(n){case 2:return t.T=="Sell"||t.T=="Shift";case 3:return!1;default:return!0}})}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var xe=[{T:"My Profile",U:"Profile/Main/My_Profile",I:"fas fa-user"},{T:"My Subscription",U:"Profile/Main/My_Subscription",I:"fa-solid fa-credit-card"},{T:"Notification",U:"Profile/Notification/Push",I:"fas fa-bell"},{T:"My Sales",U:"Profile/Main/My_Sales",I:"fas fa-history"}];var A=class e{role=c(I);authService=c(f);filteredMenu=[];initFilteredMenu(){let n=this.authService.getSubscriptionStatus();this.filteredMenu=xe.filter(t=>t.T=="My Profile"?this.role.profile.View:t.T=="My Subscription"?this.role.profile.Subscription:t.T=="Notification"?this.role.profile.Notification&&n!=2&&n!=3:t.T=="My Sales"?n!=2&&n!=3:!0)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Le=(e,n)=>({"full-container":e,"subscription-bar-visible":n}),Ne=e=>[e];function Ee(e,n){if(e&1&&(o(0,"a",11),u(1,"i",35),o(2,"span"),m(3),s()()),e&2){let t=n.$implicit;h("routerLink",t==null?null:t.U),p(),$((t==null?null:t.I)+" me-2"),p(2),B(t==null?null:t.T)}}function De(e,n){if(e&1&&(o(0,"li",33,0)(2,"a",36),u(3,"i"),o(4,"p"),m(5),s()()()),e&2){let t=n.$implicit,i=K();h("routerLinkActiveOptions",i.isActiveMatchOptions),Z("data-cy",t==null?null:t.T),p(2),h("matTooltip",i.toggleSideMenu?t==null?null:t.T:"")("routerLink",te(7,Ne,t==null?null:t.U)),p(),$(t==null?null:t.I),p(2),B(t==null?null:t.T)}}var P=class e{constructor(n,t,i,l,a,g,N,H){this.toggleSidebar=n;this.signalRClientService=t;this.notificationAlertService=i;this.router=l;this.authService=a;this.intercomService=g;N.initFilteredMenu(),H.initFilteredMenu(),this.leftSidebarMenu=N.filteredMenu,this.topMenu=H.filteredMenu,this.accountInfo=JSON.parse(localStorage.getItem("AccountInfo")),this.toggleSidebar.toggleState$.subscribe(Ie=>this.isNavOpen=Ie),this.destroy$=new q,this.initNotificationPermission()}isActiveMatchOptions={matrixParams:"subset",queryParams:"subset",paths:"subset",fragment:"exact"};toggleSideMenu=!1;isNavOpen;destroy$;activeMenu;appVersion=ue.version;currentSubStatus;subsStatusEnum=T;isFullContainer=!1;isHideIntercomLauncher;leftSidebarMenu;topMenu;accountInfo;ngOnInit(){this.subscribeToPushNotification(),this.getCurrentSubscriptionStatus(),this.initFullContainer()}initFullContainer(){this.router.events.pipe(E(n=>n instanceof se),Y(null),D(this.destroy$)).subscribe(n=>{this.isFullContainer=!1,(this.router.url.includes("Sell")&&!this.router.url.includes("v2")&&!this.router.url.includes("Offline")||this.router.url.includes("Buy")||this.router.url.includes("menu/Estimate")||this.router.url.includes("Transfer_Order/Form")||this.router.url.includes("Adjustment/Archive/Form")||this.router.url.includes("Job_Order/Archive/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Invoice/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Bill/New_Join_Bill"))&&(this.isFullContainer=!0)})}initNotificationPermission(){this.notificationAlertService.initPermission()}getCurrentSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus()}subscribeToPushNotification(){let n=localStorage.getItem("NotificationOutletID");M.IsNotEmpty(n)&&M.isGuid(n)?this.signalRClientService.SubscribeGroup(n):this.signalRClientService.startConnection(),this.signalRClientService.OnReceivePushNotification.pipe(D(this.destroy$),E(t=>M.IsNotEmpty(t))).subscribe(t=>{if(M.IsNotEmpty(t)){let i=JSON.parse(t),l="https://cdn.dealpos.xyz/web-image/info-new.png";M.IsNotEmpty(i.Icon)&&(l=i.Icon),this.notificationAlertService.showAlert(i.Body,i.Header,i.URL,l)}})}ngAfterViewInit(){this.intercomService.inititalizeIntercom()}toggleMenu(){this.toggleSideMenu=!this.toggleSideMenu}logout(){this.authService.logout()}isNotEmpty(n){return M.IsNotEmpty(n)}onShowDropdown(){this.isHideIntercomLauncher=this.intercomService.isHideLauncher()}chatToggleChange(){this.isHideIntercomLauncher==!1?this.intercomService.hideLauncher():this.intercomService.showLauncher(),this.onShowDropdown()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(t){return new(t||e)(v(Se),v(me),v(w),v(b),v(f),v(be),v(k),v(A))};static \u0275cmp=Q({type:e,selectors:[["POS-menu-master"]],standalone:!1,decls:54,vars:17,consts:[["rla","routerLinkActive"],[1,"wrapper"],["data-color","blue",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-lg-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fa-solid",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-cy","companyName","data-bs-toggle","dropdown","aria-expanded","false","matTooltipPosition","above",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center",2,"cursor","pointer",3,"click","matTooltip"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],[1,"dropdown-item","h5",3,"routerLink"],[1,"dropdown-item","h5",2,"cursor","pointer"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fa-solid","fa-comment-dots","me-2"],[1,"checkbox_toggle","ms-3",3,"click"],["type","checkbox","id","chatToggle","name","ChatToggle",3,"ngModelChange","ngModel"],["for","chatToggle",1,"position-relative","rounded-pill","pointer"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-sign-out-alt","me-2"],[1,"divider"],[1,"dropdown-header","border-top"],["target","_blank",1,"dropdown-item","h5","changelog",3,"href"],["aria-hidden","true",1,"fa-solid","fa-sparkles","me-2"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],["target","_blank","href","http://support.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-book","me-2"],["target","_blank","href","https://www.dealpos.app/",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-table-cells-large","me-2"],["target","_blank","href","http://blog.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-brands","fa-blogger","me-2"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",3,"routerLinkActiveOptions"],["id","full-container",1,"main-panel",3,"ngClass"],["aria-hidden","true"],["matTooltipPosition","above",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"]],template:function(t,i){t&1&&(o(0,"div",1)(1,"div",2)(2,"button",3),C("click",function(){return i.toggleMenu()}),u(3,"i",4),s(),o(4,"div",5)(5,"div",6)(6,"a",7),C("click",function(){return i.onShowDropdown()}),m(7),ne(8,"limitText"),s(),o(9,"div",8)(10,"div",9),m(11),s(),u(12,"div",10),F(13,Ee,4,4,"a",11,j),o(15,"a",12)(16,"div",13)(17,"div"),u(18,"i",14),o(19,"span"),m(20,"Chat Support"),s()(),o(21,"div",15),C("click",function(a){return a.stopPropagation()}),o(22,"input",16),C("ngModelChange",function(){return i.chatToggleChange()}),s(),u(23,"label",17),s()()(),o(24,"a",18),C("click",function(){return i.logout()}),u(25,"i",19),o(26,"span"),m(27,"Log Out"),s()(),u(28,"div",20),o(29,"div",21),m(30," Links "),s(),o(31,"a",22),u(32,"i",23),o(33,"span"),m(34,"What's New"),u(35,"i",24),s()(),o(36,"a",25),u(37,"i",26),o(38,"span"),m(39,"Help Center"),s()(),o(40,"a",27),u(41,"i",28),o(42,"span"),m(43,"App Store"),s()(),o(44,"a",29),u(45,"i",30),o(46,"span"),m(47,"Company Blog"),s()()()()(),o(48,"div",31)(49,"ul",32),F(50,De,6,9,"li",33,j),s()()(),o(52,"div",34),u(53,"router-outlet"),s()()),t&2&&(X("nav-open",i.isNavOpen),p(),h("ngClass",i.toggleSideMenu?"collapses":""),p(2),h("ngClass",i.toggleSideMenu?"fa-angle-left cursor":"fa-angle-right cursor"),p(3),h("matTooltip",i.accountInfo==null?null:i.accountInfo.BrandName),p(),z(" ",re(8,11,i.accountInfo==null?null:i.accountInfo.BrandName,12)," "),p(4),z("",i.accountInfo==null?null:i.accountInfo.UserName," "),p(2),V(i.topMenu),p(9),h("ngModel",!i.isHideIntercomLauncher),p(9),h("href",ee("https://changelog.dealpos.com/?categories=cat_gAZdRhBYU7QVl&view=complete&v=",i.appVersion),W),p(19),V(i.leftSidebarMenu),p(2),h("ngClass",ie(14,Le,i.isFullContainer,i.isNotEmpty(i.currentSubStatus)&&i.currentSubStatus!==i.subsStatusEnum.PAID)))},dependencies:[Me,le,ce,pe,fe,he,ge,oe,Pe],styles:['.sidebar[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%], body[_ngcontent-%COMP%] > .navbar-collapse[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important}.sidebar-wrapper[_ngcontent-%COMP%]{max-height:calc(100% - 61px)!important;min-height:calc(100% - 61px)!important}@media (max-width: 991px){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (pointer: coarse){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}}.full-container[_ngcontent-%COMP%]{padding-top:0!important}.changelog[_ngcontent-%COMP%]{color:#0006b1!important}.changelog[_ngcontent-%COMP%]:visited{color:#2e2e2e!important}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:relative}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited:hover span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#e9ecef!important;position:absolute;top:-4px;right:-18px}.subscription-bar-visible[_ngcontent-%COMP%]{padding-top:98px}.checkbox_toggle[_ngcontent-%COMP%]{position:relative}.checkbox_toggle[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#868686;display:inline-block;padding-right:38px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{width:23px;height:14px;background-color:#ccc;top:2.2px;right:0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background-color:#1f77d0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:after{left:10px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:after{content:"";width:12px;height:12px;border-radius:50%;position:absolute;top:.8px;left:1px;transition:all .1s;background-color:#fff}']})};function je(e){let n=c(b),t="/menu";e.forEach(a=>t+=`/${a.path}`);let i=n.currentNavigation().extractedUrl.queryParams;return Object.keys(i).forEach((a,g)=>{g==0?t=`${t}?${a}=${i[a]}`:t=`${t}&${a}=${i[a]}`}),t}var O=(e,n)=>{let t=c(f),i=t.isTokenExpired(),l=c(b);return i?(t.returnUrl=je(n),l.navigate(["/"]),!1):e.path=="Dashboard"?Fe():!0};function Fe(){let e=c(b),n=c(f),t=!1,i=n.getRedirectUrl();return t=i.includes("Dashboard"),t==!1&&e.navigate([i]),t}var U=class e{paymentStorageService=c(_e);canActivate(n,t){return this.paymentStorageService.clear(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var R=class e{reportService=c(Oe);canActivate(n,t){return this.reportService.resetFilter(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ve=[{path:"",component:P,children:[{path:"Inventory",loadChildren:()=>import("./chunk-HVFYCXLX.js").then(e=>e.InventoryModule),canLoad:[r]},{path:"Reports",loadChildren:()=>import("./chunk-VOY3BJZP.js").then(e=>e.ReportsModule),canLoad:[r],canActivate:[R]},{path:"Sell",loadChildren:()=>import("./chunk-6O6OE4KQ.js").then(e=>e.routes),canLoad:[r]},{path:"Print",loadChildren:()=>import("./chunk-R3HIQ5AX.js").then(e=>e.PrintModule),canLoad:[r]},{path:"Buy",loadComponent:()=>import("./chunk-43G72GH2.js").then(e=>e.BuyV2Component),canMatch:[O]},{path:"Sell/V2",loadComponent:()=>import("./chunk-OAVGNXY4.js").then(e=>e.SellV2Component),canMatch:[O]},{path:"Dashboard",loadComponent:()=>import("./chunk-A2EDYIYP.js").then(e=>e.DashboardV2Component),canMatch:[O],data:{preload:!0}},{path:"Products",loadChildren:()=>import("./chunk-6F45DEGR.js").then(e=>e.ProductModule),canLoad:[r]},{path:"Shift",loadChildren:()=>import("./chunk-V6NXOOJA.js").then(e=>e.ShiftModule),canLoad:[r]},{path:"Debt",loadChildren:()=>import("./chunk-XWV7AI2C.js").then(e=>e.DebtModule),canLoad:[r]},{path:"Logistics",loadChildren:()=>import("./chunk-OTLU2WY3.js").then(e=>e.DeliveryModule),canLoad:[r]},{path:"Users",loadChildren:()=>import("./chunk-OURNAI65.js").then(e=>e.UsersModule),canLoad:[r]},{path:"Setup",loadChildren:()=>import("./chunk-6AHKVKAZ.js").then(e=>e.SetupModule),canLoad:[r]},{path:"Developer",loadChildren:()=>import("./chunk-7JBFR3T4.js").then(e=>e.DeveloperModule),canLoad:[r]},{path:"Contacts",loadChildren:()=>import("./chunk-OZ2R2K2V.js").then(e=>e.ContactsModule),canLoad:[r]},{path:"Outlets",loadChildren:()=>import("./chunk-QERITLZK.js").then(e=>e.OutletsModule),canLoad:[r]},{path:"Orders",loadChildren:()=>import("./chunk-N6EBK52R.js").then(e=>e.OrdersModule),canLoad:[r]},{path:"Profile",loadChildren:()=>import("./chunk-WQMYMJLR.js").then(e=>e.ProfileModule),canLoad:[r]},{path:"Estimate",loadComponent:()=>import("./chunk-RF5FWMSR.js").then(e=>e.EstimateV2Component),canMatch:[O]},{path:"Adjustment",loadChildren:()=>import("./chunk-NRTKHF45.js").then(e=>e.AdjustmentModule),canLoad:[r]},{path:"Payment",loadChildren:()=>import("./chunk-57WKDIDF.js").then(e=>e.PaymentModule),canLoad:[r],canActivate:[U]},{path:"Promotion",loadChildren:()=>import("./chunk-SVUFU2AS.js").then(e=>e.PromotionModule),canLoad:[r]},{path:"Manufacture",loadChildren:()=>import("./chunk-YC2LQSY3.js").then(e=>e.ManufactureModule),canLoad:[r]},{path:"Prepaid_Package",loadChildren:()=>import("./chunk-TOJPS7BJ.js").then(e=>e.PrepaidPackageModule),canLoad:[r]},{path:"Fulfillment",loadChildren:()=>import("./chunk-2EHLYOAD.js").then(e=>e.FulfillmentModule),canLoad:[r]},{path:"Unauthorized",loadChildren:()=>import("./chunk-T6GXIGYG.js").then(e=>e.UnauthorizedModule),canLoad:[r]},{path:"Not_Found",loadChildren:()=>import("./chunk-WFTIOB7Q.js").then(e=>e.NotFoundModule),canLoad:[r]},{path:"",redirectTo:"/menu/Dashboard",pathMatch:"full"},{path:"**",redirectTo:"Not_Found"}]}],L=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e});static \u0275inj=y({imports:[G.forChild(Ve),G]})};var Te=class e{constructor(){}static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e,bootstrap:[P]});static \u0275inj=y({imports:[Ce,L,ve,ae]})};export{Te as MenuMasterModule};
1
+ import{a as _e}from"./chunk-Q22HR52N.js";import{a as Pe}from"./chunk-PNFJVQUF.js";import{a as Oe}from"./chunk-55Z32OLJ.js";import{a as Se}from"./chunk-BAXZ74LK.js";import{b as Me,c as Ce}from"./chunk-V6D6TV7B.js";import{a as me}from"./chunk-UIVJ2JQT.js";import"./chunk-EQLHPWVB.js";import"./chunk-N7OS7SFI.js";import{F as ve,b as fe,h as he,o as ge}from"./chunk-7MRUPBXU.js";import{a as T,c as f}from"./chunk-ABOSNV75.js";import{a as be}from"./chunk-RT7OZJYZ.js";import"./chunk-5RYL4EJ2.js";import{b as I}from"./chunk-KBLVOO4J.js";import{a as M}from"./chunk-WUV22SZ4.js";import{a as ue}from"./chunk-H6RHVRGW.js";import{p as de}from"./chunk-TANYEHMZ.js";import{$ as Y,Ac as te,Bc as ie,E,Eb as j,Fb as F,Gb as V,Hb as h,Hc as ne,Ib as o,Jb as s,Jc as re,Kb as u,Od as se,Qd as le,Rd as b,Sa as W,Sd as ce,Td as pe,Ub as C,Ud as G,Wb as K,Xa as p,d as q,da as D,eb as v,gc as X,ib as Q,ic as $,id as oe,jb as x,jc as m,kc as B,la as d,lc as z,ma as y,oa as _,pa as c,vc as ee,wb as Z,xd as ae}from"./chunk-L3U6V3BF.js";import"./chunk-WFMAM73Y.js";import{a as J}from"./chunk-SNAKHGZS.js";var r=class e{constructor(n,t){this.authService=n;this.router=t}canLoad(n,t){return this.authService.isTokenExpired()?(this.authService.returnUrl=this.getUrlRedirect(t),this.router.navigate(["/"]),!1):!0}getUrlRedirect(n){let t="/menu";n.forEach(a=>t+=`/${a.path}`);let i=this.router.currentNavigation().extractedUrl.queryParams;return Object.keys(i).forEach((a,g)=>{g==0?t=`${t}?${a}=${i[a]}`:t=`${t}&${a}=${i[a]}`}),t}static \u0275fac=function(t){return new(t||e)(_(f),_(b))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var w=class e{constructor(n){this.toastrService=n;this.initPermissionToastr=!1}isPermissionGranted;initPermissionToastr;initPermission(){try{this.initPermissionToastr||Notification.requestPermission().then(t=>{this.isPermissionGranted=!1,t=="granted"&&(this.isPermissionGranted=!0),this.initPermissionToastr=!0})}catch(n){console.error(n)}}showAlert(n,t,i,l){let a=6e4;if(this.isPermissionGranted)try{let g=new Notification(t,{body:n,icon:l});g.onerror=(N=>{this.toastrService.info(this.setBody(n,i),t,{timeOut:a,enableHtml:this.hasUrl(i)})})}catch(g){console.error(g)}else this.toastrService.info(this.setBody(n,i),t,{timeOut:a,enableHtml:this.hasUrl(i)})}setBody(n,t){return this.hasUrl(t)&&(n=`<a href="${t}" target="_blank" class="ps-0">${n}</a>`),n}hasUrl(n){return!!(n&&n.length!==0)}static \u0275fac=function(t){return new(t||e)(_(de))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var ye=[{T:"Dashboard",U:"/menu/Dashboard",I:"fa-solid fa-chart-pie"},{T:"Products",U:"/menu/Products",I:"fa-solid fa-tag"},{T:"Estimate",U:"/menu/Estimate",I:"fa-solid fa-clipboard"},{T:"Sell",U:"/menu/Sell",I:"fa-solid fa-cart-shopping"},{T:"Shift",U:"/menu/Shift/",I:"fa-solid fa-user-clock"},{T:"Reports",U:"/menu/Reports",I:"fa-solid fa-chart-area"},{T:"Contacts",U:"/menu/Contacts",I:"fas fa-address-book"},{T:"Orders",U:"/menu/Orders",I:"fas fa-file-invoice"},{T:"Payment",U:"/menu/Payment",I:"fas fa-money-bill-alt"},{T:"Debt",U:"/menu/Debt",I:"fas fa-dollar-sign"},{T:"Inventory",U:"/menu/Inventory",I:"fas fa-archive"},{T:"Adjustment",U:"/menu/Adjustment",I:"fas fa-scanner-gun"},{T:"Buy",U:"/menu/Buy",I:"fa-solid fa-cart-arrow-down"},{T:"Logistics",U:"/menu/Logistics",I:"fas fa-truck"},{T:"Fulfillment",U:"/menu/Fulfillment",I:"fas fa-dolly"},{T:"Manufacture",U:"/menu/Manufacture",I:"fas fa-industry"},{T:"Prepaid Package",U:"/menu/Prepaid_Package",I:"fa-solid fa-id-card"},{T:"Promotion",U:"/menu/Promotion",I:"fas fa-bullhorn"},{T:"Users",U:"/menu/Users",I:"fas fa-user"},{T:"Outlets",U:"/menu/Outlets",I:"fas fa-map-marker-alt"},{T:"Setup",U:"/menu/Setup",I:"fas fa-gear"},{T:"Developer",U:"/menu/Developer",I:"fas fa-code"}];var k=class e{role=c(I);authService=c(f);menu=ye;filteredMenu=[];initFilteredMenu(){let n=this.menu.map(i=>J({},i)),t=n.findIndex(i=>i.T==="Reports");if(t!==-1){let i=!!this.role.report?.View,l=!!this.role.report?.Advanced,a=!!this.role.report?.Periodic;i?n[t].U="/menu/Reports":l?n[t].U="/menu/Reports/Sales_Report/Standard/Top_Customers":a?n[t].U="/menu/Reports/Sales_Report/Standard/Daily":n[t].U="/menu/Reports"}this.filteredMenu=n.filter(i=>i.T==="Dashboard"?this.role.dashboard.View:i.T==="Products"?this.role.product.View:i.T==="Estimate"?this.role.estimate.Create:i.T==="Sell"?this.role.sell.Create:i.T==="Shift"?this.role.sell.Create:i.T==="Reports"?!!this.role.report?.View||!!this.role.report?.Advanced||!!this.role.report?.Periodic:i.T==="Contacts"?this.role.contact.View:i.T==="Orders"?this.role.order.View:i.T==="Payment"?this.role.payment.View:i.T==="Debt"?this.role.debt.View:i.T==="Inventory"?this.role.inventory.View:i.T==="Adjustment"?this.role.adjustment.View:i.T==="Buy"?this.role.buy.Create:i.T==="Logistics"?this.role.logistic.View:i.T==="Manufacture"?this.role.manufacture.View:i.T==="Fulfillment"?this.role.fulfillment.View:i.T==="Prepaid Package"?this.role.prepaidPackage.View:i.T==="Promotion"?this.role.promotion.View:i.T==="Users"?this.role.users.View:i.T==="Outlets"?this.role.outlets.View:i.T==="Setup"?this.role.setup.View:i.T==="Developer"?this.role.developer.View:!0),this.filterBySubscriptionStatus()}filterBySubscriptionStatus(){let n=this.authService.getSubscriptionStatus();this.filteredMenu=this.filteredMenu.filter(t=>{switch(n){case 2:return t.T=="Sell"||t.T=="Shift";case 3:return!1;default:return!0}})}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var xe=[{T:"My Profile",U:"Profile/Main/My_Profile",I:"fas fa-user"},{T:"My Subscription",U:"Profile/Main/My_Subscription",I:"fa-solid fa-credit-card"},{T:"Notification",U:"Profile/Notification/Push",I:"fas fa-bell"},{T:"My Sales",U:"Profile/Main/My_Sales",I:"fas fa-history"}];var A=class e{role=c(I);authService=c(f);filteredMenu=[];initFilteredMenu(){let n=this.authService.getSubscriptionStatus();this.filteredMenu=xe.filter(t=>t.T=="My Profile"?this.role.profile.View:t.T=="My Subscription"?this.role.profile.Subscription:t.T=="Notification"?this.role.profile.Notification&&n!=2&&n!=3:t.T=="My Sales"?n!=2&&n!=3:!0)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Le=(e,n)=>({"full-container":e,"subscription-bar-visible":n}),Ne=e=>[e];function Ee(e,n){if(e&1&&(o(0,"a",11),u(1,"i",35),o(2,"span"),m(3),s()()),e&2){let t=n.$implicit;h("routerLink",t==null?null:t.U),p(),$((t==null?null:t.I)+" me-2"),p(2),B(t==null?null:t.T)}}function De(e,n){if(e&1&&(o(0,"li",33,0)(2,"a",36),u(3,"i"),o(4,"p"),m(5),s()()()),e&2){let t=n.$implicit,i=K();h("routerLinkActiveOptions",i.isActiveMatchOptions),Z("data-cy",t==null?null:t.T),p(2),h("matTooltip",i.toggleSideMenu?t==null?null:t.T:"")("routerLink",te(7,Ne,t==null?null:t.U)),p(),$(t==null?null:t.I),p(2),B(t==null?null:t.T)}}var P=class e{constructor(n,t,i,l,a,g,N,H){this.toggleSidebar=n;this.signalRClientService=t;this.notificationAlertService=i;this.router=l;this.authService=a;this.intercomService=g;N.initFilteredMenu(),H.initFilteredMenu(),this.leftSidebarMenu=N.filteredMenu,this.topMenu=H.filteredMenu,this.accountInfo=JSON.parse(localStorage.getItem("AccountInfo")),this.toggleSidebar.toggleState$.subscribe(Ie=>this.isNavOpen=Ie),this.destroy$=new q,this.initNotificationPermission()}isActiveMatchOptions={matrixParams:"subset",queryParams:"subset",paths:"subset",fragment:"exact"};toggleSideMenu=!1;isNavOpen;destroy$;activeMenu;appVersion=ue.version;currentSubStatus;subsStatusEnum=T;isFullContainer=!1;isHideIntercomLauncher;leftSidebarMenu;topMenu;accountInfo;ngOnInit(){this.subscribeToPushNotification(),this.getCurrentSubscriptionStatus(),this.initFullContainer()}initFullContainer(){this.router.events.pipe(E(n=>n instanceof se),Y(null),D(this.destroy$)).subscribe(n=>{this.isFullContainer=!1,(this.router.url.includes("Sell")&&!this.router.url.includes("v2")&&!this.router.url.includes("Offline")||this.router.url.includes("Buy")||this.router.url.includes("menu/Estimate")||this.router.url.includes("Transfer_Order/Form")||this.router.url.includes("Adjustment/Archive/Form")||this.router.url.includes("Job_Order/Archive/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Invoice/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Bill/New_Join_Bill"))&&(this.isFullContainer=!0)})}initNotificationPermission(){this.notificationAlertService.initPermission()}getCurrentSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus()}subscribeToPushNotification(){let n=localStorage.getItem("NotificationOutletID");M.IsNotEmpty(n)&&M.isGuid(n)?this.signalRClientService.SubscribeGroup(n):this.signalRClientService.startConnection(),this.signalRClientService.OnReceivePushNotification.pipe(D(this.destroy$),E(t=>M.IsNotEmpty(t))).subscribe(t=>{if(M.IsNotEmpty(t)){let i=JSON.parse(t),l="https://cdn.dealpos.xyz/web-image/info-new.png";M.IsNotEmpty(i.Icon)&&(l=i.Icon),this.notificationAlertService.showAlert(i.Body,i.Header,i.URL,l)}})}ngAfterViewInit(){this.intercomService.inititalizeIntercom()}toggleMenu(){this.toggleSideMenu=!this.toggleSideMenu}logout(){this.authService.logout()}isNotEmpty(n){return M.IsNotEmpty(n)}onShowDropdown(){this.isHideIntercomLauncher=this.intercomService.isHideLauncher()}chatToggleChange(){this.isHideIntercomLauncher==!1?this.intercomService.hideLauncher():this.intercomService.showLauncher(),this.onShowDropdown()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(t){return new(t||e)(v(Se),v(me),v(w),v(b),v(f),v(be),v(k),v(A))};static \u0275cmp=Q({type:e,selectors:[["POS-menu-master"]],standalone:!1,decls:54,vars:17,consts:[["rla","routerLinkActive"],[1,"wrapper"],["data-color","blue",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-lg-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fa-solid",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-cy","companyName","data-bs-toggle","dropdown","aria-expanded","false","matTooltipPosition","above",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center",2,"cursor","pointer",3,"click","matTooltip"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],[1,"dropdown-item","h5",3,"routerLink"],[1,"dropdown-item","h5",2,"cursor","pointer"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fa-solid","fa-comment-dots","me-2"],[1,"checkbox_toggle","ms-3",3,"click"],["type","checkbox","id","chatToggle","name","ChatToggle",3,"ngModelChange","ngModel"],["for","chatToggle",1,"position-relative","rounded-pill","pointer"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-sign-out-alt","me-2"],[1,"divider"],[1,"dropdown-header","border-top"],["target","_blank",1,"dropdown-item","h5","changelog",3,"href"],["aria-hidden","true",1,"fa-solid","fa-sparkles","me-2"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],["target","_blank","href","http://support.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-book","me-2"],["target","_blank","href","https://www.dealpos.app/",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-table-cells-large","me-2"],["target","_blank","href","http://blog.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-brands","fa-blogger","me-2"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",3,"routerLinkActiveOptions"],["id","full-container",1,"main-panel",3,"ngClass"],["aria-hidden","true"],["matTooltipPosition","above",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"]],template:function(t,i){t&1&&(o(0,"div",1)(1,"div",2)(2,"button",3),C("click",function(){return i.toggleMenu()}),u(3,"i",4),s(),o(4,"div",5)(5,"div",6)(6,"a",7),C("click",function(){return i.onShowDropdown()}),m(7),ne(8,"limitText"),s(),o(9,"div",8)(10,"div",9),m(11),s(),u(12,"div",10),F(13,Ee,4,4,"a",11,j),o(15,"a",12)(16,"div",13)(17,"div"),u(18,"i",14),o(19,"span"),m(20,"Chat Support"),s()(),o(21,"div",15),C("click",function(a){return a.stopPropagation()}),o(22,"input",16),C("ngModelChange",function(){return i.chatToggleChange()}),s(),u(23,"label",17),s()()(),o(24,"a",18),C("click",function(){return i.logout()}),u(25,"i",19),o(26,"span"),m(27,"Log Out"),s()(),u(28,"div",20),o(29,"div",21),m(30," Links "),s(),o(31,"a",22),u(32,"i",23),o(33,"span"),m(34,"What's New"),u(35,"i",24),s()(),o(36,"a",25),u(37,"i",26),o(38,"span"),m(39,"Help Center"),s()(),o(40,"a",27),u(41,"i",28),o(42,"span"),m(43,"App Store"),s()(),o(44,"a",29),u(45,"i",30),o(46,"span"),m(47,"Company Blog"),s()()()()(),o(48,"div",31)(49,"ul",32),F(50,De,6,9,"li",33,j),s()()(),o(52,"div",34),u(53,"router-outlet"),s()()),t&2&&(X("nav-open",i.isNavOpen),p(),h("ngClass",i.toggleSideMenu?"collapses":""),p(2),h("ngClass",i.toggleSideMenu?"fa-angle-left cursor":"fa-angle-right cursor"),p(3),h("matTooltip",i.accountInfo==null?null:i.accountInfo.BrandName),p(),z(" ",re(8,11,i.accountInfo==null?null:i.accountInfo.BrandName,12)," "),p(4),z("",i.accountInfo==null?null:i.accountInfo.UserName," "),p(2),V(i.topMenu),p(9),h("ngModel",!i.isHideIntercomLauncher),p(9),h("href",ee("https://changelog.dealpos.com/?categories=cat_gAZdRhBYU7QVl&view=complete&v=",i.appVersion),W),p(19),V(i.leftSidebarMenu),p(2),h("ngClass",ie(14,Le,i.isFullContainer,i.isNotEmpty(i.currentSubStatus)&&i.currentSubStatus!==i.subsStatusEnum.PAID)))},dependencies:[Me,le,ce,pe,fe,he,ge,oe,Pe],styles:['.sidebar[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%], body[_ngcontent-%COMP%] > .navbar-collapse[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important}.sidebar-wrapper[_ngcontent-%COMP%]{max-height:calc(100% - 61px)!important;min-height:calc(100% - 61px)!important}@media (max-width: 991px){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (pointer: coarse){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}}.full-container[_ngcontent-%COMP%]{padding-top:0!important}.changelog[_ngcontent-%COMP%]{color:#0006b1!important}.changelog[_ngcontent-%COMP%]:visited{color:#2e2e2e!important}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:relative}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited:hover span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#e9ecef!important;position:absolute;top:-4px;right:-18px}.subscription-bar-visible[_ngcontent-%COMP%]{padding-top:98px}.checkbox_toggle[_ngcontent-%COMP%]{position:relative}.checkbox_toggle[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#868686;display:inline-block;padding-right:38px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{width:23px;height:14px;background-color:#ccc;top:2.2px;right:0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background-color:#1f77d0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:after{left:10px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:after{content:"";width:12px;height:12px;border-radius:50%;position:absolute;top:.8px;left:1px;transition:all .1s;background-color:#fff}']})};function je(e){let n=c(b),t="/menu";e.forEach(a=>t+=`/${a.path}`);let i=n.currentNavigation().extractedUrl.queryParams;return Object.keys(i).forEach((a,g)=>{g==0?t=`${t}?${a}=${i[a]}`:t=`${t}&${a}=${i[a]}`}),t}var O=(e,n)=>{let t=c(f),i=t.isTokenExpired(),l=c(b);return i?(t.returnUrl=je(n),l.navigate(["/"]),!1):e.path=="Dashboard"?Fe():!0};function Fe(){let e=c(b),n=c(f),t=!1,i=n.getRedirectUrl();return t=i.includes("Dashboard"),t==!1&&e.navigate([i]),t}var U=class e{paymentStorageService=c(_e);canActivate(n,t){return this.paymentStorageService.clear(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var R=class e{reportService=c(Oe);canActivate(n,t){return this.reportService.resetFilter(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ve=[{path:"",component:P,children:[{path:"Inventory",loadChildren:()=>import("./chunk-KKM7I2BT.js").then(e=>e.InventoryModule),canLoad:[r]},{path:"Reports",loadChildren:()=>import("./chunk-UI6U53UY.js").then(e=>e.ReportsModule),canLoad:[r],canActivate:[R]},{path:"Sell",loadChildren:()=>import("./chunk-TKHSLAZH.js").then(e=>e.routes),canLoad:[r]},{path:"Print",loadChildren:()=>import("./chunk-R3HIQ5AX.js").then(e=>e.PrintModule),canLoad:[r]},{path:"Buy",loadComponent:()=>import("./chunk-4OP4E5Q4.js").then(e=>e.BuyV2Component),canMatch:[O]},{path:"Sell/V2",loadComponent:()=>import("./chunk-TYVVSM36.js").then(e=>e.SellV2Component),canMatch:[O]},{path:"Dashboard",loadComponent:()=>import("./chunk-YLXBICIW.js").then(e=>e.DashboardV2Component),canMatch:[O],data:{preload:!0}},{path:"Products",loadChildren:()=>import("./chunk-R6DRKF4V.js").then(e=>e.ProductModule),canLoad:[r]},{path:"Shift",loadChildren:()=>import("./chunk-4PDGY62B.js").then(e=>e.ShiftModule),canLoad:[r]},{path:"Debt",loadChildren:()=>import("./chunk-7OQXKVTC.js").then(e=>e.DebtModule),canLoad:[r]},{path:"Logistics",loadChildren:()=>import("./chunk-ISZRZRCT.js").then(e=>e.DeliveryModule),canLoad:[r]},{path:"Users",loadChildren:()=>import("./chunk-243EB36Y.js").then(e=>e.UsersModule),canLoad:[r]},{path:"Setup",loadChildren:()=>import("./chunk-O7SYLGUB.js").then(e=>e.SetupModule),canLoad:[r]},{path:"Developer",loadChildren:()=>import("./chunk-XGXXFTMA.js").then(e=>e.DeveloperModule),canLoad:[r]},{path:"Contacts",loadChildren:()=>import("./chunk-OF3BZHBQ.js").then(e=>e.ContactsModule),canLoad:[r]},{path:"Outlets",loadChildren:()=>import("./chunk-EFDMYOLZ.js").then(e=>e.OutletsModule),canLoad:[r]},{path:"Orders",loadChildren:()=>import("./chunk-IF6EZMOM.js").then(e=>e.OrdersModule),canLoad:[r]},{path:"Profile",loadChildren:()=>import("./chunk-FVFTYYCC.js").then(e=>e.ProfileModule),canLoad:[r]},{path:"Estimate",loadComponent:()=>import("./chunk-T43ISYOP.js").then(e=>e.EstimateV2Component),canMatch:[O]},{path:"Adjustment",loadChildren:()=>import("./chunk-EMHEIQNS.js").then(e=>e.AdjustmentModule),canLoad:[r]},{path:"Payment",loadChildren:()=>import("./chunk-QHGZQ2IG.js").then(e=>e.PaymentModule),canLoad:[r],canActivate:[U]},{path:"Promotion",loadChildren:()=>import("./chunk-5XTMPVSF.js").then(e=>e.PromotionModule),canLoad:[r]},{path:"Manufacture",loadChildren:()=>import("./chunk-ZRJU5XBX.js").then(e=>e.ManufactureModule),canLoad:[r]},{path:"Prepaid_Package",loadChildren:()=>import("./chunk-MEL6Z4NI.js").then(e=>e.PrepaidPackageModule),canLoad:[r]},{path:"Fulfillment",loadChildren:()=>import("./chunk-BWVEZ3MZ.js").then(e=>e.FulfillmentModule),canLoad:[r]},{path:"Unauthorized",loadChildren:()=>import("./chunk-WDUPZI6X.js").then(e=>e.UnauthorizedModule),canLoad:[r]},{path:"Not_Found",loadChildren:()=>import("./chunk-XDFUPYND.js").then(e=>e.NotFoundModule),canLoad:[r]},{path:"",redirectTo:"/menu/Dashboard",pathMatch:"full"},{path:"**",redirectTo:"Not_Found"}]}],L=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e});static \u0275inj=y({imports:[G.forChild(Ve),G]})};var Te=class e{constructor(){}static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e,bootstrap:[P]});static \u0275inj=y({imports:[Ce,L,ve,ae]})};export{Te as MenuMasterModule};
@@ -1,4 +1,4 @@
1
- import{a as ft,b as _t,c as gt,d as yt,e as vt}from"./chunk-OB6KFXD6.js";import{a as xt}from"./chunk-QJ3CWKQT.js";import{a as ht}from"./chunk-GXAF3JUO.js";import{a as mt}from"./chunk-LB5UXGDG.js";import{a as bt}from"./chunk-YDL2MTWE.js";import{b as ut}from"./chunk-3PKJLXTC.js";import{a as dt,d as _e}from"./chunk-E634BI4W.js";import{a as pt,d as ct}from"./chunk-4HLKKTIV.js";import{b as ue,c as ne,d as me,g as at,h as rt,k as U,l as j}from"./chunk-RIZ4YVMH.js";import{A as Je,F as Xe,H,P as et,Q as tt,S as Ee,T as it,V as de,W,X as nt,_ as Ve,a as te,fa as ot,g as We,h as Ue,i as je,ka as lt,m as k,oa as st,p as Ce,pa as ie,qa as he,t as ce,u as Ze,w as L,x as z,xa as fe,z as Ye}from"./chunk-Z76C52NM.js";import{a as $e}from"./chunk-7MRUPBXU.js";import{$b as d,Ab as ye,Ac as S,Bc as Te,Ca as K,Cb as be,Hb as s,Ia as R,Ib as f,Jb as m,Kb as D,Nb as He,Nc as A,Ob as I,Pb as O,Qb as w,Qc as $,Rb as E,Rc as pe,Ub as x,Vc as ee,Wb as a,Xa as p,Ya as C,Za as ae,Zb as v,_b as M,ac as u,bd as h,cd as V,eb as G,ec as q,fc as Pe,gb as De,hc as ve,ib as Y,ic as _,jb as re,jc as Q,ka as Be,kb as Ae,kc as J,kd as Ge,la as le,lc as xe,ld as Ie,ma as se,mb as N,na as Z,nb as ze,ob as c,oc as Re,od as Oe,pa as F,pc as Ne,pd as we,qc as Qe,ta as y,ua as b,va as B,wb as T,xd as Se,yc as X,yd as qe,zc as Ke}from"./chunk-L3U6V3BF.js";import{a as P,b as Me}from"./chunk-SNAKHGZS.js";var Tt=`
1
+ import{a as ft,b as _t,c as gt,d as yt,e as vt}from"./chunk-OB6KFXD6.js";import{a as xt}from"./chunk-QJ3CWKQT.js";import{a as ht}from"./chunk-GXAF3JUO.js";import{a as mt}from"./chunk-LB5UXGDG.js";import{a as bt}from"./chunk-YDL2MTWE.js";import{b as ut}from"./chunk-RWW55Z7V.js";import{a as dt,d as _e}from"./chunk-E634BI4W.js";import{a as pt,d as ct}from"./chunk-4HLKKTIV.js";import{b as ue,c as ne,d as me,g as at,h as rt,k as U,l as j}from"./chunk-RIZ4YVMH.js";import{A as Je,F as Xe,H,P as et,Q as tt,S as Ee,T as it,V as de,W,X as nt,_ as Ve,a as te,fa as ot,g as We,h as Ue,i as je,ka as lt,m as k,oa as st,p as Ce,pa as ie,qa as he,t as ce,u as Ze,w as L,x as z,xa as fe,z as Ye}from"./chunk-Z76C52NM.js";import{a as $e}from"./chunk-7MRUPBXU.js";import{$b as d,Ab as ye,Ac as S,Bc as Te,Ca as K,Cb as be,Hb as s,Ia as R,Ib as f,Jb as m,Kb as D,Nb as He,Nc as A,Ob as I,Pb as O,Qb as w,Qc as $,Rb as E,Rc as pe,Ub as x,Vc as ee,Wb as a,Xa as p,Ya as C,Za as ae,Zb as v,_b as M,ac as u,bd as h,cd as V,eb as G,ec as q,fc as Pe,gb as De,hc as ve,ib as Y,ic as _,jb as re,jc as Q,ka as Be,kb as Ae,kc as J,kd as Ge,la as le,lc as xe,ld as Ie,ma as se,mb as N,na as Z,nb as ze,ob as c,oc as Re,od as Oe,pa as F,pc as Ne,pd as we,qc as Qe,ta as y,ua as b,va as B,wb as T,xd as Se,yc as X,yd as qe,zc as Ke}from"./chunk-L3U6V3BF.js";import{a as P,b as Me}from"./chunk-SNAKHGZS.js";var Tt=`
2
2
  .p-tooltip {
3
3
  position: absolute;
4
4
  display: none;
@@ -1,4 +1,4 @@
1
- import{a as ne,c as Ft,d as It}from"./chunk-3PKJLXTC.js";import{d as ie}from"./chunk-E634BI4W.js";import{a as bt}from"./chunk-BAXZ74LK.js";import{F as Pt,G as Et,u as Vt,v as Tt,w as kt}from"./chunk-3ZH3XK5V.js";import{b as vt,c as yt}from"./chunk-V6D6TV7B.js";import{N as Dt,n as Mt}from"./chunk-QWLNF7VL.js";import{a as ot,e as xt,f as wt,g as St}from"./chunk-N5RDRDT7.js";import{s as Ct}from"./chunk-N7OS7SFI.js";import{c as gt,d as _t,h as ht,k as j}from"./chunk-RIZ4YVMH.js";import{G as Ce,M as ct,N as dt,b as at,k as rt,la as pt,oa as ut,p as lt,pa as te,ua as mt,w as st,xa as ft}from"./chunk-Z76C52NM.js";import{F as tt,c as $e,h as Ye,i as Ge,k as Xe,o as Je,p as et}from"./chunk-7MRUPBXU.js";import{a as qe,c as it}from"./chunk-T5IJP474.js";import{a as nt}from"./chunk-DJUOMCAV.js";import{a as N}from"./chunk-WUV22SZ4.js";import{c as We,d as he,f as J,g as ee,i as be,p as Ze}from"./chunk-TANYEHMZ.js";import{$b as F,Ab as m,Ac as x,Bc as me,Cb as f,Eb as S,Fb as V,Gb as T,Hb as u,Hc as Z,Ia as de,Ib as a,Ic as fe,Jb as l,Jc as Oe,Kb as _,N as Ve,Qb as Be,Rb as b,Rc as ge,Sd as Qe,Td as ze,Ub as g,Ud as Ue,Vc as _e,Wa as Me,Wb as c,Wc as $,Xa as s,Xb as z,Ya as y,Yb as k,Za as De,Zb as E,aa as Te,ac as I,ad as Le,bd as Y,cc as U,cd as Re,d as we,dc as Ke,eb as v,gc as pe,ib as B,ic as ue,id as Ne,jb as Q,jc as h,kc as A,la as H,lb as Pe,lc as O,ld as je,ma as W,mb as Ee,na as ke,nb as Fe,ob as K,oc as M,od as He,pa as w,pc as D,pd as G,qc as P,t as Se,ta as d,ua as p,uc as L,wb as Ie,xd as R,yc as Ae,yd as X,zc as q}from"./chunk-L3U6V3BF.js";import{a as ce,b as xe}from"./chunk-SNAKHGZS.js";var oe=class t{_openDialog=new we;openDialog$=this._openDialog.asObservable();openDialog(){this._openDialog.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ht=["content"],Wt=["*"],Qt=(t,o)=>({showTransitionParams:t,hideTransitionParams:o}),zt=(t,o)=>({value:t,params:o}),Ut=t=>({closeCallback:t});function qt(t,o){}function Zt(t,o){t&1&&K(0,qt,0,0,"ng-template")}function $t(t,o){if(t&1){let e=b();a(0,"div",1),g("click",function(i){d(e);let r=c();return p(r.onOverlayClick(i))})("@animation.start",function(i){d(e);let r=c();return p(r.onAnimationStart(i))})("@animation.done",function(i){d(e);let r=c();return p(r.onAnimationEnd(i))}),a(1,"div",2),g("click",function(i){d(e);let r=c();return p(r.onContentClick(i))})("mousedown",function(i){d(e);let r=c();return p(r.onContentClick(i))}),k(2),K(3,Zt,1,0,null,3),l()()}if(t&2){let e=c();ue(e.cn(e.cx("root"),e.styleClass)),u("pBind",e.ptm("root"))("ngStyle",e.style)("@animation",me(16,zt,e.overlayVisible?"open":"close",me(13,Qt,e.showTransitionOptions,e.hideTransitionOptions))),Ie("aria-modal",e.overlayVisible)("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy),s(),ue(e.cx("content")),u("pBind",e.ptm("content")),s(2),u("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",x(19,Ut,e.onCloseClick.bind(e)))}}var Yt=`
1
+ import{a as ne,c as Ft,d as It}from"./chunk-RWW55Z7V.js";import{d as ie}from"./chunk-E634BI4W.js";import{a as bt}from"./chunk-BAXZ74LK.js";import{F as Pt,G as Et,u as Vt,v as Tt,w as kt}from"./chunk-3ZH3XK5V.js";import{b as vt,c as yt}from"./chunk-V6D6TV7B.js";import{N as Dt,n as Mt}from"./chunk-QWLNF7VL.js";import{a as ot,e as xt,f as wt,g as St}from"./chunk-N5RDRDT7.js";import{s as Ct}from"./chunk-N7OS7SFI.js";import{c as gt,d as _t,h as ht,k as j}from"./chunk-RIZ4YVMH.js";import{G as Ce,M as ct,N as dt,b as at,k as rt,la as pt,oa as ut,p as lt,pa as te,ua as mt,w as st,xa as ft}from"./chunk-Z76C52NM.js";import{F as tt,c as $e,h as Ye,i as Ge,k as Xe,o as Je,p as et}from"./chunk-7MRUPBXU.js";import{a as qe,c as it}from"./chunk-ABOSNV75.js";import{a as nt}from"./chunk-RT7OZJYZ.js";import{a as N}from"./chunk-WUV22SZ4.js";import{c as We,d as he,f as J,g as ee,i as be,p as Ze}from"./chunk-TANYEHMZ.js";import{$b as F,Ab as m,Ac as x,Bc as me,Cb as f,Eb as S,Fb as V,Gb as T,Hb as u,Hc as Z,Ia as de,Ib as a,Ic as fe,Jb as l,Jc as Oe,Kb as _,N as Ve,Qb as Be,Rb as b,Rc as ge,Sd as Qe,Td as ze,Ub as g,Ud as Ue,Vc as _e,Wa as Me,Wb as c,Wc as $,Xa as s,Xb as z,Ya as y,Yb as k,Za as De,Zb as E,aa as Te,ac as I,ad as Le,bd as Y,cc as U,cd as Re,d as we,dc as Ke,eb as v,gc as pe,ib as B,ic as ue,id as Ne,jb as Q,jc as h,kc as A,la as H,lb as Pe,lc as O,ld as je,ma as W,mb as Ee,na as ke,nb as Fe,ob as K,oc as M,od as He,pa as w,pc as D,pd as G,qc as P,t as Se,ta as d,ua as p,uc as L,wb as Ie,xd as R,yc as Ae,yd as X,zc as q}from"./chunk-L3U6V3BF.js";import{a as ce,b as xe}from"./chunk-SNAKHGZS.js";var oe=class t{_openDialog=new we;openDialog$=this._openDialog.asObservable();openDialog(){this._openDialog.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ht=["content"],Wt=["*"],Qt=(t,o)=>({showTransitionParams:t,hideTransitionParams:o}),zt=(t,o)=>({value:t,params:o}),Ut=t=>({closeCallback:t});function qt(t,o){}function Zt(t,o){t&1&&K(0,qt,0,0,"ng-template")}function $t(t,o){if(t&1){let e=b();a(0,"div",1),g("click",function(i){d(e);let r=c();return p(r.onOverlayClick(i))})("@animation.start",function(i){d(e);let r=c();return p(r.onAnimationStart(i))})("@animation.done",function(i){d(e);let r=c();return p(r.onAnimationEnd(i))}),a(1,"div",2),g("click",function(i){d(e);let r=c();return p(r.onContentClick(i))})("mousedown",function(i){d(e);let r=c();return p(r.onContentClick(i))}),k(2),K(3,Zt,1,0,null,3),l()()}if(t&2){let e=c();ue(e.cn(e.cx("root"),e.styleClass)),u("pBind",e.ptm("root"))("ngStyle",e.style)("@animation",me(16,zt,e.overlayVisible?"open":"close",me(13,Qt,e.showTransitionOptions,e.hideTransitionOptions))),Ie("aria-modal",e.overlayVisible)("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy),s(),ue(e.cx("content")),u("pBind",e.ptm("content")),s(2),u("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",x(19,Ut,e.onCloseClick.bind(e)))}}var Yt=`
2
2
  .p-popover {
3
3
  margin-top: dt('popover.gutter');
4
4
  background: dt('popover.background');
@@ -1 +1 @@
1
- import{a as ue}from"./chunk-4467AQLM.js";import{d as me,e as pe}from"./chunk-AHTR7XKG.js";import"./chunk-NS6IC2PT.js";import"./chunk-3RK6DDJD.js";import"./chunk-SMEVWRVE.js";import"./chunk-JQDS4BXR.js";import"./chunk-F3HDP5CA.js";import"./chunk-AJAUI7BA.js";import"./chunk-MWGICBEB.js";import"./chunk-WSWTWRKJ.js";import{a as $}from"./chunk-BVOUQJCA.js";import{c as re}from"./chunk-6UY42XOC.js";import{b as ne}from"./chunk-YQ5PAXUW.js";import"./chunk-HQGZC4Y3.js";import"./chunk-VQKO557Q.js";import"./chunk-TRK4LJDS.js";import"./chunk-B4TZQBTN.js";import{e as oe,f as le}from"./chunk-2GIDUMXS.js";import"./chunk-ZO3XZXWW.js";import"./chunk-OB6KFXD6.js";import"./chunk-QJ3CWKQT.js";import"./chunk-SWF6XISV.js";import"./chunk-GXAF3JUO.js";import"./chunk-LB5UXGDG.js";import"./chunk-YDL2MTWE.js";import"./chunk-7YYWBCWJ.js";import"./chunk-CCIHCGP5.js";import"./chunk-FM7BHGBW.js";import"./chunk-TP6ZUC53.js";import"./chunk-3PKJLXTC.js";import{b as ie}from"./chunk-ECW7GAZQ.js";import"./chunk-E634BI4W.js";import"./chunk-BAXZ74LK.js";import"./chunk-3ZH3XK5V.js";import"./chunk-V6D6TV7B.js";import{N as ae}from"./chunk-QWLNF7VL.js";import"./chunk-UIVJ2JQT.js";import"./chunk-EQLHPWVB.js";import{d as te}from"./chunk-SCGKVOSE.js";import{g as ee}from"./chunk-N5RDRDT7.js";import"./chunk-N7OS7SFI.js";import"./chunk-4HLKKTIV.js";import"./chunk-RIZ4YVMH.js";import"./chunk-2FWFPV5I.js";import"./chunk-Z76C52NM.js";import{F as X,h as K,o as z}from"./chunk-7MRUPBXU.js";import"./chunk-T5IJP474.js";import"./chunk-DJUOMCAV.js";import"./chunk-5RYL4EJ2.js";import{b as Z}from"./chunk-KBLVOO4J.js";import"./chunk-WUV22SZ4.js";import"./chunk-NQQB5U5S.js";import{s as Y}from"./chunk-TANYEHMZ.js";import{Ab as _,Ac as W,Cb as f,Db as O,Dc as E,Fb as P,Gb as L,Hb as x,Hc as C,Ib as a,Ic as b,Jb as n,Jc as H,Kb as N,Nc as V,Qb as y,Rb as T,Sd as G,Ub as h,Ud as J,Wb as p,Xa as o,eb as I,ec as w,ib as R,jc as m,kc as k,lc as d,mb as B,ob as g,oc as D,pa as F,pc as M,pd as q,qc as S,sd as Q,ta as c,ua as s,ud as j,xd as U,zc as A}from"./chunk-L3U6V3BF.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var ce=(t,l,e,i)=>({title:"Materials",items:t,summary:l,manufacture:e,quantity:i}),se=(t,l,e,i)=>({title:"Expenses",items:t,summary:l,manufacture:e,quantity:i}),_e=(t,l,e,i)=>({title:"Outputs",items:t,summary:l,manufacture:e,quantity:i}),fe=()=>["/menu/Manufacture/Job_Order/Archive/Info"],xe=t=>({ID:t});function Ce(t,l){if(t&1){let e=T();a(0,"button",16),h("click",function(){c(e);let r=p(2);return s(r.openExportModal())}),N(1,"i",17),m(2," Export "),n()}}function ge(t,l){if(t&1&&(a(0,"div",3),_(1,Ce,3,0,"button",15),n()),t&2){let e=p();o(),f(e.role.global!=null&&e.role.global.Export?1:-1)}}function De(t,l){if(t&1){let e=T();a(0,"div",18)(1,"h6"),m(2,"Outlet"),n(),a(3,"outlet-selector",19),S("ngModelChange",function(r){c(e);let u=p();return M(u.pageData.Filter.OutletId,r)||(u.pageData.Filter.OutletId=r),s(r)}),n(),a(4,"h6"),m(5,"From - To"),n(),a(6,"datepicker",20),S("dateChange",function(r){c(e);let u=p();return M(u.pageData.Filter.From,r)||(u.pageData.Filter.From=r),s(r)}),n(),a(7,"div",21)(8,"datepicker",22),S("dateChange",function(r){c(e);let u=p();return M(u.pageData.Filter.To,r)||(u.pageData.Filter.To=r),s(r)}),n()(),a(9,"h6"),m(10,"State"),n(),a(11,"ng-select",23),S("ngModelChange",function(r){c(e);let u=p();return M(u.pageData.Filter.State,r)||(u.pageData.Filter.State=r),s(r)}),n()()}if(t&2){let e=p();o(3),x("accessType",2),D("ngModel",e.pageData.Filter.OutletId),x("outlets",e.pageData.Options==null?null:e.pageData.Options.Entities),o(3),D("date",e.pageData.Filter.From),o(2),D("date",e.pageData.Filter.To),o(3),x("items",e.pageData.Options.States),D("ngModel",e.pageData.Filter.State)}}function Me(t,l){t&1&&(a(0,"th",24),m(1,"@ Cost"),n(),a(2,"th",25),m(3,"Total"),n())}function Se(t,l){t&1&&y(0)}function be(t,l){if(t&1&&(a(0,"div"),g(1,Se,1,0,"ng-container",26),n()),t&2){let e=p().$implicit;p();let i=w(28);o(),x("ngTemplateOutlet",i)("ngTemplateOutletContext",E(2,ce,e.MaterialItems,e.MaterialsSummary,e,e==null?null:e.MaterialsTotalQuantity))}}function ye(t,l){t&1&&y(0)}function Te(t,l){if(t&1&&(a(0,"div"),g(1,ye,1,0,"ng-container",26),n()),t&2){let e=p().$implicit;p();let i=w(28);o(),x("ngTemplateOutlet",i)("ngTemplateOutletContext",E(2,se,e.ExpenseItems,e.ExpensesSummary,e,e==null?null:e.ExpensesTotalQuantity))}}function he(t,l){t&1&&y(0)}function we(t,l){if(t&1&&(a(0,"div"),g(1,he,1,0,"ng-container",26),n()),t&2){let e=p().$implicit;p();let i=w(28);o(),x("ngTemplateOutlet",i)("ngTemplateOutletContext",E(2,_e,e.OutputItems,e.OutputsSummary,e,e==null?null:e.OutputsTotalQuantity))}}function Ee(t,l){if(t&1&&(_(0,be,2,7,"div"),_(1,Te,2,7,"div"),_(2,we,2,7,"div")),t&2){let e=l.$implicit;f((e==null||e.MaterialItems==null?null:e.MaterialItems.length)>0?0:-1),o(),f((e==null||e.ExpenseItems==null?null:e.ExpenseItems.length)>0?1:-1),o(),f((e==null||e.OutputItems==null?null:e.OutputItems.length)>0?2:-1)}}function ve(t,l){if(t&1&&(a(0,"div")(1,"a",38)(2,"span",39),m(3),n()(),a(4,"span"),m(5),C(6,"date"),n()()),t&2){let e=p().manufacture;o(),x("routerLink",A(7,fe))("queryParams",W(8,xe,e.ID)),o(2),d(" ",e.OutletName+" # "+e.Number),o(2),d(" "," - "+H(6,4,e.Date,"dd MMM yyyy")," ")}}function Fe(t,l){if(t&1&&(a(0,"div",30),m(1),n()),t&2){let e=p().manufacture;o(),d(" ",e.State," ")}}function Ie(t,l){if(t&1&&(a(0,"td",44),m(1),C(2,"number"),n(),a(3,"td",45),m(4),C(5,"number"),n()),t&2){let e=p().$implicit;o(),d(" ",b(2,2,e.UnitCost)," "),o(3),d(" ",b(5,4,e.UnitCost*e.Quantity)," ")}}function Oe(t,l){if(t&1&&(a(0,"tr",33)(1,"td",40),m(2),n(),a(3,"td",41),m(4),n(),a(5,"td",42),m(6),C(7,"number"),n(),a(8,"td",43),m(9),n(),_(10,Ie,6,6),n()),t&2){let e=l.$implicit,i=p(2);o(2),k(e.Name),o(2),d(" ",e.Code," "),o(2),d(" ",b(7,5,e.Quantity)," "),o(3),d(" ",e.UOM," "),o(),f(i.role.product.Cost?10:-1)}}function Pe(t,l){if(t&1&&(a(0,"td",37)(1,"span",46),m(2),n(),a(3,"span"),m(4),C(5,"number"),n()()),t&2){let e=p().summary;o(2),d(" ",e==null?null:e.CurrencySymbol," "),o(2),d(" ",b(5,2,e==null?null:e.Amount)," ")}}function Le(t,l){if(t&1&&(a(0,"div",27)(1,"div",28),_(2,ve,7,10,"div"),a(3,"div")(4,"strong",29),m(5),n()()(),_(6,Fe,2,1,"div",30),n(),a(7,"table",31)(8,"tbody",32),P(9,Oe,11,7,"tr",33,O),n(),a(11,"tfoot")(12,"tr",34)(13,"td",35),m(14,"Total :"),n(),a(15,"td",36),m(16),C(17,"number"),n(),_(18,Pe,6,4,"td",37),n()()()),t&2){let e=l.title,i=l.items,r=l.quantity,u=p();o(2),f(e=="Materials"?2:-1),o(3),d(" ",e," "),o(),f(e=="Materials"?6:-1),o(3),L(i),o(7),d(" ",b(17,5,r)," "),o(2),f(u.role.product.Cost?18:-1)}}var de=class t extends ${role=F(Z);dialog=F(ee);constructor(l,e){super(l,e,"Manufacture/ReportDetail","ManufactureLoader/ReportDetail",null,null,!0)}openExportModal(){this.dialog.open(ne,{data:{title:"Manufacture Detail",exportTypes:[{ID:"ManufactureExport/ReportDetail",Value:"Default",FileName:"Manufacture Detail"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"Manufacture/ReportDetailCount",pagination:!0}})}static \u0275fac=function(e){return new(e||t)(I(ie),I(Y))};static \u0275cmp=R({type:t,selectors:[["app-manufacture-detail"]],features:[B],decls:29,vars:12,consts:[["pageFilterTemplate",""],["CHILD_TABLE",""],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter"],[1,"btn-group"],["filters",""],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","645px"],[2,"width","75px"],[2,"width","30px"],[1,"fst-italic","small",2,"width","40px"],["colspan","6",1,"px-0",2,"border-bottom-width","0px !important"],[3,"nextPage","fetchTotalData","concatAllData","totalData","totalCurrentRow","pageNumber","nextPageDisabled","isFetchTotalData","goToLast"],[1,"btn","btn-outline-secondary"],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","outlets"],["name","From",3,"dateChange","date"],[1,"mt-4"],["name","To",3,"dateChange","date"],["appendTo","body","bindLabel","Value","bindValue","Key","placeholder","Choose State",3,"ngModelChange","items","ngModel"],[1,"text-end",2,"width","80px"],[1,"text-end",2,"width","90px"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"d-flex","justify-content-end","mt-sm-0"],[1,"me-auto","d-sm-block","d-flex","flex-columnmb-5","ps-1"],[1,"text-danger"],[1,"mt-5","mb-5","fw-bold","fst-italic","me-2"],[1,"w-100"],[1,"table","table-sm","table-bordered","table-striped"],[1,"border-start","border-end"],[1,"table-footer"],["colspan","2",1,"text-end","fw-bold"],[1,"text-end","fw-bold","pe-3"],["colspan","3",1,"text-end","fw-bold","pe-2"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber"],[2,"width","620px"],[1,"fw-normal","border-start","border-end",2,"width","75px"],[1,"border-start","border-end","text-end",2,"width","30px"],[1,"border-start","border-end",2,"width","40px"],[1,"text-end","border-start","border-end",2,"width","80px"],[1,"text-end","border-start","border-end",2,"width","90px"],[1,"me-4"]],template:function(e,i){if(e&1){let r=T();a(0,"mainpanel-cmp",2),h("onSubmit",function(){return c(r),s(i.searchFromPageOne())}),S("filterChange",function(v){return c(r),M(i.pageData.Filter,v)||(i.pageData.Filter=v),s(v)}),a(1,"actions"),_(2,ge,2,1,"div",3),n(),a(3,"div",4),g(4,De,12,7,"ng-template",null,0,V),n(),a(6,"content")(7,"div",5)(8,"div",6)(9,"table",7)(10,"thead",8)(11,"tr")(12,"th",9),m(13,"Name"),n(),a(14,"th",10),m(15,"Code"),n(),a(16,"th",11),m(17,"Qty"),n(),a(18,"th",12),m(19,"UOM"),n(),_(20,Me,4,0),n()(),a(21,"tbody")(22,"tr")(23,"td",13),P(24,Ee,3,3,null,null,O),n()()()(),a(26,"infinite-pagination",14),h("nextPage",function(){return c(r),s(i.NextPage(!0))})("fetchTotalData",function(){return c(r),s(i.StoreRowsCountAPIResult("Manufacture/ReportDetailCount"))})("concatAllData",function(){return c(r),s(i.StoreRowsCountAPIResult("Manufacture/ReportDetailCount",!0))}),n()()(),g(27,Le,19,7,"ng-template",null,1,V),n()()}e&2&&(x("pageData",i.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),D("filter",i.pageData.Filter),o(2),f(i.role.global!=null&&i.role.global.Export?2:-1),o(18),f(i.role.product.Cost?20:-1),o(4),L(i.infiniteList),o(2),x("totalData",i.listTotal)("totalCurrentRow",i.infiniteList==null?null:i.infiniteList.length)("pageNumber",i.pageData.Filter.PageNumber)("nextPageDisabled",i.nextPageDisabled)("isFetchTotalData",i.pageData.HideStoreApiCount)("goToLast",i.goToLast))},dependencies:[U,q,le,oe,re,X,K,z,pe,me,te,J,G,ue,ae,j,Q],encapsulation:2})};export{de as ManufactureDetailComponent};
1
+ import{a as ue}from"./chunk-4467AQLM.js";import{d as me,e as pe}from"./chunk-AHTR7XKG.js";import"./chunk-NS6IC2PT.js";import"./chunk-3RK6DDJD.js";import"./chunk-SMEVWRVE.js";import"./chunk-JQDS4BXR.js";import"./chunk-F3HDP5CA.js";import"./chunk-AJAUI7BA.js";import"./chunk-MWGICBEB.js";import"./chunk-WSWTWRKJ.js";import{a as $}from"./chunk-GE5I6JYL.js";import{c as re}from"./chunk-AB7O2ERM.js";import{b as ne}from"./chunk-YQ5PAXUW.js";import"./chunk-XCSDEGWL.js";import"./chunk-55Z32OLJ.js";import"./chunk-TRK4LJDS.js";import"./chunk-B4TZQBTN.js";import{e as oe,f as le}from"./chunk-MZDVGN2B.js";import"./chunk-MJCLLJBB.js";import"./chunk-OB6KFXD6.js";import"./chunk-QJ3CWKQT.js";import"./chunk-SWF6XISV.js";import"./chunk-GXAF3JUO.js";import"./chunk-LB5UXGDG.js";import"./chunk-YDL2MTWE.js";import"./chunk-7YYWBCWJ.js";import"./chunk-CCIHCGP5.js";import"./chunk-FM7BHGBW.js";import"./chunk-TP6ZUC53.js";import"./chunk-RWW55Z7V.js";import{b as ie}from"./chunk-XPM7J5AN.js";import"./chunk-E634BI4W.js";import"./chunk-BAXZ74LK.js";import"./chunk-3ZH3XK5V.js";import"./chunk-V6D6TV7B.js";import{N as ae}from"./chunk-QWLNF7VL.js";import"./chunk-UIVJ2JQT.js";import"./chunk-EQLHPWVB.js";import{d as te}from"./chunk-SCGKVOSE.js";import{g as ee}from"./chunk-N5RDRDT7.js";import"./chunk-N7OS7SFI.js";import"./chunk-4HLKKTIV.js";import"./chunk-RIZ4YVMH.js";import"./chunk-2FWFPV5I.js";import"./chunk-Z76C52NM.js";import{F as X,h as K,o as z}from"./chunk-7MRUPBXU.js";import"./chunk-ABOSNV75.js";import"./chunk-RT7OZJYZ.js";import"./chunk-5RYL4EJ2.js";import{b as Z}from"./chunk-KBLVOO4J.js";import"./chunk-WUV22SZ4.js";import"./chunk-H6RHVRGW.js";import{s as Y}from"./chunk-TANYEHMZ.js";import{Ab as _,Ac as W,Cb as f,Db as O,Dc as E,Fb as P,Gb as L,Hb as x,Hc as C,Ib as a,Ic as b,Jb as n,Jc as H,Kb as N,Nc as V,Qb as y,Rb as T,Sd as G,Ub as h,Ud as J,Wb as p,Xa as o,eb as I,ec as w,ib as R,jc as m,kc as k,lc as d,mb as B,ob as g,oc as D,pa as F,pc as M,pd as q,qc as S,sd as Q,ta as c,ua as s,ud as j,xd as U,zc as A}from"./chunk-L3U6V3BF.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var ce=(t,l,e,i)=>({title:"Materials",items:t,summary:l,manufacture:e,quantity:i}),se=(t,l,e,i)=>({title:"Expenses",items:t,summary:l,manufacture:e,quantity:i}),_e=(t,l,e,i)=>({title:"Outputs",items:t,summary:l,manufacture:e,quantity:i}),fe=()=>["/menu/Manufacture/Job_Order/Archive/Info"],xe=t=>({ID:t});function Ce(t,l){if(t&1){let e=T();a(0,"button",16),h("click",function(){c(e);let r=p(2);return s(r.openExportModal())}),N(1,"i",17),m(2," Export "),n()}}function ge(t,l){if(t&1&&(a(0,"div",3),_(1,Ce,3,0,"button",15),n()),t&2){let e=p();o(),f(e.role.global!=null&&e.role.global.Export?1:-1)}}function De(t,l){if(t&1){let e=T();a(0,"div",18)(1,"h6"),m(2,"Outlet"),n(),a(3,"outlet-selector",19),S("ngModelChange",function(r){c(e);let u=p();return M(u.pageData.Filter.OutletId,r)||(u.pageData.Filter.OutletId=r),s(r)}),n(),a(4,"h6"),m(5,"From - To"),n(),a(6,"datepicker",20),S("dateChange",function(r){c(e);let u=p();return M(u.pageData.Filter.From,r)||(u.pageData.Filter.From=r),s(r)}),n(),a(7,"div",21)(8,"datepicker",22),S("dateChange",function(r){c(e);let u=p();return M(u.pageData.Filter.To,r)||(u.pageData.Filter.To=r),s(r)}),n()(),a(9,"h6"),m(10,"State"),n(),a(11,"ng-select",23),S("ngModelChange",function(r){c(e);let u=p();return M(u.pageData.Filter.State,r)||(u.pageData.Filter.State=r),s(r)}),n()()}if(t&2){let e=p();o(3),x("accessType",2),D("ngModel",e.pageData.Filter.OutletId),x("outlets",e.pageData.Options==null?null:e.pageData.Options.Entities),o(3),D("date",e.pageData.Filter.From),o(2),D("date",e.pageData.Filter.To),o(3),x("items",e.pageData.Options.States),D("ngModel",e.pageData.Filter.State)}}function Me(t,l){t&1&&(a(0,"th",24),m(1,"@ Cost"),n(),a(2,"th",25),m(3,"Total"),n())}function Se(t,l){t&1&&y(0)}function be(t,l){if(t&1&&(a(0,"div"),g(1,Se,1,0,"ng-container",26),n()),t&2){let e=p().$implicit;p();let i=w(28);o(),x("ngTemplateOutlet",i)("ngTemplateOutletContext",E(2,ce,e.MaterialItems,e.MaterialsSummary,e,e==null?null:e.MaterialsTotalQuantity))}}function ye(t,l){t&1&&y(0)}function Te(t,l){if(t&1&&(a(0,"div"),g(1,ye,1,0,"ng-container",26),n()),t&2){let e=p().$implicit;p();let i=w(28);o(),x("ngTemplateOutlet",i)("ngTemplateOutletContext",E(2,se,e.ExpenseItems,e.ExpensesSummary,e,e==null?null:e.ExpensesTotalQuantity))}}function he(t,l){t&1&&y(0)}function we(t,l){if(t&1&&(a(0,"div"),g(1,he,1,0,"ng-container",26),n()),t&2){let e=p().$implicit;p();let i=w(28);o(),x("ngTemplateOutlet",i)("ngTemplateOutletContext",E(2,_e,e.OutputItems,e.OutputsSummary,e,e==null?null:e.OutputsTotalQuantity))}}function Ee(t,l){if(t&1&&(_(0,be,2,7,"div"),_(1,Te,2,7,"div"),_(2,we,2,7,"div")),t&2){let e=l.$implicit;f((e==null||e.MaterialItems==null?null:e.MaterialItems.length)>0?0:-1),o(),f((e==null||e.ExpenseItems==null?null:e.ExpenseItems.length)>0?1:-1),o(),f((e==null||e.OutputItems==null?null:e.OutputItems.length)>0?2:-1)}}function ve(t,l){if(t&1&&(a(0,"div")(1,"a",38)(2,"span",39),m(3),n()(),a(4,"span"),m(5),C(6,"date"),n()()),t&2){let e=p().manufacture;o(),x("routerLink",A(7,fe))("queryParams",W(8,xe,e.ID)),o(2),d(" ",e.OutletName+" # "+e.Number),o(2),d(" "," - "+H(6,4,e.Date,"dd MMM yyyy")," ")}}function Fe(t,l){if(t&1&&(a(0,"div",30),m(1),n()),t&2){let e=p().manufacture;o(),d(" ",e.State," ")}}function Ie(t,l){if(t&1&&(a(0,"td",44),m(1),C(2,"number"),n(),a(3,"td",45),m(4),C(5,"number"),n()),t&2){let e=p().$implicit;o(),d(" ",b(2,2,e.UnitCost)," "),o(3),d(" ",b(5,4,e.UnitCost*e.Quantity)," ")}}function Oe(t,l){if(t&1&&(a(0,"tr",33)(1,"td",40),m(2),n(),a(3,"td",41),m(4),n(),a(5,"td",42),m(6),C(7,"number"),n(),a(8,"td",43),m(9),n(),_(10,Ie,6,6),n()),t&2){let e=l.$implicit,i=p(2);o(2),k(e.Name),o(2),d(" ",e.Code," "),o(2),d(" ",b(7,5,e.Quantity)," "),o(3),d(" ",e.UOM," "),o(),f(i.role.product.Cost?10:-1)}}function Pe(t,l){if(t&1&&(a(0,"td",37)(1,"span",46),m(2),n(),a(3,"span"),m(4),C(5,"number"),n()()),t&2){let e=p().summary;o(2),d(" ",e==null?null:e.CurrencySymbol," "),o(2),d(" ",b(5,2,e==null?null:e.Amount)," ")}}function Le(t,l){if(t&1&&(a(0,"div",27)(1,"div",28),_(2,ve,7,10,"div"),a(3,"div")(4,"strong",29),m(5),n()()(),_(6,Fe,2,1,"div",30),n(),a(7,"table",31)(8,"tbody",32),P(9,Oe,11,7,"tr",33,O),n(),a(11,"tfoot")(12,"tr",34)(13,"td",35),m(14,"Total :"),n(),a(15,"td",36),m(16),C(17,"number"),n(),_(18,Pe,6,4,"td",37),n()()()),t&2){let e=l.title,i=l.items,r=l.quantity,u=p();o(2),f(e=="Materials"?2:-1),o(3),d(" ",e," "),o(),f(e=="Materials"?6:-1),o(3),L(i),o(7),d(" ",b(17,5,r)," "),o(2),f(u.role.product.Cost?18:-1)}}var de=class t extends ${role=F(Z);dialog=F(ee);constructor(l,e){super(l,e,"Manufacture/ReportDetail","ManufactureLoader/ReportDetail",null,null,!0)}openExportModal(){this.dialog.open(ne,{data:{title:"Manufacture Detail",exportTypes:[{ID:"ManufactureExport/ReportDetail",Value:"Default",FileName:"Manufacture Detail"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"Manufacture/ReportDetailCount",pagination:!0}})}static \u0275fac=function(e){return new(e||t)(I(ie),I(Y))};static \u0275cmp=R({type:t,selectors:[["app-manufacture-detail"]],features:[B],decls:29,vars:12,consts:[["pageFilterTemplate",""],["CHILD_TABLE",""],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter"],[1,"btn-group"],["filters",""],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","645px"],[2,"width","75px"],[2,"width","30px"],[1,"fst-italic","small",2,"width","40px"],["colspan","6",1,"px-0",2,"border-bottom-width","0px !important"],[3,"nextPage","fetchTotalData","concatAllData","totalData","totalCurrentRow","pageNumber","nextPageDisabled","isFetchTotalData","goToLast"],[1,"btn","btn-outline-secondary"],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","outlets"],["name","From",3,"dateChange","date"],[1,"mt-4"],["name","To",3,"dateChange","date"],["appendTo","body","bindLabel","Value","bindValue","Key","placeholder","Choose State",3,"ngModelChange","items","ngModel"],[1,"text-end",2,"width","80px"],[1,"text-end",2,"width","90px"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"d-flex","justify-content-end","mt-sm-0"],[1,"me-auto","d-sm-block","d-flex","flex-columnmb-5","ps-1"],[1,"text-danger"],[1,"mt-5","mb-5","fw-bold","fst-italic","me-2"],[1,"w-100"],[1,"table","table-sm","table-bordered","table-striped"],[1,"border-start","border-end"],[1,"table-footer"],["colspan","2",1,"text-end","fw-bold"],[1,"text-end","fw-bold","pe-3"],["colspan","3",1,"text-end","fw-bold","pe-2"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber"],[2,"width","620px"],[1,"fw-normal","border-start","border-end",2,"width","75px"],[1,"border-start","border-end","text-end",2,"width","30px"],[1,"border-start","border-end",2,"width","40px"],[1,"text-end","border-start","border-end",2,"width","80px"],[1,"text-end","border-start","border-end",2,"width","90px"],[1,"me-4"]],template:function(e,i){if(e&1){let r=T();a(0,"mainpanel-cmp",2),h("onSubmit",function(){return c(r),s(i.searchFromPageOne())}),S("filterChange",function(v){return c(r),M(i.pageData.Filter,v)||(i.pageData.Filter=v),s(v)}),a(1,"actions"),_(2,ge,2,1,"div",3),n(),a(3,"div",4),g(4,De,12,7,"ng-template",null,0,V),n(),a(6,"content")(7,"div",5)(8,"div",6)(9,"table",7)(10,"thead",8)(11,"tr")(12,"th",9),m(13,"Name"),n(),a(14,"th",10),m(15,"Code"),n(),a(16,"th",11),m(17,"Qty"),n(),a(18,"th",12),m(19,"UOM"),n(),_(20,Me,4,0),n()(),a(21,"tbody")(22,"tr")(23,"td",13),P(24,Ee,3,3,null,null,O),n()()()(),a(26,"infinite-pagination",14),h("nextPage",function(){return c(r),s(i.NextPage(!0))})("fetchTotalData",function(){return c(r),s(i.StoreRowsCountAPIResult("Manufacture/ReportDetailCount"))})("concatAllData",function(){return c(r),s(i.StoreRowsCountAPIResult("Manufacture/ReportDetailCount",!0))}),n()()(),g(27,Le,19,7,"ng-template",null,1,V),n()()}e&2&&(x("pageData",i.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),D("filter",i.pageData.Filter),o(2),f(i.role.global!=null&&i.role.global.Export?2:-1),o(18),f(i.role.product.Cost?20:-1),o(4),L(i.infiniteList),o(2),x("totalData",i.listTotal)("totalCurrentRow",i.infiniteList==null?null:i.infiniteList.length)("pageNumber",i.pageData.Filter.PageNumber)("nextPageDisabled",i.nextPageDisabled)("isFetchTotalData",i.pageData.HideStoreApiCount)("goToLast",i.goToLast))},dependencies:[U,q,le,oe,re,X,K,z,pe,me,te,J,G,ue,ae,j,Q],encapsulation:2})};export{de as ManufactureDetailComponent};