<eg-acq-add-to-po-dialog #addToPoDialog></eg-acq-add-to-po-dialog>
<eg-acq-delete-lineitems-dialog #deleteLineitemsDialog></eg-acq-delete-lineitems-dialog>
<eg-acq-link-invoice-dialog #linkInvoiceDialog></eg-acq-link-invoice-dialog>
+<eg-lineitem-alert-dialog #confirmAlertsDialog></eg-lineitem-alert-dialog>
<eg-string #claimPolicyAppliedString i18n-text text="Claim Policy Applied to Selected Line Item(s)"></eg-string>
<eg-string #lineItemsReceivedString i18n-text text="Line Item(s) Received"></eg-string>
import {AddToPoDialogComponent} from '../lineitem/add-to-po-dialog.component';
import {DeleteLineitemsDialogComponent} from '../lineitem/delete-lineitems-dialog.component';
import {LinkInvoiceDialogComponent} from '../lineitem/link-invoice-dialog.component';
+import {LineitemAlertDialogComponent} from '../lineitem/lineitem-alert-dialog.component';
@Component({
selector: 'eg-lineitem-results',
@ViewChild('noActionableLIs', { static: true }) private noActionableLIs: AlertDialogComponent;
@ViewChild('selectorReadyConfirmDialog', { static: true }) selectorReadyConfirmDialog: ConfirmDialogComponent;
@ViewChild('orderReadyConfirmDialog', { static: true }) orderReadyConfirmDialog: ConfirmDialogComponent;
+ @ViewChild('confirmAlertsDialog') confirmAlertsDialog: LineitemAlertDialogComponent;
noSelectedRows: (rows: IdlObject[]) => boolean;
}
const ids = lis.map(x => Number(x.id()));
- this.net.request(
- 'open-ils.acq',
- 'open-ils.acq.lineitem.receive.batch',
- this.auth.token(), ids
- ).toPromise().then(resp => {
- this.lineItemsReceivedString.current()
- .then(str => this.toast.success(str));
- this.lineitemResultsGrid.reload();
- });
+
+ this.liService.checkLiAlerts(lis, this.confirmAlertsDialog).then(ok => {
+ this.net.request(
+ 'open-ils.acq',
+ 'open-ils.acq.lineitem.receive.batch',
+ this.auth.token(), ids
+ ).toPromise().then(resp => {
+ this.lineItemsReceivedString.current()
+ .then(str => this.toast.success(str));
+ this.lineitemResultsGrid.reload();
+ });
+ }, err => {}); // avoid console errors
}
markUnReceived(rows: IdlObject[]) {