Skip to content

Commit

Permalink
change_type_of_disease_course_field
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidux22 committed Dec 24, 2024
1 parent 231126d commit 70f2634
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
13 changes: 5 additions & 8 deletions frontend/src/app/dbases/dbases.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,11 @@ <h3>Количество записей: <i>{{items.length}}</i></h3>

<label for="type">Тип протекания</label>
<br>
<div class="slider-container">
<input id="course" type='range' min="-1" max="1" [(ngModel)]="disease_filter['cource']" (ngModelChange)="MakePostReq('diseases')">
<div class="labels">
<span>- Хроническое течение </span>
<span> </span>
<span>- Острое течение</span>
</div>
</div>
<select id="course" [(ngModel)]="disease_filter['cource']" (ngModelChange)="MakePostReq('diseases')">
<option value="0">Не выбран</option>
<option value="-1">Острое течение</option>
<option value="1">Хроническое течение</option>
</select>

<datalist>
<option value="Острое течение" label="Острое течение"></option>
Expand Down
19 changes: 18 additions & 1 deletion frontend/src/app/dbases/dbases.component.less
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
margin-top: 20px;
}

input {
input{
height: 30px;
padding: 4px 8px;
background: #FFFFFF;
Expand All @@ -105,6 +105,23 @@
margin: 5px;
}

select{
height: 30px;
padding: 4px 8px;
background: #FFFFFF;
color: #000000;
border-color: #21D9D9;
border-width: 1px;
border-style: solid;
border-radius: 10px 10px 0px 0px;
font-family: "Comfortaa";
font-weight: 400;
font-size: 16px;
text-align: left;
margin: 5px;
margin-bottom: 20px;
}

.int{
width: 50px;
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/dbases/dbases.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class DbasesComponent {
description: '',
recommendation: '',
type: '',
cource: null
cource: "0"
}

appeal_filter: any = {
Expand Down Expand Up @@ -218,7 +218,7 @@ export class DbasesComponent {
this.idx += 1
}

if(this.disease_filter['cource']){
if(this.disease_filter['cource'] != "0"){
this.data['filter_params'][`filter${this.idx}-field`] = 'disease_course'
this.data['filter_params'][`filter${this.idx}-action`] = 'CONTAINS'
this.data['filter_params'][`filter${this.idx}-value`] = (this.disease_filter['cource'] == -1 ? "Острое течение" : "Хроническое течение")
Expand Down

0 comments on commit 70f2634

Please sign in to comment.