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 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/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 @@ - 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/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/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/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/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..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 @@ -28,10 +28,9 @@ 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 { 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'; @@ -46,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, @@ -62,8 +62,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 +71,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-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/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..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 @@ -41,8 +41,8 @@ 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 { NgIf, NgFor, NgClass } from '@angular/common'; +import { TableDataSource } from 'src/app/app-modules/core/utils/table-data-source'; +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, @@ -83,7 +82,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/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/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/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/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/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, diff --git a/src/service/service.component.html b/src/service/service.component.html index d8ca07d..8ecdee0 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,20 +15,16 @@
- - diff --git a/src/service/service.component.ts b/src/service/service.component.ts index b071d99..d3e8e88 100644 --- a/src/service/service.component.ts +++ b/src/service/service.component.ts @@ -22,24 +22,22 @@ 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 { 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'; -import { lucideStore } from '@ng-icons/lucide'; @Component({ selector: 'app-service', templateUrl: './service.component.html', imports: [ + NgIcon, AppHeaderComponent, NgFor, - AppFooterComponent, ZardButtonComponent, ...cardImports, - NgIcon, ], viewProviders: [provideIcons({ lucideStore })], }) 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 {