-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from vklachkov/filter-search
Поиск и фильтры на стороне бэка
- Loading branch information
Showing
18 changed files
with
356 additions
and
134 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 30 additions & 41 deletions
71
frontend/src/app/components/participant-card/participant-card.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,30 @@ | ||
<!-- <a title="" [routerLink]="[participantPath, participant.id]"> --> | ||
<!-- <nz-card class="participant" [nzBodyStyle]="{'padding': '0'}"> --> | ||
<a title="" class="participant" [routerLink]="[participantPath, participant.id]"> | ||
<!-- <nz-avatar [nzSize]="72" [nzSrc]="participant.info.photo_url"></nz-avatar> --> | ||
|
||
<!-- <div class="participant-info"> --> | ||
<h3 class="participant__title">{{ participant.info.name }} "{{ participant.code }}"</h3> | ||
|
||
<p nz-typograpy class="participant__text"> | ||
г. {{ participant.info.city }}, | ||
{{ participant.info.edu_org }}, | ||
{{ participant.info.responsible_adult_name }} | ||
</p> | ||
|
||
|
||
@switch (status) { | ||
@case (ParticipantStatus.InTeam) { | ||
<p class="participant__status in-team"> | ||
Находится в команде "{{ participant.jury?.name ?? '' }}" | ||
</p> | ||
} | ||
@case (ParticipantStatus.NotRated) { | ||
<p class="participant__status not-rated"> | ||
Без оценок | ||
</p> | ||
} | ||
@case (ParticipantStatus.PartiallyRated) { | ||
<p class="participant__status partially-rated"> | ||
Частично оценен | ||
</p> | ||
} | ||
@case (ParticipantStatus.FullRated) { | ||
<p class="participant__status full-rated"> | ||
Полностью оценен | ||
</p> | ||
} | ||
} | ||
<!-- </div> --> | ||
</a> | ||
<!-- </nz-card> --> | ||
<!-- </a> --> | ||
<a title="" class="participant" [routerLink]="[participantPath, participant.id]"> | ||
<h3 class="participant__title"> | ||
{{ participant.info.name }} (№{{ participant.id + 1 }}, {{ participant.code }}) | ||
</h3> | ||
|
||
<p nz-typograpy class="participant__text">{{ text }}</p> | ||
|
||
@switch (status) { | ||
@case (ParticipantStatus.InTeam) { | ||
<p class="participant__status in-team"> | ||
Находится в команде "{{ participant.jury?.name ?? '' }}" | ||
</p> | ||
} | ||
@case (ParticipantStatus.NotRated) { | ||
<p class="participant__status not-rated"> | ||
Без оценок | ||
</p> | ||
} | ||
@case (ParticipantStatus.PartiallyRated) { | ||
<p class="participant__status partially-rated"> | ||
Частично оценен | ||
</p> | ||
} | ||
@case (ParticipantStatus.FullRated) { | ||
<p class="participant__status full-rated"> | ||
Полностью оценен | ||
</p> | ||
} | ||
} | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export const enum FilterOptions { | ||
Order = 'order', | ||
Sort = 'sort', | ||
Search = 'search' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export enum Order { | ||
ASC = 'asc', | ||
DESC = 'desc' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
export const enum Sort { | ||
ASC = 'asc', | ||
DESC = 'desc' | ||
export enum Sort { | ||
Id = 'id', | ||
Name = 'name', | ||
District = 'district', | ||
City = 'city' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Order } from './api/order.enum'; | ||
import { Sort } from './api/sort.enum'; | ||
|
||
export interface ParticipantsQuery { | ||
order: Order; | ||
sort: Sort; | ||
search?: string | null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.