Revize b5525aef
Přidáno uživatelem Jakub Hlaváč před více než 3 roky(ů)
src/app/dashboard/components/unit-popup/unit-popup.component.ts | ||
---|---|---|
40 | 40 |
saveUnit() { |
41 | 41 |
if (this.insertForm.controls.unitDescription.value && this.insertForm.controls.unitDescription.value !== this.unit.description) { |
42 | 42 |
this.unit.description = this.insertForm.controls.unitDescription.value; |
43 |
/*TODO this.managementService.updateUnit$Response({ body: { unit: this.unit}}).toPromise().then( res => { |
|
44 |
if (res) { |
|
43 |
this.managementService.updateUnit$Response({ body: { |
|
44 |
unit: { |
|
45 |
unit_id: this.unit.unitId, |
|
46 |
description: this.unit.description |
|
47 |
}} |
|
48 |
}).toPromise().then( response => { |
|
49 |
if (response.status === 200) { |
|
45 | 50 |
this.toastService.showSuccess(); |
51 |
this.close(); |
|
52 |
} else { |
|
53 |
this.toastService.showError(response.body); |
|
46 | 54 |
} |
47 |
}).catch(err => this.toastService.showError(err.body.message));*/
|
|
55 |
}).catch(err => this.toastService.showError(err.body.message)); |
|
48 | 56 |
} |
49 | 57 |
} |
50 | 58 |
|
Také k dispozici: Unified diff
Re #8850 - Ověření funkčnosti - implementované enpointy
+ new use case add position to unit+ adding sensor type enum from backend endpoint
+ some form validation :)
- removing all endpoints from /senslog1