From 88adb566ebefb0f382b3eaa2a7c625a0ec32d202 Mon Sep 17 00:00:00 2001 From: ahasani194 Date: Mon, 11 May 2026 16:24:57 +0330 Subject: [PATCH] feat: streamline routing and layout initialization for POS module --- src/app.routes.ts | 14 +++++++------- src/app/domains/pos/layouts/layout.component.html | 1 - .../pos/layouts/pagesLayout/layout.component.ts | 4 ++++ .../components/order/order-section.component.html | 8 ++------ 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/app.routes.ts b/src/app.routes.ts index 35bb13f..348579a 100644 --- a/src/app.routes.ts +++ b/src/app.routes.ts @@ -10,13 +10,13 @@ export const appRoutes: Routes = [ { path: '', loadComponent: () => import('@/layout/default/app.layout.component').then((m) => m.AppLayout), - children: [ - SUPER_ADMIN_ROUTES, - CONSUMER_ROUTES, - PROVIDER_ROUTES, - PARTNER_ROUTES, - ...POS_ROUTES.children!, - ], + children: [SUPER_ADMIN_ROUTES, CONSUMER_ROUTES, PROVIDER_ROUTES, PARTNER_ROUTES], + }, + { + path: 'pos', + loadComponent: () => + import('@/domains/pos/layouts/layout.component').then((m) => m.PosLayoutComponent), + children: [POS_ROUTES], }, { diff --git a/src/app/domains/pos/layouts/layout.component.html b/src/app/domains/pos/layouts/layout.component.html index 5b172d3..3589fd2 100644 --- a/src/app/domains/pos/layouts/layout.component.html +++ b/src/app/domains/pos/layouts/layout.component.html @@ -25,7 +25,6 @@ } - {{ isAuth() }} @if (isAuth()) { @defer (when isAuth()) { diff --git a/src/app/domains/pos/layouts/pagesLayout/layout.component.ts b/src/app/domains/pos/layouts/pagesLayout/layout.component.ts index 17e61bb..b080e45 100644 --- a/src/app/domains/pos/layouts/pagesLayout/layout.component.ts +++ b/src/app/domains/pos/layouts/pagesLayout/layout.component.ts @@ -116,6 +116,10 @@ export class PosPagesLayoutComponent implements AfterViewInit { this.getData(); } + ngOnInit() { + this.layoutService.changeIsFullPage(true); + } + ngAfterViewInit() { this.layoutService.setTopbarStartSlot(this.topbarStart); this.layoutService.setTopbarCenterSlot(this.topbarCenter); diff --git a/src/app/domains/pos/modules/landing/components/order/order-section.component.html b/src/app/domains/pos/modules/landing/components/order/order-section.component.html index 30f16e8..424c024 100644 --- a/src/app/domains/pos/modules/landing/components/order/order-section.component.html +++ b/src/app/domains/pos/modules/landing/components/order/order-section.component.html @@ -61,10 +61,6 @@ -@defer (when isVisibleCustomerForm()) { - -} + -@defer (when isVisiblePaymentForm()) { - -} +