Commit 00931532 authored by Pearu Sarv's avatar Pearu Sarv
Browse files

Merge branch 'feature/TEIS-2349' into 'develop'

TEIS-2349 Infringement status change duplicate request

Closes TEIS-2349

See merge request teis/public-web-client!735
parents 3167c05c 7e68a8c5
......@@ -30,9 +30,11 @@ export class InfringementStatusComponent implements OnInit {
handleStatusChange(status: DriversInfringementStatus) {
const previousStatus = this.currentStatus;
this.currentStatus = status;
this.facade.updateDriversInfringementStatus(this.infringement.id, status).subscribe(() => {}, () => {
this.currentStatus = previousStatus;
this.message.addToastError('edit_infringement_status_error', 2000);
this.facade.updateDriversInfringementStatus(this.infringement.id, status).subscribe(() => {}, (error) => {
if (error !== 'duplicate request') {
this.currentStatus = previousStatus;
this.message.addToastError('edit_infringement_status_error', 2000);
}
});
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment