|
@@ -16,7 +16,7 @@ export class LineFulfillmentComponent implements OnChanges {
|
|
|
@Input() orderState: string;
|
|
@Input() orderState: string;
|
|
|
fulfilledCount = 0;
|
|
fulfilledCount = 0;
|
|
|
fulfillmentStatus: FulfillmentStatus;
|
|
fulfillmentStatus: FulfillmentStatus;
|
|
|
- fulfillments: Array<{ count: number; fulfillment: OrderDetail.Fulfillment }> = [];
|
|
|
|
|
|
|
+ fulfillments: Array<{ count: number; fulfillment: OrderDetail.Fulfillments }> = [];
|
|
|
|
|
|
|
|
ngOnChanges(changes: SimpleChanges): void {
|
|
ngOnChanges(changes: SimpleChanges): void {
|
|
|
if (this.line) {
|
|
if (this.line) {
|
|
@@ -45,7 +45,7 @@ export class LineFulfillmentComponent implements OnChanges {
|
|
|
|
|
|
|
|
private getFulfillments(
|
|
private getFulfillments(
|
|
|
line: OrderDetail.Lines,
|
|
line: OrderDetail.Lines,
|
|
|
- ): Array<{ count: number; fulfillment: OrderDetail.Fulfillment }> {
|
|
|
|
|
|
|
+ ): Array<{ count: number; fulfillment: OrderDetail.Fulfillments }> {
|
|
|
const counts: { [fulfillmentId: string]: number } = {};
|
|
const counts: { [fulfillmentId: string]: number } = {};
|
|
|
|
|
|
|
|
for (const item of line.items) {
|
|
for (const item of line.items) {
|
|
@@ -61,7 +61,7 @@ export class LineFulfillmentComponent implements OnChanges {
|
|
|
(fulfillments, item) => {
|
|
(fulfillments, item) => {
|
|
|
return item.fulfillment ? [...fulfillments, item.fulfillment] : fulfillments;
|
|
return item.fulfillment ? [...fulfillments, item.fulfillment] : fulfillments;
|
|
|
},
|
|
},
|
|
|
- [] as OrderDetail.Fulfillment[],
|
|
|
|
|
|
|
+ [] as OrderDetail.Fulfillments[],
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
return Object.entries(counts).map(([id, count]) => {
|
|
return Object.entries(counts).map(([id, count]) => {
|