Skip to content

Commit

Permalink
Remove the old schedule UI (#122)
Browse files Browse the repository at this point in the history
* First step of removing the old UI

* Remove even more stuff
  • Loading branch information
duncte123 authored Dec 7, 2024
1 parent 5f15059 commit 4cf753e
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 1,071 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<ng-template [ngIf]="marathon.scheduleDone && schedules.length > 0">
<li *ngIf="schedules.length == 1; else multiSchedule" [title]="'marathon.menu.schedule' | translate">
<!-- 1 schedule: normal link -->
<a [routerLink]="'/marathon/' + marathonId + '/schedule/' + (schedules[0].slug ?? '') | localize" routerLinkActive="is-active" [routerLinkActiveOptions]="{exact: true}" class="menu-item-link">
<a [routerLink]="'/marathon/' + marathonId + '/schedule/' + schedules[0].slug | localize" routerLinkActive="is-active" [routerLinkActiveOptions]="{exact: true}" class="menu-item-link">
<fa-icon class="menu-item-icon" [icon]="iconCalendar"></fa-icon>
<span class="menu-item-label">
{{ 'marathon.menu.schedule' | translate }}
Expand Down
33 changes: 1 addition & 32 deletions src/app/marathon/marathon.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import { TranslateModule } from '@ngx-translate/core';
import { SelectionComponent } from './selection/selection.component';
import { SelectionResolver } from '../resolvers/selection-resolver';
import { CanActivateMarathonSubmitGuard } from '../guards/can-activate-marathon-submit-guard.service';
import { ScheduleManagementComponent } from './schedule-management/schedule-management.component';
import { ScheduleResolver } from '../resolvers/schedule-resolver';
import { OengusCommonModule } from '../oengus-common/oengus-common.module';
import { DragDropModule } from '@angular/cdk/drag-drop';
import { ScheduleComponent } from './schedule/schedule.component';
Expand Down Expand Up @@ -69,7 +67,6 @@ import { ScheduleByIdResolver } from '../resolvers/schedule-by-id-resolver';
import { HomeSubmitButtonComponent } from './home/home-submit-button/home-submit-button.component';
import { WarningModalComponent } from './schedule-management/warning-modal/warning-modal.component';
import { ScheduleBySlugResolver } from '../resolvers/schedule-by-slug-resolver';
import { ScheduleV1ModelResolver } from '../resolvers/schedule-v1-model-resolver';
import { SubmissionsTableComponent } from './schedule-management/edit/submissions-table/submissions-table.component';
import { ScheduleTableComponent } from './schedule-management/edit/schedule-table/schedule-table.component';
import { SetupBlockEditorComponent } from './schedule-management/edit/schedule-table/setup-block-editor/setup-block-editor.component';
Expand Down Expand Up @@ -148,31 +145,6 @@ const marathonRoutes: Routes = [
(route, state) => inject(CanActivateMarathonActiveGuard).canActivate(route, state)
]
},
{
path: 'schedule',
component: ScheduleComponent,
resolve: {
schedule: ScheduleResolver
},
},
{
path: 'schedule/manage',
component: ScheduleManagementComponent,
resolve: {
selection: SelectionResolver,
schedule: ScheduleV1ModelResolver,
availabilities: AvailabilitiesResolver
},
data: {
statuses: ['VALIDATED', 'BONUS'],
withCustomData: true,
isAdminRoute: true,
},
canActivate: [
(route, state) => inject(CanActivateMarathonSettingsGuard).canActivate(route, state),
(route, state) => inject(CanActivateMarathonActiveGuard).canActivate(route, state)
]
},
{
path: 'schedule/:slug',
component: ScheduleComponent,
Expand Down Expand Up @@ -241,7 +213,7 @@ const marathonRoutes: Routes = [
path: 'incentives/manage',
component: IncentiveManagementComponent,
resolve: {
schedule: ScheduleV1ModelResolver,
schedule: null,
incentives: IncentivesResolver
},
data: {
Expand Down Expand Up @@ -288,7 +260,6 @@ const marathonRoutes: Routes = [
SubmitComponent,
SubmissionsComponent,
SelectionComponent,
ScheduleManagementComponent,
ScheduleComponent,
IncentiveManagementComponent,
IncentiveComponent,
Expand Down Expand Up @@ -364,8 +335,6 @@ const marathonRoutes: Routes = [
CanActivateMarathonActiveGuard,
MarathonResolver,
SubmissionResolver,
ScheduleResolver,
ScheduleV1ModelResolver,
ScheduleBySlugResolver,
ScheduleByIdResolver,
SelectionResolver,
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 4cf753e

Please sign in to comment.