mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merge branch 'release/2.3'
This commit is contained in:
@@ -11,13 +11,9 @@ export class DevScanAdapter implements ScanAdapter {
|
||||
constructor(private _modal: UiModalService, private _environmentService: EnvironmentService) {}
|
||||
|
||||
async init(): Promise<boolean> {
|
||||
if (this._environmentService.isTablet()) {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(isDevMode());
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(isDevMode());
|
||||
});
|
||||
}
|
||||
|
||||
scan(): Observable<string> {
|
||||
|
||||
@@ -14,7 +14,6 @@ export class ScanAdapterService {
|
||||
async init(): Promise<void> {
|
||||
for (const adapter of this.scanAdapters) {
|
||||
const isReady = await adapter.init();
|
||||
console.log('ScanAdapterService.init', adapter.name, isReady);
|
||||
this._readyAdapters[adapter.name] = isReady;
|
||||
}
|
||||
}
|
||||
@@ -24,42 +23,30 @@ export class ScanAdapterService {
|
||||
}
|
||||
|
||||
getAdapter(name: string): ScanAdapter | undefined {
|
||||
return this.scanAdapters.find((adapter) => adapter.name === name);
|
||||
return this._readyAdapters[name] && this.scanAdapters.find((adapter) => adapter.name === name);
|
||||
}
|
||||
|
||||
// return true if at least one adapter is ready
|
||||
isReady(): boolean {
|
||||
return Object.values(this._readyAdapters).some((ready) => ready);
|
||||
}
|
||||
|
||||
scan(ops: { use?: string; include?: string[]; exclude?: string[] } = { exclude: ['Dev'] }): Observable<string> {
|
||||
scan(): Observable<string> {
|
||||
const adapterOrder = ['Native', 'Scandit', 'Dev'];
|
||||
|
||||
let adapter: ScanAdapter;
|
||||
|
||||
if (ops.use == undefined) {
|
||||
// get the first adapter that is ready to use
|
||||
adapter = this.scanAdapters
|
||||
.filter((adapter) => {
|
||||
if (ops.include?.length) {
|
||||
return ops.include.includes(adapter.name);
|
||||
} else if (ops.exclude?.length) {
|
||||
return !ops.exclude.includes(adapter.name);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
})
|
||||
.find((adapter) => this._readyAdapters[adapter.name]);
|
||||
} else {
|
||||
adapter = this.getAdapter(ops.use);
|
||||
for (const name of adapterOrder) {
|
||||
adapter = this.getAdapter(name);
|
||||
|
||||
if (adapter) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!adapter) {
|
||||
return throwError('No adapter found');
|
||||
}
|
||||
|
||||
if (this._readyAdapters[adapter.name] == false) {
|
||||
return throwError('Adapter is not ready');
|
||||
}
|
||||
|
||||
return adapter.scan();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { CommandService } from './command.service';
|
||||
|
||||
export abstract class ActionHandler<T = any> {
|
||||
constructor(readonly action: string) {}
|
||||
abstract handler(data: T): Promise<T>;
|
||||
abstract handler(data: T, service?: CommandService): Promise<T>;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
import { ModuleWithProviders, NgModule, Type } from '@angular/core';
|
||||
import { ModuleWithProviders, NgModule, Provider, Type } from '@angular/core';
|
||||
import { ActionHandler } from './action-handler.interface';
|
||||
import { CommandService } from './command.service';
|
||||
import { FEATURE_ACTION_HANDLERS, ROOT_ACTION_HANDLERS } from './tokens';
|
||||
|
||||
export function provideActionHandlers(actionHandlers: Type<ActionHandler>[]): Provider[] {
|
||||
return [CommandService, actionHandlers.map((handler) => ({ provide: FEATURE_ACTION_HANDLERS, useClass: handler, multi: true }))];
|
||||
}
|
||||
|
||||
@NgModule({})
|
||||
export class CoreCommandModule {
|
||||
static forRoot(actionHandlers: Type<ActionHandler>[]): ModuleWithProviders<CoreCommandModule> {
|
||||
|
||||
@@ -16,7 +16,7 @@ export class CommandService {
|
||||
throw new Error('Action Handler does not exist');
|
||||
}
|
||||
|
||||
data = await handler.handler(data);
|
||||
data = await handler.handler(data, this);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -145,6 +145,7 @@ export class DomainAvailabilityService {
|
||||
);
|
||||
}
|
||||
|
||||
@memorize({ ttl: 10000 })
|
||||
getTakeAwayAvailability({
|
||||
item,
|
||||
quantity,
|
||||
@@ -154,6 +155,7 @@ export class DomainAvailabilityService {
|
||||
quantity: number;
|
||||
branch?: BranchDTO;
|
||||
}): Observable<AvailabilityDTO> {
|
||||
console.log('getTakeAwayAvailability', item, quantity, branch);
|
||||
const request = !!branch ? this.getStockByBranch(branch.id) : this.getDefaultStock();
|
||||
return request.pipe(
|
||||
switchMap((s) =>
|
||||
|
||||
@@ -28,7 +28,13 @@ import {
|
||||
StoreCheckoutBranchService,
|
||||
ItemsResult,
|
||||
} from '@swagger/checkout';
|
||||
import { DisplayOrderDTO, DisplayOrderItemDTO, OrderCheckoutService, ReorderValues } from '@swagger/oms';
|
||||
import {
|
||||
DisplayOrderDTO,
|
||||
DisplayOrderItemDTO,
|
||||
OrderCheckoutService,
|
||||
ReorderValues,
|
||||
ResponseArgsOfValueTupleOfIEnumerableOfDisplayOrderDTOAndIEnumerableOfKeyValueDTOOfStringAndString,
|
||||
} from '@swagger/oms';
|
||||
import { isNullOrUndefined, memorize } from '@utils/common';
|
||||
import { combineLatest, Observable, of, concat, isObservable, throwError } from 'rxjs';
|
||||
import { bufferCount, catchError, filter, first, map, mergeMap, shareReplay, switchMap, tap, withLatestFrom } from 'rxjs/operators';
|
||||
@@ -372,8 +378,9 @@ export class DomainCheckoutService {
|
||||
_setBuyer({ processId, buyer }: { processId: number; buyer: BuyerDTO }): Observable<CheckoutDTO> {
|
||||
return this.getCheckout({ processId }).pipe(
|
||||
first(),
|
||||
mergeMap((checkout) =>
|
||||
this._buyerService
|
||||
mergeMap((checkout) => {
|
||||
console.log('checkout', checkout, processId);
|
||||
return this._buyerService
|
||||
.StoreCheckoutBuyerSetBuyerPOST({
|
||||
checkoutId: checkout?.id,
|
||||
buyerDTO: buyer,
|
||||
@@ -381,8 +388,8 @@ export class DomainCheckoutService {
|
||||
.pipe(
|
||||
map((response) => response.result),
|
||||
tap((checkout) => this.store.dispatch(DomainCheckoutActions.setCheckout({ processId, checkout })))
|
||||
)
|
||||
)
|
||||
);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@@ -710,6 +717,47 @@ export class DomainCheckoutService {
|
||||
.pipe(mergeMap((_) => completeOrder$.pipe(tap(console.log.bind(window, 'completeOrder$')))));
|
||||
}
|
||||
|
||||
completeKulturpassOrder({
|
||||
processId,
|
||||
orderItemSubsetId,
|
||||
}: {
|
||||
processId: number;
|
||||
orderItemSubsetId: number;
|
||||
}): Observable<ResponseArgsOfValueTupleOfIEnumerableOfDisplayOrderDTOAndIEnumerableOfKeyValueDTOOfStringAndString> {
|
||||
const refreshShoppingCart$ = this.getShoppingCart({ processId, latest: true }).pipe(first());
|
||||
const refreshCheckout$ = this.getCheckout({ processId, refresh: true }).pipe(first());
|
||||
|
||||
const setBuyer$ = this.getBuyer({ processId }).pipe(
|
||||
first(),
|
||||
mergeMap((buyer) => this._setBuyer({ processId, buyer }))
|
||||
);
|
||||
|
||||
const setPayer$ = this.getPayer({ processId }).pipe(
|
||||
first(),
|
||||
mergeMap((payer) => this._setPayer({ processId, payer }))
|
||||
);
|
||||
|
||||
const checkAvailabilities$ = this.checkAvailabilities({ processId });
|
||||
|
||||
const updateAvailabilities$ = this.updateAvailabilities({ processId });
|
||||
|
||||
return refreshShoppingCart$.pipe(
|
||||
mergeMap((_) => refreshCheckout$),
|
||||
mergeMap((_) => checkAvailabilities$),
|
||||
mergeMap((_) => updateAvailabilities$),
|
||||
mergeMap((_) => setBuyer$),
|
||||
mergeMap((_) => setPayer$),
|
||||
mergeMap((checkout) =>
|
||||
this.orderCheckoutService.OrderCheckoutCreateKulturPassOrder({
|
||||
payload: {
|
||||
checkoutId: checkout.id,
|
||||
orderItemSubsetId: String(orderItemSubsetId),
|
||||
},
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
updateDestination({
|
||||
processId,
|
||||
destinationId,
|
||||
|
||||
@@ -38,4 +38,5 @@ export * from './requested.action-handler';
|
||||
export * from './reserved.action-handler';
|
||||
export * from './returned-by-buyer.action-handler';
|
||||
export * from './shipping-note.action-handler';
|
||||
export * from './shop-with-kulturpass.action-handler';
|
||||
export * from './supplier-temporarily-out-of-stock.action-handler copy';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { OrderItemListItemDTO, ReceiptDTO } from '@swagger/oms';
|
||||
import { OrderItemListItemDTO, ReceiptDTO, OrderDTO } from '@swagger/oms';
|
||||
|
||||
export interface OrderItemsContext {
|
||||
items: OrderItemListItemDTO[];
|
||||
@@ -12,4 +12,6 @@ export interface OrderItemsContext {
|
||||
receipts?: ReceiptDTO[];
|
||||
|
||||
shippingDelayComment?: string;
|
||||
|
||||
order?: OrderDTO;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { OrderItemsContext } from './order-items.context';
|
||||
import { ActionHandler, CommandService } from '@core/command';
|
||||
import { KulturpassOrderModalService } from '@shared/modals/kulturpass-order-modal';
|
||||
import { DisplayOrderItemSubsetDTO, OrderItemListItemDTO, ReceiptDTO } from '@swagger/oms';
|
||||
import { DomainReceiptService } from '../receipt.service';
|
||||
import { DomainGoodsService } from '../goods.service';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
@Injectable()
|
||||
export class ShopWithKulturpassActionHandler extends ActionHandler<OrderItemsContext> {
|
||||
constructor(
|
||||
private _modal: KulturpassOrderModalService,
|
||||
private _receiptService: DomainReceiptService,
|
||||
private _goodsService: DomainGoodsService
|
||||
) {
|
||||
super('SHOP_WITH_KULTURPASS');
|
||||
}
|
||||
|
||||
async handler(data: OrderItemsContext, service: CommandService): Promise<OrderItemsContext> {
|
||||
const items: OrderItemListItemDTO[] = [];
|
||||
const receipts: ReceiptDTO[] = [];
|
||||
|
||||
let command: string;
|
||||
for (const item of data.items) {
|
||||
const result = await this._modal.open({ orderItemListItem: item, order: data.order }).afterClosed$.toPromise();
|
||||
|
||||
if (result.data == null) {
|
||||
return data;
|
||||
}
|
||||
|
||||
const displayOrder = result.data[0];
|
||||
command = result.data[1];
|
||||
|
||||
if (displayOrder) {
|
||||
const subsetItems = displayOrder.items.reduce((acc, item) => [...acc, ...item.subsetItems], [] as DisplayOrderItemSubsetDTO[]);
|
||||
|
||||
const orderItems = await this.getItems(displayOrder.orderNumber);
|
||||
|
||||
items.push(...orderItems);
|
||||
|
||||
const subsetItemIds = subsetItems.map((item) => item.id);
|
||||
|
||||
const r = await this.getReceipts(subsetItemIds);
|
||||
|
||||
receipts.push(...r);
|
||||
}
|
||||
}
|
||||
|
||||
if (!command) {
|
||||
return {
|
||||
...data,
|
||||
items,
|
||||
receipts,
|
||||
};
|
||||
} else {
|
||||
return service.handleCommand(command, {
|
||||
...data,
|
||||
items,
|
||||
receipts,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getReceipts(ids: number[]) {
|
||||
return this._receiptService
|
||||
.getReceipts({
|
||||
receiptType: 128,
|
||||
eagerLoading: 1,
|
||||
ids,
|
||||
})
|
||||
.pipe(map((res) => res.result.map((data) => data.item3.data).filter((data) => !!data)))
|
||||
.toPromise();
|
||||
}
|
||||
|
||||
getItems(orderNumber: string) {
|
||||
return this._goodsService
|
||||
.getWarenausgabeItemByOrderNumber(orderNumber, false)
|
||||
.pipe(map((res) => res.result))
|
||||
.toPromise();
|
||||
}
|
||||
}
|
||||
@@ -4,61 +4,118 @@ import { SignalrHub, SignalRHubOptions } from '@core/signalr';
|
||||
import { BehaviorSubject, merge, of } from 'rxjs';
|
||||
import { filter, map, shareReplay, tap, withLatestFrom } from 'rxjs/operators';
|
||||
import { EnvelopeDTO, MessageBoardItemDTO } from './defs';
|
||||
import { cloneDeep } from 'lodash';
|
||||
|
||||
export const NOTIFICATIONS_HUB_OPTIONS = new InjectionToken<SignalRHubOptions>('hub.notifications.options');
|
||||
|
||||
@Injectable()
|
||||
export class NotificationsHub extends SignalrHub {
|
||||
updateNotification$ = new BehaviorSubject<MessageBoardItemDTO>(undefined);
|
||||
|
||||
get branchNo() {
|
||||
return String(this._auth.getClaimByKey('branch_no') || this._auth.getClaimByKey('sub'));
|
||||
}
|
||||
|
||||
// get sessionStoragesessionStorageKey() {
|
||||
// return `NOTIFICATIONS_BOARD_${this.branchNo}`;
|
||||
// }
|
||||
|
||||
get sessionStoragesessionStorageKey() {
|
||||
return `NOTIFICATIONS_BOARD_${this.branchNo}`;
|
||||
return `NOTIFICATIONS_BOARD_AREA_${this.branchNo}`;
|
||||
}
|
||||
|
||||
messageBoardItems$ = new BehaviorSubject<Record<string, MessageBoardItemDTO[]>>({});
|
||||
|
||||
constructor(@Inject(NOTIFICATIONS_HUB_OPTIONS) options: SignalRHubOptions, private _auth: AuthService) {
|
||||
super(options);
|
||||
|
||||
this.messageBoardItems$.next(this._getNotifications());
|
||||
|
||||
this.messageBoardItems$.subscribe((data) => {
|
||||
this._storeNotifactions(data);
|
||||
});
|
||||
|
||||
this.listen<EnvelopeDTO<MessageBoardItemDTO[]>>('messageBoard').subscribe((envelope) => {
|
||||
if (envelope.action === 'refresh') {
|
||||
this.refreshMessageBoardItems(envelope.target.area, envelope.data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
notifications$ = merge(
|
||||
of(this._getNotifications()).pipe(filter((f) => !!f)),
|
||||
this.listen<EnvelopeDTO<MessageBoardItemDTO[]>>('messageBoard')
|
||||
).pipe(
|
||||
withLatestFrom(this.updateNotification$),
|
||||
map(([d, update]) => {
|
||||
const data = d;
|
||||
if (update && !!data && !data?.data?.find((message) => message?.category === 'ISA-Update')) {
|
||||
data.data.push(update);
|
||||
refreshMessageBoardItems(targetArea: string, messages: MessageBoardItemDTO[]) {
|
||||
const current = cloneDeep(this.messageBoardItems$.value);
|
||||
|
||||
current[targetArea] = messages ?? [];
|
||||
|
||||
this.messageBoardItems$.next(current);
|
||||
}
|
||||
|
||||
notifications$ = this.messageBoardItems$.asObservable().pipe(
|
||||
map((data) => {
|
||||
const messages = { ...data };
|
||||
const keys = Object.keys(data);
|
||||
for (let key of keys) {
|
||||
if (data[key].length === 0 || data[key] === undefined) {
|
||||
delete messages[key];
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}),
|
||||
tap((data) => this._storeNotifactions(data)),
|
||||
shareReplay(1)
|
||||
|
||||
return messages;
|
||||
})
|
||||
);
|
||||
|
||||
private _storeNotifactions(data: EnvelopeDTO<MessageBoardItemDTO[]>) {
|
||||
if (data) {
|
||||
sessionStorage.setItem(this.sessionStoragesessionStorageKey, JSON.stringify(data));
|
||||
}
|
||||
}
|
||||
// notifications$ = merge(
|
||||
// of(this._getNotifications()).pipe(filter((f) => !!f)),
|
||||
// this.listen<EnvelopeDTO<MessageBoardItemDTO[]>>('messageBoard')
|
||||
// ).pipe(
|
||||
// withLatestFrom(this.updateNotification$),
|
||||
// map(([d, update]) => {
|
||||
// console.log('notifications$', d, update);
|
||||
// const data = d;
|
||||
// if (update && !!data && !data?.data?.find((message) => message?.category === 'ISA-Update')) {
|
||||
// data.data.push(update);
|
||||
// }
|
||||
// return data;
|
||||
// }),
|
||||
// tap((data) => this._storeNotifactions(data)),
|
||||
// shareReplay(1)
|
||||
// );
|
||||
|
||||
private _getNotifications(): EnvelopeDTO<MessageBoardItemDTO[]> {
|
||||
// private _storeNotifactions(data: EnvelopeDTO<MessageBoardItemDTO[]>) {
|
||||
// if (data) {
|
||||
// sessionStorage.setItem(this.sessionStoragesessionStorageKey, JSON.stringify(data));
|
||||
// }
|
||||
// }
|
||||
|
||||
// private _getNotifications(): EnvelopeDTO<MessageBoardItemDTO[]> {
|
||||
// const stringData = sessionStorage.getItem(this.sessionStoragesessionStorageKey);
|
||||
// if (stringData) {
|
||||
// return JSON.parse(stringData);
|
||||
// }
|
||||
// return undefined;
|
||||
// }
|
||||
|
||||
private _getNotifications(): Record<string, MessageBoardItemDTO[]> {
|
||||
const stringData = sessionStorage.getItem(this.sessionStoragesessionStorageKey);
|
||||
if (stringData) {
|
||||
return JSON.parse(stringData);
|
||||
}
|
||||
return undefined;
|
||||
return {};
|
||||
}
|
||||
|
||||
private _storeNotifactions(data: Record<string, MessageBoardItemDTO[]>) {
|
||||
if (data) {
|
||||
delete data['messageBoard/isa-update'];
|
||||
sessionStorage.setItem(this.sessionStoragesessionStorageKey, JSON.stringify(data));
|
||||
}
|
||||
}
|
||||
|
||||
updateNotification() {
|
||||
this.updateNotification$.next({
|
||||
category: 'ISA-Update',
|
||||
type: 'update',
|
||||
headline: 'Update Benachrichtigung',
|
||||
text: 'Es steht eine aktuellere Version der ISA bereit. Bitte aktualisieren Sie die Anwendung.',
|
||||
});
|
||||
this.refreshMessageBoardItems('messageBoard/isa-update', [
|
||||
{
|
||||
category: 'ISA-Update',
|
||||
type: 'update',
|
||||
headline: 'Update Benachrichtigung',
|
||||
text: 'Es steht eine aktuellere Version der ISA bereit. Bitte aktualisieren Sie die Anwendung.',
|
||||
},
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,11 +52,7 @@ export class IsAuthenticatedGuard implements CanActivate {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const result = await this._scanService
|
||||
.scan({
|
||||
exclude: ['Dev'],
|
||||
})
|
||||
?.toPromise();
|
||||
const result = await this._scanService.scan()?.toPromise();
|
||||
|
||||
if (typeof result === 'string') {
|
||||
try {
|
||||
|
||||
@@ -73,10 +73,10 @@
|
||||
<ui-icon icon="documents_refresh" size="24px"></ui-icon>
|
||||
Remission
|
||||
</a>
|
||||
<!-- <a [routerLink]="['/filiale/package-inspection']" routerLinkActive="active" (click)="fetchAndOpenPackages()">
|
||||
<a [routerLink]="['/filiale/package-inspection']" routerLinkActive="active" (click)="fetchAndOpenPackages()">
|
||||
<ui-svg-icon icon="clipboard-check-outline" [size]="24"></ui-svg-icon>
|
||||
Wareneingang
|
||||
</a> -->
|
||||
</a>
|
||||
</ng-container>
|
||||
</shell-footer>
|
||||
</div>
|
||||
|
||||
@@ -29,7 +29,9 @@ export class ShellComponent {
|
||||
|
||||
notifications$ = this._notificationsHub.notifications$;
|
||||
|
||||
notificationCount$ = this.notifications$.pipe(map((message) => message?.data?.length));
|
||||
notificationCount$ = this.notifications$.pipe(
|
||||
map((notifications) => Object.values(notifications).reduce((acc, val) => acc + val?.length ?? 0, 0))
|
||||
);
|
||||
|
||||
get activatedProcessId$() {
|
||||
return this._appService.getActivatedProcessId$().pipe(
|
||||
|
||||
405
apps/isa-app/src/assets/icons.json
Normal file
405
apps/isa-app/src/assets/icons.json
Normal file
File diff suppressed because one or more lines are too long
11
apps/isa-app/src/assets/images/Icon_DR.svg
Normal file
11
apps/isa-app/src/assets/images/Icon_DR.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="22px" height="18px" viewBox="0 0 22 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>Icon_HC</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Hugendubel_Icons" transform="translate(-29.000000, -177.000000)" fill="#000000" fill-rule="nonzero" stroke="#000000" stroke-width="0.3">
|
||||
<path d="M32.725699,178.000628 C32.7430505,177.999791 32.7604307,177.999791 32.7777823,178.000628 L37.5260449,178.000628 C38.53109,178.000628 39.44018,178.547926 40.0000026,179.340692 C40.5598253,178.547926 41.4689153,178.000628 42.4739603,178.000628 L47.222223,178.000628 C47.529035,178.00066 47.7777477,178.256627 47.7777784,178.572389 L47.7777784,179.71591 L49.4444446,179.71591 C49.7512567,179.715942 49.9999694,179.971909 50,180.287671 L50,192.008763 C49.9999694,192.324524 49.7512567,192.580492 49.4444446,192.580523 L42.4739603,192.580523 C41.4766486,192.580523 40.8524541,192.949423 40.4947942,193.688309 C40.3998428,193.879608 40.208727,194 40.0000026,194 C39.7912783,194 39.6001624,193.879608 39.5052111,193.688309 C39.1475512,192.949423 38.5233566,192.580523 37.5260449,192.580523 L30.5555607,192.580523 C30.2487486,192.580492 30.0000359,192.324524 30.0000053,192.008763 L30.0000053,180.287671 C29.9987652,179.991708 30.2171687,179.743681 30.5034773,179.71591 C30.5208289,179.715072 30.5382091,179.715072 30.5555607,179.71591 L32.2222269,179.71591 L32.2222269,178.572389 C32.2209869,178.276426 32.4393904,178.028399 32.725699,178.000628 Z M33.3333377,179.14415 L33.3333377,189.43584 L36.6232674,189.43584 C37.6190746,189.43584 38.5547188,189.729711 39.2621556,190.356017 C39.3270606,190.413476 39.3849347,190.480265 39.4444472,190.543626 L39.4444472,180.957703 C39.4433388,180.936873 39.4433388,180.915996 39.4444472,180.895166 C39.4444472,180.068361 38.4768339,179.14415 37.5260449,179.14415 L33.3333377,179.14415 Z M42.4739603,179.14415 C41.5231714,179.14415 40.555558,180.068361 40.555558,180.895166 C40.5555806,180.898144 40.5555806,180.901122 40.555558,180.9041 L40.555558,190.543626 C40.6150705,190.480265 40.6729447,190.413476 40.7378497,190.356017 C41.4452864,189.729711 42.3809306,189.43584 43.3767379,189.43584 L46.6666675,189.43584 L46.6666675,179.14415 L42.4739603,179.14415 Z M31.1111161,180.859431 L31.1111161,191.437002 L37.5260449,191.437002 C38.0365968,191.437002 38.5189494,191.531483 38.9496557,191.713949 C38.8273679,191.527334 38.6888269,191.36055 38.5329891,191.222592 C38.0547048,190.799175 37.405738,190.579361 36.6232674,190.579361 L32.7777823,190.579361 C32.4709702,190.57933 32.2222575,190.323362 32.2222269,190.007601 L32.2222269,180.859431 L31.1111161,180.859431 Z M47.7777784,180.859431 L47.7777784,190.007601 C47.7777477,190.323362 47.529035,190.57933 47.222223,190.579361 L43.3767379,190.579361 C42.5942672,190.579361 41.9453004,190.799175 41.4670161,191.222592 C41.3107359,191.360944 41.1725734,191.526903 41.0503496,191.713949 C41.4810558,191.531483 41.9634085,191.437002 42.4739603,191.437002 L48.8888892,191.437002 L48.8888892,180.859431 L47.7777784,180.859431 Z M35.5,182.116677 L37.5,182.116677 C37.7761424,182.116677 38,182.340535 38,182.616677 L38,182.645847 C38,182.921989 37.7761424,183.145847 37.5,183.145847 L35.5,183.145847 C35.2238576,183.145847 35,182.921989 35,182.645847 L35,182.616677 C35,182.340535 35.2238576,182.116677 35.5,182.116677 Z M35.5,184.175016 L37.5,184.175016 C37.7761424,184.175016 38,184.398874 38,184.675016 L38,184.704185 C38,184.980328 37.7761424,185.204185 37.5,185.204185 L35.5,185.204185 C35.2238576,185.204185 35,184.980328 35,184.704185 L35,184.675016 C35,184.398874 35.2238576,184.175016 35.5,184.175016 Z M35.5,186.233355 L37.5,186.233355 C37.7761424,186.233355 38,186.457212 38,186.733355 L38,186.762524 C38,187.038666 37.7761424,187.262524 37.5,187.262524 L35.5,187.262524 C35.2238576,187.262524 35,187.038666 35,186.762524 L35,186.733355 C35,186.457212 35.2238576,186.233355 35.5,186.233355 Z M42.5,182.116677 L44.5,182.116677 C44.7761424,182.116677 45,182.340535 45,182.616677 L45,182.645847 C45,182.921989 44.7761424,183.145847 44.5,183.145847 L42.5,183.145847 C42.2238576,183.145847 42,182.921989 42,182.645847 L42,182.616677 C42,182.340535 42.2238576,182.116677 42.5,182.116677 Z M42.5,184.175016 L44.5,184.175016 C44.7761424,184.175016 45,184.398874 45,184.675016 L45,184.704185 C45,184.980328 44.7761424,185.204185 44.5,185.204185 L42.5,185.204185 C42.2238576,185.204185 42,184.980328 42,184.704185 L42,184.675016 C42,184.398874 42.2238576,184.175016 42.5,184.175016 Z M42.5,186.233355 L44.5,186.233355 C44.7761424,186.233355 45,186.457212 45,186.733355 L45,186.762524 C45,187.038666 44.7761424,187.262524 44.5,187.262524 L42.5,187.262524 C42.2238576,187.262524 42,187.038666 42,186.762524 L42,186.733355 C42,186.457212 42.2238576,186.233355 42.5,186.233355 Z" id="Icon_HC"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.0 KiB |
11
apps/isa-app/src/assets/images/Icon_GEH.svg
Normal file
11
apps/isa-app/src/assets/images/Icon_GEH.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="22px" height="18px" viewBox="0 0 22 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>Icon_HC</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Hugendubel_Icons" transform="translate(-29.000000, -177.000000)" fill="#000000" fill-rule="nonzero" stroke="#000000" stroke-width="0.3">
|
||||
<path d="M32.725699,178.000628 C32.7430505,177.999791 32.7604307,177.999791 32.7777823,178.000628 L37.5260449,178.000628 C38.53109,178.000628 39.44018,178.547926 40.0000026,179.340692 C40.5598253,178.547926 41.4689153,178.000628 42.4739603,178.000628 L47.222223,178.000628 C47.529035,178.00066 47.7777477,178.256627 47.7777784,178.572389 L47.7777784,179.71591 L49.4444446,179.71591 C49.7512567,179.715942 49.9999694,179.971909 50,180.287671 L50,192.008763 C49.9999694,192.324524 49.7512567,192.580492 49.4444446,192.580523 L42.4739603,192.580523 C41.4766486,192.580523 40.8524541,192.949423 40.4947942,193.688309 C40.3998428,193.879608 40.208727,194 40.0000026,194 C39.7912783,194 39.6001624,193.879608 39.5052111,193.688309 C39.1475512,192.949423 38.5233566,192.580523 37.5260449,192.580523 L30.5555607,192.580523 C30.2487486,192.580492 30.0000359,192.324524 30.0000053,192.008763 L30.0000053,180.287671 C29.9987652,179.991708 30.2171687,179.743681 30.5034773,179.71591 C30.5208289,179.715072 30.5382091,179.715072 30.5555607,179.71591 L32.2222269,179.71591 L32.2222269,178.572389 C32.2209869,178.276426 32.4393904,178.028399 32.725699,178.000628 Z M33.3333377,179.14415 L33.3333377,189.43584 L36.6232674,189.43584 C37.6190746,189.43584 38.5547188,189.729711 39.2621556,190.356017 C39.3270606,190.413476 39.3849347,190.480265 39.4444472,190.543626 L39.4444472,180.957703 C39.4433388,180.936873 39.4433388,180.915996 39.4444472,180.895166 C39.4444472,180.068361 38.4768339,179.14415 37.5260449,179.14415 L33.3333377,179.14415 Z M42.4739603,179.14415 C41.5231714,179.14415 40.555558,180.068361 40.555558,180.895166 C40.5555806,180.898144 40.5555806,180.901122 40.555558,180.9041 L40.555558,190.543626 C40.6150705,190.480265 40.6729447,190.413476 40.7378497,190.356017 C41.4452864,189.729711 42.3809306,189.43584 43.3767379,189.43584 L46.6666675,189.43584 L46.6666675,179.14415 L42.4739603,179.14415 Z M31.1111161,180.859431 L31.1111161,191.437002 L37.5260449,191.437002 C38.0365968,191.437002 38.5189494,191.531483 38.9496557,191.713949 C38.8273679,191.527334 38.6888269,191.36055 38.5329891,191.222592 C38.0547048,190.799175 37.405738,190.579361 36.6232674,190.579361 L32.7777823,190.579361 C32.4709702,190.57933 32.2222575,190.323362 32.2222269,190.007601 L32.2222269,180.859431 L31.1111161,180.859431 Z M47.7777784,180.859431 L47.7777784,190.007601 C47.7777477,190.323362 47.529035,190.57933 47.222223,190.579361 L43.3767379,190.579361 C42.5942672,190.579361 41.9453004,190.799175 41.4670161,191.222592 C41.3107359,191.360944 41.1725734,191.526903 41.0503496,191.713949 C41.4810558,191.531483 41.9634085,191.437002 42.4739603,191.437002 L48.8888892,191.437002 L48.8888892,180.859431 L47.7777784,180.859431 Z M35.5,182.116677 L37.5,182.116677 C37.7761424,182.116677 38,182.340535 38,182.616677 L38,182.645847 C38,182.921989 37.7761424,183.145847 37.5,183.145847 L35.5,183.145847 C35.2238576,183.145847 35,182.921989 35,182.645847 L35,182.616677 C35,182.340535 35.2238576,182.116677 35.5,182.116677 Z M35.5,184.175016 L37.5,184.175016 C37.7761424,184.175016 38,184.398874 38,184.675016 L38,184.704185 C38,184.980328 37.7761424,185.204185 37.5,185.204185 L35.5,185.204185 C35.2238576,185.204185 35,184.980328 35,184.704185 L35,184.675016 C35,184.398874 35.2238576,184.175016 35.5,184.175016 Z M35.5,186.233355 L37.5,186.233355 C37.7761424,186.233355 38,186.457212 38,186.733355 L38,186.762524 C38,187.038666 37.7761424,187.262524 37.5,187.262524 L35.5,187.262524 C35.2238576,187.262524 35,187.038666 35,186.762524 L35,186.733355 C35,186.457212 35.2238576,186.233355 35.5,186.233355 Z M42.5,182.116677 L44.5,182.116677 C44.7761424,182.116677 45,182.340535 45,182.616677 L45,182.645847 C45,182.921989 44.7761424,183.145847 44.5,183.145847 L42.5,183.145847 C42.2238576,183.145847 42,182.921989 42,182.645847 L42,182.616677 C42,182.340535 42.2238576,182.116677 42.5,182.116677 Z M42.5,184.175016 L44.5,184.175016 C44.7761424,184.175016 45,184.398874 45,184.675016 L45,184.704185 C45,184.980328 44.7761424,185.204185 44.5,185.204185 L42.5,185.204185 C42.2238576,185.204185 42,184.980328 42,184.704185 L42,184.675016 C42,184.398874 42.2238576,184.175016 42.5,184.175016 Z M42.5,186.233355 L44.5,186.233355 C44.7761424,186.233355 45,186.457212 45,186.733355 L45,186.762524 C45,187.038666 44.7761424,187.262524 44.5,187.262524 L42.5,187.262524 C42.2238576,187.262524 42,187.038666 42,186.762524 L42,186.733355 C42,186.457212 42.2238576,186.233355 42.5,186.233355 Z" id="Icon_HC"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.0 KiB |
11
apps/isa-app/src/assets/images/Icon_PP.svg
Normal file
11
apps/isa-app/src/assets/images/Icon_PP.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="22px" height="18px" viewBox="0 0 22 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>Icon_HC</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Hugendubel_Icons" transform="translate(-29.000000, -177.000000)" fill="#000000" fill-rule="nonzero" stroke="#000000" stroke-width="0.3">
|
||||
<path d="M32.725699,178.000628 C32.7430505,177.999791 32.7604307,177.999791 32.7777823,178.000628 L37.5260449,178.000628 C38.53109,178.000628 39.44018,178.547926 40.0000026,179.340692 C40.5598253,178.547926 41.4689153,178.000628 42.4739603,178.000628 L47.222223,178.000628 C47.529035,178.00066 47.7777477,178.256627 47.7777784,178.572389 L47.7777784,179.71591 L49.4444446,179.71591 C49.7512567,179.715942 49.9999694,179.971909 50,180.287671 L50,192.008763 C49.9999694,192.324524 49.7512567,192.580492 49.4444446,192.580523 L42.4739603,192.580523 C41.4766486,192.580523 40.8524541,192.949423 40.4947942,193.688309 C40.3998428,193.879608 40.208727,194 40.0000026,194 C39.7912783,194 39.6001624,193.879608 39.5052111,193.688309 C39.1475512,192.949423 38.5233566,192.580523 37.5260449,192.580523 L30.5555607,192.580523 C30.2487486,192.580492 30.0000359,192.324524 30.0000053,192.008763 L30.0000053,180.287671 C29.9987652,179.991708 30.2171687,179.743681 30.5034773,179.71591 C30.5208289,179.715072 30.5382091,179.715072 30.5555607,179.71591 L32.2222269,179.71591 L32.2222269,178.572389 C32.2209869,178.276426 32.4393904,178.028399 32.725699,178.000628 Z M33.3333377,179.14415 L33.3333377,189.43584 L36.6232674,189.43584 C37.6190746,189.43584 38.5547188,189.729711 39.2621556,190.356017 C39.3270606,190.413476 39.3849347,190.480265 39.4444472,190.543626 L39.4444472,180.957703 C39.4433388,180.936873 39.4433388,180.915996 39.4444472,180.895166 C39.4444472,180.068361 38.4768339,179.14415 37.5260449,179.14415 L33.3333377,179.14415 Z M42.4739603,179.14415 C41.5231714,179.14415 40.555558,180.068361 40.555558,180.895166 C40.5555806,180.898144 40.5555806,180.901122 40.555558,180.9041 L40.555558,190.543626 C40.6150705,190.480265 40.6729447,190.413476 40.7378497,190.356017 C41.4452864,189.729711 42.3809306,189.43584 43.3767379,189.43584 L46.6666675,189.43584 L46.6666675,179.14415 L42.4739603,179.14415 Z M31.1111161,180.859431 L31.1111161,191.437002 L37.5260449,191.437002 C38.0365968,191.437002 38.5189494,191.531483 38.9496557,191.713949 C38.8273679,191.527334 38.6888269,191.36055 38.5329891,191.222592 C38.0547048,190.799175 37.405738,190.579361 36.6232674,190.579361 L32.7777823,190.579361 C32.4709702,190.57933 32.2222575,190.323362 32.2222269,190.007601 L32.2222269,180.859431 L31.1111161,180.859431 Z M47.7777784,180.859431 L47.7777784,190.007601 C47.7777477,190.323362 47.529035,190.57933 47.222223,190.579361 L43.3767379,190.579361 C42.5942672,190.579361 41.9453004,190.799175 41.4670161,191.222592 C41.3107359,191.360944 41.1725734,191.526903 41.0503496,191.713949 C41.4810558,191.531483 41.9634085,191.437002 42.4739603,191.437002 L48.8888892,191.437002 L48.8888892,180.859431 L47.7777784,180.859431 Z M35.5,182.116677 L37.5,182.116677 C37.7761424,182.116677 38,182.340535 38,182.616677 L38,182.645847 C38,182.921989 37.7761424,183.145847 37.5,183.145847 L35.5,183.145847 C35.2238576,183.145847 35,182.921989 35,182.645847 L35,182.616677 C35,182.340535 35.2238576,182.116677 35.5,182.116677 Z M35.5,184.175016 L37.5,184.175016 C37.7761424,184.175016 38,184.398874 38,184.675016 L38,184.704185 C38,184.980328 37.7761424,185.204185 37.5,185.204185 L35.5,185.204185 C35.2238576,185.204185 35,184.980328 35,184.704185 L35,184.675016 C35,184.398874 35.2238576,184.175016 35.5,184.175016 Z M35.5,186.233355 L37.5,186.233355 C37.7761424,186.233355 38,186.457212 38,186.733355 L38,186.762524 C38,187.038666 37.7761424,187.262524 37.5,187.262524 L35.5,187.262524 C35.2238576,187.262524 35,187.038666 35,186.762524 L35,186.733355 C35,186.457212 35.2238576,186.233355 35.5,186.233355 Z M42.5,182.116677 L44.5,182.116677 C44.7761424,182.116677 45,182.340535 45,182.616677 L45,182.645847 C45,182.921989 44.7761424,183.145847 44.5,183.145847 L42.5,183.145847 C42.2238576,183.145847 42,182.921989 42,182.645847 L42,182.616677 C42,182.340535 42.2238576,182.116677 42.5,182.116677 Z M42.5,184.175016 L44.5,184.175016 C44.7761424,184.175016 45,184.398874 45,184.675016 L45,184.704185 C45,184.980328 44.7761424,185.204185 44.5,185.204185 L42.5,185.204185 C42.2238576,185.204185 42,184.980328 42,184.704185 L42,184.675016 C42,184.398874 42.2238576,184.175016 42.5,184.175016 Z M42.5,186.233355 L44.5,186.233355 C44.7761424,186.233355 45,186.457212 45,186.733355 L45,186.762524 C45,187.038666 44.7761424,187.262524 44.5,187.262524 L42.5,187.262524 C42.2238576,187.262524 42,187.038666 42,186.762524 L42,186.733355 C42,186.457212 42.2238576,186.233355 42.5,186.233355 Z" id="Icon_HC"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.0 KiB |
@@ -69,6 +69,6 @@
|
||||
},
|
||||
"checkForUpdates": 3600000,
|
||||
"licence": {
|
||||
"scandit": "AQZyKCc+BEkNL00Y3h3FjawGLF+INUj7cVb0My91hl8ffiW873T8FTV1k4TIZJx5RwcJlYxhgsxHVcnM4AJgSwJhbAfxJmP/3XGijLlLp3XUIRjQwFtf7UlZAFZ7Vrt1/WSf7kxxrFQ2SE2AQwLqPg9DL+hHEfd4xT/15n8p2q7qUlCKLsV6jF12Pd7koFNSWNL3ZIkRtd1ma99/321dnwAJHFGXqWg5nprJ7sYtqUqNQ8Er9SlvKbhnw3AipHzKpz0O3oNfUsr6NlZivRBhMhCZLo5WpXo1m9uIU8zLEWMNDJ+wGUctcGxE3eCptP2zLXUgxxjB+0EXOUtT/GWUc/Ip61CMiyUf7Paz026E2eYil2yWgfkTP5CUgDMNGZFuAA1T5PhB9FRW51CjAIvwOKVMCvfixJiVoUsXHnWH2ZnXqtbDR/uEZBE7OKoBlaPL4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FtPuCJ9Uagy5QBEc8eAz2nfsbfaUxYzco6u/zhNsFbqp6zgQIxs5OcqDQ=="
|
||||
"scandit": "AZ7zLw2eLmFWHbYP4RDq8VAEgAxmNGYcPU8YpOc3DryEXj4zMzYQFrQuUm0YewGQYEESXjpRwGX1NYmKY3pXHnAn2DeqIzh2an+FUu9socQlbQnJiHJHoWBAqcqWSua+P12tc95P3s9aaEEYvSjUy7Md88f7N+sk6zZbUmqbMXeXqmZwdkmRoUY/2w0CiiiA4gBFHgu4sMeNQ9dWyfxKTUPf5AnsxnuYpCt5KLxJWSYDv8HHj0mx8DCJTe1m2ony97Lge3JbJ5Dd+Zz6SCwqik7fv53Qole9s/3m66lYFWKAzWRKkHN1zts78CmPxPb+AAHVoqlBM3duvYmnCxxGOmlXabKUNuDR2ExaMu/nlo532jqqy25Cet/FP1UAs96ZGRgzEcHxGPp6kA53lJ15zd+cxz6G93E83AmYJkhddXBQElWEaGtQRfrEzRGmvcksR+V8MMYjGmhkVbQxGGqpnfP4IxbuEFcef6bxxTiulzo75gXoqZTt+7C1qpDcrMM3Yp0Z8RBw3JlV2tLk4FYFZpxY8QrXIcjvRYKExtQ9e5sSbST4Vx95YhEUd6iX0SBPDzcmgR4/Ef6gvJfoWgz68+rqhBGckphdHi2Mf/pYuAlh2jbwtrkErE2xWARBejR/UcU/A3F7k9RkFd5/QZC7qhsE6bZH7uhpkptIbi5XkXagwYy1oJD7yJs4VLOJteYWferRm8h1auxXew5tL8VLHciF+lLj6h8PTUDt2blLgUjHtualqlCwdSTzJyYwk4oswGGDk6E48X7LXpzuhtR8TYTOi2REN0uuTbO/slFBRw+CaYUnD0LjB9p2lb8ndcdV9adzBKmwPxiOtlOELQ=="
|
||||
}
|
||||
}
|
||||
@@ -70,6 +70,6 @@
|
||||
},
|
||||
"checkForUpdates": 3600000,
|
||||
"licence": {
|
||||
"scandit": "AQZyKCc+BEkNL00Y3h3FjawGLF+INUj7cVb0My91hl8ffiW873T8FTV1k4TIZJx5Rwc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UY/2w0CiiiA4gBFHgu4sMeNQ9dWyfxKTUPf5AnsxnuYpCt5KLxJWSYDv8HHj0mx8DCJTe1m2ony97Lge3JbJ5Dd+Zz6SCwqik7fv53Qole9s/3m66lYFWKAzWRKkHN1zts78CmPxPb+AAHVoqlBM3duvYmnCxxGOmlXabKUNuDR2ExaMu/nlo532jqqy25Cet/FP1UAs96ZGRgzEcHxGPp6kA53lJ15zd+cxz6G93E83AmYJkhddXBQElWEaGtQRfrEzRGmvcksR+V8MMYjGmhkVbQxGGqpnfP4IxbuEFcef6bxxTiulzo75gXoqZTt+7C1qpDcrMM3Yp0Z8RBw3JlV2tLk4FYFZpxY8QrXIcjvRYKExtQ9e5sSbST4Vx95YhEUd6iX0SBPDzcmgR4/Ef6gvJfoWgz68+rqhBGckphdHi2Mf/pYuAlh2jbwtrkErE2xWARBejR/UcU/A3F7k9RkFd5/QZC7qhsE6bZH7uhpkptIbi5XkXagwYy1oJD7yJs4VLOJteYWferRm8h1auxXew5tL8VLHciF+lLj6h8PTUDt2blLgUjHtualqlCwdSTzJyYwk4oswGGDk6E48X7LXpzuhtR8TYTOi2REN0uuTbO/slFBRw+CaYUnD0LjB9p2lb8ndcdV9adzBKmwPxiOtlOELQ=="
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
<div class="notification-headline">
|
||||
<h1>{{ item.headline }}</h1>
|
||||
<button class="notification-edit-cta" (click)="itemSelected.emit(item)">
|
||||
Bearbeiten
|
||||
</button>
|
||||
<div class="grid grid-cols-[1fr_auto] items-center gap-4">
|
||||
<div class="grid grid-flow-row gap-4">
|
||||
<h1 class="text-left font-bold text-lg">{{ item.headline }}</h1>
|
||||
<div class="notification-text">{{ item.text }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<button *ngIf="editButton" class="notification-edit-cta text-brand font-bold text-lg px-4 py-3" (click)="itemSelected.emit(item)">
|
||||
{{ editButtonLabel }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="notification-text">{{ item.text }}</div>
|
||||
|
||||
@@ -13,5 +13,11 @@ export class ModalNotificationsListItemComponent {
|
||||
@Output()
|
||||
itemSelected = new EventEmitter<MessageBoardItemDTO>();
|
||||
|
||||
@Input()
|
||||
editButton = true;
|
||||
|
||||
@Input()
|
||||
editButtonLabel = 'Bearbeiten';
|
||||
|
||||
constructor() {}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<div class="notification-list scroll-bar">
|
||||
<ng-container *ngFor="let notification of notifications">
|
||||
<modal-notifications-list-item
|
||||
(click)="itemSelected(notification)"
|
||||
[editButtonLabel]="'Packstück-Prüfung'"
|
||||
[item]="notification"
|
||||
(itemSelected)="itemSelected($event)"
|
||||
></modal-notifications-list-item>
|
||||
<hr />
|
||||
</ng-container>
|
||||
</div>
|
||||
@@ -0,0 +1,101 @@
|
||||
import { createComponentFactory, Spectator, SpyObject } from '@ngneat/spectator';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { UiIconModule } from '@ui/icon';
|
||||
import { Router } from '@angular/router';
|
||||
import { UiFilter } from '@ui/filter';
|
||||
import { MessageBoardItemDTO } from 'apps/hub/notifications/src/lib/defs';
|
||||
import { Component } from '@angular/core';
|
||||
import { ModalNotificationsListItemComponent } from '../notifications-list-item/notifications-list-item.component';
|
||||
import { ModalNotificationsRemissionGroupComponent } from './notifications-remission-group.component';
|
||||
|
||||
// DummyComponent Class
|
||||
@Component({
|
||||
selector: 'dummy-component',
|
||||
template: '<div></div>',
|
||||
})
|
||||
class DummyComponent {
|
||||
constructor() {}
|
||||
}
|
||||
|
||||
describe('ModalNotificationsRemissionGroupComponent', () => {
|
||||
let spectator: Spectator<ModalNotificationsRemissionGroupComponent>;
|
||||
let uiFilterMock: SpyObject<UiFilter>;
|
||||
let router: Router;
|
||||
|
||||
const createComponent = createComponentFactory({
|
||||
component: ModalNotificationsRemissionGroupComponent,
|
||||
declarations: [ModalNotificationsListItemComponent],
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterTestingModule.withRoutes([
|
||||
{ path: 'filiale/goods/in/results', component: DummyComponent },
|
||||
{ path: 'filiale/remission/create', component: DummyComponent },
|
||||
]),
|
||||
UiIconModule,
|
||||
],
|
||||
providers: [],
|
||||
mocks: [UiFilter],
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
spectator = createComponent({ props: { notifications: [] } });
|
||||
router = spectator.inject(Router);
|
||||
uiFilterMock = spectator.inject(UiFilter);
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(spectator.component).toBeTruthy();
|
||||
});
|
||||
|
||||
describe('notifications input', () => {
|
||||
it('should display the right notification-counter value based on the length of the input array', () => {
|
||||
spectator.setInput({ notifications: [{}, {}, {}] });
|
||||
expect(spectator.query('.notification-counter')).toHaveText('3');
|
||||
});
|
||||
|
||||
it('should not display notification-counter if input array has length 0', () => {
|
||||
spectator.setInput({ notifications: [] });
|
||||
expect(spectator.query('.notification-counter')).toHaveText('');
|
||||
});
|
||||
|
||||
it('should render modal-notifications-list-item based on the input array', () => {
|
||||
const notifications = [{}, {}];
|
||||
spectator.setInput({ notifications });
|
||||
spectator.detectComponentChanges();
|
||||
expect(spectator.queryAll('modal-notifications-list-item')).toHaveLength(notifications.length);
|
||||
});
|
||||
});
|
||||
|
||||
describe('itemSelected()', () => {
|
||||
it('should navigate to results with queryParams from UiFilter.getQueryParamsFromQueryTokenDTO()', () => {
|
||||
const item: MessageBoardItemDTO = { queryToken: { input: { main_qs: 'test' } } };
|
||||
spyOn(UiFilter, 'getQueryParamsFromQueryTokenDTO').and.returnValue(item.queryToken.input);
|
||||
spyOn(router, 'navigate');
|
||||
spectator.component.itemSelected(item);
|
||||
expect(router.navigate).toHaveBeenCalledWith(['/filiale/goods/in/results'], { queryParams: item.queryToken.input });
|
||||
});
|
||||
|
||||
it('should emit the navigated event after select item', () => {
|
||||
const item: MessageBoardItemDTO = { queryToken: { input: { main_qs: 'test' } } };
|
||||
spyOn(spectator.component.navigated, 'emit');
|
||||
spectator.component.itemSelected(item);
|
||||
expect(spectator.component.navigated.emit).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('actions CTA', () => {
|
||||
it('should navigate to remission page after clicking the CTA', () => {
|
||||
const cta = spectator.query('.cta-primary');
|
||||
expect(cta).toHaveText('Zur Remission');
|
||||
expect(cta).toHaveAttribute('href', '/filiale/remission/create');
|
||||
});
|
||||
|
||||
it('should emit the navigated event after clicking the CTA', () => {
|
||||
const cta = spectator.query('.cta-primary') as HTMLAnchorElement;
|
||||
spyOn(spectator.component.navigated, 'emit');
|
||||
spectator.click(cta);
|
||||
expect(spectator.component.navigated.emit).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,23 @@
|
||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { MessageBoardItemDTO } from 'apps/hub/notifications/src/lib/defs';
|
||||
|
||||
@Component({
|
||||
selector: 'modal-notifications-package-inspection-group',
|
||||
templateUrl: 'notifications-package-inspection-group.component.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class ModalNotificationsPackageInspectionGroupComponent {
|
||||
@Input()
|
||||
notifications: MessageBoardItemDTO[];
|
||||
|
||||
@Output()
|
||||
navigated = new EventEmitter<void>();
|
||||
|
||||
constructor(private _router: Router) {}
|
||||
|
||||
itemSelected(item: MessageBoardItemDTO) {
|
||||
this._router.navigate(['/filiale/package-inspection/packages']);
|
||||
this.navigated.emit();
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,3 @@
|
||||
<div class="header">
|
||||
<div class="notification-icon">
|
||||
<span class="notification-counter">{{ notifications.length }}</span>
|
||||
<ui-icon icon="notification" size="26px"></ui-icon>
|
||||
</div>
|
||||
|
||||
<h2>Remission</h2>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<div class="notification-list scroll-bar">
|
||||
<ng-container *ngFor="let notification of notifications">
|
||||
<modal-notifications-list-item [item]="notification" (itemSelected)="itemSelected($event)"></modal-notifications-list-item>
|
||||
|
||||
@@ -1,13 +1,3 @@
|
||||
<div class="header">
|
||||
<div class="notification-icon">
|
||||
<div class="notification-counter">{{ notifications.length }}</div>
|
||||
<ui-icon icon="notification" size="26px"></ui-icon>
|
||||
</div>
|
||||
|
||||
<h2>Reservierungsanfragen</h2>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<div class="notification-list scroll-bar">
|
||||
<ng-container *ngFor="let notification of notifications">
|
||||
<modal-notifications-list-item [item]="notification" (itemSelected)="itemSelected($event)"></modal-notifications-list-item>
|
||||
|
||||
@@ -1,13 +1,3 @@
|
||||
<div class="header">
|
||||
<div class="notification-icon">
|
||||
<span class="notification-counter">{{ notifications.length }}</span>
|
||||
<ui-icon icon="notification" size="26px"></ui-icon>
|
||||
</div>
|
||||
|
||||
<h2>Tätigkeitskalender</h2>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<div class="notification-list scroll-bar">
|
||||
<ng-container *ngFor="let notification of notifications">
|
||||
<modal-notifications-list-item [item]="notification" (itemSelected)="itemSelected($event)"></modal-notifications-list-item>
|
||||
|
||||
@@ -1,13 +1,3 @@
|
||||
<div class="header">
|
||||
<div class="notification-icon">
|
||||
<span class="notification-counter">{{ notifications.length }}</span>
|
||||
<ui-icon icon="notification" size="26px"></ui-icon>
|
||||
</div>
|
||||
|
||||
<h2>ISA-Update</h2>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<div class="notification-list scroll-bar">
|
||||
<ng-container *ngFor="let notification of notifications">
|
||||
<div class="notification-headline">
|
||||
|
||||
@@ -1,34 +1,39 @@
|
||||
<h1>Sie haben neue Nachrichten</h1>
|
||||
|
||||
<ng-container *ngFor="let notification of groupedNotifications$ | async">
|
||||
<button
|
||||
*ngIf="notification.group !== (activeCard$ | async)"
|
||||
type="button"
|
||||
class="notification-card"
|
||||
(click)="activeCard = notification.group"
|
||||
>
|
||||
{{ notification.group }}
|
||||
<ng-container *ngFor="let notification of notifications$ | async | keyvalue">
|
||||
<button type="button" class="notification-card" (click)="selectArea(notification.key)">
|
||||
<div class="notification-icon">
|
||||
<div class="notification-counter">{{ notification.value?.length }}</div>
|
||||
<ui-icon icon="notification" size="26px"></ui-icon>
|
||||
</div>
|
||||
<span>{{ notification.value?.[0]?.category }}</span>
|
||||
</button>
|
||||
</ng-container>
|
||||
|
||||
<ng-container [ngSwitch]="activeCard$ | async">
|
||||
<modal-notifications-update-group
|
||||
*ngSwitchCase="'ISA-Update'"
|
||||
[notifications]="activeNotifications$ | async"
|
||||
></modal-notifications-update-group>
|
||||
<modal-notifications-reservation-group
|
||||
*ngSwitchCase="'Reservierungsanfragen'"
|
||||
[notifications]="activeNotifications$ | async"
|
||||
(navigated)="close()"
|
||||
></modal-notifications-reservation-group>
|
||||
<modal-notifications-remission-group
|
||||
*ngSwitchCase="'Remission'"
|
||||
[notifications]="activeNotifications$ | async"
|
||||
(navigated)="close()"
|
||||
></modal-notifications-remission-group>
|
||||
<modal-notifications-task-calendar-group
|
||||
*ngSwitchCase="'Tätigkeitskalender'"
|
||||
[notifications]="activeNotifications$ | async"
|
||||
(navigated)="close()"
|
||||
></modal-notifications-task-calendar-group>
|
||||
<hr class="-mx-4" />
|
||||
<ng-container *ngIf="notification.key === selectedArea" [ngSwitch]="notification.value?.[0]?.category">
|
||||
<modal-notifications-update-group
|
||||
*ngSwitchCase="'ISA-Update'"
|
||||
[notifications]="notifications[selectedArea]"
|
||||
></modal-notifications-update-group>
|
||||
<modal-notifications-reservation-group
|
||||
*ngSwitchCase="'Reservierungsanfragen'"
|
||||
[notifications]="notifications[selectedArea]"
|
||||
(navigated)="close()"
|
||||
></modal-notifications-reservation-group>
|
||||
<modal-notifications-remission-group
|
||||
*ngSwitchCase="'Remission'"
|
||||
[notifications]="notifications[selectedArea]"
|
||||
(navigated)="close()"
|
||||
></modal-notifications-remission-group>
|
||||
<modal-notifications-task-calendar-group
|
||||
*ngSwitchCase="'Tätigkeitskalender'"
|
||||
[notifications]="notifications[selectedArea]"
|
||||
(navigated)="close()"
|
||||
></modal-notifications-task-calendar-group>
|
||||
<modal-notifications-package-inspection-group
|
||||
*ngSwitchCase="'Wareneingang Lagerware'"
|
||||
[notifications]="notifications[selectedArea]"
|
||||
(navigated)="close()"
|
||||
>
|
||||
</modal-notifications-package-inspection-group>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
@@ -2,46 +2,44 @@ modal-notifications {
|
||||
@apply flex flex-col relative h-full;
|
||||
|
||||
h1 {
|
||||
@apply text-xl font-bold text-center mb-10;
|
||||
@apply text-xl font-bold text-center;
|
||||
}
|
||||
|
||||
// .notification-card {
|
||||
// @apply text-center text-xl text-inactive-branch block bg-white rounded-t-card font-bold no-underline py-4 border-none outline-none shadow-card -ml-4;
|
||||
// width: calc(100% + 2rem);
|
||||
// }
|
||||
|
||||
.notification-card {
|
||||
@apply text-center text-xl text-inactive-branch block bg-white rounded-t-card font-bold no-underline py-4 border-none outline-none shadow-card -ml-4;
|
||||
width: calc(100% + 2rem);
|
||||
@apply grid grid-flow-col items-center justify-center gap-4;
|
||||
@apply text-inactive-branch bg-white;
|
||||
@apply font-bold text-xl -mx-4 py-4;
|
||||
|
||||
.notification-icon {
|
||||
@apply relative;
|
||||
|
||||
.notification-counter {
|
||||
@apply absolute font-normal text-base -top-2 -right-1 bg-brand text-white rounded-full w-5 h-5 flex items-center justify-center;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
ui-icon {
|
||||
@apply text-inactive-branch;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
@apply font-bold text-2xl ml-4;
|
||||
}
|
||||
}
|
||||
|
||||
modal-notifications-remission-group,
|
||||
modal-notifications-reservation-group,
|
||||
modal-notifications-task-calendar-group,
|
||||
modal-notifications-update-group {
|
||||
modal-notifications-update-group,
|
||||
modal-notifications-package-inspection-group {
|
||||
@apply flex flex-col relative pb-2;
|
||||
|
||||
.header {
|
||||
@apply flex flex-row justify-center items-center mt-5;
|
||||
|
||||
.notification-icon {
|
||||
@apply relative;
|
||||
|
||||
.notification-counter {
|
||||
@apply absolute -top-2 -right-1 bg-brand text-white rounded-full w-5 h-5 flex items-center justify-center;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
ui-icon {
|
||||
@apply text-inactive-branch;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
@apply font-bold text-2xl ml-4;
|
||||
}
|
||||
}
|
||||
|
||||
hr {
|
||||
@apply bg-disabled-branch h-px-2 -ml-4 my-4;
|
||||
width: calc(100% + 2rem);
|
||||
}
|
||||
|
||||
.notification-list {
|
||||
@apply overflow-y-scroll -ml-4;
|
||||
max-height: calc(100vh - 450px);
|
||||
@@ -60,7 +58,7 @@ modal-notifications {
|
||||
|
||||
modal-notifications-list-item,
|
||||
modal-notifications-update-group {
|
||||
@apply flex flex-col relative py-1 px-4;
|
||||
@apply flex flex-col relative p-4;
|
||||
|
||||
.notification-headline {
|
||||
@apply flex flex-row justify-between items-start;
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
import { ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { ComponentStore } from '@ngrx/component-store';
|
||||
import { Group, groupBy } from '@ui/common';
|
||||
import { UiModalRef } from '@ui/modal';
|
||||
import { EnvelopeDTO, MessageBoardItemDTO } from 'apps/hub/notifications/src/lib/defs';
|
||||
import { combineLatest } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { MessageBoardItemDTO } from 'apps/hub/notifications/src/lib/defs';
|
||||
|
||||
interface ModalNotificationComponentState {
|
||||
activeCard: string;
|
||||
groupedNotifications: Group<string, MessageBoardItemDTO>[];
|
||||
selectedArea: string;
|
||||
notifications: Record<string, MessageBoardItemDTO[]>;
|
||||
}
|
||||
|
||||
@Component({
|
||||
@@ -18,44 +15,61 @@ interface ModalNotificationComponentState {
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
})
|
||||
export class ModalNotificationsComponent extends ComponentStore<ModalNotificationComponentState> implements OnInit {
|
||||
set activeCard(activeCard: string) {
|
||||
if (this.activeCard !== activeCard) {
|
||||
this.patchState({ activeCard });
|
||||
export class ModalNotificationsComponent extends ComponentStore<ModalNotificationComponentState> {
|
||||
private _selectedAreaSelector = (state: ModalNotificationComponentState) => {
|
||||
if (state.selectedArea) {
|
||||
return state.selectedArea;
|
||||
}
|
||||
|
||||
const keys = Object.keys(state.notifications);
|
||||
|
||||
for (const key of keys) {
|
||||
if (state.notifications[key]?.length > 0) {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
get selectedArea() {
|
||||
return this.get(this._selectedAreaSelector);
|
||||
}
|
||||
|
||||
activeCard$ = this.select((s) => s.activeCard);
|
||||
selectedArea$ = this.select(this._selectedAreaSelector);
|
||||
|
||||
get activeCard() {
|
||||
return this.get((s) => s.activeCard);
|
||||
private _categorySelector = (state: ModalNotificationComponentState) => {
|
||||
const selectedArea = this._selectedAreaSelector(state);
|
||||
console.log('_categorySelector', state.notifications[selectedArea]?.[0]?.category);
|
||||
return state.notifications[selectedArea]?.[0]?.category;
|
||||
};
|
||||
|
||||
get category() {
|
||||
return this.get(this._categorySelector);
|
||||
}
|
||||
|
||||
get groupedNotifications() {
|
||||
return this.get((s) => s.groupedNotifications);
|
||||
}
|
||||
groupedNotifications$ = this.select((s) => s.groupedNotifications);
|
||||
category$ = this.select(this._categorySelector);
|
||||
|
||||
set groupedNotifications(groupedNotifications: Group<string, MessageBoardItemDTO>[]) {
|
||||
this.patchState({ groupedNotifications });
|
||||
get notifications() {
|
||||
return this.get((s) => s.notifications);
|
||||
}
|
||||
|
||||
activeNotifications$ = combineLatest([this.activeCard$, this.groupedNotifications$]).pipe(
|
||||
map(([activeCard, notifications]) => notifications.find((n) => n.group === activeCard)?.items)
|
||||
);
|
||||
notifications$ = this.select((s) => s.notifications);
|
||||
|
||||
constructor(private _modalRef: UiModalRef<any, EnvelopeDTO<MessageBoardItemDTO[]>>) {
|
||||
constructor(private _modalRef: UiModalRef<any, Record<string, MessageBoardItemDTO[]>>) {
|
||||
super({
|
||||
activeCard: undefined,
|
||||
groupedNotifications: groupBy(_modalRef.data.data, (item: MessageBoardItemDTO) => item.category),
|
||||
selectedArea: undefined,
|
||||
notifications: _modalRef.data,
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.patchState({ activeCard: this.groupedNotifications?.find((_) => true)?.group });
|
||||
}
|
||||
|
||||
close() {
|
||||
this._modalRef.close();
|
||||
}
|
||||
|
||||
selectArea(area: string) {
|
||||
this.patchState({
|
||||
selectedArea: area,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import { ModalNotificationsReservationGroupComponent } from './notifications-res
|
||||
import { ModalNotificationsTaskCalendarGroupComponent } from './notifications-task-calendar-group/notifications-task-calendar-group.component';
|
||||
import { ModalNotificationsUpdateGroupComponent } from './notifications-update-group/notifications-update-group.component';
|
||||
import { ModalNotificationsComponent } from './notifications.component';
|
||||
import { ModalNotificationsPackageInspectionGroupComponent } from './notifications-package-inspection-group/notifications-package-inspection-group.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, UiCommonModule, UiIconModule, RouterModule],
|
||||
@@ -19,6 +20,7 @@ import { ModalNotificationsComponent } from './notifications.component';
|
||||
ModalNotificationsTaskCalendarGroupComponent,
|
||||
ModalNotificationsUpdateGroupComponent,
|
||||
ModalNotificationsListItemComponent,
|
||||
ModalNotificationsPackageInspectionGroupComponent,
|
||||
],
|
||||
exports: [
|
||||
ModalNotificationsComponent,
|
||||
@@ -27,6 +29,7 @@ import { ModalNotificationsComponent } from './notifications.component';
|
||||
ModalNotificationsTaskCalendarGroupComponent,
|
||||
ModalNotificationsUpdateGroupComponent,
|
||||
ModalNotificationsListItemComponent,
|
||||
ModalNotificationsPackageInspectionGroupComponent,
|
||||
],
|
||||
})
|
||||
export class ModalNotificationsModule {}
|
||||
|
||||
@@ -59,8 +59,7 @@ export class PriceUpdateItemComponent {
|
||||
itemId: Number(item?.product?.catalogProductNumber),
|
||||
branchId: defaultBranch?.id,
|
||||
})
|
||||
),
|
||||
shareReplay(1)
|
||||
)
|
||||
);
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -278,6 +278,7 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy {
|
||||
items: [item],
|
||||
pickupBranch: selectedBranch,
|
||||
inStoreBranch: selectedBranch,
|
||||
preSelectOption: !!selectedBranch ? { option: 'in-store', showOptionOnly: true } : undefined,
|
||||
})
|
||||
.afterClosed$.subscribe(async (result) => {
|
||||
if (result?.data === 'continue') {
|
||||
|
||||
@@ -87,8 +87,7 @@ export class SearchResultItemComponent extends ComponentStore<SearchResultItemCo
|
||||
map(([defaultBranch, selectedBranch]) => {
|
||||
const branch = selectedBranch ?? defaultBranch;
|
||||
return branch.branchType !== 4;
|
||||
}),
|
||||
shareReplay(1)
|
||||
})
|
||||
);
|
||||
|
||||
stockTooltipText$ = combineLatest([this.defaultBranch$, this.selectedBranchId$]).pipe(
|
||||
@@ -104,8 +103,7 @@ export class SearchResultItemComponent extends ComponentStore<SearchResultItemCo
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}),
|
||||
shareReplay(1)
|
||||
})
|
||||
);
|
||||
|
||||
inStock$ = combineLatest([this.item$, this.selectedBranchId$, this.defaultBranch$]).pipe(
|
||||
@@ -113,8 +111,7 @@ export class SearchResultItemComponent extends ComponentStore<SearchResultItemCo
|
||||
filter(([item, branch, defaultBranch]) => !!item && !!defaultBranch),
|
||||
switchMap(([item, branch, defaultBranch]) =>
|
||||
this._stockService.getInStock$({ itemId: item.id, branchId: branch?.id ?? defaultBranch?.id })
|
||||
),
|
||||
shareReplay(1)
|
||||
)
|
||||
);
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -15,6 +15,7 @@ import { debounceTime, first, map, switchMap } from 'rxjs/operators';
|
||||
import { ArticleSearchService } from '../article-search.store';
|
||||
import { AddedToCartModalComponent } from './added-to-cart-modal/added-to-cart-modal.component';
|
||||
import { SearchResultItemComponent } from './search-result-item.component';
|
||||
import { DomainAvailabilityService, ItemData } from '@domain/availability';
|
||||
|
||||
@Component({
|
||||
selector: 'page-search-results',
|
||||
@@ -54,7 +55,8 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy {
|
||||
private breadcrumb: BreadcrumbService,
|
||||
private cache: CacheService,
|
||||
private _uiModal: UiModalService,
|
||||
private _checkoutService: DomainCheckoutService
|
||||
private _checkoutService: DomainCheckoutService,
|
||||
private _availability: DomainAvailabilityService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -258,11 +260,12 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy {
|
||||
|
||||
for (const item of selectedItems) {
|
||||
const isDownload = item?.product?.format === 'EB' || item?.product?.format === 'DL';
|
||||
const price = item?.catalogAvailability?.price;
|
||||
const shoppingCartItem: AddToShoppingCartDTO = {
|
||||
quantity: 1,
|
||||
availability: {
|
||||
availabilityType: item?.catalogAvailability?.status,
|
||||
price: item?.catalogAvailability?.price,
|
||||
price,
|
||||
supplierProductNumber: item?.ids?.dig ? String(item.ids?.dig) : item?.product?.supplierProductNumber,
|
||||
},
|
||||
product: {
|
||||
@@ -274,7 +277,13 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy {
|
||||
};
|
||||
|
||||
if (isDownload) {
|
||||
shoppingCartItem.destination = { data: { target: 16 } };
|
||||
const itemId = item?.id;
|
||||
const ean = item?.product?.ean;
|
||||
const downloadItem: ItemData = { ean, itemId, price };
|
||||
|
||||
// #4180 Für Download Artikel muss hier immer zwingend der logistician gesetzt werden, da diese Artikel direkt zugeordnet dem Warenkorb hinzugefügt werden
|
||||
const downloadAvailability = await this._availability.getDownloadAvailability({ item: downloadItem }).pipe(first()).toPromise();
|
||||
shoppingCartItem.destination = { data: { target: 16, logistician: downloadAvailability?.logistician } };
|
||||
canAddItemsPayload.push({
|
||||
availabilities: [{ ...item.catalogAvailability, format: 'DL' }],
|
||||
id: item.product.catalogProductNumber,
|
||||
|
||||
@@ -41,6 +41,7 @@ import {
|
||||
PrintPriceDiffQrCodeLabelActionHandler,
|
||||
CollectWithSmallAmountinvoiceActionHandler,
|
||||
PrintSmallamountinvoiceActionHandler,
|
||||
ShopWithKulturpassActionHandler,
|
||||
} from '@domain/oms';
|
||||
import { CoreCommandModule } from '@core/command';
|
||||
import { CustomerOrderRoutingModule } from './customer-order-routing.module';
|
||||
@@ -93,6 +94,7 @@ import { BreadcrumbModule } from '@shared/components/breadcrumb';
|
||||
PrintPriceDiffQrCodeLabelActionHandler,
|
||||
CollectWithSmallAmountinvoiceActionHandler,
|
||||
PrintSmallamountinvoiceActionHandler,
|
||||
ShopWithKulturpassActionHandler,
|
||||
]),
|
||||
],
|
||||
exports: [CustomerOrderComponent],
|
||||
|
||||
@@ -43,6 +43,7 @@ import {
|
||||
PrintPriceDiffQrCodeLabelActionHandler,
|
||||
CollectWithSmallAmountinvoiceActionHandler,
|
||||
PrintSmallamountinvoiceActionHandler,
|
||||
ShopWithKulturpassActionHandler,
|
||||
} from '@domain/oms';
|
||||
@NgModule({
|
||||
declarations: [GoodsInComponent],
|
||||
@@ -89,6 +90,7 @@ import {
|
||||
PrintPriceDiffQrCodeLabelActionHandler,
|
||||
CollectWithSmallAmountinvoiceActionHandler,
|
||||
PrintSmallamountinvoiceActionHandler,
|
||||
ShopWithKulturpassActionHandler,
|
||||
]),
|
||||
],
|
||||
exports: [GoodsInComponent],
|
||||
|
||||
@@ -41,6 +41,7 @@ import {
|
||||
PrintPriceDiffQrCodeLabelActionHandler,
|
||||
CollectWithSmallAmountinvoiceActionHandler,
|
||||
PrintSmallamountinvoiceActionHandler,
|
||||
ShopWithKulturpassActionHandler,
|
||||
} from '@domain/oms';
|
||||
import { CoreCommandModule } from '@core/command';
|
||||
import { ShellBreadcrumbModule } from '@shell/breadcrumb';
|
||||
@@ -91,6 +92,7 @@ import { GoodsInRoutingModule } from './good-out-routing.module';
|
||||
PrintPriceDiffQrCodeLabelActionHandler,
|
||||
CollectWithSmallAmountinvoiceActionHandler,
|
||||
PrintSmallamountinvoiceActionHandler,
|
||||
ShopWithKulturpassActionHandler,
|
||||
]),
|
||||
],
|
||||
exports: [GoodsOutComponent],
|
||||
|
||||
@@ -47,8 +47,13 @@ export class FinishRemissionComponent implements OnInit, OnDestroy {
|
||||
try {
|
||||
const returnDto = await this._remissionService.getReturn(returnId).toPromise();
|
||||
this.clearProcessData();
|
||||
|
||||
let queryParams = { ...this._activatedRoute.snapshot.queryParams };
|
||||
|
||||
delete queryParams['complete'];
|
||||
|
||||
await this._router.navigate(['/filiale', 'remission', 'create', returnDto.returnGroup], {
|
||||
queryParams: { ...this._activatedRoute.snapshot.queryParams },
|
||||
queryParams,
|
||||
});
|
||||
} catch (err) {
|
||||
this._modal.open({
|
||||
|
||||
@@ -11,5 +11,6 @@
|
||||
[hint]="hint$ | async"
|
||||
(scan)="search($event)"
|
||||
[scanner]="true"
|
||||
(hintCleared)="clearHint()"
|
||||
></ui-searchbox>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
||||
import { ChangeDetectionStrategy, Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { BreadcrumbService } from '@core/breadcrumb';
|
||||
@@ -58,8 +59,12 @@ export class FinishShippingDocumentComponent implements OnInit, OnDestroy {
|
||||
this._onDestroy$.complete();
|
||||
}
|
||||
|
||||
search(query: string) {
|
||||
clearHint() {
|
||||
this.hint$.next('');
|
||||
}
|
||||
|
||||
search(query: string) {
|
||||
query = query?.trim();
|
||||
if (!query) {
|
||||
this.hint$.next('Ungültige Eingabe');
|
||||
return;
|
||||
@@ -85,7 +90,14 @@ export class FinishShippingDocumentComponent implements OnInit, OnDestroy {
|
||||
modal.afterClosed$.pipe(takeUntil(this._onDestroy$)).subscribe(async (result) => {
|
||||
if (result?.data === 'correct') {
|
||||
await this.createReceiptAndAssignPackageNumber(query);
|
||||
await this.navigateToRemissionList(query);
|
||||
|
||||
if (coerceBooleanProperty(this._activatedRoute.snapshot.queryParams?.complete)) {
|
||||
this._router.navigate(['/filiale', 'remission', this.returnId, 'shipping-document'], {
|
||||
queryParams: { complete: true },
|
||||
});
|
||||
} else {
|
||||
await this.navigateToRemissionList(query);
|
||||
}
|
||||
} else if (result?.data === 'rescan') {
|
||||
this.searchboxComponent.clear();
|
||||
}
|
||||
|
||||
@@ -15,25 +15,21 @@
|
||||
</p>
|
||||
|
||||
<div class="text-center mt-8">
|
||||
<a
|
||||
[routerLink]="['/filiale', 'remission', returnId$ | async, packageNumber$ | async, 'list']"
|
||||
class="bg-brand text-white font-bold text-lg outline-none rounded-full px-6 py-3"
|
||||
>
|
||||
<button (click)="continue()" class="bg-brand text-white font-bold text-lg outline-none rounded-full px-6 py-3">
|
||||
Warenbegleitschein öffnen
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<div class="actions">
|
||||
<ng-container *ngIf="remissionStarted$ | async">
|
||||
<a
|
||||
[routerLink]="['/filiale', 'remission', returnId$ | async, packageNumber$ | async, 'list']"
|
||||
[queryParams]="queryParams$ | async"
|
||||
<button
|
||||
(click)="continue(true)"
|
||||
class="flex items-center bg-white font-bold text-lg px-6 py-3 rounded-full shadow-cta whitespace-nowrap"
|
||||
>
|
||||
<ui-icon class="mr-2" icon="arrow_head" size="16px" rotate="180deg"></ui-icon>
|
||||
Warenbegleitschein befüllen
|
||||
</a>
|
||||
</button>
|
||||
<button
|
||||
[disabled]="finishShippingDocumentDisabled$ | async"
|
||||
(click)="complete()"
|
||||
|
||||
@@ -11,6 +11,7 @@ import { NEVER, Observable } from 'rxjs';
|
||||
import { catchError, filter, first, map, shareReplay, switchMap, tap, withLatestFrom } from 'rxjs/operators';
|
||||
import { ShortReceiptNumberPipe } from '../../pipes/short-receipt-number.pipe';
|
||||
import { RemissionListComponentStore } from '../../remission-list/remission-list.component-store';
|
||||
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
||||
|
||||
export interface ShippingDocumentDetailsState {
|
||||
remissionStarted?: boolean;
|
||||
@@ -159,8 +160,16 @@ export class ShippingDocumentDetailsComponent extends ComponentStore<ShippingDoc
|
||||
}
|
||||
|
||||
async complete() {
|
||||
if (await this.completeReceipt()) {
|
||||
await this.completeReturn();
|
||||
if (!this.get((s) => s.packageNumber)) {
|
||||
const returnId = this.return.id;
|
||||
const firstReceiptId = this.firstReceipt?.id;
|
||||
this._router.navigate(['/filiale/remission', returnId, 'finish-shipping-document', firstReceiptId], {
|
||||
queryParams: { complete: true },
|
||||
});
|
||||
} else {
|
||||
if (await this.completeReceipt()) {
|
||||
await this.completeReturn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,6 +267,10 @@ export class ShippingDocumentDetailsComponent extends ComponentStore<ShippingDoc
|
||||
this.setReturn(r);
|
||||
|
||||
this.addOrUpdateBreadcrumbIfNotExists(r);
|
||||
|
||||
if (coerceBooleanProperty(this._activatedRoute.snapshot.queryParams?.complete)) {
|
||||
this.complete();
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
this.navigateBack();
|
||||
@@ -280,4 +293,27 @@ export class ShippingDocumentDetailsComponent extends ComponentStore<ShippingDoc
|
||||
...state,
|
||||
return: r,
|
||||
}));
|
||||
|
||||
continue(addQueryParams?: boolean) {
|
||||
const packageNumber = this.get((s) => s.packageNumber);
|
||||
const returnId = this.get((s) => s.return.id);
|
||||
|
||||
let queryParams = {};
|
||||
|
||||
if (addQueryParams) {
|
||||
queryParams = this._activatedRoute.snapshot.queryParams;
|
||||
}
|
||||
|
||||
if (!packageNumber) {
|
||||
const receiptId = this.firstReceipt?.id;
|
||||
this._router.navigate(['/filiale/remission', returnId, 'finish-shipping-document', receiptId], {
|
||||
queryParams,
|
||||
});
|
||||
} else {
|
||||
console.log('packageNumber', packageNumber);
|
||||
this._router.navigate(['/filiale/remission', returnId, packageNumber, 'list'], {
|
||||
queryParams,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
<button
|
||||
[uiOverlayTrigger]="preferredPickUpDatePicker"
|
||||
#preferredPickUpDatePickerTrigger="uiOverlayTrigger"
|
||||
[disabled]="(!isKulturpass && !!orderItem?.features?.paid) || (changeDateDisabled$ | async)"
|
||||
[disabled]="preferredPickUpDateDisabled$ | async"
|
||||
class="cta-pickup-preferred"
|
||||
>
|
||||
<strong *ngIf="preferredPickUpDate$ | async; let pickUpDate; else: selectTemplate">
|
||||
@@ -319,7 +319,7 @@
|
||||
<div *ngIf="!(changeDateLoader$ | async)" class="value">
|
||||
<button
|
||||
class="cta-datepicker"
|
||||
[disabled]="changeDateDisabled$ | async"
|
||||
[disabled]="vslLieferdatumDisabled$ | async"
|
||||
[uiOverlayTrigger]="uiDatepicker"
|
||||
#datepicker="uiOverlayTrigger"
|
||||
>
|
||||
|
||||
@@ -12,12 +12,14 @@ import {
|
||||
import { CrmCustomerService } from '@domain/crm';
|
||||
import { DomainOmsService } from '@domain/oms';
|
||||
import { NotificationChannel } from '@swagger/checkout';
|
||||
import { KeyValueDTOOfStringAndString, OrderDTO, OrderItemListItemDTO } from '@swagger/oms';
|
||||
import { DBHOrderItemListItemDTO, KeyValueDTOOfStringAndString, OrderDTO, OrderItemListItemDTO } from '@swagger/oms';
|
||||
import { DateAdapter } from '@ui/common';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { BehaviorSubject, combineLatest } from 'rxjs';
|
||||
import { filter, first, map, shareReplay, switchMap } from 'rxjs/operators';
|
||||
import { SharedGoodsInOutOrderDetailsComponent } from '../goods-in-out-order-details.component';
|
||||
import { Config } from '@core/config';
|
||||
import { coerceArray } from '@angular/cdk/coercion';
|
||||
|
||||
@Component({
|
||||
selector: 'shared-goods-in-out-order-details-header',
|
||||
@@ -27,7 +29,7 @@ import { SharedGoodsInOutOrderDetailsComponent } from '../goods-in-out-order-det
|
||||
})
|
||||
export class SharedGoodsInOutOrderDetailsHeaderComponent implements OnChanges {
|
||||
@Output()
|
||||
editClick = new EventEmitter<OrderItemListItemDTO>();
|
||||
editClick = new EventEmitter<DBHOrderItemListItemDTO>();
|
||||
|
||||
@Input()
|
||||
order: OrderDTO;
|
||||
@@ -100,12 +102,37 @@ export class SharedGoodsInOutOrderDetailsHeaderComponent implements OnChanges {
|
||||
return !!this.order?.features && !!this.order?.features?.orderType;
|
||||
}
|
||||
|
||||
preferredPickUpDateDisabled$ = combineLatest([this.changeDateDisabled$, this.orderItem$]).pipe(
|
||||
map(([changeDateDisabled, orderItem]) => {
|
||||
if (changeDateDisabled) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((orderItem?.orderItemType & 1024) === 1024) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return !this.isKulturpass && !!orderItem?.features?.paid;
|
||||
})
|
||||
);
|
||||
|
||||
vslLieferdatumDisabled$ = combineLatest([this.changeDateDisabled$, this.orderItem$]).pipe(
|
||||
map(([changeDateDisabled, orderItem]) => {
|
||||
if (changeDateDisabled) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return (orderItem?.orderItemType & 1024) === 1024;
|
||||
})
|
||||
);
|
||||
|
||||
constructor(
|
||||
@Host() private host: SharedGoodsInOutOrderDetailsComponent,
|
||||
private customerService: CrmCustomerService,
|
||||
private dateAdapter: DateAdapter,
|
||||
private omsService: DomainOmsService,
|
||||
private cdr: ChangeDetectorRef
|
||||
private cdr: ChangeDetectorRef,
|
||||
private config: Config
|
||||
) {}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
|
||||
@@ -12,6 +12,7 @@ import { SharedGoodsInOutOrderDetailsCoversComponent } from './goods-in-out-orde
|
||||
import { SharedGoodsInOutOrderDetailsItemComponent } from './goods-in-out-order-details-item';
|
||||
import { SharedGoodsInOutOrderDetailsTagsComponent } from './goods-in-out-order-details-tags';
|
||||
import { SharedGoodsInOutOrderDetailsStore } from './goods-in-out-order-details.store';
|
||||
import { SharedGoodsInOutOrderDetailsHeaderComponent } from './goods-in-out-order-details-header';
|
||||
|
||||
@Component({
|
||||
selector: 'shared-goods-in-out-order-details',
|
||||
@@ -26,6 +27,9 @@ import { SharedGoodsInOutOrderDetailsStore } from './goods-in-out-order-details.
|
||||
],
|
||||
})
|
||||
export class SharedGoodsInOutOrderDetailsComponent extends SharedGoodsInOutOrderDetailsStore implements AfterContentInit, OnDestroy {
|
||||
@ContentChild(SharedGoodsInOutOrderDetailsHeaderComponent)
|
||||
orderDetailsHeaderComponent: SharedGoodsInOutOrderDetailsHeaderComponent;
|
||||
|
||||
@ContentChildren(SharedGoodsInOutOrderDetailsItemComponent)
|
||||
orderDetailsItemComponents: QueryList<SharedGoodsInOutOrderDetailsItemComponent>;
|
||||
|
||||
@@ -205,6 +209,7 @@ export class SharedGoodsInOutOrderDetailsComponent extends SharedGoodsInOutOrder
|
||||
action.command.includes('PRINT_PRICEDIFFQRCODELABEL') && !compartmentCode ? this.orderItems[0]?.compartmentCode : compartmentCode,
|
||||
itemQuantity: this.getItemQuantityMap(),
|
||||
receipts,
|
||||
order: this.orderDetailsHeaderComponent?.order,
|
||||
};
|
||||
try {
|
||||
commandData = await this.commandService.handleCommand(command, commandData);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { OnDestroy } from '@angular/core';
|
||||
import { ComponentStore } from '@ngrx/component-store';
|
||||
import { KeyValueDTOOfStringAndString, OrderItemListItemDTO, ReceiptDTO } from '@swagger/oms';
|
||||
import { DBHOrderItemListItemDTO, KeyValueDTOOfStringAndString, ReceiptDTO } from '@swagger/oms';
|
||||
import { isEqual } from 'lodash';
|
||||
import { combineLatest, Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
export interface SharedGoodsInOutOrderDetailsComponentState {
|
||||
orderItems: OrderItemListItemDTO[];
|
||||
coverItems: OrderItemListItemDTO[];
|
||||
orderItems: DBHOrderItemListItemDTO[];
|
||||
coverItems: DBHOrderItemListItemDTO[];
|
||||
receipts: ReceiptDTO[];
|
||||
compartmentInfo?: string;
|
||||
latestCompartmentCode?: string;
|
||||
@@ -26,7 +26,7 @@ export abstract class SharedGoodsInOutOrderDetailsStore extends ComponentStore<S
|
||||
get orderItems() {
|
||||
return this.get((s) => s.orderItems);
|
||||
}
|
||||
set orderItems(orderItems: OrderItemListItemDTO[]) {
|
||||
set orderItems(orderItems: DBHOrderItemListItemDTO[]) {
|
||||
if (!isEqual(this.orderItems, orderItems)) {
|
||||
this.patchState({ orderItems });
|
||||
}
|
||||
@@ -37,7 +37,7 @@ export abstract class SharedGoodsInOutOrderDetailsStore extends ComponentStore<S
|
||||
get coverItems() {
|
||||
return this.get((s) => s.coverItems);
|
||||
}
|
||||
set coverItems(coverItems: OrderItemListItemDTO[]) {
|
||||
set coverItems(coverItems: DBHOrderItemListItemDTO[]) {
|
||||
if (!isEqual(this.coverItems, coverItems)) {
|
||||
this.patchState({ coverItems });
|
||||
}
|
||||
@@ -162,7 +162,7 @@ export abstract class SharedGoodsInOutOrderDetailsStore extends ComponentStore<S
|
||||
});
|
||||
}
|
||||
|
||||
updateOrderItems(orderItems: OrderItemListItemDTO[]) {
|
||||
updateOrderItems(orderItems: DBHOrderItemListItemDTO[]) {
|
||||
this.patchState({
|
||||
orderItems: this.orderItems.map((item) => {
|
||||
const newItem = orderItems.find((i) => i.orderItemSubsetId === item.orderItemSubsetId);
|
||||
@@ -183,7 +183,7 @@ export abstract class SharedGoodsInOutOrderDetailsStore extends ComponentStore<S
|
||||
this.patchState({ selectedeOrderItemSubsetIds: this.orderItems?.map((item) => item.orderItemSubsetId) });
|
||||
}
|
||||
|
||||
selectOrderItem(item: OrderItemListItemDTO, selected: boolean) {
|
||||
selectOrderItem(item: DBHOrderItemListItemDTO, selected: boolean) {
|
||||
const included = this.selectedeOrderItemSubsetIds.includes(item?.orderItemSubsetId);
|
||||
|
||||
if (!included && selected) {
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
</div>
|
||||
|
||||
<ui-form-control label="Vormerker" variant="inline">
|
||||
<ui-select formControlName="isPrebooked">
|
||||
<ui-select formControlName="isPrebooked" readonly="true">
|
||||
<ui-select-option label="Ja" [value]="true"></ui-select-option>
|
||||
<ui-select-option label="Nein" [value]="false"></ui-select-option>
|
||||
</ui-select>
|
||||
|
||||
6
apps/shared/components/loader/ng-package.json
Normal file
6
apps/shared/components/loader/ng-package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "../../../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"lib": {
|
||||
"entryFile": "src/public-api.ts"
|
||||
}
|
||||
}
|
||||
11
apps/shared/components/loader/src/lib/loader.component.css
Normal file
11
apps/shared/components/loader/src/lib/loader.component.css
Normal file
@@ -0,0 +1,11 @@
|
||||
.shared-loader {
|
||||
@apply relative block h-full;
|
||||
}
|
||||
|
||||
.shared-loader__spinner {
|
||||
@apply absolute inset-0 flex items-center justify-center;
|
||||
}
|
||||
|
||||
.shared-loader__background {
|
||||
@apply bg-white bg-opacity-75;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<div class="shared-loader__spinner" *ngIf="showLoader" [class.shared-loader__background]="showBackground">
|
||||
<ui-icon class="animate-spin" icon="spinner" [size]="spinnerSizeInRem"></ui-icon>
|
||||
</div>
|
||||
<div [class.invisible]="showLoader && contentHidden">
|
||||
<ng-content></ng-content>
|
||||
</div>
|
||||
43
apps/shared/components/loader/src/lib/loader.component.ts
Normal file
43
apps/shared/components/loader/src/lib/loader.component.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import { BooleanInput, NumberInput, coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
||||
import { NgIf } from '@angular/common';
|
||||
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input } from '@angular/core';
|
||||
import { UiIconModule } from '@ui/icon';
|
||||
|
||||
@Component({
|
||||
selector: 'shared-loader',
|
||||
templateUrl: 'loader.component.html',
|
||||
styleUrls: ['loader.component.css'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
host: { class: 'shared-loader' },
|
||||
standalone: true,
|
||||
imports: [NgIf, UiIconModule],
|
||||
})
|
||||
export class LoaderComponent {
|
||||
@Input() loading: BooleanInput;
|
||||
|
||||
@Input() background: BooleanInput;
|
||||
|
||||
@Input() spinnerSize: NumberInput = 24;
|
||||
|
||||
@Input() hideContent: BooleanInput;
|
||||
|
||||
get showLoader() {
|
||||
console.log('showLoader', this.loading);
|
||||
return coerceBooleanProperty(this.loading);
|
||||
}
|
||||
|
||||
get showBackground() {
|
||||
return coerceBooleanProperty(this.background);
|
||||
}
|
||||
|
||||
get spinnerSizeInRem() {
|
||||
return coerceNumberProperty(this.spinnerSize) / 16 + 'rem';
|
||||
}
|
||||
|
||||
get contentHidden() {
|
||||
return coerceBooleanProperty(this.hideContent);
|
||||
}
|
||||
|
||||
constructor() {}
|
||||
}
|
||||
9
apps/shared/components/loader/src/lib/loader.module.ts
Normal file
9
apps/shared/components/loader/src/lib/loader.module.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { LoaderComponent } from './loader.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [LoaderComponent],
|
||||
exports: [LoaderComponent],
|
||||
})
|
||||
export class LoaderModule {}
|
||||
2
apps/shared/components/loader/src/public-api.ts
Normal file
2
apps/shared/components/loader/src/public-api.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './lib/loader.component';
|
||||
export * from './lib/loader.module';
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "../../../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"lib": {
|
||||
"entryFile": "src/public-api.ts"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { ItemDTO } from '@swagger/cat';
|
||||
import { ShoppingCartItemDTO } from '@swagger/checkout';
|
||||
|
||||
export function getCatalogProductNumber(item: ItemDTO);
|
||||
export function getCatalogProductNumber(item: ShoppingCartItemDTO);
|
||||
export function getCatalogProductNumber(item: ItemDTO | ShoppingCartItemDTO) {
|
||||
if (!item) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (item.product?.catalogProductNumber) {
|
||||
return item.product?.catalogProductNumber;
|
||||
}
|
||||
|
||||
return String(item.id);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
.details-wrapper {
|
||||
@apply grid px-4 py-2 gap-4;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<div class="details-wrapper">
|
||||
<div class="img-wrapper">
|
||||
<img class="rounded shadow w-20" [src]="item?.product?.ean | productImage" [alt]="item?.product?.name" />
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-sm">{{ item?.product?.contributors }}</div>
|
||||
<div class="font-bold">{{ item?.product?.name }}</div>
|
||||
<div class="font-bold mt-4 flex flex-row items-center">
|
||||
<img class="h-5 mr-2" [src]="iconSrc" [alt]="item?.product?.formatDetail" />
|
||||
<span>{{ item?.product?.formatDetail }}</span>
|
||||
</div>
|
||||
<div class="text-sm">{{ item?.product?.manufacturer }} | {{ item?.product?.ean }}</div>
|
||||
<div class="text-sm">{{ item?.product?.volume }} | {{ item?.product?.publicationDate | date }}</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<div class="font-bold text-xl mt-4">{{ item?.unitPrice?.value?.value | currency: 'EUR' }}</div>
|
||||
<div class="font-bold">
|
||||
<ui-quantity-dropdown [quantity]="itemQuantity$ | async" (quantityChange)="onQuantityChange($event)"></ui-quantity-dropdown>
|
||||
</div>
|
||||
<div class="relative">
|
||||
<div *ngIf="stockWarning$ | async" class="text-warning font-bold absolute right-0 top-0 whitespace-nowrap">
|
||||
Es befinden sich {{ availableQuantity$ | async }} Exemplare in der Filiale
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,43 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { Component, ChangeDetectionStrategy, Output, Input, EventEmitter } from '@angular/core';
|
||||
import { ProductImageModule } from '@cdn/product-image';
|
||||
import { provideComponentStore } from '@ngrx/component-store';
|
||||
import { ShoppingCartItemDTO } from '@swagger/checkout';
|
||||
import { UiQuantityDropdownModule } from '@ui/quantity-dropdown';
|
||||
import { KulturpassOrderItemStore } from './kulturpass-order-item.store';
|
||||
|
||||
@Component({
|
||||
selector: 'shared-kulturpass-order-item',
|
||||
templateUrl: 'kulturpass-order-item.component.html',
|
||||
styleUrls: ['kulturpass-order-item.component.css'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
host: { class: 'shared-kulturpass-order-item' },
|
||||
standalone: true,
|
||||
imports: [ProductImageModule, CommonModule, UiQuantityDropdownModule],
|
||||
providers: [provideComponentStore(KulturpassOrderItemStore)],
|
||||
})
|
||||
export class KulturpassOrderItemComponent {
|
||||
@Input()
|
||||
set item(item: ShoppingCartItemDTO) {
|
||||
this._store.updateItem(item);
|
||||
}
|
||||
get item() {
|
||||
return this._store.item;
|
||||
}
|
||||
|
||||
itemQuantity$ = this._store.itemQuantity$;
|
||||
|
||||
get iconSrc() {
|
||||
return `/assets/images/Icon_${this.item?.product?.format}.svg`;
|
||||
}
|
||||
|
||||
stockWarning$ = this._store.stockWarning$;
|
||||
|
||||
availableQuantity$ = this._store.availableQuantity$;
|
||||
|
||||
constructor(private _store: KulturpassOrderItemStore) {}
|
||||
|
||||
onQuantityChange(quantity: number) {
|
||||
this._store.updateQuantity(quantity);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
import { ComponentStore } from '@ngrx/component-store';
|
||||
import { ShoppingCartItemDTO, AvailabilityDTO } from '@swagger/checkout';
|
||||
import { DomainAvailabilityService } from '@domain/availability';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { KulturpassOrderModalStore } from '../kulturpass-order-modal.store';
|
||||
import { getCatalogProductNumber } from '../catalog-product-number';
|
||||
import { map, switchMap } from 'rxjs/operators';
|
||||
import { combineLatest } from 'rxjs';
|
||||
|
||||
export interface KulturpassOrderItemState {
|
||||
item: ShoppingCartItemDTO;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class KulturpassOrderItemStore extends ComponentStore<KulturpassOrderItemState> {
|
||||
get item() {
|
||||
return this.get((s) => s.item);
|
||||
}
|
||||
|
||||
get availability() {
|
||||
return this._parentStore.getAvailability(getCatalogProductNumber(this.item));
|
||||
}
|
||||
|
||||
constructor(private _parentStore: KulturpassOrderModalStore, private _availabilityService: DomainAvailabilityService) {
|
||||
super({ item: null });
|
||||
}
|
||||
|
||||
readonly item$ = this.select((state) => state.item);
|
||||
|
||||
readonly updateItem = this.updater((state, item: ShoppingCartItemDTO) => {
|
||||
return { ...state, item };
|
||||
});
|
||||
|
||||
readonly itemQuantity$ = this.select((state) => state.item?.quantity ?? 0);
|
||||
|
||||
readonly availability$ = this.item$.pipe(switchMap((item) => this._parentStore.getAvailability$(getCatalogProductNumber(item))));
|
||||
|
||||
readonly availableQuantity$ = this.availability$.pipe(map((availability) => availability?.inStock ?? 0));
|
||||
|
||||
readonly stockWarning$ = combineLatest([this.availability$, this.itemQuantity$]).pipe(
|
||||
map(([availability, quantity]) => {
|
||||
if (!availability) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return availability.inStock < quantity;
|
||||
})
|
||||
);
|
||||
|
||||
updateQuantity(quantity: number) {
|
||||
this._parentStore.quantityChange({ ...this.item, quantity });
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
:host {
|
||||
@apply block;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
@apply grid max-h-[calc(100vh-8rem)] h-[calc(100vh-8rem)];
|
||||
grid-template-rows: repeat(4, auto) 1fr auto;
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<shared-loader [loading]="fetchShoppingCart$ | async" background="true" spinnerSize="36">
|
||||
<div class="wrapper">
|
||||
<div>
|
||||
<h1 class="text-center text-2xl font-bold">Kulturpass Warenkorb</h1>
|
||||
<p class="text-center text-lg">Bitte scannen Sie Artikel, um den Code einzulösen.</p>
|
||||
</div>
|
||||
<div>
|
||||
<shared-kulturpass-order-searchbox></shared-kulturpass-order-searchbox>
|
||||
</div>
|
||||
<div class="border-y border-solid border-[#EFF1F5] py-3 px-4 -mx-4 flex flex-row items-center">
|
||||
<div class="w-[6.875rem]">
|
||||
Wertgutschein
|
||||
</div>
|
||||
<div class="ml-4 font-bold">
|
||||
{{ kulturpassCode$ | async }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="border-b border-solid border-[#EFF1F5] py-3 px-4 -mx-4 flex flex-row items-center">
|
||||
<div class="w-[6.875rem]">
|
||||
Filiale
|
||||
</div>
|
||||
<div class="ml-4 font-bold">
|
||||
{{ branch$ | async | branchName: 'name-address' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="overflow-y-auto -mx-4 scroll-bar">
|
||||
<div *ngIf="emptyShoppingCart$ | async" class="h-full grid items-center justify-center">
|
||||
<h3 class="text-xl font-bold text-center text-gray-500">
|
||||
Warenkorb ist leer, bitte suchen oder scannen <br />
|
||||
Sie Artikel um den Warenkob zu füllen.
|
||||
</h3>
|
||||
</div>
|
||||
<shared-kulturpass-order-item
|
||||
class="border-b border-solid border-[#EFF1F5]"
|
||||
*ngFor="let item of items$ | async; trackBy: trackItemById"
|
||||
[item]="item"
|
||||
>
|
||||
</shared-kulturpass-order-item>
|
||||
</div>
|
||||
<div class="flex flex-row justify-evenly items-stretch border-t border-solid border-[#EFF1F5] py-3 px-4 -mx-4">
|
||||
<div class="grid grid-flow-row text-xl">
|
||||
<div class="grid grid-cols-2 gap-5">
|
||||
<div>Guthaben</div>
|
||||
<div class="font-bold text-right">{{ credit$ | async | currency: 'EUR' }}</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-5">
|
||||
<div>Summe</div>
|
||||
<div class="font-bold text-right">{{ total$ | async | currency: 'EUR' }}</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-5">
|
||||
<div>Restbetrag</div>
|
||||
<div class="font-bold text-right" [class.text-brand]="negativeBalance$ | async">{{ balance$ | async | currency: 'EUR' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid items-end justify-between">
|
||||
<div *ngIf="negativeBalance$ | async" class="text-xl text-warning font-bold text-center">
|
||||
Der Betrag übersteigt ihr Guthaben
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="bg-brand text-white px-6 py-3 font-bold rounded-full disabled:bg-disabled-branch disabled:text-active-branch"
|
||||
[disabled]="orderButtonDisabled$ | async"
|
||||
(click)="order()"
|
||||
>
|
||||
<shared-loader [loading]="ordering$ | async" hideContent="true">
|
||||
Kauf abschließen und Rechnung drucken
|
||||
</shared-loader>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</shared-loader>
|
||||
@@ -0,0 +1,96 @@
|
||||
import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';
|
||||
import { KulturpassOrderSearchboxComponent } from './kulturpass-order-searchbox/kulturpass-order-searchbox.component';
|
||||
import { provideComponentStore } from '@ngrx/component-store';
|
||||
import { KulturpassOrderModalStore } from './kulturpass-order-modal.store';
|
||||
import { UiModalRef } from '@ui/modal';
|
||||
import { KulturpassOrderModalData } from './kulturpass-order-modal.data';
|
||||
import { AddToShoppingCartDTO, ShoppingCartItemDTO } from '@swagger/checkout';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { BranchNamePipe } from '@shared/pipes/branch';
|
||||
import { combineLatest } from 'rxjs';
|
||||
import { KulturpassOrderItemComponent } from './kulturpass-order-item/kulturpass-order-item.component';
|
||||
import { LoaderComponent } from '@shared/components/loader';
|
||||
import { DisplayOrderDTO, KeyValueDTOOfStringAndString } from '@swagger/oms';
|
||||
import { getCatalogProductNumber } from './catalog-product-number';
|
||||
@Component({
|
||||
selector: 'shared-kulturpass-order-modal',
|
||||
templateUrl: 'kulturpass-order-modal.component.html',
|
||||
styleUrls: ['kulturpass-order-modal.component.css'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
host: { class: 'shared-kulturpass-order-modal' },
|
||||
standalone: true,
|
||||
imports: [KulturpassOrderSearchboxComponent, CommonModule, BranchNamePipe, KulturpassOrderItemComponent, LoaderComponent],
|
||||
providers: [provideComponentStore(KulturpassOrderModalStore)],
|
||||
})
|
||||
export class KulturpassOrderModalComponent implements OnInit {
|
||||
branch$ = this._store.branch$;
|
||||
|
||||
fetchShoppingCart$ = this._store.fetchShoppingCart$;
|
||||
|
||||
items$ = this._store.shoppingCart$.pipe(map((shoppingCart) => shoppingCart?.items?.map((item) => item.data) ?? []));
|
||||
|
||||
trackItemById = (index: number, item: ShoppingCartItemDTO) => item.id;
|
||||
|
||||
kulturpassCode$ = this._store.orderItemListItem$.pipe(map((orderItemListItem) => orderItemListItem.buyerNumber));
|
||||
|
||||
credit$ = this._store.orderItemListItem$.pipe(map((orderItemListItem) => orderItemListItem?.retailPrice?.value?.value ?? 0));
|
||||
|
||||
total$ = this._store.shoppingCart$.pipe(map((shoppingCart) => shoppingCart?.total?.value ?? 0));
|
||||
|
||||
balance$ = combineLatest([this.credit$, this.total$]).pipe(map(([credit, total]) => credit - total));
|
||||
|
||||
negativeBalance$ = this.balance$.pipe(map((balance) => balance < 0));
|
||||
|
||||
emptyShoppingCart$ = this.items$.pipe(map((items) => items.length === 0));
|
||||
|
||||
ordering$ = this._store.ordering$;
|
||||
|
||||
hasShoppingCartItemWithoutStock$ = this.items$.pipe(
|
||||
map((items) =>
|
||||
items.some((item) => {
|
||||
const availability = this._store.getAvailability(getCatalogProductNumber(item));
|
||||
return availability?.inStock < item.quantity;
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
orderButtonDisabled$ = combineLatest([
|
||||
this.emptyShoppingCart$,
|
||||
this.negativeBalance$,
|
||||
this.ordering$,
|
||||
this.hasShoppingCartItemWithoutStock$,
|
||||
]).pipe(
|
||||
map(
|
||||
([emptyShoppingCart, negativeBalance, ordering, hasShoppingCartItemWithoutStock]) =>
|
||||
emptyShoppingCart || negativeBalance || ordering || hasShoppingCartItemWithoutStock
|
||||
)
|
||||
);
|
||||
|
||||
constructor(
|
||||
private _modalRef: UiModalRef<[DisplayOrderDTO, string], KulturpassOrderModalData>,
|
||||
private _store: KulturpassOrderModalStore
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this._store.updateOrder(this._modalRef.data.order);
|
||||
this._store.createShoppingCart(this._modalRef.data.orderItemListItem);
|
||||
}
|
||||
|
||||
addToShoppingCart(addToShoppingCart: AddToShoppingCartDTO) {
|
||||
this._store.addItem(addToShoppingCart);
|
||||
}
|
||||
|
||||
quantityChange(shoppingCartItem: ShoppingCartItemDTO) {
|
||||
this._store.quantityChange(shoppingCartItem);
|
||||
}
|
||||
|
||||
order() {
|
||||
this._store.onOrderSuccess = async (displayOrder: DisplayOrderDTO, action: KeyValueDTOOfStringAndString[]) => {
|
||||
const command = action.map((action) => action.command).join('|');
|
||||
|
||||
this._modalRef.close([displayOrder, command]);
|
||||
};
|
||||
this._store.orderItems();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { OrderItemListItemDTO, OrderDTO } from '@swagger/oms';
|
||||
|
||||
export interface KulturpassOrderModalData {
|
||||
/**
|
||||
* Guthaben des Kulturpasses
|
||||
*/
|
||||
orderItemListItem: OrderItemListItemDTO;
|
||||
|
||||
order: OrderDTO;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { KulturpassOrderModalComponent } from './kulturpass-order-modal.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [KulturpassOrderModalComponent],
|
||||
exports: [KulturpassOrderModalComponent],
|
||||
})
|
||||
export class KulturpassOrderModalModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { UiModalRef, UiModalService } from '@ui/modal';
|
||||
import { KulturpassOrderModalData } from './kulturpass-order-modal.data';
|
||||
import { KulturpassOrderModalComponent } from './kulturpass-order-modal.component';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { DisplayOrderDTO } from '@swagger/oms';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class KulturpassOrderModalService {
|
||||
constructor(private modal: UiModalService) {}
|
||||
|
||||
open(data: KulturpassOrderModalData): UiModalRef<[DisplayOrderDTO, string], KulturpassOrderModalData> {
|
||||
return this.modal.open<[DisplayOrderDTO, string], KulturpassOrderModalData>({
|
||||
content: KulturpassOrderModalComponent,
|
||||
data,
|
||||
config: {
|
||||
backdropClose: false,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,326 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ComponentStore, OnStoreInit, tapResponse } from '@ngrx/component-store';
|
||||
import { AddToShoppingCartDTO, AvailabilityDTO, BranchDTO, CheckoutDTO, ShoppingCartDTO, ShoppingCartItemDTO } from '@swagger/checkout';
|
||||
import { DomainCheckoutService } from '@domain/checkout';
|
||||
import { catchError, mergeMap, switchMap, tap, withLatestFrom } from 'rxjs/operators';
|
||||
import {
|
||||
BranchService,
|
||||
DisplayOrderDTO,
|
||||
KeyValueDTOOfStringAndString,
|
||||
OrderDTO,
|
||||
OrderItemListItemDTO,
|
||||
ResponseArgsOfIEnumerableOfBranchDTO,
|
||||
ResponseArgsOfValueTupleOfIEnumerableOfDisplayOrderDTOAndIEnumerableOfKeyValueDTOOfStringAndString,
|
||||
} from '@swagger/oms';
|
||||
import { Observable, of, zip } from 'rxjs';
|
||||
import { AuthService } from '@core/auth';
|
||||
import { UiModalService } from '@ui/modal';
|
||||
import { getCatalogProductNumber } from './catalog-product-number';
|
||||
import { ItemDTO } from '@swagger/cat';
|
||||
import { DomainAvailabilityService } from '@domain/availability';
|
||||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
|
||||
export interface KulturpassOrderModalState {
|
||||
orderItemListItem?: OrderItemListItemDTO;
|
||||
shoppingCart?: ShoppingCartDTO;
|
||||
fetchShoppingCart?: boolean;
|
||||
branch?: BranchDTO;
|
||||
order?: OrderDTO;
|
||||
ordering?: boolean;
|
||||
availabilities: Record<string, AvailabilityDTO>;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class KulturpassOrderModalStore extends ComponentStore<KulturpassOrderModalState> implements OnStoreInit {
|
||||
readonly processId = Date.now();
|
||||
|
||||
get orderItemListItem() {
|
||||
return this.get((s) => s.orderItemListItem);
|
||||
}
|
||||
|
||||
get shoppingCart() {
|
||||
return this.get((s) => s.shoppingCart);
|
||||
}
|
||||
|
||||
get branch() {
|
||||
return this.get((s) => s.branch);
|
||||
}
|
||||
|
||||
get order() {
|
||||
return this.get((s) => s.order);
|
||||
}
|
||||
|
||||
get fetchShoppingCart() {
|
||||
return this.get((s) => s.fetchShoppingCart);
|
||||
}
|
||||
|
||||
constructor(
|
||||
private _checkoutService: DomainCheckoutService,
|
||||
private _branchService: BranchService,
|
||||
private _authService: AuthService,
|
||||
private _availabilityService: DomainAvailabilityService,
|
||||
private _modal: UiModalService
|
||||
) {
|
||||
super({
|
||||
availabilities: {},
|
||||
});
|
||||
}
|
||||
|
||||
ngrxOnStoreInit = () => {
|
||||
this.loadBranch();
|
||||
};
|
||||
|
||||
readonly orderItemListItem$ = this.select((state) => state.orderItemListItem);
|
||||
|
||||
readonly shoppingCart$ = this.select((state) => state.shoppingCart);
|
||||
|
||||
readonly branch$ = this.select((state) => state.branch);
|
||||
|
||||
readonly order$ = this.select((state) => state.order);
|
||||
|
||||
readonly updateCheckout = this.updater((state, checkout: CheckoutDTO) => ({ ...state, checkout }));
|
||||
|
||||
readonly updateOrder = this.updater((state, order: OrderDTO) => ({ ...state, order }));
|
||||
|
||||
readonly fetchShoppingCart$ = this.select((state) => state.fetchShoppingCart);
|
||||
|
||||
readonly updateFetchShoppingCart = this.updater((state, fetchShoppingCart: boolean) => ({ ...state, fetchShoppingCart }));
|
||||
|
||||
readonly ordering$ = this.select((state) => state.ordering);
|
||||
|
||||
loadBranch = this.effect(($) =>
|
||||
$.pipe(switchMap(() => this._branchService.BranchGetBranches({}).pipe(tapResponse(this.handleBranchResponse, this.handleBranchError))))
|
||||
);
|
||||
|
||||
handleBranchResponse = (res: ResponseArgsOfIEnumerableOfBranchDTO) => {
|
||||
const branchNumber = this._authService.getClaimByKey('branch_no');
|
||||
|
||||
this.patchState({ branch: res.result.find((b) => b.branchNumber === branchNumber) });
|
||||
};
|
||||
|
||||
handleBranchError = (err) => {
|
||||
this._modal.error('Fehler beim Laden der Filiale', err);
|
||||
};
|
||||
|
||||
createShoppingCart = this.effect((orderItemListItem$: Observable<OrderItemListItemDTO>) =>
|
||||
orderItemListItem$.pipe(
|
||||
tap((orderItemListItem) => {
|
||||
this.patchState({ orderItemListItem });
|
||||
this.updateFetchShoppingCart(true);
|
||||
}),
|
||||
switchMap((orderItemListItem) =>
|
||||
this._checkoutService
|
||||
.getShoppingCart({ processId: this.processId })
|
||||
.pipe(tapResponse(this.handleCreateShoppingCartResponse, this.handleCreateShoppingCartError))
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
handleCreateShoppingCartResponse = (res: ShoppingCartDTO) => {
|
||||
this.patchState({ shoppingCart: res });
|
||||
this._checkoutService.setBuyer({ processId: this.processId, buyer: this.order.buyer });
|
||||
this._checkoutService.setPayer({ processId: this.processId, payer: this.order.billing?.data });
|
||||
|
||||
this.updateFetchShoppingCart(false);
|
||||
};
|
||||
|
||||
handleCreateShoppingCartError = (err: any) => {
|
||||
this._modal.error('Fehler beim Laden des Warenkorbs', err);
|
||||
|
||||
this.updateFetchShoppingCart(false);
|
||||
};
|
||||
|
||||
addItem = this.effect((add$: Observable<AddToShoppingCartDTO>) =>
|
||||
add$.pipe(
|
||||
switchMap((add) =>
|
||||
this._checkoutService
|
||||
.addItemToShoppingCart({
|
||||
processId: this.processId,
|
||||
items: [add],
|
||||
})
|
||||
.pipe(tapResponse(this.handleAddItemResponse, this.handleAddItemError))
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
handleAddItemResponse = (res: ShoppingCartDTO) => {};
|
||||
|
||||
handleAddItemError = (err: any) => {
|
||||
this._modal.error('Fehler beim Hinzufügen des Artikels', err);
|
||||
};
|
||||
|
||||
quantityChange = this.effect((change$: Observable<ShoppingCartItemDTO>) =>
|
||||
change$.pipe(
|
||||
switchMap((change) =>
|
||||
this._checkoutService
|
||||
.updateItemInShoppingCart({
|
||||
processId: this.processId,
|
||||
shoppingCartItemId: change.id,
|
||||
update: { quantity: change.quantity },
|
||||
})
|
||||
.pipe(tapResponse(this.handleQuantityChangeResponse, this.handleQuantityChangeError))
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
handleQuantityChangeResponse = (res: ShoppingCartDTO) => {};
|
||||
|
||||
handleQuantityChangeError = (err: any) => {
|
||||
this._modal.error('Fehler beim Ändern der Menge', err);
|
||||
};
|
||||
|
||||
orderItems = this.effect(($: Observable<void>) =>
|
||||
$.pipe(
|
||||
tap(() => this.patchState({ ordering: true })),
|
||||
withLatestFrom(this.orderItemListItem$),
|
||||
switchMap(([_, orderItemListItem]) =>
|
||||
this._checkoutService
|
||||
.completeKulturpassOrder({
|
||||
processId: this.processId,
|
||||
orderItemSubsetId: orderItemListItem.orderItemSubsetId,
|
||||
})
|
||||
.pipe(tapResponse(this.handleOrderResponse, this.handleOrderError))
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
handleOrderResponse = (res: ResponseArgsOfValueTupleOfIEnumerableOfDisplayOrderDTOAndIEnumerableOfKeyValueDTOOfStringAndString) => {
|
||||
this.onOrderSuccess(res.result.item1[0], res.result.item2);
|
||||
};
|
||||
|
||||
onOrderSuccess = (displayOrder: DisplayOrderDTO, action: KeyValueDTOOfStringAndString[]) => {};
|
||||
|
||||
handleOrderError = (err: any) => {
|
||||
this._modal.error('Fehler beim Bestellen', err);
|
||||
this.patchState({ ordering: false });
|
||||
};
|
||||
|
||||
itemQuantityByCatalogProductNumber(catalogProductNumber: string) {
|
||||
return this.shoppingCart?.items?.find((i) => getCatalogProductNumber(i?.data) === catalogProductNumber)?.data?.quantity ?? 0;
|
||||
}
|
||||
|
||||
addItemToShoppingCart = this.effect((item$: Observable<ItemDTO>) =>
|
||||
item$.pipe(
|
||||
mergeMap((item) => {
|
||||
const takeAwayAvailability$ = this._availabilityService.getTakeAwayAvailability({
|
||||
item: {
|
||||
ean: item.product.ean,
|
||||
itemId: item.id,
|
||||
price: item.catalogAvailability.price,
|
||||
},
|
||||
quantity: this.itemQuantityByCatalogProductNumber(getCatalogProductNumber(item)) + 1,
|
||||
});
|
||||
|
||||
const deliveryAvailability$ = this._availabilityService
|
||||
.getDeliveryAvailability({
|
||||
item: {
|
||||
ean: item.product.ean,
|
||||
itemId: item.id,
|
||||
price: item.catalogAvailability.price,
|
||||
},
|
||||
quantity: this.itemQuantityByCatalogProductNumber(getCatalogProductNumber(item)) + 1,
|
||||
})
|
||||
.pipe(
|
||||
catchError((err) => {
|
||||
return of(undefined);
|
||||
})
|
||||
);
|
||||
|
||||
return zip(takeAwayAvailability$, deliveryAvailability$).pipe(
|
||||
tapResponse(this.handleAddItemToShoppingCartResponse2(item), this.handleAddItemToShoppingCartError)
|
||||
);
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
handleAddItemToShoppingCartResponse2 = (item: ItemDTO) => ([takeAwayAvailability, deliveryAvailability]: [
|
||||
AvailabilityDTO,
|
||||
AvailabilityDTO
|
||||
]) => {
|
||||
const isPriceMaintained = deliveryAvailability['priceMaintained'] ?? false;
|
||||
const offlinePrice = takeAwayAvailability.price?.value?.value ?? -1;
|
||||
const onlinePrice = deliveryAvailability?.price?.value?.value ?? -1;
|
||||
|
||||
const availability = takeAwayAvailability;
|
||||
|
||||
/**
|
||||
* Onlinepreis ist niedliger als der Offlinepreis
|
||||
* wenn der Artikel nicht Preisgebunden ist, wird der Onlinepreis genommen
|
||||
* wenn der Artikel Preisgebunden ist, wird der Ladenpreis verwendet
|
||||
*/
|
||||
|
||||
/**
|
||||
* Offlinepreis ist niedliger als der Onlinepreis
|
||||
* wenn der Artikel nicht Preisgebunden ist, wird der Ladenpreis genommen
|
||||
* wenn der Artikel Preisgebunden ist, wird der Ladenpreis verwendet
|
||||
*/
|
||||
|
||||
if (onlinePrice < offlinePrice && !isPriceMaintained) {
|
||||
availability.price = deliveryAvailability.price;
|
||||
}
|
||||
|
||||
this.setAvailability({
|
||||
catalogProductNumber: getCatalogProductNumber(item),
|
||||
availability: availability,
|
||||
});
|
||||
|
||||
const addToShoppingCartDTO: AddToShoppingCartDTO = {
|
||||
quantity: 1,
|
||||
availability: availability,
|
||||
destination: {
|
||||
data: {
|
||||
target: 1,
|
||||
targetBranch: { id: this.branch.id },
|
||||
},
|
||||
},
|
||||
promotion: {
|
||||
points: 0,
|
||||
},
|
||||
itemType: item.type,
|
||||
product: { catalogProductNumber: getCatalogProductNumber(item), ...item.product },
|
||||
};
|
||||
|
||||
this.addItem(addToShoppingCartDTO);
|
||||
};
|
||||
|
||||
// handleAddItemToShoppingCartResponse = (item: ItemDTO) => (availability: AvailabilityDTO) => {
|
||||
// this.setAvailability({
|
||||
// catalogProductNumber: getCatalogProductNumber(item),
|
||||
// availability: availability,
|
||||
// });
|
||||
|
||||
// const addToShoppingCartDTO: AddToShoppingCartDTO = {
|
||||
// quantity: 1,
|
||||
// availability: availability,
|
||||
// destination: {
|
||||
// data: {
|
||||
// target: 1,
|
||||
// targetBranch: { id: this.branch.id },
|
||||
// },
|
||||
// },
|
||||
// promotion: {
|
||||
// points: 0,
|
||||
// },
|
||||
// itemType: item.type,
|
||||
// product: { catalogProductNumber: getCatalogProductNumber(item), ...item.product },
|
||||
// };
|
||||
|
||||
// this.addItem(addToShoppingCartDTO);
|
||||
// };
|
||||
|
||||
handleAddItemToShoppingCartError = (err: any) => {
|
||||
this._modal.error('Fehler beim Hinzufügen des Artikels', err);
|
||||
};
|
||||
|
||||
setAvailability = this.updater((state, data: { catalogProductNumber: string; availability: AvailabilityDTO }) => {
|
||||
return { ...state, availabilities: { ...state.availabilities, [data.catalogProductNumber]: data.availability } };
|
||||
});
|
||||
|
||||
getAvailability(catalogProductNumber: string): AvailabilityDTO | undefined {
|
||||
return this.get((state) => state.availabilities[catalogProductNumber]);
|
||||
}
|
||||
|
||||
getAvailability$(catalogProductNumber: string): Observable<AvailabilityDTO | undefined> {
|
||||
return this.select((state) => state.availabilities[catalogProductNumber]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<ui-searchbox
|
||||
class="max-w-lg mx-auto my-6"
|
||||
placeholder="EAN / ISBN"
|
||||
[formControl]="queryControl"
|
||||
[scanner]="true"
|
||||
[focusAfterViewInit]="true"
|
||||
[loading]="fetching$ | async"
|
||||
(search)="search($event)"
|
||||
(scan)="search($event)"
|
||||
[hint]="hint$ | async"
|
||||
>
|
||||
</ui-searchbox>
|
||||
@@ -0,0 +1,51 @@
|
||||
import { Component, ChangeDetectionStrategy, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
|
||||
import { UiSearchboxNextModule } from '@ui/searchbox';
|
||||
import { KulturpassOrderSearchboxStore } from './kulturpass-order-searchbox.store';
|
||||
import { provideComponentStore } from '@ngrx/component-store';
|
||||
import { Subject } from 'rxjs';
|
||||
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'shared-kulturpass-order-searchbox',
|
||||
templateUrl: 'kulturpass-order-searchbox.component.html',
|
||||
styleUrls: ['kulturpass-order-searchbox.component.css'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
host: { class: 'shared-kulturpass-order-searchbox' },
|
||||
standalone: true,
|
||||
imports: [UiSearchboxNextModule, ReactiveFormsModule, CommonModule],
|
||||
providers: [provideComponentStore(KulturpassOrderSearchboxStore)],
|
||||
})
|
||||
export class KulturpassOrderSearchboxComponent implements OnInit, OnDestroy {
|
||||
private _onDestroy$ = new Subject<void>();
|
||||
|
||||
queryControl = new FormControl(this._store.query);
|
||||
|
||||
fetching$ = this._store.fetching$;
|
||||
|
||||
hint$ = this._store.hint$;
|
||||
|
||||
constructor(private _store: KulturpassOrderSearchboxStore, private _cdr: ChangeDetectorRef) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this._store.query$.pipe(takeUntil(this._onDestroy$)).subscribe((query) => {
|
||||
if (this.queryControl.value === query) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.queryControl.setValue(query);
|
||||
this._cdr.markForCheck();
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this._onDestroy$.next();
|
||||
this._onDestroy$.complete();
|
||||
}
|
||||
|
||||
search(query: string) {
|
||||
this._store.updateQuery(query);
|
||||
this._store.search();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ComponentStore, OnStoreInit, tapResponse } from '@ngrx/component-store';
|
||||
import { ItemDTO, ResponseArgsOfItemDTO } from '@swagger/cat';
|
||||
import { switchMap, withLatestFrom } from 'rxjs/operators';
|
||||
import { Observable, Subject, asapScheduler } from 'rxjs';
|
||||
import { DomainAvailabilityService } from '@domain/availability';
|
||||
import { DomainCatalogService } from '@domain/catalog';
|
||||
import { AddToShoppingCartDTO, AvailabilityDTO, BranchDTO } from '@swagger/checkout';
|
||||
import { tap } from 'rxjs/operators';
|
||||
import { UiModalService } from '@ui/modal';
|
||||
import { KulturpassOrderModalStore } from '../kulturpass-order-modal.store';
|
||||
import { getCatalogProductNumber } from '../catalog-product-number';
|
||||
|
||||
export interface KulturpassOrderSearchboxState {
|
||||
query: string;
|
||||
fetching: boolean;
|
||||
branch?: BranchDTO;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class KulturpassOrderSearchboxStore extends ComponentStore<KulturpassOrderSearchboxState> implements OnStoreInit {
|
||||
get query() {
|
||||
return this.get((s) => s.query);
|
||||
}
|
||||
|
||||
get fetching() {
|
||||
return this.get((s) => s.fetching);
|
||||
}
|
||||
|
||||
get branch() {
|
||||
return this.get((s) => s.branch);
|
||||
}
|
||||
|
||||
addToShoppingCart$ = new Subject<AddToShoppingCartDTO>();
|
||||
|
||||
hint$ = new Subject<string>();
|
||||
|
||||
constructor(
|
||||
private _parentStore: KulturpassOrderModalStore,
|
||||
private _catalogService: DomainCatalogService,
|
||||
private _availabilityService: DomainAvailabilityService,
|
||||
private _modal: UiModalService
|
||||
) {
|
||||
super({ query: '', fetching: false });
|
||||
}
|
||||
|
||||
readonly query$ = this.select((state) => state.query);
|
||||
|
||||
readonly updateQuery = this.updater((state, query: string) => ({ ...state, query }));
|
||||
|
||||
readonly fetching$ = this.select((state) => state.fetching);
|
||||
|
||||
readonly updateFetching = this.updater((state, fetching: boolean) => ({ ...state, fetching }));
|
||||
|
||||
readonly branch$ = this.select((state) => state.branch);
|
||||
|
||||
readonly updateBranch = this.updater((state, branch: BranchDTO) => ({ ...state, branch }));
|
||||
|
||||
ngrxOnStoreInit = () => {
|
||||
this.loadBranch();
|
||||
};
|
||||
|
||||
loadBranch = this.effect(($) =>
|
||||
$.pipe(
|
||||
switchMap(() => this._availabilityService.getDefaultBranch().pipe(tapResponse(this.handleBranchResponse, this.handleBranchError)))
|
||||
)
|
||||
);
|
||||
|
||||
handleBranchResponse = (res: BranchDTO) => {
|
||||
this.patchState({ branch: res });
|
||||
};
|
||||
|
||||
handleBranchError = (err) => {
|
||||
this._modal.error('Fehler beim Laden der Filiale', err);
|
||||
};
|
||||
|
||||
readonly search = this.effect(($) =>
|
||||
$.pipe(
|
||||
tap(() => this.patchState({ fetching: true })),
|
||||
withLatestFrom(this.query$),
|
||||
switchMap(([_, query]) =>
|
||||
this._catalogService.getDetailsByEan({ ean: query?.trim() }).pipe(tapResponse(this.handleSearchResponse, this.handleSearchError))
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
handleSearchResponse = (res: ResponseArgsOfItemDTO) => {
|
||||
if (!res.result) {
|
||||
this.setHint('Artikel nicht gefunden');
|
||||
this.patchState({ fetching: false });
|
||||
return;
|
||||
}
|
||||
|
||||
this._parentStore.addItemToShoppingCart(res.result).add(() => {
|
||||
this.patchState({ query: '', fetching: false });
|
||||
});
|
||||
};
|
||||
|
||||
handleSearchError = (err) => {
|
||||
this.setHint('Artikel nicht gefunden');
|
||||
this.patchState({ fetching: false });
|
||||
};
|
||||
|
||||
setHint(hint: string) {
|
||||
this.hint$.next('');
|
||||
|
||||
asapScheduler.schedule(() => {
|
||||
this.hint$.next(hint);
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export * from './lib/kulturpass-order-modal.component';
|
||||
export * from './lib/kulturpass-order-modal.module';
|
||||
export * from './lib/kulturpass-order-modal.data';
|
||||
export * from './lib/kulturpass-order-modal.service';
|
||||
@@ -169,6 +169,12 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="canAddResult$ | async; let canAddResult">
|
||||
<span *ngIf="!canAddResult.canAdd" class="inline-block font-bold text-[#BE8100] mt-[14px] max-w-[19rem]">
|
||||
{{ canAddResult.message }}
|
||||
</span>
|
||||
</ng-container>
|
||||
|
||||
<span *ngIf="showMaxAvailableQuantity$ | async" class="font-bold text-[#BE8100] mt-[14px]">
|
||||
{{ (availability$ | async)?.inStock }} Exemplare sofort lieferbar
|
||||
</span>
|
||||
|
||||
@@ -268,16 +268,25 @@ export class PurchaseOptionsListItemComponent implements OnInit, OnDestroy, OnCh
|
||||
}
|
||||
|
||||
initPriceSubscription() {
|
||||
const sub = this.price$.subscribe((price) => {
|
||||
const sub = combineLatest([this.canEditPrice$, this.price$]).subscribe(([canEditPrice, price]) => {
|
||||
if (!canEditPrice) {
|
||||
return;
|
||||
}
|
||||
|
||||
const priceStr = this.stringifyPrice(price?.value?.value);
|
||||
if (priceStr === '') return;
|
||||
|
||||
if (this.parsePrice(this.priceFormControl.value) !== price?.value?.value) {
|
||||
debugger;
|
||||
this.priceFormControl.setValue(priceStr);
|
||||
}
|
||||
});
|
||||
|
||||
const valueChangesSub = this.priceFormControl.valueChanges.subscribe((value) => {
|
||||
const valueChangesSub = combineLatest([this.canEditPrice$, this.priceFormControl.valueChanges]).subscribe(([canEditPrice, value]) => {
|
||||
if (!canEditPrice) {
|
||||
return;
|
||||
}
|
||||
|
||||
const price = this._store.getPrice(this.item.id);
|
||||
const parsedPrice = this.parsePrice(value);
|
||||
|
||||
|
||||
@@ -5,13 +5,15 @@
|
||||
<div class="rounded p-4 shadow-card mt-4 grid grid-flow-col gap-4 justify-center items-center relative">
|
||||
<ng-container *ngIf="!(isDownloadOnly$ | async)">
|
||||
<ng-container *ngIf="!(isGiftCardOnly$ | async)">
|
||||
<app-in-store-purchase-options-tile> </app-in-store-purchase-options-tile>
|
||||
<app-pickup-purchase-options-tile> </app-pickup-purchase-options-tile>
|
||||
<app-in-store-purchase-options-tile *ngIf="showOption('in-store')"> </app-in-store-purchase-options-tile>
|
||||
<app-pickup-purchase-options-tile *ngIf="showOption('pickup')"></app-pickup-purchase-options-tile>
|
||||
</ng-container>
|
||||
<app-delivery-purchase-options-tile> </app-delivery-purchase-options-tile>
|
||||
<app-delivery-purchase-options-tile *ngIf="showOption('delivery')"></app-delivery-purchase-options-tile>
|
||||
</ng-container>
|
||||
|
||||
<app-download-purchase-options-tile *ngIf="hasDownload$ | async"> </app-download-purchase-options-tile>
|
||||
<ng-container *ngIf="hasDownload$ | async">
|
||||
<app-download-purchase-options-tile *ngIf="showOption('download')"> </app-download-purchase-options-tile>
|
||||
</ng-container>
|
||||
</div>
|
||||
<shared-purchase-options-list-header></shared-purchase-options-list-header>
|
||||
<div class="shared-purchase-options-modal__items -mx-4">
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
InStorePurchaseOptionTileComponent,
|
||||
PickupPurchaseOptionTileComponent,
|
||||
} from './purchase-options-tile';
|
||||
import { isGiftCard, Item, PurchaseOptionsStore } from './store';
|
||||
import { isGiftCard, Item, PurchaseOption, PurchaseOptionsStore } from './store';
|
||||
import { delay, map, shareReplay, skip, switchMap, takeUntil } from 'rxjs/operators';
|
||||
import { KeyValueDTOOfStringAndString } from '@swagger/cat';
|
||||
|
||||
@@ -97,6 +97,11 @@ export class PurchaseOptionsModalComponent implements OnInit, OnDestroy {
|
||||
this.items$.pipe(takeUntil(this._onDestroy$), skip(1), delay(100)).subscribe((items) => {
|
||||
if (items.length === 0) {
|
||||
this._uiModalRef.close();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!!this._uiModalRef.data?.preSelectOption?.option) {
|
||||
this.store.setPurchaseOption(this._uiModalRef.data?.preSelectOption?.option);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -108,6 +113,10 @@ export class PurchaseOptionsModalComponent implements OnInit, OnDestroy {
|
||||
|
||||
itemTrackBy: TrackByFunction<Item> = (_, item) => item.id;
|
||||
|
||||
showOption(option: PurchaseOption): boolean {
|
||||
return this._uiModalRef.data?.preSelectOption?.showOptionOnly ? this._uiModalRef.data?.preSelectOption?.option === option : true;
|
||||
}
|
||||
|
||||
async save(action: string) {
|
||||
if (this.saving) {
|
||||
return;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ItemDTO } from '@swagger/cat';
|
||||
import { ShoppingCartItemDTO, BranchDTO } from '@swagger/checkout';
|
||||
import { ActionType } from './store';
|
||||
import { ActionType, PurchaseOption } from './store';
|
||||
|
||||
export interface PurchaseOptionsModalData {
|
||||
processId: number;
|
||||
@@ -8,4 +8,5 @@ export interface PurchaseOptionsModalData {
|
||||
items: Array<ItemDTO | ShoppingCartItemDTO>;
|
||||
pickupBranch?: BranchDTO;
|
||||
inStoreBranch?: BranchDTO;
|
||||
preSelectOption?: { option: PurchaseOption; showOptionOnly?: boolean };
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ export function getCanAddForItemWithPurchaseOption(
|
||||
): (state: PurchaseOptionsState) => CanAdd {
|
||||
return (state: PurchaseOptionsState) => {
|
||||
const canAddResults = getCanAddResults(state);
|
||||
return canAddResults.find((ca) => ca.itemId === itemId && ca.purchaseOption === purchaseOption);
|
||||
return canAddResults.find((ca) => ca.canAdd && ca.itemId === itemId && ca.purchaseOption === purchaseOption);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -211,10 +211,12 @@ export function getPriceForPurchaseOption(
|
||||
purchaseOption: PurchaseOption
|
||||
): (state: PurchaseOptionsState) => PriceDTO & { fromCatalogue?: boolean } {
|
||||
return (state) => {
|
||||
const price = getPrices(state)[itemId];
|
||||
if (getCanEditPrice(itemId)(state)) {
|
||||
const price = getPrices(state)[itemId];
|
||||
|
||||
if (price) {
|
||||
return price;
|
||||
if (price) {
|
||||
return price;
|
||||
}
|
||||
}
|
||||
|
||||
const item = getItems(state).find((item) => item.id === itemId);
|
||||
|
||||
@@ -133,9 +133,9 @@ export class PurchaseOptionsService {
|
||||
};
|
||||
}
|
||||
|
||||
getDownloadDestination(): EntityDTOContainerOfDestinationDTO {
|
||||
getDownloadDestination(availability: AvailabilityDTO): EntityDTOContainerOfDestinationDTO {
|
||||
return {
|
||||
data: { target: 16 },
|
||||
data: { target: 16, logistician: availability?.logistician },
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -719,7 +719,7 @@ export class PurchaseOptionsStore extends ComponentStore<PurchaseOptionsState> {
|
||||
} else if (purchaseOption === 'in-store') {
|
||||
destination = this._service.getInStoreDestination(this.inStoreBranch);
|
||||
} else if (purchaseOption === 'download') {
|
||||
destination = this._service.getDownloadDestination();
|
||||
destination = this._service.getDownloadDestination(availability.data);
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -755,7 +755,7 @@ export class PurchaseOptionsStore extends ComponentStore<PurchaseOptionsState> {
|
||||
} else if (purchaseOption === 'in-store') {
|
||||
destination = this._service.getInStoreDestination(this.inStoreBranch);
|
||||
} else if (purchaseOption === 'download') {
|
||||
destination = this._service.getDownloadDestination();
|
||||
destination = this._service.getDownloadDestination(availability.data);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { BranchDTO } from '@swagger/checkout';
|
||||
|
||||
export type BranchNameFormat = 'key' | 'name' | 'key-name';
|
||||
export type BranchNameFormat = 'key' | 'name' | 'key-name' | 'name-address';
|
||||
|
||||
@Pipe({
|
||||
name: 'branchName',
|
||||
@@ -24,6 +24,10 @@ export class BranchNamePipe implements PipeTransform {
|
||||
return value.key;
|
||||
}
|
||||
|
||||
if (format === 'name-address') {
|
||||
return `${value.name} | ${value.address?.street} ${value.address?.streetNumber}, ${value.address?.zipCode} ${value.address?.city}`;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import { IsaConfiguration, IsaConfigurationInterface } from './isa-configuration
|
||||
|
||||
import { AuthService } from './services/auth.service';
|
||||
import { InfoService } from './services/info.service';
|
||||
import { MessageService } from './services/message.service';
|
||||
import { UserStateService } from './services/user-state.service';
|
||||
|
||||
/**
|
||||
@@ -23,7 +22,6 @@ import { UserStateService } from './services/user-state.service';
|
||||
IsaConfiguration,
|
||||
AuthService,
|
||||
InfoService,
|
||||
MessageService,
|
||||
UserStateService
|
||||
],
|
||||
})
|
||||
|
||||
@@ -10,42 +10,6 @@ export { DialogSettings } from './models/dialog-settings';
|
||||
export { DialogContentType } from './models/dialog-content-type';
|
||||
export { KeyValueDTOOfStringAndString } from './models/key-value-dtoof-string-and-string';
|
||||
export { IPublicUserInfo } from './models/ipublic-user-info';
|
||||
export { EnvelopeDTOOfMessageBoardItemDTO } from './models/envelope-dtoof-message-board-item-dto';
|
||||
export { TargetDTO } from './models/target-dto';
|
||||
export { EntityDTOContainerOfUserDTO } from './models/entity-dtocontainer-of-user-dto';
|
||||
export { UserDTO } from './models/user-dto';
|
||||
export { ElevationMode } from './models/elevation-mode';
|
||||
export { EntityDTOContainerOfLabelDTO } from './models/entity-dtocontainer-of-label-dto';
|
||||
export { LabelDTO } from './models/label-dto';
|
||||
export { EntityDTOContainerOfTenantDTO } from './models/entity-dtocontainer-of-tenant-dto';
|
||||
export { TenantDTO } from './models/tenant-dto';
|
||||
export { EntityDTOOfTenantDTOAndITenant } from './models/entity-dtoof-tenant-dtoand-itenant';
|
||||
export { ReadOnlyEntityDTOOfTenantDTOAndITenant } from './models/read-only-entity-dtoof-tenant-dtoand-itenant';
|
||||
export { EntityDTO } from './models/entity-dto';
|
||||
export { EntityStatus } from './models/entity-status';
|
||||
export { TouchedBase } from './models/touched-base';
|
||||
export { EntityDTOReferenceContainer } from './models/entity-dtoreference-container';
|
||||
export { ExternalReferenceDTO } from './models/external-reference-dto';
|
||||
export { EntityDTOOfLabelDTOAndILabel } from './models/entity-dtoof-label-dtoand-ilabel';
|
||||
export { ReadOnlyEntityDTOOfLabelDTOAndILabel } from './models/read-only-entity-dtoof-label-dtoand-ilabel';
|
||||
export { EntityDTOContainerOfBranchDTO } from './models/entity-dtocontainer-of-branch-dto';
|
||||
export { BranchDTO } from './models/branch-dto';
|
||||
export { AddressDTO } from './models/address-dto';
|
||||
export { GeoLocation } from './models/geo-location';
|
||||
export { CommunicationDetailsDTO } from './models/communication-details-dto';
|
||||
export { BranchType } from './models/branch-type';
|
||||
export { EntityDTOOfBranchDTOAndIBranch } from './models/entity-dtoof-branch-dtoand-ibranch';
|
||||
export { ReadOnlyEntityDTOOfBranchDTOAndIBranch } from './models/read-only-entity-dtoof-branch-dtoand-ibranch';
|
||||
export { Gender } from './models/gender';
|
||||
export { EntityDTOContainerOfApplicationDTO } from './models/entity-dtocontainer-of-application-dto';
|
||||
export { ApplicationDTO } from './models/application-dto';
|
||||
export { EntityDTOOfApplicationDTOAndIApplication } from './models/entity-dtoof-application-dtoand-iapplication';
|
||||
export { ReadOnlyEntityDTOOfApplicationDTOAndIApplication } from './models/read-only-entity-dtoof-application-dtoand-iapplication';
|
||||
export { UserAccountType } from './models/user-account-type';
|
||||
export { ReadOnlyEntityDTOOfUserDTOAndIUser } from './models/read-only-entity-dtoof-user-dtoand-iuser';
|
||||
export { MessageBoardItemDTO } from './models/message-board-item-dto';
|
||||
export { QueryTokenDTO } from './models/query-token-dto';
|
||||
export { OrderByDTO } from './models/order-by-dto';
|
||||
export { UserState } from './models/user-state';
|
||||
export { ResponseArgsOfUserState } from './models/response-args-of-user-state';
|
||||
export { Log } from './models/log';
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
/* tslint:disable */
|
||||
import { GeoLocation } from './geo-location';
|
||||
export interface AddressDTO {
|
||||
apartment?: string;
|
||||
careOf?: string;
|
||||
city?: string;
|
||||
country?: string;
|
||||
district?: string;
|
||||
geoLocation?: GeoLocation;
|
||||
info?: string;
|
||||
po?: string;
|
||||
region?: string;
|
||||
state?: string;
|
||||
street?: string;
|
||||
streetNumber?: string;
|
||||
zipCode?: string;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfApplicationDTOAndIApplication } from './entity-dtoof-application-dtoand-iapplication';
|
||||
import { EntityDTOContainerOfTenantDTO } from './entity-dtocontainer-of-tenant-dto';
|
||||
export interface ApplicationDTO extends EntityDTOOfApplicationDTOAndIApplication{
|
||||
bitMask?: number;
|
||||
key?: string;
|
||||
name?: string;
|
||||
tenant?: EntityDTOContainerOfTenantDTO;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfBranchDTOAndIBranch } from './entity-dtoof-branch-dtoand-ibranch';
|
||||
import { AddressDTO } from './address-dto';
|
||||
import { BranchType } from './branch-type';
|
||||
import { CommunicationDetailsDTO } from './communication-details-dto';
|
||||
import { EntityDTOContainerOfLabelDTO } from './entity-dtocontainer-of-label-dto';
|
||||
import { EntityDTOContainerOfBranchDTO } from './entity-dtocontainer-of-branch-dto';
|
||||
export interface BranchDTO extends EntityDTOOfBranchDTOAndIBranch{
|
||||
address?: AddressDTO;
|
||||
branchNumber?: string;
|
||||
branchType: BranchType;
|
||||
communicationDetailsExternal?: CommunicationDetailsDTO;
|
||||
communicationDetailsInternal?: CommunicationDetailsDTO;
|
||||
extBranchNo?: string;
|
||||
isOnline?: boolean;
|
||||
isOrderingEnabled?: boolean;
|
||||
isShippingEnabled?: boolean;
|
||||
key?: string;
|
||||
label?: EntityDTOContainerOfLabelDTO;
|
||||
name?: string;
|
||||
parent?: EntityDTOContainerOfBranchDTO;
|
||||
shortName?: string;
|
||||
web?: string;
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
/* tslint:disable */
|
||||
export type BranchType = 0 | 1 | 2 | 4 | 8 | 16;
|
||||
@@ -1,7 +0,0 @@
|
||||
/* tslint:disable */
|
||||
export interface CommunicationDetailsDTO {
|
||||
email?: string;
|
||||
fax?: string;
|
||||
mobile?: string;
|
||||
phone?: string;
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
/* tslint:disable */
|
||||
export type ElevationMode = 0 | 1 | 32 | 1024 | 1048576 | 268435456 | 1073741824;
|
||||
@@ -1,11 +0,0 @@
|
||||
/* tslint:disable */
|
||||
import { TouchedBase } from './touched-base';
|
||||
import { EntityStatus } from './entity-status';
|
||||
export interface EntityDTO extends TouchedBase{
|
||||
changed?: string;
|
||||
created?: string;
|
||||
id?: number;
|
||||
pId?: string;
|
||||
status?: EntityStatus;
|
||||
version?: number;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOReferenceContainer } from './entity-dtoreference-container';
|
||||
import { ApplicationDTO } from './application-dto';
|
||||
export interface EntityDTOContainerOfApplicationDTO extends EntityDTOReferenceContainer{
|
||||
data?: ApplicationDTO;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOReferenceContainer } from './entity-dtoreference-container';
|
||||
import { BranchDTO } from './branch-dto';
|
||||
export interface EntityDTOContainerOfBranchDTO extends EntityDTOReferenceContainer{
|
||||
data?: BranchDTO;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOReferenceContainer } from './entity-dtoreference-container';
|
||||
import { LabelDTO } from './label-dto';
|
||||
export interface EntityDTOContainerOfLabelDTO extends EntityDTOReferenceContainer{
|
||||
data?: LabelDTO;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOReferenceContainer } from './entity-dtoreference-container';
|
||||
import { TenantDTO } from './tenant-dto';
|
||||
export interface EntityDTOContainerOfTenantDTO extends EntityDTOReferenceContainer{
|
||||
data?: TenantDTO;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user