mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
Compare commits
1 Commits
hotfix-538
...
fix/4690-W
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a8b70defd |
@@ -84,7 +84,7 @@ export class PickupShelfOutDetailsComponent extends PickupShelfDetailsBaseCompon
|
|||||||
|
|
||||||
addToPreviousCompartmentAction$ = this.store.addToPreviousCompartmentAction$;
|
addToPreviousCompartmentAction$ = this.store.addToPreviousCompartmentAction$;
|
||||||
|
|
||||||
mainActions$ = this.store.mainActions$;
|
mainActions$ = this.store.mainShelfOutActions$;
|
||||||
|
|
||||||
trackByFnGroupDBHOrderItemListItemDTO = (index: number, group: { type: string; items: DBHOrderItemListItemDTO[] }) => group.type;
|
trackByFnGroupDBHOrderItemListItemDTO = (index: number, group: { type: string; items: DBHOrderItemListItemDTO[] }) => group.type;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { PickupShelfDetailsState } from './pickup-shelf-details.state';
|
import { PickupShelfDetailsState } from './pickup-shelf-details.state';
|
||||||
import { DBHOrderItemListItemDTO } from '@swagger/oms';
|
import { DBHOrderItemListItemDTO, KeyValueDTOOfStringAndString } from '@swagger/oms';
|
||||||
|
|
||||||
export const selectOrder = (s: PickupShelfDetailsState) => s.order;
|
export const selectOrder = (s: PickupShelfDetailsState) => s.order;
|
||||||
|
|
||||||
@@ -245,6 +245,26 @@ export const selectMainActions = (s: PickupShelfDetailsState) => {
|
|||||||
?.filter((action) => (fetchPartial ? !action.command.includes('FETCHED_PARTIAL') : true));
|
?.filter((action) => (fetchPartial ? !action.command.includes('FETCHED_PARTIAL') : true));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const selectShelfOutMainActions = (s: PickupShelfDetailsState) => {
|
||||||
|
const items = selectOrderItems(s);
|
||||||
|
const fetchPartial = selectFetchPartial(s);
|
||||||
|
|
||||||
|
// Ticket #4690 Consider every Item for selecting the main actions in Details View - Only for PickUpShelfOut
|
||||||
|
const actions: KeyValueDTOOfStringAndString[] = [];
|
||||||
|
for (const item of items) {
|
||||||
|
const actionsFromItem = item?.actions
|
||||||
|
?.filter((action) => typeof action?.enabled !== 'boolean')
|
||||||
|
?.filter((action) => (fetchPartial ? !action.command.includes('FETCHED_PARTIAL') : true));
|
||||||
|
for (const action of actionsFromItem) {
|
||||||
|
if (!actions.find((a) => a.command === action.command)) {
|
||||||
|
actions.push(action);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return actions;
|
||||||
|
};
|
||||||
|
|
||||||
export const selectCustomerNumber = (s: PickupShelfDetailsState) => {
|
export const selectCustomerNumber = (s: PickupShelfDetailsState) => {
|
||||||
const order = selectOrder(s);
|
const order = selectOrder(s);
|
||||||
return order?.buyer?.buyerNumber;
|
return order?.buyer?.buyerNumber;
|
||||||
|
|||||||
@@ -212,6 +212,12 @@ export class PickupShelfDetailsStore extends ComponentStore<PickupShelfDetailsSt
|
|||||||
return this.get(Selectors.selectMainActions);
|
return this.get(Selectors.selectMainActions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mainShelfOutActions$ = this.select(Selectors.selectShelfOutMainActions);
|
||||||
|
|
||||||
|
get mainShelfOutActions() {
|
||||||
|
return this.get(Selectors.selectShelfOutMainActions);
|
||||||
|
}
|
||||||
|
|
||||||
customerNumber$ = this.select(Selectors.selectCustomerNumber);
|
customerNumber$ = this.select(Selectors.selectCustomerNumber);
|
||||||
|
|
||||||
get customerNumber() {
|
get customerNumber() {
|
||||||
|
|||||||
Reference in New Issue
Block a user