From 611babce59f377207d75861c21b4e03de8d162be Mon Sep 17 00:00:00 2001 From: gkbishnoi07 Date: Mon, 6 Jul 2026 04:20:56 +0000 Subject: [PATCH 1/8] build(deps): drop Angular Material + Bootstrap; enable Tailwind Preflight The final migration step - the app is now 100% Zard UI + Tailwind: - replace MatTableDataSource with a local TableDataSource (same surface: data/filter/filteredData/filterPredicate/paginator; data reflects the active filter, matching what mat-table rendered); drop the dead @ViewChild(MatPaginator) declarations (39 + 25 files) - remove @angular/material and bootstrap from package.json (@angular/cdk stays - it is the primitives layer Zard UI is built on) - angular.json: remove the Material prebuilt theme and the bootstrap script/style entries; delete src/bootstrap.layer.css (nothing left to layer); remove the bootstrap bundle script from index.html - styles.css: remove the coexistence [z-button]/z-select radius reset (Material's unlayered button rule is gone) - tailwind.css: enable Preflight in @layer base and add the shadcn default border color (* { border-color: var(--border) }) so bare border utilities render the subtle token instead of currentColor Verified: dev + prod builds green, lint 0 errors; compiled bundle has preflight active, the border-color base rule, and zero --bs- variables. --- angular.json | 12 +-- package-lock.json | 49 ------------ package.json | 2 - .../batch-adjustment.component.ts | 7 +- .../batch-search/batch-search.component.ts | 7 +- .../beneficiary-details.component.ts | 4 +- .../indent-item-list.component.ts | 7 +- .../item-dispense/item-dispense.component.ts | 7 +- .../item-search/item-search.component.ts | 7 +- .../components/search/search.component.ts | 7 +- .../transfer-search.component.ts | 7 +- .../core/utils/table-data-source.ts | 75 +++++++++++++++++++ .../manual-indent-dispense.component.ts | 9 +-- .../select-batch-for-indent-item.component.ts | 4 +- ...n-store-indent-order-worklist.component.ts | 9 +-- .../indent-request.component.ts | 4 +- ...b-store-indent-order-worklist.component.ts | 7 +- .../manual-medicine-dispense.component.ts | 9 +-- .../select-batch/select-batch.component.ts | 4 +- .../show-batch-item.component.ts | 4 +- .../system-medicine-dispense.component.ts | 4 +- ...iew-medicine-dispense-details.component.ts | 17 ++--- .../view-medicine-dispense.component.ts | 11 ++- .../benificiary-details.component.ts | 7 +- ...ch-details-for-patient-return.component.ts | 9 +-- .../patient-return-batch-details.component.ts | 4 +- ...atient-return-previous-record.component.ts | 4 +- .../physical-stock-entry.component.ts | 4 +- .../view-physical-stock-details.component.ts | 9 +-- .../view-physical-stock.component.ts | 7 +- .../store-self-consumption.component.ts | 4 +- ...tore-self-consumption-details.component.ts | 17 ++--- .../view-store-self-consumption.component.ts | 7 +- .../store-stock-adjustment.component.ts | 4 +- ...view-stock-adjustment-details.component.ts | 21 +++--- ...tock-adjustment-draft-details.component.ts | 21 +++--- ...-store-stock-adjustment-draft.component.ts | 13 ++-- .../view-store-stock-adjustment.component.ts | 15 ++-- .../store-stock-transfer.component.ts | 4 +- ...-store-stock-transfer-details.component.ts | 17 ++--- .../view-store-stock-transfer.component.ts | 7 +- .../rx-item-dispense.component.ts | 4 +- src/bootstrap.layer.css | 6 -- src/index.html | 1 - src/styles.css | 14 ---- src/tailwind.css | 19 ++++- 46 files changed, 237 insertions(+), 254 deletions(-) create mode 100644 src/app/app-modules/core/utils/table-data-source.ts delete mode 100644 src/bootstrap.layer.css diff --git a/angular.json b/angular.json index 0973b3a..dcc858c 100644 --- a/angular.json +++ b/angular.json @@ -30,16 +30,12 @@ } ], "styles": [ - "@angular/material/prebuilt-themes/indigo-pink.css", "src/tailwind.css", "src/css/custom.css", "src/css/layout.css", - "src/styles.css", - "src/bootstrap.layer.css" + "src/styles.css" ], - "scripts": [ - "node_modules/bootstrap/dist/js/bootstrap.bundle.min.js" - ] + "scripts": [] }, "configurations": { "production": { @@ -145,12 +141,10 @@ "src/assets" ], "styles": [ - "@angular/material/prebuilt-themes/indigo-pink.css", "src/tailwind.css", "src/css/custom.css", "src/css/layout.css", - "src/styles.css", - "src/bootstrap.layer.css" + "src/styles.css" ], "scripts": [] } diff --git a/package-lock.json b/package-lock.json index a049932..3b77142 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,6 @@ "@angular/compiler": "^20.3.25", "@angular/core": "^20.3.25", "@angular/forms": "^20.3.25", - "@angular/material": "^20.2.14", "@angular/platform-browser": "^20.3.25", "@angular/platform-browser-dynamic": "^20.3.25", "@angular/router": "^20.3.25", @@ -26,7 +25,6 @@ "@types/file-saver": "^2.0.7", "angular": "^1.6.10", "angular-moment": "^1.3.0", - "bootstrap": "^5.3.2", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "crypto-js": "^4.2.0", @@ -2559,23 +2557,6 @@ "rxjs": "^6.5.3 || ^7.4.0" } }, - "node_modules/@angular/material": { - "version": "20.2.14", - "resolved": "https://registry.npmjs.org/@angular/material/-/material-20.2.14.tgz", - "integrity": "sha512-IbAgV6XLsvmHiJzxycVhcNC1PA4M30qi+ERCOir6cT333Bxm8vDV32gsOjfL52uzG5YRARroPC+8s1XqR2oxeA==", - "license": "MIT", - "dependencies": { - "tslib": "^2.3.0" - }, - "peerDependencies": { - "@angular/cdk": "20.2.14", - "@angular/common": "^20.0.0 || ^21.0.0", - "@angular/core": "^20.0.0 || ^21.0.0", - "@angular/forms": "^20.0.0 || ^21.0.0", - "@angular/platform-browser": "^20.0.0 || ^21.0.0", - "rxjs": "^6.5.3 || ^7.4.0" - } - }, "node_modules/@angular/platform-browser": { "version": "20.3.25", "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-20.3.25.tgz", @@ -7595,17 +7576,6 @@ "url": "https://opencollective.com/pkgr" } }, - "node_modules/@popperjs/core": { - "version": "2.11.8", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", - "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", - "license": "MIT", - "peer": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" - } - }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.59.0", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz", @@ -9863,25 +9833,6 @@ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "license": "ISC" }, - "node_modules/bootstrap": { - "version": "5.3.5", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.5.tgz", - "integrity": "sha512-ct1CHKtiobRimyGzmsSldEtM03E8fcEX4Tb3dGXz1V8faRwM50+vfHwTzOxB3IlKO7m+9vTH3s/3C6T2EAPeTA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/twbs" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/bootstrap" - } - ], - "license": "MIT", - "peerDependencies": { - "@popperjs/core": "^2.11.8" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", diff --git a/package.json b/package.json index ae0e174..216b9c9 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,6 @@ "@angular/compiler": "^20.3.25", "@angular/core": "^20.3.25", "@angular/forms": "^20.3.25", - "@angular/material": "^20.2.14", "@angular/platform-browser": "^20.3.25", "@angular/platform-browser-dynamic": "^20.3.25", "@angular/router": "^20.3.25", @@ -40,7 +39,6 @@ "@types/file-saver": "^2.0.7", "angular": "^1.6.10", "angular-moment": "^1.3.0", - "bootstrap": "^5.3.2", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "crypto-js": "^4.2.0", diff --git a/src/app/app-modules/core/components/batch-adjustment/batch-adjustment.component.ts b/src/app/app-modules/core/components/batch-adjustment/batch-adjustment.component.ts index 0e81021..6bc7c7c 100644 --- a/src/app/app-modules/core/components/batch-adjustment/batch-adjustment.component.ts +++ b/src/app/app-modules/core/components/batch-adjustment/batch-adjustment.component.ts @@ -27,8 +27,7 @@ import { Observable } from 'rxjs'; import { SetLanguageComponent } from '../set-language.component'; import { LanguageService } from '../../services/language.service'; import { Z_MODAL_DATA, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { FormsModule } from '@angular/forms'; import { StringValidatorDirective } from '../../directives/stringValidator.directive'; import { NgIf, NgFor, DatePipe } from '@angular/common'; @@ -69,8 +68,8 @@ export class BatchAdjustmentComponent implements OnInit, DoCheck { selectedBatchList: any = []; languageComponent!: SetLanguageComponent; currentLanguageSet: any; - dataSource = new MatTableDataSource(); - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + dataSource = new TableDataSource(); + paginator: unknown = null; data: any; constructor( diff --git a/src/app/app-modules/core/components/batch-search/batch-search.component.ts b/src/app/app-modules/core/components/batch-search/batch-search.component.ts index f950b75..9c8b47e 100644 --- a/src/app/app-modules/core/components/batch-search/batch-search.component.ts +++ b/src/app/app-modules/core/components/batch-search/batch-search.component.ts @@ -27,8 +27,7 @@ import { Observable } from 'rxjs'; import { SetLanguageComponent } from '../set-language.component'; import { LanguageService } from '../../services/language.service'; import { Z_MODAL_DATA, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { FormsModule } from '@angular/forms'; import { StringValidatorDirective } from '../../directives/stringValidator.directive'; import { NgIf, NgFor, DatePipe } from '@angular/common'; @@ -69,8 +68,8 @@ export class BatchSearchComponent implements OnInit, DoCheck { languageComponent!: SetLanguageComponent; currentLanguageSet: any; noRecordsFlag = false; - dataSource = new MatTableDataSource(); - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + dataSource = new TableDataSource(); + paginator: unknown = null; constructor( @Inject(Z_MODAL_DATA) public input: any, diff --git a/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.ts b/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.ts index 55be489..83066a2 100644 --- a/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.ts +++ b/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.ts @@ -25,7 +25,7 @@ import { Router, ActivatedRoute } from '@angular/router'; import { BeneficiaryDetailsService } from '../../services/beneficiary-details.service'; import { LanguageService } from '../../services/language.service'; import { SetLanguageComponent } from '../set-language.component'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { NgIf, DatePipe } from '@angular/common'; @@ -41,7 +41,7 @@ export class BeneficiaryDetailsComponent implements OnInit, DoCheck, OnDestroy { currentLanguageSet: any; languageComponent!: SetLanguageComponent; healthIDValue!: string; - dataList = new MatTableDataSource(); + dataList = new TableDataSource(); constructor( private router: Router, diff --git a/src/app/app-modules/core/components/indent-item-list/indent-item-list.component.ts b/src/app/app-modules/core/components/indent-item-list/indent-item-list.component.ts index 05175a7..152ccfa 100644 --- a/src/app/app-modules/core/components/indent-item-list/indent-item-list.component.ts +++ b/src/app/app-modules/core/components/indent-item-list/indent-item-list.component.ts @@ -26,8 +26,7 @@ import { BatchSearchService } from '../../services/batch-search.service'; import { SetLanguageComponent } from '../set-language.component'; import { LanguageService } from '../../services/language.service'; import { Z_MODAL_DATA, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { FormsModule } from '@angular/forms'; import { StringValidatorDirective } from '../../directives/stringValidator.directive'; import { NgIf, NgFor } from '@angular/common'; @@ -64,8 +63,8 @@ export class IndentItemListComponent implements OnInit, DoCheck { searchTerms!: string; items!: Observable; selectedItemList: any = []; - dataSource = new MatTableDataSource(); - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + dataSource = new TableDataSource(); + paginator: unknown = null; languageComponent!: SetLanguageComponent; currentLanguageSet: any; noRecordsFlag = false; diff --git a/src/app/app-modules/core/components/item-dispense/item-dispense.component.ts b/src/app/app-modules/core/components/item-dispense/item-dispense.component.ts index de0f10e..47b2174 100644 --- a/src/app/app-modules/core/components/item-dispense/item-dispense.component.ts +++ b/src/app/app-modules/core/components/item-dispense/item-dispense.component.ts @@ -27,8 +27,7 @@ import { Observable } from 'rxjs'; import { SetLanguageComponent } from '../set-language.component'; import { LanguageService } from '../../services/language.service'; import { Z_MODAL_DATA, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { FormsModule } from '@angular/forms'; import { StringValidatorDirective } from '../../directives/stringValidator.directive'; import { NgIf, NgFor } from '@angular/common'; @@ -66,9 +65,9 @@ export class ItemDispenseComponent implements OnInit, DoCheck { languageComponent!: SetLanguageComponent; currentLanguageSet: any; - dataSource = new MatTableDataSource(); + dataSource = new TableDataSource(); noRecordsFlag = false; - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + paginator: unknown = null; constructor( @Inject(Z_MODAL_DATA) public input: any, diff --git a/src/app/app-modules/core/components/item-search/item-search.component.ts b/src/app/app-modules/core/components/item-search/item-search.component.ts index 99c9fea..f1b73c9 100644 --- a/src/app/app-modules/core/components/item-search/item-search.component.ts +++ b/src/app/app-modules/core/components/item-search/item-search.component.ts @@ -26,8 +26,7 @@ import { Observable } from 'rxjs'; import { SetLanguageComponent } from '../set-language.component'; import { LanguageService } from '../../services/language.service'; import { Z_MODAL_DATA, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { FormsModule } from '@angular/forms'; import { StringValidatorDirective } from '../../directives/stringValidator.directive'; import { NgIf, NgFor } from '@angular/common'; @@ -64,8 +63,8 @@ export class ItemSearchComponent implements OnInit, DoCheck { languageComponent!: SetLanguageComponent; currentLanguageSet: any; noRecordsFlag = false; - dataSource = new MatTableDataSource(); - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + dataSource = new TableDataSource(); + paginator: unknown = null; displayedColumns: string[] = [ 'itemCode', diff --git a/src/app/app-modules/core/components/search/search.component.ts b/src/app/app-modules/core/components/search/search.component.ts index a2afefa..71be406 100644 --- a/src/app/app-modules/core/components/search/search.component.ts +++ b/src/app/app-modules/core/components/search/search.component.ts @@ -33,8 +33,7 @@ import { SetLanguageComponent } from '../set-language.component'; import { LanguageService } from '../../services/language.service'; import { environment } from 'src/environments/environment'; import { ZardDialogRef } from 'Common-UI/v2/ui/dialog'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { FormsModule } from '@angular/forms'; import { StringValidatorDirective } from '../../directives/stringValidator.directive'; @@ -90,8 +89,8 @@ export class SearchComponent implements OnInit, DoCheck { countryId = environment.countryId; searched = false; beneficiaryList: any = []; - filteredBeneficiaryList = new MatTableDataSource(); - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + filteredBeneficiaryList = new TableDataSource(); + paginator: unknown = null; blankTable = [{}, {}, {}, {}, {}]; displayedColumns: string[] = [ 'beneficiaryID', diff --git a/src/app/app-modules/core/components/transfer-search/transfer-search.component.ts b/src/app/app-modules/core/components/transfer-search/transfer-search.component.ts index badc297..eddcf75 100644 --- a/src/app/app-modules/core/components/transfer-search/transfer-search.component.ts +++ b/src/app/app-modules/core/components/transfer-search/transfer-search.component.ts @@ -25,8 +25,7 @@ import { Observable } from 'rxjs'; import { SetLanguageComponent } from '../set-language.component'; import { LanguageService } from '../../services/language.service'; import { Z_MODAL_DATA, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { FormsModule } from '@angular/forms'; import { NgIf, NgFor, DatePipe } from '@angular/common'; import { NgIcon, provideIcons } from '@ng-icons/core'; @@ -65,8 +64,8 @@ export class TransferSearchComponent implements OnInit, DoCheck { languageComponent!: SetLanguageComponent; currentLanguageSet: any; noRecordsFlag = false; - dataSource = new MatTableDataSource(); - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + dataSource = new TableDataSource(); + paginator: unknown = null; displayedColumns: string[] = [ 'itemCode', 'itemName', diff --git a/src/app/app-modules/core/utils/table-data-source.ts b/src/app/app-modules/core/utils/table-data-source.ts new file mode 100644 index 0000000..09b7a8f --- /dev/null +++ b/src/app/app-modules/core/utils/table-data-source.ts @@ -0,0 +1,75 @@ +/* + * AMRIT – Accessible Medical Records via Integrated Technology + * Integrated EHR (Electronic Health Records) Solution + * + * Copyright (C) "Piramal Swasthya Management and Research Institute" + * + * This file is part of AMRIT. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + +/** + * Drop-in replacement for Angular Material's TableDataSource covering the + * surface this app uses (`data`, `filter`, `filteredData`, `filterPredicate`, + * `paginator`). Templates iterate `.data` (via z-paginator's zData), so — + * unlike TableDataSource, whose filtering only affected the mat-table + * render pipe — `data` returns the filtered view while a filter is active, + * preserving the user-visible behaviour of the original screens. + */ +export class TableDataSource { + private rawData: T[] = []; + private currentFilter = ''; + filteredData: T[] = []; + + /** Same default predicate shape as TableDataSource. */ + filterPredicate: (row: T, filter: string) => boolean = (row, filter) => + JSON.stringify(row).toLowerCase().includes(filter.trim().toLowerCase()); + + /** Kept so legacy `dataSource.paginator = ...` assignments stay harmless. */ + paginator: unknown = null; + sort: unknown = null; + + constructor(initialData?: T[]) { + if (initialData) { + this.data = initialData; + } + } + + get data(): T[] { + return this.currentFilter ? this.filteredData : this.rawData; + } + + set data(value: T[]) { + this.rawData = value ?? []; + this.applyFilter(); + } + + get filter(): string { + return this.currentFilter; + } + + set filter(value: string) { + this.currentFilter = value ?? ''; + this.applyFilter(); + } + + private applyFilter(): void { + this.filteredData = this.currentFilter + ? this.rawData.filter((row) => + this.filterPredicate(row, this.currentFilter), + ) + : [...this.rawData]; + } +} diff --git a/src/app/app-modules/inventory/indent/indent-order-worklist/main-store-indent-order-worklist/indent-dispenses/manual-indent-dispense/manual-indent-dispense.component.ts b/src/app/app-modules/inventory/indent/indent-order-worklist/main-store-indent-order-worklist/indent-dispenses/manual-indent-dispense/manual-indent-dispense.component.ts index cc4c735..cd20fca 100644 --- a/src/app/app-modules/inventory/indent/indent-order-worklist/main-store-indent-order-worklist/indent-dispenses/manual-indent-dispense/manual-indent-dispense.component.ts +++ b/src/app/app-modules/inventory/indent/indent-order-worklist/main-store-indent-order-worklist/indent-dispenses/manual-indent-dispense/manual-indent-dispense.component.ts @@ -30,8 +30,7 @@ import { InventoryService } from 'src/app/app-modules/inventory/shared/service/i import { SelectBatchForIndentItemComponent } from './select-batch-for-indent-item/select-batch-for-indent-item.component'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; -import { MatPaginator } from '@angular/material/paginator'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { NgIcon, provideIcons } from '@ng-icons/core'; import { lucidePencil, lucideTrash2 } from '@ng-icons/lucide'; @@ -61,7 +60,7 @@ export class ManualIndentDispenseComponent implements OnInit, DoCheck { mainStoreItemList: any; batchlist = []; - manualDispenseList = new MatTableDataSource(); + manualDispenseList = new TableDataSource(); mainStoreItemListForDispense: any = []; enableButton = true; languageComponent!: SetLanguageComponent; @@ -87,7 +86,7 @@ export class ManualIndentDispenseComponent implements OnInit, DoCheck { ]; batchNumberDataList: any = []; otherData: any = []; - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + paginator: unknown = null; constructor( private router: Router, @@ -258,7 +257,7 @@ export class ManualIndentDispenseComponent implements OnInit, DoCheck { if (editIndex !== null) { this.manualDispenseList.data.splice(editIndex, 1); this.manualDispenseList.data.push(result); - this.manualDispenseList = new MatTableDataSource( + this.manualDispenseList = new TableDataSource( this.manualDispenseList.data, ); console.log( diff --git a/src/app/app-modules/inventory/indent/indent-order-worklist/main-store-indent-order-worklist/indent-dispenses/manual-indent-dispense/select-batch-for-indent-item/select-batch-for-indent-item.component.ts b/src/app/app-modules/inventory/indent/indent-order-worklist/main-store-indent-order-worklist/indent-dispenses/manual-indent-dispense/select-batch-for-indent-item/select-batch-for-indent-item.component.ts index c0cb142..42751cc 100644 --- a/src/app/app-modules/inventory/indent/indent-order-worklist/main-store-indent-order-worklist/indent-dispenses/manual-indent-dispense/select-batch-for-indent-item/select-batch-for-indent-item.component.ts +++ b/src/app/app-modules/inventory/indent/indent-order-worklist/main-store-indent-order-worklist/indent-dispenses/manual-indent-dispense/select-batch-for-indent-item/select-batch-for-indent-item.component.ts @@ -31,7 +31,7 @@ import { InventoryService } from 'src/app/app-modules/inventory/shared/service/i import { ConfirmationService } from '../../../../../../../core/services/confirmation.service'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { StringValidatorDirective } from '../../../../../../../core/directives/stringValidator.directive'; import { NgFor, NgIf, DatePipe } from '@angular/common'; import { NgIcon, provideIcons } from '@ng-icons/core'; @@ -81,7 +81,7 @@ export class SelectBatchForIndentItemComponent implements OnInit, DoCheck { 'expiryDate', 'action', ]; - dataSource = new MatTableDataSource(); + dataSource = new TableDataSource(); constructor( private confirmationService: ConfirmationService, diff --git a/src/app/app-modules/inventory/indent/indent-order-worklist/main-store-indent-order-worklist/main-store-indent-order-worklist.component.ts b/src/app/app-modules/inventory/indent/indent-order-worklist/main-store-indent-order-worklist/main-store-indent-order-worklist.component.ts index 6986c05..291a4e9 100644 --- a/src/app/app-modules/inventory/indent/indent-order-worklist/main-store-indent-order-worklist/main-store-indent-order-worklist.component.ts +++ b/src/app/app-modules/inventory/indent/indent-order-worklist/main-store-indent-order-worklist/main-store-indent-order-worklist.component.ts @@ -28,8 +28,7 @@ import { MainStoreItemModelComponent } from './main-store-item-model/main-store- import { RejectItemFromMainstoreModelComponent } from './reject-item-from-mainstore-model/reject-item-from-mainstore-model.component'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; -import { MatPaginator } from '@angular/material/paginator'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { NgIf, DatePipe } from '@angular/common'; import { UtcDatePipe } from '../../../utc-date.pipe'; @@ -62,8 +61,8 @@ export class MainStoreIndentOrderWorklistComponent implements OnInit, DoCheck { isMainStore = false; enableIndentReceipt = false; - mainstoreOrderlist = new MatTableDataSource(); - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + mainstoreOrderlist = new TableDataSource(); + paginator: unknown = null; mainStoreItemList: any = []; orderReqObject: any; rejectOrderList = []; @@ -71,7 +70,7 @@ export class MainStoreIndentOrderWorklistComponent implements OnInit, DoCheck { mainFacilityID: any; languageComponent!: SetLanguageComponent; currentLanguageSet: any; - dataSource!: MatTableDataSource; + dataSource!: TableDataSource; displayedColumns: string[] = [ 'SNo', 'indentID', diff --git a/src/app/app-modules/inventory/indent/indent-order-worklist/sub-store-indent-order-worklist/indent-request/indent-request.component.ts b/src/app/app-modules/inventory/indent/indent-order-worklist/sub-store-indent-order-worklist/indent-request/indent-request.component.ts index 4aa8dde..5db69f2 100644 --- a/src/app/app-modules/inventory/indent/indent-order-worklist/sub-store-indent-order-worklist/indent-request/indent-request.component.ts +++ b/src/app/app-modules/inventory/indent/indent-order-worklist/sub-store-indent-order-worklist/indent-request/indent-request.component.ts @@ -38,7 +38,7 @@ import { Router, ActivatedRoute } from '@angular/router'; import { DataStorageService } from '../../../../shared/service/data-storage.service'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { Subscription } from 'rxjs'; import { StringValidatorDirective } from '../../../../../core/directives/stringValidator.directive'; @@ -94,7 +94,7 @@ export class IndentRequestComponent implements OnInit, DoCheck { 'remarks', 'action', ]; - dataSource = new MatTableDataSource(); + dataSource = new TableDataSource(); private subs: Subscription; constructor( diff --git a/src/app/app-modules/inventory/indent/indent-order-worklist/sub-store-indent-order-worklist/sub-store-indent-order-worklist.component.ts b/src/app/app-modules/inventory/indent/indent-order-worklist/sub-store-indent-order-worklist/sub-store-indent-order-worklist.component.ts index 7f6f9c3..449191c 100644 --- a/src/app/app-modules/inventory/indent/indent-order-worklist/sub-store-indent-order-worklist/sub-store-indent-order-worklist.component.ts +++ b/src/app/app-modules/inventory/indent/indent-order-worklist/sub-store-indent-order-worklist/sub-store-indent-order-worklist.component.ts @@ -28,8 +28,7 @@ import { InventoryService } from '../../../shared/service/inventory.service'; import { DataStorageService } from '../../../shared/service/data-storage.service'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; -import { MatPaginator } from '@angular/material/paginator'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { NgIf, NgFor, DatePipe } from '@angular/common'; import { UtcDatePipe } from '../../../utc-date.pipe'; @@ -59,11 +58,11 @@ import { tooltipImports } from 'Common-UI/v2/ui/tooltip'; ], }) export class SubStoreIndentOrderWorklistComponent implements OnInit, DoCheck { - substoreOrderlist = new MatTableDataSource(); + substoreOrderlist = new TableDataSource(); orderReqObject: any; languageComponent!: SetLanguageComponent; currentLanguageSet: any; - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + paginator: unknown = null; displayedColumns = [ 'SNo', 'indentID', diff --git a/src/app/app-modules/inventory/medicine-dispense/manual-medicine-dispense/manual-medicine-dispense.component.ts b/src/app/app-modules/inventory/medicine-dispense/manual-medicine-dispense/manual-medicine-dispense.component.ts index 133f68a..dfcc235 100644 --- a/src/app/app-modules/inventory/medicine-dispense/manual-medicine-dispense/manual-medicine-dispense.component.ts +++ b/src/app/app-modules/inventory/medicine-dispense/manual-medicine-dispense/manual-medicine-dispense.component.ts @@ -44,8 +44,7 @@ import * as moment from 'moment'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { ZardDialogService, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { ItemDispenseDirective } from '../../../core/directives/item-dispense.directive'; import { NgIf, NgFor, DatePipe } from '@angular/common'; @@ -89,11 +88,11 @@ export class ManualMedicineDispenseComponent implements OnInit, DoCheck { manualItemDispenseForm!: FormGroup; languageComponent!: SetLanguageComponent; currentLanguageSet: any; - manualDispenseList = new MatTableDataSource(); - dataSource = new MatTableDataSource(); + manualDispenseList = new TableDataSource(); + dataSource = new TableDataSource(); batchNumberDataList: any = []; otherData: any = []; - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + paginator: unknown = null; displayedColumns: string[] = [ 'SNo', 'itemName', diff --git a/src/app/app-modules/inventory/medicine-dispense/manual-medicine-dispense/select-batch/select-batch.component.ts b/src/app/app-modules/inventory/medicine-dispense/manual-medicine-dispense/select-batch/select-batch.component.ts index a1b83ed..808ea92 100644 --- a/src/app/app-modules/inventory/medicine-dispense/manual-medicine-dispense/select-batch/select-batch.component.ts +++ b/src/app/app-modules/inventory/medicine-dispense/manual-medicine-dispense/select-batch/select-batch.component.ts @@ -30,7 +30,7 @@ import { ConfirmationService } from '../../../../core/services/confirmation.serv import { Z_MODAL_DATA, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { NullDefaultValueDirective } from '../../../../core/directives/null-default-value.directive'; import { StringValidatorDirective } from '../../../../core/directives/stringValidator.directive'; import { NgFor, NgIf } from '@angular/common'; @@ -85,7 +85,7 @@ export class SelectBatchComponent implements OnInit, DoCheck { public http_service: LanguageService, public mdDialogRef: ZardDialogRef, ) {} - dataSource = new MatTableDataSource(); + dataSource = new TableDataSource(); title!: string; ngOnInit() { diff --git a/src/app/app-modules/inventory/medicine-dispense/system-medicine-dispense/show-batch-item/show-batch-item.component.ts b/src/app/app-modules/inventory/medicine-dispense/system-medicine-dispense/show-batch-item/show-batch-item.component.ts index 76ecb8b..06295a1 100644 --- a/src/app/app-modules/inventory/medicine-dispense/system-medicine-dispense/show-batch-item/show-batch-item.component.ts +++ b/src/app/app-modules/inventory/medicine-dispense/system-medicine-dispense/show-batch-item/show-batch-item.component.ts @@ -24,7 +24,7 @@ import { InventoryService } from './../../../shared/service/inventory.service'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; import { Z_MODAL_DATA, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { NgFor, NgIf, DatePipe } from '@angular/common'; import { NgIcon, provideIcons } from '@ng-icons/core'; @@ -57,7 +57,7 @@ export class ShowBatchItemComponent implements OnInit, DoCheck { public mdDialogRef: ZardDialogRef, readonly sessionstorage: SessionStorageService, ) {} - issuedBatchList = new MatTableDataSource(); + issuedBatchList = new TableDataSource(); beneficaryDetail: any; ngOnInit() { this.app = this.getApp(); diff --git a/src/app/app-modules/inventory/medicine-dispense/system-medicine-dispense/system-medicine-dispense.component.ts b/src/app/app-modules/inventory/medicine-dispense/system-medicine-dispense/system-medicine-dispense.component.ts index 6838e63..3d61af3 100644 --- a/src/app/app-modules/inventory/medicine-dispense/system-medicine-dispense/system-medicine-dispense.component.ts +++ b/src/app/app-modules/inventory/medicine-dispense/system-medicine-dispense/system-medicine-dispense.component.ts @@ -43,7 +43,7 @@ import { Router } from '@angular/router'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; import { ZardDialogService, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { StringValidatorDirective } from '../../../core/directives/stringValidator.directive'; import { ItemDispenseDirective } from '../../../core/directives/item-dispense.directive'; import { NgFor, NgIf } from '@angular/common'; @@ -103,7 +103,7 @@ export class SystemMedicineDispenseComponent implements OnInit, DoCheck { private dialog: ZardDialogService, private fb: FormBuilder, ) {} - dataSource = new MatTableDataSource(); + dataSource = new TableDataSource(); ngOnInit() { this.systemDispenseForm = this.fb.group({ diff --git a/src/app/app-modules/inventory/medicine-dispense/view-medicine-dispense/view-medicine-dispense-details/view-medicine-dispense-details.component.ts b/src/app/app-modules/inventory/medicine-dispense/view-medicine-dispense/view-medicine-dispense-details/view-medicine-dispense-details.component.ts index 750948c..4f1f28c 100644 --- a/src/app/app-modules/inventory/medicine-dispense/view-medicine-dispense/view-medicine-dispense-details/view-medicine-dispense-details.component.ts +++ b/src/app/app-modules/inventory/medicine-dispense/view-medicine-dispense/view-medicine-dispense-details/view-medicine-dispense-details.component.ts @@ -28,8 +28,7 @@ import { ViewChild, } from '@angular/core'; import { Z_MODAL_DATA, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; -import { MatPaginator } from '@angular/material/paginator'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import * as moment from 'moment'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; @@ -71,10 +70,10 @@ export class ViewMedicineDispenseDetailsComponent blankTable = [1, 2, 3, 4, 5]; languageComponent!: SetLanguageComponent; currentLanguageSet: any; - medicineDetailList = new MatTableDataSource(); - _filteredDetailedList = new MatTableDataSource(); - dataSource = new MatTableDataSource(); - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + medicineDetailList = new TableDataSource(); + _filteredDetailedList = new TableDataSource(); + dataSource = new TableDataSource(); + paginator: unknown = null; displayedColumns: string[] = [ 'patientName', 'issueType', @@ -103,7 +102,7 @@ export class ViewMedicineDispenseDetailsComponent if (data && data.dispenseItem && data.dispense) { this._detailedList = data.dispenseItem; this._filteredDetailedList.data.push(this._detailedList); - this.dataSource = new MatTableDataSource( + this.dataSource = new TableDataSource( this._filteredDetailedList.data[0].data, ); this.medicineDetailList.data.push(data.dispense); @@ -114,7 +113,7 @@ export class ViewMedicineDispenseDetailsComponent console.log(filterTerm); if (!filterTerm) { this._filteredDetailedList.data = this._detailedList.data; - this.dataSource = new MatTableDataSource( + this.dataSource = new TableDataSource( this._filteredDetailedList.data, ); } else { @@ -125,7 +124,7 @@ export class ViewMedicineDispenseDetailsComponent const value: string = '' + item[key]; if (value.toLowerCase().indexOf(filterTerm.toLowerCase()) >= 0) { this._filteredDetailedList.data.push(item); - this.dataSource = new MatTableDataSource( + this.dataSource = new TableDataSource( this._filteredDetailedList.data, ); break; diff --git a/src/app/app-modules/inventory/medicine-dispense/view-medicine-dispense/view-medicine-dispense.component.ts b/src/app/app-modules/inventory/medicine-dispense/view-medicine-dispense/view-medicine-dispense.component.ts index 049c610..9bac29b 100644 --- a/src/app/app-modules/inventory/medicine-dispense/view-medicine-dispense/view-medicine-dispense.component.ts +++ b/src/app/app-modules/inventory/medicine-dispense/view-medicine-dispense/view-medicine-dispense.component.ts @@ -28,8 +28,7 @@ import { Router } from '@angular/router'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { ZardDialogService, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { FormsModule } from '@angular/forms'; import { ISTDatePipe } from '../../../core/pipes/ist-date.pipe'; @@ -72,13 +71,13 @@ export class ViewMedicineDispenseComponent implements OnInit, DoCheck { _dateRangePrevious: Date[] = []; _dispenseList: any = []; - _filteredDispenseList = new MatTableDataSource(); + _filteredDispenseList = new TableDataSource(); blankTable = [1, 2, 3, 4, 5]; filterTerm: any; searched = false; languageComponent!: SetLanguageComponent; currentLanguageSet: any; - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + paginator: unknown = null; constructor( private location: Location, @@ -161,7 +160,7 @@ export class ViewMedicineDispenseComponent implements OnInit, DoCheck { filterConsumptionList(searchTerm: string) { if (!searchTerm) { this._filteredDispenseList.data = this._dispenseList; - this._filteredDispenseList = new MatTableDataSource( + this._filteredDispenseList = new TableDataSource( this._filteredDispenseList.data, ); this._filteredDispenseList.paginator = this.paginator; @@ -179,7 +178,7 @@ export class ViewMedicineDispenseComponent implements OnInit, DoCheck { const value: string = '' + item[key]; if (value.toLowerCase().indexOf(searchTerm.toLowerCase()) >= 0) { this._filteredDispenseList.data.push(item); - this._filteredDispenseList = new MatTableDataSource( + this._filteredDispenseList = new TableDataSource( this._filteredDispenseList.data, ); this._filteredDispenseList.paginator = this.paginator; diff --git a/src/app/app-modules/inventory/patient-return/benificiary-details/benificiary-details.component.ts b/src/app/app-modules/inventory/patient-return/benificiary-details/benificiary-details.component.ts index abaa5f8..bb4e179 100644 --- a/src/app/app-modules/inventory/patient-return/benificiary-details/benificiary-details.component.ts +++ b/src/app/app-modules/inventory/patient-return/benificiary-details/benificiary-details.component.ts @@ -31,8 +31,7 @@ import { InventoryService } from './../../../inventory/shared/service/inventory. import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; import { Z_MODAL_DATA, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { NgIf, NgFor } from '@angular/common'; import { NgIcon, provideIcons } from '@ng-icons/core'; import { lucideX } from '@ng-icons/lucide'; @@ -58,8 +57,8 @@ import { tooltipImports } from 'Common-UI/v2/ui/tooltip'; export class BenificiaryDetailsComponent implements OnInit, DoCheck, AfterViewInit { - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; - beneficiaryDetailsList = new MatTableDataSource(); + paginator: unknown = null; + beneficiaryDetailsList = new TableDataSource(); // beneficiaryDetailsList: any = []; languageComponent!: SetLanguageComponent; currentLanguageSet: any; diff --git a/src/app/app-modules/inventory/patient-return/item-batch-details-for-patient-return/item-batch-details-for-patient-return.component.ts b/src/app/app-modules/inventory/patient-return/item-batch-details-for-patient-return/item-batch-details-for-patient-return.component.ts index d59f11f..98e3871 100644 --- a/src/app/app-modules/inventory/patient-return/item-batch-details-for-patient-return/item-batch-details-for-patient-return.component.ts +++ b/src/app/app-modules/inventory/patient-return/item-batch-details-for-patient-return/item-batch-details-for-patient-return.component.ts @@ -45,8 +45,7 @@ import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-la import { ZardDialogService, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; import { PatientReturnBatchDetailsComponent } from '../patient-return-batch-details/patient-return-batch-details.component'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { NgFor, NgIf } from '@angular/common'; import { NgIcon, provideIcons } from '@ng-icons/core'; @@ -87,17 +86,17 @@ export class ItemBatchDetailsForPatientReturnComponent resetBenDetails: EventEmitter = new EventEmitter(); itemReturnForm!: FormGroup; - batchList = new MatTableDataSource(); + batchList = new TableDataSource(); selectedItemList: any = []; filterItemList: any = []; - selectedBatchList = new MatTableDataSource(); + selectedBatchList = new TableDataSource(); patientReturnList: any = []; searched = false; languageComponent!: SetLanguageComponent; currentLanguageSet: any; hide = false; - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + paginator: unknown = null; displayedColumns: string[] = [ 'sNo', 'itemName', diff --git a/src/app/app-modules/inventory/patient-return/patient-return-batch-details/patient-return-batch-details.component.ts b/src/app/app-modules/inventory/patient-return/patient-return-batch-details/patient-return-batch-details.component.ts index 9e06c90..0701c14 100644 --- a/src/app/app-modules/inventory/patient-return/patient-return-batch-details/patient-return-batch-details.component.ts +++ b/src/app/app-modules/inventory/patient-return/patient-return-batch-details/patient-return-batch-details.component.ts @@ -33,7 +33,7 @@ import { ConfirmationService } from './../../../core/services/confirmation.servi import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { Z_MODAL_DATA, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { NgFor, NgIf, DatePipe } from '@angular/common'; import { NgIcon, provideIcons } from '@ng-icons/core'; import { lucidePlus, lucideTrash2, lucideX } from '@ng-icons/lucide'; @@ -77,7 +77,7 @@ export class PatientReturnBatchDetailsComponent implements OnInit, DoCheck { title!: string; languageComponent!: SetLanguageComponent; currentLanguageSet: any; - dataSource = new MatTableDataSource(); + dataSource = new TableDataSource(); constructor( public dialogRef: ZardDialogRef, diff --git a/src/app/app-modules/inventory/patient-return/patient-return-previous-record/patient-return-previous-record.component.ts b/src/app/app-modules/inventory/patient-return/patient-return-previous-record/patient-return-previous-record.component.ts index 2e4d2ca..251596a 100644 --- a/src/app/app-modules/inventory/patient-return/patient-return-previous-record/patient-return-previous-record.component.ts +++ b/src/app/app-modules/inventory/patient-return/patient-return-previous-record/patient-return-previous-record.component.ts @@ -27,7 +27,7 @@ import { Location, NgIf } from '@angular/common'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { ZardDialogService } from 'Common-UI/v2/ui/dialog'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { FormsModule } from '@angular/forms'; import { NgFor } from '@angular/common'; @@ -70,7 +70,7 @@ export class PatientReturnPreviousRecordComponent implements OnInit, DoCheck { patientReturnList: any = []; filterTerm: any; - filteredPatientReturnList = new MatTableDataSource(); + filteredPatientReturnList = new TableDataSource(); languageComponent!: SetLanguageComponent; currentLanguageSet: any; diff --git a/src/app/app-modules/inventory/physical-stock-entry/physical-stock-entry.component.ts b/src/app/app-modules/inventory/physical-stock-entry/physical-stock-entry.component.ts index a7c0c81..b545d1b 100644 --- a/src/app/app-modules/inventory/physical-stock-entry/physical-stock-entry.component.ts +++ b/src/app/app-modules/inventory/physical-stock-entry/physical-stock-entry.component.ts @@ -41,7 +41,7 @@ import { ConfirmationService } from '../../core/services/confirmation.service'; import { animate, style, transition, trigger } from '@angular/animations'; import { SetLanguageComponent } from '../../core/components/set-language.component'; import { LanguageService } from '../../core/services/language.service'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { RouterLink } from '@angular/router'; import { StringValidatorDirective } from '../../core/directives/stringValidator.directive'; @@ -121,7 +121,7 @@ export class PhysicalStockEntryComponent implements OnInit, OnChanges, DoCheck { private fb: FormBuilder, readonly sessionstorage: SessionStorageService, ) {} - dataSource = new MatTableDataSource(); + dataSource = new TableDataSource(); ngOnInit() { this.otherDetails = { diff --git a/src/app/app-modules/inventory/physical-stock-entry/view-physical-stock/view-physical-stock-details/view-physical-stock-details.component.ts b/src/app/app-modules/inventory/physical-stock-entry/view-physical-stock/view-physical-stock-details/view-physical-stock-details.component.ts index 853bdbd..b8f0416 100644 --- a/src/app/app-modules/inventory/physical-stock-entry/view-physical-stock/view-physical-stock-details/view-physical-stock-details.component.ts +++ b/src/app/app-modules/inventory/physical-stock-entry/view-physical-stock/view-physical-stock-details/view-physical-stock-details.component.ts @@ -29,9 +29,8 @@ import { AfterViewInit, } from '@angular/core'; import { Z_MODAL_DATA, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; -import { MatPaginator } from '@angular/material/paginator'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; import { FormsModule } from '@angular/forms'; @@ -67,12 +66,12 @@ export class ViewPhysicalStockDetailsComponent { _filterTerm = ''; _detailedList: any = []; - _filteredDetailedList = new MatTableDataSource(); - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + _filteredDetailedList = new TableDataSource(); + paginator: unknown = null; // blankTable = [1, 2, 3, 4, 5]; languageComponent!: SetLanguageComponent; currentLanguageSet: any; - dataSourceList = new MatTableDataSource(); + dataSourceList = new TableDataSource(); constructor( private http_service: LanguageService, diff --git a/src/app/app-modules/inventory/physical-stock-entry/view-physical-stock/view-physical-stock.component.ts b/src/app/app-modules/inventory/physical-stock-entry/view-physical-stock/view-physical-stock.component.ts index 85fa3fd..c4c1855 100644 --- a/src/app/app-modules/inventory/physical-stock-entry/view-physical-stock/view-physical-stock.component.ts +++ b/src/app/app-modules/inventory/physical-stock-entry/view-physical-stock/view-physical-stock.component.ts @@ -29,8 +29,7 @@ import { Router } from '@angular/router'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; import { ZardDialogService, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { FormsModule } from '@angular/forms'; import { ISTDatePipe } from '../../../core/pipes/ist-date.pipe'; @@ -73,14 +72,14 @@ export class ViewPhysicalStockComponent implements OnInit, DoCheck { _dateRangePrevious: Date[] = []; _stockEntryList: any = []; - _filteredStockEntryList = new MatTableDataSource(); + _filteredStockEntryList = new TableDataSource(); blankTable = [1, 2, 3, 4, 5]; filterTerm: any; searched = false; languageComponent!: SetLanguageComponent; currentLanguageSet: any; - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + paginator: unknown = null; displayedColumns: string[] = [ 'entryID', 'refNo', diff --git a/src/app/app-modules/inventory/store-self-consumption/store-self-consumption.component.ts b/src/app/app-modules/inventory/store-self-consumption/store-self-consumption.component.ts index 2886c34..de67cb5 100644 --- a/src/app/app-modules/inventory/store-self-consumption/store-self-consumption.component.ts +++ b/src/app/app-modules/inventory/store-self-consumption/store-self-consumption.component.ts @@ -34,7 +34,7 @@ import { } from '@angular/forms'; import { LanguageService } from '../../core/services/language.service'; import { SetLanguageComponent } from '../../core/components/set-language.component'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { Subscription } from 'rxjs'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { StringValidatorDirective } from '../../core/directives/stringValidator.directive'; @@ -113,7 +113,7 @@ export class StoreSelfConsumptionComponent implements OnInit, DoCheck { this.loadStockConsumptionData(); }); } - dataSource = new MatTableDataSource(); + dataSource = new TableDataSource(); ngOnInit() { this.createdBy = this.sessionstorage.getItem('username'); diff --git a/src/app/app-modules/inventory/store-self-consumption/view-store-self-consumption/view-store-self-consumption-details/view-store-self-consumption-details.component.ts b/src/app/app-modules/inventory/store-self-consumption/view-store-self-consumption/view-store-self-consumption-details/view-store-self-consumption-details.component.ts index dd7aa06..6479e1c 100644 --- a/src/app/app-modules/inventory/store-self-consumption/view-store-self-consumption/view-store-self-consumption-details/view-store-self-consumption-details.component.ts +++ b/src/app/app-modules/inventory/store-self-consumption/view-store-self-consumption/view-store-self-consumption-details/view-store-self-consumption-details.component.ts @@ -29,8 +29,7 @@ import { AfterViewInit, } from '@angular/core'; import { Z_MODAL_DATA, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; -import { MatPaginator } from '@angular/material/paginator'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; import { FormsModule } from '@angular/forms'; @@ -66,13 +65,13 @@ export class ViewStoreSelfConsumptionDetailsComponent { _filterTerm = ''; _detailedList: any = []; - _filteredDetailedList = new MatTableDataSource(); - _dataStoreSelfList = new MatTableDataSource(); - dataSource = new MatTableDataSource(); + _filteredDetailedList = new TableDataSource(); + _dataStoreSelfList = new TableDataSource(); + dataSource = new TableDataSource(); // blankTable = [1, 2, 3, 4, 5]; languageComponent!: SetLanguageComponent; currentLanguageSet: any; - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + paginator: unknown = null; displayedColumns: string[] = [ 'consumptionID', 'refNo', @@ -117,7 +116,7 @@ export class ViewStoreSelfConsumptionDetailsComponent ' this._filteredDetailedList.data2', this._filteredDetailedList.data[0].data, ); - this.dataSource = new MatTableDataSource( + this.dataSource = new TableDataSource( this._filteredDetailedList.data[0].data, ); this.dataSource.paginator = this.paginator; @@ -129,7 +128,7 @@ export class ViewStoreSelfConsumptionDetailsComponent console.log(filterTerm); if (!filterTerm) { this._filteredDetailedList.data = this._detailedList.data; - this.dataSource = new MatTableDataSource( + this.dataSource = new TableDataSource( this._filteredDetailedList.data, ); this.dataSource.paginator = this.paginator; @@ -141,7 +140,7 @@ export class ViewStoreSelfConsumptionDetailsComponent const value: string = '' + item[key]; if (value.toLowerCase().indexOf(filterTerm.toLowerCase()) >= 0) { this._filteredDetailedList.data.push(item); - this.dataSource = new MatTableDataSource( + this.dataSource = new TableDataSource( this._filteredDetailedList.data, ); this.dataSource.paginator = this.paginator; diff --git a/src/app/app-modules/inventory/store-self-consumption/view-store-self-consumption/view-store-self-consumption.component.ts b/src/app/app-modules/inventory/store-self-consumption/view-store-self-consumption/view-store-self-consumption.component.ts index d7e3650..502765f 100644 --- a/src/app/app-modules/inventory/store-self-consumption/view-store-self-consumption/view-store-self-consumption.component.ts +++ b/src/app/app-modules/inventory/store-self-consumption/view-store-self-consumption/view-store-self-consumption.component.ts @@ -29,8 +29,7 @@ import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-la import { LanguageService } from 'src/app/app-modules/core/services/language.service'; import { ZardDialogService, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; import { ViewStoreSelfConsumptionDetailsComponent } from './view-store-self-consumption-details/view-store-self-consumption-details.component'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { FormsModule } from '@angular/forms'; import { ISTDatePipe } from '../../../core/pipes/ist-date.pipe'; @@ -73,13 +72,13 @@ export class ViewStoreSelfConsumptionComponent implements OnInit, DoCheck { _dateRangePrevious: Date[] = []; _consumptionList: any = []; - _filteredConsumptionList = new MatTableDataSource(); + _filteredConsumptionList = new TableDataSource(); blankTable = [1, 2, 3, 4, 5]; filterTerm: any; searched = false; currentLanguageSet: any; languageComponent!: SetLanguageComponent; - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + paginator: unknown = null; displayedColumns: string[] = [ 'consumptionID', 'refNo', diff --git a/src/app/app-modules/inventory/store-stock-adjustment/store-stock-adjustment.component.ts b/src/app/app-modules/inventory/store-stock-adjustment/store-stock-adjustment.component.ts index 6004773..206d7a6 100644 --- a/src/app/app-modules/inventory/store-stock-adjustment/store-stock-adjustment.component.ts +++ b/src/app/app-modules/inventory/store-stock-adjustment/store-stock-adjustment.component.ts @@ -35,7 +35,7 @@ import { SetLanguageComponent } from '../../core/components/set-language.compone import { LanguageService } from '../../core/services/language.service'; import { ConfirmationService } from '../../core/services/confirmation.service'; import { InventoryService } from '../shared/service/inventory.service'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { Subscription } from 'rxjs'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { StringValidatorDirective } from '../../core/directives/stringValidator.directive'; @@ -119,7 +119,7 @@ export class StoreStockAdjustmentComponent this.loadStockAdjData(); }); } - dataSource = new MatTableDataSource(); + dataSource = new TableDataSource(); ngOnInit() { this.storeStockAdjustmentForm = this.fb.group({ diff --git a/src/app/app-modules/inventory/store-stock-adjustment/view-stock-adjustment-details/view-stock-adjustment-details.component.ts b/src/app/app-modules/inventory/store-stock-adjustment/view-stock-adjustment-details/view-stock-adjustment-details.component.ts index dd35e66..806d30a 100644 --- a/src/app/app-modules/inventory/store-stock-adjustment/view-stock-adjustment-details/view-stock-adjustment-details.component.ts +++ b/src/app/app-modules/inventory/store-stock-adjustment/view-stock-adjustment-details/view-stock-adjustment-details.component.ts @@ -24,8 +24,7 @@ import { Z_MODAL_DATA, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; import { InventoryService } from '../../shared/service/inventory.service'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { NgFor, NgIf } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { ISTDatePipe } from '../../../core/pipes/ist-date.pipe'; @@ -59,13 +58,13 @@ export class ViewStockAdjustmentDetailsComponent implements OnInit, DoCheck { stock: any; adjustmentList: any = []; - filteredAdjustmentList = new MatTableDataSource(); + filteredAdjustmentList = new TableDataSource(); languageComponent!: SetLanguageComponent; currentLanguageSet: any; - stockAdjustmentList = new MatTableDataSource(); - dataSource = new MatTableDataSource(); - dataSource2 = new MatTableDataSource(); - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + stockAdjustmentList = new TableDataSource(); + dataSource = new TableDataSource(); + dataSource2 = new TableDataSource(); + paginator: unknown = null; displayedColumns: string[] = [ 'stockAdjustmentID', 'refNo', @@ -112,12 +111,12 @@ export class ViewStockAdjustmentDetailsComponent implements OnInit, DoCheck { 'this.stockAdjustmentList.data', this.stockAdjustmentList.data, ); - this.dataSource = new MatTableDataSource( + this.dataSource = new TableDataSource( this.stockAdjustmentList.data, ); this.adjustmentList.push(response.data.stockAdjustmentItemDraftEdit); this.filteredAdjustmentList.data.push(this.stock); - this.dataSource2 = new MatTableDataSource( + this.dataSource2 = new TableDataSource( this.filteredAdjustmentList.data[0].data.stockAdjustmentItemDraftEdit, ); this.dataSource2.paginator = this.paginator; @@ -128,7 +127,7 @@ export class ViewStockAdjustmentDetailsComponent implements OnInit, DoCheck { if (!filterTerm) { this.filteredAdjustmentList.data = this.adjustmentList; console.log('CC', this.filteredAdjustmentList.data); - this.dataSource2 = new MatTableDataSource( + this.dataSource2 = new TableDataSource( this.filteredAdjustmentList.data[0], ); this.dataSource2.paginator = this.paginator; @@ -163,7 +162,7 @@ export class ViewStockAdjustmentDetailsComponent implements OnInit, DoCheck { if (value.toLowerCase().indexOf(filterTerm.toLowerCase()) >= 0) { this.filteredAdjustmentList.data.push(item); console.log('Real', this.filteredAdjustmentList.data[0]); - this.dataSource2 = new MatTableDataSource( + this.dataSource2 = new TableDataSource( this.filteredAdjustmentList.data, ); this.dataSource2.paginator = this.paginator; diff --git a/src/app/app-modules/inventory/store-stock-adjustment/view-stock-adjustment-draft-details/view-stock-adjustment-draft-details.component.ts b/src/app/app-modules/inventory/store-stock-adjustment/view-stock-adjustment-draft-details/view-stock-adjustment-draft-details.component.ts index f570836..248ebff 100644 --- a/src/app/app-modules/inventory/store-stock-adjustment/view-stock-adjustment-draft-details/view-stock-adjustment-draft-details.component.ts +++ b/src/app/app-modules/inventory/store-stock-adjustment/view-stock-adjustment-draft-details/view-stock-adjustment-draft-details.component.ts @@ -24,8 +24,7 @@ import { Z_MODAL_DATA, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; import { InventoryService } from '../../shared/service/inventory.service'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { NgFor, NgIf } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { ISTDatePipe } from '../../../core/pipes/ist-date.pipe'; @@ -59,13 +58,13 @@ export class ViewStockAdjustmentDraftDetailsComponent stock: any; adjustmentList: any = []; - filteredAdjustmentList = new MatTableDataSource(); + filteredAdjustmentList = new TableDataSource(); currentLanguageSet: any; languageComponent!: SetLanguageComponent; - stockAdjustmentDraftList = new MatTableDataSource(); - dataSource = new MatTableDataSource(); - newDataSource = new MatTableDataSource(); - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + stockAdjustmentDraftList = new TableDataSource(); + dataSource = new TableDataSource(); + newDataSource = new TableDataSource(); + paginator: unknown = null; displayedColumns: string[] = [ 'stockAdjustmentDraftID', 'refNo', @@ -108,12 +107,12 @@ export class ViewStockAdjustmentDraftDetailsComponent ' this.stockAdjustmentDraftList.data', this.stockAdjustmentDraftList.data, ); - this.dataSource = new MatTableDataSource( + this.dataSource = new TableDataSource( this.stockAdjustmentDraftList.data, ); this.adjustmentList.push(response.stockAdjustmentItemDraftEdit); this.filteredAdjustmentList.data.push(this.stock); - this.newDataSource = new MatTableDataSource( + this.newDataSource = new TableDataSource( this.filteredAdjustmentList.data[0].data.stockAdjustmentItemDraftEdit, ); this.newDataSource.paginator = this.paginator; @@ -123,7 +122,7 @@ export class ViewStockAdjustmentDraftDetailsComponent filterDetails(filterTerm: any) { if (!filterTerm) { this.filteredAdjustmentList.data = this.adjustmentList; - this.newDataSource = new MatTableDataSource( + this.newDataSource = new TableDataSource( this.filteredAdjustmentList.data[0], ); this.newDataSource.paginator = this.paginator; @@ -152,7 +151,7 @@ export class ViewStockAdjustmentDraftDetailsComponent !item[key] ) { this.filteredAdjustmentList.data.push(item); - this.newDataSource = new MatTableDataSource( + this.newDataSource = new TableDataSource( this.filteredAdjustmentList.data, ); this.newDataSource.paginator = this.paginator; diff --git a/src/app/app-modules/inventory/store-stock-adjustment/view-store-stock-adjustment-draft/view-store-stock-adjustment-draft.component.ts b/src/app/app-modules/inventory/store-stock-adjustment/view-store-stock-adjustment-draft/view-store-stock-adjustment-draft.component.ts index f9ee805..d2fe557 100644 --- a/src/app/app-modules/inventory/store-stock-adjustment/view-store-stock-adjustment-draft/view-store-stock-adjustment-draft.component.ts +++ b/src/app/app-modules/inventory/store-stock-adjustment/view-store-stock-adjustment-draft/view-store-stock-adjustment-draft.component.ts @@ -29,8 +29,7 @@ import { LanguageService } from 'src/app/app-modules/core/services/language.serv import { DataStorageService } from '../../shared/service/data-storage.service'; import { InventoryService } from '../../shared/service/inventory.service'; import { ViewStockAdjustmentDraftDetailsComponent } from '../view-stock-adjustment-draft-details/view-stock-adjustment-draft-details.component'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { FormsModule } from '@angular/forms'; import { ISTDatePipe } from '../../../core/pipes/ist-date.pipe'; @@ -72,11 +71,11 @@ export class ViewStoreStockAdjustmentDraftComponent implements OnInit, DoCheck { stockAdjustmentList: any = []; filterTerm: any; - filteredStockAdjustmentList = new MatTableDataSource(); + filteredStockAdjustmentList = new TableDataSource(); languageComponent!: SetLanguageComponent; currentLanguageSet: any; - // dataSource = new MatTableDataSource(); - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + // dataSource = new TableDataSource(); + paginator: unknown = null; displayedColumns: string[] = [ 'draftID', 'refNo', @@ -151,7 +150,7 @@ export class ViewStoreStockAdjustmentDraftComponent implements OnInit, DoCheck { filterStockAdjustmentList(filterTerm: any) { if (!filterTerm) { this.filteredStockAdjustmentList.data = this.stockAdjustmentList.data; - this.filteredStockAdjustmentList = new MatTableDataSource( + this.filteredStockAdjustmentList = new TableDataSource( this.filteredStockAdjustmentList.data, ); this.filteredStockAdjustmentList.paginator = this.paginator; @@ -168,7 +167,7 @@ export class ViewStoreStockAdjustmentDraftComponent implements OnInit, DoCheck { const value: string = '' + item[key]; if (value.toLowerCase().indexOf(filterTerm.toLowerCase()) >= 0) { this.filteredStockAdjustmentList.data.push(item); - this.filteredStockAdjustmentList = new MatTableDataSource( + this.filteredStockAdjustmentList = new TableDataSource( this.filteredStockAdjustmentList.data, ); this.filteredStockAdjustmentList.paginator = this.paginator; diff --git a/src/app/app-modules/inventory/store-stock-adjustment/view-store-stock-adjustment/view-store-stock-adjustment.component.ts b/src/app/app-modules/inventory/store-stock-adjustment/view-store-stock-adjustment/view-store-stock-adjustment.component.ts index 5c3fcc8..49ff9ae 100644 --- a/src/app/app-modules/inventory/store-stock-adjustment/view-store-stock-adjustment/view-store-stock-adjustment.component.ts +++ b/src/app/app-modules/inventory/store-stock-adjustment/view-store-stock-adjustment/view-store-stock-adjustment.component.ts @@ -29,8 +29,7 @@ import { LanguageService } from 'src/app/app-modules/core/services/language.serv import { DataStorageService } from '../../shared/service/data-storage.service'; import { ViewStockAdjustmentDetailsComponent } from '../view-stock-adjustment-details/view-stock-adjustment-details.component'; import { InventoryService } from '../../shared/service/inventory.service'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { FormsModule } from '@angular/forms'; import { ISTDatePipe } from '../../../core/pipes/ist-date.pipe'; @@ -73,11 +72,11 @@ export class ViewStoreStockAdjustmentComponent implements OnInit, DoCheck { ResponseWar: any = []; _minDate: any; filterTerm: any; - filteredStockAdjustmentList = new MatTableDataSource(); - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + filteredStockAdjustmentList = new TableDataSource(); + paginator: unknown = null; currentLanguageSet: any; languageComponent!: SetLanguageComponent; - dataSource = new MatTableDataSource(); + dataSource = new TableDataSource(); displayedColumns: string[] = [ 'stockAdjustmentID', 'refNo', @@ -137,7 +136,7 @@ export class ViewStoreStockAdjustmentComponent implements OnInit, DoCheck { this.stockAdjustmentList = response; this.ResponseWar = response; this.filteredStockAdjustmentList.data.push(response); - this.dataSource = new MatTableDataSource( + this.dataSource = new TableDataSource( this.filteredStockAdjustmentList.data[0].data, ); console.log('dataSourcePart2', this.dataSource.data); @@ -156,7 +155,7 @@ export class ViewStoreStockAdjustmentComponent implements OnInit, DoCheck { ); this.filteredStockAdjustmentList.data.push(this.stockAdjustmentList); const len = this.filteredStockAdjustmentList.data.length; - this.dataSource = new MatTableDataSource( + this.dataSource = new TableDataSource( this.filteredStockAdjustmentList.data[len - 1].data, ); this.dataSource.paginator = this.paginator; @@ -174,7 +173,7 @@ export class ViewStoreStockAdjustmentComponent implements OnInit, DoCheck { const value: string = '' + item[key]; if (value.toLowerCase().indexOf(filterTerm.toLowerCase()) >= 0) { this.filteredStockAdjustmentList.data.push(item); - this.dataSource = new MatTableDataSource( + this.dataSource = new TableDataSource( this.filteredStockAdjustmentList.data, ); this.dataSource.paginator = this.paginator; diff --git a/src/app/app-modules/inventory/store-stock-transfer/store-stock-transfer.component.ts b/src/app/app-modules/inventory/store-stock-transfer/store-stock-transfer.component.ts index 7aea4a8..db189e5 100644 --- a/src/app/app-modules/inventory/store-stock-transfer/store-stock-transfer.component.ts +++ b/src/app/app-modules/inventory/store-stock-transfer/store-stock-transfer.component.ts @@ -36,7 +36,7 @@ import { animate, style, transition, trigger } from '@angular/animations'; import { SetLanguageComponent } from '../../core/components/set-language.component'; import { LanguageService } from '../../core/services/language.service'; import * as moment from 'moment'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { StringValidatorDirective } from '../../core/directives/stringValidator.directive'; import { NgFor, NgIf } from '@angular/common'; @@ -92,7 +92,7 @@ export class StoreStockTransferComponent implements OnInit, DoCheck { filterStore: any = []; languageComponent!: SetLanguageComponent; currentLanguageSet: any; - dataSource!: MatTableDataSource; + dataSource!: TableDataSource; displayedColumns: string[] = [ 'itemName', 'batchID', diff --git a/src/app/app-modules/inventory/store-stock-transfer/view-store-stock-transfer/view-store-stock-transfer-details/view-store-stock-transfer-details.component.ts b/src/app/app-modules/inventory/store-stock-transfer/view-store-stock-transfer/view-store-stock-transfer-details/view-store-stock-transfer-details.component.ts index e41c184..187cf60 100644 --- a/src/app/app-modules/inventory/store-stock-transfer/view-store-stock-transfer/view-store-stock-transfer-details/view-store-stock-transfer-details.component.ts +++ b/src/app/app-modules/inventory/store-stock-transfer/view-store-stock-transfer/view-store-stock-transfer-details/view-store-stock-transfer-details.component.ts @@ -29,8 +29,7 @@ import { AfterViewInit, } from '@angular/core'; import { Z_MODAL_DATA, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; -import { MatPaginator } from '@angular/material/paginator'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; import { FormsModule } from '@angular/forms'; @@ -68,10 +67,10 @@ export class ViewStoreStockTransferDetailsComponent // blankTable = [1, 2, 3, 4, 5]; languageComponent!: SetLanguageComponent; currentLanguageSet: any; - _filteredDetailedList = new MatTableDataSource(); - dataSourceTransferList = new MatTableDataSource(); - dataSource = new MatTableDataSource(); - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + _filteredDetailedList = new TableDataSource(); + dataSourceTransferList = new TableDataSource(); + dataSource = new TableDataSource(); + paginator: unknown = null; constructor( private http_service: LanguageService, @@ -100,7 +99,7 @@ export class ViewStoreStockTransferDetailsComponent this._detailedList = data.entryDetails; console.log(' this._detailedList', this._detailedList); this._filteredDetailedList.data.push(this._detailedList); - this.dataSource = new MatTableDataSource( + this.dataSource = new TableDataSource( this._filteredDetailedList.data[0].data, ); this.dataSource.paginator = this.paginator; @@ -116,7 +115,7 @@ export class ViewStoreStockTransferDetailsComponent ' this._filteredDetailedList ', this._filteredDetailedList.data, ); - this.dataSource = new MatTableDataSource( + this.dataSource = new TableDataSource( this._filteredDetailedList.data, ); this.dataSource.paginator = this.paginator; @@ -128,7 +127,7 @@ export class ViewStoreStockTransferDetailsComponent const value: string = '' + item[key]; if (value.toLowerCase().indexOf(filterTerm.toLowerCase()) >= 0) { this._filteredDetailedList.data.push(item); - this.dataSource = new MatTableDataSource( + this.dataSource = new TableDataSource( this._filteredDetailedList.data, ); this.dataSource.paginator = this.paginator; diff --git a/src/app/app-modules/inventory/store-stock-transfer/view-store-stock-transfer/view-store-stock-transfer.component.ts b/src/app/app-modules/inventory/store-stock-transfer/view-store-stock-transfer/view-store-stock-transfer.component.ts index 4e9f9b3..e8dd4af 100644 --- a/src/app/app-modules/inventory/store-stock-transfer/view-store-stock-transfer/view-store-stock-transfer.component.ts +++ b/src/app/app-modules/inventory/store-stock-transfer/view-store-stock-transfer/view-store-stock-transfer.component.ts @@ -29,8 +29,7 @@ import { Router } from '@angular/router'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; import { ZardDialogService, ZardDialogRef } from 'Common-UI/v2/ui/dialog'; import { LanguageService } from 'src/app/app-modules/core/services/language.service'; -import { MatTableDataSource } from '@angular/material/table'; -import { MatPaginator } from '@angular/material/paginator'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { FormsModule } from '@angular/forms'; import { ISTDatePipe } from '../../../core/pipes/ist-date.pipe'; @@ -73,8 +72,8 @@ export class ViewStoreStockTransferComponent implements OnInit, DoCheck { _dateRangePrevious: Date[] = []; _stockEntryList = []; - _filteredStockEntryList = new MatTableDataSource(); - @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + _filteredStockEntryList = new TableDataSource(); + paginator: unknown = null; blankTable = [1, 2, 3, 4, 5]; filterTerm: any; ourStore: any; diff --git a/src/app/app-modules/rx/rx-item-dispense/rx-item-dispense.component.ts b/src/app/app-modules/rx/rx-item-dispense/rx-item-dispense.component.ts index c7e0b87..5e184f0 100644 --- a/src/app/app-modules/rx/rx-item-dispense/rx-item-dispense.component.ts +++ b/src/app/app-modules/rx/rx-item-dispense/rx-item-dispense.component.ts @@ -41,7 +41,7 @@ import { ConfirmationService } from './../../core/services/confirmation.service' import { LanguageService } from '../../core/services/language.service'; import { SetLanguageComponent } from '../../core/components/set-language.component'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; -import { MatTableDataSource } from '@angular/material/table'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { NgIf, NgFor, NgClass } from '@angular/common'; import { StringValidatorDirective } from '../../core/directives/stringValidator.directive'; import { NumberValidatorDirective } from '../../core/directives/numberValidator.directive'; @@ -83,7 +83,7 @@ export class RxItemDispenseComponent implements OnInit, OnChanges, DoCheck { currentLanguageSet: any; copyprescription: any; languageComponent!: SetLanguageComponent; - dataSourceList = new MatTableDataSource(); + dataSourceList = new TableDataSource(); displayedColumns: string[] = [ 'medicineName', 'form', diff --git a/src/bootstrap.layer.css b/src/bootstrap.layer.css deleted file mode 100644 index 84f003c..0000000 --- a/src/bootstrap.layer.css +++ /dev/null @@ -1,6 +0,0 @@ -/* Loads Bootstrap into the `bootstrap` cascade layer (declared lowest-priority - in src/tailwind.css). Because layer order beats specificity, Tailwind - utilities now override Bootstrap's global element rules on migrated screens, - while un-migrated Bootstrap screens keep working (nothing competes there). - Removed from angular.json's raw styles list so it is no longer unlayered. */ -@import '../node_modules/bootstrap/dist/css/bootstrap.min.css' layer(bootstrap); diff --git a/src/index.html b/src/index.html index 7a94e77..d2b7637 100644 --- a/src/index.html +++ b/src/index.html @@ -19,7 +19,6 @@ - diff --git a/src/styles.css b/src/styles.css index 40927f6..2086136 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1,6 +1,5 @@ /* You can add global styles to this file, and also import other style files */ - /* Lato Font - Local */ @font-face { font-family: "Lato"; @@ -452,16 +451,3 @@ h5 { .mat_green:disabled { background-color: #8e8e8e !important; } - -/* ===== ZardUI coexistence resets (remove once Material is dropped and Tailwind - Preflight is enabled) ===== */ -/* Angular Material's prebuilt theme ships an unlayered `button { border-radius: 0 }` - and Preflight is off, so bare buttons (incl. the z-select trigger) render square - with the native gray background. These unlayered attribute selectors outrank the - bare element rule and restore the theme radius for all Zard controls. */ -[z-button], -z-select [role='combobox'] { - -webkit-appearance: none; - appearance: none; - border-radius: var(--radius); -} diff --git a/src/tailwind.css b/src/tailwind.css index 3b1e49c..2f69466 100644 --- a/src/tailwind.css +++ b/src/tailwind.css @@ -1,4 +1,4 @@ -/* ===== AMRIT Tailwind v4 + ZardUI theme (coexistence mode) ===== +/* ===== AMRIT Tailwind v4 + ZardUI theme ===== Loaded as its own entry in angular.json so it doesn't pull existing app CSS (custom.css/layout.css) through Tailwind's @import bundler. Preflight (Tailwind's global reset) is intentionally NOT imported and there is @@ -11,12 +11,23 @@ so Tailwind utilities win over Bootstrap's global element rules — letting us style migrated screens with utility classes instead of component CSS. Un-migrated screens are unaffected (no Tailwind utilities compete there). */ -@layer bootstrap, theme, components, utilities; -@import 'tailwindcss/theme.css' layer(theme); -@import 'tailwindcss/utilities.css' layer(utilities); +@layer theme, base, components, utilities; +@import "tailwindcss/theme.css" layer(theme); +@import "tailwindcss/preflight.css" layer(base); +@import "tailwindcss/utilities.css" layer(utilities); @plugin 'tailwindcss-animate'; @source '../Common-UI/v2/ui'; +/* Restore a subtle default border color. Tailwind v4 preflight leaves + border-color as currentColor (near-black), so bare `border` utilities + (z-card, z-input, tables) would render a dark border instead of the subtle + shadcn one. shadcn sets this default via `* { border-color: var(--border) }`. */ +@layer base { + * { + border-color: var(--border); + } +} + @custom-variant dark (&:is(.dark *)); :root { From 81f66b7dc985a9970dfa745cb0149b3fdc1a354e Mon Sep 17 00:00:00 2001 From: gkbishnoi07 Date: Mon, 6 Jul 2026 05:52:17 +0000 Subject: [PATCH 2/8] fix(ui): import NgFor in main-store indent worklist; drop unused NgClass The main-store indent order worklist template uses *ngFor but the component never imported NgFor (NG8103) - the table rows silently did not render. Also removes the unused NgClass import flagged by NG8113 in rx-item-dispense. --- .../main-store-indent-order-worklist.component.ts | 3 ++- .../rx/rx-item-dispense/rx-item-dispense.component.ts | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/app-modules/inventory/indent/indent-order-worklist/main-store-indent-order-worklist/main-store-indent-order-worklist.component.ts b/src/app/app-modules/inventory/indent/indent-order-worklist/main-store-indent-order-worklist/main-store-indent-order-worklist.component.ts index 291a4e9..39983ed 100644 --- a/src/app/app-modules/inventory/indent/indent-order-worklist/main-store-indent-order-worklist/main-store-indent-order-worklist.component.ts +++ b/src/app/app-modules/inventory/indent/indent-order-worklist/main-store-indent-order-worklist/main-store-indent-order-worklist.component.ts @@ -30,7 +30,7 @@ import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-la import { LanguageService } from 'src/app/app-modules/core/services/language.service'; import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; -import { NgIf, DatePipe } from '@angular/common'; +import { NgIf, DatePipe, NgFor } from '@angular/common'; import { UtcDatePipe } from '../../../utc-date.pipe'; import { NgIcon, provideIcons } from '@ng-icons/core'; import { lucideEye } from '@ng-icons/lucide'; @@ -45,6 +45,7 @@ import { tooltipImports } from 'Common-UI/v2/ui/tooltip'; templateUrl: './main-store-indent-order-worklist.component.html', viewProviders: [provideIcons({ lucideEye })], imports: [ + NgFor, NgIf, NgIcon, ...cardImports, diff --git a/src/app/app-modules/rx/rx-item-dispense/rx-item-dispense.component.ts b/src/app/app-modules/rx/rx-item-dispense/rx-item-dispense.component.ts index 5e184f0..324b291 100644 --- a/src/app/app-modules/rx/rx-item-dispense/rx-item-dispense.component.ts +++ b/src/app/app-modules/rx/rx-item-dispense/rx-item-dispense.component.ts @@ -42,7 +42,7 @@ import { LanguageService } from '../../core/services/language.service'; import { SetLanguageComponent } from '../../core/components/set-language.component'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; -import { NgIf, NgFor, NgClass } from '@angular/common'; +import { NgIf, NgFor } from '@angular/common'; import { StringValidatorDirective } from '../../core/directives/stringValidator.directive'; import { NumberValidatorDirective } from '../../core/directives/numberValidator.directive'; import { cardImports } from 'Common-UI/v2/ui/card'; @@ -59,7 +59,6 @@ import { ZardAccordionImports } from 'Common-UI/v2/ui/accordion'; ReactiveFormsModule, NgIf, NgFor, - NgClass, StringValidatorDirective, NumberValidatorDirective, ...cardImports, From c665dcf4ed8ff14633c577a06c95a6ce87f620ca Mon Sep 17 00:00:00 2001 From: gkbishnoi07 Date: Mon, 6 Jul 2026 06:10:24 +0000 Subject: [PATCH 3/8] refactor(ui): remove the global footer (parity with MMU-UI) Drop the app-footer component and its usages (login, reset/set-password, facility-selection, service, dashboard, rx-dashboard). Same decision as MMU-UI: no global footer bar in the migrated UI; the Powered by / copyright / online-status strip goes away. --- .../app-footer/app-footer.component.html | 37 ----------- .../app-footer/app-footer.component.spec.ts | 45 -------------- .../app-footer/app-footer.component.ts | 61 ------------------- .../dashboard/dashboard.component.html | 1 - .../dashboard/dashboard.component.ts | 3 +- .../rx-dashboard/rx-dashboard.component.html | 2 - .../rx/rx-dashboard/rx-dashboard.component.ts | 2 - .../facility-selection.component.html | 2 - .../facility-selection.component.ts | 2 - src/app/login/login.component.html | 2 - src/app/login/login.component.ts | 2 - .../reset-password.component.html | 2 - .../reset-password.component.ts | 2 - .../set-password/set-password.component.html | 2 - .../set-password/set-password.component.ts | 2 - src/environments/environment.development.ts | 8 +-- src/service/service.component.html | 2 - src/service/service.component.ts | 2 - 18 files changed, 5 insertions(+), 174 deletions(-) delete mode 100644 src/app/app-modules/core/components/app-footer/app-footer.component.html delete mode 100644 src/app/app-modules/core/components/app-footer/app-footer.component.spec.ts delete mode 100644 src/app/app-modules/core/components/app-footer/app-footer.component.ts diff --git a/src/app/app-modules/core/components/app-footer/app-footer.component.html b/src/app/app-modules/core/components/app-footer/app-footer.component.html deleted file mode 100644 index 946d9cb..0000000 --- a/src/app/app-modules/core/components/app-footer/app-footer.component.html +++ /dev/null @@ -1,37 +0,0 @@ -
- Powered by: WIPRO - {{ currentLanguageSet?.inventory?.poweredbyWIPRO }} - - {{ year }} © PSMRI - {{ year }} © {{ currentLanguageSet?.inventory?.pSMRI }} - - - {{ status ? "Online" : "Offline" }} - - {{ - status - ? currentLanguageSet?.inventory?.online - : currentLanguageSet?.inventory?.offline - }} - -
diff --git a/src/app/app-modules/core/components/app-footer/app-footer.component.spec.ts b/src/app/app-modules/core/components/app-footer/app-footer.component.spec.ts deleted file mode 100644 index acd7a9d..0000000 --- a/src/app/app-modules/core/components/app-footer/app-footer.component.spec.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * AMRIT – Accessible Medical Records via Integrated Technology - * Integrated EHR (Electronic Health Records) Solution - * - * Copyright (C) "Piramal Swasthya Management and Research Institute" - * - * This file is part of AMRIT. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see https://www.gnu.org/licenses/. - */ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { AppFooterComponent } from './app-footer.component'; - -describe('AppFooterComponent', () => { - let component: AppFooterComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [AppFooterComponent], - }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(AppFooterComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - xit('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/app-modules/core/components/app-footer/app-footer.component.ts b/src/app/app-modules/core/components/app-footer/app-footer.component.ts deleted file mode 100644 index a508608..0000000 --- a/src/app/app-modules/core/components/app-footer/app-footer.component.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * AMRIT – Accessible Medical Records via Integrated Technology - * Integrated EHR (Electronic Health Records) Solution - * - * Copyright (C) "Piramal Swasthya Management and Research Institute" - * - * This file is part of AMRIT. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see https://www.gnu.org/licenses/. - */ -import { Component, DoCheck, OnInit } from '@angular/core'; -import { LanguageService } from '../../services/language.service'; -import { SetLanguageComponent } from '../set-language.component'; -import { NgIf } from '@angular/common'; - -@Component({ - selector: 'app-footer', - templateUrl: './app-footer.component.html', - imports: [NgIf], -}) -export class AppFooterComponent implements OnInit, DoCheck { - today!: Date; - year: any; - status!: boolean; - languageComponent!: SetLanguageComponent; - currentLanguageSet: any; - - constructor(public http_service: LanguageService) {} - - ngOnInit() { - this.today = new Date(); - this.year = this.today.getFullYear(); - setInterval(() => { - this.status = navigator.onLine; - }, 1000); - this.fetchLanguageResponse(); - } - - // AV40085804 29/09/2021 Integrating Multilingual Functionality -----Start----- - ngDoCheck() { - this.fetchLanguageResponse(); - } - - fetchLanguageResponse() { - this.languageComponent = new SetLanguageComponent(this.http_service); - this.languageComponent.setLanguage(); - this.currentLanguageSet = this.languageComponent.currentLanguageObject; - } - // -----End------ -} diff --git a/src/app/app-modules/inventory/dashboard/dashboard.component.html b/src/app/app-modules/inventory/dashboard/dashboard.component.html index 31b120d..bfa3199 100644 --- a/src/app/app-modules/inventory/dashboard/dashboard.component.html +++ b/src/app/app-modules/inventory/dashboard/dashboard.component.html @@ -2,4 +2,3 @@
- diff --git a/src/app/app-modules/inventory/dashboard/dashboard.component.ts b/src/app/app-modules/inventory/dashboard/dashboard.component.ts index deb41a6..e0d13e3 100644 --- a/src/app/app-modules/inventory/dashboard/dashboard.component.ts +++ b/src/app/app-modules/inventory/dashboard/dashboard.component.ts @@ -22,12 +22,11 @@ import { Component, OnInit } from '@angular/core'; import { AppHeaderComponent } from '../../core/components/app-header/app-header.component'; import { RouterOutlet } from '@angular/router'; -import { AppFooterComponent } from '../../core/components/app-footer/app-footer.component'; @Component({ selector: 'app-dashboard', templateUrl: './dashboard.component.html', - imports: [AppHeaderComponent, RouterOutlet, AppFooterComponent], + imports: [AppHeaderComponent, RouterOutlet], }) export class DashboardComponent { constructor() {} diff --git a/src/app/app-modules/rx/rx-dashboard/rx-dashboard.component.html b/src/app/app-modules/rx/rx-dashboard/rx-dashboard.component.html index faf67d0..9aa979a 100644 --- a/src/app/app-modules/rx/rx-dashboard/rx-dashboard.component.html +++ b/src/app/app-modules/rx/rx-dashboard/rx-dashboard.component.html @@ -67,5 +67,3 @@ > - - diff --git a/src/app/app-modules/rx/rx-dashboard/rx-dashboard.component.ts b/src/app/app-modules/rx/rx-dashboard/rx-dashboard.component.ts index 91bb751..68adbeb 100644 --- a/src/app/app-modules/rx/rx-dashboard/rx-dashboard.component.ts +++ b/src/app/app-modules/rx/rx-dashboard/rx-dashboard.component.ts @@ -32,7 +32,6 @@ import { BeneficiaryDetailsComponent } from '../../core/components/beneficiary-d import { FormsModule } from '@angular/forms'; import { NgIf } from '@angular/common'; import { RxItemDispenseComponent } from '../rx-item-dispense/rx-item-dispense.component'; -import { AppFooterComponent } from '../../core/components/app-footer/app-footer.component'; import { NgIcon, provideIcons } from '@ng-icons/core'; import { lucideSquareUser } from '@ng-icons/lucide'; import { ZardButtonComponent } from 'Common-UI/v2/ui/button'; @@ -55,7 +54,6 @@ import { ZardSheetComponent } from 'Common-UI/v2/ui/sheet'; ZardRadioGroupComponent, ZardSheetComponent, RxItemDispenseComponent, - AppFooterComponent, ], }) export class RxDashboardComponent implements OnInit, DoCheck { diff --git a/src/app/facility-selection/facility-selection.component.html b/src/app/facility-selection/facility-selection.component.html index 001fd21..73bd7e8 100644 --- a/src/app/facility-selection/facility-selection.component.html +++ b/src/app/facility-selection/facility-selection.component.html @@ -139,5 +139,3 @@ - - diff --git a/src/app/facility-selection/facility-selection.component.ts b/src/app/facility-selection/facility-selection.component.ts index 0f94d28..e080960 100644 --- a/src/app/facility-selection/facility-selection.component.ts +++ b/src/app/facility-selection/facility-selection.component.ts @@ -30,7 +30,6 @@ import { LanguageService } from '../app-modules/core/services/language.service'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { AppHeaderComponent } from '../app-modules/core/components/app-header/app-header.component'; import { NgFor, NgIf } from '@angular/common'; -import { AppFooterComponent } from '../app-modules/core/components/app-footer/app-footer.component'; import { ZardButtonComponent } from 'Common-UI/v2/ui/button'; import { ZardFormImports } from 'Common-UI/v2/ui/form'; import { ZardSelectImports } from 'Common-UI/v2/ui/select'; @@ -46,7 +45,6 @@ import { cardImports } from 'Common-UI/v2/ui/card'; ReactiveFormsModule, NgFor, NgIf, - AppFooterComponent, ZardButtonComponent, ZardRadioComponent, ZardRadioGroupComponent, diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html index bbaa9f1..1d2dd97 100644 --- a/src/app/login/login.component.html +++ b/src/app/login/login.component.html @@ -127,5 +127,3 @@ - - diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts index 7d34326..f63ae51 100644 --- a/src/app/login/login.component.ts +++ b/src/app/login/login.component.ts @@ -31,7 +31,6 @@ import { CaptchaComponent } from '../app-modules/core/components/captcha/captcha import { FormsModule } from '@angular/forms'; import { StringValidatorDirective } from '../app-modules/core/directives/stringValidator.directive'; import { NgIf } from '@angular/common'; -import { AppFooterComponent } from '../app-modules/core/components/app-footer/app-footer.component'; import { ZardButtonComponent } from 'Common-UI/v2/ui/button'; import { ZardInputDirective } from 'Common-UI/v2/ui/input'; import { ZardFormImports } from 'Common-UI/v2/ui/form'; @@ -52,7 +51,6 @@ import { NgIf, CaptchaComponent, RouterLink, - AppFooterComponent, ZardButtonComponent, ZardInputDirective, ...ZardFormImports, diff --git a/src/app/reset-password/reset-password.component.html b/src/app/reset-password/reset-password.component.html index 3fe3f16..b125372 100644 --- a/src/app/reset-password/reset-password.component.html +++ b/src/app/reset-password/reset-password.component.html @@ -136,5 +136,3 @@ - - diff --git a/src/app/reset-password/reset-password.component.ts b/src/app/reset-password/reset-password.component.ts index 9d51688..75d837b 100644 --- a/src/app/reset-password/reset-password.component.ts +++ b/src/app/reset-password/reset-password.component.ts @@ -30,7 +30,6 @@ import { FormsModule } from '@angular/forms'; import { NgIcon, provideIcons } from '@ng-icons/core'; import { lucideUser, lucideEye, lucideEyeOff } from '@ng-icons/lucide'; import { StringValidatorDirective } from '../app-modules/core/directives/stringValidator.directive'; -import { AppFooterComponent } from '../app-modules/core/components/app-footer/app-footer.component'; import { ZardButtonComponent } from 'Common-UI/v2/ui/button'; import { ZardInputDirective } from 'Common-UI/v2/ui/input'; import { ZardFormImports } from 'Common-UI/v2/ui/form'; @@ -45,7 +44,6 @@ import { cardImports } from 'Common-UI/v2/ui/card'; FormsModule, StringValidatorDirective, RouterLink, - AppFooterComponent, ZardButtonComponent, ZardInputDirective, ...ZardFormImports, diff --git a/src/app/set-password/set-password.component.html b/src/app/set-password/set-password.component.html index 0839ce7..a792529 100644 --- a/src/app/set-password/set-password.component.html +++ b/src/app/set-password/set-password.component.html @@ -105,5 +105,3 @@ - - diff --git a/src/app/set-password/set-password.component.ts b/src/app/set-password/set-password.component.ts index 1e9ed71..9324e1f 100644 --- a/src/app/set-password/set-password.component.ts +++ b/src/app/set-password/set-password.component.ts @@ -29,7 +29,6 @@ import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-s import { FormsModule } from '@angular/forms'; import { NgIcon, provideIcons } from '@ng-icons/core'; import { lucideLock, lucideEye, lucideEyeOff } from '@ng-icons/lucide'; -import { AppFooterComponent } from '../app-modules/core/components/app-footer/app-footer.component'; import { ZardButtonComponent } from 'Common-UI/v2/ui/button'; import { ZardInputDirective } from 'Common-UI/v2/ui/input'; import { ZardFormImports } from 'Common-UI/v2/ui/form'; @@ -40,7 +39,6 @@ import { cardImports } from 'Common-UI/v2/ui/card'; host: { class: 'block' }, imports: [ FormsModule, - AppFooterComponent, ZardButtonComponent, ZardInputDirective, ...ZardFormImports, diff --git a/src/environments/environment.development.ts b/src/environments/environment.development.ts index 32dc02a..583e0f9 100644 --- a/src/environments/environment.development.ts +++ b/src/environments/environment.development.ts @@ -23,10 +23,10 @@ // The build system defaults to the dev environment which uses `environment.ts`, but if you do // `ng build --env=prod` then `environment.prod.ts` will be used instead. // The list of which env maps to which file can be found in `.angular-cli.json`. -const commonIP = 'https://amritwprdev.piramalswasthya.org/'; -const inventoryIP = 'https://amritwprdev.piramalswasthya.org/'; -const mmuIP = 'https://amritwprdev.piramalswasthya.org/'; -const FHIRIP = 'https://amritwprdev.piramalswasthya.org/'; +const commonIP = '/'; +const inventoryIP = '/'; +const mmuIP = '/'; +const FHIRIP = '/'; // const COMMON_API_OPEN = `http://${IP}:8080/apiman-gateway/IEMR/Common/open/`; // const COMMON_API = `http://${IP}:8080/apiman-gateway/IEMR/Common/1.0/`; // const INVENTORY_API = `http://${IP}:8080/apiman-gateway/IEMR/Inventory/1.0/`; diff --git a/src/service/service.component.html b/src/service/service.component.html index d8ca07d..45db69b 100644 --- a/src/service/service.component.html +++ b/src/service/service.component.html @@ -28,5 +28,3 @@ - - diff --git a/src/service/service.component.ts b/src/service/service.component.ts index b071d99..e61ce88 100644 --- a/src/service/service.component.ts +++ b/src/service/service.component.ts @@ -24,7 +24,6 @@ import { Router } from '@angular/router'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; import { AppHeaderComponent } from '../app/app-modules/core/components/app-header/app-header.component'; import { NgFor } from '@angular/common'; -import { AppFooterComponent } from '../app/app-modules/core/components/app-footer/app-footer.component'; import { ZardButtonComponent } from 'Common-UI/v2/ui/button'; import { cardImports } from 'Common-UI/v2/ui/card'; import { NgIcon, provideIcons } from '@ng-icons/core'; @@ -36,7 +35,6 @@ import { lucideStore } from '@ng-icons/lucide'; imports: [ AppHeaderComponent, NgFor, - AppFooterComponent, ZardButtonComponent, ...cardImports, NgIcon, From ab488d83d47eaf7222cd32cda1acd1cd9c569c5b Mon Sep 17 00:00:00 2001 From: gkbishnoi07 Date: Mon, 6 Jul 2026 11:44:42 +0000 Subject: [PATCH 4/8] fix(ui): register provideZard() and use the colored Swasthya logo in the header provideZard() (Zard's custom event-manager plugins - .outside, {key}, .debounce template event syntax) was never added to main.ts during the Tailwind/Zard setup, so the date-picker's popover close/toggle bindings were dead and the calendar could not open. Same provider MMU-UI registers. The header logo switches from logo.png (white variant designed for the old dark navbar, invisible on the new white header) to the colored Swasthya.png used by the login screen and MMU-UI's header. --- .../core/components/app-header/app-header.component.html | 2 +- src/main.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/app-modules/core/components/app-header/app-header.component.html b/src/app/app-modules/core/components/app-header/app-header.component.html index 3a73d51..97b85fa 100644 --- a/src/app/app-modules/core/components/app-header/app-header.component.html +++ b/src/app/app-modules/core/components/app-header/app-header.component.html @@ -3,7 +3,7 @@ [class.border-b]="!showRoles" > - Logo + Logo
diff --git a/src/main.ts b/src/main.ts index 9ac2c49..1007798 100644 --- a/src/main.ts +++ b/src/main.ts @@ -29,6 +29,7 @@ import { provideHttpClient, withInterceptorsFromDi, } from '@angular/common/http'; +import { provideZard } from 'Common-UI/v2/ui/provider'; import { AppComponent } from './app/app.component'; import { appRoutes } from './app/app.routes'; @@ -64,6 +65,9 @@ bootstrapApplication(AppComponent, { providers: [ importProvidersFrom(BrowserModule, FormsModule, ReactiveFormsModule), provideRouter(appRoutes, withHashLocation()), + // Zard custom event-manager plugins ({key} multi-key, .outside, .debounce + // template event syntax used by the Zard components). + provideZard(), provideHttpClient(withInterceptorsFromDi()), AuthenticationService, LanguageService, From 556ca02ae116bfb7ff75aef695848322d43bc3c9 Mon Sep 17 00:00:00 2001 From: gkbishnoi07 Date: Mon, 6 Jul 2026 11:48:51 +0000 Subject: [PATCH 5/8] feat(ui): match the service-selection tile to MMU-UI (primary tile + logo) Replace the outline icon tile with MMU-UI's exact service tile: a primary (brand blue) z-button with the service image (assets/images/.png) and large label, in a max-w-lg centered card with the same entrance animation. --- src/service/service.component.html | 20 ++++++++++++-------- src/service/service.component.ts | 4 ---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/service/service.component.html b/src/service/service.component.html index 45db69b..23ea576 100644 --- a/src/service/service.component.html +++ b/src/service/service.component.html @@ -1,9 +1,11 @@
- + Select Service Click on a service to proceed @@ -13,16 +15,18 @@
diff --git a/src/service/service.component.ts b/src/service/service.component.ts index e61ce88..087bca9 100644 --- a/src/service/service.component.ts +++ b/src/service/service.component.ts @@ -26,8 +26,6 @@ import { AppHeaderComponent } from '../app/app-modules/core/components/app-heade import { NgFor } from '@angular/common'; import { ZardButtonComponent } from 'Common-UI/v2/ui/button'; import { cardImports } from 'Common-UI/v2/ui/card'; -import { NgIcon, provideIcons } from '@ng-icons/core'; -import { lucideStore } from '@ng-icons/lucide'; @Component({ selector: 'app-service', @@ -37,9 +35,7 @@ import { lucideStore } from '@ng-icons/lucide'; NgFor, ZardButtonComponent, ...cardImports, - NgIcon, ], - viewProviders: [provideIcons({ lucideStore })], }) export class ServiceComponent implements OnInit { servicesList: any = []; From 6d812ec626e7be6d5442c04c18a7841afea395d1 Mon Sep 17 00:00:00 2001 From: gkbishnoi07 Date: Mon, 6 Jul 2026 12:05:12 +0000 Subject: [PATCH 6/8] fix(ui): service tile keeps the store icon on the primary tile Swap the MMU van image back to the lucideStore icon (this is the inventory store service), sized via the button's --ng-icon__size on the same primary blue tile. --- src/service/service.component.html | 8 ++------ src/service/service.component.ts | 4 ++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/service/service.component.html b/src/service/service.component.html index 23ea576..18acf9e 100644 --- a/src/service/service.component.html +++ b/src/service/service.component.html @@ -19,13 +19,9 @@ type="button" *ngFor="let service of servicesList" (click)="selectService(service)" - class="h-auto min-h-36 max-w-80 flex-1 basis-72 gap-4 px-7 py-6 text-2xl font-semibold" + class="h-auto min-h-36 max-w-80 flex-1 basis-72 gap-4 px-7 py-6 text-2xl font-semibold [--ng-icon\_\_size:4rem]" > - + {{ service.serviceName }}
diff --git a/src/service/service.component.ts b/src/service/service.component.ts index 087bca9..d3e8e88 100644 --- a/src/service/service.component.ts +++ b/src/service/service.component.ts @@ -22,6 +22,8 @@ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { SessionStorageService } from 'Common-UI/v2/registrar/services/session-storage.service'; +import { NgIcon, provideIcons } from '@ng-icons/core'; +import { lucideStore } from '@ng-icons/lucide'; import { AppHeaderComponent } from '../app/app-modules/core/components/app-header/app-header.component'; import { NgFor } from '@angular/common'; import { ZardButtonComponent } from 'Common-UI/v2/ui/button'; @@ -31,11 +33,13 @@ import { cardImports } from 'Common-UI/v2/ui/card'; selector: 'app-service', templateUrl: './service.component.html', imports: [ + NgIcon, AppHeaderComponent, NgFor, ZardButtonComponent, ...cardImports, ], + viewProviders: [provideIcons({ lucideStore })], }) export class ServiceComponent implements OnInit { servicesList: any = []; From 8c183ddeca80776cef96acc857bd5501a8120586 Mon Sep 17 00:00:00 2001 From: gkbishnoi07 Date: Mon, 6 Jul 2026 12:19:08 +0000 Subject: [PATCH 7/8] fix(ui): service tile shows only a large store icon Drop the service-name text from the tile (kept as the button's aria-label) and size the store icon up to 80px via the icon's size input. --- src/service/service.component.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/service/service.component.html b/src/service/service.component.html index 18acf9e..8ecdee0 100644 --- a/src/service/service.component.html +++ b/src/service/service.component.html @@ -19,10 +19,10 @@ type="button" *ngFor="let service of servicesList" (click)="selectService(service)" - class="h-auto min-h-36 max-w-80 flex-1 basis-72 gap-4 px-7 py-6 text-2xl font-semibold [--ng-icon\_\_size:4rem]" + [attr.aria-label]="service.serviceName" + class="h-auto min-h-36 max-w-80 flex-1 basis-72 px-7 py-6" > - - {{ service.serviceName }} +
From 5a816119c2f0585da994bec8a3dd5f776fe3c940 Mon Sep 17 00:00:00 2001 From: gkbishnoi07 Date: Mon, 6 Jul 2026 12:34:42 +0000 Subject: [PATCH 8/8] fix(ui): bump Common-UI - shadcn-faithful form colors + table headers Advances the submodule to da84760: form messages use text-destructive/ text-success theme tokens (was raw red/green classes) and table headers match stock shadcn TableHead (font-medium text-foreground, was bold muted). --- Common-UI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common-UI b/Common-UI index 306f09b..da84760 160000 --- a/Common-UI +++ b/Common-UI @@ -1 +1 @@ -Subproject commit 306f09bc3f3ecc387a1dc19ecb43f6d8ab17f63f +Subproject commit da84760d7329386161a21aff07a3377c568a2eeb