Merged PR 498: #1223 UPDATE if status is paid, collection period should not be extended

#1223 UPDATE if status is paid, collection period should not be extended
This commit is contained in:
Nino Righi
2021-02-17 16:31:23 +00:00
committed by Lorenz Hilpert
2 changed files with 211 additions and 202 deletions

View File

@@ -112,10 +112,19 @@ export class ShelfEditCompartmentComponent implements OnInit {
private async populateFormData(compartmentCode: string, processingStatus: OrderItemProcessingStatusValue) {
this.form = await this.formService.createFormByCompartmentCode(compartmentCode, processingStatus);
const orderNumber = this.form?.get('orderNumber')?.value;
this.isPaid$ = this.detailsFacade
.getOrderItemsByOrderNumber$(orderNumber)
.pipe(map((orderItems) => !!orderItems?.find((orderItem) => !!orderItem?.features?.paid)));
const orderNumber = this.form.get('orderNumber').value;
this.isPaid$ = this.detailsFacade.getOrderItemsByOrderNumber$(orderNumber).pipe(
map(
(orderItems) =>
!!orderItems.find((orderItem) => {
if (orderItem.features === undefined || orderItem.features.paid === undefined) {
return false;
} else {
return !!orderItem.features.paid;
}
})
)
);
this.items = this.formService.getItemsForm(compartmentCode);
this.customerName = this.formService.getCustomerName(compartmentCode);
this.cdr.detectChanges();

396
package-lock.json generated
View File

File diff suppressed because it is too large Load Diff