Skip to content

Commit

Permalink
Code formatting ignore-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
GCCollabBot committed Mar 19, 2024
1 parent 13347ef commit d9c89f7
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 39 deletions.
46 changes: 26 additions & 20 deletions src/app/features/calendar/calendar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,21 @@
(click)="navigateCalendar(-1)"
>
<i class="fa-solid fa-angle-left fa-lg"></i>
</app-button>
</app-button>

<!-- Month/Year Select -->
<div class="date-picker">
<mat-form-field>
<mat-label>{{ 'Select a Month' | translate }}</mat-label>
<mat-select [(ngModel)]="selectedMonth"
(selectionChange)="dateSelectChange()"
[disabled]="loading"
[matTooltip]="'Select a Month' | translate"
[matTooltipPosition]="TooltipDirection.Above"
disableRipple>
@for (month of [0,1,2,3,4,5,6,7,8,9,10,11]; track $index) {
<mat-select
[(ngModel)]="selectedMonth"
(selectionChange)="dateSelectChange()"
[disabled]="loading"
[matTooltip]="'Select a Month' | translate"
[matTooltipPosition]="TooltipDirection.Above"
disableRipple
>
@for (month of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; track $index) {
<mat-option [value]="month">
{{ monthIndexToDate(month) | localizedDate: 'MMMM' | titlecase }}
</mat-option>
Expand All @@ -64,12 +66,14 @@

<mat-form-field>
<mat-label>{{ 'Select a Year' | translate }}</mat-label>
<mat-select [(ngModel)]="selectedYear"
(selectionChange)="dateSelectChange()"
[disabled]="loading"
[matTooltip]="'Select a Year' | translate"
[matTooltipPosition]="TooltipDirection.Above"
disableRipple>
<mat-select
[(ngModel)]="selectedYear"
(selectionChange)="dateSelectChange()"
[disabled]="loading"
[matTooltip]="'Select a Year' | translate"
[matTooltipPosition]="TooltipDirection.Above"
disableRipple
>
@for (year of years; track $index) {
<mat-option [value]="year">
{{ year }}
Expand All @@ -90,7 +94,7 @@
(click)="navigateCalendar(1)"
>
<i class="fa-solid fa-angle-right fa-lg"></i>
</app-button>
</app-button>
</div>

<!-- Right Actions -->
Expand Down Expand Up @@ -138,11 +142,13 @@
</div>

<!-- Events -->
<app-calendar-events *ngIf="activeDayIndex > -1 && !loading"
[calendarDate]="dates[activeDayIndex]"
(eventEdit)="editEvent($event)"
(eventDelete)="deleteEvent($event)"
(eventCreate)="toggleEventForm()">
<app-calendar-events
*ngIf="activeDayIndex > -1 && !loading"
[calendarDate]="dates[activeDayIndex]"
(eventEdit)="editEvent($event)"
(eventDelete)="deleteEvent($event)"
(eventCreate)="toggleEventForm()"
>
</app-calendar-events>

<!-- Event Form -->
Expand Down
4 changes: 2 additions & 2 deletions src/app/features/calendar/calendar.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $cal-gap: 15px;
.mat-mdc-form-field-infix {
width: auto;
}
.mdc-notched-outline__leading,
.mdc-notched-outline__leading,
.mdc-notched-outline__notch,
.mdc-notched-outline__trailing {
border: none;
Expand Down Expand Up @@ -167,4 +167,4 @@ app-calendar-events {
align-self: flex-end;
gap: 16px;
}
}
}
3 changes: 1 addition & 2 deletions src/app/features/calendar/calendar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ export class CalendarComponent implements OnInit, OnChanges, OnDestroy {
}

ngOnDestroy(): void {
if (this.resizeSub)
this.resizeSub.unsubscribe();
if (this.resizeSub) this.resizeSub.unsubscribe();
}

navigateCalendar(interval: number = 1, clickedDay: ICalendarDate | undefined = undefined): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@
<mat-card-header>
<span>{{ isToday(calendarDate.date) ? "Today's Events" : 'Events on ' + (calendarDate.date | localizedDate) }}</span>

<!-- Add Event -->
<app-button
theme="black"
matButtonType="mat-icon-button"
[tooltip]="'Add Event' | translate"
[ariaLabel]="'Add Event'"
(click)="createEvent()"
>
<i class="fa-solid fa-calendar-plus fa-lg"></i>
</app-button>
<!-- Add Event -->
<app-button theme="black" matButtonType="mat-icon-button" [tooltip]="'Add Event' | translate" [ariaLabel]="'Add Event'" (click)="createEvent()">
<i class="fa-solid fa-calendar-plus fa-lg"></i>
</app-button>
</mat-card-header>

<mat-card-content>
Expand Down Expand Up @@ -58,9 +52,7 @@
<div>
{{ event.eventType }}
</div>
<div>
{{ event.location.address }}, {{ event.location.city }}, {{ event.location.province }}
</div>
<div>{{ event.location.address }}, {{ event.location.city }}, {{ event.location.province }}</div>
</div>

<div class="actions">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mat-card-header {
padding: 16px;
align-items: center;

>span {
> span {
flex: 1;
font-size: 28px;
font-weight: 600;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('EventCardComponent', () => {
confirmed: false,
declined: false,
toEventForm: event.toEventForm,
fromEventForm: event.fromEventForm
fromEventForm: event.fromEventForm,
};

fixture.detectChanges();
Expand Down

0 comments on commit d9c89f7

Please sign in to comment.