Правки
This commit is contained in:
gofnnp 2023-03-19 13:57:26 +04:00
parent fc74424674
commit f41b5637a2
2 changed files with 14 additions and 9 deletions

View File

@ -94,7 +94,7 @@
<option>Выдан</option>
<option>Напечатан</option>
</select>
<button (click)="saveStatus(order[0].id)" [disabled]="!selectedStatus.length">Сохранить</button>
<button (click)="saveStatus(ord.id)" [disabled]="!selectedStatus.length">Сохранить</button>
</td>
<td>{{orderTypes[leadToTypeOrderType(ord.type)]}}</td>
</tr>

View File

@ -196,22 +196,27 @@ export class OrdersComponent implements OnInit {
)
.pipe(
map((value) => {
console.log('####: value ', value);
return value;
}),
catchError((err) => {
return err;
})
).subscribe({
next: (value) => {
this.messageService.add({
severity: 'success',
summary: 'Статус изменен!',
});
return value;
}),
catchError((err) => {
console.error(err);
console.log('####: value ', value);
},
error: (err) => {
console.error(err)
this.messageService.add({
severity: 'error',
summary: 'Произошла ошибка!',
});
return err;
})
);
},
});
}
notif2() {