Skip to content

Commit

Permalink
fix status
Browse files Browse the repository at this point in the history
  • Loading branch information
sansan88 committed Nov 25, 2023
1 parent 839d69f commit d46a7c4
Show file tree
Hide file tree
Showing 13 changed files with 795 additions and 456 deletions.
290 changes: 181 additions & 109 deletions src/app/pages/championship/championship/championship.page.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/app/pages/event/event-detail/event-detail.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h2>{{event.description}}</h2>
</ion-item>
</ion-list>

<ion-list [inset]="true" lines="none">
<ion-list [inset]="true" lines="none" *ngIf="isFuture">
<ion-list-header>
{{"attendances__absences" | translate}}
</ion-list-header>
Expand Down
1 change: 1 addition & 0 deletions src/app/pages/event/event-detail/event-detail.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { UserProfileService } from "src/app/services/firebase/user-profile.servi
})
export class EventDetailPage implements OnInit {
@Input("data") event: Veranstaltung;
@Input("isFuture") isFuture: boolean;

event$: Observable<any>;

Expand Down
187 changes: 119 additions & 68 deletions src/app/pages/event/events/events.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,40 +39,60 @@

<ion-item-sliding #item *ngFor="let event of eventsList">
<ion-item type="button" detail="true">
<ion-icon *ngIf="event.status === null" slot="icon-only" color="warning" slot="start" name="help-circle"
(click)="toggle(true, event)"></ion-icon>
<ion-icon *ngIf="event.status === false" slot="icon-only" color="danger" slot="start" name="close-circle"
(click)="toggle( true, event)"></ion-icon>
<ion-icon *ngIf="event.status === true" slot="icon-only" color="success" slot="start" name="checkmark-circle"
(click)="toggle(false, event)"></ion-icon>
<ion-label (click)="openEventDetailModal(event)">
<h2>
{{event.name}}
</h2>
<h3>
<ion-icon slot="icon-only" name="calendar-outline"></ion-icon>
{{event.date.toDate() | date:'dd.MM.YYYY '}} {{event.timeFrom | date:'HH:mm'}} Uhr -
{{event.timeTo | date:'HH:mm'}} Uhr
</h3>
<h3>
<ion-icon slot="icon-only" name="location-outline"></ion-icon>
{{event.location}} {{event.streetAndNumber}} {{event.city}}
</h3>


</ion-label>
<ion-note slot="end" (click)="openEventDetailModal(event)">
<ion-icon
*ngIf="event.status === null"
slot="icon-only"
color="warning"
slot="start"
name="help-circle"
(click)="toggle(true, event)"
></ion-icon>
<ion-icon
*ngIf="event.status === false"
slot="icon-only"
color="danger"
slot="start"
name="close-circle"
(click)="toggle( true, event)"
></ion-icon>
<ion-icon
*ngIf="event.status === true"
slot="icon-only"
color="success"
slot="start"
name="checkmark-circle"
(click)="toggle(false, event)"
></ion-icon>
<ion-label (click)="openEventDetailModal(event, true)">
<h2>{{event.name}}</h2>
<h3>
<ion-icon slot="icon-only" name="calendar-outline"></ion-icon>
{{event.date.toDate() | date:'dd.MM.YYYY '}} {{event.timeFrom |
date:'HH:mm'}} Uhr - {{event.timeTo | date:'HH:mm'}} Uhr
</h3>
<h3>
<ion-icon slot="icon-only" name="location-outline"></ion-icon>
{{event.location}} {{event.streetAndNumber}} {{event.city}}
</h3>
</ion-label>
<ion-note slot="end" (click)="openEventDetailModal(event, true)">
<ion-badge color="primary">{{event.countAttendees}}</ion-badge>
</ion-note>
</ion-item>

<ion-item-options side="start">
<ion-item-option color="success" *ngIf="event.status === false || event.status === null"
(click)="toggleItem(item, true, event)">
<ion-item-option
color="success"
*ngIf="event.status === false || event.status === null"
(click)="toggleItem(item, true, event)"
>
<ion-icon slot="icon-only" name="checkmark-circle"></ion-icon>
</ion-item-option>
<ion-item-option color="danger" *ngIf="event.status === true || event.status === null"
(click)="toggleItem(item, false, event)">
<ion-item-option
color="danger"
*ngIf="event.status === true || event.status === null"
(click)="toggleItem(item, false, event)"
>
<ion-icon slot="icon-only" name="close-circle"></ion-icon>
</ion-item-option>
</ion-item-options>
Expand All @@ -85,16 +105,13 @@ <h3>
<ion-icon slot="icon-only" name="trash"></ion-icon>
</ion-item-option>
</ion-item-options>

</ion-item-sliding>
</ion-list>
<ion-list class="ion-padding" *ngIf="eventsList.length==0">
<ion-list-header>
<ion-label>{{"upcomming__events" | translate}}</ion-label>
</ion-list-header>
<ion-note>
{{"no_event__found" | translate}}
</ion-note>
<ion-note> {{"no_event__found" | translate}} </ion-note>
</ion-list>
</ng-container>

Expand All @@ -113,43 +130,50 @@ <h3>
</ion-item>
<ion-item-sliding #item *ngFor="let event of eventsListPast">
<ion-item type="button" detail="true">
<ion-icon *ngIf="event.status === null" slot="icon-only" color="warning" slot="start"
name="help-circle"></ion-icon>
<ion-icon *ngIf="event.status === false" slot="icon-only" color="danger" slot="start"
name="close-circle"></ion-icon>
<ion-icon *ngIf="event.status === true" slot="icon-only" color="success" slot="start"
name="checkmark-circle"></ion-icon>
<ion-label (click)="openEventDetailModal(event)">
<h2>
{{event.name}}
</h2>
<h3>
<ion-icon slot="icon-only" name="calendar-outline"></ion-icon>
{{event.date.toDate() | date:'dd.MM.YYYY '}} {{event.timeFrom | date:'HH:mm'}} Uhr -
{{event.timeTo | date:'HH:mm'}} Uhr
</h3>
<h3>
<ion-icon slot="icon-only" name="location-outline"></ion-icon>
{{event.location}} {{event.streetAndNumber}} {{event.city}}
</h3>


</ion-label>
<ion-note slot="end">
<ion-icon
*ngIf="event.status === null"
slot="icon-only"
color="warning"
slot="start"
name="help-circle"
></ion-icon>
<ion-icon
*ngIf="event.status === false"
slot="icon-only"
color="danger"
slot="start"
name="close-circle"
></ion-icon>
<ion-icon
*ngIf="event.status === true"
slot="icon-only"
color="success"
slot="start"
name="checkmark-circle"
></ion-icon>
<ion-label (click)="openEventDetailModal(event, false)">
<h2>{{event.name}}</h2>
<h3>
<ion-icon slot="icon-only" name="calendar-outline"></ion-icon>
{{event.date.toDate() | date:'dd.MM.YYYY '}} {{event.timeFrom |
date:'HH:mm'}} Uhr - {{event.timeTo | date:'HH:mm'}} Uhr
</h3>
<h3>
<ion-icon slot="icon-only" name="location-outline"></ion-icon>
{{event.location}} {{event.streetAndNumber}} {{event.city}}
</h3>
</ion-label>
<ion-note slot="end" (click)="openEventDetailModal(event, false)">
<ion-badge color="primary">{{event.countAttendees}}</ion-badge>
</ion-note>
</ion-item>


</ion-item-sliding>
</ion-list>
<ion-list class="ion-padding" *ngIf="eventsListPast.length==0">
<ion-list-header>
<ion-label>{{"past__events" | translate}}</ion-label>
</ion-list-header>
<ion-note>
{{"no_event__found" | translate}}
</ion-note>
<ion-note> {{"no_event__found" | translate}} </ion-note>
</ion-list>
</ng-container>

Expand All @@ -164,27 +188,54 @@ <h3>
<ion-list *ngIf="loading">
<ion-grid>
<ion-row>
<ion-col size-lg="4" size-md="6" size-sm="6" size="12" *ngFor="let item of skeleton">
<ion-col
size-lg="4"
size-md="6"
size-sm="6"
size="12"
*ngFor="let item of skeleton"
>
<ion-card>
<ion-card-header>
<ion-card-subtitle>
<ion-skeleton-text animated style="width: 60%"></ion-skeleton-text>
<ion-skeleton-text
animated
style="width: 60%"
></ion-skeleton-text>
</ion-card-subtitle>
<ion-card-title>
<ion-skeleton-text animated style="width: 80%"></ion-skeleton-text>
<ion-skeleton-text
animated
style="width: 80%"
></ion-skeleton-text>
</ion-card-title>
</ion-card-header>

<ion-card-content>
<ion-skeleton-text animated style="width: 80%"></ion-skeleton-text>
<ion-skeleton-text animated style="width: 60%"></ion-skeleton-text>
<ion-skeleton-text animated style="width: 80%"></ion-skeleton-text>
<ion-skeleton-text animated style="width: 60%"></ion-skeleton-text>
<ion-skeleton-text animated style="width: 80%"></ion-skeleton-text>
<ion-skeleton-text
animated
style="width: 80%"
></ion-skeleton-text>
<ion-skeleton-text
animated
style="width: 60%"
></ion-skeleton-text>
<ion-skeleton-text
animated
style="width: 80%"
></ion-skeleton-text>
<ion-skeleton-text
animated
style="width: 60%"
></ion-skeleton-text>
<ion-skeleton-text
animated
style="width: 80%"
></ion-skeleton-text>
</ion-card-content>
</ion-card>
</ion-col>
</ion-row>
</ion-grid>
</ion-list>
</ng-template>
</ng-template>
Loading

0 comments on commit d46a7c4

Please sign in to comment.