Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
AdiMakkar committed Nov 24, 2023
1 parent 9bb3244 commit 4ab79a4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class EventCardComponent {

this.model.confirmed = !this.model.confirmed;

if (this.model.confirmed && this.model.declined && this.view === EventCardView.Large)
if (this.model.confirmed && this.model.declined)
this.model.declined = false;

if (this.model.confirmed)
Expand All @@ -46,7 +46,7 @@ export class EventCardComponent {

this.model.declined = !this.model.declined;

if (this.model.declined && this.model.confirmed && this.view === EventCardView.Large)
if (this.model.declined && this.model.confirmed)
this.model.confirmed = false;

if (this.model.declined)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<div *ngIf="isLoading">
<div *ngFor="let num of loadingItems" class="event-card-wrapper">
<app-event-card [loading]="true" [view]="view"></app-event-card>
<app-event-card [loading]="true" [view]="view"></app-event-card>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export class EventListComponent {
@Input() isLoading: boolean = false;
@Input() loadingCount: number = 3;
@Input() view: string | EventCardView = EventCardView.Small;

@Output() confirm = new EventEmitter();
@Output() decline = new EventEmitter();

Expand Down
4 changes: 2 additions & 2 deletions src/app/features/events/models/eventcardview.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

export enum EventCardView {
Large = 'Large',
Small = 'Small',
Large = 'large',
Small = 'small',
}

0 comments on commit 4ab79a4

Please sign in to comment.