├── src ├── assets │ ├── .gitkeep │ ├── barbershop.png │ └── home │ │ ├── images │ │ ├── 1.jpg │ │ ├── 2.jpg │ │ ├── 3.jpg │ │ └── 4.jpg │ │ └── js │ │ └── scripts.js ├── app │ ├── app.component.scss │ ├── component │ │ ├── home │ │ │ ├── home.component.scss │ │ │ └── home.component.spec.ts │ │ ├── logout │ │ │ ├── logout.component.scss │ │ │ ├── logout.component.html │ │ │ ├── logout.component.spec.ts │ │ │ └── logout.component.ts │ │ ├── navbar │ │ │ ├── navbar.component.scss │ │ │ └── navbar.component.spec.ts │ │ ├── workspace │ │ │ ├── customer │ │ │ │ ├── index │ │ │ │ │ ├── index.component.scss │ │ │ │ │ ├── index.component.html │ │ │ │ │ ├── index.component.ts │ │ │ │ │ └── index.component.spec.ts │ │ │ │ ├── reservation │ │ │ │ │ ├── reservation.component.scss │ │ │ │ │ ├── reservation-details │ │ │ │ │ │ ├── reservation-details.component.scss │ │ │ │ │ │ └── reservation-details.component.spec.ts │ │ │ │ │ ├── assigned-worker │ │ │ │ │ │ ├── assigned-worker.component.ts │ │ │ │ │ │ ├── assigned-worker.component.spec.ts │ │ │ │ │ │ └── assigned-worker.component.html │ │ │ │ │ └── reservation.component.spec.ts │ │ │ │ ├── rating │ │ │ │ │ ├── rating.component.spec.ts │ │ │ │ │ └── rating.component.ts │ │ │ │ ├── profile │ │ │ │ │ └── profile.component.spec.ts │ │ │ │ └── favourite │ │ │ │ │ └── favourite.component.spec.ts │ │ │ ├── manager │ │ │ │ ├── index │ │ │ │ │ ├── index.component.scss │ │ │ │ │ ├── index.component.html │ │ │ │ │ ├── index.component.ts │ │ │ │ │ └── index.component.spec.ts │ │ │ │ ├── reservation │ │ │ │ │ ├── reservation.component.scss │ │ │ │ │ ├── reservation-calendar │ │ │ │ │ │ ├── reservation-calendar.component.scss │ │ │ │ │ │ ├── reservation-calendar.component.html │ │ │ │ │ │ └── reservation-calendar.component.spec.ts │ │ │ │ │ ├── reservation-detail │ │ │ │ │ │ ├── reservation-detail.component.scss │ │ │ │ │ │ └── reservation-detail.component.spec.ts │ │ │ │ │ └── reservation.component.spec.ts │ │ │ │ ├── worker │ │ │ │ │ ├── worker.component.spec.ts │ │ │ │ │ └── worker-assignment │ │ │ │ │ │ ├── worker-assignment.component.spec.ts │ │ │ │ │ │ └── worker-assignment.component.scss │ │ │ │ ├── profile │ │ │ │ │ └── profile.component.spec.ts │ │ │ │ ├── category │ │ │ │ │ ├── category.component.spec.ts │ │ │ │ │ └── category.component.scss │ │ │ │ └── service-detail │ │ │ │ │ ├── service-detail.component.spec.ts │ │ │ │ │ └── service-detail.component.scss │ │ │ ├── owner │ │ │ │ ├── index │ │ │ │ │ ├── index.component.scss │ │ │ │ │ ├── index.component.html │ │ │ │ │ ├── index.component.ts │ │ │ │ │ └── index.component.spec.ts │ │ │ │ └── profile │ │ │ │ │ ├── profile.component.scss │ │ │ │ │ ├── profile.component.html │ │ │ │ │ ├── profile.component.ts │ │ │ │ │ └── profile.component.spec.ts │ │ │ └── worker │ │ │ │ ├── index │ │ │ │ ├── index.component.scss │ │ │ │ ├── index.component.html │ │ │ │ ├── index.component.ts │ │ │ │ └── index.component.spec.ts │ │ │ │ ├── reservation │ │ │ │ ├── reservation-calendar │ │ │ │ │ ├── reservation-calendar.component.scss │ │ │ │ │ ├── reservation-calendar.component.html │ │ │ │ │ └── reservation-calendar.component.spec.ts │ │ │ │ ├── reservation.component.scss │ │ │ │ ├── reservation-details │ │ │ │ │ ├── reservation-details.component.scss │ │ │ │ │ └── reservation-details.component.spec.ts │ │ │ │ └── reservation.component.spec.ts │ │ │ │ └── profile │ │ │ │ └── profile.component.spec.ts │ │ ├── saloon │ │ │ ├── saloon-calendar │ │ │ │ └── saloon-calendar │ │ │ │ │ ├── saloon-calendar.component.scss │ │ │ │ │ └── saloon-calendar.component.spec.ts │ │ │ ├── saloon.component.spec.ts │ │ │ ├── saloon-detail │ │ │ │ └── saloon-detail.component.spec.ts │ │ │ └── saloon.component.scss │ │ ├── about │ │ │ ├── about.component.ts │ │ │ ├── about.component.spec.ts │ │ │ └── about.component.scss │ │ ├── contact │ │ │ ├── contact.component.ts │ │ │ └── contact.component.spec.ts │ │ ├── error │ │ │ └── error404 │ │ │ │ ├── error404.component.ts │ │ │ │ ├── error404.component.scss │ │ │ │ ├── error404.component.spec.ts │ │ │ │ └── error404.component.html │ │ ├── authentication │ │ │ ├── authentication.component.scss │ │ │ └── authentication.component.spec.ts │ │ ├── registration │ │ │ ├── registration.component.scss │ │ │ └── registration.component.spec.ts │ │ └── location │ │ │ ├── location.component.spec.ts │ │ │ ├── location.component.scss │ │ │ ├── location.component.html │ │ │ └── location.component.ts │ ├── model │ │ ├── response │ │ │ ├── page │ │ │ │ ├── sort-response.ts │ │ │ │ ├── pageable-response.ts │ │ │ │ ├── page-response.spec.ts │ │ │ │ ├── sort-response.spec.ts │ │ │ │ ├── pageable-response.spec.ts │ │ │ │ └── page-response.ts │ │ │ ├── login-response.spec.ts │ │ │ ├── register-response.ts │ │ │ ├── api │ │ │ │ ├── api-payload-tag.spec.ts │ │ │ │ ├── api-payload-saloon.spec.ts │ │ │ │ ├── api-payload-task-list.spec.ts │ │ │ │ ├── api-payload-credential.spec.ts │ │ │ │ ├── api-payload-reservation.spec.ts │ │ │ │ ├── api-payload-saloon-list.spec.ts │ │ │ │ ├── api-payload-d-exception-msg.spec.ts │ │ │ │ ├── api-payload-login-response.spec.ts │ │ │ │ ├── api-payload-register-response.spec.ts │ │ │ │ ├── api-payload-customer-favourite-response.spec.ts │ │ │ │ ├── api-payload-customer-reservation-response.spec.ts │ │ │ │ ├── api-payload-reservation-container-response.spec.ts │ │ │ │ ├── api-payload-tag.ts │ │ │ │ ├── api-payload-task-list.ts │ │ │ │ ├── api-payload-saloon-list.ts │ │ │ │ ├── api-payload-credential.ts │ │ │ │ ├── api-payload-saloon.ts │ │ │ │ ├── api-payload-login-response.ts │ │ │ │ ├── api-payload-register-response.ts │ │ │ │ ├── api-payload-reservation.ts │ │ │ │ ├── api-payload-service-details-reservation-container-response.spec.ts │ │ │ │ ├── api-payload-customer-profile-response.ts │ │ │ │ ├── api-payload-customer-favourite-response.ts │ │ │ │ ├── api-payload-customer-reservation-response.ts │ │ │ │ ├── api-payload-reservation-container-response.ts │ │ │ │ ├── api-payload-service-details-reservation-container-response.ts │ │ │ │ └── api-payload-d-exception-msg.ts │ │ │ ├── login-response.ts │ │ │ ├── register-response.spec.ts │ │ │ ├── worker-profile-response.spec.ts │ │ │ ├── manager-profile-response.spec.ts │ │ │ ├── customer-profile-response.spec.ts │ │ │ ├── customer-favourite-response.spec.ts │ │ │ ├── manager-reservation-response.spec.ts │ │ │ ├── manager-worker-info-response.spec.ts │ │ │ ├── container │ │ │ │ ├── customer-container-response.spec.ts │ │ │ │ └── customer-container-response.ts │ │ │ ├── customer-reservation-response.spec.ts │ │ │ ├── reservation-begin-end-task-response.ts │ │ │ ├── reservation-container-response.spec.ts │ │ │ ├── reservation-sub-worker-response.spec.ts │ │ │ ├── manager-worker-assignment-response.spec.ts │ │ │ ├── reservation-begin-end-task-response.spec.ts │ │ │ ├── service-details-reservation-container-response.spec.ts │ │ │ ├── manager-worker-assignment-response.ts │ │ │ ├── manager-worker-info-response.ts │ │ │ ├── reservation-sub-worker-response.ts │ │ │ ├── manager-reservation-response.ts │ │ │ ├── worker-profile-response.ts │ │ │ ├── service-details-reservation-container-response.ts │ │ │ ├── customer-favourite-response.ts │ │ │ ├── customer-reservation-response.ts │ │ │ ├── reservation-container-response.ts │ │ │ ├── manager-profile-response.ts │ │ │ └── customer-profile-response.ts │ │ ├── exception-msg.ts │ │ ├── tag.spec.ts │ │ ├── task.spec.ts │ │ ├── rating.spec.ts │ │ ├── saloon.spec.ts │ │ ├── category.spec.ts │ │ ├── customer.spec.ts │ │ ├── employee.spec.ts │ │ ├── location.spec.ts │ │ ├── favourite.spec.ts │ │ ├── saloon-tag.spec.ts │ │ ├── toastr-msg.spec.ts │ │ ├── user-image.spec.ts │ │ ├── credential.spec.ts │ │ ├── reservation.spec.ts │ │ ├── saloon-image.spec.ts │ │ ├── exception-msg.spec.ts │ │ ├── ordered-detail.spec.ts │ │ ├── service-detail.spec.ts │ │ ├── toastr-msg.ts │ │ ├── user-rating.ts │ │ ├── date-backend-format.ts │ │ ├── request │ │ │ ├── login-request.spec.ts │ │ │ ├── login-request.ts │ │ │ ├── category-request.spec.ts │ │ │ ├── register-request.spec.ts │ │ │ ├── client-page-request.spec.ts │ │ │ ├── reservation-request.spec.ts │ │ │ ├── ordered-detail-request.spec.ts │ │ │ ├── service-detail-request.spec.ts │ │ │ ├── task-begin-end-request.spec.ts │ │ │ ├── worker-profile-request.spec.ts │ │ │ ├── manager-profile-request.spec.ts │ │ │ ├── reservation-detail-request.spec.ts │ │ │ ├── reservation-detail-request.ts │ │ │ ├── customer-profile-info-request.spec.ts │ │ │ ├── task-update-description-request.spec.ts │ │ │ ├── reservation-assign-worker-request.spec.ts │ │ │ ├── ordered-detail-request.ts │ │ │ ├── category-request.ts │ │ │ ├── task-begin-end-request.ts │ │ │ ├── reservation-assign-worker-request.ts │ │ │ ├── client-page-request.ts │ │ │ ├── task-update-description-request.ts │ │ │ ├── service-detail-request.ts │ │ │ ├── reservation-request.ts │ │ │ ├── register-request.ts │ │ │ ├── manager-profile-request.ts │ │ │ ├── worker-profile-request.ts │ │ │ └── customer-profile-info-request.ts │ │ ├── ordered-detail-id.spec.ts │ │ ├── ordered-detail-id.ts │ │ ├── user-role-based-authority.ts │ │ ├── tag.ts │ │ ├── location.ts │ │ ├── reservation-status.ts │ │ ├── user-image.ts │ │ ├── category.ts │ │ ├── saloon-image.ts │ │ ├── saloon-tag.ts │ │ ├── favourite.ts │ │ ├── service-detail.ts │ │ ├── ordered-detail.ts │ │ ├── credential.ts │ │ ├── rating.ts │ │ ├── saloon.ts │ │ ├── reservation.ts │ │ ├── task.ts │ │ ├── employee.ts │ │ └── customer.ts │ ├── guard │ │ ├── owner.guard.spec.ts │ │ ├── worker.guard.spec.ts │ │ ├── manager.guard.spec.ts │ │ ├── customer.guard.spec.ts │ │ ├── registration.guard.spec.ts │ │ ├── saloon-detail.guard.spec.ts │ │ ├── authentication.guard.spec.ts │ │ ├── registration.guard.ts │ │ ├── authentication.guard.ts │ │ ├── saloon-detail.guard.ts │ │ ├── owner.guard.ts │ │ ├── customer.guard.ts │ │ ├── manager.guard.ts │ │ └── worker.guard.ts │ ├── service │ │ ├── tag.service.spec.ts │ │ ├── task.service.spec.ts │ │ ├── saloon.service.spec.ts │ │ ├── calendar.service.spec.ts │ │ ├── category.service.spec.ts │ │ ├── customer.service.spec.ts │ │ ├── employee.service.spec.ts │ │ ├── location.service.spec.ts │ │ ├── credential.service.spec.ts │ │ ├── reservation.service.spec.ts │ │ ├── notification.service.spec.ts │ │ ├── registration.service.spec.ts │ │ ├── error-handler.service.spec.ts │ │ ├── ordered-detail.service.spec.ts │ │ ├── service-detail.service.spec.ts │ │ ├── authentication.service.spec.ts │ │ ├── health-liveness.service.spec.ts │ │ ├── employee │ │ │ ├── worker │ │ │ │ ├── worker-profile.service.spec.ts │ │ │ │ ├── worker-reservation.service.spec.ts │ │ │ │ ├── worker-reservation-task.service.spec.ts │ │ │ │ ├── worker-reservation-detail.service.spec.ts │ │ │ │ └── worker-reservation-detail.service.ts │ │ │ └── manager │ │ │ │ ├── manager-profile.service.spec.ts │ │ │ │ ├── manager-category.service.spec.ts │ │ │ │ ├── manager-reservation.service.spec.ts │ │ │ │ ├── manager-service-detail.service.spec.ts │ │ │ │ ├── manager-worker-service.service.spec.ts │ │ │ │ ├── manager-worker-assignment.service.spec.ts │ │ │ │ └── manager-reservation-detail.service.spec.ts │ │ ├── customer │ │ │ ├── customer-profile.service.spec.ts │ │ │ ├── customer-favourite.service.spec.ts │ │ │ ├── customer-reservation.service.spec.ts │ │ │ └── customer-reservation-detail.service.spec.ts │ │ ├── category.service.ts │ │ ├── tag.service.ts │ │ ├── task.service.ts │ │ ├── notification.service.ts │ │ ├── error-handler.service.ts │ │ ├── authentication.service.ts │ │ ├── registration.service.ts │ │ ├── health-liveness.service.ts │ │ ├── location.service.ts │ │ ├── credential.service.ts │ │ ├── service-detail.service.ts │ │ └── ordered-detail.service.ts │ ├── app.component.spec.ts │ ├── app.component.ts │ └── app.component.html ├── favicon.ico ├── environments │ ├── environment.preprod.ts │ ├── environment.prod.ts │ ├── environment.staging.ts │ └── environment.ts ├── main.ts ├── test.ts ├── styles.scss └── index.html ├── .env ├── .dockerignore ├── Dockerfile ├── .editorconfig ├── azure-pipelines.yml ├── tsconfig.app.json ├── tsconfig.spec.json ├── compose.yml ├── .github └── workflows │ ├── pipeline-dev-pr.yml │ ├── pipeline-prod-pr.yml │ ├── pipeline-preprod-pr.yml │ ├── pipeline-staging-pr.yml │ ├── pipeline-dev-push.yml │ ├── pipeline-preprod-push.yml │ ├── pipeline-staging-push.yml │ └── pipeline-prod-push.yml ├── .browserslistrc ├── nginx.conf ├── .gitignore ├── tsconfig.json ├── README.md ├── k8s ├── prod │ └── app-deployment-service.yml ├── preprod │ └── app-deployment-service.yml ├── staging │ └── app-deployment-service.yml └── dev │ └── app-deployment-service.yml ├── package.json └── karma.conf.js /src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/component/home/home.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/component/logout/logout.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/component/navbar/navbar.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | 2 | PROFILE=staging 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/app/component/workspace/customer/index/index.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/index/index.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/component/workspace/owner/index/index.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/component/workspace/worker/index/index.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/component/workspace/owner/profile/profile.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/component/logout/logout.component.html: -------------------------------------------------------------------------------- 1 |

logout works!

2 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/reservation/reservation.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/model/response/page/sort-response.ts: -------------------------------------------------------------------------------- 1 | export class SortResponse { 2 | } 3 | -------------------------------------------------------------------------------- /src/app/component/saloon/saloon-calendar/saloon-calendar/saloon-calendar.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/component/workspace/owner/index/index.component.html: -------------------------------------------------------------------------------- 1 |

index works!

2 | -------------------------------------------------------------------------------- /src/app/component/workspace/owner/profile/profile.component.html: -------------------------------------------------------------------------------- 1 |

profile works!

2 | -------------------------------------------------------------------------------- /src/app/model/response/page/pageable-response.ts: -------------------------------------------------------------------------------- 1 | export class PageableResponse { 2 | } 3 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelimHorri/atic-frontend-app/HEAD/src/favicon.ico -------------------------------------------------------------------------------- /src/app/component/workspace/worker/reservation/reservation-calendar/reservation-calendar.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/reservation/reservation-calendar/reservation-calendar.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/index/index.component.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/component/workspace/worker/index/index.component.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/component/workspace/customer/index/index.component.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/barbershop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelimHorri/atic-frontend-app/HEAD/src/assets/barbershop.png -------------------------------------------------------------------------------- /src/assets/home/images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelimHorri/atic-frontend-app/HEAD/src/assets/home/images/1.jpg -------------------------------------------------------------------------------- /src/assets/home/images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelimHorri/atic-frontend-app/HEAD/src/assets/home/images/2.jpg -------------------------------------------------------------------------------- /src/assets/home/images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelimHorri/atic-frontend-app/HEAD/src/assets/home/images/3.jpg -------------------------------------------------------------------------------- /src/assets/home/images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SelimHorri/atic-frontend-app/HEAD/src/assets/home/images/4.jpg -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | Dockerfile* 4 | docker-compose* 5 | .dockerignore 6 | .git 7 | .gitignore 8 | README.md 9 | LICENSE 10 | .vscode -------------------------------------------------------------------------------- /src/app/model/exception-msg.ts: -------------------------------------------------------------------------------- 1 | 2 | export class ExceptionMsg { 3 | 4 | constructor(public errorMsg: string) { 5 | } 6 | 7 | 8 | 9 | } 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/app/model/tag.spec.ts: -------------------------------------------------------------------------------- 1 | import { Tag } from './tag'; 2 | 3 | describe('Tag', () => { 4 | it('should create an instance', () => { 5 | expect(new Tag()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/task.spec.ts: -------------------------------------------------------------------------------- 1 | import { Task } from './task'; 2 | 3 | describe('Task', () => { 4 | it('should create an instance', () => { 5 | expect(new Task()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/rating.spec.ts: -------------------------------------------------------------------------------- 1 | import { Rating } from './rating'; 2 | 3 | describe('Rating', () => { 4 | it('should create an instance', () => { 5 | expect(new Rating()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/saloon.spec.ts: -------------------------------------------------------------------------------- 1 | import { Saloon } from './saloon'; 2 | 3 | describe('Saloon', () => { 4 | it('should create an instance', () => { 5 | expect(new Saloon()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/category.spec.ts: -------------------------------------------------------------------------------- 1 | import { Category } from './category'; 2 | 3 | describe('Category', () => { 4 | it('should create an instance', () => { 5 | expect(new Category()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/customer.spec.ts: -------------------------------------------------------------------------------- 1 | import { Customer } from './customer'; 2 | 3 | describe('Customer', () => { 4 | it('should create an instance', () => { 5 | expect(new Customer()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/employee.spec.ts: -------------------------------------------------------------------------------- 1 | import { Employee } from './employee'; 2 | 3 | describe('Employee', () => { 4 | it('should create an instance', () => { 5 | expect(new Employee()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/location.spec.ts: -------------------------------------------------------------------------------- 1 | import { Location } from './location'; 2 | 3 | describe('Location', () => { 4 | it('should create an instance', () => { 5 | expect(new Location()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/favourite.spec.ts: -------------------------------------------------------------------------------- 1 | import { Favourite } from './favourite'; 2 | 3 | describe('Favourite', () => { 4 | it('should create an instance', () => { 5 | expect(new Favourite()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/saloon-tag.spec.ts: -------------------------------------------------------------------------------- 1 | import { SaloonTag } from './saloon-tag'; 2 | 3 | describe('SaloonTag', () => { 4 | it('should create an instance', () => { 5 | expect(new SaloonTag()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/toastr-msg.spec.ts: -------------------------------------------------------------------------------- 1 | import { ToastrMsg } from './toastr-msg'; 2 | 3 | describe('ToastrMsg', () => { 4 | it('should create an instance', () => { 5 | expect(new ToastrMsg()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/user-image.spec.ts: -------------------------------------------------------------------------------- 1 | import { UserImage } from './user-image'; 2 | 3 | describe('UserImage', () => { 4 | it('should create an instance', () => { 5 | expect(new UserImage()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/credential.spec.ts: -------------------------------------------------------------------------------- 1 | import { Credential } from './credential'; 2 | 3 | describe('Credential', () => { 4 | it('should create an instance', () => { 5 | expect(new Credential()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/reservation.spec.ts: -------------------------------------------------------------------------------- 1 | import { Reservation } from './reservation'; 2 | 3 | describe('Reservation', () => { 4 | it('should create an instance', () => { 5 | expect(new Reservation()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/saloon-image.spec.ts: -------------------------------------------------------------------------------- 1 | import { SaloonImage } from './saloon-image'; 2 | 3 | describe('SaloonImage', () => { 4 | it('should create an instance', () => { 5 | expect(new SaloonImage()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/exception-msg.spec.ts: -------------------------------------------------------------------------------- 1 | import { ExceptionMsg } from './exception-msg'; 2 | 3 | describe('ExceptionMsg', () => { 4 | it('should create an instance', () => { 5 | expect(new ExceptionMsg()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/ordered-detail.spec.ts: -------------------------------------------------------------------------------- 1 | import { OrderedDetail } from './ordered-detail'; 2 | 3 | describe('OrderedDetail', () => { 4 | it('should create an instance', () => { 5 | expect(new OrderedDetail()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/service-detail.spec.ts: -------------------------------------------------------------------------------- 1 | import { ServiceDetail } from './service-detail'; 2 | 3 | describe('ServiceDetail', () => { 4 | it('should create an instance', () => { 5 | expect(new ServiceDetail()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/toastr-msg.ts: -------------------------------------------------------------------------------- 1 | 2 | export class ToastrMsg { 3 | 4 | constructor(public message: string, public title: string) { 5 | } 6 | 7 | 8 | 9 | } 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/app/model/user-rating.ts: -------------------------------------------------------------------------------- 1 | 2 | export enum UserRating { 3 | 4 | VERY_BAD = 1, 5 | BAD = 2, 6 | NEUTRAL = 3, 7 | GOOD = 4, 8 | PERFECT = 5 9 | 10 | } 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/app/model/date-backend-format.ts: -------------------------------------------------------------------------------- 1 | 2 | export enum DateBackendFormat { 3 | 4 | LOCAL_DATE = "DD-MM-yyyy", 5 | LOCAL_DATE_TIME = "DD-MM-yyyy__HH:mm:ss:SSSSSS" 6 | 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/app/model/request/login-request.spec.ts: -------------------------------------------------------------------------------- 1 | import { LoginRequest } from './login-request'; 2 | 3 | describe('LoginRequest', () => { 4 | it('should create an instance', () => { 5 | expect(new LoginRequest()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/request/login-request.ts: -------------------------------------------------------------------------------- 1 | 2 | export class LoginRequest { 3 | 4 | constructor(public username: string, public password: string) { 5 | 6 | } 7 | 8 | 9 | 10 | } 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/app/model/response/login-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { LoginResponse } from './login-response'; 2 | 3 | describe('LoginResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new LoginResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/page/page-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { PageResponse } from './page-response'; 2 | 3 | describe('PageResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new PageResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/page/sort-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { SortResponse } from './sort-response'; 2 | 3 | describe('SortResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new SortResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/register-response.ts: -------------------------------------------------------------------------------- 1 | 2 | export class RegisterResponse { 3 | 4 | constructor(public isSuccess: boolean, public msg: string) { 5 | } 6 | 7 | 8 | 9 | } 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/app/model/ordered-detail-id.spec.ts: -------------------------------------------------------------------------------- 1 | import { OrderedDetailId } from './ordered-detail-id'; 2 | 3 | describe('OrderedDetailId', () => { 4 | it('should create an instance', () => { 5 | expect(new OrderedDetailId()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-tag.spec.ts: -------------------------------------------------------------------------------- 1 | import { ApiPayloadTag } from './api-payload-tag'; 2 | 3 | describe('ApiPayloadTag', () => { 4 | it('should create an instance', () => { 5 | expect(new ApiPayloadTag()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/login-response.ts: -------------------------------------------------------------------------------- 1 | 2 | export class LoginResponse { 3 | 4 | constructor(public username: string, public jwtToken: string) { 5 | } 6 | 7 | 8 | 9 | } 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/app/model/request/category-request.spec.ts: -------------------------------------------------------------------------------- 1 | import { CategoryRequest } from './category-request'; 2 | 3 | describe('CategoryRequest', () => { 4 | it('should create an instance', () => { 5 | expect(new CategoryRequest()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/request/register-request.spec.ts: -------------------------------------------------------------------------------- 1 | import { RegisterRequest } from './register-request'; 2 | 3 | describe('RegisterRequest', () => { 4 | it('should create an instance', () => { 5 | expect(new RegisterRequest()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/component/workspace/worker/reservation/reservation-calendar/reservation-calendar.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 |
6 |
7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/app/model/response/register-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { RegisterResponse } from './register-response'; 2 | 3 | describe('RegisterResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new RegisterResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/reservation/reservation-calendar/reservation-calendar.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 |
6 |
7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/app/model/request/client-page-request.spec.ts: -------------------------------------------------------------------------------- 1 | import { ClientPageRequest } from './client-page-request'; 2 | 3 | describe('ClientPageRequest', () => { 4 | it('should create an instance', () => { 5 | expect(new ClientPageRequest()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-saloon.spec.ts: -------------------------------------------------------------------------------- 1 | import { ApiPayloadSaloon } from './api-payload-saloon'; 2 | 3 | describe('ApiPayloadSaloon', () => { 4 | it('should create an instance', () => { 5 | expect(new ApiPayloadSaloon()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/page/pageable-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { PageableResponse } from './pageable-response'; 2 | 3 | describe('PageableResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new PageableResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/request/reservation-request.spec.ts: -------------------------------------------------------------------------------- 1 | import { ReservationRequest } from './reservation-request'; 2 | 3 | describe('ReservationRequest', () => { 4 | it('should create an instance', () => { 5 | expect(new ReservationRequest()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/ordered-detail-id.ts: -------------------------------------------------------------------------------- 1 | 2 | export class OrderedDetailId { 3 | 4 | constructor( 5 | public reservationId: number, 6 | public serviceDetailId: number) { 7 | } 8 | 9 | 10 | 11 | } 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/app/model/user-role-based-authority.ts: -------------------------------------------------------------------------------- 1 | 2 | export enum UserRoleBasedAuthority { 3 | 4 | CUSTOMER = "CUSTOMER", 5 | WORKER = "WORKER", 6 | MANAGER = "MANAGER", 7 | OWNER = "OWNER", 8 | ADMIN = "ADMIN" 9 | 10 | } 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/app/model/request/ordered-detail-request.spec.ts: -------------------------------------------------------------------------------- 1 | import { OrderedDetailRequest } from './ordered-detail-request'; 2 | 3 | describe('OrderedDetailRequest', () => { 4 | it('should create an instance', () => { 5 | expect(new OrderedDetailRequest()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/request/service-detail-request.spec.ts: -------------------------------------------------------------------------------- 1 | import { ServiceDetailRequest } from './service-detail-request'; 2 | 3 | describe('ServiceDetailRequest', () => { 4 | it('should create an instance', () => { 5 | expect(new ServiceDetailRequest()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/request/task-begin-end-request.spec.ts: -------------------------------------------------------------------------------- 1 | import { TaskBeginEndRequest } from './task-begin-end-request'; 2 | 3 | describe('TaskBeginEndRequest', () => { 4 | it('should create an instance', () => { 5 | expect(new TaskBeginEndRequest()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/request/worker-profile-request.spec.ts: -------------------------------------------------------------------------------- 1 | import { WorkerProfileRequest } from './worker-profile-request'; 2 | 3 | describe('WorkerProfileRequest', () => { 4 | it('should create an instance', () => { 5 | expect(new WorkerProfileRequest()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-task-list.spec.ts: -------------------------------------------------------------------------------- 1 | import { ApiPayloadTaskList } from './api-payload-task-list'; 2 | 3 | describe('ApiPayloadTaskList', () => { 4 | it('should create an instance', () => { 5 | expect(new ApiPayloadTaskList()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/request/manager-profile-request.spec.ts: -------------------------------------------------------------------------------- 1 | import { ManagerProfileRequest } from './manager-profile-request'; 2 | 3 | describe('ManagerProfileRequest', () => { 4 | it('should create an instance', () => { 5 | expect(new ManagerProfileRequest()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-credential.spec.ts: -------------------------------------------------------------------------------- 1 | import { ApiPayloadCredential } from './api-payload-credential'; 2 | 3 | describe('ApiPayloadCredential', () => { 4 | it('should create an instance', () => { 5 | expect(new ApiPayloadCredential()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/worker-profile-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { WorkerProfileResponse } from './worker-profile-response'; 2 | 3 | describe('WorkerProfileResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new WorkerProfileResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-reservation.spec.ts: -------------------------------------------------------------------------------- 1 | import { ApiPayloadReservation } from './api-payload-reservation'; 2 | 3 | describe('ApiPayloadReservation', () => { 4 | it('should create an instance', () => { 5 | expect(new ApiPayloadReservation()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-saloon-list.spec.ts: -------------------------------------------------------------------------------- 1 | import { ApiPayloadSaloonList } from './api-payload-saloon-list'; 2 | 3 | describe('ApiPayloadSaloonList', () => { 4 | it('should create an instance', () => { 5 | expect(new ApiPayloadSaloonList()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/manager-profile-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { ManagerProfileResponse } from './manager-profile-response'; 2 | 3 | describe('ManagerProfileResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new ManagerProfileResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/customer-profile-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { CustomerProfileResponse } from './customer-profile-response'; 2 | 3 | describe('CustomerProfileResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new CustomerProfileResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/request/reservation-detail-request.spec.ts: -------------------------------------------------------------------------------- 1 | import { ReservationDetailRequest } from './reservation-detail-request'; 2 | 3 | describe('ReservationDetailRequest', () => { 4 | it('should create an instance', () => { 5 | expect(new ReservationDetailRequest()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/tag.ts: -------------------------------------------------------------------------------- 1 | 2 | export class Tag { 3 | 4 | constructor( 5 | public id: number, 6 | public identifier: string, 7 | public name: string, 8 | public description: string | null) { 9 | } 10 | 11 | 12 | 13 | } 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-d-exception-msg.spec.ts: -------------------------------------------------------------------------------- 1 | import { ApiPayloadDExceptionMsg } from './api-payload-d-exception-msg'; 2 | 3 | describe('ApiPayloadDExceptionMsg', () => { 4 | it('should create an instance', () => { 5 | expect(new ApiPayloadDExceptionMsg()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-login-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { ApiPayloadLoginResponse } from './api-payload-login-response'; 2 | 3 | describe('ApiPayloadLoginResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new ApiPayloadLoginResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/customer-favourite-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { CustomerFavouriteResponse } from './customer-favourite-response'; 2 | 3 | describe('CustomerFavouriteResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new CustomerFavouriteResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/request/reservation-detail-request.ts: -------------------------------------------------------------------------------- 1 | 2 | export class ReservationDetailRequest { 3 | 4 | constructor( 5 | public reservationId: number, 6 | public description: string | undefined) { 7 | } 8 | 9 | 10 | 11 | } 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/app/model/response/manager-reservation-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { ManagerReservationResponse } from './manager-reservation-response'; 2 | 3 | describe('ManagerReservationResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new ManagerReservationResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/manager-worker-info-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { ManagerWorkerInfoResponse } from './manager-worker-info-response'; 2 | 3 | describe('ManagerWorkerInfoResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new ManagerWorkerInfoResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/request/customer-profile-info-request.spec.ts: -------------------------------------------------------------------------------- 1 | import { CustomerProfileInfoRequest } from './customer-profile-info-request'; 2 | 3 | describe('CustomerProfileInfoRequest', () => { 4 | it('should create an instance', () => { 5 | expect(new CustomerProfileInfoRequest()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/container/customer-container-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { CustomerContainerResponse } from './customer-container-response'; 2 | 3 | describe('CustomerContainerResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new CustomerContainerResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/customer-reservation-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { CustomerReservationResponse } from './customer-reservation-response'; 2 | 3 | describe('CustomerReservationResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new CustomerReservationResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-register-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { ApiPayloadRegisterResponse } from './api-payload-register-response'; 2 | 3 | describe('ApiPayloadRegisterResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new ApiPayloadRegisterResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/reservation-begin-end-task-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Task } from "../task"; 3 | 4 | export class ReservationBeginEndTaskResponse { 5 | 6 | constructor(public taskBegin: Task, public taskEnd: Task) { 7 | } 8 | 9 | 10 | 11 | } 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/app/model/response/reservation-container-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { ReservationContainerResponse } from './reservation-container-response'; 2 | 3 | describe('ReservationContainerResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new ReservationContainerResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/request/task-update-description-request.spec.ts: -------------------------------------------------------------------------------- 1 | import { TaskUpdateDescriptionRequest } from './task-update-description-request'; 2 | 3 | describe('TaskUpdateDescriptionRequest', () => { 4 | it('should create an instance', () => { 5 | expect(new TaskUpdateDescriptionRequest()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/reservation-sub-worker-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { ReservationSubWorkerResponse } from './reservation-sub-worker-response'; 2 | 3 | describe('ReservationSubWorkerResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new ReservationSubWorkerResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/request/reservation-assign-worker-request.spec.ts: -------------------------------------------------------------------------------- 1 | import { ReservationAssignWorkerRequest } from './reservation-assign-worker-request'; 2 | 3 | describe('ReservationAssignWorkerRequest', () => { 4 | it('should create an instance', () => { 5 | expect(new ReservationAssignWorkerRequest()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/environments/environment.preprod.ts: -------------------------------------------------------------------------------- 1 | 2 | const HOST_URL: string = "http://localhost:8400"; 3 | const API_URL_CONTEXT_V0: string = "/api/v0"; 4 | 5 | export const environment = { 6 | staging: false, 7 | preprod: true, 8 | production: false, 9 | API_URL: HOST_URL + API_URL_CONTEXT_V0, 10 | }; 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | 2 | const HOST_URL: string = "http://localhost:8400"; 3 | const API_URL_CONTEXT_V0: string = "/api/v0"; 4 | 5 | export const environment = { 6 | staging: false, 7 | preprod: false, 8 | production: true, 9 | API_URL: HOST_URL + API_URL_CONTEXT_V0, 10 | }; 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/environments/environment.staging.ts: -------------------------------------------------------------------------------- 1 | 2 | const HOST_URL: string = "http://localhost:8400"; 3 | const API_URL_CONTEXT_V0: string = "/api/v0"; 4 | 5 | export const environment = { 6 | staging: true, 7 | preprod: false, 8 | production: false, 9 | API_URL: HOST_URL + API_URL_CONTEXT_V0, 10 | }; 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | 2 | #stage1 3 | FROM node as node 4 | RUN mkdir -p /home/app 5 | WORKDIR /home/app 6 | COPY . . 7 | ENV PROFILE=staging 8 | RUN npm i 9 | RUN npm run build --configuration=${PROFILE} 10 | 11 | #stage 2 12 | FROM nginx:alpine 13 | COPY --from=node /home/app/dist/cita-frontend-app /usr/share/nginx/html 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/app/model/location.ts: -------------------------------------------------------------------------------- 1 | 2 | export class Location { 3 | 4 | constructor( 5 | public id: number, 6 | public identifier: string, 7 | public zipcode: string, 8 | public city: string, 9 | public state: string) { 10 | } 11 | 12 | 13 | 14 | } 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/app/model/request/ordered-detail-request.ts: -------------------------------------------------------------------------------- 1 | 2 | export class OrderedDetailRequest { 3 | 4 | constructor( 5 | public reservationId: number, 6 | public serviceDetailId: number, 7 | public orderedDate?: Date | string) { 8 | } 9 | 10 | 11 | 12 | } 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/app/model/response/manager-worker-assignment-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { ManagerWorkerAssignmentResponse } from './manager-worker-assignment-response'; 2 | 3 | describe('ManagerWorkerAssignmentResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new ManagerWorkerAssignmentResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/reservation-begin-end-task-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { ReservationBeginEndTaskResponse } from './reservation-begin-end-task-response'; 2 | 3 | describe('ReservationBeginEndTaskResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new ReservationBeginEndTaskResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/reservation-status.ts: -------------------------------------------------------------------------------- 1 | 2 | export enum ReservationStatus { 3 | 4 | NOT_STARTED = "NOT_STARTED", 5 | IN_PROGRESS = "IN_PROGRESS", 6 | COMPLETED = "COMPLETED", 7 | CANCELLED = "CANCELLED", 8 | OUTDATED = "OUTDATED", 9 | NOT_CLOSED = "NOT_CLOSED" 10 | 11 | } 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /src/assets/home/js/scripts.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - Blog Home v5.0.7 (https://startbootstrap.com/template/blog-home) 3 | * Copyright 2013-2021 Start Bootstrap 4 | * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-blog-home/blob/master/LICENSE) 5 | */ 6 | // This file is intentionally blank 7 | // Use this file to add JavaScript to your project -------------------------------------------------------------------------------- /src/app/model/request/category-request.ts: -------------------------------------------------------------------------------- 1 | 2 | export class CategoryRequest { 3 | 4 | constructor( 5 | public categoryId: number, 6 | public name: string, 7 | public parentCategoryId: number | null | undefined, 8 | public saloonId: number) { 9 | } 10 | 11 | 12 | 13 | } 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/app/model/request/task-begin-end-request.ts: -------------------------------------------------------------------------------- 1 | 2 | export class TaskBeginEndRequest { 3 | 4 | constructor( 5 | public username: string, 6 | public reservationId: number, 7 | public workerDescription?: string | null | undefined) { 8 | } 9 | 10 | 11 | 12 | } 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-customer-favourite-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { ApiPayloadCustomerFavouriteResponse } from './api-payload-customer-favourite-response'; 2 | 3 | describe('ApiPayloadCustomerFavouriteResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new ApiPayloadCustomerFavouriteResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/user-image.ts: -------------------------------------------------------------------------------- 1 | 2 | export class UserImage { 3 | 4 | constructor( 5 | public id: number, 6 | public identifier: string, 7 | public name: string, 8 | public type: string, 9 | public size: number, 10 | public imageLob: string) { 11 | } 12 | 13 | 14 | 15 | } 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | 2 | trigger: 3 | - develop 4 | - staging 5 | - preprod 6 | - master 7 | 8 | pool: 9 | vmImage: ubuntu-latest 10 | 11 | steps: 12 | - task: NodeTool@0 13 | inputs: 14 | versionSpec: '16.x' 15 | displayName: 'Install Node.js' 16 | 17 | - script: | 18 | npm install 19 | npm run build 20 | displayName: 'npm install and build' 21 | -------------------------------------------------------------------------------- /tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": [] 7 | }, 8 | "files": [ 9 | "src/main.ts", 10 | "src/polyfills.ts" 11 | ], 12 | "include": [ 13 | "src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-customer-reservation-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { ApiPayloadCustomerReservationResponse } from './api-payload-customer-reservation-response'; 2 | 3 | describe('ApiPayloadCustomerReservationResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new ApiPayloadCustomerReservationResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/component/about/about.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-about', 5 | templateUrl: './about.component.html', 6 | styleUrls: ['./about.component.scss'] 7 | }) 8 | export class AboutComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit(): void { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-reservation-container-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { ApiPayloadReservationContainerResponse } from './api-payload-reservation-container-response'; 2 | 3 | describe('ApiPayloadReservationContainerResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new ApiPayloadReservationContainerResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/request/reservation-assign-worker-request.ts: -------------------------------------------------------------------------------- 1 | 2 | export class ReservationAssignWorkerRequest { 3 | 4 | constructor( 5 | public reservationId: number, 6 | public assignedWorkersIds: number[], 7 | public managerDescription?: string | null | undefined) { 8 | } 9 | 10 | 11 | 12 | } 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | 2 | const HOST_URL: string = "http://localhost:8400"; 3 | const API_URL_CONTEXT_V0: string = "/api/v0"; 4 | const USERNAME_AUTH_HEADER: string = "UsernameAuth"; 5 | 6 | export const environment = { 7 | staging: false, 8 | preprod: false, 9 | production: false, 10 | API_URL: HOST_URL + API_URL_CONTEXT_V0, 11 | }; 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/app/model/response/service-details-reservation-container-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { ServiceDetailsReservationContainerResponse } from './service-details-reservation-container-response'; 2 | 3 | describe('ServiceDetailsReservationContainerResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new ServiceDetailsReservationContainerResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-tag.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Tag } from "../../tag"; 3 | 4 | export class ApiPayloadTag { 5 | 6 | constructor( 7 | public totalResult: number, 8 | public httpStatus: string, 9 | public acknowledge: boolean, 10 | public responseBody: Tag[]) { 11 | 12 | } 13 | 14 | 15 | 16 | } 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-task-list.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Task } from "../../task"; 3 | 4 | export class ApiPayloadTaskList { 5 | 6 | constructor( 7 | public totalResult: number, 8 | public httpStatus: string, 9 | public acknowledge: boolean, 10 | public responseBody: Task[]) { 11 | 12 | } 13 | 14 | 15 | 16 | } 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/app/model/response/manager-worker-assignment-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Employee } from "../employee"; 3 | import { PageResponse } from "./page/page-response"; 4 | 5 | export class ManagerWorkerAssignmentResponse { 6 | 7 | constructor(public manager: Employee, public tasks: PageResponse) { 8 | } 9 | 10 | 11 | 12 | } 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/app/model/response/manager-worker-info-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Employee } from "../employee"; 3 | import { PageResponse } from "./page/page-response"; 4 | 5 | export class ManagerWorkerInfoResponse { 6 | 7 | constructor(public manager: Employee, public subWorkers: PageResponse) { 8 | } 9 | 10 | 11 | 12 | } 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-saloon-list.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Saloon } from "../../saloon"; 3 | 4 | export class ApiPayloadSaloonList { 5 | 6 | constructor( 7 | public totalResult: number, 8 | public httpStatus: string, 9 | public acknowledge: boolean, 10 | public responseBody: Saloon[]) { 11 | 12 | } 13 | 14 | 15 | 16 | } 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/app/model/category.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Saloon } from "./saloon"; 3 | 4 | export class Category { 5 | 6 | constructor( 7 | public id: number, 8 | public identifier: string, 9 | public name: string, 10 | public parentCategory: Category | null | undefined, 11 | public saloon: Saloon) { 12 | } 13 | 14 | 15 | 16 | } 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/app/model/request/client-page-request.ts: -------------------------------------------------------------------------------- 1 | 2 | export class ClientPageRequest { 3 | 4 | constructor( 5 | public offset: number = 1, 6 | public size: number = 5, 7 | public sortBy: undefined | string[] = [], 8 | public sortDirection: undefined | string = "desc") { 9 | } 10 | 11 | 12 | 13 | } 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-credential.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Credential } from "../../credential"; 3 | 4 | export class ApiPayloadCredential { 5 | 6 | constructor(public totalResult: number, 7 | public httpStatus: string, 8 | public acknowledge: boolean, 9 | public responseBody: Credential) { 10 | 11 | } 12 | 13 | 14 | 15 | } 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/app/component/workspace/worker/reservation/reservation.component.scss: -------------------------------------------------------------------------------- 1 | body{ 2 | background:#f3f3f3; 3 | margin-top:20px; 4 | color: #616f80; 5 | } 6 | .card { 7 | border: none; 8 | margin-bottom: 24px; 9 | -webkit-box-shadow: 0 0 13px 0 rgba(236,236,241,.44); 10 | box-shadow: 0 0 13px 0 rgba(236,236,241,.44); 11 | } 12 | 13 | .avatar-xs { 14 | height: 2.3rem; 15 | width: 2.3rem; 16 | } -------------------------------------------------------------------------------- /src/app/component/workspace/customer/reservation/reservation.component.scss: -------------------------------------------------------------------------------- 1 | body{ 2 | background:#f3f3f3; 3 | margin-top:20px; 4 | color: #616f80; 5 | } 6 | .card { 7 | border: none; 8 | margin-bottom: 24px; 9 | -webkit-box-shadow: 0 0 13px 0 rgba(236,236,241,.44); 10 | box-shadow: 0 0 13px 0 rgba(236,236,241,.44); 11 | } 12 | 13 | .avatar-xs { 14 | height: 2.3rem; 15 | width: 2.3rem; 16 | } -------------------------------------------------------------------------------- /src/app/model/response/reservation-sub-worker-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Reservation } from "../reservation"; 3 | import { PageResponse } from "./page/page-response"; 4 | 5 | export class ReservationSubWorkerResponse { 6 | 7 | constructor(public reservation: Reservation, public subWorkers: PageResponse) { 8 | } 9 | 10 | 11 | 12 | } 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-saloon.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Saloon } from "../../saloon"; 3 | 4 | export class ApiPayloadSaloon { 5 | 6 | constructor( 7 | public totalResult: number, 8 | public httpStatus: string, 9 | public acknowledge: boolean, 10 | public responseBody: Saloon) { 11 | } 12 | 13 | 14 | 15 | } 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/app/model/response/manager-reservation-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Employee } from "../employee"; 3 | import { PageResponse } from "./page/page-response"; 4 | 5 | export class ManagerReservationResponse { 6 | 7 | constructor( 8 | public manager: Employee, 9 | public reservations: PageResponse) { 10 | } 11 | 12 | 13 | 14 | } 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /src/app/guard/owner.guard.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { OwnerGuard } from './owner.guard'; 4 | 5 | describe('OwnerGuard', () => { 6 | let guard: OwnerGuard; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | guard = TestBed.inject(OwnerGuard); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(guard).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-login-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { LoginResponse } from "../login-response"; 3 | 4 | export class ApiPayloadLoginResponse { 5 | 6 | constructor( 7 | public totalResult: number, 8 | public httpStatus: string, 9 | public acknowledge: boolean, 10 | public responseBody: LoginResponse) { 11 | 12 | } 13 | 14 | 15 | 16 | } 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/app/guard/worker.guard.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { WorkerGuard } from './worker.guard'; 4 | 5 | describe('WorkerGuard', () => { 6 | let guard: WorkerGuard; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | guard = TestBed.inject(WorkerGuard); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(guard).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-register-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { RegisterResponse } from "../register-response"; 3 | 4 | export class ApiPayloadRegisterResponse { 5 | 6 | constructor( 7 | public totalResult: number, 8 | public httpStatus: string, 9 | public acknowledge: boolean, 10 | public responseBody: RegisterResponse) { 11 | 12 | } 13 | 14 | 15 | 16 | } 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-reservation.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Reservation } from "../../reservation"; 3 | 4 | export class ApiPayloadReservation { 5 | 6 | constructor( 7 | public totalResult: number, 8 | public httpStatus: string, 9 | public acknowledge: boolean, 10 | public responseBody: Reservation) { 11 | 12 | } 13 | 14 | 15 | 16 | } 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/app/service/tag.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { TagService } from './tag.service'; 4 | 5 | describe('TagService', () => { 6 | let service: TagService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(TagService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/guard/manager.guard.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ManagerGuard } from './manager.guard'; 4 | 5 | describe('ManagerGuard', () => { 6 | let guard: ManagerGuard; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | guard = TestBed.inject(ManagerGuard); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(guard).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/model/request/task-update-description-request.ts: -------------------------------------------------------------------------------- 1 | 2 | export class TaskUpdateDescriptionRequest { 3 | 4 | constructor( 5 | public username: string, 6 | public reservationId: number, 7 | public workerDescription?: string | null | undefined, 8 | public managerDescription?: string | null | undefined) { 9 | } 10 | 11 | 12 | 13 | } 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/app/guard/customer.guard.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { CustomerGuard } from './customer.guard'; 4 | 5 | describe('CustomerGuard', () => { 6 | let guard: CustomerGuard; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | guard = TestBed.inject(CustomerGuard); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(guard).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-service-details-reservation-container-response.spec.ts: -------------------------------------------------------------------------------- 1 | import { ApiPayloadServiceDetailsReservationContainerResponse } from './api-payload-service-details-reservation-container-response'; 2 | 3 | describe('ApiPayloadServiceDetailsReservationContainerResponse', () => { 4 | it('should create an instance', () => { 5 | expect(new ApiPayloadServiceDetailsReservationContainerResponse()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /src/app/model/saloon-image.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Saloon } from "./saloon"; 3 | 4 | export class SaloonImage { 5 | 6 | constructor( 7 | public id: number, 8 | public identifier: string, 9 | public name: string, 10 | public type: string, 11 | public size: number, 12 | public imageLob: string, 13 | public saloon: Saloon) { 14 | } 15 | 16 | 17 | 18 | } 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/app/service/task.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { TaskService } from './task.service'; 4 | 5 | describe('TaskService', () => { 6 | let service: TaskService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(TaskService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/component/workspace/customer/reservation/reservation-details/reservation-details.component.scss: -------------------------------------------------------------------------------- 1 | body{ 2 | background: #f4f5f7; 3 | margin-top:20px; 4 | } 5 | .cart-container { 6 | border: 1px solid rgba(0, 0, 0, 0.05); 7 | padding: 30px; 8 | } 9 | .cart-container .cart-body { 10 | border-top: 1px solid rgba(0, 0, 0, 0.05); 11 | border-bottom: 1px solid rgba(0, 0, 0, 0.05); 12 | padding: 30px 0 20px; 13 | margin: 20px 0 30px; 14 | } -------------------------------------------------------------------------------- /src/app/component/workspace/worker/reservation/reservation-details/reservation-details.component.scss: -------------------------------------------------------------------------------- 1 | body{ 2 | background: #f4f5f7; 3 | margin-top:20px; 4 | } 5 | .cart-container { 6 | border: 1px solid rgba(0, 0, 0, 0.05); 7 | padding: 30px; 8 | } 9 | .cart-container .cart-body { 10 | border-top: 1px solid rgba(0, 0, 0, 0.05); 11 | border-bottom: 1px solid rgba(0, 0, 0, 0.05); 12 | padding: 30px 0 20px; 13 | margin: 20px 0 30px; 14 | } -------------------------------------------------------------------------------- /src/app/service/saloon.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { SaloonService } from './saloon.service'; 4 | 5 | describe('SaloonService', () => { 6 | let service: SaloonService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(SaloonService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/model/request/service-detail-request.ts: -------------------------------------------------------------------------------- 1 | 2 | export class ServiceDetailRequest { 3 | 4 | constructor( 5 | public serviceDetailId: number, 6 | public name: string, 7 | public isAvailable: boolean, 8 | public duration: number, 9 | public priceUnit: number, 10 | public description: string | null, 11 | public categoryId: number) { 12 | } 13 | 14 | 15 | 16 | } 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/app/model/saloon-tag.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Saloon } from "./saloon"; 3 | import { Tag } from "./tag"; 4 | 5 | export class SaloonTag { 6 | 7 | constructor( 8 | public saloonId: number, 9 | public tagId: number, 10 | public taggedDate: Date | string, 11 | public identifier: string, 12 | public saloon: Saloon, 13 | public tag: Tag) { 14 | } 15 | 16 | 17 | 18 | } 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/app/service/calendar.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { CalendarService } from './calendar.service'; 4 | 5 | describe('CalendarService', () => { 6 | let service: CalendarService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(CalendarService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/service/category.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { CategoryService } from './category.service'; 4 | 5 | describe('CategoryService', () => { 6 | let service: CategoryService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(CategoryService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/service/customer.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { CustomerService } from './customer.service'; 4 | 5 | describe('CustomerService', () => { 6 | let service: CustomerService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(CustomerService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/service/employee.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { EmployeeService } from './employee.service'; 4 | 5 | describe('EmployeeService', () => { 6 | let service: EmployeeService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(EmployeeService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/service/location.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { LocationService } from './location.service'; 4 | 5 | describe('LocationService', () => { 6 | let service: LocationService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(LocationService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/component/contact/contact.component.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Component, OnInit } from '@angular/core'; 3 | 4 | @Component({ 5 | selector: 'app-contact', 6 | templateUrl: './contact.component.html', 7 | styleUrls: ['./contact.component.scss'] 8 | }) 9 | export class ContactComponent implements OnInit { 10 | 11 | constructor() {} 12 | 13 | ngOnInit(): void { 14 | } 15 | 16 | 17 | 18 | } 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/app/component/error/error404/error404.component.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Component, OnInit } from '@angular/core'; 3 | 4 | @Component({ 5 | selector: 'app-error404', 6 | templateUrl: './error404.component.html', 7 | styleUrls: ['./error404.component.scss'] 8 | }) 9 | export class Error404Component implements OnInit { 10 | 11 | constructor() {} 12 | 13 | ngOnInit(): void { 14 | } 15 | 16 | 17 | 18 | } 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/app/guard/registration.guard.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { RegistrationGuard } from './registration.guard'; 4 | 5 | describe('RegistrationGuard', () => { 6 | let guard: RegistrationGuard; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | guard = TestBed.inject(RegistrationGuard); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(guard).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/guard/saloon-detail.guard.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { SaloonDetailGuard } from './saloon-detail.guard'; 4 | 5 | describe('SaloonDetailGuard', () => { 6 | let guard: SaloonDetailGuard; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | guard = TestBed.inject(SaloonDetailGuard); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(guard).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/component/workspace/owner/index/index.component.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Component, OnInit } from '@angular/core'; 3 | 4 | @Component({ 5 | selector: 'app-owner-index', 6 | templateUrl: './index.component.html', 7 | styleUrls: ['./index.component.scss'] 8 | }) 9 | export class IndexComponent implements OnInit { 10 | 11 | constructor() {} 12 | 13 | ngOnInit(): void { 14 | 15 | } 16 | 17 | 18 | 19 | } 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/app/component/workspace/worker/index/index.component.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Component, OnInit } from '@angular/core'; 3 | 4 | @Component({ 5 | selector: 'app-worker-index', 6 | templateUrl: './index.component.html', 7 | styleUrls: ['./index.component.scss'] 8 | }) 9 | export class IndexComponent implements OnInit { 10 | 11 | constructor() {} 12 | 13 | ngOnInit(): void { 14 | 15 | } 16 | 17 | 18 | 19 | } 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/app/model/favourite.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Customer } from "./customer"; 3 | import { Saloon } from "./saloon"; 4 | 5 | export class Favourite { 6 | 7 | constructor( 8 | public customerId: number, 9 | public saloonId: number, 10 | public favouriteDate: Date | string, 11 | public identifier: string, 12 | public customer: Customer, 13 | public saloon: Saloon) { 14 | } 15 | 16 | 17 | 18 | } 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/app/service/credential.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { CredentialService } from './credential.service'; 4 | 5 | describe('CredentialService', () => { 6 | let service: CredentialService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(CredentialService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/index/index.component.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Component, OnInit } from '@angular/core'; 3 | 4 | @Component({ 5 | selector: 'app-manager-index', 6 | templateUrl: './index.component.html', 7 | styleUrls: ['./index.component.scss'] 8 | }) 9 | export class IndexComponent implements OnInit { 10 | 11 | constructor() {} 12 | 13 | ngOnInit(): void { 14 | 15 | } 16 | 17 | 18 | 19 | } 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/app/guard/authentication.guard.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { AuthenticationGuard } from './authentication.guard'; 4 | 5 | describe('AuthenticationGuard', () => { 6 | let guard: AuthenticationGuard; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | guard = TestBed.inject(AuthenticationGuard); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(guard).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/model/request/reservation-request.ts: -------------------------------------------------------------------------------- 1 | 2 | export class ReservationRequest { 3 | 4 | constructor( 5 | public username: string = `${sessionStorage.getItem(`username`)}`.trim(), 6 | public saloonId: number = 0, 7 | public startDate: Date | string = '', 8 | public serviceDetailsIds: number[] = [], 9 | public description?: string | undefined) { 10 | } 11 | 12 | 13 | 14 | } 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-customer-profile-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { CustomerProfileResponse } from "../customer-profile-response"; 3 | 4 | export class ApiPayloadCustomerProfileResponse { 5 | 6 | constructor( 7 | public totalResult: number, 8 | public httpStatus: string, 9 | public acknowledge: boolean, 10 | public responseBody: CustomerProfileResponse) { 11 | } 12 | 13 | 14 | 15 | } 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/app/service/reservation.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ReservationService } from './reservation.service'; 4 | 5 | describe('ReservationService', () => { 6 | let service: ReservationService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(ReservationService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/component/workspace/customer/index/index.component.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Component, OnInit } from '@angular/core'; 3 | 4 | @Component({ 5 | selector: 'app-customer-index', 6 | templateUrl: './index.component.html', 7 | styleUrls: ['./index.component.scss'] 8 | }) 9 | export class IndexComponent implements OnInit { 10 | 11 | constructor() {} 12 | 13 | ngOnInit(): void { 14 | 15 | } 16 | 17 | 18 | 19 | } 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/app/component/workspace/owner/profile/profile.component.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Component, OnInit } from '@angular/core'; 3 | 4 | @Component({ 5 | selector: 'app-owner-profile', 6 | templateUrl: './profile.component.html', 7 | styleUrls: ['./profile.component.scss'] 8 | }) 9 | export class ProfileComponent implements OnInit { 10 | 11 | constructor() {} 12 | 13 | ngOnInit(): void { 14 | 15 | } 16 | 17 | 18 | 19 | } 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/app/service/notification.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { NotificationService } from './notification.service'; 4 | 5 | describe('NotificationService', () => { 6 | let service: NotificationService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(NotificationService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/service/registration.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { RegistrationService } from './registration.service'; 4 | 5 | describe('RegistrationService', () => { 6 | let service: RegistrationService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(RegistrationService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/model/response/worker-profile-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Credential } from "../credential"; 3 | import { Employee } from "../employee"; 4 | import { PageResponse } from "./page/page-response"; 5 | 6 | export class WorkerProfileResponse { 7 | 8 | constructor( 9 | public worker: Employee, 10 | public credential: Credential, 11 | public tasks: PageResponse | null | undefined) { 12 | } 13 | 14 | 15 | 16 | } 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/app/service/error-handler.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ErrorHandlerService } from './error-handler.service'; 4 | 5 | describe('ErrorHandlerService', () => { 6 | let service: ErrorHandlerService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(ErrorHandlerService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-customer-favourite-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { CustomerFavouriteResponse } from "../customer-favourite-response"; 3 | 4 | export class ApiPayloadCustomerFavouriteResponse { 5 | 6 | constructor( 7 | public totalResult: number, 8 | public httpStatus: string, 9 | public acknowledge: boolean, 10 | public responseBody: CustomerFavouriteResponse) { 11 | 12 | } 13 | 14 | 15 | 16 | } 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/app/model/response/service-details-reservation-container-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Category } from "../category"; 3 | import { PageResponse } from "./page/page-response"; 4 | 5 | export class ServiceDetailsReservationContainerResponse { 6 | 7 | constructor( 8 | public orderedDetails: PageResponse, 9 | public serviceDetails: PageResponse, 10 | public category: Category) { 11 | } 12 | 13 | 14 | 15 | } 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/app/service/ordered-detail.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { OrderedDetailService } from './ordered-detail.service'; 4 | 5 | describe('OrderedDetailService', () => { 6 | let service: OrderedDetailService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(OrderedDetailService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/service/service-detail.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ServiceDetailService } from './service-detail.service'; 4 | 5 | describe('ServiceDetailService', () => { 6 | let service: ServiceDetailService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(ServiceDetailService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/model/service-detail.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Category } from "./category"; 3 | 4 | export class ServiceDetail { 5 | 6 | constructor( 7 | public id: number, 8 | public identifier: string, 9 | public name: string, 10 | public description: string, 11 | public isAvailable: boolean, 12 | public duration: number, 13 | public priceUnit: number, 14 | public category: Category) { 15 | } 16 | 17 | 18 | 19 | } 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/app/service/authentication.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { AuthenticationService } from './authentication.service'; 4 | 5 | describe('AuthenticationService', () => { 6 | let service: AuthenticationService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(AuthenticationService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/service/health-liveness.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { HealthLivenessService } from './health-liveness.service'; 4 | 5 | describe('HealthLivenessService', () => { 6 | let service: HealthLivenessService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(HealthLivenessService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/component/error/error404/error404.component.scss: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | background: #f5f5f5; 4 | font-family: 'Noto Sans', sans-serif; 5 | margin: 0; 6 | color: #4c5667; 7 | overflow-x: hidden !important; 8 | padding-top: 40px; 9 | } 10 | 11 | .message-box h1 { 12 | color: #252932; 13 | font-size: 98px; 14 | font-weight: 700; 15 | line-height: 98px; 16 | text-shadow: rgba(61, 61, 61, 0.3) 1px 1px, rgba(61, 61, 61, 0.2) 2px 2px, rgba(61, 61, 61, 0.3) 3px 3px; 17 | } 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-customer-reservation-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { CustomerReservationResponse } from "../customer-reservation-response"; 3 | 4 | export class ApiPayloadCustomerReservationResponse { 5 | 6 | constructor( 7 | public totalResult: number, 8 | public httpStatus: string, 9 | public acknowledge: boolean, 10 | public responseBody: CustomerReservationResponse) { 11 | 12 | } 13 | 14 | 15 | 16 | } 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/app/service/employee/worker/worker-profile.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { WorkerProfileService } from './worker-profile.service'; 4 | 5 | describe('WorkerProfileService', () => { 6 | let service: WorkerProfileService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(WorkerProfileService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/service/customer/customer-profile.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { CustomerProfileService } from './customer-profile.service'; 4 | 5 | describe('CustomerProfileService', () => { 6 | let service: CustomerProfileService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(CustomerProfileService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/service/employee/manager/manager-profile.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ManagerProfileService } from './manager-profile.service'; 4 | 5 | describe('ManagerProfileService', () => { 6 | let service: ManagerProfileService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(ManagerProfileService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/service/customer/customer-favourite.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { CustomerFavouriteService } from './customer-favourite.service'; 4 | 5 | describe('CustomerFavouriteService', () => { 6 | let service: CustomerFavouriteService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(CustomerFavouriteService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/service/employee/manager/manager-category.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ManagerCategoryService } from './manager-category.service'; 4 | 5 | describe('ManagerCategoryService', () => { 6 | let service: ManagerCategoryService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(ManagerCategoryService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /compose.yml: -------------------------------------------------------------------------------- 1 | 2 | version: '3.9' 3 | services: 4 | cita-frontend-app: 5 | image: selimhorri/cita-frontend-app:dev 6 | container_name: cita-frontend-app 7 | ports: 8 | - 4200:80 9 | environment: 10 | - PROFILE={PROFILE:development} 11 | restart: always 12 | # depends_on: 13 | # - cita-backend-app 14 | volumes: 15 | - ./nginx.conf:/etc/nginx/nginx.conf 16 | networks: 17 | - net 18 | 19 | networks: 20 | net: 21 | external: 22 | name: cita-net 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/app/model/ordered-detail.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Reservation } from "./reservation"; 3 | import { ServiceDetail } from "./service-detail"; 4 | 5 | export class OrderedDetail { 6 | 7 | constructor( 8 | public reservationId: number, 9 | public serviceDetailId: number, 10 | public orderedDate: Date | string, 11 | public identifier: string, 12 | public reservation: Reservation, 13 | public serviceDetail: ServiceDetail) { 14 | } 15 | 16 | 17 | 18 | } 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-reservation-container-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { ReservationContainerResponse } from "../reservation-container-response"; 3 | 4 | export class ApiPayloadReservationContainerResponse { 5 | 6 | constructor( 7 | public totalResult: number, 8 | public httpStatus: string, 9 | public acknowledge: boolean, 10 | public responseBody: ReservationContainerResponse) { 11 | 12 | } 13 | 14 | 15 | 16 | } 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/app/service/employee/worker/worker-reservation.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { WorkerReservationService } from './worker-reservation.service'; 4 | 5 | describe('WorkerReservationService', () => { 6 | let service: WorkerReservationService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(WorkerReservationService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/service/customer/customer-reservation.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { CustomerReservationService } from './customer-reservation.service'; 4 | 5 | describe('CustomerReservationService', () => { 6 | let service: CustomerReservationService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(CustomerReservationService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/service/employee/manager/manager-reservation.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ManagerReservationService } from './manager-reservation.service'; 4 | 5 | describe('ManagerReservationService', () => { 6 | let service: ManagerReservationService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(ManagerReservationService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/model/response/customer-favourite-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Credential } from "../credential"; 3 | import { Customer } from "../customer"; 4 | import { Favourite } from "../favourite"; 5 | import { PageResponse } from "./page/page-response"; 6 | 7 | export class CustomerFavouriteResponse { 8 | 9 | constructor( 10 | public customer: Customer, 11 | public credential: Credential, 12 | public favourites: PageResponse) { 13 | } 14 | 15 | 16 | 17 | } 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/app/service/employee/manager/manager-service-detail.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ManagerServiceDetailService } from './manager-service-detail.service'; 4 | 5 | describe('ManagerServiceDetailService', () => { 6 | let service: ManagerServiceDetailService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(ManagerServiceDetailService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/service/employee/manager/manager-worker-service.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ManagerWorkerServiceService } from './manager-worker-service.service'; 4 | 5 | describe('ManagerWorkerServiceService', () => { 6 | let service: ManagerWorkerServiceService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(ManagerWorkerServiceService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/model/credential.ts: -------------------------------------------------------------------------------- 1 | 2 | import { UserRoleBasedAuthority } from "./user-role-based-authority"; 3 | 4 | export class Credential { 5 | 6 | constructor( 7 | public id: number, 8 | public identifier: string, 9 | public username: string, 10 | public role: UserRoleBasedAuthority | string, 11 | public isEnabled: boolean, 12 | public isAccountNonExpired: boolean, 13 | public isAccountNonLocked: boolean, 14 | public isCredentialsNonExpired: boolean) { 15 | } 16 | 17 | 18 | 19 | } 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/app/model/response/customer-reservation-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Credential } from "../credential"; 3 | import { Customer } from "../customer"; 4 | import { Reservation } from "../reservation"; 5 | import { PageResponse } from "./page/page-response"; 6 | 7 | export class CustomerReservationResponse { 8 | 9 | constructor( 10 | public customer: Customer, 11 | public credential: Credential, 12 | public reservations: PageResponse) { 13 | } 14 | 15 | 16 | 17 | } 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/app/service/employee/worker/worker-reservation-task.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { WorkerReservationTaskService } from './worker-reservation-task.service'; 4 | 5 | describe('WorkerReservationTaskService', () => { 6 | let service: WorkerReservationTaskService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(WorkerReservationTaskService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/service/employee/worker/worker-reservation-detail.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { WorkerReservationDetailService } from './worker-reservation-detail.service'; 4 | 5 | describe('WorkerReservationDetailService', () => { 6 | let service: WorkerReservationDetailService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(WorkerReservationDetailService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-service-details-reservation-container-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { ServiceDetailsReservationContainerResponse } from "../service-details-reservation-container-response"; 3 | 4 | export class ApiPayloadServiceDetailsReservationContainerResponse { 5 | 6 | constructor( 7 | public totalResult: number, 8 | public httpStatus: string, 9 | public acknowledge: boolean, 10 | public responseBody: ServiceDetailsReservationContainerResponse) { 11 | 12 | } 13 | 14 | 15 | 16 | } 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/app/model/response/reservation-container-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Customer } from "../customer"; 3 | import { Reservation } from "../reservation"; 4 | import { Task } from "../task"; 5 | import { PageResponse } from "./page/page-response"; 6 | 7 | export class ReservationContainerResponse { 8 | 9 | constructor( 10 | public reservation: Reservation, 11 | public customer: Customer, 12 | public orderedDetails: PageResponse | null, 13 | public tasks: Task[]) { 14 | } 15 | 16 | } 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/app/service/customer/customer-reservation-detail.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { CustomerReservationDetailService } from './customer-reservation-detail.service'; 4 | 5 | describe('CustomerReservationDetailService', () => { 6 | let service: CustomerReservationDetailService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(CustomerReservationDetailService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/service/employee/manager/manager-worker-assignment.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ManagerWorkerAssignmentService } from './manager-worker-assignment.service'; 4 | 5 | describe('ManagerWorkerAssignmentService', () => { 6 | let service: ManagerWorkerAssignmentService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(ManagerWorkerAssignmentService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/component/workspace/customer/reservation/assigned-worker/assigned-worker.component.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Component, OnInit } from '@angular/core'; 3 | 4 | @Component({ 5 | selector: 'app-customer-assigned-worker', 6 | templateUrl: './assigned-worker.component.html', 7 | styleUrls: ['./assigned-worker.component.scss'] 8 | }) 9 | export class AssignedWorkerComponent implements OnInit { 10 | 11 | constructor() {} 12 | 13 | ngOnInit(): void { 14 | 15 | } 16 | 17 | 18 | 19 | } 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/app/service/employee/manager/manager-reservation-detail.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ManagerReservationDetailService } from './manager-reservation-detail.service'; 4 | 5 | describe('ManagerReservationDetailService', () => { 6 | let service: ManagerReservationDetailService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(ManagerReservationDetailService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/component/authentication/authentication.component.scss: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | background-color: #DCDCDC; 4 | margin-top: 20px; 5 | } 6 | 7 | .card { 8 | margin-bottom: 1.5rem; 9 | box-shadow: 0 1px 15px 1px rgba(52, 40, 104, .08); 10 | } 11 | 12 | .card { 13 | position: relative; 14 | display: -ms-flexbox; 15 | display: flex; 16 | -ms-flex-direction: column; 17 | flex-direction: column; 18 | min-width: 0; 19 | word-wrap: break-word; 20 | background-color: #fff; 21 | background-clip: border-box; 22 | border: 1px solid #e5e9f2; 23 | border-radius: .2rem; 24 | } 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/app/model/request/register-request.ts: -------------------------------------------------------------------------------- 1 | 2 | import { UserRoleBasedAuthority } from "../user-role-based-authority"; 3 | 4 | export class RegisterRequest { 5 | 6 | constructor( 7 | public firstname: string, 8 | public lastname: string, 9 | public email: string, 10 | public phone: string, 11 | public birthdate: Date | string, 12 | public username: string, 13 | public password: string, 14 | public confirmPassword: string, 15 | public role: UserRoleBasedAuthority | string) { 16 | } 17 | 18 | 19 | 20 | } 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/app/model/rating.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Customer } from "./customer"; 3 | import { Employee } from "./employee"; 4 | import { UserRating } from "./user-rating"; 5 | 6 | export class Rating { 7 | 8 | constructor( 9 | public identifier: string, 10 | public workerId: number, 11 | public customerId: number, 12 | public rateDate: Date | string, 13 | public rate: UserRating | number | string, 14 | public description: string | null, 15 | public worker: Employee, 16 | public customer: Customer) { 17 | } 18 | 19 | 20 | 21 | } 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/app/component/registration/registration.component.scss: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | background-color: #DCDCDC; 4 | margin-top: 20px; 5 | } 6 | 7 | .card { 8 | margin-bottom: 1.5rem; 9 | box-shadow: 0 1px 15px 1px rgba(52, 40, 104, .08); 10 | } 11 | 12 | .card { 13 | position: relative; 14 | display: -ms-flexbox; 15 | display: flex; 16 | -ms-flex-direction: column; 17 | flex-direction: column; 18 | min-width: 0; 19 | word-wrap: break-word; 20 | background-color: #fff; 21 | background-clip: border-box; 22 | border: 1px solid #e5e9f2; 23 | border-radius: .2rem; 24 | } 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/app/guard/registration.guard.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Injectable } from '@angular/core'; 3 | import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot } from '@angular/router'; 4 | import { AuthenticationService } from '../service/authentication.service'; 5 | 6 | @Injectable({ 7 | providedIn: 'root' 8 | }) 9 | export class RegistrationGuard implements CanActivate { 10 | 11 | constructor(private authenticationService: AuthenticationService) {} 12 | 13 | canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean { 14 | return !this.authenticationService.isLoggedIn(); 15 | } 16 | 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /.github/workflows/pipeline-dev-pr.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Develop, On PR NodeJS CI/CD pipeline for Angular 3 | 4 | on: 5 | pull_request: 6 | branches: [ develop ] 7 | 8 | jobs: 9 | 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | strategy: 14 | matrix: 15 | node-version: [ 16.x ] 16 | 17 | steps: 18 | - uses: actions/checkout@v2 19 | - name: Use Node.js ${{ matrix.node-version }} 20 | uses: actions/setup-node@v2 21 | with: 22 | node-version: ${{ matrix.node-version }} 23 | cache: 'npm' 24 | - run: npm ci 25 | - run: npm run build --if-present 26 | #- run: npm test 27 | 28 | 29 | -------------------------------------------------------------------------------- /.github/workflows/pipeline-prod-pr.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Prod, On PR NodeJS CI/CD pipeline for Angular 3 | 4 | on: 5 | pull_request: 6 | branches: [ master ] 7 | 8 | jobs: 9 | 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | strategy: 14 | matrix: 15 | node-version: [ 16.x ] 16 | 17 | steps: 18 | - uses: actions/checkout@v2 19 | - name: Use Node.js ${{ matrix.node-version }} 20 | uses: actions/setup-node@v2 21 | with: 22 | node-version: ${{ matrix.node-version }} 23 | cache: 'npm' 24 | - run: npm ci 25 | - run: npm run build --if-present 26 | #- run: npm test 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/app/model/request/manager-profile-request.ts: -------------------------------------------------------------------------------- 1 | 2 | export class ManagerProfileRequest { 3 | 4 | constructor( 5 | public authenticatedUsername: string = `${sessionStorage.getItem(`username`)}`, 6 | public firstname: string, 7 | public lastname: string, 8 | public email: string, 9 | public phone: string, 10 | public birthdate: Date | string | null | undefined, 11 | public hiredate: Date | string | null | undefined, 12 | public username: string, 13 | public password: string, 14 | public confirmPassword: string) { 15 | } 16 | 17 | 18 | 19 | } 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /.github/workflows/pipeline-preprod-pr.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Preprod, On PR NodeJS CI/CD pipeline for Angular 3 | 4 | on: 5 | pull_request: 6 | branches: [ preprod ] 7 | 8 | jobs: 9 | 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | strategy: 14 | matrix: 15 | node-version: [ 16.x ] 16 | 17 | steps: 18 | - uses: actions/checkout@v2 19 | - name: Use Node.js ${{ matrix.node-version }} 20 | uses: actions/setup-node@v2 21 | with: 22 | node-version: ${{ matrix.node-version }} 23 | cache: 'npm' 24 | - run: npm ci 25 | - run: npm run build --if-present 26 | #- run: npm test 27 | 28 | 29 | -------------------------------------------------------------------------------- /.github/workflows/pipeline-staging-pr.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Staging, On PR NodeJS CI/CD pipeline for Angular 3 | 4 | on: 5 | pull_request: 6 | branches: [ staging ] 7 | 8 | jobs: 9 | 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | strategy: 14 | matrix: 15 | node-version: [ 16.x ] 16 | 17 | steps: 18 | - uses: actions/checkout@v2 19 | - name: Use Node.js ${{ matrix.node-version }} 20 | uses: actions/setup-node@v2 21 | with: 22 | node-version: ${{ matrix.node-version }} 23 | cache: 'npm' 24 | - run: npm ci 25 | - run: npm run build --if-present 26 | #- run: npm test 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/app/guard/authentication.guard.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Injectable } from '@angular/core'; 3 | import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree } from '@angular/router'; 4 | import { AuthenticationService } from '../service/authentication.service'; 5 | 6 | @Injectable({ 7 | providedIn: 'root' 8 | }) 9 | export class AuthenticationGuard implements CanActivate { 10 | 11 | constructor(private authenticationService: AuthenticationService) {} 12 | 13 | canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean { 14 | return !this.authenticationService.isLoggedIn(); 15 | } 16 | 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/app/model/request/worker-profile-request.ts: -------------------------------------------------------------------------------- 1 | 2 | export class WorkerProfileRequest { 3 | 4 | constructor( 5 | public authenticatedUsername: string = `${sessionStorage.getItem(`username`)}`, 6 | public firstname: string, 7 | public lastname: string, 8 | public email: string, 9 | public phone: string, 10 | public birthdate: Date | string | null | undefined, 11 | public hiredate: Date | string | null | undefined, 12 | public username: string, 13 | public password: string, 14 | public confirmPassword: string) { 15 | } 16 | 17 | 18 | 19 | } 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/app/model/saloon.ts: -------------------------------------------------------------------------------- 1 | 2 | import { SafeHtml } from "@angular/platform-browser"; 3 | import { Location } from "./location"; 4 | 5 | export class Saloon { 6 | 7 | constructor( 8 | public id: number, 9 | public identifier: string, 10 | public code: string, 11 | public taxRef: string, 12 | public name: string, 13 | public isPrimary: boolean, 14 | public openingDate: Date | string, 15 | public fullAdr: string, 16 | public iframeGoogleMap: string | SafeHtml, 17 | public email: string, 18 | public location: Location) { 19 | } 20 | 21 | 22 | 23 | } 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | last 1 Chrome version 12 | last 1 Firefox version 13 | last 2 Edge major versions 14 | last 2 Safari major versions 15 | last 2 iOS major versions 16 | Firefox ESR 17 | -------------------------------------------------------------------------------- /src/app/model/response/api/api-payload-d-exception-msg.ts: -------------------------------------------------------------------------------- 1 | 2 | import { ExceptionMsg } from "../../exception-msg"; 3 | 4 | export class ApiPayloadDExceptionMsg { 5 | 6 | public totalResult!: number; 7 | public httpStatus!: string; 8 | public acknowledge!: boolean; 9 | public responseBody!: ExceptionMsg; 10 | 11 | constructor(public obj: any) { 12 | this.totalResult = obj?.totalResult as number; 13 | this.httpStatus = obj?.httpStatus as string; 14 | this.acknowledge = obj?.acknowledge as boolean; 15 | this.responseBody = obj?.responseBody as ExceptionMsg; 16 | } 17 | 18 | 19 | 20 | } 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/app/model/response/manager-profile-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Employee } from "../employee"; 3 | import { PageResponse } from "./page/page-response"; 4 | 5 | export class ManagerProfileResponse { 6 | 7 | constructor( 8 | public manager: Employee, 9 | public workers: PageResponse | null | undefined, 10 | public reservations: PageResponse | null | undefined, 11 | public saloonTags: PageResponse | null | undefined, 12 | public categories: PageResponse | null | undefined, 13 | public serviceDetails: PageResponse | null | undefined) { 14 | } 15 | 16 | 17 | 18 | } 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /nginx.conf: -------------------------------------------------------------------------------- 1 | 2 | events { 3 | worker_connections 1024; 4 | } 5 | 6 | http { 7 | server { 8 | listen 80; 9 | server_name localhost; 10 | 11 | root /usr/share/nginx/html; 12 | index index.html index.htm; 13 | include /etc/nginx/mime.types; 14 | 15 | gzip on; 16 | gzip_min_length 1000; 17 | gzip_proxied expired no-cache no-store private auth; 18 | gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; 19 | 20 | location / { 21 | try_files $uri $uri/ /index.html; 22 | } 23 | } 24 | } 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/reservation/reservation-detail/reservation-detail.component.scss: -------------------------------------------------------------------------------- 1 | body{ 2 | background: #f4f5f7; 3 | margin-top:20px; 4 | } 5 | .cart-container { 6 | border: 1px solid rgba(0, 0, 0, 0.05); 7 | padding: 30px; 8 | } 9 | .cart-container .cart-body { 10 | border-top: 1px solid rgba(0, 0, 0, 0.05); 11 | border-bottom: 1px solid rgba(0, 0, 0, 0.05); 12 | padding: 30px 0 20px; 13 | margin: 20px 0 30px; 14 | } 15 | 16 | .inf-content { 17 | border: 1px solid #DDDDDD; 18 | -webkit-border-radius: 10px; 19 | -moz-border-radius: 10px; 20 | border-radius: 10px; 21 | box-shadow: 7px 7px 7px rgba(0, 0, 0, 0.3); 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/app/model/response/container/customer-container-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Customer } from "../../customer"; 3 | import { Favourite } from "../../favourite"; 4 | import { Rating } from "../../rating"; 5 | import { Reservation } from "../../reservation"; 6 | import { PageResponse } from "../page/page-response"; 7 | 8 | export class CustomerProfileResponse { 9 | 10 | constructor( 11 | public customer: Customer, 12 | public credential: Credential, 13 | public reservations?: PageResponse | null, 14 | public favourites?: PageResponse | null, 15 | public ratings?: PageResponse | null) { 16 | } 17 | 18 | 19 | 20 | } 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/app/model/response/page/page-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { PageableResponse } from "./pageable-response"; 3 | import { SortResponse } from "./sort-response"; 4 | 5 | export class PageResponse { 6 | 7 | constructor( 8 | public content: any[], 9 | public pageable: PageableResponse, 10 | public totalPages: number, 11 | public totalElements: number, 12 | public last: boolean, 13 | public sort: SortResponse, 14 | public size: number, 15 | public number: number, 16 | public first: boolean, 17 | public numberOfElements: number, 18 | public empty: boolean) { 19 | } 20 | 21 | 22 | 23 | } 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/app/model/reservation.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Customer } from "./customer"; 3 | import { ReservationStatus } from "./reservation-status"; 4 | import { Saloon } from "./saloon"; 5 | 6 | export class Reservation { 7 | 8 | constructor( 9 | public id: number, 10 | public identifier: string, 11 | public code: string, 12 | public description: string, 13 | public startDate: Date | string, 14 | public cancelDate: Date | string | null, 15 | public completeDate: Date | string | null, 16 | public status: ReservationStatus | string, 17 | public customer: Customer, 18 | public saloon: Saloon) { 19 | } 20 | 21 | 22 | 23 | } 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/app/model/response/customer-profile-response.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Credential } from "../credential"; 3 | import { Customer } from "../customer"; 4 | import { Favourite } from "../favourite"; 5 | import { Rating } from "../rating"; 6 | import { Reservation } from "../reservation"; 7 | import { PageResponse } from "./page/page-response"; 8 | 9 | export class CustomerProfileResponse { 10 | 11 | constructor( 12 | public customer: Customer, 13 | public credential: Credential, 14 | public reservations: PageResponse | null, 15 | public favourites: PageResponse | null, 16 | public ratings: PageResponse | null) { 17 | } 18 | 19 | 20 | 21 | } 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/app/model/task.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Employee } from "./employee"; 3 | import { Reservation } from "./reservation"; 4 | 5 | export class Task { 6 | 7 | constructor( 8 | public workerId: number, 9 | public reservationId: number, 10 | public taskDate: Date | string, 11 | public identifier: string, 12 | public startDate: Date | string | null | undefined, 13 | public endDate: Date | string | null | undefined, 14 | public workerDescription: string | null | undefined, 15 | public managerDescription: string | null | undefined, 16 | public worker: Employee, 17 | public reservation: Reservation) { 18 | } 19 | 20 | 21 | 22 | } 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/app/service/category.service.ts: -------------------------------------------------------------------------------- 1 | 2 | import { HttpClient } from '@angular/common/http'; 3 | import { Injectable } from '@angular/core'; 4 | import { Observable } from 'rxjs'; 5 | import { environment } from 'src/environments/environment'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class CategoryService { 11 | 12 | private apiUrl: string = environment.API_URL; 13 | 14 | constructor(private http: HttpClient) { 15 | this.apiUrl = `${this.apiUrl}/categories`; 16 | } 17 | 18 | public findAllBySaloonId(saloonId: number): Observable { 19 | return this.http.get(`${this.apiUrl}/${saloonId}`); 20 | } 21 | 22 | 23 | 24 | } 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # Compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | /bazel-out 8 | 9 | # Node 10 | /node_modules 11 | npm-debug.log 12 | yarn-error.log 13 | 14 | # IDEs and editors 15 | .idea/ 16 | .project 17 | .classpath 18 | .c9/ 19 | *.launch 20 | .settings/ 21 | *.sublime-workspace 22 | 23 | # Visual Studio Code 24 | .vscode/ 25 | .vscode/* 26 | !.vscode/settings.json 27 | !.vscode/tasks.json 28 | !.vscode/launch.json 29 | !.vscode/extensions.json 30 | .history/* 31 | 32 | # Miscellaneous 33 | /.angular/cache 34 | .sass-cache/ 35 | /connect.lock 36 | /coverage 37 | /libpeerconnection.log 38 | testem.log 39 | /typings 40 | 41 | # System files 42 | .DS_Store 43 | Thumbs.db 44 | -------------------------------------------------------------------------------- /src/app/component/home/home.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { HomeComponent } from './home.component'; 4 | 5 | describe('HomeComponent', () => { 6 | let component: HomeComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ HomeComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(HomeComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/about/about.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AboutComponent } from './about.component'; 4 | 5 | describe('AboutComponent', () => { 6 | let component: AboutComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AboutComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AboutComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/logout/logout.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { LogoutComponent } from './logout.component'; 4 | 5 | describe('LogoutComponent', () => { 6 | let component: LogoutComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ LogoutComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(LogoutComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/navbar/navbar.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { NavbarComponent } from './navbar.component'; 4 | 5 | describe('NavbarComponent', () => { 6 | let component: NavbarComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ NavbarComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(NavbarComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/saloon/saloon.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { SaloonComponent } from './saloon.component'; 4 | 5 | describe('SaloonComponent', () => { 6 | let component: SaloonComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ SaloonComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(SaloonComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/owner/index/index.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { IndexComponent } from './index.component'; 4 | 5 | describe('IndexComponent', () => { 6 | let component: IndexComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ IndexComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(IndexComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/contact/contact.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ContactComponent } from './contact.component'; 4 | 5 | describe('ContactComponent', () => { 6 | let component: ContactComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ContactComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ContactComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/customer/index/index.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { IndexComponent } from './index.component'; 4 | 5 | describe('IndexComponent', () => { 6 | let component: IndexComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ IndexComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(IndexComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/index/index.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { IndexComponent } from './index.component'; 4 | 5 | describe('IndexComponent', () => { 6 | let component: IndexComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ IndexComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(IndexComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/worker/index/index.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { IndexComponent } from './index.component'; 4 | 5 | describe('IndexComponent', () => { 6 | let component: IndexComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ IndexComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(IndexComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/model/request/customer-profile-info-request.ts: -------------------------------------------------------------------------------- 1 | 2 | export class CustomerProfileInfoRequest { 3 | 4 | constructor( 5 | public authenticatedUsername: string = `${sessionStorage.getItem(`username`)}`, 6 | public firstname: string, 7 | public lastname: string, 8 | public email: string, 9 | public phone: string, 10 | public birthdate: Date | string | null | undefined, 11 | public facebookUrl: string | null | undefined, 12 | public instagramUrl: string | null | undefined, 13 | public linkedinUrl: string | null | undefined, 14 | public username: string, 15 | public password: string, 16 | public confirmPassword: string) { 17 | } 18 | 19 | 20 | 21 | } 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/app/component/location/location.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { LocationComponent } from './location.component'; 4 | 5 | describe('LocationComponent', () => { 6 | let component: LocationComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ LocationComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(LocationComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/customer/rating/rating.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { RatingComponent } from './rating.component'; 4 | 5 | describe('RatingComponent', () => { 6 | let component: RatingComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ RatingComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(RatingComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/worker/worker.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { WorkerComponent } from './worker.component'; 4 | 5 | describe('WorkerComponent', () => { 6 | let component: WorkerComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ WorkerComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(WorkerComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/about/about.component.scss: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | margin-top: 20px; 4 | } 5 | 6 | .pb-6, 7 | .py-6 { 8 | padding-bottom: 3.75rem !important; 9 | } 10 | 11 | .pt-6, 12 | .py-6 { 13 | padding-top: 3.75rem !important; 14 | } 15 | 16 | .hover-scale, 17 | .hover-scale:hover { 18 | transition: transform .2s ease-in; 19 | } 20 | 21 | .card { 22 | position: relative; 23 | display: flex; 24 | flex-direction: column; 25 | min-width: 0; 26 | word-wrap: break-word; 27 | background-color: #fff; 28 | background-clip: border-box; 29 | border: 1px solid rgba(0, 0, 0, .125); 30 | border-radius: .4rem; 31 | box-shadow: 0 20px 27px 0 rgb(0 0 0 / 5%); 32 | } 33 | 34 | .card-body { 35 | flex: 1 1 auto; 36 | min-height: 1px; 37 | padding: 1.25rem; 38 | } 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/app/component/error/error404/error404.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { Error404Component } from './error404.component'; 4 | 5 | describe('Error404Component', () => { 6 | let component: Error404Component; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ Error404Component ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(Error404Component); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/profile/profile.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ProfileComponent } from './profile.component'; 4 | 5 | describe('ProfileComponent', () => { 6 | let component: ProfileComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ProfileComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ProfileComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/owner/profile/profile.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ProfileComponent } from './profile.component'; 4 | 5 | describe('ProfileComponent', () => { 6 | let component: ProfileComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ProfileComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ProfileComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/worker/profile/profile.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ProfileComponent } from './profile.component'; 4 | 5 | describe('ProfileComponent', () => { 6 | let component: ProfileComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ProfileComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ProfileComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/customer/profile/profile.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ProfileComponent } from './profile.component'; 4 | 5 | describe('ProfileComponent', () => { 6 | let component: ProfileComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ProfileComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ProfileComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/model/employee.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Credential } from "./credential"; 3 | import { Saloon } from "./saloon"; 4 | import { UserImage } from "./user-image"; 5 | 6 | export class Employee { 7 | 8 | constructor( 9 | public id: number, 10 | public identifier: string, 11 | public ssn: string | null | undefined, 12 | public firstname: string, 13 | public lastname: string, 14 | public isMale: boolean, 15 | public email: string, 16 | public phone: string, 17 | public birthdate: Date | string, 18 | public hiredate: Date | string, 19 | public credential: Credential, 20 | public manager: Employee, 21 | public userImage: UserImage, 22 | public saloon: Saloon) { 23 | } 24 | 25 | 26 | 27 | } 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/category/category.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { CategoryComponent } from './category.component'; 4 | 5 | describe('CategoryComponent', () => { 6 | let component: CategoryComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ CategoryComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(CategoryComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/model/customer.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Credential } from "./credential"; 3 | import { UserImage } from "./user-image"; 4 | 5 | export class Customer { 6 | 7 | constructor( 8 | public id: number, 9 | public identifier: string, 10 | public ssn: string | null | undefined, 11 | public firstname: string, 12 | public lastname: string, 13 | public isMale: boolean, 14 | public email: string, 15 | public phone: string, 16 | public birthdate: Date | string, 17 | public facebookUrl: string | null, 18 | public instagramUrl: string | null, 19 | public linkedinUrl: string | null, 20 | public userImage: UserImage | null, 21 | public credential: Credential) { 22 | } 23 | 24 | 25 | 26 | } 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/app/component/location/location.component.scss: -------------------------------------------------------------------------------- 1 | body { 2 | margin-top: 20px; 3 | background: #f5f5f5; 4 | } 5 | 6 | .card { 7 | border: none; 8 | -webkit-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); 9 | box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); 10 | margin-bottom: 30px; 11 | } 12 | 13 | .w-60 { 14 | width: 60px; 15 | } 16 | 17 | h1, 18 | h2, 19 | h3, 20 | h4, 21 | h5, 22 | h6 { 23 | margin: 0 0 10px; 24 | font-weight: 600; 25 | } 26 | 27 | .social-links li a { 28 | -webkit-border-radius: 50%; 29 | background-color: rgba(89, 206, 181, .85); 30 | border-radius: 50%; 31 | // color: #fff; 32 | display: inline-block; 33 | height: 30px; 34 | line-height: 30px; 35 | text-align: center; 36 | width: 30px; 37 | font-size: 12px; 38 | } 39 | 40 | a { 41 | // color: #707070; 42 | } 43 | -------------------------------------------------------------------------------- /src/app/component/workspace/customer/favourite/favourite.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { FavouriteComponent } from './favourite.component'; 4 | 5 | describe('FavouriteComponent', () => { 6 | let component: FavouriteComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ FavouriteComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(FavouriteComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/registration/registration.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { RegistrationComponent } from './registration.component'; 4 | 5 | describe('RegistrationComponent', () => { 6 | let component: RegistrationComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ RegistrationComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(RegistrationComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/worker/reservation/reservation.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ReservationComponent } from './reservation.component'; 4 | 5 | describe('ReservationComponent', () => { 6 | let component: ReservationComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ReservationComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ReservationComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/saloon/saloon-detail/saloon-detail.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { SaloonDetailComponent } from './saloon-detail.component'; 4 | 5 | describe('SaloonDetailComponent', () => { 6 | let component: SaloonDetailComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ SaloonDetailComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(SaloonDetailComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/customer/reservation/reservation.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ReservationComponent } from './reservation.component'; 4 | 5 | describe('ReservationComponent', () => { 6 | let component: ReservationComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ReservationComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ReservationComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/reservation/reservation.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ReservationComponent } from './reservation.component'; 4 | 5 | describe('ReservationComponent', () => { 6 | let component: ReservationComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ReservationComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ReservationComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/authentication/authentication.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AuthenticationComponent } from './authentication.component'; 4 | 5 | describe('AuthenticationComponent', () => { 6 | let component: AuthenticationComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AuthenticationComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AuthenticationComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/service-detail/service-detail.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ServiceDetailComponent } from './service-detail.component'; 4 | 5 | describe('ServiceDetailComponent', () => { 6 | let component: ServiceDetailComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ServiceDetailComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ServiceDetailComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: { 11 | context(path: string, deep?: boolean, filter?: RegExp): { 12 | (id: string): T; 13 | keys(): string[]; 14 | }; 15 | }; 16 | 17 | // First, initialize the Angular testing environment. 18 | getTestBed().initTestEnvironment( 19 | BrowserDynamicTestingModule, 20 | platformBrowserDynamicTesting(), 21 | ); 22 | 23 | // Then we find all the tests. 24 | const context = require.context('./', true, /\.spec\.ts$/); 25 | // And load the modules. 26 | context.keys().map(context); 27 | -------------------------------------------------------------------------------- /src/app/component/saloon/saloon-calendar/saloon-calendar/saloon-calendar.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { SaloonCalendarComponent } from './saloon-calendar.component'; 4 | 5 | describe('SaloonCalendarComponent', () => { 6 | let component: SaloonCalendarComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ SaloonCalendarComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(SaloonCalendarComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/customer/reservation/assigned-worker/assigned-worker.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AssignedWorkerComponent } from './assigned-worker.component'; 4 | 5 | describe('AssignedWorkerComponent', () => { 6 | let component: AssignedWorkerComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AssignedWorkerComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AssignedWorkerComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/guard/saloon-detail.guard.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Injectable } from '@angular/core'; 3 | import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree } from '@angular/router'; 4 | import { AuthenticationService } from '../service/authentication.service'; 5 | 6 | @Injectable({ 7 | providedIn: 'root' 8 | }) 9 | export class SaloonDetailGuard implements CanActivate { 10 | 11 | constructor(private authenticationService: AuthenticationService, 12 | private router: Router) {} 13 | 14 | canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean { 15 | const isLoggedIn: boolean = this.authenticationService.isLoggedIn(); 16 | if (!isLoggedIn) 17 | this.router.navigateByUrl(`/login`); 18 | return isLoggedIn; 19 | } 20 | 21 | 22 | 23 | } 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/worker/worker-assignment/worker-assignment.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { WorkerAssignmentComponent } from './worker-assignment.component'; 4 | 5 | describe('WorkerAssignmentComponent', () => { 6 | let component: WorkerAssignmentComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ WorkerAssignmentComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(WorkerAssignmentComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/reservation/reservation-detail/reservation-detail.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ReservationDetailComponent } from './reservation-detail.component'; 4 | 5 | describe('ReservationDetailComponent', () => { 6 | let component: ReservationDetailComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ReservationDetailComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ReservationDetailComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/customer/reservation/reservation-details/reservation-details.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ReservationDetailsComponent } from './reservation-details.component'; 4 | 5 | describe('ReservationDetailsComponent', () => { 6 | let component: ReservationDetailsComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ReservationDetailsComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ReservationDetailsComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/worker/reservation/reservation-details/reservation-details.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ReservationDetailsComponent } from './reservation-details.component'; 4 | 5 | describe('ReservationDetailsComponent', () => { 6 | let component: ReservationDetailsComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ReservationDetailsComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ReservationDetailsComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/reservation/reservation-calendar/reservation-calendar.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ReservationCalendarComponent } from './reservation-calendar.component'; 4 | 5 | describe('ReservationCalendarComponent', () => { 6 | let component: ReservationCalendarComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ReservationCalendarComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ReservationCalendarComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/component/workspace/worker/reservation/reservation-calendar/reservation-calendar.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ReservationCalendarComponent } from './reservation-calendar.component'; 4 | 5 | describe('ReservationCalendarComponent', () => { 6 | let component: ReservationCalendarComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ReservationCalendarComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ReservationCalendarComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/service/tag.service.ts: -------------------------------------------------------------------------------- 1 | 2 | import { HttpClient } from '@angular/common/http'; 3 | import { Injectable } from '@angular/core'; 4 | import { Observable } from 'rxjs'; 5 | import { environment } from 'src/environments/environment'; 6 | import { ClientPageRequest } from '../model/request/client-page-request'; 7 | 8 | @Injectable({ 9 | providedIn: 'root' 10 | }) 11 | export class TagService { 12 | 13 | private apiUrl: string = environment.API_URL; 14 | 15 | constructor(private http: HttpClient) { 16 | this.apiUrl = `${this.apiUrl}/tags`; 17 | } 18 | 19 | public findAll(clientPageRequest: ClientPageRequest): Observable { 20 | return this.http.get(`${this.apiUrl}`, { 21 | params: { 22 | offset: `${clientPageRequest.offset}`, 23 | size: `${clientPageRequest.size}` 24 | } 25 | }); 26 | } 27 | 28 | 29 | 30 | } 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/app/service/task.service.ts: -------------------------------------------------------------------------------- 1 | 2 | import { HttpClient } from '@angular/common/http'; 3 | import { Injectable } from '@angular/core'; 4 | import { Observable } from 'rxjs'; 5 | import { environment } from 'src/environments/environment'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class TaskService { 11 | 12 | private apiUrl: string = environment.API_URL; 13 | 14 | constructor(private http: HttpClient) { 15 | this.apiUrl = `${this.apiUrl}/tasks`; 16 | } 17 | 18 | public findAllByReservationId(reservationId: number): Observable { 19 | return this.http.get(`${this.apiUrl}/reservationId/${reservationId}`, { 20 | headers: { 21 | UsernameAuth: `${sessionStorage.getItem(`username`)}`, 22 | Authorization: `Bearer ${sessionStorage.getItem(`jwtToken`)}`, 23 | } 24 | }); 25 | } 26 | 27 | 28 | 29 | } 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/app/guard/owner.guard.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Injectable } from '@angular/core'; 3 | import { ActivatedRouteSnapshot, CanActivateChild, RouterStateSnapshot, UrlTree } from '@angular/router'; 4 | import { UserRoleBasedAuthority } from '../model/user-role-based-authority'; 5 | import { AuthenticationService } from '../service/authentication.service'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class OwnerGuard implements CanActivateChild { 11 | 12 | constructor(private authenticationService: AuthenticationService) { } 13 | 14 | canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean { 15 | 16 | const isUserLoggedIn: boolean = this.authenticationService.isLoggedIn(); 17 | 18 | if (isUserLoggedIn) { 19 | const userRole: string = `${sessionStorage.getItem(`userRole`)}`; 20 | return userRole === UserRoleBasedAuthority.OWNER; 21 | } 22 | else 23 | return false; 24 | } 25 | 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/app/service/notification.service.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Injectable } from '@angular/core'; 3 | import { ToastrService } from 'ngx-toastr'; 4 | import { ToastrMsg } from '../model/toastr-msg'; 5 | 6 | @Injectable({ 7 | providedIn: 'root' 8 | }) 9 | export class NotificationService { 10 | 11 | constructor(private toastrService: ToastrService) { 12 | } 13 | 14 | public showSuccess(toastrMsg: ToastrMsg) { 15 | this.toastrService.success(toastrMsg?.message, toastrMsg?.title) 16 | } 17 | 18 | public showError(toastrMsg: ToastrMsg) { 19 | this.toastrService.error(toastrMsg?.message, toastrMsg?.title) 20 | } 21 | 22 | public showInfo(toastrMsg: ToastrMsg) { 23 | this.toastrService.info(toastrMsg?.message, toastrMsg?.title) 24 | } 25 | 26 | public showWarning(toastrMsg: ToastrMsg) { 27 | this.toastrService.warning(toastrMsg?.message, toastrMsg?.title) 28 | } 29 | 30 | 31 | 32 | } 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "compileOnSave": false, 4 | "compilerOptions": { 5 | "baseUrl": "./", 6 | "outDir": "./dist/out-tsc", 7 | "forceConsistentCasingInFileNames": true, 8 | "strict": true, 9 | "noImplicitOverride": true, 10 | "noPropertyAccessFromIndexSignature": true, 11 | "noImplicitReturns": true, 12 | "noFallthroughCasesInSwitch": true, 13 | "sourceMap": true, 14 | "declaration": false, 15 | "downlevelIteration": true, 16 | "experimentalDecorators": true, 17 | "moduleResolution": "node", 18 | "importHelpers": true, 19 | "target": "es2017", 20 | "module": "es2020", 21 | "lib": [ 22 | "es2020", 23 | "dom" 24 | ] 25 | }, 26 | "angularCompilerOptions": { 27 | "enableI18nLegacyMessageIdFormat": false, 28 | "strictInjectionParameters": true, 29 | "strictInputAccessModifiers": true, 30 | "strictTemplates": true 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/app/guard/customer.guard.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Injectable } from '@angular/core'; 3 | import { ActivatedRouteSnapshot, CanActivateChild, RouterStateSnapshot, UrlTree } from '@angular/router'; 4 | import { UserRoleBasedAuthority } from '../model/user-role-based-authority'; 5 | import { AuthenticationService } from '../service/authentication.service'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class CustomerGuard implements CanActivateChild { 11 | 12 | constructor(private authenticationService: AuthenticationService) {} 13 | 14 | canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean { 15 | 16 | const isUserLoggedIn: boolean = this.authenticationService.isLoggedIn(); 17 | 18 | if (isUserLoggedIn) { 19 | const userRole: string = `${sessionStorage.getItem(`userRole`)}`; 20 | return userRole === UserRoleBasedAuthority.CUSTOMER; 21 | } 22 | else 23 | return false; 24 | } 25 | 26 | 27 | 28 | } 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/app/guard/manager.guard.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Injectable } from '@angular/core'; 3 | import { ActivatedRouteSnapshot, CanActivateChild, RouterStateSnapshot, UrlTree } from '@angular/router'; 4 | import { UserRoleBasedAuthority } from '../model/user-role-based-authority'; 5 | import { AuthenticationService } from '../service/authentication.service'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class ManagerGuard implements CanActivateChild { 11 | 12 | constructor(private authenticationService: AuthenticationService) { } 13 | 14 | canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean { 15 | 16 | const isUserLoggedIn: boolean = this.authenticationService.isLoggedIn(); 17 | 18 | if (isUserLoggedIn) { 19 | const userRole: string = `${sessionStorage.getItem(`userRole`)}`; 20 | return userRole === UserRoleBasedAuthority.MANAGER 21 | || userRole === UserRoleBasedAuthority.OWNER; 22 | } 23 | else 24 | return false; 25 | } 26 | 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/category/category.component.scss: -------------------------------------------------------------------------------- 1 | body { 2 | background: #edf1f5; 3 | margin-top: 20px; 4 | } 5 | 6 | .card { 7 | position: relative; 8 | display: flex; 9 | flex-direction: column; 10 | min-width: 0; 11 | word-wrap: break-word; 12 | background-color: #fff; 13 | background-clip: border-box; 14 | border: 0 solid transparent; 15 | border-radius: 0; 16 | } 17 | 18 | .btn-circle.btn-lg, 19 | .btn-group-lg>.btn-circle.btn { 20 | width: 50px; 21 | height: 50px; 22 | padding: 14px 15px; 23 | font-size: 18px; 24 | line-height: 23px; 25 | } 26 | 27 | .text-muted { 28 | color: #8898aa !important; 29 | } 30 | 31 | [type=button]:not(:disabled), 32 | [type=reset]:not(:disabled), 33 | [type=submit]:not(:disabled), 34 | button:not(:disabled) { 35 | cursor: pointer; 36 | } 37 | 38 | .btn-circle { 39 | border-radius: 100%; 40 | width: 40px; 41 | height: 40px; 42 | padding: 10px; 43 | } 44 | 45 | .user-table tbody tr .category-select { 46 | max-width: 150px; 47 | border-radius: 20px; 48 | } 49 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/service-detail/service-detail.component.scss: -------------------------------------------------------------------------------- 1 | body { 2 | background: #edf1f5; 3 | margin-top: 20px; 4 | } 5 | 6 | .card { 7 | position: relative; 8 | display: flex; 9 | flex-direction: column; 10 | min-width: 0; 11 | word-wrap: break-word; 12 | background-color: #fff; 13 | background-clip: border-box; 14 | border: 0 solid transparent; 15 | border-radius: 0; 16 | } 17 | 18 | .btn-circle.btn-lg, 19 | .btn-group-lg>.btn-circle.btn { 20 | width: 50px; 21 | height: 50px; 22 | padding: 14px 15px; 23 | font-size: 18px; 24 | line-height: 23px; 25 | } 26 | 27 | .text-muted { 28 | color: #8898aa !important; 29 | } 30 | 31 | [type=button]:not(:disabled), 32 | [type=reset]:not(:disabled), 33 | [type=submit]:not(:disabled), 34 | button:not(:disabled) { 35 | cursor: pointer; 36 | } 37 | 38 | .btn-circle { 39 | border-radius: 100%; 40 | width: 40px; 41 | height: 40px; 42 | padding: 10px; 43 | } 44 | 45 | .user-table tbody tr .category-select { 46 | max-width: 150px; 47 | border-radius: 20px; 48 | } 49 | -------------------------------------------------------------------------------- /src/app/service/error-handler.service.ts: -------------------------------------------------------------------------------- 1 | 2 | import { HttpErrorResponse } from '@angular/common/http'; 3 | import { Injectable } from '@angular/core'; 4 | import { ExceptionMsg } from '../model/exception-msg'; 5 | import { ApiPayloadDExceptionMsg } from '../model/response/api/api-payload-d-exception-msg'; 6 | import { NotificationService } from './notification.service'; 7 | 8 | @Injectable({ 9 | providedIn: 'root' 10 | }) 11 | export class ErrorHandlerService { 12 | 13 | constructor(private notificationService: NotificationService) {} 14 | 15 | public extractExceptionMsg(errorResponse: HttpErrorResponse): ExceptionMsg { 16 | const errorPayload: ApiPayloadDExceptionMsg = new ApiPayloadDExceptionMsg(errorResponse?.error); 17 | console.log(JSON.stringify(errorPayload)); 18 | this.notificationService.showError({message: `${errorPayload?.responseBody?.errorMsg.replace(/####/g, '').trim()}`, title: "Error!"}); 19 | return errorPayload?.responseBody; 20 | } 21 | 22 | 23 | 24 | } 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/app/component/workspace/manager/worker/worker-assignment/worker-assignment.component.scss: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | background: #edf1f5; 4 | margin-top: 20px; 5 | } 6 | 7 | .card { 8 | position: relative; 9 | display: flex; 10 | flex-direction: column; 11 | min-width: 0; 12 | word-wrap: break-word; 13 | background-color: #fff; 14 | background-clip: border-box; 15 | border: 0 solid transparent; 16 | border-radius: 0; 17 | } 18 | 19 | .btn-circle.btn-lg, 20 | .btn-group-lg>.btn-circle.btn { 21 | width: 50px; 22 | height: 50px; 23 | padding: 14px 15px; 24 | font-size: 18px; 25 | line-height: 23px; 26 | } 27 | 28 | .text-muted { 29 | color: #8898aa !important; 30 | } 31 | 32 | [type=button]:not(:disabled), 33 | [type=reset]:not(:disabled), 34 | [type=submit]:not(:disabled), 35 | button:not(:disabled) { 36 | cursor: pointer; 37 | } 38 | 39 | .btn-circle { 40 | border-radius: 100%; 41 | width: 40px; 42 | height: 40px; 43 | padding: 10px; 44 | } 45 | 46 | .user-table tbody tr .category-select { 47 | max-width: 150px; 48 | border-radius: 20px; 49 | } 50 | -------------------------------------------------------------------------------- /src/app/guard/worker.guard.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Injectable } from '@angular/core'; 3 | import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, RouterStateSnapshot, UrlTree } from '@angular/router'; 4 | import { UserRoleBasedAuthority } from '../model/user-role-based-authority'; 5 | import { AuthenticationService } from '../service/authentication.service'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class WorkerGuard implements CanActivateChild { 11 | 12 | constructor(private authenticationService: AuthenticationService) { } 13 | 14 | canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean { 15 | 16 | const isUserLoggedIn: boolean = this.authenticationService.isLoggedIn(); 17 | 18 | if (isUserLoggedIn) { 19 | const userRole: string = `${sessionStorage.getItem(`userRole`)}`; 20 | return userRole === UserRoleBasedAuthority.WORKER 21 | || userRole === UserRoleBasedAuthority.MANAGER 22 | || userRole === UserRoleBasedAuthority.OWNER; 23 | } 24 | else 25 | return false; 26 | } 27 | 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/app/service/authentication.service.ts: -------------------------------------------------------------------------------- 1 | 2 | import { HttpClient } from '@angular/common/http'; 3 | import { Injectable } from '@angular/core'; 4 | import { Observable } from 'rxjs'; 5 | import { environment } from 'src/environments/environment'; 6 | import { LoginRequest } from '../model/request/login-request'; 7 | 8 | @Injectable({ 9 | providedIn: 'root' 10 | }) 11 | export class AuthenticationService { 12 | 13 | private apiUrl: string = environment.API_URL; 14 | 15 | constructor(private http: HttpClient) { 16 | this.apiUrl = `${this.apiUrl}/authenticate`; 17 | } 18 | 19 | public authenticate(loginRequest: LoginRequest): Observable { 20 | return this.http.post(`${this.apiUrl}`, loginRequest); 21 | } 22 | 23 | public isLoggedIn(): boolean { 24 | return !(sessionStorage.getItem("jwtToken") === null); 25 | } 26 | 27 | public logout(): boolean { 28 | if (sessionStorage.getItem("jwtToken") !== null) { 29 | sessionStorage.clear(); 30 | return true; 31 | } 32 | return false; 33 | } 34 | 35 | 36 | 37 | } 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AticFrontendApp 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.6. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. 28 | -------------------------------------------------------------------------------- /src/app/component/logout/logout.component.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Component, OnInit } from '@angular/core'; 3 | import { Router } from '@angular/router'; 4 | import { ToastrMsg } from 'src/app/model/toastr-msg'; 5 | import { AuthenticationService } from 'src/app/service/authentication.service'; 6 | import { NotificationService } from 'src/app/service/notification.service'; 7 | 8 | @Component({ 9 | selector: 'app-logout', 10 | templateUrl: './logout.component.html', 11 | styleUrls: ['./logout.component.scss'] 12 | }) 13 | export class LogoutComponent implements OnInit { 14 | 15 | constructor(private authenticationService: AuthenticationService, 16 | private notificationService: NotificationService, 17 | private router: Router) {} 18 | 19 | ngOnInit(): void { 20 | this.logout(); 21 | } 22 | 23 | public logout(): boolean { 24 | const isLoggedOut = this.authenticationService.logout(); 25 | this.router.navigateByUrl("/login"); 26 | this.notificationService.showInfo(new ToastrMsg("You've been logged out...", "Logged Out!")); 27 | return isLoggedOut; 28 | } 29 | 30 | 31 | 32 | } 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /k8s/prod/app-deployment-service.yml: -------------------------------------------------------------------------------- 1 | 2 | apiVersion: v1 3 | kind: Namespace 4 | metadata: 5 | name: cita-prod-ns 6 | 7 | --- 8 | 9 | apiVersion: apps/v1 10 | kind: Deployment 11 | metadata: 12 | name: cita-frontend-app-deployment 13 | namespace: cita-prod-ns 14 | labels: 15 | app: cita-frontend-app 16 | spec: 17 | replicas: 1 18 | selector: 19 | matchLabels: 20 | app: cita-frontend-app 21 | template: 22 | metadata: 23 | labels: 24 | app: cita-frontend-app 25 | spec: 26 | containers: 27 | - name: cita-frontend-app 28 | image: selimhorri/cita-frontend-app 29 | resources: 30 | limits: 31 | memory: "128Mi" 32 | cpu: "500m" 33 | ports: 34 | - containerPort: 80 35 | 36 | --- 37 | 38 | apiVersion: v1 39 | kind: Service 40 | metadata: 41 | name: cita-frontend-app-service 42 | namespace: cita-prod-ns 43 | spec: 44 | selector: 45 | app: cita-frontend-app 46 | type: LoadBalancer 47 | ports: 48 | - protocol: TCP 49 | port: 4200 50 | targetPort: 80 51 | nodePort: 30000 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/app/service/registration.service.ts: -------------------------------------------------------------------------------- 1 | 2 | import { HttpClient } from '@angular/common/http'; 3 | import { Injectable } from '@angular/core'; 4 | import * as moment from 'moment'; 5 | import { Observable } from 'rxjs'; 6 | import { environment } from 'src/environments/environment'; 7 | import { DateBackendFormat } from '../model/date-backend-format'; 8 | import { RegisterRequest } from '../model/request/register-request'; 9 | 10 | @Injectable({ 11 | providedIn: 'root' 12 | }) 13 | export class RegistrationService { 14 | 15 | private apiUrl: string = environment.API_URL; 16 | 17 | constructor(private http: HttpClient) { 18 | this.apiUrl = `${this.apiUrl}/register`; 19 | } 20 | 21 | public register(registerRequest: RegisterRequest): Observable { 22 | if (registerRequest?.birthdate !== undefined && registerRequest?.birthdate !== null && registerRequest?.birthdate !== '') 23 | registerRequest.birthdate = moment(registerRequest.birthdate).format(DateBackendFormat.LOCAL_DATE); 24 | return this.http.post(`${this.apiUrl}`, registerRequest); 25 | } 26 | 27 | 28 | 29 | } 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /k8s/preprod/app-deployment-service.yml: -------------------------------------------------------------------------------- 1 | 2 | apiVersion: v1 3 | kind: Namespace 4 | metadata: 5 | name: cita-preprod-ns 6 | 7 | --- 8 | 9 | apiVersion: apps/v1 10 | kind: Deployment 11 | metadata: 12 | name: cita-frontend-app-deployment 13 | namespace: cita-preprod-ns 14 | labels: 15 | app: cita-frontend-app 16 | spec: 17 | replicas: 1 18 | selector: 19 | matchLabels: 20 | app: cita-frontend-app 21 | template: 22 | metadata: 23 | labels: 24 | app: cita-frontend-app 25 | spec: 26 | containers: 27 | - name: cita-frontend-app 28 | image: selimhorri/cita-frontend-app:staging 29 | resources: 30 | limits: 31 | memory: "128Mi" 32 | cpu: "500m" 33 | ports: 34 | - containerPort: 80 35 | 36 | --- 37 | 38 | apiVersion: v1 39 | kind: Service 40 | metadata: 41 | name: cita-frontend-app-service 42 | namespace: cita-preprod-ns 43 | spec: 44 | selector: 45 | app: cita-frontend-app 46 | type: LoadBalancer 47 | ports: 48 | - protocol: TCP 49 | port: 4200 50 | targetPort: 80 51 | nodePort: 30000 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /k8s/staging/app-deployment-service.yml: -------------------------------------------------------------------------------- 1 | 2 | apiVersion: v1 3 | kind: Namespace 4 | metadata: 5 | name: cita-staging-ns 6 | 7 | --- 8 | 9 | apiVersion: apps/v1 10 | kind: Deployment 11 | metadata: 12 | name: cita-frontend-app-deployment 13 | namespace: cita-staging-ns 14 | labels: 15 | app: cita-frontend-app 16 | spec: 17 | replicas: 1 18 | selector: 19 | matchLabels: 20 | app: cita-frontend-app 21 | template: 22 | metadata: 23 | labels: 24 | app: cita-frontend-app 25 | spec: 26 | containers: 27 | - name: cita-frontend-app 28 | image: selimhorri/cita-frontend-app:staging 29 | resources: 30 | limits: 31 | memory: "128Mi" 32 | cpu: "500m" 33 | ports: 34 | - containerPort: 80 35 | 36 | --- 37 | 38 | apiVersion: v1 39 | kind: Service 40 | metadata: 41 | name: cita-frontend-app-service 42 | namespace: cita-staging-ns 43 | spec: 44 | selector: 45 | app: cita-frontend-app 46 | type: LoadBalancer 47 | ports: 48 | - protocol: TCP 49 | port: 4200 50 | targetPort: 80 51 | nodePort: 30000 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /k8s/dev/app-deployment-service.yml: -------------------------------------------------------------------------------- 1 | 2 | apiVersion: v1 3 | kind: Namespace 4 | metadata: 5 | name: cita-dev-ns 6 | 7 | --- 8 | 9 | apiVersion: apps/v1 10 | kind: Deployment 11 | metadata: 12 | name: cita-frontend-app-deployment 13 | namespace: cita-dev-ns 14 | labels: 15 | app: cita-frontend-app 16 | spec: 17 | replicas: 3 18 | selector: 19 | matchLabels: 20 | app: cita-frontend-app 21 | template: 22 | metadata: 23 | labels: 24 | app: cita-frontend-app 25 | spec: 26 | containers: 27 | - name: cita-frontend-app 28 | image: selimhorri/cita-frontend-app:dev 29 | imagePullPolicy: IfNotPresent 30 | resources: 31 | limits: 32 | memory: "512Mi" 33 | cpu: "500m" 34 | ports: 35 | - containerPort: 80 36 | 37 | --- 38 | 39 | apiVersion: v1 40 | kind: Service 41 | metadata: 42 | name: cita-frontend-app-service 43 | namespace: cita-dev-ns 44 | spec: 45 | selector: 46 | app: cita-frontend-app 47 | type: LoadBalancer 48 | ports: 49 | - protocol: TCP 50 | port: 4200 51 | targetPort: 80 52 | nodePort: 30002 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /src/app/service/health-liveness.service.ts: -------------------------------------------------------------------------------- 1 | 2 | import { HttpClient } from '@angular/common/http'; 3 | import { Injectable } from '@angular/core'; 4 | import { Observable } from 'rxjs'; 5 | import { environment } from 'src/environments/environment'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class HealthLivenessService { 11 | 12 | private apiUrl: string = environment.API_URL; 13 | 14 | constructor(private http: HttpClient) { 15 | this.apiUrl = `${this.apiUrl}/actuator`; 16 | } 17 | 18 | public checkBackendHealth(): Observable { 19 | return this.http.get(`${this.apiUrl}/health`); 20 | } 21 | 22 | public onOpenModal(action: string): void { 23 | const button = document.createElement("button"); 24 | button.type = "button"; 25 | button.style.display = "none"; 26 | button.setAttribute("data-bs-toggle", "modal"); 27 | 28 | if (action === "health") 29 | button.setAttribute("data-bs-target", "#health"); 30 | 31 | const mainContainer = document.getElementById("main-container"); 32 | mainContainer?.appendChild(button); 33 | button.click(); 34 | } 35 | 36 | 37 | 38 | } 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { AppComponent } from './app.component'; 4 | 5 | describe('AppComponent', () => { 6 | beforeEach(async () => { 7 | await TestBed.configureTestingModule({ 8 | imports: [ 9 | RouterTestingModule 10 | ], 11 | declarations: [ 12 | AppComponent 13 | ], 14 | }).compileComponents(); 15 | }); 16 | 17 | it('should create the app', () => { 18 | const fixture = TestBed.createComponent(AppComponent); 19 | const app = fixture.componentInstance; 20 | expect(app).toBeTruthy(); 21 | }); 22 | 23 | /* 24 | it(`should have as title 'cita-frontend-app'`, () => { 25 | const fixture = TestBed.createComponent(AppComponent); 26 | const app = fixture.componentInstance; 27 | expect(app.title).toEqual('cita-frontend-app'); 28 | }); 29 | */ 30 | 31 | it('should render title', () => { 32 | const fixture = TestBed.createComponent(AppComponent); 33 | fixture.detectChanges(); 34 | const compiled = fixture.nativeElement as HTMLElement; 35 | expect(compiled.querySelector('.content span')?.textContent).toContain('cita-frontend-app app is running!'); 36 | }); 37 | }); 38 | -------------------------------------------------------------------------------- /src/app/component/location/location.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 | 10 |
11 |
12 |
13 |
14 |
15 |
16 | 19 |
20 | 21 | 27 |
28 |
29 |
30 |
31 |
32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/app/service/location.service.ts: -------------------------------------------------------------------------------- 1 | 2 | import { HttpClient } from '@angular/common/http'; 3 | import { Injectable } from '@angular/core'; 4 | import { Observable } from 'rxjs'; 5 | import { environment } from 'src/environments/environment'; 6 | import { ClientPageRequest } from '../model/request/client-page-request'; 7 | 8 | @Injectable({ 9 | providedIn: 'root' 10 | }) 11 | export class LocationService { 12 | 13 | private apiUrl: string = environment.API_URL; 14 | 15 | constructor(private http: HttpClient) { 16 | this.apiUrl = `${this.apiUrl}/locations`; 17 | } 18 | 19 | public findAll(clientPageRequest: ClientPageRequest): Observable { 20 | return this.http.get(`${this.apiUrl}`, { 21 | params: { 22 | offset: `${clientPageRequest?.offset}`, 23 | size: `${clientPageRequest?.size}` 24 | } 25 | }); 26 | } 27 | 28 | public findById(id: number): Observable { 29 | return this.http.get(`${this.apiUrl}/${id}`); 30 | } 31 | 32 | public fetchAllCities(): Observable { 33 | return this.http.get(`${this.apiUrl}/cities`); 34 | } 35 | 36 | public fetchAllStates(): Observable { 37 | return this.http.get(`${this.apiUrl}/states`); 38 | } 39 | 40 | 41 | 42 | } 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/app/component/location/location.component.ts: -------------------------------------------------------------------------------- 1 | 2 | import { HttpErrorResponse } from '@angular/common/http'; 3 | import { Component, OnInit } from '@angular/core'; 4 | import { Location } from 'src/app/model/location'; 5 | import { ErrorHandlerService } from 'src/app/service/error-handler.service'; 6 | import { LocationService } from 'src/app/service/location.service'; 7 | 8 | @Component({ 9 | selector: 'app-location', 10 | templateUrl: './location.component.html', 11 | styleUrls: ['./location.component.scss'] 12 | }) 13 | export class LocationComponent implements OnInit { 14 | 15 | public locationStates: string[] = []; 16 | 17 | constructor(private locationService: LocationService, 18 | private errorHandlerService: ErrorHandlerService) {} 19 | 20 | ngOnInit(): void { 21 | this.getAllStates(); 22 | } 23 | 24 | public getAllCities(): void { 25 | 26 | } 27 | 28 | public getAllStates(): void { 29 | this.locationService.fetchAllStates().subscribe({ 30 | next: (locationStatesPayload: any) => { 31 | this.locationStates = locationStatesPayload?.responseBody; 32 | }, 33 | error: (errorResponse: HttpErrorResponse) => { 34 | this.errorHandlerService.extractExceptionMsg(errorResponse); 35 | } 36 | }); 37 | } 38 | 39 | 40 | 41 | } 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cita-frontend-app", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "watch": "ng build --watch --configuration development", 9 | "test": "ng test" 10 | }, 11 | "private": true, 12 | "dependencies": { 13 | "@angular/animations": "^13.2.6", 14 | "@angular/common": "~13.2.0", 15 | "@angular/compiler": "~13.2.0", 16 | "@angular/core": "~13.2.0", 17 | "@angular/forms": "~13.2.0", 18 | "@angular/platform-browser": "~13.2.0", 19 | "@angular/platform-browser-dynamic": "~13.2.0", 20 | "@angular/router": "~13.2.0", 21 | "@fullcalendar/angular": "^5.11.0", 22 | "@fullcalendar/daygrid": "^5.11.0", 23 | "@fullcalendar/interaction": "^5.11.0", 24 | "@fullcalendar/timegrid": "^5.11.0", 25 | "moment": "^2.29.3", 26 | "ngx-toastr": "^14.3.0", 27 | "rxjs": "~7.5.0", 28 | "tslib": "^2.3.0", 29 | "zone.js": "~0.11.4" 30 | }, 31 | "devDependencies": { 32 | "@angular-devkit/build-angular": "~13.2.6", 33 | "@angular/cli": "~13.2.6", 34 | "@angular/compiler-cli": "~13.2.0", 35 | "@types/jasmine": "~3.10.0", 36 | "@types/node": "^12.11.1", 37 | "jasmine-core": "~4.0.0", 38 | "karma": "~6.3.0", 39 | "karma-chrome-launcher": "~3.1.0", 40 | "karma-coverage": "~2.1.0", 41 | "karma-jasmine": "~4.0.0", 42 | "karma-jasmine-html-reporter": "~1.7.0", 43 | "typescript": "~4.5.2" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | 2 | import { HttpErrorResponse } from '@angular/common/http'; 3 | import { Component, OnInit } from '@angular/core'; 4 | import { ErrorHandlerService } from './service/error-handler.service'; 5 | import { HealthLivenessService } from './service/health-liveness.service'; 6 | 7 | @Component({ 8 | selector: 'app-root', 9 | templateUrl: './app.component.html', 10 | styleUrls: ['./app.component.scss'] 11 | }) 12 | export class AppComponent implements OnInit { 13 | 14 | private HEALTH: string = "health"; 15 | public msg!: string; 16 | 17 | constructor(private healthLivenessService: HealthLivenessService, 18 | private errorHandlerService: ErrorHandlerService) {} 19 | 20 | ngOnInit(): void { 21 | this.checkBackendHealth(); 22 | } 23 | 24 | public checkBackendHealth(): void { 25 | this.healthLivenessService.checkBackendHealth().subscribe({ 26 | next: (healthPayload: any) => { 27 | if (healthPayload?.responseBody?.status === null || healthPayload?.responseBody?.status !== "UP") 28 | this.onOpenModal(this.HEALTH); 29 | }, 30 | error: (errorResponse: HttpErrorResponse) => { 31 | this.msg = this.errorHandlerService.extractExceptionMsg(errorResponse)?.errorMsg; 32 | this.onOpenModal(this.HEALTH); 33 | } 34 | }); 35 | } 36 | 37 | public onOpenModal(action: string): void { 38 | this.healthLivenessService.onOpenModal(action); 39 | } 40 | 41 | 42 | 43 | } 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/app/service/credential.service.ts: -------------------------------------------------------------------------------- 1 | 2 | import { HttpClient } from '@angular/common/http'; 3 | import { Injectable } from '@angular/core'; 4 | import { Observable } from 'rxjs'; 5 | import { environment } from 'src/environments/environment'; 6 | import { UserRoleBasedAuthority } from '../model/user-role-based-authority'; 7 | 8 | @Injectable({ 9 | providedIn: 'root' 10 | }) 11 | export class CredentialService { 12 | 13 | private API_URL: string = environment.API_URL; 14 | 15 | constructor(private http: HttpClient) { 16 | this.API_URL = `${this.API_URL}/credentials/username`; 17 | } 18 | 19 | public findByUsername(username: string): Observable { 20 | return this.http.get(`${this.API_URL}/${username}`, { 21 | headers: { 22 | UsernameAuth: `${sessionStorage.getItem(`username`)}`, 23 | Authorization: `Bearer ${sessionStorage.getItem(`jwtToken`)}`, 24 | } 25 | }); 26 | } 27 | 28 | public getUserRole(userRole: string): string { 29 | if (userRole === UserRoleBasedAuthority.CUSTOMER) 30 | return userRole.trim().toLowerCase(); 31 | else if (userRole === UserRoleBasedAuthority.WORKER) 32 | return userRole.trim().toLowerCase(); 33 | else if (userRole === UserRoleBasedAuthority.MANAGER) 34 | return userRole.trim().toLowerCase(); 35 | else if (userRole === UserRoleBasedAuthority.OWNER) 36 | return userRole.trim().toLowerCase(); 37 | else 38 | return "NONE"; 39 | } 40 | 41 | 42 | 43 | } 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/app/service/service-detail.service.ts: -------------------------------------------------------------------------------- 1 | 2 | import { HttpClient } from '@angular/common/http'; 3 | import { Injectable } from '@angular/core'; 4 | import { Observable } from 'rxjs'; 5 | import { environment } from 'src/environments/environment'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class ServiceDetailService { 11 | 12 | private apiUrl: string = environment.API_URL; 13 | 14 | constructor(private http: HttpClient) { 15 | this.apiUrl = `${this.apiUrl}/service-details`; 16 | } 17 | 18 | public fetchOrderedServiceDetails(reservationId: number): Observable { 19 | return this.http.get(`${this.apiUrl}/reservationId/${reservationId}`, { 20 | headers: { 21 | UsernameAuth: `${sessionStorage.getItem(`username`)}`, 22 | Authorization: `Bearer ${sessionStorage.getItem(`jwtToken`)}`, 23 | } 24 | }); 25 | } 26 | 27 | public fetchOrderedServiceDetailsWithIdentifier(reservationIdentifier: number): Observable { 28 | return this.http.get(`${this.apiUrl}/reservationIdentifier/${reservationIdentifier}`, { 29 | headers: { 30 | UsernameAuth: `${sessionStorage.getItem(`username`)}`, 31 | Authorization: `Bearer ${sessionStorage.getItem(`jwtToken`)}`, 32 | } 33 | }); 34 | } 35 | 36 | public findAllByCategorySaloonId(saloonId: number): Observable { 37 | return this.http.get(`${this.apiUrl}/saloonId/${saloonId}`); 38 | } 39 | 40 | 41 | 42 | } 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /.github/workflows/pipeline-dev-push.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Develop, On PUSH NodeJS CI/CD pipeline for Angular 3 | 4 | on: 5 | push: 6 | branches: [ develop ] 7 | 8 | env: 9 | DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }} 10 | DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} 11 | DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} 12 | 13 | jobs: 14 | build: 15 | runs-on: ubuntu-latest 16 | strategy: 17 | matrix: 18 | node-version: [ 16.x ] 19 | steps: 20 | - uses: actions/checkout@v2 21 | - name: Use Node.js ${{ matrix.node-version }} 22 | uses: actions/setup-node@v2 23 | with: 24 | node-version: ${{ matrix.node-version }} 25 | cache: 'npm' 26 | - run: npm ci 27 | - run: npm run build --if-present 28 | #- run: npm test 29 | 30 | push: 31 | needs: build 32 | runs-on: ubuntu-latest 33 | strategy: 34 | matrix: 35 | node-version: [ 16.x ] 36 | steps: 37 | - uses: actions/checkout@v2 38 | - name: Use Node.js ${{ matrix.node-version }} 39 | uses: actions/setup-node@v2 40 | with: 41 | node-version: ${{ matrix.node-version }} 42 | cache: 'npm' 43 | - run: npm ci 44 | - run: npm run build --if-present 45 | - name: Push Docker image 46 | uses: mr-smithers-excellent/docker-build-push@v5 47 | with: 48 | image: ${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE }} 49 | tags: dev 50 | registry: docker.io 51 | username: ${{ env.DOCKER_USERNAME }} 52 | password: ${{ env.DOCKER_PASSWORD }} 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | jasmine: { 17 | // you can add configuration options for Jasmine here 18 | // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html 19 | // for example, you can disable the random execution with `random: false` 20 | // or set a specific seed with `seed: 4321` 21 | }, 22 | clearContext: false // leave Jasmine Spec Runner output visible in browser 23 | }, 24 | jasmineHtmlReporter: { 25 | suppressAll: true // removes the duplicated traces 26 | }, 27 | coverageReporter: { 28 | dir: require('path').join(__dirname, './coverage/cita-frontend-app'), 29 | subdir: '.', 30 | reporters: [ 31 | { type: 'html' }, 32 | { type: 'text-summary' } 33 | ] 34 | }, 35 | reporters: ['progress', 'kjhtml'], 36 | port: 9876, 37 | colors: true, 38 | logLevel: config.LOG_INFO, 39 | autoWatch: true, 40 | browsers: ['Chrome'], 41 | singleRun: false, 42 | restartOnFileChange: true 43 | }); 44 | }; 45 | -------------------------------------------------------------------------------- /src/styles.scss: -------------------------------------------------------------------------------- 1 | 2 | @import 'https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css'; 3 | @import 'https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css'; 4 | @import 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'; 5 | 6 | body { 7 | margin: 1.5px; 8 | background: #f5f5f5; 9 | } 10 | 11 | .card { 12 | border: none; 13 | -webkit-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); 14 | box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); 15 | margin-bottom: 30px; 16 | } 17 | 18 | .w-60 { 19 | width: 60px; 20 | } 21 | 22 | h1, 23 | h2, 24 | h3, 25 | h4, 26 | h5, 27 | h6 { 28 | margin: 0 0 10px; 29 | // font-weight: 600; 30 | } 31 | 32 | .social-links li a { 33 | -webkit-border-radius: 50%; 34 | background-color: rgba(89, 206, 181, .85); 35 | border-radius: 50%; 36 | color: #fff; 37 | display: inline-block; 38 | height: 30px; 39 | line-height: 30px; 40 | text-align: center; 41 | width: 30px; 42 | font-size: 12px; 43 | } 44 | 45 | /* 46 | a { 47 | // color: #707070; 48 | } 49 | */ 50 | 51 | .loader { 52 | display: inline-block; 53 | width: 80px; 54 | height: 80px; 55 | } 56 | 57 | .loader:after { 58 | content: " "; 59 | display: block; 60 | width: 64px; 61 | height: 64px; 62 | margin: 8px; 63 | border-radius: 50%; 64 | border: 6px solid rgb(61, 22, 22); 65 | border-color: rgb(0, 110, 255) transparent rgb(0, 110, 255) transparent; 66 | animation: loader 1s linear infinite; 67 | } 68 | 69 | @keyframes loader { 70 | 0% { 71 | transform: rotate(0deg); 72 | } 73 | 74 | 100% { 75 | transform: rotate(360deg); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /.github/workflows/pipeline-preprod-push.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Preprod, On PUSH NodeJS CI/CD pipeline for Angular 3 | 4 | on: 5 | push: 6 | branches: [ preprod ] 7 | 8 | env: 9 | PROFILE: preprod 10 | DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }} 11 | DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} 12 | DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} 13 | 14 | jobs: 15 | build: 16 | runs-on: ubuntu-latest 17 | strategy: 18 | matrix: 19 | node-version: [ 16.x ] 20 | steps: 21 | - uses: actions/checkout@v2 22 | - name: Use Node.js ${{ matrix.node-version }} 23 | uses: actions/setup-node@v2 24 | with: 25 | node-version: ${{ matrix.node-version }} 26 | cache: 'npm' 27 | - run: npm ci 28 | - run: npm run build --if-present --configuration=${{ env.PROFILE }} 29 | #- run: npm test 30 | 31 | push: 32 | needs: build 33 | runs-on: ubuntu-latest 34 | strategy: 35 | matrix: 36 | node-version: [ 16.x ] 37 | steps: 38 | - uses: actions/checkout@v2 39 | - name: Use Node.js ${{ matrix.node-version }} 40 | uses: actions/setup-node@v2 41 | with: 42 | node-version: ${{ matrix.node-version }} 43 | cache: 'npm' 44 | - run: npm ci 45 | - run: npm run build --if-present --configuration=${{ env.PROFILE }} 46 | - name: Push Docker image 47 | uses: mr-smithers-excellent/docker-build-push@v5 48 | with: 49 | image: ${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE }} 50 | tags: preprod 51 | registry: docker.io 52 | username: ${{ env.DOCKER_USERNAME }} 53 | password: ${{ env.DOCKER_PASSWORD }} 54 | 55 | -------------------------------------------------------------------------------- /.github/workflows/pipeline-staging-push.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Staging, On PUSH NodeJS CI/CD pipeline for Angular 3 | 4 | on: 5 | push: 6 | branches: [ staging ] 7 | 8 | env: 9 | PROFILE: staging 10 | DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }} 11 | DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} 12 | DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} 13 | 14 | jobs: 15 | build: 16 | runs-on: ubuntu-latest 17 | strategy: 18 | matrix: 19 | node-version: [ 16.x ] 20 | steps: 21 | - uses: actions/checkout@v2 22 | - name: Use Node.js ${{ matrix.node-version }} 23 | uses: actions/setup-node@v2 24 | with: 25 | node-version: ${{ matrix.node-version }} 26 | cache: 'npm' 27 | - run: npm ci 28 | - run: npm run build --if-present --configuration=${{ env.PROFILE }} 29 | #- run: npm test 30 | 31 | push: 32 | needs: build 33 | runs-on: ubuntu-latest 34 | strategy: 35 | matrix: 36 | node-version: [ 16.x ] 37 | steps: 38 | - uses: actions/checkout@v2 39 | - name: Use Node.js ${{ matrix.node-version }} 40 | uses: actions/setup-node@v2 41 | with: 42 | node-version: ${{ matrix.node-version }} 43 | cache: 'npm' 44 | - run: npm ci 45 | - run: npm run build --if-present --configuration=${{ env.PROFILE }} 46 | - name: Push Docker image 47 | uses: mr-smithers-excellent/docker-build-push@v5 48 | with: 49 | image: ${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE }} 50 | tags: staging 51 | registry: docker.io 52 | username: ${{ env.DOCKER_USERNAME }} 53 | password: ${{ env.DOCKER_PASSWORD }} 54 | 55 | -------------------------------------------------------------------------------- /.github/workflows/pipeline-prod-push.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Prod, On PUSH NodeJS CI/CD pipeline for Angular 3 | 4 | on: 5 | push: 6 | branches: [ master ] 7 | 8 | env: 9 | PROFILE: production 10 | DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }} 11 | DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} 12 | DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} 13 | 14 | jobs: 15 | build: 16 | runs-on: ubuntu-latest 17 | strategy: 18 | matrix: 19 | node-version: [ 16.x ] 20 | steps: 21 | - uses: actions/checkout@v2 22 | - name: Use Node.js ${{ matrix.node-version }} 23 | uses: actions/setup-node@v2 24 | with: 25 | node-version: ${{ matrix.node-version }} 26 | cache: 'npm' 27 | - run: npm ci 28 | - run: npm run build --if-present --configuration=${{ env.PROFILE }} 29 | #- run: npm test 30 | 31 | push: 32 | needs: build 33 | runs-on: ubuntu-latest 34 | strategy: 35 | matrix: 36 | node-version: [ 16.x ] 37 | steps: 38 | - uses: actions/checkout@v2 39 | - name: Use Node.js ${{ matrix.node-version }} 40 | uses: actions/setup-node@v2 41 | with: 42 | node-version: ${{ matrix.node-version }} 43 | cache: 'npm' 44 | - run: npm ci 45 | - run: npm run build --if-present --configuration=${{ env.PROFILE }} 46 | - name: Push Docker image 47 | uses: mr-smithers-excellent/docker-build-push@v5 48 | with: 49 | image: ${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE }} 50 | tags: prod, latest 51 | registry: docker.io 52 | username: ${{ env.DOCKER_USERNAME }} 53 | password: ${{ env.DOCKER_PASSWORD }} 54 | 55 | -------------------------------------------------------------------------------- /src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 |

6 | 7 | 8 | 9 | 40 | 41 |

42 | 43 |
44 |
45 |

Copyright © Your Website 2021

46 |
47 |
48 | 49 |
-------------------------------------------------------------------------------- /src/app/service/employee/worker/worker-reservation-detail.service.ts: -------------------------------------------------------------------------------- 1 | 2 | import { HttpClient } from '@angular/common/http'; 3 | import { Injectable } from '@angular/core'; 4 | import * as moment from 'moment'; 5 | import { map, Observable } from 'rxjs'; 6 | import { DateBackendFormat } from 'src/app/model/date-backend-format'; 7 | import { environment } from 'src/environments/environment'; 8 | 9 | @Injectable({ 10 | providedIn: 'root' 11 | }) 12 | export class WorkerReservationDetailService { 13 | 14 | private apiUrl: string = environment.API_URL; 15 | 16 | constructor(private http: HttpClient) { 17 | this.apiUrl = `${this.apiUrl}/employees/workers/reservations/details`; 18 | } 19 | 20 | public fetchReservationDetails(reservationId: number): Observable { 21 | return this.http.get(`${this.apiUrl}/${reservationId}`, { 22 | headers: { 23 | UsernameAuth: `${sessionStorage.getItem(`username`)}`, 24 | Authorization: `Bearer ${sessionStorage.getItem(`jwtToken`)}`, 25 | } 26 | }).pipe(map(payload => { 27 | payload?.responseBody?.orderedDetails?.content?.map((o: any) => 28 | o.orderedDate = moment(o?.orderedDate, DateBackendFormat.LOCAL_DATE_TIME).toDate()); 29 | payload.responseBody.reservation.startDate = moment(payload?.responseBody?.reservation?.startDate, 30 | DateBackendFormat.LOCAL_DATE_TIME).toDate(); 31 | payload.responseBody.reservation.cancelDate = moment(payload?.responseBody?.reservation?.cancelDate, 32 | DateBackendFormat.LOCAL_DATE_TIME).toDate(); 33 | payload.responseBody.reservation.completeDate = moment(payload?.responseBody?.reservation?.completeDate, 34 | DateBackendFormat.LOCAL_DATE_TIME).toDate(); 35 | return payload; 36 | })); 37 | } 38 | 39 | 40 | 41 | } 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | App 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 |
25 |
26 | 27 | 30 | 31 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/app/component/workspace/customer/reservation/assigned-worker/assigned-worker.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
Profile
7 |
8 |
9 |
10 | User-Profile-Image 11 |
12 |
Alessa Robert
13 |

Active | Male | Born 23.05.1992

14 |
15 |

Activity Level: 87%

16 |
    17 |
  • 18 |
  • 19 |
  • 20 |
  • 21 |
  • 22 |
23 |
24 |
25 |
26 | 27 |

1256

28 |
29 |
30 | 31 |

8562

32 |
33 |
34 | 35 |

189

36 |
37 |
38 |
39 |

Lorem Ipsum is simply dummy text of the printing and typesetting industry.

40 |
41 | 46 |
47 |
48 |
49 |
50 |
-------------------------------------------------------------------------------- /src/app/component/saloon/saloon.component.scss: -------------------------------------------------------------------------------- 1 | body{margin-top:20px; 2 | background-color: #eee; 3 | } 4 | 5 | .search-result-categories>li>a { 6 | //color: #b6b6b6; 7 | font-weight: 400 8 | } 9 | 10 | .search-result-categories>li>a:hover { 11 | background-color: #ddd; 12 | color: #555 13 | } 14 | 15 | .search-result-categories>li>a>.glyphicon { 16 | margin-right: 5px 17 | } 18 | 19 | .search-result-categories>li>a>.badge { 20 | float: right 21 | } 22 | 23 | .search-results-count { 24 | margin-top: 10px 25 | } 26 | 27 | .search-result-item { 28 | padding: 20px; 29 | background-color: #fff; 30 | border-radius: 4px 31 | } 32 | 33 | .search-result-item:after, 34 | .search-result-item:before { 35 | content: " "; 36 | display: table 37 | } 38 | 39 | .search-result-item:after { 40 | clear: both 41 | } 42 | 43 | .search-result-item .image-link { 44 | display: block; 45 | overflow: hidden; 46 | border-top-left-radius: 4px; 47 | border-bottom-left-radius: 4px 48 | } 49 | 50 | @media (min-width:768px) { 51 | .search-result-item .image-link { 52 | display: inline-block; 53 | margin: -20px 0 -20px -20px; 54 | float: left; 55 | width: 200px 56 | } 57 | } 58 | 59 | @media (max-width:767px) { 60 | .search-result-item .image-link { 61 | max-height: 200px 62 | } 63 | } 64 | 65 | .search-result-item .image { 66 | max-width: 100% 67 | } 68 | 69 | .search-result-item .info { 70 | margin-top: 2px; 71 | font-size: 12px; 72 | color: #999 73 | } 74 | 75 | .search-result-item .description { 76 | font-size: 13px 77 | } 78 | 79 | .search-result-item+.search-result-item { 80 | margin-top: 20px 81 | } 82 | 83 | @media (min-width:768px) { 84 | .search-result-item-body { 85 | margin-left: 200px 86 | } 87 | } 88 | 89 | .search-result-item-heading { 90 | font-weight: 400 91 | } 92 | 93 | .search-result-item-heading>a { 94 | // color: #555 95 | } 96 | 97 | @media (min-width:768px) { 98 | .search-result-item-heading { 99 | margin: 0 100 | } 101 | } -------------------------------------------------------------------------------- /src/app/service/ordered-detail.service.ts: -------------------------------------------------------------------------------- 1 | 2 | import { HttpClient } from '@angular/common/http'; 3 | import { Injectable } from '@angular/core'; 4 | import * as moment from 'moment'; 5 | import { Observable } from 'rxjs'; 6 | import { environment } from 'src/environments/environment'; 7 | import { DateBackendFormat } from '../model/date-backend-format'; 8 | import { OrderedDetailId } from '../model/ordered-detail-id'; 9 | import { OrderedDetailRequest } from '../model/request/ordered-detail-request'; 10 | 11 | @Injectable({ 12 | providedIn: 'root' 13 | }) 14 | export class OrderedDetailService { 15 | 16 | private apiUrl: string = environment.API_URL; 17 | 18 | constructor(private http: HttpClient) { 19 | this.apiUrl = `${this.apiUrl}/ordered-details`; 20 | } 21 | 22 | public deleteOrderedServiceDetail(orderedDetailId: OrderedDetailId): Observable { 23 | return this.http.delete(`${this.apiUrl}`, { 24 | body: orderedDetailId, 25 | headers: { 26 | UsernameAuth: `${sessionStorage.getItem(`username`)}`, 27 | Authorization: `Bearer ${sessionStorage.getItem(`jwtToken`)}`, 28 | } 29 | }); 30 | } 31 | 32 | public save(orderDetailRequest: OrderedDetailRequest): Observable { 33 | orderDetailRequest.orderedDate = moment(Date.now()).format(DateBackendFormat.LOCAL_DATE_TIME); 34 | // console.log(JSON.stringify(orderDetailRequest)) 35 | return this.http.post(`${this.apiUrl}`, orderDetailRequest, { 36 | headers: { 37 | UsernameAuth: `${sessionStorage.getItem(`username`)}`, 38 | Authorization: `Bearer ${sessionStorage.getItem(`jwtToken`)}`, 39 | } 40 | }); 41 | } 42 | 43 | public findById(orderedDetailId: OrderedDetailId): Observable { 44 | return this.http.get(`${this.apiUrl}/reservationId/${orderedDetailId?.reservationId}/serviceDetailId/${orderedDetailId?.serviceDetailId}`, { 45 | headers: { 46 | UsernameAuth: `${sessionStorage.getItem(`username`)}`, 47 | Authorization: `Bearer ${sessionStorage.getItem(`jwtToken`)}`, 48 | } 49 | }); 50 | } 51 | 52 | 53 | 54 | } 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/app/component/workspace/customer/rating/rating.component.ts: -------------------------------------------------------------------------------- 1 | 2 | import { HttpErrorResponse } from '@angular/common/http'; 3 | import { Component, OnInit } from '@angular/core'; 4 | import { Employee } from 'src/app/model/employee'; 5 | import { PageResponse } from 'src/app/model/response/page/page-response'; 6 | import { CredentialService } from 'src/app/service/credential.service'; 7 | import { CustomerService } from 'src/app/service/customer.service'; 8 | import { EmployeeService } from 'src/app/service/employee.service'; 9 | import { ErrorHandlerService } from 'src/app/service/error-handler.service'; 10 | 11 | @Component({ 12 | selector: 'app-customer-rating', 13 | templateUrl: './rating.component.html', 14 | styleUrls: ['./rating.component.scss'] 15 | }) 16 | export class RatingComponent implements OnInit { 17 | 18 | public accountUrl!: string; 19 | public ratings!: PageResponse; 20 | public employees: Employee[] = []; 21 | 22 | constructor(private credentialService: CredentialService, 23 | private customerService: CustomerService, 24 | private employeeService: EmployeeService, 25 | private errorHandlerService: ErrorHandlerService) {} 26 | 27 | ngOnInit(): void { 28 | this.accountUrl = this.credentialService.getUserRole(`${sessionStorage.getItem(`userRole`)}`); 29 | this.fetchRatings(); 30 | } 31 | 32 | public fetchRatings(): void { 33 | /* 34 | this.customerService.fetchRatings().subscribe({ 35 | next: (customerRatingPayload: any) => { 36 | this.ratings = customerRatingPayload?.responseBody?.ratings; 37 | this.ratings?.content.forEach(r => { 38 | this.employeeService.findById(r?.workerId).subscribe({ 39 | next: (employeePayload: any) => { 40 | this.employees?.push(employeePayload?.responseBody); 41 | }, 42 | error: (errorResponse: HttpErrorResponse) => this.errorHandlerService.extractExceptionMsg(errorResponse) 43 | }); 44 | }); 45 | }, 46 | 47 | }); 48 | */ 49 | } 50 | 51 | public calculateEmployeeRatings(employee: Employee): void { 52 | 53 | } 54 | 55 | 56 | 57 | } 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/app/component/error/error404/error404.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 | 9 | 10 | 12 | 14 | 16 | 18 | 20 | 21 | 22 |
23 | 24 |
25 |
26 |

404

27 |

NOT FOUND!

28 |
29 | 33 |
34 |
35 |
36 |
37 |
38 |
39 | 40 | 41 | 42 | 43 | --------------------------------------------------------------------------------