Commit 6ea0016b authored by Almouhannad's avatar Almouhannad

(F) Change folder architecture

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