Commit 6ea0016b authored by Almouhannad's avatar Almouhannad

(F) Change folder architecture

parent b020fb22
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import { HomeComponent } from './usecases/shared/components/home/home.component'; import { HomeComponent } from './components/shared/home/home.component';
import { RoleGuard } from './authentication/services/guards/role-guard'; import { RoleGuard } from './services/authentication/guards/role-guard';
import { Roles } from './authentication/classes/roles'; import { Roles } from './classes/authentication/roles';
import { ForbiddenComponent } from './usecases/shared/components/errors/forbidden/forbidden.component'; import { ForbiddenComponent } from './components/shared/errors/forbidden/forbidden.component';
import { NotFoundComponent } from './usecases/shared/components/errors/not-found/not-found.component'; import { NotFoundComponent } from './components/shared/errors/not-found/not-found.component';
import { TestSignalRComponent } from './notifications/components/test-signal-r/test-signal-r.component'; import { TestSignalRComponent } from './components/notifications/test-signal-r/test-signal-r.component';
import { DoctorUsersComponent } from './usecases/admin/list-doctor-users/components/doctor-users/doctor-users.component'; import { DoctorUsersComponent } from './components/admin/doctor-users/doctor-users.component';
import { AdminDashboardComponent } from './usecases/admin/shared/admin-dashboard/admin-dashboard.component'; import { AdminDashboardComponent } from './components/admin/admin-dashboard/admin-dashboard.component';
import { CreateDoctorUserFormComponent } from './usecases/admin/create-doctor-user/components/create-doctor-user-form/create-doctor-user-form.component'; import { CreateDoctorUserFormComponent } from './components/admin/create-doctor-user-form/create-doctor-user-form.component';
import { UpdateDoctorUserComponent } from './usecases/admin/update-doctor-user/components/update-doctor-user/update-doctor-user.component'; import { UpdateDoctorUserComponent } from './components/admin/update-doctor-user/update-doctor-user.component';
const routes: Routes = [ const routes: Routes = [
{ {
......
...@@ -2,30 +2,31 @@ import { NgModule } from '@angular/core'; ...@@ -2,30 +2,31 @@ import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { AppRoutingModule } from './app-routing.module'; import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './usecases/shared/components/root/app.component'; import { AppComponent } from './components/shared/root/app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ToastrModule } from 'ngx-toastr'; import { ToastrModule } from 'ngx-toastr';
import { LayoutComponent } from './usecases/shared/components/template/layout/layout.component'; import { LayoutComponent } from './components/shared/template/layout/layout.component';
import { HeaderComponent } from './usecases/shared/components/template/header/header.component'; import { HeaderComponent } from './components/shared/template/header/header.component';
import { FooterComponent } from './usecases/shared/components/template/footer/footer.component'; import { FooterComponent } from './components/shared/template/footer/footer.component';
import { HomeComponent } from './usecases/shared/components/home/home.component'; import { HomeComponent } from './components/shared/home/home.component';
import { LoginFormComponent } from './authentication/components/login-form/login-form.component'; import { LoginFormComponent } from './components/authentication/login-form/login-form.component';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http'; import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
import { AuthenticationService } from './authentication/services/authentication.service';
import { AuthenticationInterceptor } from './authentication/services/interceptor/authentication.interceptor'; import { AuthenticationService } from './services/authentication/authentication.service';
import { ForbiddenComponent } from './usecases/shared/components/errors/forbidden/forbidden.component'; import { AuthenticationInterceptor } from './services/authentication/interceptor/authentication.interceptor';
import { NotFoundComponent } from './usecases/shared/components/errors/not-found/not-found.component'; import { ForbiddenComponent } from './components/shared/errors/forbidden/forbidden.component';
import { TestSignalRComponent } from './notifications/components/test-signal-r/test-signal-r.component'; import { NotFoundComponent } from './components/shared/errors/not-found/not-found.component';
import { SignalRService } from './notifications/services/signal-r.service'; import { TestSignalRComponent } from './components/notifications/test-signal-r/test-signal-r.component';
import { DoctorUsersComponent } from './usecases/admin/list-doctor-users/components/doctor-users/doctor-users.component'; import { SignalRService } from './services/notifications/signal-r.service';
import { DoctorUserComponent } from './usecases/admin/list-doctor-users/components/doctor-user/doctor-user.component'; import { DoctorUsersComponent } from './components/admin/doctor-users/doctor-users.component';
import { DoctorUsersService } from './usecases/admin/services/doctor-users.service'; import { DoctorUserComponent } from './components/admin/doctor-user/doctor-user.component';
import { CreateDoctorUserFormComponent } from './usecases/admin/create-doctor-user/components/create-doctor-user-form/create-doctor-user-form.component'; import { DoctorUsersService } from './services/admin/doctor-users.service';
import { AdminDashboardComponent } from './usecases/admin/shared/admin-dashboard/admin-dashboard.component'; import { CreateDoctorUserFormComponent } from './components/admin/create-doctor-user-form/create-doctor-user-form.component';
import { UpdateDoctorUserComponent } from './usecases/admin/update-doctor-user/components/update-doctor-user/update-doctor-user.component'; import { AdminDashboardComponent } from './components/admin/admin-dashboard/admin-dashboard.component';
import { UpdateDoctorPersonalDataFormComponent } from './usecases/admin/update-doctor-user/update-doctor-personal-data/components/update-doctor-personal-data-form/update-doctor-personal-data-form.component'; import { UpdateDoctorUserComponent } from './components/admin/update-doctor-user/update-doctor-user.component';
import { UpdateDoctorUserDataFormComponent } from './usecases/admin/update-doctor-user/update-doctor-user-data/components/update-doctor-user-data-form/update-doctor-user-data-form.component'; import { UpdateDoctorPersonalDataFormComponent } from './components/admin/update-doctor-personal-data-form/update-doctor-personal-data-form.component';
import { UpdateDoctorUserDataFormComponent } from './components/admin/update-doctor-user-data-form/update-doctor-user-data-form.component';
@NgModule({ @NgModule({
......
export class updateDoctorUserQuery { export class UpdateDoctorUserQuery {
public id: number; public id: number;
public userName: string; public userName: string;
public password: string | null = null; public password: string | null = null;
......
import { Component, ViewChild } from '@angular/core'; import { Component, ViewChild } from '@angular/core';
import { DoctorUsersService } from '../../../services/doctor-users.service'; import { DoctorUsersService } from '../../../services/admin/doctor-users.service';
import { ToastrService } from 'ngx-toastr'; import { ToastrService } from 'ngx-toastr';
import { CreateDoctorUserCommand } from '../../classes/create-doctor-user-command'; import { CreateDoctorUserCommand } from '../../../classes/admin/create-doctor-user-command';
import { NgForm } from '@angular/forms'; import { NgForm } from '@angular/forms';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { ViewportScroller } from '@angular/common'; import { ViewportScroller } from '@angular/common';
......
import { Component, Input } from '@angular/core'; import { Component, Input } from '@angular/core';
import { DoctorUser } from '../../classes/doctor-user'; import { DoctorUser } from '../../../classes/admin/doctor-user';
@Component({ @Component({
selector: 'app-doctor-user', selector: 'app-doctor-user',
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { DoctorUsersService } from '../../../services/doctor-users.service'; import { DoctorUsersService } from '../../../services/admin/doctor-users.service';
import { DoctorUser } from '../../classes/doctor-user'; import { DoctorUser } from '../../../classes/admin/doctor-user';
import { GetAllDoctorUsersResult } from '../../classes/get-all-doctor-users-result'; import { GetAllDoctorUsersResult } from '../../../classes/admin/get-all-doctor-users-result';
@Component({ @Component({
selector: 'app-doctor-users', selector: 'app-doctor-users',
......
import { Component, Input, ViewChild } from '@angular/core'; import { Component, Input, ViewChild } from '@angular/core';
import { DoctorUsersService } from '../../../../services/doctor-users.service'; import { DoctorUsersService } from '../../../services/admin/doctor-users.service';
import { ToastrService } from 'ngx-toastr'; import { ToastrService } from 'ngx-toastr';
import { NgForm } from '@angular/forms'; import { NgForm } from '@angular/forms';
import { UpdateDoctorPersonalDataQuery } from '../../classes/update-doctor-personal-data-query'; import { UpdateDoctorPersonalDataQuery } from '../../../classes/admin/update-doctor-personal-data-query';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@Component({ @Component({
......
import { Component, Input, ViewChild } from '@angular/core'; import { Component, Input, ViewChild } from '@angular/core';
import { updateDoctorUserQuery } from '../../classes/update-doctor-user-query'; import { UpdateDoctorUserQuery } from '../../../classes/admin/update-doctor-user-query';
import { DoctorUsersService } from '../../../../services/doctor-users.service'; import { DoctorUsersService } from '../../../services/admin/doctor-users.service';
import { ToastrService } from 'ngx-toastr'; import { ToastrService } from 'ngx-toastr';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { NgForm } from '@angular/forms'; import { NgForm } from '@angular/forms';
...@@ -25,7 +25,7 @@ export class UpdateDoctorUserDataFormComponent { ...@@ -25,7 +25,7 @@ export class UpdateDoctorUserDataFormComponent {
isFailure: boolean = false; isFailure: boolean = false;
errorMessage: string; errorMessage: string;
@Input("formModel") formModel: updateDoctorUserQuery; @Input("formModel") formModel: UpdateDoctorUserQuery;
onSubmit(): void { onSubmit(): void {
if (this.form.valid) if (this.form.valid)
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { DoctorUsersService } from '../../../services/doctor-users.service'; import { DoctorUsersService } from '../../../services/admin/doctor-users.service';
import { DoctorUserResponse } from '../../classes/doctor-user-response'; import { DoctorUserResponse } from '../../../classes/admin/doctor-user-response';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { UpdateDoctorPersonalDataQuery } from '../../update-doctor-personal-data/classes/update-doctor-personal-data-query'; import { UpdateDoctorPersonalDataQuery } from '../../../classes/admin/update-doctor-personal-data-query';
import { updateDoctorUserQuery } from '../../update-doctor-user-data/classes/update-doctor-user-query'; import { UpdateDoctorUserQuery } from '../../../classes/admin/update-doctor-user-query';
@Component({ @Component({
selector: 'app-update-doctor-user', selector: 'app-update-doctor-user',
...@@ -28,7 +28,7 @@ export class UpdateDoctorUserComponent implements OnInit{ ...@@ -28,7 +28,7 @@ export class UpdateDoctorUserComponent implements OnInit{
this.doctorUser.firstName, this.doctorUser.middleName, this.doctorUser.firstName, this.doctorUser.middleName,
this.doctorUser.lastName this.doctorUser.lastName
); );
this.editUserDataQuery = new updateDoctorUserQuery(doctorUser!.id, doctorUser!.userName); this.editUserDataQuery = new UpdateDoctorUserQuery(doctorUser!.id, doctorUser!.userName);
} }
) )
} }
...@@ -39,7 +39,7 @@ export class UpdateDoctorUserComponent implements OnInit{ ...@@ -39,7 +39,7 @@ export class UpdateDoctorUserComponent implements OnInit{
doctorUserId: number; doctorUserId: number;
doctorUser: DoctorUserResponse = new DoctorUserResponse(); doctorUser: DoctorUserResponse = new DoctorUserResponse();
editPersonalDataQuery: UpdateDoctorPersonalDataQuery; editPersonalDataQuery: UpdateDoctorPersonalDataQuery;
editUserDataQuery: updateDoctorUserQuery; editUserDataQuery: UpdateDoctorUserQuery;
isUserDataSelected: boolean = false; isUserDataSelected: boolean = false;
isPersonalInfoSelected: boolean = false; isPersonalInfoSelected: boolean = false;
......
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core'; import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
import { NgForm } from '@angular/forms'; import { NgForm } from '@angular/forms';
import { LoginCommand } from '../../classes/Login/login-command'; import { LoginCommand } from '../../../classes/authentication/Login/login-command';
import { AuthenticationService } from '../../services/authentication.service'; import { AuthenticationService } from '../../../services/authentication/authentication.service';
import { UserData } from '../../classes/user-data'; import { UserData } from '../../../classes/authentication/user-data';
import { ToastrService } from 'ngx-toastr'; import { ToastrService } from 'ngx-toastr';
@Component({ @Component({
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { SignalRService } from '../../services/signal-r.service'; import { SignalRService } from '../../../services/notifications/signal-r.service';
@Component({ @Component({
selector: 'app-test-signal-r', selector: 'app-test-signal-r',
......
import { Component, EventEmitter, Input, Output } from '@angular/core'; import { Component, EventEmitter, Input, Output } from '@angular/core';
import { UserData } from '../../../../../authentication/classes/user-data'; import { UserData } from '../../../../classes/authentication/user-data';
import { AuthenticationService } from '../../../../../authentication/services/authentication.service'; import { AuthenticationService } from '../../../../services/authentication/authentication.service';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { Roles } from '../../../../../authentication/classes/roles'; import { Roles } from '../../../../classes/authentication/roles';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { ToastrService } from 'ngx-toastr'; import { ToastrService } from 'ngx-toastr';
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { UserData } from '../../../../../authentication/classes/user-data'; import { UserData } from '../../../../classes/authentication/user-data';
import { AuthenticationService } from '../../../../../authentication/services/authentication.service'; import { AuthenticationService } from '../../../../services/authentication/authentication.service';
@Component({ @Component({
selector: 'app-layout', selector: 'app-layout',
......
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient, HttpErrorResponse } from '@angular/common/http'; import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { catchError, map, Observable, of } from 'rxjs'; import { catchError, map, Observable, of } from 'rxjs';
import * as config from '../../../../../config'; import * as config from '../../../../config'
import { GetAllDoctorUsersResult } from '../list-doctor-users/classes/get-all-doctor-users-result'; import { GetAllDoctorUsersResponse } from '../../classes/admin/get-all-doctor-users-response';
import { GetAllDoctorUsersResponse } from '../list-doctor-users/classes/get-all-doctor-users-response'; import { GetAllDoctorUsersResult } from '../../classes/admin/get-all-doctor-users-result';
import { CreateDoctorUserCommand } from '../create-doctor-user/classes/create-doctor-user-command'; import { CreateDoctorUserCommand } from '../../classes/admin/create-doctor-user-command';
import { CreateDoctorUserResult } from '../create-doctor-user/classes/create-doctor-user-result'; import { CreateDoctorUserResult } from '../../classes/admin/create-doctor-user-result';
import { DoctorUserResponse } from '../update-doctor-user/classes/doctor-user-response'; import { DoctorUserResponse } from '../../classes/admin/doctor-user-response';
import { UpdateDoctorPersonalDataQuery } from '../update-doctor-user/update-doctor-personal-data/classes/update-doctor-personal-data-query'; import { UpdateDoctorPersonalDataQuery } from '../../classes/admin/update-doctor-personal-data-query';
import { UpdateDoctorPersonalDataResult } from '../update-doctor-user/update-doctor-personal-data/classes/update-doctor-personal-data-result'; import { UpdateDoctorPersonalDataResult } from '../../classes/admin/update-doctor-personal-data-result';
import { updateDoctorUserQuery } from '../update-doctor-user/update-doctor-user-data/classes/update-doctor-user-query'; import { UpdateDoctorUserDataResult } from '../../classes/admin/update-doctor-user-data-result';
import { UpdateDoctorUserDataResult } from '../update-doctor-user/update-doctor-user-data/classes/update-doctor-user-data-result'; import { UpdateDoctorUserQuery } from '../../classes/admin/update-doctor-user-query';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
...@@ -87,7 +88,7 @@ export class DoctorUsersService { ...@@ -87,7 +88,7 @@ export class DoctorUsersService {
// #endregion // #endregion
// #region Update doctor user data // #region Update doctor user data
updateDoctorUserData(query: updateDoctorUserQuery): Observable<UpdateDoctorUserDataResult> { updateDoctorUserData(query: UpdateDoctorUserQuery): Observable<UpdateDoctorUserDataResult> {
return this.http.put(`${this.DOCTORUSERS_ENDPOINT}/Users`, query) return this.http.put(`${this.DOCTORUSERS_ENDPOINT}/Users`, query)
.pipe( .pipe(
map (_ => { map (_ => {
......
...@@ -2,13 +2,13 @@ import { Injectable } from '@angular/core'; ...@@ -2,13 +2,13 @@ import { Injectable } from '@angular/core';
import { AppModule } from '../../app.module'; import { AppModule } from '../../app.module';
import { HttpClient, HttpErrorResponse, HttpHeaders, HttpResponse } from '@angular/common/http'; import { HttpClient, HttpErrorResponse, HttpHeaders, HttpResponse } from '@angular/common/http';
import * as config from "../../../../config"; import * as config from "../../../../config";
import { LoginCommand } from '../classes/Login/login-command';
import { LoginResponse } from '../classes/Login/login-response';
import { catchError, map, Observable, of } from 'rxjs'; import { catchError, map, Observable, of } from 'rxjs';
import { LoginResult } from '../classes/Login/login-result';
import { JWTHandler } from './jwtHandler'; import { JWTHandler } from './jwtHandler';
import { UserData } from '../classes/user-data'; import { LoginCommand } from '../../classes/authentication/Login/login-command';
import { Roles } from '../classes/roles'; import { LoginResponse } from '../../classes/authentication/Login/login-response';
import { LoginResult } from '../../classes/authentication/Login/login-result';
import { UserData } from '../../classes/authentication/user-data';
import { Roles } from '../../classes/authentication/roles';
@Injectable({ @Injectable({
providedIn: AppModule providedIn: AppModule
......
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router, CanActivateChild, GuardResult, MaybeAsync } from '@angular/router'; import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router, CanActivateChild, GuardResult, MaybeAsync } from '@angular/router';
import { AuthenticationService } from '../authentication.service'; import { AuthenticationService } from '../authentication.service';
import { Roles } from '../../classes/roles'; import { UserData } from '../../../classes/authentication/user-data';
import { UserData } from '../../classes/user-data'; import { Roles } from '../../../classes/authentication/roles';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment