diff --git a/angular.json b/angular.json index 6dfe2c9..7621d68 100644 --- a/angular.json +++ b/angular.json @@ -60,7 +60,7 @@ { "type": "initial", "maximumWarning": "1mb", - "maximumError": "2mb" + "maximumError": "2.5mb" }, { "type": "anyComponentStyle", diff --git a/package-lock.json b/package-lock.json index e7562e7..42f6819 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,8 @@ "@ng-bootstrap/ng-bootstrap": "^16.0.0", "@popperjs/core": "^2.11.8", "bootstrap": "^5.3.2", + "moment": "^2.30.1", + "moment-timezone": "^0.5.45", "rxjs": "~7.8.1", "tslib": "^2.6.2", "zone.js": "~0.14.4" @@ -15318,6 +15320,25 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "engines": { + "node": "*" + } + }, + "node_modules/moment-timezone": { + "version": "0.5.45", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.45.tgz", + "integrity": "sha512-HIWmqA86KcmCAhnMAN0wuDOARV/525R2+lOLotuGFzn4HO+FH+/645z2wx0Dt3iDv6/p61SIvKnDstISainhLQ==", + "dependencies": { + "moment": "^2.29.4" + }, + "engines": { + "node": "*" + } + }, "node_modules/mrmime": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", @@ -32671,6 +32692,19 @@ } } }, + "moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==" + }, + "moment-timezone": { + "version": "0.5.45", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.45.tgz", + "integrity": "sha512-HIWmqA86KcmCAhnMAN0wuDOARV/525R2+lOLotuGFzn4HO+FH+/645z2wx0Dt3iDv6/p61SIvKnDstISainhLQ==", + "requires": { + "moment": "^2.29.4" + } + }, "mrmime": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", diff --git a/package.json b/package.json index cf55b16..8e8c342 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,8 @@ "@ng-bootstrap/ng-bootstrap": "^16.0.0", "@popperjs/core": "^2.11.8", "bootstrap": "^5.3.2", + "moment": "^2.30.1", + "moment-timezone": "^0.5.45", "rxjs": "~7.8.1", "tslib": "^2.6.2", "zone.js": "~0.14.4" diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index b9b4923..e0ea548 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -22,6 +22,10 @@ import {ShelterCertificateDeleteComponent} from "./shelter-certificate/shelter-c import {ShelterCreateComponent} from "./shelter/shelter-create/shelter-create.component"; import {LocationListComponent} from "./location/location-list/location-list.component"; import {LocationCreateComponent} from "./location/location-create/location-create.component"; +import {ScheduleListComponent} from "./schedule/schedule-list/schedule-list.component"; +import {ScheduleCreateComponent} from "./schedule/schedule-create/schedule-create.component"; +import {ScheduleDetailComponent} from "./schedule/schedule-detail/schedule-detail.component"; + const routes: Routes = [ { path: 'users/create', component: UserRegisterComponent}, @@ -43,6 +47,9 @@ const routes: Routes = [ { path: 'shelter-certificate/create', component: ShelterCertificateCreateComponent}, { path: 'shelter-certificate/:id', component: ShelterCertificateDetailComponent}, { path: 'shelter-certificate/:id/delete', component: ShelterCertificateDeleteComponent}, + { path: 'schedules', component: ScheduleListComponent, canActivate: [LoggedInGuard]}, + { path: 'schedules/create', component: ScheduleCreateComponent, canActivate: [LoggedInGuard]}, + { path: 'schedules/:id', component: ScheduleDetailComponent, canActivate: [LoggedInGuard]}, { path: 'about', component: AboutComponent}, { path: '404', component: NotFoundComponent}, { path: '', redirectTo: 'about', pathMatch: 'full'}, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 677b01d..7b7a91a 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -42,6 +42,12 @@ import {LocationService} from './location/location.service' import {LocationListComponent} from './location/location-list/location-list.component'; import {LocationSearchComponent} from './location/location-search/location-search.component'; import {LocationCreateComponent} from "./location/location-create/location-create.component"; +import {ScheduleService} from './schedule/schedule.service' +import {ScheduleListComponent} from './schedule/schedule-list/schedule-list.component'; +import {ScheduleSearchComponent} from './schedule/schedule-search/schedule-search.component'; +import {ScheduleCreateComponent} from "./schedule/schedule-create/schedule-create.component"; +import {ScheduleDetailComponent} from "./schedule/schedule-detail/schedule-detail.component"; + @NgModule({ declarations: [ @@ -65,6 +71,10 @@ import {LocationCreateComponent} from "./location/location-create/location-creat ShelterCertificateCreateComponent, ShelterCertificateDetailComponent, ShelterCertificateDeleteComponent, + ScheduleListComponent, + ScheduleSearchComponent, + ScheduleCreateComponent, + ScheduleDetailComponent, ShelterListComponent, ShelterCreateComponent, ShelterDetailComponent, @@ -89,7 +99,7 @@ import {LocationCreateComponent} from "./location/location-create/location-creat providers: [ { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }, { provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true }, - AuthenticationBasicService, LoggedInGuard, UserService, ShelterService, LocationService, + AuthenticationBasicService, LoggedInGuard, UserService, ScheduleService, ShelterService, LocationService, provideAnimationsAsync() ], bootstrap: [AppComponent] diff --git a/src/app/navbar/navbar.component.html b/src/app/navbar/navbar.component.html index dd11dc3..b8a93f8 100644 --- a/src/app/navbar/navbar.component.html +++ b/src/app/navbar/navbar.component.html @@ -28,6 +28,15 @@ [routerLink]="['/shelter-certificate/create']"> Create +