Skip to content

Commit 84d5ef8

Browse files
authored
fix phase selection not being set correctly when creating new incident (#37)
Signed-off-by: Sebastian Kaupe <kaupe@gonicus.de>
1 parent 9376a2c commit 84d5ef8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/app/management-view/management-view.component.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,13 @@ export class ManagementViewComponent implements OnInit{
188188
if (this.inputIncidentEndDate.nativeElement.value) {
189189
this.editingIncident.endedAt = formatQueryDate(dayjs(this.inputIncidentEndDate.nativeElement.value).utc());
190190
}
191+
if (!this.editingIncident.phase) {
192+
this.editingIncident.phase = {
193+
generation: 1,
194+
order: 0
195+
};
196+
}
197+
this.editingIncident.phase.order = parseInt(this.inputIncidentPhase.nativeElement.value) ?? 0;
191198
this.waitState = WS_PROCESSING;
192199
this.waitSpinnerDialog.nativeElement.showModal();
193200
this.handleResponse(this.data.createIncident(this.editingIncident), this.incidentDialog);

0 commit comments

Comments
 (0)