Правки
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>
<option>Напечатан</option> <option>Напечатан</option>
</select> </select>
<button (click)="saveStatus(order[0].id)" [disabled]="!selectedStatus.length">Сохранить</button> <button (click)="saveStatus(ord.id)" [disabled]="!selectedStatus.length">Сохранить</button>
</td> </td>
<td>{{orderTypes[leadToTypeOrderType(ord.type)]}}</td> <td>{{orderTypes[leadToTypeOrderType(ord.type)]}}</td>
</tr> </tr>

View File

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