Skip to content

Commit

Permalink
fix: filters placement
Browse files Browse the repository at this point in the history
  • Loading branch information
kovalsofiia1 committed Nov 7, 2024
1 parent 25eeee8 commit 5a51226
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,27 +99,36 @@
<mat-tab label="{{ 'homepage.events.my-space.tag-title' | translate }}">
<hr />
<div *ngIf="!loading; else spinner">
<div class="in-progress">
<div class="in-progress header" id="my-events">
<div class="buttons-wrapper">
<a [routerLink]="['/events/create-event']">
<div id="create-button-event" class="secondary-global-button s-btn">
<span>{{ 'profile.dashboard.add-event' | translate }}</span>
<div class="header">
<div class="in-progress">
<p>
<app-set-count [remainingCount]="totalEvents" [tabName]="'news'">
{{ (isFavoriteBtnClicked ? 'profile.dashboard.saved-events' : 'profile.dashboard.my-events') | translate }} <br />
</app-set-count>
</p>
<div class="in-progress" id="my-events">
<div class="buttons-wrapper">
<a [routerLink]="['/events/create-event']">
<div id="create-button-event" class="secondary-global-button s-btn">
<span>{{ 'profile.dashboard.add-event' | translate }}</span>
</div>
</a>
<div class="favourites" (click)="toggleFavorites()">
<span [ngClass]="isFavoriteBtnClicked ? 'flag-active' : 'flag'"></span>
</div>
</a>
<div class="favourites" (click)="toggleFavorites()">
<span [ngClass]="isFavoriteBtnClicked ? 'flag-active' : 'flag'"></span>
</div>
</div>
</div>
<div class="events-filter">
<div class="events-types">
<mat-checkbox [(ngModel)]="isOnlineChecked" (ngModelChange)="onCheckboxChange()" color="primary" class="checkbox">
{{ 'homepage.events.my-space.event-type-online' | translate }}
</mat-checkbox>
<mat-checkbox [(ngModel)]="isOfflineChecked" (ngModelChange)="onCheckboxChange()" color="primary" class="checkbox"
>{{ 'homepage.events.my-space.event-type-offline' | translate }}
</mat-checkbox>
<div class="in-progress justify-end">
<div class="events-filter">
<div class="events-types">
<mat-checkbox [(ngModel)]="isOnlineChecked" (ngModelChange)="onCheckboxChange()" color="primary" class="checkbox">
{{ 'homepage.events.my-space.event-type-online' | translate }}
</mat-checkbox>
<mat-checkbox [(ngModel)]="isOfflineChecked" (ngModelChange)="onCheckboxChange()" color="primary" class="checkbox"
>{{ 'homepage.events.my-space.event-type-offline' | translate }}
</mat-checkbox>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ a {
font-size: 16px;
line-height: 24px;
letter-spacing: 0.01em;
margin: 24px 0;

p {
color: var(--primary-dark-grey);
Expand All @@ -29,9 +30,9 @@ a {
align-items: center;

.favourites {
margin: 0 10px;
width: 40px;
height: 40px;
margin-left: 10px;
width: 36px;
height: 36px;
background-color: var(--primary-white);
border-radius: 5px;
display: flex;
Expand Down Expand Up @@ -61,10 +62,17 @@ a {

.in-progress {
display: flex;
justify-content: space-between;
align-items: center;
margin: 24px 0;
height: 48px;
justify-content: space-between;
}

.column {
flex-direction: column;
margin-bottom: 24px;
}

.justify-end {
justify-content: end;
}

.secondary-global-button {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ export class ProfileDashboardComponent implements OnInit, OnDestroy {
next: (res: EventResponseDto) => {
this.eventsList.push(...res.page);
this.eventsPage++;
this.totalEvents = res.totalElements;
this.hasNextPageOfEvents = res.hasNext;
this.isActiveEventsScroll = res.hasNext;
},
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,7 @@
"my-habits": "My habits",
"my-news": "My news",
"my-events": "My events",
"saved-events": "Saved events",
"my-articles": "My articles",
"habits-inprogress": "In progress",
"add-new-habit": "Add New Habit",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/ua.json
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,7 @@
"my-habits": "Мої звички",
"my-news": "Мої новини",
"my-events": "Мої події",
"saved-events": "Збережені події",
"my-tips-and-tricks": "Мої статті",
"habits-inprogress": "У процесі",
"add-new-habit": "Додати Нову Звичку",
Expand Down

0 comments on commit 5a51226

Please sign in to comment.