From 843b1c4d34a9c94961088e5be35305c353a5c5f9 Mon Sep 17 00:00:00 2001 From: Deepika Mahindroo Date: Thu, 15 Dec 2022 21:18:30 +0530 Subject: [PATCH 1/3] CompleteProject --- src/app/app-routing.module.ts | 2 +- .../appointment/appointment.component.html | 178 +++++++++--------- .../check-appointment.component.html | 17 +- .../check-appointment.component.ts | 101 +++++----- .../components/header/header.component.html | 96 +++++----- src/app/components/home/home.component.html | 71 +++---- .../lab-tests/lab-tests.component.html | 11 +- .../lab-tests/lab-tests.component.ts | 50 +++-- .../interfaces/userTestBooing.interface.ts | 41 ++-- src/app/services/test.service.ts | 15 +- src/db.json | 129 +++++-------- tsconfig.json | 2 +- 12 files changed, 349 insertions(+), 364 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 65280c0..363efa2 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -18,7 +18,7 @@ const routes: Routes = [ component: AppointmentComponent, canActivate: [AuthGuard], }, - { path: 'labtests', component: LabTestsComponent }, // to protect these pages from not authorized user + { path: 'labtests', component: LabTestsComponent, canActivate: [AuthGuard] }, { path: 'appointment-check', component: CheckAppointmentComponent, diff --git a/src/app/components/appointment/appointment.component.html b/src/app/components/appointment/appointment.component.html index b3e30d1..0933109 100644 --- a/src/app/components/appointment/appointment.component.html +++ b/src/app/components/appointment/appointment.component.html @@ -1,101 +1,107 @@
-
-
-
-
-
-
-
- -

Schedule Your Appointment

-
-
- -
- - -
+
+
+
+
+
+
+
+ +

Schedule Your Appointment

+ +
+ +
+ +
- -
- -
- - -
+
+ +
+ +
+ +
- -
- -
-
-
- - -
-
- - -
+
+ +
+ +
+
+
+ +
-
- -
- -
- - -
+
+ +
+
+
+ +
+ +
+ + +
+
- -
- -
-
- -
-
+ +
+ +
+
+ +
+
- -
- -
-
- -
-
+ +
+ +
+
+ +
+
- -
- -
- - -
+ +
+ +
+ +
- - -
- -
- - -
- -
- Sample image -
+
+ + +
+ +
+ + +
+ +
+ Sample image
-
+ + \ No newline at end of file diff --git a/src/app/components/check-appoitment/check-appointment.component.html b/src/app/components/check-appoitment/check-appointment.component.html index cd20223..3256420 100644 --- a/src/app/components/check-appoitment/check-appointment.component.html +++ b/src/app/components/check-appoitment/check-appointment.component.html @@ -1,17 +1,8 @@ - -
-
- +
+
diff --git a/src/app/components/check-appoitment/check-appointment.component.ts b/src/app/components/check-appoitment/check-appointment.component.ts index 4b9c2c2..139b049 100644 --- a/src/app/components/check-appoitment/check-appointment.component.ts +++ b/src/app/components/check-appoitment/check-appointment.component.ts @@ -1,75 +1,78 @@ import { Component, OnInit } from '@angular/core'; import { IAppointment } from 'src/app/interfaces/userAppointment.interface'; -import { ColDef, GridApi, GridOptions, GridReadyEvent, RowNodeTransaction,} from 'ag-grid-community'; +import { + ColDef, + GridApi, + GridOptions, + GridReadyEvent, + RowNodeTransaction, +} from 'ag-grid-community'; import { UserService } from 'src/app/services/user.service'; import { Router } from '@angular/router'; - @Component({ selector: 'app-check-appointment', templateUrl: './check-appointment.component.html', - styleUrls: ['./check-appointment.component.css'] + styleUrls: ['./check-appointment.component.css'], }) export class CheckAppointmentComponent implements OnInit { - - public rowData:IAppointment[]=[]; + public rowData: IAppointment[] = []; private gridApi!: GridApi; - public rowSelection:"single"|"multiple"="single"; - private data = localStorage.getItem("currentUser"); + public rowSelection: 'single' | 'multiple' = 'single'; + private data = localStorage.getItem('currentUser'); // to show the email address on currentuser which we store when we logged in - constructor(private userService:UserService,private router:Router) { - localStorage.getItem("currentUser"); - } - ngOnInit(): void { + constructor(private userService: UserService, private router: Router) { + localStorage.getItem('currentUser'); } - + ngOnInit(): void {} public defaultColDef: ColDef = { flex: 1, editable: true, }; - columns=[ - { "headerName":"ID", "field":"id",width: 90, - minWidth: 50}, - {"headerName":"Name","field":"name",width:90,minWidth:50}, - {"headerName":"Gender","field":"gender",width:90,minWidth:50}, - {"headerName":"Date_of_Birth","field":"dob",width:90,minWidth:50}, - {"headerName":"Email","field":"email",width:90,minWidth:50}, - {"headerName":"Department","field":"dept",width:90,minWidth:50}, - {"headerName":"Doctor","field":"doc",width:90,minWidth:50}, - {"headerName":"Date of Appointment","field":"doa",width:90,minWidth:50}, - {"headerName":"Status","field":"status",width:90,minWidth:50} -] + columns = [ + { headerName: 'ID', field: 'id', width: 90, minWidth: 50 }, + { headerName: 'Name', field: 'name', width: 90, minWidth: 50 }, + { headerName: 'Gender', field: 'gender', width: 90, minWidth: 50 }, + { headerName: 'Date_of_Birth', field: 'dob', width: 90, minWidth: 50 }, + { headerName: 'Email', field: 'email', width: 90, minWidth: 50 }, + { headerName: 'Department', field: 'dept', width: 90, minWidth: 50 }, + { headerName: 'Doctor', field: 'doc', width: 90, minWidth: 50 }, + { + headerName: 'Date of Appointment', + field: 'doa', + width: 90, + minWidth: 50, + }, + ]; -// Show Appointments in grid -onGridReady(params: GridReadyEvent){ - this.gridApi = params.api; - this.userService.getData().subscribe((respData)=> - { - this.rowData=this.getData(respData); - }) -} - -//filter data for the current user so that user get the specific data -getData(respData:IAppointment[]){ - return respData.filter(e=>e.email==this.data); - } + // Show Appointments in grid + onGridReady(params: GridReadyEvent) { + this.gridApi = params.api; + this.userService.getData().subscribe((respData) => { + this.rowData = this.getData(respData); + }); + } -onNewBooking(){ -this.router.navigate(["appointment"]); -} + //filter data for the current user so that user get the specific data + getData(respData: IAppointment[]) { + return respData.filter((e) => e.email == this.data); + } -// single Row Selection -onSelectionChanged(){ - const selectedRows = this.gridApi.getSelectedRows(); -} + onNewBooking() { + this.router.navigate(['appointment']); + } -//on the of click of delete button delete the specific row -onDelete(){ -const selectedData = this.gridApi.getSelectedRows(); -const res = this.gridApi.applyTransaction({ remove: selectedData })!; -} + // single Row Selection + onSelectionChanged() { + const selectedRows = this.gridApi.getSelectedRows(); + } + //on the of click of delete button delete the specific row + onDelete() { + const selectedData = this.gridApi.getSelectedRows(); + const res = this.gridApi.applyTransaction({ remove: selectedData })!; + } } diff --git a/src/app/components/header/header.component.html b/src/app/components/header/header.component.html index f7d49a6..acde37d 100644 --- a/src/app/components/header/header.component.html +++ b/src/app/components/header/header.component.html @@ -1,50 +1,54 @@
-
-
-
-
-
+
+ \ No newline at end of file diff --git a/src/app/components/home/home.component.html b/src/app/components/home/home.component.html index 19d41e8..4fab090 100644 --- a/src/app/components/home/home.component.html +++ b/src/app/components/home/home.component.html @@ -1,5 +1,6 @@ + @@ -7,17 +8,19 @@ Hello, world! + - + \ No newline at end of file diff --git a/src/app/components/lab-tests/lab-tests.component.html b/src/app/components/lab-tests/lab-tests.component.html index ff016bb..dd50e69 100644 --- a/src/app/components/lab-tests/lab-tests.component.html +++ b/src/app/components/lab-tests/lab-tests.component.html @@ -26,7 +26,7 @@ - +
@@ -61,14 +61,11 @@
- - -
- +
+
diff --git a/src/app/components/lab-tests/lab-tests.component.ts b/src/app/components/lab-tests/lab-tests.component.ts index caa8fc2..086a4af 100644 --- a/src/app/components/lab-tests/lab-tests.component.ts +++ b/src/app/components/lab-tests/lab-tests.component.ts @@ -1,9 +1,7 @@ import { HttpClient } from '@angular/common/http'; import { Component, OnInit } from '@angular/core'; -import { InjectSetupWrapper } from '@angular/core/testing'; -import { FormBuilder, FormGroup } from '@angular/forms'; -import { CellClickedEvent, SelectionChangedEvent } from 'ag-grid-community'; -import { DropListener } from 'ag-grid-community/dist/lib/headerRendering/columnDrag/bodyDropTarget'; +import { FormArray, FormBuilder, FormControl, FormGroup } from '@angular/forms'; +import { Subscription } from 'rxjs'; import { IDiagnosis, IService, @@ -34,23 +32,43 @@ export class LabTestsComponent implements OnInit { serviceList: IService[] = []; subServiceList: ISubService[] = []; checkboxList = []; - tempTestName = ''; + selectedSubServices: (ISubService | null)[] = []; + subscription: Subscription = new Subscription(); + get subServices(): FormArray { + return this.testForm.get('subService') as FormArray; + } ngOnInit(): void { this.testForm = this.formBuilder.group({ name: [''], email: [''], testName: [''], testService: [''], - subService: [''], + subService: this.formBuilder.array([]), date: [''], }); + + const control = this.testForm.controls['subService']; + } + + onChange(isChecked, subServiceName: string) { + const formArray = this.testForm.get('subService'); + if (isChecked.checked) { + formArray.push(new FormControl(subServiceName)); + } else { + let index = formArray.controls.findIndex( + (x) => x.value === subServiceName + ); + formArray.removeAt(index); + } + } + + ngDestroy() { + this.subscription.unsubscribe(); } // To get all the Test Name in Radio Buttons getAllDiagnosisData() { this.testList = this.testService.getTest(); - // this.serviceList=this.testService.getTestServices(); - console.log(this.testList); } //To change the test calling change event and shows dependent services in dropdown @@ -62,24 +80,20 @@ export class LabTestsComponent implements OnInit { } //to chnage the service calling change event and shows dependent subservices in dropdown - changeService(event: any) { - debugger; + changeService(event) { let serviceId = event.target.value; this.subServiceList = this.testService .getSubService() .filter((u) => u.service_id == serviceId); - console.log(this.subServiceList); } - onCheckChange(event: any) { + onCheckChange(event) { const checkid = event.target.value; console.log(checkid); this.subServiceList = this.subServiceList.filter( (e) => e.subService_id == checkid ); - const isChecked = event.target.checked; - // console.log(checkname); console.log(this.testForm.controls['subService'].value); } @@ -87,7 +101,6 @@ export class LabTestsComponent implements OnInit { if (this.testForm.invalid) { return; } - debugger; const user_t_name = this.testForm.value.name; const user_t_email = this.testForm.value.email; const user_t_testName = @@ -98,10 +111,8 @@ export class LabTestsComponent implements OnInit { this.serviceList.find( (e) => e.service_id == this.testForm.value.testService )?.service_name || ''; - const user_t_subserviceName = - this.subServiceList.find( - (e) => e.subService_id == this.testForm.value.subService - )?.subService_name || ''; + const user_t_subserviceName = this.testForm.value.subService; + const user_t_date = this.testForm.value.date; this.userService .getTestData( @@ -114,7 +125,6 @@ export class LabTestsComponent implements OnInit { ) .subscribe((respData: IDiagnosis[]) => { alert('Test Appointment Successfull'); - console.log(respData); }); } } diff --git a/src/app/interfaces/userTestBooing.interface.ts b/src/app/interfaces/userTestBooing.interface.ts index 8dc96bb..6bbdb17 100644 --- a/src/app/interfaces/userTestBooing.interface.ts +++ b/src/app/interfaces/userTestBooing.interface.ts @@ -1,27 +1,26 @@ -export interface IDiagnosis{ - d_name:string, - d_email:string, - d_tests:string, - d_service:string, - d_subService:string, - d_date:Date +export interface IDiagnosis { + d_name: string; + d_email: string; + d_tests: string; + d_service: string; + d_subService: string; + d_date: Date; } -export interface ITest{ - test_id:number - test_name:string - test_img:string +export interface ITest { + test_id: number; + test_name: string; + test_img: string; } -export interface IService{ - service_id:number, - test_id:number, - service_name:string +export interface IService { + service_id: number; + test_id: number; + service_name: string; } -export interface ISubService{ - subService_id:number, - service_id:number, - select:boolean - subService_name:string -} \ No newline at end of file +export interface ISubService { + subService_id: number; + service_id: number; + subService_name: string; +} diff --git a/src/app/services/test.service.ts b/src/app/services/test.service.ts index 62050de..a4ac546 100644 --- a/src/app/services/test.service.ts +++ b/src/app/services/test.service.ts @@ -49,49 +49,48 @@ export class TestService { { subService_id: 1501, service_id: 115, - select: false, subService_name: 'X-RAY both Kneen', }, { subService_id: 1502, service_id: 115, - select: false, + subService_name: 'X-RAY chest', }, { subService_id: 1503, service_id: 115, - select: false, + subService_name: 'X-RAY spine', }, { subService_id: 1504, service_id: 115, - select: false, + subService_name: 'X-RAY neck', }, { subService_id: 1505, service_id: 116, - select: false, + subService_name: 'CT-SCAN spine', }, { subService_id: 1506, service_id: 116, - select: false, + subService_name: 'CT-SCAN whole body', }, { subService_id: 1507, service_id: 116, - select: false, + subService_name: 'CT-SCAN nesk', }, { subService_id: 1508, service_id: 116, - select: false, + subService_name: 'CT-SCAN cervical spine', }, ]; diff --git a/src/db.json b/src/db.json index 311adb3..724ef46 100644 --- a/src/db.json +++ b/src/db.json @@ -72,6 +72,13 @@ "email": "akdoe@gmail.com", "password": "akdoe123", "id": 8 + }, + { + "first_name": "akshat", + "last_name": "mahindroo", + "email": "ak@gmail.com", + "password": "ak123456", + "id": 9 } ], "appointment": [ @@ -294,6 +301,16 @@ "doc": "Dr.Maria", "doa": "2022-12-01T15:22", "id": 22 + }, + { + "name": "akshit", + "gender": "MALE", + "email": "ak@gmail.com", + "dob": "2022-11-28", + "dept": "Cardiology", + "doc": "Ms.Jenny", + "doa": "2022-12-03T00:12", + "id": 23 } ], "department": [ @@ -385,102 +402,54 @@ } ], "tests": [ - { - "d_id": "", - "d_name": "", - "d_email": "", - "d_test": "", - "d_testService": "", - "d_date": "", - "id": 1 - }, { "name": "", "email": "", - "test": "", - "testService": "", - "date": "", - "id": 2 - }, - { - "name": "John", - "email": "angrybird24@mail.com", - "testName": "5001", - "testService": "", - "date": "2022-12-09T16:29", - "id": 3 - }, - { - "name": "John", - "email": "tiny.aggerwal@gmail.com", - "testName": "", - "testService": "115", - "subservice": "115", - "date": "2022-12-22T18:58", - "id": 4 - }, - { - "name": "John", - "email": "tiny.aggerwal@gmail.com", - "testName": "", - "testService": "115", - "subservice": "115", - "date": "2022-12-01T16:00", - "id": 5 - }, - { - "name": "kittu sharma", - "email": "angrybird24@mail.com", - "testName": "", - "testService": "115", - "subservice": "115", - "date": "2022-12-16T17:19", - "id": 6 - }, - { - "name": "John", - "email": "deepika.mahindroo@sourcefuse.com", - "testName": "", - "testService": "X-RAY", - "subservice": "", - "date": "2022-12-22T15:38", - "id": 7 - }, - { - "name": "Tiny aggerwal", - "email": "angrybird24@mail.com", - "testName": "", + "testName": "Radiology Services", "testService": "X-RAY", - "subservice": "", - "date": "2022-12-16T16:09", - "id": 8 + "subservice": [ + "X-RAY spine", + "X-RAY neck" + ], + "date": "2022-12-10T18:08", + "id": 17 }, { "name": "kittu sharma", - "email": "angrybird24@mail.com", - "testName": "", + "email": "deepika.mahindroo@sourcefuse.com", + "testName": "Radiology Services", "testService": "X-RAY", - "subservice": "", - "date": "2022-12-02T17:22", - "id": 9 + "subservice": [ + "X-RAY spine", + "X-RAY neck" + ], + "date": "2022-12-10T18:08", + "id": 18 }, { "name": "John", "email": "tiny.aggerwal@gmail.com", - "testName": "", + "testName": "Radiology Services", "testService": "X-RAY", - "subservice": "", - "date": "2022-12-31T18:16", - "id": 10 + "subservice": [ + "X-RAY chest", + "X-RAY spine" + ], + "date": "2022-12-03T20:57", + "id": 19 }, { - "name": "Aashie", - "email": "ashish1592@gmail.com", + "name": "akshat", + "email": "ak@gmail.com", "testName": "Radiology Services", - "testService": "X-RAY", - "subservice": "", - "date": "2022-12-30T12:44", - "id": 11 + "testService": "CT-SCAN", + "subservice": [ + "CT-SCAN whole body", + "CT-SCAN spine", + "CT-SCAN nesk" + ], + "date": "2022-12-31T21:17", + "id": 20 } ] } \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 85050f0..d48683e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,7 @@ "baseUrl": "./", "outDir": "./dist/out-tsc", "forceConsistentCasingInFileNames": true, - "strict": true, + "strict": false, "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, "noImplicitReturns": true, From f94d50731148921f1cdd1307e3ff33df3a71540c Mon Sep 17 00:00:00 2001 From: Deepika Mahindroo Date: Fri, 6 Jan 2023 13:13:28 +0530 Subject: [PATCH 2/3] lazy_loading --- src/app/admin/admin-routing.module.ts | 32 +++++++++++++++++++ src/app/admin/admin.module.ts | 21 ++++++++++++ src/app/app-routing.module.ts | 27 ++++++---------- .../appointment/appointment-routing.module.ts | 18 +++++++++++ .../appointment/appointment.component.ts | 2 +- .../appointment/appointment.module.ts | 20 ++++++++++++ .../check-appoitment-routing.module.ts | 10 ++++++ .../check-appoitment.module.ts | 14 ++++++++ 8 files changed, 125 insertions(+), 19 deletions(-) create mode 100644 src/app/admin/admin-routing.module.ts create mode 100644 src/app/admin/admin.module.ts create mode 100644 src/app/components/appointment/appointment-routing.module.ts create mode 100644 src/app/components/appointment/appointment.module.ts create mode 100644 src/app/components/check-appoitment/check-appoitment-routing.module.ts create mode 100644 src/app/components/check-appoitment/check-appoitment.module.ts diff --git a/src/app/admin/admin-routing.module.ts b/src/app/admin/admin-routing.module.ts new file mode 100644 index 0000000..68f8725 --- /dev/null +++ b/src/app/admin/admin-routing.module.ts @@ -0,0 +1,32 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +import { AppointmentComponent } from '../components/appointment/appointment.component'; +import { CheckAppointmentComponent } from '../components/check-appoitment/check-appointment.component'; +import { HomeComponent } from '../components/home/home.component'; +import { LabTestsComponent } from '../components/lab-tests/lab-tests.component'; +import { LoginComponent } from '../components/login/login.component'; +import { SignupComponent } from '../components/signup/signup.component'; +import { AuthGuard } from '../guard/auth.guard'; + +const routes: Routes = [ + { path: '', component: HomeComponent }, + { path: 'signup', component: SignupComponent }, + { path: 'login', component: LoginComponent }, + // { + // path: 'appointment', + // component: AppointmentComponent, + // canActivate: [AuthGuard], + // }, + { path: 'labtests', component: LabTestsComponent, canActivate: [AuthGuard] }, + { + path: 'appointment-check', + component: CheckAppointmentComponent, + canActivate: [AuthGuard], + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class AdminRoutingModule {} diff --git a/src/app/admin/admin.module.ts b/src/app/admin/admin.module.ts new file mode 100644 index 0000000..e1e2e3c --- /dev/null +++ b/src/app/admin/admin.module.ts @@ -0,0 +1,21 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { ReactiveFormsModule } from '@angular/forms'; +import { HttpClientModule } from '@angular/common/http'; +import { AgGridModule } from 'ag-grid-angular'; + +import { AdminRoutingModule } from './admin-routing.module'; + +@NgModule({ + declarations: [], + imports: [ + CommonModule, + AdminRoutingModule, + FormsModule, + ReactiveFormsModule, + HttpClientModule, + AgGridModule, + ], +}) +export class AdminModule {} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 363efa2..39f76cc 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,28 +1,19 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { AppointmentComponent } from './components/appointment/appointment.component'; -import { CheckAppointmentComponent } from './components/check-appoitment/check-appointment.component'; -import { HomeComponent } from './components/home/home.component'; -import { LabTestsComponent } from './components/lab-tests/lab-tests.component'; -import { LoginComponent } from './components/login/login.component'; -import { SignupComponent } from './components/signup/signup.component'; -import { AuthGuard } from './guard/auth.guard'; - const routes: Routes = [ - { path: '', component: HomeComponent }, - { path: 'signup', component: SignupComponent }, - { path: 'login', component: LoginComponent }, { - path: 'appointment', - component: AppointmentComponent, - canActivate: [AuthGuard], + path: '', + loadChildren: () => + import('./admin/admin.module').then((mod) => mod.AdminModule), }, - { path: 'labtests', component: LabTestsComponent, canActivate: [AuthGuard] }, + { - path: 'appointment-check', - component: CheckAppointmentComponent, - canActivate: [AuthGuard], + path: '', + loadChildren: () => + import('./components/appointment/appointment.module').then( + (m) => m.AppointmentModule + ), }, ]; diff --git a/src/app/components/appointment/appointment-routing.module.ts b/src/app/components/appointment/appointment-routing.module.ts new file mode 100644 index 0000000..1a31bac --- /dev/null +++ b/src/app/components/appointment/appointment-routing.module.ts @@ -0,0 +1,18 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +import { AppointmentComponent } from './appointment.component'; +import { AuthGuard } from 'src/app/guard/auth.guard'; + +const routes: Routes = [ + { + path: 'appointment', + component: AppointmentComponent, + canActivate: [AuthGuard], + }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class AppointmentRoutingModule {} diff --git a/src/app/components/appointment/appointment.component.ts b/src/app/components/appointment/appointment.component.ts index 5aebf9e..93da74d 100644 --- a/src/app/components/appointment/appointment.component.ts +++ b/src/app/components/appointment/appointment.component.ts @@ -78,7 +78,7 @@ export class AppointmentComponent implements OnInit { } //on the click of department change event click and through department id doctors will show in dependent dropdown - changeDept(event: any) { + changeDept(event) { let deptId = event.target.value; this.userService .showDoc(+deptId) diff --git a/src/app/components/appointment/appointment.module.ts b/src/app/components/appointment/appointment.module.ts new file mode 100644 index 0000000..c6159d8 --- /dev/null +++ b/src/app/components/appointment/appointment.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { AppointmentRoutingModule } from './appointment-routing.module'; +import { HttpClientModule } from '@angular/common/http'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { AgGridModule } from 'ag-grid-angular'; + +@NgModule({ + declarations: [], + imports: [ + CommonModule, + AppointmentRoutingModule, + FormsModule, + ReactiveFormsModule, + HttpClientModule, + AgGridModule, + ], +}) +export class AppointmentModule {} diff --git a/src/app/components/check-appoitment/check-appoitment-routing.module.ts b/src/app/components/check-appoitment/check-appoitment-routing.module.ts new file mode 100644 index 0000000..ffd496e --- /dev/null +++ b/src/app/components/check-appoitment/check-appoitment-routing.module.ts @@ -0,0 +1,10 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; + +const routes: Routes = []; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class CheckAppoitmentRoutingModule { } diff --git a/src/app/components/check-appoitment/check-appoitment.module.ts b/src/app/components/check-appoitment/check-appoitment.module.ts new file mode 100644 index 0000000..8674d14 --- /dev/null +++ b/src/app/components/check-appoitment/check-appoitment.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { CheckAppoitmentRoutingModule } from './check-appoitment-routing.module'; + + +@NgModule({ + declarations: [], + imports: [ + CommonModule, + CheckAppoitmentRoutingModule + ] +}) +export class CheckAppoitmentModule { } From e5a651a866d3236bbc880919583f37c395bcd413 Mon Sep 17 00:00:00 2001 From: Deepika Mahindroo Date: Fri, 6 Jan 2023 13:16:41 +0530 Subject: [PATCH 3/3] updated_Lazily_loaded_data --- src/app/admin/admin-routing.module.ts | 6 +----- .../check-appoitment-routing.module.ts | 10 ---------- .../check-appoitment/check-appoitment.module.ts | 14 -------------- 3 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 src/app/components/check-appoitment/check-appoitment-routing.module.ts delete mode 100644 src/app/components/check-appoitment/check-appoitment.module.ts diff --git a/src/app/admin/admin-routing.module.ts b/src/app/admin/admin-routing.module.ts index 68f8725..0358b24 100644 --- a/src/app/admin/admin-routing.module.ts +++ b/src/app/admin/admin-routing.module.ts @@ -12,11 +12,7 @@ const routes: Routes = [ { path: '', component: HomeComponent }, { path: 'signup', component: SignupComponent }, { path: 'login', component: LoginComponent }, - // { - // path: 'appointment', - // component: AppointmentComponent, - // canActivate: [AuthGuard], - // }, + { path: 'labtests', component: LabTestsComponent, canActivate: [AuthGuard] }, { path: 'appointment-check', diff --git a/src/app/components/check-appoitment/check-appoitment-routing.module.ts b/src/app/components/check-appoitment/check-appoitment-routing.module.ts deleted file mode 100644 index ffd496e..0000000 --- a/src/app/components/check-appoitment/check-appoitment-routing.module.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -const routes: Routes = []; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class CheckAppoitmentRoutingModule { } diff --git a/src/app/components/check-appoitment/check-appoitment.module.ts b/src/app/components/check-appoitment/check-appoitment.module.ts deleted file mode 100644 index 8674d14..0000000 --- a/src/app/components/check-appoitment/check-appoitment.module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { CheckAppoitmentRoutingModule } from './check-appoitment-routing.module'; - - -@NgModule({ - declarations: [], - imports: [ - CommonModule, - CheckAppoitmentRoutingModule - ] -}) -export class CheckAppoitmentModule { }