@vendure/admin-ui 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1509,15 +1509,28 @@
1509
1509
  }), operators.switchMap(function (result) { return _this.refetchOrder(result).pipe(operators.mapTo(result)); }))
1510
1510
  .subscribe(function (result) {
1511
1511
  if (result) {
1512
- switch (result.addFulfillmentToOrder.__typename) {
1512
+ var addFulfillmentToOrder = result.addFulfillmentToOrder;
1513
+ switch (addFulfillmentToOrder.__typename) {
1513
1514
  case 'Fulfillment':
1514
1515
  _this.notificationService.success(ngxTranslateExtractMarker.marker('order.create-fulfillment-success'));
1515
1516
  break;
1516
1517
  case 'EmptyOrderLineSelectionError':
1517
1518
  case 'InsufficientStockOnHandError':
1518
1519
  case 'ItemsAlreadyFulfilledError':
1519
- _this.notificationService.error(result.addFulfillmentToOrder.message);
1520
+ case 'InvalidFulfillmentHandlerError':
1521
+ _this.notificationService.error(addFulfillmentToOrder.message);
1520
1522
  break;
1523
+ case 'FulfillmentStateTransitionError':
1524
+ _this.notificationService.error(addFulfillmentToOrder.transitionError);
1525
+ break;
1526
+ case 'CreateFulfillmentError':
1527
+ _this.notificationService.error(addFulfillmentToOrder.fulfillmentHandlerError);
1528
+ break;
1529
+ case undefined:
1530
+ _this.notificationService.error(JSON.stringify(addFulfillmentToOrder));
1531
+ break;
1532
+ default:
1533
+ sharedUtils.assertNever(addFulfillmentToOrder);
1521
1534
  }
1522
1535
  }
1523
1536
  });