diff --git a/apps/isa-app/src/adapter/scan/scandit/scandit-overlay.component.ts b/apps/isa-app/src/adapter/scan/scandit/scandit-overlay.component.ts index c13e77a5a..d91fc490d 100644 --- a/apps/isa-app/src/adapter/scan/scandit/scandit-overlay.component.ts +++ b/apps/isa-app/src/adapter/scan/scandit/scandit-overlay.component.ts @@ -1,4 +1,12 @@ -import { Component, ChangeDetectionStrategy, ElementRef, ViewChild, NgZone, AfterViewInit, OnDestroy } from '@angular/core'; +import { + Component, + ChangeDetectionStrategy, + ElementRef, + ViewChild, + NgZone, + AfterViewInit, + OnDestroy, +} from '@angular/core'; import { BarcodeCapture, BarcodeCaptureSettings, Symbology } from 'scandit-web-datacapture-barcode'; import { Camera, DataCaptureContext, DataCaptureView, FrameSourceState } from 'scandit-web-datacapture-core'; diff --git a/apps/isa-app/src/app/app.component.ts b/apps/isa-app/src/app/app.component.ts index 70762bda9..6006f3363 100644 --- a/apps/isa-app/src/app/app.component.ts +++ b/apps/isa-app/src/app/app.component.ts @@ -1,5 +1,16 @@ import { DOCUMENT } from '@angular/common'; -import { Component, effect, HostListener, inject, Inject, Injector, OnInit, Renderer2, signal, untracked } from '@angular/core'; +import { + Component, + effect, + HostListener, + inject, + Inject, + Injector, + OnInit, + Renderer2, + signal, + untracked, +} from '@angular/core'; import { Title } from '@angular/platform-browser'; import { SwUpdate } from '@angular/service-worker'; import { ApplicationService } from '@core/application'; @@ -121,7 +132,10 @@ export class AppComponent implements OnInit { } logVersion() { - console.log(`%c${this._config.get('title')}\r\nVersion: ${packageInfo.version}`, 'font-weight: bold; font-size: 20px;'); + console.log( + `%c${this._config.get('title')}\r\nVersion: ${packageInfo.version}`, + 'font-weight: bold; font-size: 20px;', + ); } determinePlatform() { diff --git a/apps/isa-app/src/app/commands/create-kubi-customer.command.ts b/apps/isa-app/src/app/commands/create-kubi-customer.command.ts index 9296117f3..3946e2a93 100644 --- a/apps/isa-app/src/app/commands/create-kubi-customer.command.ts +++ b/apps/isa-app/src/app/commands/create-kubi-customer.command.ts @@ -40,9 +40,12 @@ export class CreateKubiCustomerCommand extends ActionHandler { +export const ActivateProcessIdGuard: CanActivateFn = async ( + route: ActivatedRouteSnapshot, + state: RouterStateSnapshot, +) => { const application = inject(ApplicationService); const processIdStr = route.params.processId; @@ -27,20 +30,18 @@ export const ActivateProcessIdGuard: CanActivateFn = async (route: ActivatedRout return true; }; -export const ActivateProcessIdWithConfigKeyGuard: (key: string) => CanActivateFn = (key) => async ( - route: ActivatedRouteSnapshot, - state: RouterStateSnapshot -) => { - const application = inject(ApplicationService); - const config = inject(Config); +export const ActivateProcessIdWithConfigKeyGuard: (key: string) => CanActivateFn = + (key) => async (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => { + const application = inject(ApplicationService); + const config = inject(Config); - const processId = config.get(`process.ids.${key}`); + const processId = config.get(`process.ids.${key}`); - if (isNaN(processId)) { - return false; - } + if (isNaN(processId)) { + return false; + } - application.activateProcess(processId); + application.activateProcess(processId); - return true; -}; + return true; + }; diff --git a/apps/isa-app/src/app/guards/can-activate-assortment.guard.ts b/apps/isa-app/src/app/guards/can-activate-assortment.guard.ts index 540af6233..0a39fde8d 100644 --- a/apps/isa-app/src/app/guards/can-activate-assortment.guard.ts +++ b/apps/isa-app/src/app/guards/can-activate-assortment.guard.ts @@ -6,10 +6,16 @@ import { first } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) export class CanActivateAssortmentGuard { - constructor(private readonly _applicationService: ApplicationService, private readonly _config: Config) {} + constructor( + private readonly _applicationService: ApplicationService, + private readonly _config: Config, + ) {} async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { - const process = await this._applicationService.getProcessById$(this._config.get('process.ids.assortment')).pipe(first()).toPromise(); + const process = await this._applicationService + .getProcessById$(this._config.get('process.ids.assortment')) + .pipe(first()) + .toPromise(); if (!process) { await this._applicationService.createProcess({ id: this._config.get('process.ids.assortment'), diff --git a/apps/isa-app/src/app/guards/can-activate-cart-with-process-id.guard.ts b/apps/isa-app/src/app/guards/can-activate-cart-with-process-id.guard.ts index a6c6eeee5..1b526e3b0 100644 --- a/apps/isa-app/src/app/guards/can-activate-cart-with-process-id.guard.ts +++ b/apps/isa-app/src/app/guards/can-activate-cart-with-process-id.guard.ts @@ -8,10 +8,7 @@ export class CanActivateCartWithProcessIdGuard { constructor(private readonly _applicationService: ApplicationService) {} async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { - const process = await this._applicationService - .getProcessById$(+route.params.processId) - .pipe(first()) - .toPromise(); + const process = await this._applicationService.getProcessById$(+route.params.processId).pipe(first()).toPromise(); // if (!(process?.type === 'cart')) { // // TODO: diff --git a/apps/isa-app/src/app/guards/can-activate-cart.guard.ts b/apps/isa-app/src/app/guards/can-activate-cart.guard.ts index 03d09bd9e..2b166d288 100644 --- a/apps/isa-app/src/app/guards/can-activate-cart.guard.ts +++ b/apps/isa-app/src/app/guards/can-activate-cart.guard.ts @@ -14,7 +14,10 @@ export class CanActivateCartGuard { async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { const processes = await this._applicationService.getProcesses$('customer').pipe(first()).toPromise(); let lastActivatedProcessId = ( - await this._applicationService.getLastActivatedProcessWithSectionAndType$('customer', 'cart').pipe(first()).toPromise() + await this._applicationService + .getLastActivatedProcessWithSectionAndType$('customer', 'cart') + .pipe(first()) + .toPromise() )?.id; if (!lastActivatedProcessId) { lastActivatedProcessId = Date.now(); diff --git a/apps/isa-app/src/app/guards/can-activate-customer-orders-with-process-id.guard.ts b/apps/isa-app/src/app/guards/can-activate-customer-orders-with-process-id.guard.ts index bfbf10892..fd19f1beb 100644 --- a/apps/isa-app/src/app/guards/can-activate-customer-orders-with-process-id.guard.ts +++ b/apps/isa-app/src/app/guards/can-activate-customer-orders-with-process-id.guard.ts @@ -6,13 +6,13 @@ import { first } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) export class CanActivateCustomerOrdersWithProcessIdGuard { - constructor(private readonly _applicationService: ApplicationService, private readonly _breadcrumbService: BreadcrumbService) {} + constructor( + private readonly _applicationService: ApplicationService, + private readonly _breadcrumbService: BreadcrumbService, + ) {} async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { - const process = await this._applicationService - .getProcessById$(+route.params.processId) - .pipe(first()) - .toPromise(); + const process = await this._applicationService.getProcessById$(+route.params.processId).pipe(first()).toPromise(); if (!process) { const processes = await this._applicationService.getProcesses$('customer').pipe(first()).toPromise(); @@ -31,10 +31,7 @@ export class CanActivateCustomerOrdersWithProcessIdGuard { // Fix #3292: Alle Breadcrumbs die nichts mit dem aktuellen Prozess zu tun haben, müssen removed werden async removeBreadcrumbWithSameProcessId(route: ActivatedRouteSnapshot) { - const crumbs = await this._breadcrumbService - .getBreadcrumbByKey$(+route.params.processId) - .pipe(first()) - .toPromise(); + const crumbs = await this._breadcrumbService.getBreadcrumbByKey$(+route.params.processId).pipe(first()).toPromise(); // Entferne alle Crumbs die nichts mit den Kundenbestellungen zu tun haben if (crumbs.length > 1) { diff --git a/apps/isa-app/src/app/guards/can-activate-customer-orders.guard.ts b/apps/isa-app/src/app/guards/can-activate-customer-orders.guard.ts index cdf4a5ac3..4b14da0cb 100644 --- a/apps/isa-app/src/app/guards/can-activate-customer-orders.guard.ts +++ b/apps/isa-app/src/app/guards/can-activate-customer-orders.guard.ts @@ -17,11 +17,17 @@ export class CanActivateCustomerOrdersGuard { const processes = await this._applicationService.getProcesses$('customer').pipe(first()).toPromise(); let lastActivatedProcessId = ( - await this._applicationService.getLastActivatedProcessWithSectionAndType$('customer', 'cart').pipe(first()).toPromise() + await this._applicationService + .getLastActivatedProcessWithSectionAndType$('customer', 'cart') + .pipe(first()) + .toPromise() )?.id; const lastActivatedCartCheckoutProcessId = ( - await this._applicationService.getLastActivatedProcessWithSectionAndType$('customer', 'cart-checkout').pipe(first()).toPromise() + await this._applicationService + .getLastActivatedProcessWithSectionAndType$('customer', 'cart-checkout') + .pipe(first()) + .toPromise() )?.id; const activatedProcessId = await this._applicationService.getActivatedProcessId$().pipe(first()).toPromise(); diff --git a/apps/isa-app/src/app/guards/can-activate-customer-with-process-id.guard.ts b/apps/isa-app/src/app/guards/can-activate-customer-with-process-id.guard.ts index 51e2185b7..2e6340148 100644 --- a/apps/isa-app/src/app/guards/can-activate-customer-with-process-id.guard.ts +++ b/apps/isa-app/src/app/guards/can-activate-customer-with-process-id.guard.ts @@ -6,13 +6,13 @@ import { first } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) export class CanActivateCustomerWithProcessIdGuard { - constructor(private readonly _applicationService: ApplicationService, private readonly _breadcrumbService: BreadcrumbService) {} + constructor( + private readonly _applicationService: ApplicationService, + private readonly _breadcrumbService: BreadcrumbService, + ) {} async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { - const process = await this._applicationService - .getProcessById$(+route.params.processId) - .pipe(first()) - .toPromise(); + const process = await this._applicationService.getProcessById$(+route.params.processId).pipe(first()).toPromise(); // if (!(process?.type === 'cart')) { // // TODO: @@ -37,10 +37,7 @@ export class CanActivateCustomerWithProcessIdGuard { // Fix #3292: Alle Breadcrumbs die nichts mit dem aktuellen Prozess zu tun haben, müssen removed werden async removeBreadcrumbWithSameProcessId(route: ActivatedRouteSnapshot) { - const crumbs = await this._breadcrumbService - .getBreadcrumbByKey$(+route.params.processId) - .pipe(first()) - .toPromise(); + const crumbs = await this._breadcrumbService.getBreadcrumbByKey$(+route.params.processId).pipe(first()).toPromise(); // Entferne alle Crumbs die nichts mit der Kundensuche zu tun haben if (crumbs.length > 1) { diff --git a/apps/isa-app/src/app/guards/can-activate-customer.guard.ts b/apps/isa-app/src/app/guards/can-activate-customer.guard.ts index 7d3a51320..8d59566b5 100644 --- a/apps/isa-app/src/app/guards/can-activate-customer.guard.ts +++ b/apps/isa-app/src/app/guards/can-activate-customer.guard.ts @@ -17,15 +17,24 @@ export class CanActivateCustomerGuard { async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { const processes = await this._applicationService.getProcesses$('customer').pipe(first()).toPromise(); let lastActivatedProcessId = ( - await this._applicationService.getLastActivatedProcessWithSectionAndType$('customer', 'cart').pipe(first()).toPromise() + await this._applicationService + .getLastActivatedProcessWithSectionAndType$('customer', 'cart') + .pipe(first()) + .toPromise() )?.id; const lastActivatedCartCheckoutProcessId = ( - await this._applicationService.getLastActivatedProcessWithSectionAndType$('customer', 'cart-checkout').pipe(first()).toPromise() + await this._applicationService + .getLastActivatedProcessWithSectionAndType$('customer', 'cart-checkout') + .pipe(first()) + .toPromise() )?.id; const lastActivatedGoodsOutProcessId = ( - await this._applicationService.getLastActivatedProcessWithSectionAndType$('customer', 'goods-out').pipe(first()).toPromise() + await this._applicationService + .getLastActivatedProcessWithSectionAndType$('customer', 'goods-out') + .pipe(first()) + .toPromise() )?.id; const activatedProcessId = await this._applicationService.getActivatedProcessId$().pipe(first()).toPromise(); diff --git a/apps/isa-app/src/app/guards/can-activate-goods-in.guard.ts b/apps/isa-app/src/app/guards/can-activate-goods-in.guard.ts index 307b60717..960706c06 100644 --- a/apps/isa-app/src/app/guards/can-activate-goods-in.guard.ts +++ b/apps/isa-app/src/app/guards/can-activate-goods-in.guard.ts @@ -6,10 +6,16 @@ import { first } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) export class CanActivateGoodsInGuard { - constructor(private readonly _applicationService: ApplicationService, private readonly _config: Config) {} + constructor( + private readonly _applicationService: ApplicationService, + private readonly _config: Config, + ) {} async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { - const process = await this._applicationService.getProcessById$(this._config.get('process.ids.goodsIn')).pipe(first()).toPromise(); + const process = await this._applicationService + .getProcessById$(this._config.get('process.ids.goodsIn')) + .pipe(first()) + .toPromise(); if (!process) { await this._applicationService.createProcess({ id: this._config.get('process.ids.goodsIn'), diff --git a/apps/isa-app/src/app/guards/can-activate-goods-out-with-process-id.guard.ts b/apps/isa-app/src/app/guards/can-activate-goods-out-with-process-id.guard.ts index 9208a2443..14fc11967 100644 --- a/apps/isa-app/src/app/guards/can-activate-goods-out-with-process-id.guard.ts +++ b/apps/isa-app/src/app/guards/can-activate-goods-out-with-process-id.guard.ts @@ -6,13 +6,13 @@ import { first } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) export class CanActivateGoodsOutWithProcessIdGuard { - constructor(private readonly _applicationService: ApplicationService, private readonly _breadcrumbService: BreadcrumbService) {} + constructor( + private readonly _applicationService: ApplicationService, + private readonly _breadcrumbService: BreadcrumbService, + ) {} async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { - const process = await this._applicationService - .getProcessById$(+route.params.processId) - .pipe(first()) - .toPromise(); + const process = await this._applicationService.getProcessById$(+route.params.processId).pipe(first()).toPromise(); if (!process) { // const processes = await this._applicationService.getProcesses$('customer').pipe(first()).toPromise(); @@ -31,10 +31,7 @@ export class CanActivateGoodsOutWithProcessIdGuard { // Fix #3292: Alle Breadcrumbs die nichts mit dem aktuellen Prozess zu tun haben, müssen removed werden async removeBreadcrumbWithSameProcessId(route: ActivatedRouteSnapshot) { - const crumbs = await this._breadcrumbService - .getBreadcrumbByKey$(+route.params.processId) - .pipe(first()) - .toPromise(); + const crumbs = await this._breadcrumbService.getBreadcrumbByKey$(+route.params.processId).pipe(first()).toPromise(); // Entferne alle Crumbs die nichts mit der Warenausgabe zu tun haben if (crumbs.length > 1) { diff --git a/apps/isa-app/src/app/guards/can-activate-goods-out.guard.ts b/apps/isa-app/src/app/guards/can-activate-goods-out.guard.ts index c26413d3c..2a5c02f7f 100644 --- a/apps/isa-app/src/app/guards/can-activate-goods-out.guard.ts +++ b/apps/isa-app/src/app/guards/can-activate-goods-out.guard.ts @@ -9,7 +9,7 @@ export class CanActivateGoodsOutGuard { constructor( private readonly _applicationService: ApplicationService, private readonly _checkoutService: DomainCheckoutService, - private readonly _router: Router + private readonly _router: Router, ) {} // !!! Ticket #3272 Code soll vorerst bestehen bleiben. Prozess Warenausgabe soll wieder Vorgang heißen (wie aktuell im Produktiv), bis zum neuen Navigationskonzept @@ -103,11 +103,17 @@ export class CanActivateGoodsOutGuard { const processes = await this._applicationService.getProcesses$('customer').pipe(first()).toPromise(); let lastActivatedProcessId = ( - await this._applicationService.getLastActivatedProcessWithSectionAndType$('customer', 'cart').pipe(first()).toPromise() + await this._applicationService + .getLastActivatedProcessWithSectionAndType$('customer', 'cart') + .pipe(first()) + .toPromise() )?.id; const lastActivatedCartCheckoutProcessId = ( - await this._applicationService.getLastActivatedProcessWithSectionAndType$('customer', 'cart-checkout').pipe(first()).toPromise() + await this._applicationService + .getLastActivatedProcessWithSectionAndType$('customer', 'cart-checkout') + .pipe(first()) + .toPromise() )?.id; const activatedProcessId = await this._applicationService.getActivatedProcessId$().pipe(first()).toPromise(); diff --git a/apps/isa-app/src/app/guards/can-activate-package-inspection.guard.ts b/apps/isa-app/src/app/guards/can-activate-package-inspection.guard.ts index a3cf5c2d9..5950c9867 100644 --- a/apps/isa-app/src/app/guards/can-activate-package-inspection.guard.ts +++ b/apps/isa-app/src/app/guards/can-activate-package-inspection.guard.ts @@ -6,7 +6,10 @@ import { first } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) export class CanActivatePackageInspectionGuard { - constructor(private readonly _applicationService: ApplicationService, private readonly _config: Config) {} + constructor( + private readonly _applicationService: ApplicationService, + private readonly _config: Config, + ) {} async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { const process = await this._applicationService diff --git a/apps/isa-app/src/app/guards/can-activate-product-with-process-id.guard.ts b/apps/isa-app/src/app/guards/can-activate-product-with-process-id.guard.ts index eda7f956c..80dbb3943 100644 --- a/apps/isa-app/src/app/guards/can-activate-product-with-process-id.guard.ts +++ b/apps/isa-app/src/app/guards/can-activate-product-with-process-id.guard.ts @@ -6,13 +6,13 @@ import { first } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) export class CanActivateProductWithProcessIdGuard { - constructor(private readonly _applicationService: ApplicationService, private readonly _breadcrumbService: BreadcrumbService) {} + constructor( + private readonly _applicationService: ApplicationService, + private readonly _breadcrumbService: BreadcrumbService, + ) {} async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { - const process = await this._applicationService - .getProcessById$(+route.params.processId) - .pipe(first()) - .toPromise(); + const process = await this._applicationService.getProcessById$(+route.params.processId).pipe(first()).toPromise(); // if (!(process?.type === 'cart')) { // // TODO: @@ -37,10 +37,7 @@ export class CanActivateProductWithProcessIdGuard { // Fix #3292: Alle Breadcrumbs die nichts mit dem aktuellen Prozess zu tun haben, müssen removed werden async removeBreadcrumbWithSameProcessId(route: ActivatedRouteSnapshot) { - const crumbs = await this._breadcrumbService - .getBreadcrumbByKey$(+route.params.processId) - .pipe(first()) - .toPromise(); + const crumbs = await this._breadcrumbService.getBreadcrumbByKey$(+route.params.processId).pipe(first()).toPromise(); // Entferne alle Crumbs die nichts mit der Artikelsuche zu tun haben if (crumbs.length > 1) { diff --git a/apps/isa-app/src/app/guards/can-activate-product.guard.ts b/apps/isa-app/src/app/guards/can-activate-product.guard.ts index 45119aa23..0d5a0121e 100644 --- a/apps/isa-app/src/app/guards/can-activate-product.guard.ts +++ b/apps/isa-app/src/app/guards/can-activate-product.guard.ts @@ -16,15 +16,24 @@ export class CanActivateProductGuard { async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { const processes = await this._applicationService.getProcesses$('customer').pipe(first()).toPromise(); let lastActivatedProcessId = ( - await this._applicationService.getLastActivatedProcessWithSectionAndType$('customer', 'cart').pipe(first()).toPromise() + await this._applicationService + .getLastActivatedProcessWithSectionAndType$('customer', 'cart') + .pipe(first()) + .toPromise() )?.id; const lastActivatedCartCheckoutProcessId = ( - await this._applicationService.getLastActivatedProcessWithSectionAndType$('customer', 'cart-checkout').pipe(first()).toPromise() + await this._applicationService + .getLastActivatedProcessWithSectionAndType$('customer', 'cart-checkout') + .pipe(first()) + .toPromise() )?.id; const lastActivatedGoodsOutProcessId = ( - await this._applicationService.getLastActivatedProcessWithSectionAndType$('customer', 'goods-out').pipe(first()).toPromise() + await this._applicationService + .getLastActivatedProcessWithSectionAndType$('customer', 'goods-out') + .pipe(first()) + .toPromise() )?.id; const activatedProcessId = await this._applicationService.getActivatedProcessId$().pipe(first()).toPromise(); diff --git a/apps/isa-app/src/app/guards/can-activate-remission.guard.ts b/apps/isa-app/src/app/guards/can-activate-remission.guard.ts index df21a6219..ac21cb2dd 100644 --- a/apps/isa-app/src/app/guards/can-activate-remission.guard.ts +++ b/apps/isa-app/src/app/guards/can-activate-remission.guard.ts @@ -9,11 +9,14 @@ export class CanActivateRemissionGuard { constructor( private readonly _applicationService: ApplicationService, private readonly _config: Config, - private readonly _router: Router + private readonly _router: Router, ) {} async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { - const process = await this._applicationService.getProcessById$(this._config.get('process.ids.remission')).pipe(first()).toPromise(); + const process = await this._applicationService + .getProcessById$(this._config.get('process.ids.remission')) + .pipe(first()) + .toPromise(); if (!process) { await this._applicationService.createProcess({ id: this._config.get('process.ids.remission'), diff --git a/apps/isa-app/src/app/guards/can-activate-task-calendar.guard.ts b/apps/isa-app/src/app/guards/can-activate-task-calendar.guard.ts index d21b4cd63..d4c2137a1 100644 --- a/apps/isa-app/src/app/guards/can-activate-task-calendar.guard.ts +++ b/apps/isa-app/src/app/guards/can-activate-task-calendar.guard.ts @@ -6,10 +6,16 @@ import { first } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) export class CanActivateTaskCalendarGuard { - constructor(private readonly _applicationService: ApplicationService, private readonly _config: Config) {} + constructor( + private readonly _applicationService: ApplicationService, + private readonly _config: Config, + ) {} async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { - const process = await this._applicationService.getProcessById$(this._config.get('process.ids.taskCalendar')).pipe(first()).toPromise(); + const process = await this._applicationService + .getProcessById$(this._config.get('process.ids.taskCalendar')) + .pipe(first()) + .toPromise(); if (!process) { await this._applicationService.createProcess({ id: this._config.get('process.ids.taskCalendar'), diff --git a/apps/isa-app/src/app/guards/process-id.guard.ts b/apps/isa-app/src/app/guards/process-id.guard.ts index 612f16f19..3d989b1c1 100644 --- a/apps/isa-app/src/app/guards/process-id.guard.ts +++ b/apps/isa-app/src/app/guards/process-id.guard.ts @@ -5,7 +5,7 @@ import { take } from 'rxjs/operators'; export const ProcessIdGuard: CanActivateFn = async ( route: ActivatedRouteSnapshot, - state: RouterStateSnapshot + state: RouterStateSnapshot, ): Promise => { const application = inject(ApplicationService); const router = inject(Router); diff --git a/apps/isa-app/src/app/resolvers/section.resolver.ts b/apps/isa-app/src/app/resolvers/section.resolver.ts index 900921a5a..a8b9ea37f 100644 --- a/apps/isa-app/src/app/resolvers/section.resolver.ts +++ b/apps/isa-app/src/app/resolvers/section.resolver.ts @@ -4,7 +4,10 @@ import { ApplicationService } from '@core/application'; import { Observable } from 'rxjs'; export abstract class SectionResolver { - constructor(protected section: 'customer' | 'branch', protected applicationService: ApplicationService) {} + constructor( + protected section: 'customer' | 'branch', + protected applicationService: ApplicationService, + ) {} resolve(route: ActivatedRouteSnapshot): Observable | Promise | string { this.applicationService.setSection(this.section); diff --git a/apps/isa-app/src/app/store/root-state.service.ts b/apps/isa-app/src/app/store/root-state.service.ts index 619ba3d81..c3e46287e 100644 --- a/apps/isa-app/src/app/store/root-state.service.ts +++ b/apps/isa-app/src/app/store/root-state.service.ts @@ -43,7 +43,11 @@ export class RootStateService { takeUntil(this._cancelSave), debounceTime(1000), switchMap((state) => { - const raw = JSON.stringify({ ...state, version: packageInfo.version, sub: this._authService.getClaimByKey('sub') }); + const raw = JSON.stringify({ + ...state, + version: packageInfo.version, + sub: this._authService.getClaimByKey('sub'), + }); RootStateService.SaveToLocalStorageRaw(raw); return this._userStateService.UserStateSetUserState({ content: raw }); }), diff --git a/apps/isa-app/src/assets/fonts/fonts.css b/apps/isa-app/src/assets/fonts/fonts.css index 0a81a9f4a..6e7a83c4d 100644 --- a/apps/isa-app/src/assets/fonts/fonts.css +++ b/apps/isa-app/src/assets/fonts/fonts.css @@ -1,219 +1,222 @@ /* cyrillic-ext */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 400; font-stretch: normal; - src: url('./Open_Sans-400-cyrillic-ext1.woff2') format('woff2'); + src: url("./Open_Sans-400-cyrillic-ext1.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } /* cyrillic */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 400; font-stretch: normal; - src: url('./Open_Sans-400-cyrillic2.woff2') format('woff2'); + src: url("./Open_Sans-400-cyrillic2.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 400; font-stretch: normal; - src: url('./Open_Sans-400-greek-ext3.woff2') format('woff2'); + src: url("./Open_Sans-400-greek-ext3.woff2") format("woff2"); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 400; font-stretch: normal; - src: url('./Open_Sans-400-greek4.woff2') format('woff2'); + src: url("./Open_Sans-400-greek4.woff2") format("woff2"); unicode-range: U+0370-03FF; } /* hebrew */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 400; font-stretch: normal; - src: url('./Open_Sans-400-hebrew5.woff2') format('woff2'); + src: url("./Open_Sans-400-hebrew5.woff2") format("woff2"); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; } /* vietnamese */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 400; font-stretch: normal; - src: url('./Open_Sans-400-vietnamese6.woff2') format('woff2'); + src: url("./Open_Sans-400-vietnamese6.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 400; font-stretch: normal; - src: url('./Open_Sans-400-latin-ext7.woff2') format('woff2'); + src: url("./Open_Sans-400-latin-ext7.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 400; font-stretch: normal; - src: url('./Open_Sans-400-latin8.woff2') format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, - U+2212, U+2215, U+FEFF, U+FFFD; + src: url("./Open_Sans-400-latin8.woff2") format("woff2"); + unicode-range: + U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } /* cyrillic-ext */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 600; font-stretch: normal; - src: url('./Open_Sans-600-cyrillic-ext9.woff2') format('woff2'); + src: url("./Open_Sans-600-cyrillic-ext9.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } /* cyrillic */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 600; font-stretch: normal; - src: url('./Open_Sans-600-cyrillic10.woff2') format('woff2'); + src: url("./Open_Sans-600-cyrillic10.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 600; font-stretch: normal; - src: url('./Open_Sans-600-greek-ext11.woff2') format('woff2'); + src: url("./Open_Sans-600-greek-ext11.woff2") format("woff2"); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 600; font-stretch: normal; - src: url('./Open_Sans-600-greek12.woff2') format('woff2'); + src: url("./Open_Sans-600-greek12.woff2") format("woff2"); unicode-range: U+0370-03FF; } /* hebrew */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 600; font-stretch: normal; - src: url('./Open_Sans-600-hebrew13.woff2') format('woff2'); + src: url("./Open_Sans-600-hebrew13.woff2") format("woff2"); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; } /* vietnamese */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 600; font-stretch: normal; - src: url('./Open_Sans-600-vietnamese14.woff2') format('woff2'); + src: url("./Open_Sans-600-vietnamese14.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 600; font-stretch: normal; - src: url('./Open_Sans-600-latin-ext15.woff2') format('woff2'); + src: url("./Open_Sans-600-latin-ext15.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 600; font-stretch: normal; - src: url('./Open_Sans-600-latin16.woff2') format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, - U+2212, U+2215, U+FEFF, U+FFFD; + src: url("./Open_Sans-600-latin16.woff2") format("woff2"); + unicode-range: + U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } /* cyrillic-ext */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 700; font-stretch: normal; - src: url('./Open_Sans-700-cyrillic-ext17.woff2') format('woff2'); + src: url("./Open_Sans-700-cyrillic-ext17.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } /* cyrillic */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 700; font-stretch: normal; - src: url('./Open_Sans-700-cyrillic18.woff2') format('woff2'); + src: url("./Open_Sans-700-cyrillic18.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 700; font-stretch: normal; - src: url('./Open_Sans-700-greek-ext19.woff2') format('woff2'); + src: url("./Open_Sans-700-greek-ext19.woff2") format("woff2"); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 700; font-stretch: normal; - src: url('./Open_Sans-700-greek20.woff2') format('woff2'); + src: url("./Open_Sans-700-greek20.woff2") format("woff2"); unicode-range: U+0370-03FF; } /* hebrew */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 700; font-stretch: normal; - src: url('./Open_Sans-700-hebrew21.woff2') format('woff2'); + src: url("./Open_Sans-700-hebrew21.woff2") format("woff2"); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; } /* vietnamese */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 700; font-stretch: normal; - src: url('./Open_Sans-700-vietnamese22.woff2') format('woff2'); + src: url("./Open_Sans-700-vietnamese22.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 700; font-stretch: normal; - src: url('./Open_Sans-700-latin-ext23.woff2') format('woff2'); + src: url("./Open_Sans-700-latin-ext23.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { - font-family: 'Open Sans'; + font-family: "Open Sans"; font-style: normal; font-weight: 700; font-stretch: normal; - src: url('./Open_Sans-700-latin24.woff2') format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, - U+2212, U+2215, U+FEFF, U+FFFD; + src: url("./Open_Sans-700-latin24.woff2") format("woff2"); + unicode-range: + U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } diff --git a/apps/isa-app/src/core/application/application.service.ts b/apps/isa-app/src/core/application/application.service.ts index 367309717..e36958608 100644 --- a/apps/isa-app/src/core/application/application.service.ts +++ b/apps/isa-app/src/core/application/application.service.ts @@ -35,7 +35,9 @@ export class ApplicationService { getProcesses$(section?: 'customer' | 'branch') { const processes$ = this.store.select(selectProcesses); - return processes$.pipe(map((processes) => processes.filter((process) => (section ? process.section === section : true)))); + return processes$.pipe( + map((processes) => processes.filter((process) => (section ? process.section === section : true))), + ); } getProcessById$(processId: number): Observable { @@ -135,7 +137,10 @@ export class ApplicationService { this.store.dispatch(setSection({ section })); } - getLastActivatedProcessWithSectionAndType$(section: 'customer' | 'branch', type: string): Observable { + getLastActivatedProcessWithSectionAndType$( + section: 'customer' | 'branch', + type: string, + ): Observable { return this.getProcesses$(section).pipe( map((processes) => processes diff --git a/apps/isa-app/src/core/application/store/application.actions.ts b/apps/isa-app/src/core/application/store/application.actions.ts index 8ff196b9c..6cf479556 100644 --- a/apps/isa-app/src/core/application/store/application.actions.ts +++ b/apps/isa-app/src/core/application/store/application.actions.ts @@ -11,8 +11,17 @@ export const addProcess = createAction(`${prefix} Add Process`, props<{ process: export const removeProcess = createAction(`${prefix} Remove Process`, props<{ processId: number }>()); -export const setActivatedProcess = createAction(`${prefix} Set Activated Process`, props<{ activatedProcessId: number }>()); +export const setActivatedProcess = createAction( + `${prefix} Set Activated Process`, + props<{ activatedProcessId: number }>(), +); -export const patchProcess = createAction(`${prefix} Patch Process`, props<{ processId: number; changes: Partial }>()); +export const patchProcess = createAction( + `${prefix} Patch Process`, + props<{ processId: number; changes: Partial }>(), +); -export const patchProcessData = createAction(`${prefix} Patch Process Data`, props<{ processId: number; data: Record }>()); +export const patchProcessData = createAction( + `${prefix} Patch Process Data`, + props<{ processId: number; data: Record }>(), +); diff --git a/apps/isa-app/src/core/breadcrumb/breadcrumb.service.ts b/apps/isa-app/src/core/breadcrumb/breadcrumb.service.ts index c6099716b..d29991251 100644 --- a/apps/isa-app/src/core/breadcrumb/breadcrumb.service.ts +++ b/apps/isa-app/src/core/breadcrumb/breadcrumb.service.ts @@ -120,7 +120,10 @@ export class BreadcrumbService { if (recursive) { const breadcrumbs = await this.getBreadcrumbByKey$(breadcrumb.key).pipe(take(1)).toPromise(); - breadcrumbsToRemove = [...breadcrumbsToRemove, ...breadcrumbs.filter((crumb) => crumb.timestamp > breadcrumb.timestamp)]; + breadcrumbsToRemove = [ + ...breadcrumbsToRemove, + ...breadcrumbs.filter((crumb) => crumb.timestamp > breadcrumb.timestamp), + ]; } if (!breadcrumbsToRemove.length) { @@ -135,7 +138,10 @@ export class BreadcrumbService { crumbs.forEach((crumb) => this.removeBreadcrumb(crumb.id)); } - getLatestBreadcrumbForSection(section: 'customer' | 'branch', predicate: (crumb: Breadcrumb) => boolean = (_) => true) { + getLatestBreadcrumbForSection( + section: 'customer' | 'branch', + predicate: (crumb: Breadcrumb) => boolean = (_) => true, + ) { return this.store .select(selectors.selectBreadcrumbsBySection, { section }) .pipe(map((crumbs) => crumbs.sort((a, b) => b.timestamp - a.timestamp).find((f) => predicate(f)))); diff --git a/apps/isa-app/src/core/breadcrumb/store/breadcrumb.actions.ts b/apps/isa-app/src/core/breadcrumb/store/breadcrumb.actions.ts index 9f9fa32b9..a25dc9806 100644 --- a/apps/isa-app/src/core/breadcrumb/store/breadcrumb.actions.ts +++ b/apps/isa-app/src/core/breadcrumb/store/breadcrumb.actions.ts @@ -11,7 +11,10 @@ export const addBreadcrumb = createAction(`${prefix} Add Breadcrumb`, props<{ br /** * Action um Breadcrumb im State zu ändern */ -export const updateBreadcrumb = createAction(`${prefix} Update Breadcrumb`, props<{ id: number; changes: Partial }>()); +export const updateBreadcrumb = createAction( + `${prefix} Update Breadcrumb`, + props<{ id: number; changes: Partial }>(), +); /** * Action um Breadcrumb im State zu entfernen diff --git a/apps/isa-app/src/core/breadcrumb/store/breadcrumb.reducer.spec.ts b/apps/isa-app/src/core/breadcrumb/store/breadcrumb.reducer.spec.ts index e2f461dd4..a6279f284 100644 --- a/apps/isa-app/src/core/breadcrumb/store/breadcrumb.reducer.spec.ts +++ b/apps/isa-app/src/core/breadcrumb/store/breadcrumb.reducer.spec.ts @@ -43,7 +43,10 @@ describe('Breadcrumb Reducer', () => { const state = breadcrumbReducer(INIT, action.addBreadcrumb({ breadcrumb })); - const fixture = breadcrumbReducer(state, action.updateBreadcrumb({ id: breadcrumb.id, changes: { name: 'Test Name 2' } })); + const fixture = breadcrumbReducer( + state, + action.updateBreadcrumb({ id: breadcrumb.id, changes: { name: 'Test Name 2' } }), + ); expect(fixture.entities[breadcrumb.id]).toEqual(expected); }); diff --git a/apps/isa-app/src/core/breadcrumb/store/breadcrumb.selectors.spec.ts b/apps/isa-app/src/core/breadcrumb/store/breadcrumb.selectors.spec.ts index 2a0f90300..90be44957 100644 --- a/apps/isa-app/src/core/breadcrumb/store/breadcrumb.selectors.spec.ts +++ b/apps/isa-app/src/core/breadcrumb/store/breadcrumb.selectors.spec.ts @@ -10,26 +10,46 @@ describe('Breadcrumb Selectors', () => { beforeEach(() => { state = breadcrumbReducer( INIT, - action.addBreadcrumb({ breadcrumb: { id: 1, key: 'unit-test-1', path: '', name: 'Unit Test 1', section: 'customer' } }), - ); - state = breadcrumbReducer( - state, action.addBreadcrumb({ - breadcrumb: { id: 2, key: 'unit-test-1', path: '', name: 'Unit Test 1', tags: ['details'], section: 'customer' }, + breadcrumb: { id: 1, key: 'unit-test-1', path: '', name: 'Unit Test 1', section: 'customer' }, }), ); state = breadcrumbReducer( state, - action.addBreadcrumb({ breadcrumb: { id: 3, key: 'unit-test-2', path: '', name: 'Unit Test 1', section: 'customer' } }), - ); - state = breadcrumbReducer( - state, - action.addBreadcrumb({ breadcrumb: { id: 4, key: 'unit-test-3', path: '', name: 'Unit Test 1', section: 'customer' } }), + action.addBreadcrumb({ + breadcrumb: { + id: 2, + key: 'unit-test-1', + path: '', + name: 'Unit Test 1', + tags: ['details'], + section: 'customer', + }, + }), ); state = breadcrumbReducer( state, action.addBreadcrumb({ - breadcrumb: { id: 5, key: 'unit-test-3', path: '', name: 'Unit Test 1', tags: ['details'], section: 'customer' }, + breadcrumb: { id: 3, key: 'unit-test-2', path: '', name: 'Unit Test 1', section: 'customer' }, + }), + ); + state = breadcrumbReducer( + state, + action.addBreadcrumb({ + breadcrumb: { id: 4, key: 'unit-test-3', path: '', name: 'Unit Test 1', section: 'customer' }, + }), + ); + state = breadcrumbReducer( + state, + action.addBreadcrumb({ + breadcrumb: { + id: 5, + key: 'unit-test-3', + path: '', + name: 'Unit Test 1', + tags: ['details'], + section: 'customer', + }, }), ); }); diff --git a/apps/isa-app/src/core/breadcrumb/store/breadcrumb.selectors.ts b/apps/isa-app/src/core/breadcrumb/store/breadcrumb.selectors.ts index 5192d1f6c..67402c61e 100644 --- a/apps/isa-app/src/core/breadcrumb/store/breadcrumb.selectors.ts +++ b/apps/isa-app/src/core/breadcrumb/store/breadcrumb.selectors.ts @@ -20,7 +20,9 @@ export const selectBreadcrumbById = createSelector(selectEntities, (entities, id /** * Gibt alle Breadcrumb Entities als Array zurück die den key enthalten */ -export const selectBreadcrumbsByKey = createSelector(selectAll, (entities, key: string) => entities.filter((crumb) => crumb.key == key)); +export const selectBreadcrumbsByKey = createSelector(selectAll, (entities, key: string) => + entities.filter((crumb) => crumb.key == key), +); /** * Gibt alle Breadcrumb Entities als Array zurück die den key und tag enthalten @@ -37,12 +39,15 @@ export const selectBreadcrumbsByKeyAndTag = createSelector( export const selectBreadcrumbsByKeyAndTags = createSelector( selectAll, (entities: Breadcrumb[], { key, tags }: { key: string; tags: string[] }) => - entities.filter((crumb) => crumb.key == key && isArray(crumb.tags) && tags.every((tag) => crumb.tags.includes(tag))), + entities.filter( + (crumb) => crumb.key == key && isArray(crumb.tags) && tags.every((tag) => crumb.tags.includes(tag)), + ), ); /** * Gibt alle Breadcrumb Entities als Array zurück die die tags enthalten */ -export const selectBreadcrumbsBySection = createSelector(selectAll, (entities: Breadcrumb[], { section }: { section: string }) => - entities.filter((crumb) => crumb.section === section), +export const selectBreadcrumbsBySection = createSelector( + selectAll, + (entities: Breadcrumb[], { section }: { section: string }) => entities.filter((crumb) => crumb.section === section), ); diff --git a/apps/isa-app/src/core/command/command.module.ts b/apps/isa-app/src/core/command/command.module.ts index df269552a..725e13f64 100644 --- a/apps/isa-app/src/core/command/command.module.ts +++ b/apps/isa-app/src/core/command/command.module.ts @@ -4,7 +4,10 @@ import { CommandService } from './command.service'; import { FEATURE_ACTION_HANDLERS, ROOT_ACTION_HANDLERS } from './tokens'; export function provideActionHandlers(actionHandlers: Type[]): Provider[] { - return [CommandService, actionHandlers.map((handler) => ({ provide: FEATURE_ACTION_HANDLERS, useClass: handler, multi: true }))]; + return [ + CommandService, + actionHandlers.map((handler) => ({ provide: FEATURE_ACTION_HANDLERS, useClass: handler, multi: true })), + ]; } @NgModule({}) @@ -12,14 +15,20 @@ export class CoreCommandModule { static forRoot(actionHandlers: Type[]): ModuleWithProviders { return { ngModule: CoreCommandModule, - providers: [CommandService, actionHandlers.map((handler) => ({ provide: ROOT_ACTION_HANDLERS, useClass: handler, multi: true }))], + providers: [ + CommandService, + actionHandlers.map((handler) => ({ provide: ROOT_ACTION_HANDLERS, useClass: handler, multi: true })), + ], }; } static forChild(actionHandlers: Type[]): ModuleWithProviders { return { ngModule: CoreCommandModule, - providers: [CommandService, actionHandlers.map((handler) => ({ provide: FEATURE_ACTION_HANDLERS, useClass: handler, multi: true }))], + providers: [ + CommandService, + actionHandlers.map((handler) => ({ provide: FEATURE_ACTION_HANDLERS, useClass: handler, multi: true })), + ], }; } } diff --git a/apps/isa-app/src/core/config/config.module.ts b/apps/isa-app/src/core/config/config.module.ts index 6bde205a0..e1e704c2f 100644 --- a/apps/isa-app/src/core/config/config.module.ts +++ b/apps/isa-app/src/core/config/config.module.ts @@ -21,7 +21,9 @@ export class ConfigModule { providers: [ Config, configLoaderProvider, - options.jsonConfigLoaderUrl ? { provide: CORE_JSON_CONFIG_LOADER_URL, useValue: options.jsonConfigLoaderUrl } : null, + options.jsonConfigLoaderUrl + ? { provide: CORE_JSON_CONFIG_LOADER_URL, useValue: options.jsonConfigLoaderUrl } + : null, ], }; } diff --git a/apps/isa-app/src/domain/availability/availability.service.ts b/apps/isa-app/src/domain/availability/availability.service.ts index d06e6f8c8..78ba9e163 100644 --- a/apps/isa-app/src/domain/availability/availability.service.ts +++ b/apps/isa-app/src/domain/availability/availability.service.ts @@ -19,7 +19,12 @@ import { AvailabilityDTO as CatAvailabilityDTO } from '@generated/swagger/cat-se import { map, shareReplay, switchMap, withLatestFrom, mergeMap, timeout, first } from 'rxjs/operators'; import { isArray, memorize } from '@utils/common'; import { LogisticianDTO, LogisticianService } from '@generated/swagger/oms-api'; -import { ResponseArgsOfIEnumerableOfStockInfoDTO, StockDTO, StockInfoDTO, StockService } from '@generated/swagger/inventory-api'; +import { + ResponseArgsOfIEnumerableOfStockInfoDTO, + StockDTO, + StockInfoDTO, + StockService, +} from '@generated/swagger/inventory-api'; import { PriceDTO } from '@generated/swagger/availability-api'; import { AvailabilityByBranchDTO, ItemData, Ssc } from './defs'; import { Availability } from './defs/availability'; @@ -171,7 +176,13 @@ export class DomainAvailabilityService { ), map(([response, supplier, defaultBranch]) => { const price = item?.price; - return this._mapToTakeAwayAvailability({ response, supplier, branchId: branch?.id ?? defaultBranch?.id, quantity, price }); + return this._mapToTakeAwayAvailability({ + response, + supplier, + branchId: branch?.id ?? defaultBranch?.id, + quantity, + price, + }); }), shareReplay(1), ); @@ -216,7 +227,13 @@ export class DomainAvailabilityService { switchMap((s) => this._stockService.StockInStockByEAN({ eans, stockId: s.id })), withLatestFrom(this.getTakeAwaySupplier(), this.getDefaultBranch()), map(([response, supplier, defaultBranch]) => { - return this._mapToTakeAwayAvailability({ response, supplier, branchId: branchId ?? defaultBranch.id, quantity, price }); + return this._mapToTakeAwayAvailability({ + response, + supplier, + branchId: branchId ?? defaultBranch.id, + quantity, + price, + }); }), shareReplay(1), ); @@ -329,7 +346,10 @@ export class DomainAvailabilityService { this.getPickUpAvailability({ item, quantity, branch: branch ?? defaultBranch }).pipe( mergeMap((availability) => logistician$.pipe( - map((logistician) => ({ ...(availability?.length > 0 ? availability[0] : []), logistician: { id: logistician.id } })), + map((logistician) => ({ + ...(availability?.length > 0 ? availability[0] : []), + logistician: { id: logistician.id }, + })), ), ), shareReplay(1), @@ -427,7 +447,9 @@ export class DomainAvailabilityService { return this.getPickUpAvailabilities(payload, true).pipe( timeout(20000), switchMap((availability) => - logistician$.pipe(map((logistician) => ({ availability: [...availability], logistician: { id: logistician.id } }))), + logistician$.pipe( + map((logistician) => ({ availability: [...availability], logistician: { id: logistician.id } })), + ), ), shareReplay(1), ); @@ -512,7 +534,9 @@ export class DomainAvailabilityService { return availability; } - private _mapToPickUpAvailability(availabilities: SwaggerAvailabilityDTO[]): Availability[] { + private _mapToPickUpAvailability( + availabilities: SwaggerAvailabilityDTO[], + ): Availability[] { if (isArray(availabilities)) { const preferred = availabilities.filter((f) => f.preferred === 1); const totalAvailable = availabilities.reduce((sum, av) => sum + (av?.qty || 0), 0); @@ -572,7 +596,9 @@ export class DomainAvailabilityService { } const stock$ = branchId$.pipe( - mergeMap((branchId) => this._stockService.StockGetStocksByBranch({ branchId }).pipe(map((response) => response.result?.[0]))), + mergeMap((branchId) => + this._stockService.StockGetStocksByBranch({ branchId }).pipe(map((response) => response.result?.[0])), + ), ); return stock$.pipe( @@ -598,7 +624,9 @@ export class DomainAvailabilityService { getInStock({ itemIds, branchId }: { itemIds: number[]; branchId: number }): Observable { return this.getStockByBranch(branchId).pipe( mergeMap((stock) => - this._stockService.StockInStock({ articleIds: itemIds, stockId: stock.id }).pipe(map((response) => response.result)), + this._stockService + .StockInStock({ articleIds: itemIds, stockId: stock.id }) + .pipe(map((response) => response.result)), ), ); } diff --git a/apps/isa-app/src/domain/availability/in-stock.service.ts b/apps/isa-app/src/domain/availability/in-stock.service.ts index 14bbbed5d..7111627a3 100644 --- a/apps/isa-app/src/domain/availability/in-stock.service.ts +++ b/apps/isa-app/src/domain/availability/in-stock.service.ts @@ -90,10 +90,15 @@ export class DomainInStockService { const grouped = groupBy(itemBranchData, 'branchId'); Object.keys(grouped).forEach((key) => { const branchId = Number(key); - const itemIds = itemBranchData.filter((itemBranch) => itemBranch.branchId === branchId).map((item) => item.itemId); + const itemIds = itemBranchData + .filter((itemBranch) => itemBranch.branchId === branchId) + .map((item) => item.itemId); this._availability .getInStock({ itemIds, branchId }) - .subscribe(this._fetchStockDataResponse({ itemIds, branchId }), this._fetchStockDataError({ itemIds, branchId })); + .subscribe( + this._fetchStockDataResponse({ itemIds, branchId }), + this._fetchStockDataError({ itemIds, branchId }), + ); }); } @@ -101,7 +106,9 @@ export class DomainInStockService { ({ itemIds, branchId }: { itemIds: number[]; branchId: number }) => (stockInfos: StockInfoDTO[]) => { itemIds.forEach((itemId) => { - const stockInfo = stockInfos.find((stockInfo) => stockInfo.itemId === itemId && stockInfo.branchId === branchId); + const stockInfo = stockInfos.find( + (stockInfo) => stockInfo.itemId === itemId && stockInfo.branchId === branchId, + ); let inStock = 0; if (stockInfo?.inStock) { diff --git a/apps/isa-app/src/domain/catalog/catalog.service.ts b/apps/isa-app/src/domain/catalog/catalog.service.ts index 79d37831e..e43c05977 100644 --- a/apps/isa-app/src/domain/catalog/catalog.service.ts +++ b/apps/isa-app/src/domain/catalog/catalog.service.ts @@ -1,6 +1,11 @@ import { Injectable } from '@angular/core'; import { ApplicationService } from '@core/application'; -import { AutocompleteTokenDTO, PromotionService, QueryTokenDTO, SearchService } from '@generated/swagger/cat-search-api'; +import { + AutocompleteTokenDTO, + PromotionService, + QueryTokenDTO, + SearchService, +} from '@generated/swagger/cat-search-api'; import { memorize } from '@utils/common'; import { map, share, shareReplay } from 'rxjs/operators'; diff --git a/apps/isa-app/src/domain/checkout/checkout.module.ts b/apps/isa-app/src/domain/checkout/checkout.module.ts index bcf77c887..a071a8cea 100644 --- a/apps/isa-app/src/domain/checkout/checkout.module.ts +++ b/apps/isa-app/src/domain/checkout/checkout.module.ts @@ -21,6 +21,9 @@ export class DomainCheckoutModule { } @NgModule({ - imports: [StoreModule.forFeature(storeFeatureName, domainCheckoutReducer), EffectsModule.forFeature([DomainCheckoutEffects])], + imports: [ + StoreModule.forFeature(storeFeatureName, domainCheckoutReducer), + EffectsModule.forFeature([DomainCheckoutEffects]), + ], }) export class RootDomainCheckoutModule {} diff --git a/apps/isa-app/src/domain/checkout/checkout.service.ts b/apps/isa-app/src/domain/checkout/checkout.service.ts index b7c1a5220..ce9e18df4 100644 --- a/apps/isa-app/src/domain/checkout/checkout.service.ts +++ b/apps/isa-app/src/domain/checkout/checkout.service.ts @@ -135,7 +135,13 @@ export class DomainCheckoutService { ); } - addItemToShoppingCart({ processId, items }: { processId: number; items: AddToShoppingCartDTO[] }): Observable { + addItemToShoppingCart({ + processId, + items, + }: { + processId: number; + items: AddToShoppingCartDTO[]; + }): Observable { return this.getShoppingCart({ processId }).pipe( first(), mergeMap((cart) => @@ -488,7 +494,11 @@ export class DomainCheckoutService { checkAvailabilities({ processId }: { processId: number }): Observable { const shoppingCart$ = this.getShoppingCart({ processId }).pipe(first()); const itemsToCheck$ = shoppingCart$.pipe( - map((cart) => cart?.items?.filter((item) => item?.data?.features?.orderType === 'Download' && !item.data.availability.lastRequest)), + map((cart) => + cart?.items?.filter( + (item) => item?.data?.features?.orderType === 'Download' && !item.data.availability.lastRequest, + ), + ), ); return itemsToCheck$.pipe( @@ -537,7 +547,8 @@ export class DomainCheckoutService { const itemsToUpdate$ = shoppingCart$.pipe( map((cart) => cart?.items?.filter( - (item) => item?.data?.features?.orderType === 'DIG-Versand' || item?.data?.features?.orderType === 'B2B-Versand', + (item) => + item?.data?.features?.orderType === 'DIG-Versand' || item?.data?.features?.orderType === 'B2B-Versand', ), ), ); @@ -770,7 +781,9 @@ export class DomainCheckoutService { const availabilities$ = this.validateAvailabilities({ processId }); - return combineLatest([olaStatus$, availabilities$]).pipe(map(([olaStatus, availabilities]) => olaStatus && availabilities)); + return combineLatest([olaStatus$, availabilities$]).pipe( + map(([olaStatus, availabilities]) => olaStatus && availabilities), + ); } completeCheckout({ processId }: { processId: number }): Observable { @@ -871,7 +884,8 @@ export class DomainCheckoutService { const setPaymentType$ = itemOrderOptions$.pipe( mergeMap(({ hasDownload, hasDelivery, hasDigDelivery, hasB2BDelivery }) => { - const paymentType = hasDownload || hasDelivery || hasDigDelivery || hasB2BDelivery ? 128 /* Rechnung */ : 4; /* Bar */ + const paymentType = + hasDownload || hasDelivery || hasDigDelivery || hasB2BDelivery ? 128 /* Rechnung */ : 4; /* Bar */ return this.setPayment({ processId, paymentType }); }), shareReplay(), @@ -1057,7 +1071,13 @@ export class DomainCheckoutService { .pipe(shareReplay(1)); } - setNotificationChannels({ processId, notificationChannels }: { processId: number; notificationChannels: NotificationChannel }): void { + setNotificationChannels({ + processId, + notificationChannels, + }: { + processId: number; + notificationChannels: NotificationChannel; + }): void { this.store.dispatch(DomainCheckoutActions.setNotificationChannels({ processId, notificationChannels })); } @@ -1065,7 +1085,15 @@ export class DomainCheckoutService { return this.store.select(DomainCheckoutSelectors.selectNotificationChannels, { processId }); } - setBuyerCommunicationDetails({ processId, mobile, email }: { processId: number; mobile?: string; email?: string }): void { + setBuyerCommunicationDetails({ + processId, + mobile, + email, + }: { + processId: number; + mobile?: string; + email?: string; + }): void { this.store.dispatch(DomainCheckoutActions.setBuyerCommunicationDetails({ processId, mobile, email })); } @@ -1125,7 +1153,11 @@ export class DomainCheckoutService { .pipe( map((r) => { return r.result.filter( - (branch) => branch.status === 1 && branch.branchType === 1 && branch.isOnline === true && branch.isShippingEnabled === true, + (branch) => + branch.status === 1 && + branch.branchType === 1 && + branch.isOnline === true && + branch.isShippingEnabled === true, ); }), shareReplay(), diff --git a/apps/isa-app/src/domain/checkout/store/domain-checkout.actions.ts b/apps/isa-app/src/domain/checkout/store/domain-checkout.actions.ts index 3c16cb13a..68988fee0 100644 --- a/apps/isa-app/src/domain/checkout/store/domain-checkout.actions.ts +++ b/apps/isa-app/src/domain/checkout/store/domain-checkout.actions.ts @@ -14,9 +14,15 @@ import { DisplayOrderDTO, DisplayOrderItemDTO } from '@generated/swagger/oms-api const prefix = '[DOMAIN-CHECKOUT]'; -export const setShoppingCart = createAction(`${prefix} Set Shopping Cart`, props<{ processId: number; shoppingCart: ShoppingCartDTO }>()); +export const setShoppingCart = createAction( + `${prefix} Set Shopping Cart`, + props<{ processId: number; shoppingCart: ShoppingCartDTO }>(), +); -export const setCheckout = createAction(`${prefix} Set Checkout`, props<{ processId: number; checkout: CheckoutDTO }>()); +export const setCheckout = createAction( + `${prefix} Set Checkout`, + props<{ processId: number; checkout: CheckoutDTO }>(), +); export const setNotificationChannels = createAction( `${prefix} Set Notification Channel`, @@ -45,7 +51,10 @@ export const setShippingAddress = createAction( props<{ processId: number; shippingAddress: ShippingAddressDTO }>(), ); -export const removeCheckoutWithProcessId = createAction(`${prefix} Remove Checkout With Process Id`, props<{ processId: number }>()); +export const removeCheckoutWithProcessId = createAction( + `${prefix} Remove Checkout With Process Id`, + props<{ processId: number }>(), +); export const setOrders = createAction(`${prefix} Add Orders`, props<{ orders: DisplayOrderDTO[] }>()); @@ -57,11 +66,20 @@ export const setBuyer = createAction(`${prefix} Set Buyer`, props<{ processId: n export const setPayer = createAction(`${prefix} Set Payer`, props<{ processId: number; payer: PayerDTO }>()); -export const setSpecialComment = createAction(`${prefix} Set Agent Comment`, props<{ processId: number; agentComment: string }>()); +export const setSpecialComment = createAction( + `${prefix} Set Agent Comment`, + props<{ processId: number; agentComment: string }>(), +); -export const setOlaError = createAction(`${prefix} Set Ola Error`, props<{ processId: number; olaErrorIds: number[] }>()); +export const setOlaError = createAction( + `${prefix} Set Ola Error`, + props<{ processId: number; olaErrorIds: number[] }>(), +); -export const setCustomer = createAction(`${prefix} Set Customer`, props<{ processId: number; customer: CustomerDTO }>()); +export const setCustomer = createAction( + `${prefix} Set Customer`, + props<{ processId: number; customer: CustomerDTO }>(), +); export const addShoppingCartItemAvailabilityToHistory = createAction( `${prefix} Add Shopping Cart Item Availability To History`, diff --git a/apps/isa-app/src/domain/checkout/store/domain-checkout.reducer.ts b/apps/isa-app/src/domain/checkout/store/domain-checkout.reducer.ts index 417aed2a5..d2351ac85 100644 --- a/apps/isa-app/src/domain/checkout/store/domain-checkout.reducer.ts +++ b/apps/isa-app/src/domain/checkout/store/domain-checkout.reducer.ts @@ -12,7 +12,9 @@ const _domainCheckoutReducer = createReducer( const entity = getOrCreateCheckoutEntity({ processId, entities: s.entities }); const addedShoppingCartItems = - shoppingCart?.items?.filter((item) => !entity.shoppingCart?.items?.find((i) => i.id === item.id))?.map((item) => item.data) ?? []; + shoppingCart?.items + ?.filter((item) => !entity.shoppingCart?.items?.find((i) => i.id === item.id)) + ?.map((item) => item.data) ?? []; entity.shoppingCart = shoppingCart; @@ -118,27 +120,34 @@ const _domainCheckoutReducer = createReducer( entity.customer = customer; return storeCheckoutAdapter.setOne(entity, s); }), - on(DomainCheckoutActions.addShoppingCartItemAvailabilityToHistory, (s, { processId, shoppingCartItemId, availability }) => { - const entity = getOrCreateCheckoutEntity({ processId, entities: s.entities }); + on( + DomainCheckoutActions.addShoppingCartItemAvailabilityToHistory, + (s, { processId, shoppingCartItemId, availability }) => { + const entity = getOrCreateCheckoutEntity({ processId, entities: s.entities }); - const itemAvailabilityTimestamp = entity?.itemAvailabilityTimestamp ? { ...entity?.itemAvailabilityTimestamp } : {}; + const itemAvailabilityTimestamp = entity?.itemAvailabilityTimestamp + ? { ...entity?.itemAvailabilityTimestamp } + : {}; - const item = entity?.shoppingCart?.items?.find((i) => i.id === shoppingCartItemId)?.data; + const item = entity?.shoppingCart?.items?.find((i) => i.id === shoppingCartItemId)?.data; - if (!item?.features?.orderType) return s; + if (!item?.features?.orderType) return s; - itemAvailabilityTimestamp[`${item.id}_${item?.features?.orderType}`] = Date.now(); + itemAvailabilityTimestamp[`${item.id}_${item?.features?.orderType}`] = Date.now(); - entity.itemAvailabilityTimestamp = itemAvailabilityTimestamp; + entity.itemAvailabilityTimestamp = itemAvailabilityTimestamp; - return storeCheckoutAdapter.setOne(entity, s); - }), + return storeCheckoutAdapter.setOne(entity, s); + }, + ), on( DomainCheckoutActions.addShoppingCartItemAvailabilityToHistoryByShoppingCartId, (s, { shoppingCartId, shoppingCartItemId, availability }) => { const entity = getCheckoutEntityByShoppingCartId({ shoppingCartId, entities: s.entities }); - const itemAvailabilityTimestamp = entity?.itemAvailabilityTimestamp ? { ...entity?.itemAvailabilityTimestamp } : {}; + const itemAvailabilityTimestamp = entity?.itemAvailabilityTimestamp + ? { ...entity?.itemAvailabilityTimestamp } + : {}; const item = entity?.shoppingCart?.items?.find((i) => i.id === shoppingCartItemId)?.data; @@ -157,7 +166,13 @@ export function domainCheckoutReducer(state, action) { return _domainCheckoutReducer(state, action); } -function getOrCreateCheckoutEntity({ entities, processId }: { entities: Dictionary; processId: number }): CheckoutEntity { +function getOrCreateCheckoutEntity({ + entities, + processId, +}: { + entities: Dictionary; + processId: number; +}): CheckoutEntity { let entity = entities[processId]; if (isNullOrUndefined(entity)) { diff --git a/apps/isa-app/src/domain/checkout/store/domain-checkout.selectors.ts b/apps/isa-app/src/domain/checkout/store/domain-checkout.selectors.ts index 94aefbc6f..1cb865035 100644 --- a/apps/isa-app/src/domain/checkout/store/domain-checkout.selectors.ts +++ b/apps/isa-app/src/domain/checkout/store/domain-checkout.selectors.ts @@ -23,7 +23,8 @@ export const selectCheckoutByProcessId = createSelector( export const selectCustomerFeaturesByProcessId = createSelector( selectEntities, - (entities: Dictionary, { processId }: { processId: number }) => getCusomterFeatures(entities[processId]?.customer), + (entities: Dictionary, { processId }: { processId: number }) => + getCusomterFeatures(entities[processId]?.customer), ); export const selectShippingAddressByProcessId = createSelector( @@ -48,12 +49,14 @@ export const selectSpecialComment = createSelector( export const selectNotificationChannels = createSelector( selectEntities, - (entities: Dictionary, { processId }: { processId: number }) => entities[processId]?.notificationChannels, + (entities: Dictionary, { processId }: { processId: number }) => + entities[processId]?.notificationChannels, ); export const selectBuyerCommunicationDetails = createSelector( selectEntities, - (entities: Dictionary, { processId }: { processId: number }) => entities[processId]?.buyer?.communicationDetails, + (entities: Dictionary, { processId }: { processId: number }) => + entities[processId]?.buyer?.communicationDetails, ); export const selectOrders = createSelector(storeFeatureSelector, (s) => s.orders); diff --git a/apps/isa-app/src/domain/crm/crm-customer.service.ts b/apps/isa-app/src/domain/crm/crm-customer.service.ts index f5a8e8105..722bbf4b5 100644 --- a/apps/isa-app/src/domain/crm/crm-customer.service.ts +++ b/apps/isa-app/src/domain/crm/crm-customer.service.ts @@ -226,7 +226,13 @@ export class CrmCustomerService { } async updateToOnlineCustomer(customer: CustomerDTO): Promise> { - const payload: CustomerDTO = { shippingAddresses: [], payers: [], ...customer, customerType: 8, hasOnlineAccount: true }; + const payload: CustomerDTO = { + shippingAddresses: [], + payers: [], + ...customer, + customerType: 8, + hasOnlineAccount: true, + }; const notificationChannels = this.getNotificationChannelForCommunicationDetails({ communicationDetails: payload?.communicationDetails, @@ -466,21 +472,30 @@ export class CrmCustomerService { return this.loyaltyCardService.LoyaltyCardCheckLoyaltyCard({ loyaltyCardNumber, customerId }); } - createPayer(customerId: number, payer: PayerDTO, isDefault?: boolean): Promise<[Result, Result]> { + createPayer( + customerId: number, + payer: PayerDTO, + isDefault?: boolean, + ): Promise<[Result, Result]> { return this.getCustomer(customerId) .pipe( mergeMap((customerResponse) => - this.payerService - .PayerCreatePayer({ ...payer, payerType: customerResponse.result.customerType }) - .pipe( - mergeMap((payerResponse) => - this.customerService - .CustomerAddPayerReference({ customerId: customerId, payerId: payerResponse.result.id, isDefault: isDefault }) - .pipe( - map((assigendPayerResponse) => [payerResponse, assigendPayerResponse] as [Result, Result]), + this.payerService.PayerCreatePayer({ ...payer, payerType: customerResponse.result.customerType }).pipe( + mergeMap((payerResponse) => + this.customerService + .CustomerAddPayerReference({ + customerId: customerId, + payerId: payerResponse.result.id, + isDefault: isDefault, + }) + .pipe( + map( + (assigendPayerResponse) => + [payerResponse, assigendPayerResponse] as [Result, Result], ), - ), + ), ), + ), ), ) .toPromise(); @@ -496,7 +511,11 @@ export class CrmCustomerService { return this.customerService.CustomerModifyPayerReference({ payerId, customerId, isDefault }); } - createShippingAddress(customerId: number, shippingAddress: ShippingAddressDTO, isDefault?: boolean): Promise> { + createShippingAddress( + customerId: number, + shippingAddress: ShippingAddressDTO, + isDefault?: boolean, + ): Promise> { const data: ShippingAddressDTO = { ...shippingAddress }; if (isDefault) { data.isDefault = new Date().toJSON(); @@ -504,7 +523,9 @@ export class CrmCustomerService { delete data.isDefault; } - return this.shippingAddressService.ShippingAddressCreateShippingAddress({ customerId, shippingAddress: data }).toPromise(); + return this.shippingAddressService + .ShippingAddressCreateShippingAddress({ customerId, shippingAddress: data }) + .toPromise(); } updateShippingAddress( @@ -530,7 +551,9 @@ export class CrmCustomerService { return this.shippingAddressService.ShippingAddressGetShippingaddress(shippingAddressId); } - getShippingAddresses(params: ShippingAddressService.ShippingAddressGetShippingAddressesParams): Observable> { + getShippingAddresses( + params: ShippingAddressService.ShippingAddressGetShippingAddressesParams, + ): Observable> { return this.shippingAddressService.ShippingAddressGetShippingAddresses(params); } diff --git a/apps/isa-app/src/domain/crm/helpers/address.helper.spec.ts b/apps/isa-app/src/domain/crm/helpers/address.helper.spec.ts index 9fc260976..b0725ffa5 100644 --- a/apps/isa-app/src/domain/crm/helpers/address.helper.spec.ts +++ b/apps/isa-app/src/domain/crm/helpers/address.helper.spec.ts @@ -3,7 +3,12 @@ import { AddressHelper } from './address.helper'; describe('AddressHelper', () => { describe('hasRequiredProperties', () => { it('should return true', () => { - const result = AddressHelper.hasRequiredProperties({ city: 'Teststadt', street: 'Teststr.', zipCode: '12345', country: 'DEU' }); + const result = AddressHelper.hasRequiredProperties({ + city: 'Teststadt', + street: 'Teststr.', + zipCode: '12345', + country: 'DEU', + }); expect(result).toBeTruthy(); }); diff --git a/apps/isa-app/src/domain/crm/helpers/shipping-address.helper.spec.ts b/apps/isa-app/src/domain/crm/helpers/shipping-address.helper.spec.ts index c3a820537..34fd11bcb 100644 --- a/apps/isa-app/src/domain/crm/helpers/shipping-address.helper.spec.ts +++ b/apps/isa-app/src/domain/crm/helpers/shipping-address.helper.spec.ts @@ -9,7 +9,11 @@ describe('ShippingAddressHelper', () => { }); it('should return the latest default shippingAdress', () => { - const shippingAdress: ShippingAddressDTO[] = [{ isDefault: new Date().toJSON() }, { isDefault: new Date(2020, 5, 15).toJSON() }, {}]; + const shippingAdress: ShippingAddressDTO[] = [ + { isDefault: new Date().toJSON() }, + { isDefault: new Date(2020, 5, 15).toJSON() }, + {}, + ]; expect(ShippingAddressHelper.getDefaultShippingAddress(shippingAdress)).toEqual(shippingAdress[0]); }); }); diff --git a/apps/isa-app/src/domain/oms/action-handlers/print-shipping-note.action-handler.ts b/apps/isa-app/src/domain/oms/action-handlers/print-shipping-note.action-handler.ts index 4a0aada27..338f3468c 100644 --- a/apps/isa-app/src/domain/oms/action-handlers/print-shipping-note.action-handler.ts +++ b/apps/isa-app/src/domain/oms/action-handlers/print-shipping-note.action-handler.ts @@ -21,7 +21,9 @@ export class PrintShippingNoteActionHandler extends ActionHandler receipt?.buyer?.buyerNumber)) { - await this.domainPrinterService.printShippingNote({ printer, receipts: group?.items?.map((r) => r?.id) }).toPromise(); + await this.domainPrinterService + .printShippingNote({ printer, receipts: group?.items?.map((r) => r?.id) }) + .toPromise(); } return { error: false, diff --git a/apps/isa-app/src/domain/oms/action-handlers/print-smallamountinvoice.action-handler.ts b/apps/isa-app/src/domain/oms/action-handlers/print-smallamountinvoice.action-handler.ts index d9df6d825..cb9602d04 100644 --- a/apps/isa-app/src/domain/oms/action-handlers/print-smallamountinvoice.action-handler.ts +++ b/apps/isa-app/src/domain/oms/action-handlers/print-smallamountinvoice.action-handler.ts @@ -21,7 +21,10 @@ export class PrintSmallamountinvoiceActionHandler extends ActionHandler): Promise { + private _printKleinbetragsrechnungHelper( + printer: string, + receiptGroup: Group, + ): Promise { return firstValueFrom( this.omsPrintService.OMSPrintKleinbetragsrechnung({ data: receiptGroup?.items?.map((r) => r?.id), diff --git a/apps/isa-app/src/domain/oms/action-handlers/shop-with-kulturpass.action-handler.ts b/apps/isa-app/src/domain/oms/action-handlers/shop-with-kulturpass.action-handler.ts index 5970beb4a..8728d39de 100644 --- a/apps/isa-app/src/domain/oms/action-handlers/shop-with-kulturpass.action-handler.ts +++ b/apps/isa-app/src/domain/oms/action-handlers/shop-with-kulturpass.action-handler.ts @@ -33,7 +33,10 @@ export class ShopWithKulturpassActionHandler extends ActionHandler [...acc, ...item.subsetItems], [] as DisplayOrderItemSubsetDTO[]); + const subsetItems = displayOrder.items.reduce( + (acc, item) => [...acc, ...item.subsetItems], + [] as DisplayOrderItemSubsetDTO[], + ); const orderItems = await this.getItems(displayOrder.orderNumber); diff --git a/apps/isa-app/src/domain/oms/oms.service.ts b/apps/isa-app/src/domain/oms/oms.service.ts index 9dd442b76..6e9122e12 100644 --- a/apps/isa-app/src/domain/oms/oms.service.ts +++ b/apps/isa-app/src/domain/oms/oms.service.ts @@ -48,10 +48,14 @@ export class DomainOmsService { } getHistory(orderItemSubsetId: number): Observable { - return this.orderService.OrderGetOrderItemStatusHistory({ orderItemSubsetId }).pipe(map((response) => response.result)); + return this.orderService + .OrderGetOrderItemStatusHistory({ orderItemSubsetId }) + .pipe(map((response) => response.result)); } - getReceipts(orderItemSubsetIds: number[]): Observable { + getReceipts( + orderItemSubsetIds: number[], + ): Observable { return this.receiptService .ReceiptGetReceiptsByOrderItemSubset({ payload: { @@ -133,14 +137,20 @@ export class DomainOmsService { .pipe(map((o) => o.result)); } - setEstimatedShippingDate(orderId: number, orderItemId: number, orderItemSubsetId: number, estimatedShippingDate: Date | string) { + setEstimatedShippingDate( + orderId: number, + orderItemId: number, + orderItemSubsetId: number, + estimatedShippingDate: Date | string, + ) { return this.orderService .OrderPatchOrderItemSubset({ orderId, orderItemId, orderItemSubsetId, orderItemSubset: { - estimatedShippingDate: estimatedShippingDate instanceof Date ? estimatedShippingDate.toJSON() : estimatedShippingDate, + estimatedShippingDate: + estimatedShippingDate instanceof Date ? estimatedShippingDate.toJSON() : estimatedShippingDate, }, }) .pipe(map((response) => response.result)); @@ -171,7 +181,15 @@ export class DomainOmsService { return this.orderService.OrderChangeStockStatusCode(payload).pipe(map((response) => response.result)); } - orderAtSupplier({ orderId, orderItemId, orderItemSubsetId }: { orderId: number; orderItemId: number; orderItemSubsetId: number }) { + orderAtSupplier({ + orderId, + orderItemId, + orderItemSubsetId, + }: { + orderId: number; + orderItemId: number; + orderItemSubsetId: number; + }) { return this._orderCheckoutService.OrderCheckoutOrderSubsetItemAtSupplier({ orderId, orderItemId, @@ -273,7 +291,14 @@ export class DomainOmsService { skip?: number; }): Observable> { return this.orderService - .OrderGetOrderItemSubsetTasks({ orderId, orderItemId, orderItemSubsetId, completed: new Date(0).toISOString(), take, skip }) + .OrderGetOrderItemSubsetTasks({ + orderId, + orderItemId, + orderItemSubsetId, + completed: new Date(0).toISOString(), + take, + skip, + }) .pipe( map((res) => res.result diff --git a/apps/isa-app/src/domain/pickup-shelf/pickup-shelf-in.service.ts b/apps/isa-app/src/domain/pickup-shelf/pickup-shelf-in.service.ts index 467d31fe9..b64b6059f 100644 --- a/apps/isa-app/src/domain/pickup-shelf/pickup-shelf-in.service.ts +++ b/apps/isa-app/src/domain/pickup-shelf/pickup-shelf-in.service.ts @@ -54,7 +54,9 @@ export class PickupShelfInService extends PickupShelfIOService { }); } - getOrderItemsByCustomerNumber(args: { customerNumber: string }): Observable { + getOrderItemsByCustomerNumber(args: { + customerNumber: string; + }): Observable { return this._abholfachService.AbholfachWareneingang({ filter: { orderitemprocessingstatus: '16;128;8192;1048576' }, input: { diff --git a/apps/isa-app/src/domain/pickup-shelf/pickup-shelf-io.service.ts b/apps/isa-app/src/domain/pickup-shelf/pickup-shelf-io.service.ts index e926a4ae0..9ae252446 100644 --- a/apps/isa-app/src/domain/pickup-shelf/pickup-shelf-io.service.ts +++ b/apps/isa-app/src/domain/pickup-shelf/pickup-shelf-io.service.ts @@ -25,5 +25,7 @@ export abstract class PickupShelfIOService { filter?: Filter; }): Observable; - abstract getOrderItemsByCustomerNumber(args: { customerNumber: string }): Observable; + abstract getOrderItemsByCustomerNumber(args: { + customerNumber: string; + }): Observable; } diff --git a/apps/isa-app/src/domain/pickup-shelf/pickup-shelf-out.service.ts b/apps/isa-app/src/domain/pickup-shelf/pickup-shelf-out.service.ts index e37f48324..870415da7 100644 --- a/apps/isa-app/src/domain/pickup-shelf/pickup-shelf-out.service.ts +++ b/apps/isa-app/src/domain/pickup-shelf/pickup-shelf-out.service.ts @@ -55,7 +55,9 @@ export class PickupShelfOutService extends PickupShelfIOService { }); } - getOrderItemsByCustomerNumber(args: { customerNumber: string }): Observable { + getOrderItemsByCustomerNumber(args: { + customerNumber: string; + }): Observable { throw new Error('Method not implemented.'); } } diff --git a/apps/isa-app/src/domain/printer/printer.service.ts b/apps/isa-app/src/domain/printer/printer.service.ts index 1bdf3ff38..eafadd126 100644 --- a/apps/isa-app/src/domain/printer/printer.service.ts +++ b/apps/isa-app/src/domain/printer/printer.service.ts @@ -50,7 +50,11 @@ export class DomainPrinterService { } if (response.error) { return { - error: response.message ? response.message : response.error.message ? response.error.message : 'Ein Fehler ist aufgetreten', + error: response.message + ? response.message + : response.error.message + ? response.error.message + : 'Ein Fehler ist aufgetreten', }; } @@ -81,7 +85,11 @@ export class DomainPrinterService { } if (response.error) { return { - error: response.message ? response.message : response.error.message ? response.error.message : 'Ein Fehler ist aufgetreten', + error: response.message + ? response.message + : response.error.message + ? response.error.message + : 'Ein Fehler ist aufgetreten', }; } @@ -112,7 +120,11 @@ export class DomainPrinterService { } if (response.error) { return { - error: response.message ? response.message : response.error.message ? response.error.message : 'Ein Fehler ist aufgetreten', + error: response.message + ? response.message + : response.error.message + ? response.error.message + : 'Ein Fehler ist aufgetreten', }; } @@ -208,7 +220,9 @@ export class DomainPrinterService { }); } - printProductListItemsResponse(payload: DocumentPayloadOfIEnumerableOfProductListItemDTO): Observable { + printProductListItemsResponse( + payload: DocumentPayloadOfIEnumerableOfProductListItemDTO, + ): Observable { return this._productListService.ProductListProductListItemPdfAsBase64(payload); } @@ -254,7 +268,15 @@ export class DomainPrinterService { ); } - printDisplayInfoDTOList({ displayInfos, printer, title }: { displayInfos: DisplayInfoDTO[]; printer: string; title?: string }) { + printDisplayInfoDTOList({ + displayInfos, + printer, + title, + }: { + displayInfos: DisplayInfoDTO[]; + printer: string; + title?: string; + }) { return this.eisPublicDocumentService .EISPublicDocumentGetInfosPdfAsBase64({ payload: { data: displayInfos, title }, diff --git a/apps/isa-app/src/domain/remission/remission.service.spec.ts b/apps/isa-app/src/domain/remission/remission.service.spec.ts index 5db764327..d34ce9faf 100644 --- a/apps/isa-app/src/domain/remission/remission.service.spec.ts +++ b/apps/isa-app/src/domain/remission/remission.service.spec.ts @@ -1,7 +1,13 @@ import { Logger } from '@core/logger'; import { createServiceFactory, SpectatorService } from '@ngneat/spectator'; import { SearchService } from '@generated/swagger/cat-search-api'; -import { PackageService, RemiService, ReturnService, StockService, SupplierService } from '@generated/swagger/inventory-api'; +import { + PackageService, + RemiService, + ReturnService, + StockService, + SupplierService, +} from '@generated/swagger/inventory-api'; import { DomainRemissionService } from './remission.service'; import { DateAdapter } from '@ui/common'; @@ -9,7 +15,16 @@ describe('DomainRemissionService', () => { let service: SpectatorService; const createService = createServiceFactory({ service: DomainRemissionService, - mocks: [RemiService, StockService, SupplierService, PackageService, ReturnService, SearchService, Logger, DateAdapter], + mocks: [ + RemiService, + StockService, + SupplierService, + PackageService, + ReturnService, + SearchService, + Logger, + DateAdapter, + ], }); beforeEach(() => { diff --git a/apps/isa-app/src/domain/remission/remission.service.ts b/apps/isa-app/src/domain/remission/remission.service.ts index 6a04b1054..0c521fac8 100644 --- a/apps/isa-app/src/domain/remission/remission.service.ts +++ b/apps/isa-app/src/domain/remission/remission.service.ts @@ -174,7 +174,9 @@ export class DomainRemissionService { ); } - getItemsForPflichtremission(arg: { queryToken: RemiQueryTokenDTO }): Observable<{ hits: number; result: RemissionListItem[] }> { + getItemsForPflichtremission(arg: { + queryToken: RemiQueryTokenDTO; + }): Observable<{ hits: number; result: RemissionListItem[] }> { return this._remiService .RemiPflichtremissionsartikel({ queryToken: arg.queryToken, @@ -187,7 +189,9 @@ export class DomainRemissionService { ); } - getItemsForAbteilungsremission(arg: { queryToken: RemiQueryTokenDTO }): Observable<{ hits: number; result: RemissionListItem[] }> { + getItemsForAbteilungsremission(arg: { + queryToken: RemiQueryTokenDTO; + }): Observable<{ hits: number; result: RemissionListItem[] }> { return this._remiService .RemiUeberlauf({ queryToken: arg.queryToken, @@ -213,7 +217,9 @@ export class DomainRemissionService { .pipe( map((res) => { const o = items.map((item) => { - const stockInfo = res?.result?.find((stockInfo) => stockInfo.itemId === +item.dto.product.catalogProductNumber); + const stockInfo = res?.result?.find( + (stockInfo) => stockInfo.itemId === +item.dto.product.catalogProductNumber, + ); if (!stockInfo) { const defaultStockData = { @@ -423,7 +429,15 @@ export class DomainRemissionService { return this._returnService.ReturnDeleteReturnItem({ itemId }); } - removeReturnItemFromReceipt({ returnId, receiptId, receiptItemId }: { returnId: number; receiptId: number; receiptItemId: number }) { + removeReturnItemFromReceipt({ + returnId, + receiptId, + receiptItemId, + }: { + returnId: number; + receiptId: number; + receiptItemId: number; + }) { return this._returnService.ReturnRemoveReturnItem({ returnId, receiptItemId, receiptId }); } diff --git a/apps/isa-app/src/domain/task-calendar/defs/processing-status-list.type.ts b/apps/isa-app/src/domain/task-calendar/defs/processing-status-list.type.ts index ce18ae57e..0683210a7 100644 --- a/apps/isa-app/src/domain/task-calendar/defs/processing-status-list.type.ts +++ b/apps/isa-app/src/domain/task-calendar/defs/processing-status-list.type.ts @@ -1,3 +1,10 @@ -export type ProcessingStatusType = 'Approved' | 'InProcess' | 'Completed' | 'Overdue' | 'Archived' | 'Uncompleted' | 'Removed'; +export type ProcessingStatusType = + | 'Approved' + | 'InProcess' + | 'Completed' + | 'Overdue' + | 'Archived' + | 'Uncompleted' + | 'Removed'; export type ProcessingStatusList = ProcessingStatusType[]; diff --git a/apps/isa-app/src/external/native-container/native-container.service.ts b/apps/isa-app/src/external/native-container/native-container.service.ts index d69bcd7aa..c6d9cde4c 100644 --- a/apps/isa-app/src/external/native-container/native-container.service.ts +++ b/apps/isa-app/src/external/native-container/native-container.service.ts @@ -75,7 +75,8 @@ export class NativeContainerService { } if (this.windowRef.nativeWindow['isRunningNative'] === undefined) { - this.windowRef.nativeWindow['isRunningNative'] = (_) => window.postMessage({ status: 'INIT', data: 'Is a WebView' }, '*'); + this.windowRef.nativeWindow['isRunningNative'] = (_) => + window.postMessage({ status: 'INIT', data: 'Is a WebView' }, '*'); } // Try sending ping request, to invoke the containers isRunningNative event diff --git a/apps/isa-app/src/modal/address-selection/address-selection-modal.service.ts b/apps/isa-app/src/modal/address-selection/address-selection-modal.service.ts index 37ca6f662..8cf00879a 100644 --- a/apps/isa-app/src/modal/address-selection/address-selection-modal.service.ts +++ b/apps/isa-app/src/modal/address-selection/address-selection-modal.service.ts @@ -27,7 +27,9 @@ export class AddressSelectionModalService { .toPromise(); if (addresses?.length > 0) { - const modalResult = await this.modal.open({ content: AddressSelectionModalComponent, data: addresses }).afterClosed$.toPromise(); + const modalResult = await this.modal + .open({ content: AddressSelectionModalComponent, data: addresses }) + .afterClosed$.toPromise(); if (modalResult?.data) { if (modalResult.data === 'continue') { return address; diff --git a/apps/isa-app/src/modal/availabilities/availabilities.component.html b/apps/isa-app/src/modal/availabilities/availabilities.component.html index fd1f886ba..a1cd1f88d 100644 --- a/apps/isa-app/src/modal/availabilities/availabilities.component.html +++ b/apps/isa-app/src/modal/availabilities/availabilities.component.html @@ -16,7 +16,10 @@

- {{ item.product?.name }} ist in den Umkreisfilialen folgendermaßen verfügbar: + {{ item.product?.name }} + ist in den + Umkreisfilialen + folgendermaßen verfügbar:


diff --git a/apps/isa-app/src/modal/availabilities/availabilities.component.ts b/apps/isa-app/src/modal/availabilities/availabilities.component.ts index 671538005..dddd7f656 100644 --- a/apps/isa-app/src/modal/availabilities/availabilities.component.ts +++ b/apps/isa-app/src/modal/availabilities/availabilities.component.ts @@ -46,7 +46,9 @@ export class ModalAvailabilitiesComponent { branch?.id !== userbranch?.id && branch?.branchType === 1, ) - .filter((b) => b.name?.toLowerCase()?.indexOf(search?.toLowerCase()) > -1 || b.address?.zipCode.indexOf(search) > -1) + .filter( + (b) => b.name?.toLowerCase()?.indexOf(search?.toLowerCase()) > -1 || b.address?.zipCode.indexOf(search) > -1, + ) .sort((a, b) => this.branchSorterFn( a, diff --git a/apps/isa-app/src/modal/history/history.component.html b/apps/isa-app/src/modal/history/history.component.html index 1d88e8846..1229573ca 100644 --- a/apps/isa-app/src/modal/history/history.component.html +++ b/apps/isa-app/src/modal/history/history.component.html @@ -9,5 +9,5 @@ {{ customerNumber }} - + diff --git a/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-item/kulturpass-order-item.store.ts b/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-item/kulturpass-order-item.store.ts index c2eb04c98..86b6a2035 100644 --- a/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-item/kulturpass-order-item.store.ts +++ b/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-item/kulturpass-order-item.store.ts @@ -36,7 +36,9 @@ export class KulturpassOrderItemStore extends ComponentStore state.item?.quantity ?? 0); - readonly availability$ = this.item$.pipe(switchMap((item) => this._parentStore.getAvailability$(getCatalogProductNumber(item)))); + readonly availability$ = this.item$.pipe( + switchMap((item) => this._parentStore.getAvailability$(getCatalogProductNumber(item))), + ); readonly availableQuantity$ = this.availability$.pipe(map((availability) => availability?.inStock ?? 0)); diff --git a/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-modal.component.html b/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-modal.component.html index 050d077b7..01a1cc7c6 100644 --- a/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-modal.component.html +++ b/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-modal.component.html @@ -22,7 +22,8 @@

- Warenkorb ist leer, bitte suchen oder scannen
+ Warenkorb ist leer, bitte suchen oder scannen +
Sie Artikel um den Warenkob zu füllen.

@@ -30,8 +31,7 @@ class="border-b border-solid border-[#EFF1F5]" *ngFor="let item of items$ | async; trackBy: trackItemById" [item]="item" - > - + >
@@ -56,7 +56,7 @@ [disabled]="orderButtonDisabled$ | async" (click)="order()" > - Kauf abschließen und Rechnung drucken + Kauf abschließen und Rechnung drucken
diff --git a/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-modal.component.ts b/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-modal.component.ts index 15edfdd50..85145e5e6 100644 --- a/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-modal.component.ts +++ b/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-modal.component.ts @@ -19,7 +19,13 @@ import { getCatalogProductNumber } from './catalog-product-number'; styleUrls: ['kulturpass-order-modal.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'shared-kulturpass-order-modal' }, - imports: [KulturpassOrderSearchboxComponent, CommonModule, BranchNamePipe, KulturpassOrderItemComponent, LoaderComponent], + imports: [ + KulturpassOrderSearchboxComponent, + CommonModule, + BranchNamePipe, + KulturpassOrderItemComponent, + LoaderComponent, + ], providers: [provideComponentStore(KulturpassOrderModalStore)], }) export class KulturpassOrderModalComponent implements OnInit { @@ -33,7 +39,9 @@ export class KulturpassOrderModalComponent implements OnInit { kulturpassCode$ = this._store.orderItemListItem$.pipe(map((orderItemListItem) => orderItemListItem.buyerNumber)); - credit$ = this._store.orderItemListItem$.pipe(map((orderItemListItem) => orderItemListItem?.retailPrice?.value?.value ?? 0)); + credit$ = this._store.orderItemListItem$.pipe( + map((orderItemListItem) => orderItemListItem?.retailPrice?.value?.value ?? 0), + ); total$ = this._store.shoppingCart$.pipe(map((shoppingCart) => shoppingCart?.total?.value ?? 0)); diff --git a/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-modal.store.ts b/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-modal.store.ts index 33b1fa962..e4ce96976 100644 --- a/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-modal.store.ts +++ b/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-modal.store.ts @@ -93,12 +93,19 @@ export class KulturpassOrderModalStore extends ComponentStore state.fetchShoppingCart); - readonly updateFetchShoppingCart = this.updater((state, fetchShoppingCart: boolean) => ({ ...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)))), + $.pipe( + switchMap(() => + this._branchService.BranchGetBranches({}).pipe(tapResponse(this.handleBranchResponse, this.handleBranchError)), + ), + ), ); handleBranchResponse = (res: ResponseArgsOfIEnumerableOfBranchDTO) => { @@ -193,7 +200,9 @@ export class KulturpassOrderModalStore extends ComponentStore { + handleOrderResponse = ( + res: ResponseArgsOfValueTupleOfIEnumerableOfDisplayOrderDTOAndIEnumerableOfKeyValueDTOOfStringAndString, + ) => { this.onOrderSuccess(res.result.item1[0], res.result.item2); }; @@ -205,7 +214,10 @@ export class KulturpassOrderModalStore extends ComponentStore getCatalogProductNumber(i?.data) === catalogProductNumber)?.data?.quantity ?? 0; + return ( + this.shoppingCart?.items?.find((i) => getCatalogProductNumber(i?.data) === catalogProductNumber)?.data + ?.quantity ?? 0 + ); } canAddItem = this.effect((item$: Observable) => @@ -285,7 +297,8 @@ export class KulturpassOrderModalStore extends ComponentStore - +> diff --git a/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-searchbox/kulturpass-order-searchbox.store.ts b/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-searchbox/kulturpass-order-searchbox.store.ts index 0241fa9bb..8dd36d1dd 100644 --- a/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-searchbox/kulturpass-order-searchbox.store.ts +++ b/apps/isa-app/src/modal/kulturpass-order/kulturpass-order-searchbox/kulturpass-order-searchbox.store.ts @@ -19,7 +19,10 @@ export interface KulturpassOrderSearchboxState { } @Injectable() -export class KulturpassOrderSearchboxStore extends ComponentStore implements OnStoreInit { +export class KulturpassOrderSearchboxStore + extends ComponentStore + implements OnStoreInit +{ private _parentStore = inject(KulturpassOrderModalStore); private _catalogService = inject(DomainCatalogService); private _availabilityService = inject(DomainAvailabilityService); @@ -63,7 +66,11 @@ export class KulturpassOrderSearchboxStore extends ComponentStore $.pipe( - switchMap(() => this._availabilityService.getDefaultBranch().pipe(tapResponse(this.handleBranchResponse, this.handleBranchError))), + switchMap(() => + this._availabilityService + .getDefaultBranch() + .pipe(tapResponse(this.handleBranchResponse, this.handleBranchError)), + ), ), ); @@ -80,7 +87,9 @@ export class KulturpassOrderSearchboxStore extends ComponentStore this.patchState({ fetching: true })), withLatestFrom(this.query$), switchMap(([_, query]) => - this._catalogService.getDetailsByEan({ ean: query?.trim() }).pipe(tapResponse(this.handleSearchResponse, this.handleSearchError)), + this._catalogService + .getDetailsByEan({ ean: query?.trim() }) + .pipe(tapResponse(this.handleSearchResponse, this.handleSearchError)), ), ), ); diff --git a/apps/isa-app/src/modal/notifications/notifications-remission-group/notifications-remission-group.component.html b/apps/isa-app/src/modal/notifications/notifications-remission-group/notifications-remission-group.component.html index 22abcf0a7..c270674aa 100644 --- a/apps/isa-app/src/modal/notifications/notifications-remission-group/notifications-remission-group.component.html +++ b/apps/isa-app/src/modal/notifications/notifications-remission-group/notifications-remission-group.component.html @@ -6,5 +6,5 @@ diff --git a/apps/isa-app/src/modal/notifications/notifications-reservation-group/notifications-reservation-group.component.html b/apps/isa-app/src/modal/notifications/notifications-reservation-group/notifications-reservation-group.component.html index ff01180c6..0f2df8a6d 100644 --- a/apps/isa-app/src/modal/notifications/notifications-reservation-group/notifications-reservation-group.component.html +++ b/apps/isa-app/src/modal/notifications/notifications-reservation-group/notifications-reservation-group.component.html @@ -6,5 +6,5 @@ diff --git a/apps/isa-app/src/modal/notifications/notifications-task-calendar-group/notifications-task-calendar-group.component.html b/apps/isa-app/src/modal/notifications/notifications-task-calendar-group/notifications-task-calendar-group.component.html index 906ab0e01..255d51c4b 100644 --- a/apps/isa-app/src/modal/notifications/notifications-task-calendar-group/notifications-task-calendar-group.component.html +++ b/apps/isa-app/src/modal/notifications/notifications-task-calendar-group/notifications-task-calendar-group.component.html @@ -6,5 +6,5 @@ diff --git a/apps/isa-app/src/modal/notifications/notifications.component.html b/apps/isa-app/src/modal/notifications/notifications.component.html index e55bb1740..f6d1aa2ba 100644 --- a/apps/isa-app/src/modal/notifications/notifications.component.html +++ b/apps/isa-app/src/modal/notifications/notifications.component.html @@ -33,7 +33,6 @@ *ngSwitchCase="'Wareneingang Lagerware'" [notifications]="notifications[selectedArea]" (navigated)="close()" - > - + > diff --git a/apps/isa-app/src/modal/purchase-options/constants.ts b/apps/isa-app/src/modal/purchase-options/constants.ts index 50b158a60..b1d18e917 100644 --- a/apps/isa-app/src/modal/purchase-options/constants.ts +++ b/apps/isa-app/src/modal/purchase-options/constants.ts @@ -1,7 +1,14 @@ import { ItemType, PriceDTO, PriceValueDTO, VATValueDTO } from '@generated/swagger/checkout-api'; import { OrderType, PurchaseOption } from './store'; -export const PURCHASE_OPTIONS: PurchaseOption[] = ['in-store', 'pickup', 'delivery', 'dig-delivery', 'b2b-delivery', 'download']; +export const PURCHASE_OPTIONS: PurchaseOption[] = [ + 'in-store', + 'pickup', + 'delivery', + 'dig-delivery', + 'b2b-delivery', + 'download', +]; export const DELIVERY_PURCHASE_OPTIONS: PurchaseOption[] = ['delivery', 'dig-delivery', 'b2b-delivery']; diff --git a/apps/isa-app/src/modal/purchase-options/purchase-options-list-item/purchase-options-list-item.component.css b/apps/isa-app/src/modal/purchase-options/purchase-options-list-item/purchase-options-list-item.component.css index 9244a4e91..99c9c90e2 100644 --- a/apps/isa-app/src/modal/purchase-options/purchase-options-list-item/purchase-options-list-item.component.css +++ b/apps/isa-app/src/modal/purchase-options/purchase-options-list-item/purchase-options-list-item.component.css @@ -15,7 +15,7 @@ @apply transition-all; @apply duration-200; @apply ease-in-out; - content: ''; + content: ""; top: 0; left: 0; right: 0; @@ -31,7 +31,7 @@ } .fancy-checkbox::after { - content: ''; + content: ""; background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' xmlns:serif='http://www.serif.com/'%3E%3Cpath fill='white' d='M21.432,3.715C21.432,3.715 21.432,3.715 21.432,3.715C21.115,3.76 20.823,3.911 20.604,4.143C16.03,8.727 12.603,12.511 8.244,16.932C8.244,16.932 3.297,12.754 3.297,12.754C2.909,12.424 2.374,12.327 1.895,12.499C1.895,12.499 1.895,12.499 1.895,12.499C1.415,12.672 1.065,13.088 0.975,13.589C0.885,14.091 1.072,14.602 1.463,14.929L7.415,19.966C7.981,20.441 8.818,20.403 9.338,19.877C14.251,14.954 17.761,11.007 22.616,6.141C23.057,5.714 23.172,5.051 22.903,4.499C22.903,4.499 22.903,4.499 22.903,4.499C22.633,3.948 22.04,3.631 21.432,3.715Z'/%3E%3C/svg%3E%0A"); @apply absolute; top: 0.4rem; diff --git a/apps/isa-app/src/modal/purchase-options/purchase-options-list-item/purchase-options-list-item.component.html b/apps/isa-app/src/modal/purchase-options/purchase-options-list-item/purchase-options-list-item.component.html index cbb79af46..7f82e1434 100644 --- a/apps/isa-app/src/modal/purchase-options/purchase-options-list-item/purchase-options-list-item.component.html +++ b/apps/isa-app/src/modal/purchase-options/purchase-options-list-item/purchase-options-list-item.component.html @@ -72,8 +72,8 @@ {{ availability.data.inStock }}x - ab {{ isEVT | date: 'dd. MMMM yyyy' }} - ab sofort + ab {{ isEVT | date: 'dd. MMMM yyyy' }} + ab sofort @@ -123,7 +123,8 @@ - Tragen Sie hier den
+ Tragen Sie hier den +
Gutscheinbetrag ein.
@@ -131,7 +132,7 @@ {{ priceValue$ | async | currency: 'EUR' : 'code' }} - +
{{ (availability$ | async)?.inStock }} Exemplare sofort lieferbar - Derzeit nicht bestellbar + Derzeit nicht bestellbar
diff --git a/apps/isa-app/src/modal/purchase-options/purchase-options-modal.component.html b/apps/isa-app/src/modal/purchase-options/purchase-options-modal.component.html index a9a17d121..89494aec2 100644 --- a/apps/isa-app/src/modal/purchase-options/purchase-options-modal.component.html +++ b/apps/isa-app/src/modal/purchase-options/purchase-options-modal.component.html @@ -3,14 +3,14 @@
- + - +
diff --git a/apps/isa-app/src/modal/purchase-options/purchase-options-tile/purchase-options-tile.component.css b/apps/isa-app/src/modal/purchase-options/purchase-options-tile/purchase-options-tile.component.css index c7c681133..20804e063 100644 --- a/apps/isa-app/src/modal/purchase-options/purchase-options-tile/purchase-options-tile.component.css +++ b/apps/isa-app/src/modal/purchase-options/purchase-options-tile/purchase-options-tile.component.css @@ -48,8 +48,14 @@ @apply rounded; } -::ng-deep app-pickup-purchase-options-tile shared-branch-selector.shared-branch-selector-opend .shared-branch-selector-input-container, -::ng-deep app-in-store-purchase-options-tile shared-branch-selector.shared-branch-selector-opend .shared-branch-selector-input-container { +::ng-deep + app-pickup-purchase-options-tile + shared-branch-selector.shared-branch-selector-opend + .shared-branch-selector-input-container, +::ng-deep + app-in-store-purchase-options-tile + shared-branch-selector.shared-branch-selector-opend + .shared-branch-selector-input-container { @apply shadow-card; } diff --git a/apps/isa-app/src/modal/purchase-options/store/purchase-options.helpers.ts b/apps/isa-app/src/modal/purchase-options/store/purchase-options.helpers.ts index ad8e4a6f8..284afdf9d 100644 --- a/apps/isa-app/src/modal/purchase-options/store/purchase-options.helpers.ts +++ b/apps/isa-app/src/modal/purchase-options/store/purchase-options.helpers.ts @@ -2,7 +2,14 @@ import { PriceDTO } from '@generated/swagger/availability-api'; import { ItemDTO } from '@generated/swagger/cat-search-api'; import { AvailabilityDTO, OLAAvailabilityDTO, ShoppingCartItemDTO } from '@generated/swagger/checkout-api'; import { GIFT_CARD_TYPE } from '../constants'; -import { ActionType, Item, ItemData, ItemPayloadWithSourceId, OrderType, PurchaseOption } from './purchase-options.types'; +import { + ActionType, + Item, + ItemData, + ItemPayloadWithSourceId, + OrderType, + PurchaseOption, +} from './purchase-options.types'; export function isItemDTO(item: any, type: ActionType): item is ItemDTO { return type === 'add'; diff --git a/apps/isa-app/src/modal/purchase-options/store/purchase-options.selectors.ts b/apps/isa-app/src/modal/purchase-options/store/purchase-options.selectors.ts index b4b7a4bdd..c76e90904 100644 --- a/apps/isa-app/src/modal/purchase-options/store/purchase-options.selectors.ts +++ b/apps/isa-app/src/modal/purchase-options/store/purchase-options.selectors.ts @@ -1,8 +1,22 @@ import { PriceDTO, PriceValueDTO } from '@generated/swagger/checkout-api'; -import { DEFAULT_PRICE_DTO, DEFAULT_PRICE_VALUE, GIFT_CARD_MAX_PRICE, GIFT_CARD_TYPE, PURCHASE_OPTIONS } from '../constants'; +import { + DEFAULT_PRICE_DTO, + DEFAULT_PRICE_VALUE, + GIFT_CARD_MAX_PRICE, + GIFT_CARD_TYPE, + PURCHASE_OPTIONS, +} from '../constants'; import { isArchive, isGiftCard, isItemDTO } from './purchase-options.helpers'; import { PurchaseOptionsState } from './purchase-options.state'; -import { ActionType, Availability, Branch, CanAdd, FetchingAvailability, Item, PurchaseOption } from './purchase-options.types'; +import { + ActionType, + Availability, + Branch, + CanAdd, + FetchingAvailability, + Item, + PurchaseOption, +} from './purchase-options.types'; export function getType(state: PurchaseOptionsState): ActionType { return state.type; @@ -108,13 +122,17 @@ export function getPurchaseOptionsInAvailabilities(state: PurchaseOptionsState): purchaseOptions = Array.from(new Set(purchaseOptions)); // if 'delivery' is not present but 'dig-delivery' or 'b2b-delivery' is present, add 'delivery' to the list - if (!purchaseOptions.includes('delivery') && (purchaseOptions.includes('dig-delivery') || purchaseOptions.includes('b2b-delivery'))) { + if ( + !purchaseOptions.includes('delivery') && + (purchaseOptions.includes('dig-delivery') || purchaseOptions.includes('b2b-delivery')) + ) { purchaseOptions.push('delivery'); } // if remove 'dig-delivery' and 'b2b-delivery' and 'catalog' as 'catalog' is not a purchase option but is needed for other data (Needed for #4813 and Bugfix for #4710) purchaseOptions = purchaseOptions.filter( - (purchaseOption) => purchaseOption !== 'dig-delivery' && purchaseOption !== 'b2b-delivery' && purchaseOption !== 'catalog', + (purchaseOption) => + purchaseOption !== 'dig-delivery' && purchaseOption !== 'b2b-delivery' && purchaseOption !== 'catalog', ); return purchaseOptions.sort((a, b) => PURCHASE_OPTIONS.indexOf(a) - PURCHASE_OPTIONS.indexOf(b)); @@ -124,14 +142,18 @@ export function getFetchingAvailabilities(state: PurchaseOptionsState): Array Array { +export function getFetchingAvailabilitiesForItem( + itemId: number, +): (state: PurchaseOptionsState) => Array { return (state: PurchaseOptionsState) => { const fetchingAvailabilities = getFetchingAvailabilities(state); return fetchingAvailabilities.filter((fa) => fa.itemId === itemId); }; } -export function getItemsThatHaveAnAvailabilityForPurchaseOption(purchaseOption: PurchaseOption): (state: PurchaseOptionsState) => Item[] { +export function getItemsThatHaveAnAvailabilityForPurchaseOption( + purchaseOption: PurchaseOption, +): (state: PurchaseOptionsState) => Item[] { return (state) => { const availabilities = getAvailabilities(state); const items = getItems(state); @@ -159,7 +181,9 @@ export function getItemsThatHaveAnAvailabilityAndCanAddForPurchaseOption(purchas const canAddResults = getCanAddResults(state); return items.filter((item) => - canAddResults.some((canAdd) => canAdd.itemId === item.id && canAdd.purchaseOption === purchaseOption && canAdd.canAdd), + canAddResults.some( + (canAdd) => canAdd.itemId === item.id && canAdd.purchaseOption === purchaseOption && canAdd.canAdd, + ), ); }; } @@ -198,14 +222,20 @@ export function getAvailabilitiesForItem( availabilities = availabilities.filter((availability) => availability.itemId === itemId); // if 'delivery', 'dig-delivery' and 'b2b-delivery' are present remove 'dig-delivery' and 'b2b-delivery' - if (!allDeliveryAvailabilities && availabilities.some((availability) => availability.purchaseOption === 'delivery')) { + if ( + !allDeliveryAvailabilities && + availabilities.some((availability) => availability.purchaseOption === 'delivery') + ) { availabilities = availabilities.filter( - (availability) => availability.purchaseOption !== 'dig-delivery' && availability.purchaseOption !== 'b2b-delivery', + (availability) => + availability.purchaseOption !== 'dig-delivery' && availability.purchaseOption !== 'b2b-delivery', ); } const optionsOrder = PURCHASE_OPTIONS; - return availabilities.sort((a, b) => optionsOrder.indexOf(a.purchaseOption) - optionsOrder.indexOf(b.purchaseOption)); + return availabilities.sort( + (a, b) => optionsOrder.indexOf(a.purchaseOption) - optionsOrder.indexOf(b.purchaseOption), + ); }; } @@ -346,7 +376,10 @@ export function getAvailabilityPriceForPurchaseOption( }; } -export function getPriceForPurchaseOption(itemId: number, purchaseOption: PurchaseOption): (state: PurchaseOptionsState) => PriceDTO { +export function getPriceForPurchaseOption( + itemId: number, + purchaseOption: PurchaseOption, +): (state: PurchaseOptionsState) => PriceDTO { return (state) => { if (getCanEditPrice(itemId)(state)) { const price = getPrices(state)[itemId]; @@ -367,7 +400,9 @@ export function getQuantityForItem(itemId: number): (state: PurchaseOptionsState }; } -export function getCanAddResultForItemAndCurrentPurchaseOption(itemId: number): (state: PurchaseOptionsState) => CanAdd { +export function getCanAddResultForItemAndCurrentPurchaseOption( + itemId: number, +): (state: PurchaseOptionsState) => CanAdd { return (state) => { const fetchingAvailabilities = getFetchingAvailabilitiesForItem(itemId)(state); const purchaseOption = getPurchaseOption(state); @@ -386,7 +421,9 @@ export function getCanAddResultForItemAndCurrentPurchaseOption(itemId: number): const canAddResults = getCanAddResults(state); - return canAddResults.find((canAddResult) => canAddResult.itemId === itemId && canAddResult.purchaseOption === purchaseOption); + return canAddResults.find( + (canAddResult) => canAddResult.itemId === itemId && canAddResult.purchaseOption === purchaseOption, + ); }; } @@ -410,10 +447,15 @@ export function getAvailabilityWithPurchaseOption( }; } -export function getCanAddResultWithPurchaseOption(itemId: number, purchaseOption: PurchaseOption): (state: PurchaseOptionsState) => CanAdd { +export function getCanAddResultWithPurchaseOption( + itemId: number, + purchaseOption: PurchaseOption, +): (state: PurchaseOptionsState) => CanAdd { return (state) => { const canAddResults = getCanAddResults(state); - return canAddResults.find((canAddResult) => canAddResult.itemId === itemId && canAddResult.purchaseOption === purchaseOption); + return canAddResults.find( + (canAddResult) => canAddResult.itemId === itemId && canAddResult.purchaseOption === purchaseOption, + ); }; } diff --git a/apps/isa-app/src/modal/purchase-options/store/purchase-options.state.ts b/apps/isa-app/src/modal/purchase-options/store/purchase-options.state.ts index b773ade3e..72786f89c 100644 --- a/apps/isa-app/src/modal/purchase-options/store/purchase-options.state.ts +++ b/apps/isa-app/src/modal/purchase-options/store/purchase-options.state.ts @@ -1,5 +1,13 @@ import { PriceDTO } from '@generated/swagger/checkout-api'; -import { ActionType, Availability, Branch, CanAdd, FetchingAvailability, Item, PurchaseOption } from './purchase-options.types'; +import { + ActionType, + Availability, + Branch, + CanAdd, + FetchingAvailability, + Item, + PurchaseOption, +} from './purchase-options.types'; export interface PurchaseOptionsState { type: ActionType; diff --git a/apps/isa-app/src/modal/purchase-options/store/purchase-options.store.ts b/apps/isa-app/src/modal/purchase-options/store/purchase-options.store.ts index fc8c22919..aeb9e16b5 100644 --- a/apps/isa-app/src/modal/purchase-options/store/purchase-options.store.ts +++ b/apps/isa-app/src/modal/purchase-options/store/purchase-options.store.ts @@ -27,7 +27,11 @@ import { import { Observable } from 'rxjs'; import { first, switchMap } from 'rxjs/operators'; import { DEFAULT_PRICE_DTO, DEFAULT_PRICE_VALUE, DEFAULT_VAT_VALUE } from '../constants'; -import { AddToShoppingCartDTO, EntityDTOContainerOfDestinationDTO, UpdateShoppingCartItemDTO } from '@generated/swagger/checkout-api'; +import { + AddToShoppingCartDTO, + EntityDTOContainerOfDestinationDTO, + UpdateShoppingCartItemDTO, +} from '@generated/swagger/checkout-api'; import { uniqueId } from 'lodash'; import { VATDTO } from '@generated/swagger/oms-api'; import { DomainCatalogService } from '@domain/catalog'; @@ -248,7 +252,9 @@ export class PurchaseOptionsStore extends ComponentStore { private async _loadCatalogueAvailability() { const items = this.items; if (this.type === 'update') { - const items = await this._catalogService.searchByEans({ eans: this.items.map((item) => item.product.ean) }).toPromise(); + const items = await this._catalogService + .searchByEans({ eans: this.items.map((item) => item.product.ean) }) + .toPromise(); if (items.result.length > 0) await this._addCatalogueAvailabilities(items.result); } else { await this._addCatalogueAvailabilities(items as ItemDTO[]); @@ -404,7 +410,9 @@ export class PurchaseOptionsStore extends ComponentStore { if (this._service.isAvailable(availability.data)) { const availabilities = this.availabilities; - const index = availabilities.findIndex((a) => a.itemId === availability.itemId && a.purchaseOption === availability.purchaseOption); + const index = availabilities.findIndex( + (a) => a.itemId === availability.itemId && a.purchaseOption === availability.purchaseOption, + ); if (index > -1) { availabilities[index] = availability; @@ -423,7 +431,9 @@ export class PurchaseOptionsStore extends ComponentStore { private _addCanAddResult(canAdd: CanAdd) { let canAddResults = this.canAddResults; - canAddResults = canAddResults.filter((c) => !(c.itemId === canAdd.itemId && c.purchaseOption === canAdd.purchaseOption)); + canAddResults = canAddResults.filter( + (c) => !(c.itemId === canAdd.itemId && c.purchaseOption === canAdd.purchaseOption), + ); canAddResults.push(canAdd); this.patchState({ canAddResults }); } @@ -440,7 +450,9 @@ export class PurchaseOptionsStore extends ComponentStore { this.items.forEach((item) => { // Get Rücklage availability - const inStoreAvailability = this.availabilities.find((a) => a.itemId === item.id && a.purchaseOption === 'in-store'); + const inStoreAvailability = this.availabilities.find( + (a) => a.itemId === item.id && a.purchaseOption === 'in-store', + ); if (inStoreAvailability) { payloads['Rücklage'].push( mapToItemPayload({ @@ -453,9 +465,15 @@ export class PurchaseOptionsStore extends ComponentStore { } // Get Versand availability - let deliveryAvailability = this.availabilities.find((a) => a.itemId === item.id && a.purchaseOption === 'delivery'); - const digDeliveryAvailability = this.availabilities.find((a) => a.itemId === item.id && a.purchaseOption === 'dig-delivery'); - const b2bDeliveryAvailability = this.availabilities.find((a) => a.itemId === item.id && a.purchaseOption === 'b2b-delivery'); + let deliveryAvailability = this.availabilities.find( + (a) => a.itemId === item.id && a.purchaseOption === 'delivery', + ); + const digDeliveryAvailability = this.availabilities.find( + (a) => a.itemId === item.id && a.purchaseOption === 'dig-delivery', + ); + const b2bDeliveryAvailability = this.availabilities.find( + (a) => a.itemId === item.id && a.purchaseOption === 'b2b-delivery', + ); deliveryAvailability = deliveryAvailability || digDeliveryAvailability || b2bDeliveryAvailability; if (deliveryAvailability) { payloads['Versand'].push( @@ -482,7 +500,9 @@ export class PurchaseOptionsStore extends ComponentStore { } // Get Download availability - const downloadAvailability = this.availabilities.find((a) => a.itemId === item.id && a.purchaseOption === 'download'); + const downloadAvailability = this.availabilities.find( + (a) => a.itemId === item.id && a.purchaseOption === 'download', + ); if (downloadAvailability) { payloads['Download'].push( mapToItemPayload({ @@ -714,7 +734,11 @@ export class PurchaseOptionsStore extends ComponentStore { let price = prices[itemId]; if (price?.vat?.vatType !== vat?.vatType) { if (!price) { - price = { ...DEFAULT_PRICE_DTO, value: { ...DEFAULT_PRICE_VALUE, ...price?.value }, vat: { ...DEFAULT_VAT_VALUE, ...vat } }; + price = { + ...DEFAULT_PRICE_DTO, + value: { ...DEFAULT_PRICE_VALUE, ...price?.value }, + vat: { ...DEFAULT_VAT_VALUE, ...vat }, + }; } else { price = { ...price, value: price.value, vat: { ...price.vat, ...vat } }; } @@ -829,10 +853,14 @@ export class PurchaseOptionsStore extends ComponentStore { const purchaseOption = this.purchaseOption; if (type === 'add') { - const payloads = this.selectedItemIds.map((itemId) => this.getAddToShoppingCartDTOForItem(itemId, purchaseOption)); + const payloads = this.selectedItemIds.map((itemId) => + this.getAddToShoppingCartDTOForItem(itemId, purchaseOption), + ); await this._service.addItemToShoppingCart(this.processId, payloads).toPromise(); } else if (type === 'update') { - const payloads = this.selectedItemIds.map((itemId) => this.getUpdateShoppingCartItemDTOForItem(itemId, purchaseOption)); + const payloads = this.selectedItemIds.map((itemId) => + this.getUpdateShoppingCartItemDTOForItem(itemId, purchaseOption), + ); for (const itemId of this.selectedItemIds) { const item = this.items.find((i) => i.id === itemId); diff --git a/apps/isa-app/src/modal/purchase-options/store/purchase-options.types.ts b/apps/isa-app/src/modal/purchase-options/store/purchase-options.types.ts index d77d16010..25bb55ab7 100644 --- a/apps/isa-app/src/modal/purchase-options/store/purchase-options.types.ts +++ b/apps/isa-app/src/modal/purchase-options/store/purchase-options.types.ts @@ -4,7 +4,14 @@ import { AvailabilityDTO, BranchDTO, ItemPayload, ShoppingCartItemDTO } from '@g export type ActionType = 'add' | 'update'; -export type PurchaseOption = 'delivery' | 'dig-delivery' | 'b2b-delivery' | 'pickup' | 'in-store' | 'download' | 'catalog'; +export type PurchaseOption = + | 'delivery' + | 'dig-delivery' + | 'b2b-delivery' + | 'pickup' + | 'in-store' + | 'download' + | 'catalog'; export type OrderType = 'Rücklage' | 'Abholung' | 'Versand' | 'Download'; diff --git a/apps/isa-app/src/modal/reorder/reorder.component.html b/apps/isa-app/src/modal/reorder/reorder.component.html index 0f3a690d3..cfc7e3128 100644 --- a/apps/isa-app/src/modal/reorder/reorder.component.html +++ b/apps/isa-app/src/modal/reorder/reorder.component.html @@ -41,7 +41,7 @@ {{ availability.qty || 0 }} {{ availability.ssc }} - + {{ availability.at | date: 'dd.MM.yy' }} {{ availability.price?.value?.value | currency: 'EUR' : 'code' }} @@ -83,10 +83,10 @@
diff --git a/apps/isa-app/src/modal/reviews/reviews.component.html b/apps/isa-app/src/modal/reviews/reviews.component.html index d99395786..24772b6dc 100644 --- a/apps/isa-app/src/modal/reviews/reviews.component.html +++ b/apps/isa-app/src/modal/reviews/reviews.component.html @@ -12,7 +12,7 @@ {{ review.title }}
- {{ review.author }} | {{ review.created | date: 'dd.MM.yy' }} + {{ review.author }} | {{ review.created | date: 'dd.MM.yy' }}
diff --git a/apps/isa-app/src/modal/reviews/reviews.component.ts b/apps/isa-app/src/modal/reviews/reviews.component.ts index de5b84424..7ddfa168a 100644 --- a/apps/isa-app/src/modal/reviews/reviews.component.ts +++ b/apps/isa-app/src/modal/reviews/reviews.component.ts @@ -11,7 +11,8 @@ import { UiModalRef } from '@ui/modal'; }) export class ModalReviewsComponent { reviews = this.modalRef.data; - rating = Math.floor((this.reviews.map((r) => r.rating).reduce((total, num) => total + num) / this.reviews.length) * 2) / 2; + rating = + Math.floor((this.reviews.map((r) => r.rating).reduce((total, num) => total + num) / this.reviews.length) * 2) / 2; expandIds: string[] = []; constructor(private modalRef: UiModalRef) {} diff --git a/apps/isa-app/src/modal/send-order-confirmation/send-order-confirmation-modal.component.ts b/apps/isa-app/src/modal/send-order-confirmation/send-order-confirmation-modal.component.ts index 33acfab6a..fbac18eb3 100644 --- a/apps/isa-app/src/modal/send-order-confirmation/send-order-confirmation-modal.component.ts +++ b/apps/isa-app/src/modal/send-order-confirmation/send-order-confirmation-modal.component.ts @@ -49,7 +49,10 @@ export class SendOrderConfirmationModalComponent implements OnInit { try { await this.orderService - .OrderPatchOrder({ orderId: order.id, order: { notificationChannels, buyer: { communicationDetails: { email } } } }) + .OrderPatchOrder({ + orderId: order.id, + order: { notificationChannels, buyer: { communicationDetails: { email } } }, + }) .toPromise(); const response = await this.orderService.OrderOrderConfirmationTask(order.id).toPromise(); this.toaster.open({ diff --git a/apps/isa-app/src/modal/wrong-destination/wrong-destination-modal.component.html b/apps/isa-app/src/modal/wrong-destination/wrong-destination-modal.component.html index 9fe351263..7cd0fbef8 100644 --- a/apps/isa-app/src/modal/wrong-destination/wrong-destination-modal.component.html +++ b/apps/isa-app/src/modal/wrong-destination/wrong-destination-modal.component.html @@ -1,6 +1,7 @@

Sie haben {{ packageCount }} Irrläufer

- Stellen Sie diese Packstücke für die anderen Filialen bereit.
+ Stellen Sie diese Packstücke für die anderen Filialen bereit. +
Der Spediteur holt Sie zum nächstmöglichsten Zeitpunkt ab.

diff --git a/apps/isa-app/src/page/assortment/price-update/price-update-list/price-update-item.component.html b/apps/isa-app/src/page/assortment/price-update/price-update-list/price-update-item.component.html index fd5898406..57dd27ff0 100644 --- a/apps/isa-app/src/page/assortment/price-update/price-update-list/price-update-item.component.html +++ b/apps/isa-app/src/page/assortment/price-update/price-update-list/price-update-item.component.html @@ -3,7 +3,8 @@ >

{{ item?.task?.instruction }}

- gültig ab {{ item?.task?.dueDate | date }} + gültig ab + {{ item?.task?.dueDate | date }}

@@ -50,7 +51,8 @@
{{ environment.isTablet() ? (item?.product?.manufacturer | substr: 18) : item?.product?.manufacturer }} | {{ item?.product?.ean }}
- {{ item?.product?.volume }} | + {{ item?.product?.volume }} + | {{ publicationDate }}
@@ -76,8 +78,9 @@ *ngIf="inStock$ | async; let stock" [class.skeleton]="stock?.inStock === undefined" class="min-w-[1rem] text-right inline-block" - >{{ stock?.inStock }} + {{ stock?.inStock }} + x diff --git a/apps/isa-app/src/page/assortment/price-update/price-update-list/price-update-list.component.html b/apps/isa-app/src/page/assortment/price-update/price-update-list/price-update-list.component.html index 93de28945..2c81ceb5f 100644 --- a/apps/isa-app/src/page/assortment/price-update/price-update-list/price-update-list.component.html +++ b/apps/isa-app/src/page/assortment/price-update/price-update-list/price-update-list.component.html @@ -26,7 +26,7 @@
- +
@@ -34,11 +34,11 @@ @defer (on viewport) { } @placeholder { - + } } - +
diff --git a/apps/isa-app/src/page/assortment/price-update/price-update-list/price-update-list.component.ts b/apps/isa-app/src/page/assortment/price-update/price-update-list/price-update-list.component.ts index 89d9978cd..d9f216c87 100644 --- a/apps/isa-app/src/page/assortment/price-update/price-update-list/price-update-list.component.ts +++ b/apps/isa-app/src/page/assortment/price-update/price-update-list/price-update-list.component.ts @@ -16,7 +16,9 @@ import { trigger, transition, style, animate } from '@angular/animations'; style({ transform: 'scale(1.2)', opacity: 0 }), animate('250ms cubic-bezier(0.35, 0, 0.25, 1)', style({ transform: 'scale(1)', opacity: 1 })), ]), - transition(':leave', [animate('250ms cubic-bezier(0.35, 0, 0.25, 1)', style({ transform: 'scale(0.8)', opacity: 0 }))]), + transition(':leave', [ + animate('250ms cubic-bezier(0.35, 0, 0.25, 1)', style({ transform: 'scale(0.8)', opacity: 0 })), + ]), ]), ], standalone: false, diff --git a/apps/isa-app/src/page/assortment/price-update/price-update-list/price-update-list.module.ts b/apps/isa-app/src/page/assortment/price-update/price-update-list/price-update-list.module.ts index 76a19f2fd..2716df65b 100644 --- a/apps/isa-app/src/page/assortment/price-update/price-update-list/price-update-list.module.ts +++ b/apps/isa-app/src/page/assortment/price-update/price-update-list/price-update-list.module.ts @@ -11,7 +11,15 @@ import { PriceUpdateItemComponent } from './price-update-item.component'; import { PriceUpdateListComponent } from './price-update-list.component'; @NgModule({ - imports: [FormsModule, CommonModule, UiCommonModule, UiIconModule, ProductImageModule, UiSpinnerModule, UiOrderByFilterModule], + imports: [ + FormsModule, + CommonModule, + UiCommonModule, + UiIconModule, + ProductImageModule, + UiSpinnerModule, + UiOrderByFilterModule, + ], exports: [PriceUpdateListComponent, PriceUpdateItemComponent, PriceUpdateItemLoaderComponent], declarations: [PriceUpdateListComponent, PriceUpdateItemComponent, PriceUpdateItemLoaderComponent], providers: [], diff --git a/apps/isa-app/src/page/assortment/price-update/price-update.component.html b/apps/isa-app/src/page/assortment/price-update/price-update.component.html index 0e0052229..b26859aff 100644 --- a/apps/isa-app/src/page/assortment/price-update/price-update.component.html +++ b/apps/isa-app/src/page/assortment/price-update/price-update.component.html @@ -11,8 +11,11 @@ - - +
@@ -47,7 +50,7 @@ (click)="applyFilter()" [disabled]="store.fetching$ | async" > - Filter anwenden + Filter anwenden
diff --git a/apps/isa-app/src/page/assortment/price-update/price-update.component.store.ts b/apps/isa-app/src/page/assortment/price-update/price-update.component.store.ts index 6dd59f4b8..12a074926 100644 --- a/apps/isa-app/src/page/assortment/price-update/price-update.component.store.ts +++ b/apps/isa-app/src/page/assortment/price-update/price-update.component.store.ts @@ -94,7 +94,9 @@ export class PriceUpdateComponentStore extends ComponentStore $.pipe( - switchMap((_) => this._productListService.getQuerySettings().pipe(tapResponse(this.onFetchSettingsResponse, this.onFetchError))), + switchMap((_) => + this._productListService.getQuerySettings().pipe(tapResponse(this.onFetchSettingsResponse, this.onFetchError)), + ), ), ); @@ -137,7 +139,9 @@ export class PriceUpdateComponentStore extends ComponentStore - this._domainPrinterService.printProductListItems({ data: selectableItems, printer, title: 'Preisänderungen' }).toPromise(), + this._domainPrinterService + .printProductListItems({ data: selectableItems, printer, title: 'Preisänderungen' }) + .toPromise(), } as PrintModalData, config: { panelClass: [], @@ -161,7 +165,10 @@ export class PriceUpdateComponentStore extends ComponentStore !response.successful.some((s) => s.key === item.uId)); } else { diff --git a/apps/isa-app/src/page/assortment/price-update/price-update.component.ts b/apps/isa-app/src/page/assortment/price-update/price-update.component.ts index 0a33e2eff..c9c7282cb 100644 --- a/apps/isa-app/src/page/assortment/price-update/price-update.component.ts +++ b/apps/isa-app/src/page/assortment/price-update/price-update.component.ts @@ -35,7 +35,9 @@ export class PriceUpdateComponent implements OnInit { * Zeigt die liste an, wenn entweder keine items geladen werden oder wenn items geladen wurden * und mindestens ein item vorhanden ist. */ - showList$ = combineLatest([this.store.fetching$, this.store.items$]).pipe(map(([fetching, items]) => fetching || items.length > 0)); + showList$ = combineLatest([this.store.fetching$, this.store.items$]).pipe( + map(([fetching, items]) => fetching || items.length > 0), + ); constructor( public store: PriceUpdateComponentStore, @@ -132,7 +134,10 @@ export class PriceUpdateComponent implements OnInit { } async removeBreadcrumbs(): Promise { - const filterCrumbs = await this._breadcrumb.getBreadcrumbsByKeyAndTag$(this.breadcrumbKey, 'filter').pipe(first()).toPromise(); + const filterCrumbs = await this._breadcrumb + .getBreadcrumbsByKeyAndTag$(this.breadcrumbKey, 'filter') + .pipe(first()) + .toPromise(); const crumbs = [...filterCrumbs]; for (let crumb of crumbs) { await this._breadcrumb.removeBreadcrumb(crumb.id); diff --git a/apps/isa-app/src/page/assortment/price-update/price-update.module.ts b/apps/isa-app/src/page/assortment/price-update/price-update.module.ts index 9fad1beec..4bda7cfab 100644 --- a/apps/isa-app/src/page/assortment/price-update/price-update.module.ts +++ b/apps/isa-app/src/page/assortment/price-update/price-update.module.ts @@ -8,7 +8,14 @@ import { PriceUpdateComponent } from './price-update.component'; import { IconComponent } from '@shared/components/icon'; @NgModule({ - imports: [CommonModule, PriceUpdateListModule, UiFilterNextModule, SharedFilterOverlayModule, UiSpinnerModule, IconComponent], + imports: [ + CommonModule, + PriceUpdateListModule, + UiFilterNextModule, + SharedFilterOverlayModule, + UiSpinnerModule, + IconComponent, + ], exports: [PriceUpdateComponent], declarations: [PriceUpdateComponent], providers: [], diff --git a/apps/isa-app/src/page/catalog/article-details/article-details-text/article-details-text.component.html b/apps/isa-app/src/page/catalog/article-details/article-details-text/article-details-text.component.html index c88cdc014..fb0a5f9d0 100644 --- a/apps/isa-app/src/page/catalog/article-details/article-details-text/article-details-text.component.html +++ b/apps/isa-app/src/page/catalog/article-details/article-details-text/article-details-text.component.html @@ -6,6 +6,9 @@
- {{ line }}
+ + {{ line }} +
+
diff --git a/apps/isa-app/src/page/catalog/article-details/article-details-text/article-details-text.component.ts b/apps/isa-app/src/page/catalog/article-details/article-details-text/article-details-text.component.ts index e70773046..afb293377 100644 --- a/apps/isa-app/src/page/catalog/article-details/article-details-text/article-details-text.component.ts +++ b/apps/isa-app/src/page/catalog/article-details/article-details-text/article-details-text.component.ts @@ -11,7 +11,15 @@ import { ReiheRoutePipe } from './reihe-route.pipe'; styleUrls: ['article-details-text.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'page-article-details-text' }, - imports: [ArticleDetailsTextLinkComponent, NgFor, NgSwitch, NgSwitchCase, NgSwitchDefault, LineTypePipe, ReiheRoutePipe], + imports: [ + ArticleDetailsTextLinkComponent, + NgFor, + NgSwitch, + NgSwitchCase, + NgSwitchDefault, + LineTypePipe, + ReiheRoutePipe, + ], }) export class ArticleDetailsTextComponent { @Input() diff --git a/apps/isa-app/src/page/catalog/article-details/article-details.component.scss b/apps/isa-app/src/page/catalog/article-details/article-details.component.scss index 5894eaad3..ca9469229 100644 --- a/apps/isa-app/src/page/catalog/article-details/article-details.component.scss +++ b/apps/isa-app/src/page/catalog/article-details/article-details.component.scss @@ -15,18 +15,18 @@ grid-template-columns: max-content auto; grid-template-rows: 2.1875rem repeat(11, minmax(auto, max-content)); grid-template-areas: - '. . . bookmark' - 'image contributors contributors contributors' - 'image title title print' - 'image title title .' - 'image misc price price' - 'image misc price price' - 'image origin origin stock' - 'image origin origin stock' - 'image specs availabilities availabilities' - 'image specs ssc ssc' - 'image . ssc ssc' - 'image . ssc ssc'; + ". . . bookmark" + "image contributors contributors contributors" + "image title title print" + "image title title ." + "image misc price price" + "image misc price price" + "image origin origin stock" + "image origin origin stock" + "image specs availabilities availabilities" + "image specs ssc ssc" + "image . ssc ssc" + "image . ssc ssc"; } .page-article-details__product-bookmark { diff --git a/apps/isa-app/src/page/catalog/article-details/article-details.component.ts b/apps/isa-app/src/page/catalog/article-details/article-details.component.ts index 350edcfbd..69a197615 100644 --- a/apps/isa-app/src/page/catalog/article-details/article-details.component.ts +++ b/apps/isa-app/src/page/catalog/article-details/article-details.component.ts @@ -20,7 +20,11 @@ import { DateAdapter } from '@ui/common'; import { DatePipe } from '@angular/common'; import { PurchaseOptionsModalService } from '@modal/purchase-options'; import { EnvironmentService } from '@core/environment'; -import { CheckoutNavigationService, ProductCatalogNavigationService, CustomerSearchNavigation } from '@shared/services/navigation'; +import { + CheckoutNavigationService, + ProductCatalogNavigationService, + CustomerSearchNavigation, +} from '@shared/services/navigation'; import { DomainCheckoutService } from '@domain/checkout'; import { Store } from '@ngrx/store'; import moment, { Moment } from 'moment'; @@ -63,9 +67,10 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy { shareReplay(), ); - showDeliveryTruck$ = combineLatest([this.store.isDeliveryAvailabilityAvailable$, this.store.isDeliveryDigAvailabilityAvailable$]).pipe( - map(([delivery, digDelivery]) => delivery || digDelivery), - ); + showDeliveryTruck$ = combineLatest([ + this.store.isDeliveryAvailabilityAvailable$, + this.store.isDeliveryDigAvailabilityAvailable$, + ]).pipe(map(([delivery, digDelivery]) => delivery || digDelivery)); showDeliveryB2BTruck$ = combineLatest([ this.store.isDeliveryDigAvailabilityAvailable$, @@ -88,7 +93,10 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy { showArchivBadge$ = this.store.item$.pipe(map((item) => item?.features?.find((i) => i.key === 'ARC'))); isBadgeVisible$ = combineLatest([this.showSubscriptionBadge$, this.showPromotionBadge$, this.showArchivBadge$]).pipe( - map(([showSubscriptionBadge, showPromotionBadge, showArchivBadge]) => showSubscriptionBadge || showPromotionBadge || showArchivBadge), + map( + ([showSubscriptionBadge, showPromotionBadge, showArchivBadge]) => + showSubscriptionBadge || showPromotionBadge || showArchivBadge, + ), ); contributors$ = this.store.item$.pipe(map((item) => item?.product?.contributors?.split(';').map((m) => m.trim()))); @@ -115,7 +123,9 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy { publicationDate$ = this.store.item$.pipe( filter((item) => !!item?.product?.publicationDate), map((item) => { - const firstDayOfSale = item.catalogAvailability?.firstDayOfSale ? moment(item.catalogAvailability.firstDayOfSale) : null; + const firstDayOfSale = item.catalogAvailability?.firstDayOfSale + ? moment(item.catalogAvailability.firstDayOfSale) + : null; const publicationDate = item.product?.publicationDate ? moment(item.product.publicationDate) : null; if (!firstDayOfSale && !publicationDate) { @@ -236,7 +246,9 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy { .pipe( debounceTime(0), switchMap((params) => - this.applicationService.getSelectedBranch$(Number(params.processId)).pipe(map((selectedBranch) => ({ params, selectedBranch }))), + this.applicationService + .getSelectedBranch$(Number(params.processId)) + .pipe(map((selectedBranch) => ({ params, selectedBranch }))), ), ) .subscribe(({ params, selectedBranch }) => { @@ -287,7 +299,10 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy { } getDetailsPath(ean?: string) { - return this._navigationService.getArticleDetailsPathByEan({ processId: this.applicationService.activatedProcessId, ean }).path; + return this._navigationService.getArticleDetailsPathByEan({ + processId: this.applicationService.activatedProcessId, + ean, + }).path; } async updateBreadcrumb(item: ItemDTO) { @@ -303,7 +318,10 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy { this.breadcrumb.addBreadcrumbIfNotExists({ key: this.applicationService.activatedProcessId, name: item.product?.name, - path: this._navigationService.getArticleDetailsPath({ processId: this.applicationService.activatedProcessId, itemId: item.id }).path, + path: this._navigationService.getArticleDetailsPath({ + processId: this.applicationService.activatedProcessId, + itemId: item.id, + }).path, params: this.activatedRoute.snapshot.queryParams, tags: ['catalog', 'details', `${item.id}`], section: 'customer', @@ -328,8 +346,10 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy { this.breadcrumb.addBreadcrumbIfNotExists({ key: this.applicationService.activatedProcessId, name: item.product?.name, - path: this._navigationService.getArticleDetailsPath({ processId: this.applicationService.activatedProcessId, itemId: item.id }) - .path, + path: this._navigationService.getArticleDetailsPath({ + processId: this.applicationService.activatedProcessId, + itemId: item.id, + }).path, params: this.activatedRoute.snapshot.queryParams, tags: ['catalog', 'details', `${item.id}`], section: 'customer', @@ -339,8 +359,10 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy { this.breadcrumb.patchBreadcrumb(crumb.id, { key: this.applicationService.activatedProcessId, name: item.product?.name, - path: this._navigationService.getArticleDetailsPath({ processId: this.applicationService.activatedProcessId, itemId: item.id }) - .path, + path: this._navigationService.getArticleDetailsPath({ + processId: this.applicationService.activatedProcessId, + itemId: item.id, + }).path, params: this.activatedRoute.snapshot.queryParams, tags: ['catalog', 'details', `${item.id}`], section: 'customer', @@ -355,7 +377,8 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy { data: { printerType: 'Label', // TODO: remove item: item as PrinterItemDTO when the backend is fixed - print: (printer) => this.domainPrinterService.printProduct({ item: item as PrinterItemDTO, printer }).toPromise(), + print: (printer) => + this.domainPrinterService.printProduct({ item: item as PrinterItemDTO, printer }).toPromise(), } as PrintModalData, config: { panelClass: [], @@ -459,7 +482,10 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy { .pipe( first(), switchMap((customerFeatures) => { - return this._domainCheckoutService.canSetCustomer({ processId: this.applicationService.activatedProcessId, customerFeatures }); + return this._domainCheckoutService.canSetCustomer({ + processId: this.applicationService.activatedProcessId, + customerFeatures, + }); }), ) .toPromise(); diff --git a/apps/isa-app/src/page/catalog/article-details/article-details.store.ts b/apps/isa-app/src/page/catalog/article-details/article-details.store.ts index 652e5974e..b3905c640 100644 --- a/apps/isa-app/src/page/catalog/article-details/article-details.store.ts +++ b/apps/isa-app/src/page/catalog/article-details/article-details.store.ts @@ -47,11 +47,16 @@ export class ArticleDetailsStore extends ComponentStore { readonly fetchingItem$ = this.select((s) => s.fetchingItem); readonly item$ = this.select((s) => s.item); readonly itemData$ = this.select(this.item$, (item) => - !!item ? ({ ean: item?.product?.ean, itemId: item?.id, price: item?.catalogAvailability?.price } as ItemData) : undefined, + !!item + ? ({ ean: item?.product?.ean, itemId: item?.id, price: item?.catalogAvailability?.price } as ItemData) + : undefined, ); //#endregion - readonly isDownload$ = this.select(this.item$, (item) => !!(item?.product?.format === 'EB' || item?.product?.format === 'DL')); + readonly isDownload$ = this.select( + this.item$, + (item) => !!(item?.product?.format === 'EB' || item?.product?.format === 'DL'), + ); get processId() { return this.get((s) => s.processId); @@ -74,13 +79,17 @@ export class ArticleDetailsStore extends ComponentStore { readonly reviewRating$ = this.item$.pipe( filter((i) => !!i), - map((i) => (i.reviews?.length > 0 ? i.reviews.map((r) => r.rating).reduce((total, num) => total + num) / i.reviews.length : 0)), + map((i) => + i.reviews?.length > 0 ? i.reviews.map((r) => r.rating).reduce((total, num) => total + num) / i.reviews.length : 0, + ), ); readonly recommendations$ = this.item$.pipe( filter((item) => !!item), switchMap((item) => - item.ids?.dig ? this.domainCatalogService.getRecommendations({ digId: item.ids['dig'] }).pipe(map((res) => res.result)) : of([]), + item.ids?.dig + ? this.domainCatalogService.getRecommendations({ digId: item.ids['dig'] }).pipe(map((res) => res.result)) + : of([]), ), ); @@ -222,7 +231,9 @@ export class ArticleDetailsStore extends ComponentStore { //#region DIG Versandverfügbarkeit readonly fetchingDeliveryDigAvailability$ = this.select((s) => s.fetchingDeliveryDigAvailability); readonly deliveryDigAvailability$ = combineLatest([this.itemData$, this.isDownload$]).pipe( - tap(() => this.patchState({ fetchingDeliveryDigAvailability: true, fetchingDeliveryDigAvailabilityError: undefined })), + tap(() => + this.patchState({ fetchingDeliveryDigAvailability: true, fetchingDeliveryDigAvailabilityError: undefined }), + ), switchMap(([item, isDownload]) => !!item && !isDownload ? this.domainAvailabilityService.getDigDeliveryAvailability({ item, quantity: 1 }).pipe( @@ -245,7 +256,9 @@ export class ArticleDetailsStore extends ComponentStore { //#region B2B Versandverfügbarkeit readonly fetchingDeliveryB2BAvailability$ = this.select((s) => s.fetchingDeliveryB2BAvailability); readonly deliveryB2BAvailability$ = combineLatest([this.itemData$, this.isDownload$, this.branch$]).pipe( - tap(() => this.patchState({ fetchingDeliveryB2BAvailability: true, fetchingDeliveryB2BAvailabilityError: undefined })), + tap(() => + this.patchState({ fetchingDeliveryB2BAvailability: true, fetchingDeliveryB2BAvailabilityError: undefined }), + ), switchMap(([item, isDownload, branch]) => !!item && !isDownload ? this.domainAvailabilityService.getB2bDeliveryAvailability({ item, quantity: 1, branch }).pipe( @@ -274,46 +287,52 @@ export class ArticleDetailsStore extends ComponentStore { this.downloadAvailability$, ]).pipe( withLatestFrom(this.domainAvailabilityService.sscs$), - map(([[item, isDownload, pickupAvailability, deliveryDigAvailability, deliveryB2BAvailability, downloadAvailability], sscs]) => { - let availability: AvailabilityDTO; + map( + ([ + [item, isDownload, pickupAvailability, deliveryDigAvailability, deliveryB2BAvailability, downloadAvailability], + sscs, + ]) => { + let availability: AvailabilityDTO; - if (isDownload) { - availability = downloadAvailability; - } else { - if (pickupAvailability?.sscText) { - availability = pickupAvailability; - } else if (deliveryDigAvailability?.sscText) { - availability = deliveryDigAvailability; - } else if (deliveryB2BAvailability?.sscText) { - availability = deliveryB2BAvailability; + if (isDownload) { + availability = downloadAvailability; + } else { + if (pickupAvailability?.sscText) { + availability = pickupAvailability; + } else if (deliveryDigAvailability?.sscText) { + availability = deliveryDigAvailability; + } else if (deliveryB2BAvailability?.sscText) { + availability = deliveryB2BAvailability; + } } - } - let ssc = ''; - let sscText = 'Keine Lieferanten vorhanden'; + let ssc = ''; + let sscText = 'Keine Lieferanten vorhanden'; - if (item?.catalogAvailability?.supplier === 'S' && !isDownload) { - ssc = item?.catalogAvailability?.ssc; - sscText = item?.catalogAvailability?.sscText; + if (item?.catalogAvailability?.supplier === 'S' && !isDownload) { + ssc = item?.catalogAvailability?.ssc; + sscText = item?.catalogAvailability?.sscText; + + return [ssc, sscText].filter((f) => !!f).join(' - '); + } + + if (availability?.ssc || availability?.sscText) { + ssc = availability?.ssc; + sscText = availability?.sscText; + + const sscExists = !!sscs?.find((ssc) => !!item?.id && ssc?.itemId === item.id); + const sscEqualsCatalogSsc = + ssc === item.catalogAvailability.ssc && sscText === item.catalogAvailability.sscText; + + // To keep result list in sync with details page + if (!sscExists && !sscEqualsCatalogSsc) { + this.domainAvailabilityService.sscs$.next([...sscs, { itemId: item?.id, ssc, sscText }]); + } + } return [ssc, sscText].filter((f) => !!f).join(' - '); - } - - if (availability?.ssc || availability?.sscText) { - ssc = availability?.ssc; - sscText = availability?.sscText; - - const sscExists = !!sscs?.find((ssc) => !!item?.id && ssc?.itemId === item.id); - const sscEqualsCatalogSsc = ssc === item.catalogAvailability.ssc && sscText === item.catalogAvailability.sscText; - - // To keep result list in sync with details page - if (!sscExists && !sscEqualsCatalogSsc) { - this.domainAvailabilityService.sscs$.next([...sscs, { itemId: item?.id, ssc, sscText }]); - } - } - - return [ssc, sscText].filter((f) => !!f).join(' - '); - }), + }, + ), ); constructor( @@ -402,7 +421,10 @@ export class ArticleDetailsStore extends ComponentStore { }); async navigateBack() { - const crumb = await this._breadcrumb.getLastActivatedBreadcrumbByKey$(this._appService.activatedProcessId).pipe(first()).toPromise(); + const crumb = await this._breadcrumb + .getLastActivatedBreadcrumbByKey$(this._appService.activatedProcessId) + .pipe(first()) + .toPromise(); if (crumb) { await this._router.navigate([crumb.path]); } else { diff --git a/apps/isa-app/src/page/catalog/article-details/recommendations/article-recommendations.component.html b/apps/isa-app/src/page/catalog/article-details/recommendations/article-recommendations.component.html index bfe5b4635..3bc98d415 100644 --- a/apps/isa-app/src/page/catalog/article-details/recommendations/article-recommendations.component.html +++ b/apps/isa-app/src/page/catalog/article-details/recommendations/article-recommendations.component.html @@ -15,7 +15,7 @@ - Keine Empfehlungen verfügbar + Keine Empfehlungen verfügbar o.selected); const selectedSubOptions: FilterOption[] = []; - const optionsWithSuboptions: FilterOption[] = options.filter((o) => (isSelectFilterOption(o) ? o?.options?.length > 0 : null)); + const optionsWithSuboptions: FilterOption[] = options.filter((o) => + isSelectFilterOption(o) ? o?.options?.length > 0 : null, + ); for (const o of optionsWithSuboptions) { if (isSelectFilterOption(o)) { const subOptions = o.options.filter((sO) => sO.selected); @@ -117,7 +119,9 @@ export function mapSelectedFilterToParams(source: Filter[]): string { const selected = options.filter((o) => o.type === 'select' && o.selected); const selectedSubOptions: FilterOption[] = []; - const optionsWithSuboptions: FilterOption[] = options.filter((o) => (isSelectFilterOption(o) ? o?.options?.length > 0 : null)); + const optionsWithSuboptions: FilterOption[] = options.filter((o) => + isSelectFilterOption(o) ? o?.options?.length > 0 : null, + ); for (const o of optionsWithSuboptions) { if (isSelectFilterOption(o)) { const subOptions = o.options.filter((sO) => sO.type === 'select' && sO.selected); diff --git a/apps/isa-app/src/page/catalog/article-search/search-filter/search-filter.component.html b/apps/isa-app/src/page/catalog/article-search/search-filter/search-filter.component.html index eb59b5578..d44f12117 100644 --- a/apps/isa-app/src/page/catalog/article-search/search-filter/search-filter.component.html +++ b/apps/isa-app/src/page/catalog/article-search/search-filter/search-filter.component.html @@ -29,7 +29,7 @@ diff --git a/apps/isa-app/src/page/catalog/article-search/search-filter/search-filter.component.ts b/apps/isa-app/src/page/catalog/article-search/search-filter/search-filter.component.ts index daae62499..acd71754e 100644 --- a/apps/isa-app/src/page/catalog/article-search/search-filter/search-filter.component.ts +++ b/apps/isa-app/src/page/catalog/article-search/search-filter/search-filter.component.ts @@ -38,11 +38,13 @@ export class ArticleSearchFilterComponent implements OnInit, OnDestroy { } get sideOutlet() { - return this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'side')?.snapshot?.routeConfig?.path; + return this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'side')?.snapshot + ?.routeConfig?.path; } get primaryOutlet() { - return this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'primary')?.snapshot?.routeConfig?.path; + return this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'primary')?.snapshot + ?.routeConfig?.path; } get closeFilterRoute() { @@ -146,10 +148,14 @@ export class ArticleSearchFilterComponent implements OnInit, OnDestroy { hasSelectedOptions(filter: Filter) { // Is Query available - const hasInputOptions = !!filter.input.find((input) => !!input.input.find((fi) => fi.hasFilterInputOptionsSelected())); + const hasInputOptions = !!filter.input.find( + (input) => !!input.input.find((fi) => fi.hasFilterInputOptionsSelected()), + ); // Are filter or filterChips selected - const hasFilterOptions = !!filter.filter.find((input) => !!input.input.find((fi) => fi.hasFilterInputOptionsSelected())); + const hasFilterOptions = !!filter.filter.find( + (input) => !!input.input.find((fi) => fi.hasFilterInputOptionsSelected()), + ); return hasInputOptions || hasFilterOptions; } diff --git a/apps/isa-app/src/page/catalog/article-search/search-main/search-main.component.ts b/apps/isa-app/src/page/catalog/article-search/search-main/search-main.component.ts index edf748aeb..0f9633558 100644 --- a/apps/isa-app/src/page/catalog/article-search/search-main/search-main.component.ts +++ b/apps/isa-app/src/page/catalog/article-search/search-main/search-main.component.ts @@ -35,7 +35,10 @@ export class ArticleSearchMainComponent implements OnInit, OnDestroy { hasFilter$ = combineLatest([this.searchService.filter$, this.searchService.defaultSettings$]).pipe( map(([filter, defaultFilter]) => { const filterQueryParams = filter?.getQueryParams(); - return !isEqual(this.resetQueryParamsQueryAndOrderBy(filterQueryParams), Filter.create(defaultFilter).getQueryParams()); + return !isEqual( + this.resetQueryParamsQueryAndOrderBy(filterQueryParams), + Filter.create(defaultFilter).getQueryParams(), + ); }), ); @@ -165,7 +168,10 @@ export class ArticleSearchMainComponent implements OnInit, OnDestroy { } async updateBreadcrumb(processId: number, queryParams: Record) { - const crumbs = await this.breadcrumb.getBreadcrumbsByKeyAndTags$(processId, ['catalog', 'main']).pipe(first()).toPromise(); + const crumbs = await this.breadcrumb + .getBreadcrumbsByKeyAndTags$(processId, ['catalog', 'main']) + .pipe(first()) + .toPromise(); crumbs.forEach((crumb) => { this.breadcrumb.patchBreadcrumb(crumb.id, { @@ -196,8 +202,14 @@ export class ArticleSearchMainComponent implements OnInit, OnDestroy { } async removeResultsAndDetailsBreadcrumbs(processId: number) { - const resultsCrumbs = await this.breadcrumb.getBreadcrumbsByKeyAndTags$(processId, ['catalog', 'results']).pipe(first()).toPromise(); - const detailCrumbs = await this.breadcrumb.getBreadcrumbsByKeyAndTags$(processId, ['catalog', 'details']).pipe(first()).toPromise(); + const resultsCrumbs = await this.breadcrumb + .getBreadcrumbsByKeyAndTags$(processId, ['catalog', 'results']) + .pipe(first()) + .toPromise(); + const detailCrumbs = await this.breadcrumb + .getBreadcrumbsByKeyAndTags$(processId, ['catalog', 'details']) + .pipe(first()) + .toPromise(); resultsCrumbs?.forEach((crumb) => { this.breadcrumb.removeBreadcrumb(crumb.id); diff --git a/apps/isa-app/src/page/catalog/article-search/search-results/search-result-item.component.scss b/apps/isa-app/src/page/catalog/article-search/search-results/search-result-item.component.scss index 414ab74bc..8209434f4 100644 --- a/apps/isa-app/src/page/catalog/article-search/search-results/search-result-item.component.scss +++ b/apps/isa-app/src/page/catalog/article-search/search-results/search-result-item.component.scss @@ -11,13 +11,13 @@ .page-search-result-item__item-grid-container { @apply grid grid-flow-row gap-y-[0.375rem] gap-x-6; grid-template-areas: - 'contributors contributors contributors' - 'title title price' - 'title title price' - 'title title select' - 'format format select' - 'manufacturer manufacturer stock' - 'misc ssc ssc'; + "contributors contributors contributors" + "title title price" + "title title price" + "title title select" + "format format select" + "manufacturer manufacturer stock" + "misc ssc ssc"; } .page-search-result-item__item-grid-container-primary { @@ -25,9 +25,9 @@ grid-template-rows: 1.3125rem 1.3125rem auto; grid-template-columns: 37.5% 32.5% 20% auto; grid-template-areas: - 'contributors format price .' - 'title manufacturer stock select' - 'title misc ssc .'; + "contributors format price ." + "title manufacturer stock select" + "title misc ssc ."; } .page-search-result-item__item-contributors { diff --git a/apps/isa-app/src/page/catalog/article-search/search-results/search-results.component.ts b/apps/isa-app/src/page/catalog/article-search/search-results/search-results.component.ts index 3de306148..84eaa36d7 100644 --- a/apps/isa-app/src/page/catalog/article-search/search-results/search-results.component.ts +++ b/apps/isa-app/src/page/catalog/article-search/search-results/search-results.component.ts @@ -84,7 +84,10 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy, AfterVi hasFilter$ = combineLatest([this.searchService.filter$, this.searchService.defaultSettings$]).pipe( map(([filter, defaultFilter]) => { const filterQueryParams = filter?.getQueryParams(); - return !isEqual(this.resetQueryParamsQueryAndOrderBy(filterQueryParams), Filter.create(defaultFilter).getQueryParams()); + return !isEqual( + this.resetQueryParamsQueryAndOrderBy(filterQueryParams), + Filter.create(defaultFilter).getQueryParams(), + ); }), ); @@ -130,7 +133,9 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy, AfterVi .pipe( debounceTime(0), switchMap(([processId, queryParams]) => - this.application.getSelectedBranch$(processId).pipe(map((selectedBranch) => ({ processId, queryParams, selectedBranch }))), + this.application + .getSelectedBranch$(processId) + .pipe(map((selectedBranch) => ({ processId, queryParams, selectedBranch }))), ), ) .subscribe(async ({ processId, queryParams, selectedBranch }) => { @@ -174,7 +179,8 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy, AfterVi } if ( data.items?.length === 0 && - this.route?.parent?.children?.find((childRoute) => childRoute?.outlet === 'side')?.snapshot?.routeConfig?.path !== 'filter' + this.route?.parent?.children?.find((childRoute) => childRoute?.outlet === 'side')?.snapshot?.routeConfig + ?.path !== 'filter' ) { this.search({ clear: true }); } else { @@ -246,7 +252,9 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy, AfterVi }) .navigate(); } else { - await this._navigationService.getArticleSearchResultsPath(processId, { queryParams: params }).navigate(); + await this._navigationService + .getArticleSearchResultsPath(processId, { queryParams: params }) + .navigate(); } } } @@ -297,7 +305,11 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy, AfterVi scrolledIndexChange(index: number) { const completeListFetched = this.searchService.items.length === this.searchService.hits; - if (index && !completeListFetched && this.searchService.items.length <= this.scrollContainer?.getRenderedRange()?.end) { + if ( + index && + !completeListFetched && + this.searchService.items.length <= this.scrollContainer?.getRenderedRange()?.end + ) { this.search({ clear: false }); } @@ -309,7 +321,11 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy, AfterVi async ngOnDestroy() { this.subscriptions?.unsubscribe(); - this.cacheCurrentData(this.searchService.processId, this.searchService.filter.getQueryParams(), this.searchService?.selectedBranch?.id); + this.cacheCurrentData( + this.searchService.processId, + this.searchService.filter.getQueryParams(), + this.searchService?.selectedBranch?.id, + ); await this.updateBreadcrumbs(this.searchService.processId, this.searchService.filter.getQueryParams()); this.unselectAll(); @@ -338,7 +354,8 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy, AfterVi } getDetailsPath(itemId: number) { - return this._navigationService.getArticleDetailsPath({ processId: this.application.activatedProcessId, itemId }).path; + return this._navigationService.getArticleDetailsPath({ processId: this.application.activatedProcessId, itemId }) + .path; } async updateBreadcrumbs( @@ -380,7 +397,10 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy, AfterVi } async removeDetailsBreadcrumb(processId: number) { - const crumbs = await this.breadcrumb.getBreadcrumbsByKeyAndTags$(processId, ['catalog', 'details']).pipe(first()).toPromise(); + const crumbs = await this.breadcrumb + .getBreadcrumbsByKeyAndTags$(processId, ['catalog', 'details']) + .pipe(first()) + .toPromise(); crumbs?.forEach((crumb) => this.breadcrumb.removeBreadcrumb(crumb.id)); } @@ -495,7 +515,10 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy, AfterVi 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(); + const downloadAvailability = await this._availability + .getDownloadAvailability({ item: downloadItem }) + .pipe(first()) + .toPromise(); shoppingCartItem.destination = { data: { target: 16, logistician: downloadAvailability?.logistician } }; if (downloadAvailability) { shoppingCartItem.availability = { ...shoppingCartItem.availability, ...downloadAvailability }; diff --git a/apps/isa-app/src/page/catalog/page-catalog.component.html b/apps/isa-app/src/page/catalog/page-catalog.component.html index ce9b6d051..1fdd6437e 100644 --- a/apps/isa-app/src/page/catalog/page-catalog.component.html +++ b/apps/isa-app/src/page/catalog/page-catalog.component.html @@ -7,8 +7,7 @@ [branchType]="1" [value]="selectedBranch$ | async" (valueChange)="patchProcessData($event)" - > - + > {{ stockTooltipText$ | async }} diff --git a/apps/isa-app/src/page/catalog/page-catalog.component.scss b/apps/isa-app/src/page/catalog/page-catalog.component.scss index 754417aac..2ee1a8fd6 100644 --- a/apps/isa-app/src/page/catalog/page-catalog.component.scss +++ b/apps/isa-app/src/page/catalog/page-catalog.component.scss @@ -22,7 +22,11 @@ shared-branch-selector.shared-branch-selector-opend { @apply rounded-[5px]; } -::ng-deep page-catalog shared-branch-selector .shared-branch-selector-input-container .shared-branch-selector-input-icon { +::ng-deep + page-catalog + shared-branch-selector + .shared-branch-selector-input-container + .shared-branch-selector-input-icon { @apply pl-2 border-l border-solid border-[#AEB7C1] transition-all duration-300 ease-in-out; } diff --git a/apps/isa-app/src/page/catalog/page-catalog.component.ts b/apps/isa-app/src/page/catalog/page-catalog.component.ts index 2b1c9f597..6d57f6d97 100644 --- a/apps/isa-app/src/page/catalog/page-catalog.component.ts +++ b/apps/isa-app/src/page/catalog/page-catalog.component.ts @@ -1,4 +1,13 @@ -import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core'; +import { + AfterViewInit, + ChangeDetectionStrategy, + Component, + ElementRef, + OnDestroy, + OnInit, + Renderer2, + ViewChild, +} from '@angular/core'; import { ApplicationService } from '@core/application'; import { AuthService } from '@core/auth'; import { EnvironmentService } from '@core/environment'; @@ -68,7 +77,9 @@ export class PageCatalogComponent implements OnInit, AfterViewInit, OnDestroy { ngOnInit() { this.activatedProcessId$ = this.application.activatedProcessId$.pipe(map((processId) => String(processId))); - this.selectedBranch$ = this.activatedProcessId$.pipe(switchMap((processId) => this.application.getSelectedBranch$(Number(processId)))); + this.selectedBranch$ = this.activatedProcessId$.pipe( + switchMap((processId) => this.application.getSelectedBranch$(Number(processId))), + ); this.stockTooltipText$ = combineLatest([this.defaultBranch$, this.selectedBranch$]).pipe( map(([defaultBranch, selectedBranch]) => { @@ -83,11 +94,13 @@ export class PageCatalogComponent implements OnInit, AfterViewInit, OnDestroy { } ngAfterViewInit(): void { - this._actions.pipe(takeUntil(this._onDestroy$), withLatestFrom(this.stockTooltipText$)).subscribe(([action, text]) => { - if (action.type === 'OPEN_TOOLTIP_NO_BRANCH_SELECTED' && !!text) { - this.branchInputNoBranchSelectedTrigger.open(); - } - }); + this._actions + .pipe(takeUntil(this._onDestroy$), withLatestFrom(this.stockTooltipText$)) + .subscribe(([action, text]) => { + if (action.type === 'OPEN_TOOLTIP_NO_BRANCH_SELECTED' && !!text) { + this.branchInputNoBranchSelectedTrigger.open(); + } + }); fromEvent(this.branchSelectorRef.nativeElement, 'focusin') .pipe(takeUntil(this._onDestroy$), withLatestFrom(this.isTablet$)) diff --git a/apps/isa-app/src/page/checkout/checkout-dummy/checkout-dummy.component.html b/apps/isa-app/src/page/checkout/checkout-dummy/checkout-dummy.component.html index 1af001448..e3fba612f 100644 --- a/apps/isa-app/src/page/checkout/checkout-dummy/checkout-dummy.component.html +++ b/apps/isa-app/src/page/checkout/checkout-dummy/checkout-dummy.component.html @@ -3,7 +3,8 @@

Neuanlage

- Hier können Sie Artikel manuell
+ Hier können Sie Artikel manuell +
oder per Dummy anlegen.

@@ -20,8 +21,7 @@ [hint]="message$ | async" tabindex="0" [scanner]="true" - > - + > @@ -42,7 +42,7 @@ {{ estimatedShippingDate$ | async | date: 'dd.MM.yy' }} - + - + > diff --git a/apps/isa-app/src/page/checkout/checkout-dummy/checkout-dummy.component.ts b/apps/isa-app/src/page/checkout/checkout-dummy/checkout-dummy.component.ts index 8ec940831..1ed19bdcb 100644 --- a/apps/isa-app/src/page/checkout/checkout-dummy/checkout-dummy.component.ts +++ b/apps/isa-app/src/page/checkout/checkout-dummy/checkout-dummy.component.ts @@ -112,7 +112,9 @@ export class CheckoutDummyComponent implements OnInit, OnDestroy { this.control .get('price') .setValue( - item?.catalogAvailability?.price?.value?.value ? String(item?.catalogAvailability?.price?.value?.value).replace('.', ',') : '', + item?.catalogAvailability?.price?.value?.value + ? String(item?.catalogAvailability?.price?.value?.value).replace('.', ',') + : '', ); this.control.get('vat').setValue(item?.catalogAvailability?.price?.vat?.vatType); } @@ -206,12 +208,16 @@ export class CheckoutDummyComponent implements OnInit, OnDestroy { let filter: { [key: string]: string }; if (!customer && !this._ref?.data?.changeDataFromCart) { filter = customerFilter; - const path = this._customerNavigationService.defaultRoute({ processId: this._applicationService.activatedProcessId }).path; + const path = this._customerNavigationService.defaultRoute({ + processId: this._applicationService.activatedProcessId, + }).path; await this._router.navigate(path, { queryParams: { customertype: filter.customertype }, }); } else { - await this._checkoutNavigationService.getCheckoutReviewPath(this._applicationService.activatedProcessId).navigate(); + await this._checkoutNavigationService + .getCheckoutReviewPath(this._applicationService.activatedProcessId) + .navigate(); } this._ref?.close(); }); @@ -224,12 +230,16 @@ export class CheckoutDummyComponent implements OnInit, OnDestroy { let filter: { [key: string]: string }; if (!customer && !this._ref?.data?.changeDataFromCart) { filter = customerFilter; - const path = this._customerNavigationService.defaultRoute({ processId: this._applicationService.activatedProcessId }).path; + const path = this._customerNavigationService.defaultRoute({ + processId: this._applicationService.activatedProcessId, + }).path; await this._router.navigate(path, { queryParams: { customertype: filter.customertype }, }); } else { - await this._checkoutNavigationService.getCheckoutReviewPath(this._applicationService.activatedProcessId).navigate(); + await this._checkoutNavigationService + .getCheckoutReviewPath(this._applicationService.activatedProcessId) + .navigate(); } this._ref?.close(); }); diff --git a/apps/isa-app/src/page/checkout/checkout-dummy/checkout-dummy.store.ts b/apps/isa-app/src/page/checkout/checkout-dummy/checkout-dummy.store.ts index 87552917e..1c5d22b7e 100644 --- a/apps/isa-app/src/page/checkout/checkout-dummy/checkout-dummy.store.ts +++ b/apps/isa-app/src/page/checkout/checkout-dummy/checkout-dummy.store.ts @@ -116,7 +116,9 @@ export class CheckoutDummyStore extends ComponentStore { readonly customer$ = this.processId$.pipe(switchMap((processId) => this._checkoutService.getBuyer({ processId }))); - readonly customerFeatures$ = this.processId$.pipe(switchMap((processId) => this._checkoutService.getCustomerFeatures({ processId }))); + readonly customerFeatures$ = this.processId$.pipe( + switchMap((processId) => this._checkoutService.getCustomerFeatures({ processId })), + ); readonly customerFilter$ = this.customerFeatures$.pipe( withLatestFrom(this.processId$), diff --git a/apps/isa-app/src/page/checkout/checkout-review/checkout-review.component.html b/apps/isa-app/src/page/checkout/checkout-review/checkout-review.component.html index 57c3b1784..22237ffdc 100644 --- a/apps/isa-app/src/page/checkout/checkout-review/checkout-review.component.html +++ b/apps/isa-app/src/page/checkout/checkout-review/checkout-review.component.html @@ -7,8 +7,10 @@

Ihr Warenkorb ist leer.

- Sie haben alle Artikel aus dem
- Warenkorb entfernt oder noch
+ Sie haben alle Artikel aus dem +
+ Warenkorb entfernt oder noch +
keinen Artikel hinzugefügt.

@@ -21,7 +23,7 @@
- +
diff --git a/apps/isa-app/src/page/checkout/checkout-review/checkout-review.component.ts b/apps/isa-app/src/page/checkout/checkout-review/checkout-review.component.ts index 56ba4fd26..2e159085e 100644 --- a/apps/isa-app/src/page/checkout/checkout-review/checkout-review.component.ts +++ b/apps/isa-app/src/page/checkout/checkout-review/checkout-review.component.ts @@ -60,8 +60,11 @@ export class CheckoutReviewComponent implements OnInit, OnDestroy, AfterViewInit map((items) => items?.filter((item) => item?.features?.orderType === undefined)), ); - trackByGroupedItems: TrackByFunction<{ orderType: string; destination: DestinationDTO; items: ShoppingCartItemDTO[] }> = (_, item) => - item?.orderType + item?.destination?.id; + trackByGroupedItems: TrackByFunction<{ + orderType: string; + destination: DestinationDTO; + items: ShoppingCartItemDTO[]; + }> = (_, item) => item?.orderType + item?.destination?.id; groupedItems$ = this._store.shoppingCartItems$.pipe( takeUntil(this._store.orderCompleted), @@ -259,7 +262,11 @@ export class CheckoutReviewComponent implements OnInit, OnDestroy, AfterViewInit }); } - checkIfMultipleDestinationsForOrderTypeExist(targetBranch: BranchDTO, group: { items: ShoppingCartItemDTO[] }, i: number) { + checkIfMultipleDestinationsForOrderTypeExist( + targetBranch: BranchDTO, + group: { items: ShoppingCartItemDTO[] }, + i: number, + ) { return i === 0 ? false : targetBranch.id !== group.items[i - 1].destination?.data?.targetBranch?.data.id; } @@ -331,7 +338,13 @@ export class CheckoutReviewComponent implements OnInit, OnDestroy, AfterViewInit }); } - async updateItemQuantity({ shoppingCartItem, quantity }: { shoppingCartItem: ShoppingCartItemDTO; quantity: number }) { + async updateItemQuantity({ + shoppingCartItem, + quantity, + }: { + shoppingCartItem: ShoppingCartItemDTO; + quantity: number; + }) { if (quantity === shoppingCartItem.quantity) { return; } @@ -440,7 +453,9 @@ export class CheckoutReviewComponent implements OnInit, OnDestroy, AfterViewInit } else if (availability) { // Wenn das Ergebnis der Availability Abfrage keinen Preis zurückliefert (z.B. HFI Geschenkkarte), wird der Preis aus der // Availability vor der Abfrage verwendet - const updateAvailability = availability?.price ? availability : { ...availability, price: shoppingCartItem.availability?.price }; + const updateAvailability = availability?.price + ? availability + : { ...availability, price: shoppingCartItem.availability?.price }; await this.domainCheckoutService .updateItemInShoppingCart({ diff --git a/apps/isa-app/src/page/checkout/checkout-review/checkout-review.module.ts b/apps/isa-app/src/page/checkout/checkout-review/checkout-review.module.ts index 1044809f0..9346aeb0c 100644 --- a/apps/isa-app/src/page/checkout/checkout-review/checkout-review.module.ts +++ b/apps/isa-app/src/page/checkout/checkout-review/checkout-review.module.ts @@ -42,7 +42,12 @@ import { LoaderComponent, SkeletonLoaderComponent } from '@shared/components/loa SkeletonLoaderComponent, ], exports: [CheckoutReviewComponent, CheckoutReviewDetailsComponent], - declarations: [CheckoutReviewComponent, SpecialCommentComponent, ShoppingCartItemComponent, CheckoutReviewDetailsComponent], + declarations: [ + CheckoutReviewComponent, + SpecialCommentComponent, + ShoppingCartItemComponent, + CheckoutReviewDetailsComponent, + ], providers: [CheckoutReviewStore], }) export class CheckoutReviewModule {} diff --git a/apps/isa-app/src/page/checkout/checkout-review/checkout-review.store.ts b/apps/isa-app/src/page/checkout/checkout-review/checkout-review.store.ts index bf1c3aca2..341f47b8f 100644 --- a/apps/isa-app/src/page/checkout/checkout-review/checkout-review.store.ts +++ b/apps/isa-app/src/page/checkout/checkout-review/checkout-review.store.ts @@ -150,7 +150,11 @@ export class CheckoutReviewStore extends ComponentStore { notificationChannels: (setNotificationChannel as NotificationChannel) || 0, }); } catch (error) { - this._uiModal.open({ content: UiErrorModalComponent, data: error, title: 'Fehler beim setzen des Benachrichtigungskanals' }); + this._uiModal.open({ + content: UiErrorModalComponent, + data: error, + title: 'Fehler beim setzen des Benachrichtigungskanals', + }); } this.notificationChannelLoading$.next(false); diff --git a/apps/isa-app/src/page/checkout/checkout-review/details/checkout-review-details.component.html b/apps/isa-app/src/page/checkout/checkout-review/details/checkout-review-details.component.html index 5b2898340..5e90e1bb9 100644 --- a/apps/isa-app/src/page/checkout/checkout-review/details/checkout-review-details.component.html +++ b/apps/isa-app/src/page/checkout/checkout-review/details/checkout-review-details.component.html @@ -23,8 +23,7 @@ [channelActionName]="'Speichern'" [channelActionLoading]="notificationChannelLoading$ | async" formGroupName="notificationChannel" - > - + > @@ -60,5 +59,4 @@ [hasBuyer]="!!(buyer$ | async)" [ngModel]="specialComment$ | async" (ngModelChange)="setAgentComment($event)" -> - +> diff --git a/apps/isa-app/src/page/checkout/checkout-review/details/checkout-review-details.component.ts b/apps/isa-app/src/page/checkout/checkout-review/details/checkout-review-details.component.ts index a8ba693f9..89ee0d76b 100644 --- a/apps/isa-app/src/page/checkout/checkout-review/details/checkout-review-details.component.ts +++ b/apps/isa-app/src/page/checkout/checkout-review/details/checkout-review-details.component.ts @@ -1,5 +1,8 @@ import { ChangeDetectionStrategy, Component, OnInit, inject } from '@angular/core'; -import { emailNotificationValidator, mobileNotificationValidator } from '@shared/components/notification-channel-control'; +import { + emailNotificationValidator, + mobileNotificationValidator, +} from '@shared/components/notification-channel-control'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms'; import { combineLatest } from 'rxjs'; import { CheckoutReviewStore } from '../checkout-review.store'; @@ -31,7 +34,8 @@ export class CheckoutReviewDetailsComponent implements OnInit { takeUntil(this._store.orderCompleted), map( ([items, payer, buyer]) => - (!!payer || !!buyer) && items.some((item) => item.features?.orderType === 'Rücklage' || item.features?.orderType === 'Abholung'), + (!!payer || !!buyer) && + items.some((item) => item.features?.orderType === 'Rücklage' || item.features?.orderType === 'Abholung'), ), ); @@ -108,8 +112,14 @@ export class CheckoutReviewDetailsComponent implements OnInit { this.control = fb.group({ notificationChannel: new UntypedFormGroup({ selected: new UntypedFormControl(selectedNotificationChannel), - email: new UntypedFormControl(communicationDetails ? communicationDetails.email : '', emailNotificationValidator), - mobile: new UntypedFormControl(communicationDetails ? communicationDetails.mobile : '', mobileNotificationValidator), + email: new UntypedFormControl( + communicationDetails ? communicationDetails.email : '', + emailNotificationValidator, + ), + mobile: new UntypedFormControl( + communicationDetails ? communicationDetails.mobile : '', + mobileNotificationValidator, + ), }), }); this._store.notificationsControl = this.control; @@ -148,7 +158,11 @@ export class CheckoutReviewDetailsComponent implements OnInit { return; } const customerId = customer.source; - await this.customerNavigation.navigateToDetails({ processId, customerId, customer: { customerNumber: customer.buyerNumber } }); + await this.customerNavigation.navigateToDetails({ + processId, + customerId, + customer: { customerNumber: customer.buyerNumber }, + }); // this._router.navigate(['/kunde', this._application.activatedProcessId, 'customer', 'search', `${customerId}`]); } diff --git a/apps/isa-app/src/page/checkout/checkout-review/shopping-cart-item/shopping-cart-item.component.html b/apps/isa-app/src/page/checkout/checkout-review/shopping-cart-item/shopping-cart-item.component.html index 1611fc1eb..6050556ad 100644 --- a/apps/isa-app/src/page/checkout/checkout-review/shopping-cart-item/shopping-cart-item.component.html +++ b/apps/isa-app/src/page/checkout/checkout-review/shopping-cart-item/shopping-cart-item.component.html @@ -37,14 +37,15 @@
{{ item?.product?.manufacturer | substr: 25 }} | {{ item?.product?.ean }}
- {{ item?.product?.volume }} | + {{ item?.product?.volume }} + | {{ item?.product?.publicationDate | date }}
Nicht verfügbar
- +
@@ -60,7 +61,7 @@ und {{ (item?.availability?.estimatedDelivery?.stop | date: 'EEE, dd.MM.')?.replace('.', '') }} - Versand {{ item?.availability?.estimatedShippingDate | date }} + Versand {{ item?.availability?.estimatedShippingDate | date }}
@@ -77,8 +78,7 @@ [showSpinner]="(loadingOnQuantityChangeById$ | async) === item?.id" [disabled]="(loadingOnItemChangeById$ | async) === item?.id" [range]="quantityRange$ | async" - > - + >
{{ item?.quantity }}x
@@ -94,13 +94,13 @@ (click)="onChangeItem()" *ngIf="!(hasOrderType$ | async)" > - Lieferweg auswählen + Lieferweg auswählen
diff --git a/apps/isa-app/src/page/checkout/checkout-review/shopping-cart-item/shopping-cart-item.component.scss b/apps/isa-app/src/page/checkout/checkout-review/shopping-cart-item/shopping-cart-item.component.scss index c38a574a8..df2fb8cab 100644 --- a/apps/isa-app/src/page/checkout/checkout-review/shopping-cart-item/shopping-cart-item.component.scss +++ b/apps/isa-app/src/page/checkout/checkout-review/shopping-cart-item/shopping-cart-item.component.scss @@ -3,10 +3,10 @@ grid-template-columns: 3.75rem auto; grid-template-rows: auto; grid-template-areas: - 'item-thumbnail item-contributors item-price-stock' - 'item-thumbnail item-title item-price-stock' - 'item-thumbnail item-format item-format' - 'item-thumbnail item-info actions'; + "item-thumbnail item-contributors item-price-stock" + "item-thumbnail item-title item-price-stock" + "item-thumbnail item-format item-format" + "item-thumbnail item-info actions"; } button { diff --git a/apps/isa-app/src/page/checkout/checkout-review/shopping-cart-item/shopping-cart-item.component.ts b/apps/isa-app/src/page/checkout/checkout-review/shopping-cart-item/shopping-cart-item.component.ts index a087c13cf..5887639aa 100644 --- a/apps/isa-app/src/page/checkout/checkout-review/shopping-cart-item/shopping-cart-item.component.ts +++ b/apps/isa-app/src/page/checkout/checkout-review/shopping-cart-item/shopping-cart-item.component.ts @@ -1,4 +1,14 @@ -import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, NgZone, OnInit, Output, inject } from '@angular/core'; +import { + ChangeDetectionStrategy, + ChangeDetectorRef, + Component, + EventEmitter, + Input, + NgZone, + OnInit, + Output, + inject, +} from '@angular/core'; import { ApplicationService } from '@core/application'; import { EnvironmentService } from '@core/environment'; import { DomainAvailabilityService } from '@domain/availability'; @@ -47,7 +57,9 @@ export class ShoppingCartItemComponent extends ComponentStore s.item); - readonly contributors$ = this.item$.pipe(map((item) => item?.product?.contributors?.split(';').map((val) => val.trim()))); + readonly contributors$ = this.item$.pipe( + map((item) => item?.product?.contributors?.split(';').map((val) => val.trim())), + ); @Input() get orderType() { @@ -180,7 +192,9 @@ export class ShoppingCartItemComponent extends ComponentStore{{ displayOrder.orderNumber }}
+ {{ displayOrder.orderNumber }} + - + @@ -111,46 +112,47 @@ class="font-bold no-underline text-[#0556B4]" [routerLink]="getProductSearchDetailsPath(order?.product?.ean)" [queryParams]="getProductSearchDetailsQueryParams(order)" - >{{ order?.product?.name }} + {{ order?.product?.name }} +
{{ subsetItem.supplierName }} - {{ subsetItem.ssc }} - {{ subsetItem.sscText }} + + {{ subsetItem.ssc }} - {{ subsetItem.sscText }} +
- {{ order.quantity }}x + {{ order.quantity }}x
- {{ order.price?.value?.value | currency: ' ' }} {{ order.price?.value?.currency }} + {{ order.price?.value?.value | currency: ' ' }} {{ order.price?.value?.currency }}
- Abholung ab {{ (order?.subsetItems)[0]?.estimatedShippingDate | date }} - + + Abholung ab {{ (order?.subsetItems)[0]?.estimatedShippingDate | date }} + - {{ order?.features?.orderType }} - + + {{ order?.features?.orderType }} + - Zustellung zwischen + + Zustellung zwischen {{ ((order?.subsetItems)[0]?.estimatedDelivery?.start | date: 'EEE, dd.MM.')?.replace('.', '') }} und - {{ ((order?.subsetItems)[0]?.estimatedDelivery?.stop | date: 'EEE, dd.MM.')?.replace('.', '') }} + {{ ((order?.subsetItems)[0]?.estimatedDelivery?.stop | date: 'EEE, dd.MM.')?.replace('.', '') }} + Versanddatum {{ (order?.subsetItems)[0]?.estimatedShippingDate | date }} @@ -168,9 +170,9 @@
- {{ totalItemCount$ | async }} Artikel | {{ totalReadingPoints }} Lesepunkte + + {{ totalItemCount$ | async }} Artikel | {{ totalReadingPoints }} Lesepunkte +
@@ -231,7 +233,7 @@ class="px-6 py-2 rounded-full border-2 border-solid border-brand text-brand bg-white font-bold text-lg whitespace-nowrap h-14 flex flex-row items-center justify-center print-button" (click)="printOrderConfirmation()" > - Bestellbestätigung drucken + Bestellbestätigung drucken
@@ -280,8 +280,7 @@ [disabledDaysOfWeek]="[0]" [selected]="orderItem?.pickUpDeadline" (save)="updatePickupDeadline($event)" - > - + >
@@ -312,10 +311,9 @@ [disabledDaysOfWeek]="[0]" [selected]="(preferredPickUpDate$ | async) || today" (save)="updatePreferredPickUpDate($event)" - > - + >
- + @@ -341,8 +339,7 @@ [disabledDaysOfWeek]="[0]" [selected]="orderItem?.estimatedShippingDate" (save)="updateEstimatedShippingDate($event)" - > - + >
diff --git a/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details-header/customer-order-details-header.component.scss b/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details-header/customer-order-details-header.component.scss index e37764a2c..86b6eead2 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details-header/customer-order-details-header.component.scss +++ b/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details-header/customer-order-details-header.component.scss @@ -28,11 +28,11 @@ @apply grid grid-flow-row gap-x-6 gap-y-[0.375rem]; grid-template-columns: 50% auto; grid-template-areas: - 'buyernumber .' - 'ordernumber .' - 'orderdate processingstatus' - 'ordersource changedate' - 'dignotification pickup'; + "buyernumber ." + "ordernumber ." + "orderdate processingstatus" + "ordersource changedate" + "dignotification pickup"; .detail { shared-icon { diff --git a/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details-header/customer-order-details-header.component.ts b/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details-header/customer-order-details-header.component.ts index 5a2b3ac34..d3e5cba64 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details-header/customer-order-details-header.component.ts +++ b/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details-header/customer-order-details-header.component.ts @@ -70,7 +70,9 @@ export class CustomerOrderDetailsHeaderComponent implements OnChanges { shareReplay(), ); - statusActions$ = this.orderItem$.pipe(map((orderItem) => orderItem?.actions?.filter((action) => action.enabled === false))); + statusActions$ = this.orderItem$.pipe( + map((orderItem) => orderItem?.actions?.filter((action) => action.enabled === false)), + ); showMultiselect$ = combineLatest([this._store.items$, this._store.fetchPartial$, this._store.itemsSelectable$]).pipe( map(([orderItems, fetchPartial, multiSelect]) => multiSelect && fetchPartial && orderItems?.length > 1), @@ -93,7 +95,9 @@ export class CustomerOrderDetailsHeaderComponent implements OnChanges { } get showAddresses(): boolean { - return (this.order?.orderType === 2 || this.order?.orderType === 4) && (!!this.order?.shipping || !!this.order?.billing); + return ( + (this.order?.orderType === 2 || this.order?.orderType === 4) && (!!this.order?.shipping || !!this.order?.billing) + ); } get showFeature(): boolean { @@ -151,7 +155,12 @@ export class CustomerOrderDetailsHeaderComponent implements OnChanges { if (this.dateAdapter.compareDate(estimatedShippingDate, new Date(item.pickUpDeadline)) !== 0) { try { const res = await this.omsService - .setEstimatedShippingDate(item.orderId, item.orderItemId, item.orderItemSubsetId, estimatedShippingDate?.toISOString()) + .setEstimatedShippingDate( + item.orderId, + item.orderItemId, + item.orderItemSubsetId, + estimatedShippingDate?.toISOString(), + ) .pipe(first()) .toPromise(); item.estimatedShippingDate = res.estimatedShippingDate; diff --git a/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details-item/customer-order-details-item.component.html b/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details-item/customer-order-details-item.component.html index ff50fe8ca..61c225802 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details-item/customer-order-details-item.component.html +++ b/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details-item/customer-order-details-item.component.html @@ -10,18 +10,22 @@ - Per E-Mail benachrichtigt
+ Per E-Mail benachrichtigt +
- {{ notification | date: 'dd.MM.yyyy | HH:mm' }} Uhr
+ {{ notification | date: 'dd.MM.yyyy | HH:mm' }} Uhr +
- Per SMS benachrichtigt
+ Per SMS benachrichtigt +
- {{ notification | date: 'dd.MM.yyyy | HH:mm' }} Uhr
+ {{ notification | date: 'dd.MM.yyyy | HH:mm' }} Uhr +
@@ -57,15 +61,14 @@
Menge
- {{ orderItem?.quantity }}x + {{ orderItem?.quantity }}x - + > (von {{ orderItem?.overallQuantity }})
@@ -116,8 +119,9 @@ orderItemFeature(orderItem) === 'B2B-Versand' || orderItemFeature(orderItem) === 'DIG-Versand' " - >{{ orderItem?.estimatedDelivery ? 'Lieferung zwischen' : 'Lieferung ab' }}
+ {{ orderItem?.estimatedDelivery ? 'Lieferung zwischen' : 'Lieferung ab' }} + Abholung ab @@ -142,9 +146,9 @@
{{ trackingData.length > 1 ? 'Sendungsnummern' : 'Sendungsnummer' }}
- {{ tracking.trackingProvider }}: {{ tracking.trackingNumber }} + + {{ tracking.trackingProvider }}: {{ tracking.trackingNumber }} +

{{ tracking.trackingProvider }}: {{ tracking.trackingNumber }}

diff --git a/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details-item/customer-order-details-item.component.ts b/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details-item/customer-order-details-item.component.ts index 5c55d6a8f..3e852eff7 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details-item/customer-order-details-item.component.ts +++ b/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details-item/customer-order-details-item.component.ts @@ -38,7 +38,10 @@ export interface CustomerOrderDetailsItemComponentState { changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, }) -export class CustomerOrderDetailsItemComponent extends ComponentStore implements OnInit, OnDestroy { +export class CustomerOrderDetailsItemComponent + extends ComponentStore + implements OnInit, OnDestroy +{ @ViewChild('autosize') autosize: CdkTextareaAutosize; @Output() @@ -80,7 +83,13 @@ export class CustomerOrderDetailsItemComponent extends ComponentStore !!oi), switchMap((oi) => this._omsService - .getCompletedTasks({ orderId: oi.orderId, orderItemId: oi.orderItemId, orderItemSubsetId: oi.orderItemSubsetId, take: 4, skip: 0 }) + .getCompletedTasks({ + orderId: oi.orderId, + orderItemId: oi.orderItemId, + orderItemSubsetId: oi.orderItemSubsetId, + take: 4, + skip: 0, + }) .pipe(catchError(() => NEVER)), ), ); @@ -122,9 +131,11 @@ export class CustomerOrderDetailsItemComponent extends ComponentStore 1 && this._store.fetchPartial; } - readonly selectable$ = combineLatest([this._store.items$, this._store.itemsSelectable$, this._store.fetchPartial$]).pipe( - map(([orderItems, selectable, fetchPartial]) => orderItems.length > 1 && selectable && fetchPartial), - ); + readonly selectable$ = combineLatest([ + this._store.items$, + this._store.itemsSelectable$, + this._store.fetchPartial$, + ]).pipe(map(([orderItems, selectable, fetchPartial]) => orderItems.length > 1 && selectable && fetchPartial)); get receipts() { return this.get((s) => s.receipts); @@ -210,7 +221,12 @@ export class CustomerOrderDetailsItemComponent extends ComponentStore orderItem.data.id === orderItemListItem.orderItemId)?.data?.features?.orderType; + return orderItems?.find((orderItem) => orderItem.data.id === orderItemListItem.orderItemId)?.data?.features + ?.orderType; } - getOrderItemTrackingData(orderItemListItem: OrderItemListItemDTO): Array<{ trackingProvider: string; trackingNumber: string }> { + getOrderItemTrackingData( + orderItemListItem: OrderItemListItemDTO, + ): Array<{ trackingProvider: string; trackingNumber: string }> { const orderItems = this.order?.items; const completeTrackingInformation = orderItems ?.find((orderItem) => orderItem.data.id === orderItemListItem.orderItemId) - ?.data?.subsetItems?.find((subsetItem) => subsetItem.id === orderItemListItem.orderItemSubsetId)?.data?.trackingNumber; + ?.data?.subsetItems?.find((subsetItem) => subsetItem.id === orderItemListItem.orderItemSubsetId) + ?.data?.trackingNumber; if (!completeTrackingInformation) { return; @@ -256,7 +276,9 @@ export class CustomerOrderDetailsItemComponent extends ComponentStore { + private _trackingTransformationHelper( + trackingInformationPairs: string[], + ): Array<{ trackingProvider: string; trackingNumber: string }> { return trackingInformationPairs.reduce( (acc, current, index, array) => { if (index % 2 === 0) { diff --git a/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details.component.html b/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details.component.html index 8d5549e75..8f7fa30bc 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details.component.html +++ b/apps/isa-app/src/page/customer-order/customer-order-details/customer-order-details.component.html @@ -24,9 +24,9 @@ [class.cta-action-secondary]="!action.selected" (click)="handleAction(action, { compartmentCode: latestCompartmentCode, compartmentInfo: latestCompartmentInfo })" > - {{ latestCompartmentCode$ | async | addToPreviousCompartmentCodeLabelPipe }} zubuchen + + {{ latestCompartmentCode$ | async | addToPreviousCompartmentCodeLabelPipe }} zubuchen +
- + diff --git a/apps/isa-app/src/page/customer-order/customer-order-history/customer-order-history.component.ts b/apps/isa-app/src/page/customer-order/customer-order-history/customer-order-history.component.ts index 21db0d6e9..de0348e58 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-history/customer-order-history.component.ts +++ b/apps/isa-app/src/page/customer-order/customer-order-history/customer-order-history.component.ts @@ -20,7 +20,9 @@ export class CustomerOrderHistoryComponent implements OnInit { processId$ = this._activatedRoute.parent.data.pipe(map((params) => +params.processId)); - orderId$: Observable = this._activatedRoute.params.pipe(map((params) => (params.orderId ? Number(params.orderId) : undefined))); + orderId$: Observable = this._activatedRoute.params.pipe( + map((params) => (params.orderId ? Number(params.orderId) : undefined)), + ); compartmentCode$: Observable = this._activatedRoute.params.pipe( map((params) => decodeURIComponent(params?.compartmentCode ?? '') || undefined), @@ -43,13 +45,17 @@ export class CustomerOrderHistoryComponent implements OnInit { customerName$ = this.historyItem$.pipe( map((historyItem) => - [historyItem?.organisation ?? historyItem.organisation, historyItem.lastName, historyItem.firstName].filter((i) => !!i).join(', '), + [historyItem?.organisation ?? historyItem.organisation, historyItem.lastName, historyItem.firstName] + .filter((i) => !!i) + .join(', '), ), ); customerNumber$ = this.historyItem$.pipe(map((historyItem) => historyItem.buyerNumber)); - history$ = this.historyItem$.pipe(switchMap((historyItem) => this._omsService.getHistory(historyItem.orderItemSubsetId).pipe(take(1)))); + history$ = this.historyItem$.pipe( + switchMap((historyItem) => this._omsService.getHistory(historyItem.orderItemSubsetId).pipe(take(1))), + ); constructor( private _activatedRoute: ActivatedRoute, @@ -85,7 +91,9 @@ export class CustomerOrderHistoryComponent implements OnInit { async navigateToDetailsPage({ options }: { options?: { processingStatus?: number } }) { const orderId = this._activatedRoute.snapshot.params.orderId; const compartmentCode = this._activatedRoute.snapshot.params.compartmentCode; - const processingStatus = options?.processingStatus ? options.processingStatus : this._activatedRoute.snapshot.params.processingStatus; + const processingStatus = options?.processingStatus + ? options.processingStatus + : this._activatedRoute.snapshot.params.processingStatus; await this._navigation .getCustomerOrdersDetailsPath({ diff --git a/apps/isa-app/src/page/customer-order/customer-order-routing.module.ts b/apps/isa-app/src/page/customer-order/customer-order-routing.module.ts index 01e3b3f5d..ce8eb9fc9 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-routing.module.ts +++ b/apps/isa-app/src/page/customer-order/customer-order-routing.module.ts @@ -2,9 +2,16 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { CustomerOrderDetailsComponent, CustomerOrderDetailsModule } from './customer-order-details'; import { CustomerOrderEditComponent } from './customer-order-edit'; -import { CustomerOrderSearchComponent, CustomerOrderSearchFilterComponent, CustomerOrderSearchModule } from './customer-order-search'; +import { + CustomerOrderSearchComponent, + CustomerOrderSearchFilterComponent, + CustomerOrderSearchModule, +} from './customer-order-search'; import { CustomerOrderSearchMainComponent, CustomerOrderSearchMainModule } from './customer-order-search/search-main'; -import { CustomerOrderSearchResultsComponent, CustomerOrderSearchResultsModule } from './customer-order-search/search-results'; +import { + CustomerOrderSearchResultsComponent, + CustomerOrderSearchResultsModule, +} from './customer-order-search/search-results'; import { CustomerOrderComponent } from './customer-order.component'; import { CustomerOrderHistoryComponent } from './customer-order-history'; diff --git a/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search-filter/customer-order-search-filter.component.html b/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search-filter/customer-order-search-filter.component.html index be1284819..6aab02e0e 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search-filter/customer-order-search-filter.component.html +++ b/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search-filter/customer-order-search-filter.component.html @@ -23,7 +23,7 @@ [hint]="message$ | async" [scanner]="true" > - + @@ -31,7 +31,7 @@ diff --git a/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search-filter/customer-order-search-filter.component.ts b/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search-filter/customer-order-search-filter.component.ts index 53bc01115..5ee803e0d 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search-filter/customer-order-search-filter.component.ts +++ b/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search-filter/customer-order-search-filter.component.ts @@ -43,11 +43,13 @@ export class CustomerOrderSearchFilterComponent implements OnInit, OnDestroy { } get sideOutlet() { - return this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'side')?.snapshot?.routeConfig?.path; + return this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'side')?.snapshot + ?.routeConfig?.path; } get primaryOutlet() { - return this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'primary')?.snapshot?.routeConfig?.path; + return this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'primary')?.snapshot + ?.routeConfig?.path; } get closeFilterRoute() { @@ -196,10 +198,14 @@ export class CustomerOrderSearchFilterComponent implements OnInit, OnDestroy { hasSelectedOptions(filter: Filter) { // Is Query available - const hasInputOptions = !!filter.input.find((input) => !!input.input.find((fi) => fi.hasFilterInputOptionsSelected())); + const hasInputOptions = !!filter.input.find( + (input) => !!input.input.find((fi) => fi.hasFilterInputOptionsSelected()), + ); // Are filter or filterChips selected - const hasFilterOptions = !!filter.filter.find((input) => !!input.input.find((fi) => fi.hasFilterInputOptionsSelected())); + const hasFilterOptions = !!filter.filter.find( + (input) => !!input.input.find((fi) => fi.hasFilterInputOptionsSelected()), + ); return hasInputOptions || hasFilterOptions; } diff --git a/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search-filter/order-branch-id-input/order-branch-id-input.component.css b/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search-filter/order-branch-id-input/order-branch-id-input.component.css index 375530a42..d7e74680b 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search-filter/order-branch-id-input/order-branch-id-input.component.css +++ b/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search-filter/order-branch-id-input/order-branch-id-input.component.css @@ -2,7 +2,10 @@ @apply border border-solid border-[#AEB7C1] rounded; } -::ng-deep page-order-branch-id-input shared-branch-selector.shared-branch-selector-opend .shared-branch-selector-input-container { +::ng-deep + page-order-branch-id-input + shared-branch-selector.shared-branch-selector-opend + .shared-branch-selector-input-container { @apply border-[#fff] shadow-card; } diff --git a/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search.component.ts b/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search.component.ts index bcd13f2e2..07a32a6e4 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search.component.ts +++ b/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search.component.ts @@ -63,7 +63,9 @@ export class CustomerOrderSearchComponent implements OnInit, OnDestroy { .getCustomerOrdersDetailsPath({ processId, processingStatus: orderItem?.processingStatus, - compartmentCode: orderItem?.compartmentCode ? encodeURIComponent(orderItem.compartmentCode) : undefined, + compartmentCode: orderItem?.compartmentCode + ? encodeURIComponent(orderItem.compartmentCode) + : undefined, orderId: orderItem?.orderId ? orderItem.orderId : undefined, extras: { queryParams }, }) diff --git a/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search.store.ts b/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search.store.ts index 983855015..5384e0ba7 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search.store.ts +++ b/apps/isa-app/src/page/customer-order/customer-order-search/customer-order-search.store.ts @@ -5,7 +5,12 @@ import { DomainCustomerOrderService } from '@domain/oms'; import { ComponentStore } from '@ngrx/component-store'; import { tapResponse } from '@ngrx/operators'; import { Filter } from '@shared/components/filter'; -import { BranchDTO, ListResponseArgsOfOrderItemListItemDTO, OrderItemListItemDTO, QuerySettingsDTO } from '@generated/swagger/oms-api'; +import { + BranchDTO, + ListResponseArgsOfOrderItemListItemDTO, + OrderItemListItemDTO, + QuerySettingsDTO, +} from '@generated/swagger/oms-api'; import { isResponseArgs } from '@utils/object'; import { injectCancelSearchSubject } from '@shared/services/cancel-subject'; import { Observable, Subject } from 'rxjs'; @@ -121,7 +126,11 @@ export class CustomerOrderSearchStore extends ComponentStore s.queryParams); - readonly searchResultSubject = new Subject<{ results: ListResponseArgsOfOrderItemListItemDTO; cached: boolean; clear: boolean }>(); + readonly searchResultSubject = new Subject<{ + results: ListResponseArgsOfOrderItemListItemDTO; + cached: boolean; + clear: boolean; + }>(); readonly searchResultFromCacheSubject = new Subject<{ hits: number; results: OrderItemListItemDTO[] }>(); @@ -193,7 +202,15 @@ export class CustomerOrderSearchStore extends ComponentStore; hits: number; results: OrderItemListItemDTO[] }) { + setCache({ + queryToken, + hits, + results, + }: { + queryToken: Record; + hits: number; + results: OrderItemListItemDTO[]; + }) { this._cache.set(queryToken, { hits, results, @@ -227,14 +244,24 @@ export class CustomerOrderSearchStore extends ComponentStore => { + async ([options, results, filter, branch]): Promise< + [typeof options, typeof results, typeof filter, typeof branch, boolean] + > => { const queryToken = filter?.getQueryToken() ?? {}; const cached: boolean = options?.siletReload && - (await this._cache.get({ ...filter?.getQueryToken(), processId: this.processId, branchId: String(branch?.id) })); + (await this._cache.get({ + ...filter?.getQueryToken(), + processId: this.processId, + branchId: String(branch?.id), + })); if (cached) { - const cachedResults = await this._cache.get({ ...queryToken, processId: this.processId, branchId: String(branch?.id) }); + const cachedResults = await this._cache.get({ + ...queryToken, + processId: this.processId, + branchId: String(branch?.id), + }); if (cachedResults?.results?.length > 0) { this.patchState(cachedResults); this.searchResultFromCacheSubject.next({ hits: cachedResults.hits, results: cachedResults.results }); diff --git a/apps/isa-app/src/page/customer-order/customer-order-search/providers/customer-order-search-main-autocomplete.provider.ts b/apps/isa-app/src/page/customer-order/customer-order-search/providers/customer-order-search-main-autocomplete.provider.ts index c3c16b5d9..e2431cab7 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-search/providers/customer-order-search-main-autocomplete.provider.ts +++ b/apps/isa-app/src/page/customer-order/customer-order-search/providers/customer-order-search-main-autocomplete.provider.ts @@ -23,7 +23,9 @@ export class CustomerOrderSearchMainAutocompleteProvider extends UiFilterAutocom if (input.value.length >= 3) { return this.applicationService.getSelectedBranch$().pipe( switchMap((branch) => - this.omsService.complete(this.createAutocompleteToken(input, branch)).pipe(catchError(() => of({ result: [] }))), + this.omsService + .complete(this.createAutocompleteToken(input, branch)) + .pipe(catchError(() => of({ result: [] }))), ), map((res) => res.result), ); diff --git a/apps/isa-app/src/page/customer-order/customer-order-search/search-main/customer-order-search-main.component.html b/apps/isa-app/src/page/customer-order/customer-order-search/search-main/customer-order-search-main.component.html index 916b7e5a4..b910f1fe5 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-search/search-main/customer-order-search-main.component.html +++ b/apps/isa-app/src/page/customer-order/customer-order-search/search-main/customer-order-search-main.component.html @@ -1,10 +1,14 @@

Kundenbestellung

- Suchen Sie die Kundenbestellungen via
- Kundenname, ISBN/EAN, Bestellnummer,
- Vorgang ID, Abholscheinnummer,
- Abholfachnummer, Kundenkartennummer
+ Suchen Sie die Kundenbestellungen via +
+ Kundenname, ISBN/EAN, Bestellnummer, +
+ Vorgang ID, Abholscheinnummer, +
+ Abholfachnummer, Kundenkartennummer +
oder scannen Sie die Kundenkarte.

diff --git a/apps/isa-app/src/page/customer-order/customer-order-search/search-main/customer-order-search-main.component.ts b/apps/isa-app/src/page/customer-order/customer-order-search/search-main/customer-order-search-main.component.ts index 0be85aaa1..05d74c648 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-search/search-main/customer-order-search-main.component.ts +++ b/apps/isa-app/src/page/customer-order/customer-order-search/search-main/customer-order-search-main.component.ts @@ -34,7 +34,10 @@ export class CustomerOrderSearchMainComponent implements OnInit, OnDestroy { return +this._activatedRoute.parent.parent.snapshot.data.processId; } - hasFilter$ = combineLatest([this._customerOrderSearchStore.filter$, this._customerOrderSearchStore.defaultSettings$]).pipe( + hasFilter$ = combineLatest([ + this._customerOrderSearchStore.filter$, + this._customerOrderSearchStore.defaultSettings$, + ]).pipe( map(([filter, defaultFilter]) => !isEqual(filter?.getQueryParams(), Filter.create(defaultFilter).getQueryParams())), ); @@ -126,7 +129,10 @@ export class CustomerOrderSearchMainComponent implements OnInit, OnDestroy { .pipe(first()) .toPromise(); - const editCrumbs = await this._breadcrumb.getBreadcrumbsByKeyAndTags$(processId, ['customer-order', 'edit']).pipe(first()).toPromise(); + const editCrumbs = await this._breadcrumb + .getBreadcrumbsByKeyAndTags$(processId, ['customer-order', 'edit']) + .pipe(first()) + .toPromise(); editCrumbs.forEach((crumb) => { this._breadcrumb.removeBreadcrumb(crumb.id, true); diff --git a/apps/isa-app/src/page/customer-order/customer-order-search/search-results/customer-order-item.component.html b/apps/isa-app/src/page/customer-order/customer-order-search/search-results/customer-order-item.component.html index 5c0ab0162..49a5bf398 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-search/search-results/customer-order-item.component.html +++ b/apps/isa-app/src/page/customer-order/customer-order-search/search-results/customer-order-item.component.html @@ -94,9 +94,9 @@ class="page-customer-order-item__item-order-number desktop-small:text-xl justify-self-end font-bold" [class.page-customer-order-item__item-order-number-main]="!primaryOutletActive" > - {{ item?.compartmentCode }}{{ item?.compartmentInfo && '_' + item?.compartmentInfo }} + + {{ item?.compartmentCode }}{{ item?.compartmentInfo && '_' + item?.compartmentInfo }} + {{ item?.orderNumber }}
diff --git a/apps/isa-app/src/page/customer-order/customer-order-search/search-results/customer-order-item.component.scss b/apps/isa-app/src/page/customer-order/customer-order-search/search-results/customer-order-item.component.scss index 3eed4d713..d655c00b8 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-search/search-results/customer-order-item.component.scss +++ b/apps/isa-app/src/page/customer-order/customer-order-search/search-results/customer-order-item.component.scss @@ -13,11 +13,11 @@ grid-template-columns: 3.125rem auto; grid-template-rows: 2rem 2rem 10px auto; grid-template-areas: - 'ordernumber status' - 'ordernumber status' - 'separator separator' - 'thumbnail title' - 'thumbnail comment'; + "ordernumber status" + "ordernumber status" + "separator separator" + "thumbnail title" + "thumbnail comment"; } .page-customer-order-item__item-grid-container-main { @@ -25,9 +25,9 @@ grid-template-rows: auto; grid-template-columns: 3.125rem 25% 15% 25% auto; grid-template-areas: - 'thumbnail title format date ordernumber' - 'thumbnail title ean quantity status' - 'thumbnail comment price target status'; + "thumbnail title format date ordernumber" + "thumbnail title ean quantity status" + "thumbnail comment price target status"; } .page-customer-order-item__item-thumbnail { diff --git a/apps/isa-app/src/page/customer-order/customer-order-search/search-results/customer-order-search-results.component.html b/apps/isa-app/src/page/customer-order/customer-order-search/search-results/customer-order-search-results.component.html index 0884cbe91..cd614138f 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-search/search-results/customer-order-search-results.component.html +++ b/apps/isa-app/src/page/customer-order/customer-order-search/search-results/customer-order-search-results.component.html @@ -56,7 +56,7 @@ >

{{ firstItem?.organisation }} - - + - {{ firstItem?.lastName }} {{ firstItem?.firstName }}

@@ -83,7 +83,8 @@
- Es sind im Moment keine Bestellposten vorhanden,
+ Es sind im Moment keine Bestellposten vorhanden, +
die bearbeitet werden können.
diff --git a/apps/isa-app/src/page/customer-order/customer-order-search/search-results/customer-order-search-results.component.ts b/apps/isa-app/src/page/customer-order/customer-order-search/search-results/customer-order-search-results.component.ts index dbf548c6f..10c0028ab 100644 --- a/apps/isa-app/src/page/customer-order/customer-order-search/search-results/customer-order-search-results.component.ts +++ b/apps/isa-app/src/page/customer-order/customer-order-search/search-results/customer-order-search-results.component.ts @@ -79,7 +79,9 @@ export class CustomerOrderSearchResultsComponent actions$ = combineLatest([this.items$, this.selectedOrderItemSubsetIds$]).pipe( map(([items, selectedOrderItemSubsetIds]) => - items?.find((item) => selectedOrderItemSubsetIds.find((orderItemSubsetId) => item.orderItemSubsetId === orderItemSubsetId)), + items?.find((item) => + selectedOrderItemSubsetIds.find((orderItemSubsetId) => item.orderItemSubsetId === orderItemSubsetId), + ), ), map((item) => item?.actions?.filter((action) => this.selectionRules(action))), ); @@ -88,7 +90,9 @@ export class CustomerOrderSearchResultsComponent const items = this._customerOrderSearchStore.results; const selectedOrderItemSubsetIds = this.selectedOrderItemSubsetIds; - return items.filter((item) => selectedOrderItemSubsetIds.some((orderItemSubsetId) => item.orderItemSubsetId === orderItemSubsetId)); + return items.filter((item) => + selectedOrderItemSubsetIds.some((orderItemSubsetId) => item.orderItemSubsetId === orderItemSubsetId), + ); } byBuyerNumberFn = (item: OrderItemListItemDTO) => item.buyerNumber; @@ -104,7 +108,8 @@ export class CustomerOrderSearchResultsComponent private _onDestroy$ = new Subject(); - trackByFn: TrackByFunction = (index, item) => `${item.orderId}${item.orderItemId}${item.orderItemSubsetId}`; + trackByFn: TrackByFunction = (index, item) => + `${item.orderId}${item.orderItemId}${item.orderItemSubsetId}`; private _searchResultSubscription = new Subscription(); @@ -177,7 +182,9 @@ export class CustomerOrderSearchResultsComponent .pipe( debounceTime(150), switchMap(([processId, params]) => - this._application.getSelectedBranch$(processId).pipe(map((selectedBranch) => ({ processId, params, selectedBranch }))), + this._application + .getSelectedBranch$(processId) + .pipe(map((selectedBranch) => ({ processId, params, selectedBranch }))), ), ) .subscribe(async ({ processId, params, selectedBranch }) => { @@ -202,7 +209,9 @@ export class CustomerOrderSearchResultsComponent const cleanQueryParams = this.cleanupQueryParams(params); - if (!isEqual(cleanQueryParams, this.cleanupQueryParams(this._customerOrderSearchStore.filter.getQueryParams()))) { + if ( + !isEqual(cleanQueryParams, this.cleanupQueryParams(this._customerOrderSearchStore.filter.getQueryParams())) + ) { this._customerOrderSearchStore.setQueryParams(params); const queryToken = { @@ -221,8 +230,8 @@ export class CustomerOrderSearchResultsComponent if ( data.results?.length === 0 && - this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'side')?.snapshot?.routeConfig?.path !== - 'filter' + this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'side')?.snapshot + ?.routeConfig?.path !== 'filter' ) { this.search({ clear: true }); } @@ -250,29 +259,33 @@ export class CustomerOrderSearchResultsComponent ); this._searchResultSubscription.add( - this._customerOrderSearchStore.searchResultSubject.pipe(withLatestFrom(this.processId$)).subscribe(async ([result, processId]) => { - const queryParams = this._customerOrderSearchStore.filter?.getQueryParams(); - this.createBreadcrumb(processId, queryParams); + this._customerOrderSearchStore.searchResultSubject + .pipe(withLatestFrom(this.processId$)) + .subscribe(async ([result, processId]) => { + const queryParams = this._customerOrderSearchStore.filter?.getQueryParams(); + this.createBreadcrumb(processId, queryParams); - if (result.results.hits === 0) { - return; - } + if (result.results.hits === 0) { + return; + } - // Navigation auf Details bzw. Results | Details wenn hits 1 - // Navigation auf Results bei clear search, oder immer auf Tablet oder wenn große Resultliste aktiv ist - if (result.results.hits === 1) { - await this.navigateToDetails( - processId, - result?.results?.result?.find((_) => true), - queryParams, - ); - } else if ((!!result?.clear || this._activatedRoute.outlet === 'primary') && this.isDesktopLarge) { - await this._navigationService.getCustomerOrdersResultsPath(processId, { queryParams }).navigate(); - } - }), + // Navigation auf Details bzw. Results | Details wenn hits 1 + // Navigation auf Results bei clear search, oder immer auf Tablet oder wenn große Resultliste aktiv ist + if (result.results.hits === 1) { + await this.navigateToDetails( + processId, + result?.results?.result?.find((_) => true), + queryParams, + ); + } else if ((!!result?.clear || this._activatedRoute.outlet === 'primary') && this.isDesktopLarge) { + await this._navigationService.getCustomerOrdersResultsPath(processId, { queryParams }).navigate(); + } + }), ); - this._customerOrderSearchStore.searchResultClearedSubject.pipe(takeUntil(this._onDestroy$)).subscribe((_) => this.clearSelectedItems()); + this._customerOrderSearchStore.searchResultClearedSubject + .pipe(takeUntil(this._onDestroy$)) + .subscribe((_) => this.clearSelectedItems()); // #4143 To make Splitscreen Search and Filter work combined this._searchResultSubscription.add( @@ -311,7 +324,10 @@ export class CustomerOrderSearchResultsComponent } private async _getScrollPositionFromCache(): Promise { - return await this._cache.get({ processId: this._customerOrderSearchStore.processId, token: this.SCROLL_POSITION_TOKEN }); + return await this._cache.get({ + processId: this._customerOrderSearchStore.processId, + token: this.SCROLL_POSITION_TOKEN, + }); } // After Navigating to Result Side Outlet @@ -328,7 +344,10 @@ export class CustomerOrderSearchResultsComponent this._onDestroy$.complete(); this._searchResultSubscription.unsubscribe(); - await this.updateBreadcrumb(this._customerOrderSearchStore.processId, this._customerOrderSearchStore.filter?.getQueryParams()); + await this.updateBreadcrumb( + this._customerOrderSearchStore.processId, + this._customerOrderSearchStore.filter?.getQueryParams(), + ); } cleanupQueryParams(params: Record = {}) { @@ -427,7 +446,15 @@ export class CustomerOrderSearchResultsComponent } } - search({ filter, silentReload = false, clear = false }: { filter?: Filter; silentReload?: boolean; clear?: boolean }) { + search({ + filter, + silentReload = false, + clear = false, + }: { + filter?: Filter; + silentReload?: boolean; + clear?: boolean; + }) { if (!!filter) { this.sharedFilterInputGroupMain.cancelAutocomplete(); this._customerOrderSearchStore.setQueryParams(filter?.getQueryParams()); diff --git a/apps/isa-app/src/page/customer-order/customer-order.component.html b/apps/isa-app/src/page/customer-order/customer-order.component.html index 5028bcee7..a80d388bd 100644 --- a/apps/isa-app/src/page/customer-order/customer-order.component.html +++ b/apps/isa-app/src/page/customer-order/customer-order.component.html @@ -1,6 +1,9 @@ - - + diff --git a/apps/isa-app/src/page/customer-order/customer-order.component.scss b/apps/isa-app/src/page/customer-order/customer-order.component.scss index 1a3589e28..d8e33eb55 100644 --- a/apps/isa-app/src/page/customer-order/customer-order.component.scss +++ b/apps/isa-app/src/page/customer-order/customer-order.component.scss @@ -22,7 +22,11 @@ shared-branch-selector.shared-branch-selector-opend { @apply rounded-[5px]; } -::ng-deep page-customer-order shared-branch-selector .shared-branch-selector-input-container .shared-branch-selector-input-icon { +::ng-deep + page-customer-order + shared-branch-selector + .shared-branch-selector-input-container + .shared-branch-selector-input-icon { @apply pl-2 border-l border-solid border-[#AEB7C1] transition-all duration-300 ease-in-out; } @@ -42,6 +46,9 @@ shared-branch-selector.shared-branch-selector-opend { @apply hidden; } -::ng-deep page-customer-order shared-branch-selector.shared-branch-selector-opend .shared-branch-selector-input-container { +::ng-deep + page-customer-order + shared-branch-selector.shared-branch-selector-opend + .shared-branch-selector-input-container { @apply rounded-br-none; } diff --git a/apps/isa-app/src/page/customer-order/pipes/customer-order-processing-status.pipe.ts b/apps/isa-app/src/page/customer-order/pipes/customer-order-processing-status.pipe.ts index 30a1bc337..03cca06c7 100644 --- a/apps/isa-app/src/page/customer-order/pipes/customer-order-processing-status.pipe.ts +++ b/apps/isa-app/src/page/customer-order/pipes/customer-order-processing-status.pipe.ts @@ -48,6 +48,10 @@ export class CustomerOrderProcessingStatusPipe implements PipeTransform { }; transform(value: OrderItemProcessingStatusValue, type: 'icon' | 'text' = 'text'): string { - return type === 'icon' ? this.icon[value] : ProcessingStatusNameMap.get(value) ? ProcessingStatusNameMap.get(value).value : ''; + return type === 'icon' + ? this.icon[value] + : ProcessingStatusNameMap.get(value) + ? ProcessingStatusNameMap.get(value).value + : ''; } } diff --git a/apps/isa-app/src/page/customer/components/customer-menu/customer-menu.component.html b/apps/isa-app/src/page/customer/components/customer-menu/customer-menu.component.html index 0f0297400..431b0417a 100644 --- a/apps/isa-app/src/page/customer/components/customer-menu/customer-menu.component.html +++ b/apps/isa-app/src/page/customer/components/customer-menu/customer-menu.component.html @@ -18,32 +18,36 @@ [routerLink]="customerDetailsRoute.path" [queryParams]="customerDetailsRoute.queryParams" [queryParamsHandling]="'merge'" - >Kundendetails + Kundendetails + Bestellungen + Bestellungen + Kundenkarte + Kundenkarte + Historie + Historie + diff --git a/apps/isa-app/src/page/customer/components/customer-menu/customer-menu.component.ts b/apps/isa-app/src/page/customer/components/customer-menu/customer-menu.component.ts index 2973e97c0..cc9b92c68 100644 --- a/apps/isa-app/src/page/customer/components/customer-menu/customer-menu.component.ts +++ b/apps/isa-app/src/page/customer/components/customer-menu/customer-menu.component.ts @@ -87,10 +87,19 @@ export class CustomerMenuComponent extends ComponentStore - showCustomerCard && hasCustomerCard && processId && customerId && this._navigation.kundenkarteRoute({ processId, customerId }), + showCustomerCard && + hasCustomerCard && + processId && + customerId && + this._navigation.kundenkarteRoute({ processId, customerId }), ), ); diff --git a/apps/isa-app/src/page/customer/components/customer-result-list/customer-result-list-item-full/customer-result-list-item-full.component.html b/apps/isa-app/src/page/customer/components/customer-result-list/customer-result-list-item-full/customer-result-list-item-full.component.html index eb267411e..855d48c36 100644 --- a/apps/isa-app/src/page/customer/components/customer-result-list/customer-result-list-item-full/customer-result-list-item-full.component.html +++ b/apps/isa-app/src/page/customer/components/customer-result-list/customer-result-list-item-full/customer-result-list-item-full.component.html @@ -5,7 +5,7 @@ [style.backgroundColor]="customerLabelColor[label?.description]" > - {{ label?.description }} + {{ label?.description }}
{{ customer?.created | date: 'dd.MM.yy' }} @@ -13,7 +13,7 @@
- {{ customer | customerName }} + {{ customer | customerName }}
diff --git a/apps/isa-app/src/page/customer/components/customer-result-list/customer-result-list-item/customer-result-list-item.component.html b/apps/isa-app/src/page/customer/components/customer-result-list/customer-result-list-item/customer-result-list-item.component.html index bb0fefcd7..ba71fa960 100644 --- a/apps/isa-app/src/page/customer/components/customer-result-list/customer-result-list-item/customer-result-list-item.component.html +++ b/apps/isa-app/src/page/customer/components/customer-result-list/customer-result-list-item/customer-result-list-item.component.html @@ -5,7 +5,7 @@ [style.backgroundColor]="customerLabelColor[label?.description]" > - {{ label?.description }} + {{ label?.description }}
{{ customer?.created | date: 'dd.MM.yy' }} @@ -13,7 +13,7 @@
- {{ customer | customerName }} + {{ customer | customerName }}
diff --git a/apps/isa-app/src/page/customer/components/customer-result-list/customer-result-list.component.html b/apps/isa-app/src/page/customer/components/customer-result-list/customer-result-list.component.html index e68f73ecf..b17cfa671 100644 --- a/apps/isa-app/src/page/customer/components/customer-result-list/customer-result-list.component.html +++ b/apps/isa-app/src/page/customer/components/customer-result-list/customer-result-list.component.html @@ -46,13 +46,14 @@ Hinweis: Aus Datenschutzgründen werden nur Teilinformationen dargestellt. Tab auf einen Kunden um mehr zu erfahren.
- Kunden nicht gefunden? + Kunden nicht gefunden? Neue Kundendaten erfassen + Neue Kundendaten erfassen +
diff --git a/apps/isa-app/src/page/customer/components/customer-result-list/customer-result-list.module.ts b/apps/isa-app/src/page/customer/components/customer-result-list/customer-result-list.module.ts index 35a8205f2..6801baf57 100644 --- a/apps/isa-app/src/page/customer/components/customer-result-list/customer-result-list.module.ts +++ b/apps/isa-app/src/page/customer/components/customer-result-list/customer-result-list.module.ts @@ -13,7 +13,12 @@ import { CustomerNamePipe } from '@shared/pipes/customer'; @NgModule({ imports: [IconComponent, CommonModule, SearchboxModule, ScrollingModule, RouterModule, CustomerNamePipe], - exports: [CustomerResultListComponent, CustomerResultListComponent, CustomerResultListItemFullComponent, CustomerResultListItemComponent], + exports: [ + CustomerResultListComponent, + CustomerResultListComponent, + CustomerResultListItemFullComponent, + CustomerResultListItemComponent, + ], declarations: [ CustomerResultListComponent, CustomerResultListComponent, diff --git a/apps/isa-app/src/page/customer/components/customer-type-selector/customer-type-selector.component.ts b/apps/isa-app/src/page/customer/components/customer-type-selector/customer-type-selector.component.ts index b3aaa1458..467b0ac22 100644 --- a/apps/isa-app/src/page/customer/components/customer-type-selector/customer-type-selector.component.ts +++ b/apps/isa-app/src/page/customer/components/customer-type-selector/customer-type-selector.component.ts @@ -249,7 +249,8 @@ export class CustomerTypeSelectorComponent } else { // wenn customerType nicht gesetzt wird und p4mUser false ist, // dann customerType auf den ersten verfügbaren setzen der nicht mit dem aktuellen customerType übereinstimmt. - this.customerType = first(this.enabledOptions.filter((o) => o.value === this.customerType))?.value ?? this.customerType; + this.customerType = + first(this.enabledOptions.filter((o) => o.value === this.customerType))?.value ?? this.customerType; } } diff --git a/apps/isa-app/src/page/customer/components/form-blocks/address/address-form-block.component.ts b/apps/isa-app/src/page/customer/components/form-blocks/address/address-form-block.component.ts index 240af0448..1ad86153e 100644 --- a/apps/isa-app/src/page/customer/components/form-blocks/address/address-form-block.component.ts +++ b/apps/isa-app/src/page/customer/components/form-blocks/address/address-form-block.component.ts @@ -44,7 +44,10 @@ export class AddressFormBlockComponent extends FormBlockGroup - + > - + > - + > - + > implements AfterViewInit { +export class DeviatingAddressFormBlockComponent + extends FormBlockGroup + implements AfterViewInit +{ @Input() organisation = false; diff --git a/apps/isa-app/src/page/customer/create-customer/abstract-create-customer.ts b/apps/isa-app/src/page/customer/create-customer/abstract-create-customer.ts index f8ef76d14..87e758ad3 100644 --- a/apps/isa-app/src/page/customer/create-customer/abstract-create-customer.ts +++ b/apps/isa-app/src/page/customer/create-customer/abstract-create-customer.ts @@ -1,6 +1,13 @@ import { HttpErrorResponse } from '@angular/common/http'; import { ChangeDetectorRef, Directive, OnDestroy, OnInit, ViewChild, inject } from '@angular/core'; -import { AbstractControl, AsyncValidatorFn, UntypedFormControl, UntypedFormGroup, ValidationErrors, ValidatorFn } from '@angular/forms'; +import { + AbstractControl, + AsyncValidatorFn, + UntypedFormControl, + UntypedFormGroup, + ValidationErrors, + ValidatorFn, +} from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { BreadcrumbService } from '@core/breadcrumb'; import { CrmCustomerService } from '@domain/crm'; @@ -22,7 +29,11 @@ import { startWith, takeUntil, } from 'rxjs/operators'; -import { AddressFormBlockComponent, DeviatingAddressFormBlockComponent, DeviatingAddressFormBlockData } from '../components/form-blocks'; +import { + AddressFormBlockComponent, + DeviatingAddressFormBlockComponent, + DeviatingAddressFormBlockData, +} from '../components/form-blocks'; import { FormBlock } from '../components/form-blocks/form-block'; import { CustomerCreateFormData, @@ -135,7 +146,10 @@ export abstract class AbstractCreateCustomer implements OnInit, OnDestroy { } async cleanupBreadcrumb(processId: number) { - const crumbs = await this.breadcrumb.getBreadcrumbsByKeyAndTags$(processId, ['customer', 'main']).pipe(first()).toPromise(); + const crumbs = await this.breadcrumb + .getBreadcrumbsByKeyAndTags$(processId, ['customer', 'main']) + .pipe(first()) + .toPromise(); for (const crumb of crumbs) { await this.breadcrumb.removeBreadcrumbsAfter(crumb.id); } @@ -437,7 +451,13 @@ export abstract class AbstractCreateCustomer implements OnInit, OnDestroy { return customer; } - mapToShippingAddress({ name, address, email, organisation, phoneNumbers }: DeviatingAddressFormBlockData): ShippingAddressDTO { + mapToShippingAddress({ + name, + address, + email, + organisation, + phoneNumbers, + }: DeviatingAddressFormBlockData): ShippingAddressDTO { return { gender: name?.gender, title: name?.title, diff --git a/apps/isa-app/src/page/customer/create-customer/create-b2b-customer/create-b2b-customer.component.html b/apps/isa-app/src/page/customer/create-customer/create-b2b-customer/create-b2b-customer.component.html index 9c5e0607c..e372baf30 100644 --- a/apps/isa-app/src/page/customer/create-customer/create-b2b-customer/create-b2b-customer.component.html +++ b/apps/isa-app/src/page/customer/create-customer/create-b2b-customer/create-b2b-customer.component.html @@ -1,8 +1,10 @@

Kundendaten erfassen

- Um Ihnen den ausgewählten Service zu
- ermöglichen, legen wir Ihnen gerne
+ Um Ihnen den ausgewählten Service zu +
+ ermöglichen, legen wir Ihnen gerne +
ein Kundenkonto an.

@@ -11,8 +13,7 @@ [p4mUser]="false" customerType="b2b" (valueChanges)="customerTypeChanged($event)" - > - + > - + > - + > - + > - + > - + >

Kundendaten erfassen

- Um Ihnen den ausgewählten Service
- zu ermöglichen, legen wir Ihnen
- gerne ein Kundenkonto an.
+ Um Ihnen den ausgewählten Service +
+ zu ermöglichen, legen wir Ihnen +
+ gerne ein Kundenkonto an. +

- + > - + >

Wir werden Ihnen Werbung zu ähnlichen Produkten oder Dienstleistungen aus unserem Sortiment per E-Mail zusenden. Sie können der @@ -39,8 +40,7 @@ (dataChanges)="patchFormData('email', $event)" [validatorFns]="emailFormBlockValidators" (onInit)="addFormBlock('email', $event)" - > - + > - + > - + > - + > - + >

- Um Sie als Kunde beim nächsten
- Einkauf wieder zu erkennen, legen
+ Um Sie als Kunde beim nächsten +
+ Einkauf wieder zu erkennen, legen +
wir Ihnen gerne eine Kundenkarte an.

@@ -17,8 +19,7 @@ [customerType]="_customerType" (valueChanges)="customerTypeChanged($event)" [p4mReadonly]="data?._meta?.p4mRequired" - > - + > - + > - + > - + > - + >

Wir werden Ihnen Werbung zu ähnlichen Produkten oder Dienstleistungen aus unserem Sortiment per E-Mail zusenden. Sie können der @@ -80,8 +77,7 @@ (dataChanges)="patchFormData('email', $event)" [validatorFns]="emailValidatorFn" [asyncValidatorFns]="asyncEmailVlaidtorFn" - > - + > - + > - + > - + > = { street: [Validators.required], @@ -258,7 +268,9 @@ export class CreateP4MCustomerComponent extends AbstractCreateCustomer implement if (newsletter) { customer.features.push(newsletter); } else { - customer.features = customer.features.filter((feature) => feature.key !== 'kubi_newsletter' && feature.group !== 'KUBI_NEWSLETTER'); + customer.features = customer.features.filter( + (feature) => feature.key !== 'kubi_newsletter' && feature.group !== 'KUBI_NEWSLETTER', + ); } if (isWebshop) { diff --git a/apps/isa-app/src/page/customer/create-customer/create-store-customer/create-store-customer.component.html b/apps/isa-app/src/page/customer/create-customer/create-store-customer/create-store-customer.component.html index d2fc2f01c..8b13d81ed 100644 --- a/apps/isa-app/src/page/customer/create-customer/create-store-customer/create-store-customer.component.html +++ b/apps/isa-app/src/page/customer/create-customer/create-store-customer/create-store-customer.component.html @@ -7,8 +7,7 @@ [p4mUser]="false" customerType="store" (valueChanges)="customerTypeChanged($event)" - > - + > - + > - + > - + > - + >

diff --git a/apps/isa-app/src/page/customer/create-customer/create-store-customer/create-store-customer.module.ts b/apps/isa-app/src/page/customer/create-customer/create-store-customer/create-store-customer.module.ts index 5590783f2..40f561412 100644 --- a/apps/isa-app/src/page/customer/create-customer/create-store-customer/create-store-customer.module.ts +++ b/apps/isa-app/src/page/customer/create-customer/create-store-customer/create-store-customer.module.ts @@ -7,7 +7,11 @@ import { NameFormBlockModule } from '../../components/form-blocks/name'; import { OrganisationFormBlockModule } from '../../components/form-blocks/organisation'; import { BirthDateFormBlockModule } from '../../components/form-blocks/birth-date'; import { CustomerTypeSelectorModule } from '../../components/customer-type-selector'; -import { DeviatingAddressFormBlockComponentModule, EmailFormBlockModule, PhoneNumbersFormBlockModule } from '../../components/form-blocks'; +import { + DeviatingAddressFormBlockComponentModule, + EmailFormBlockModule, + PhoneNumbersFormBlockModule, +} from '../../components/form-blocks'; import { UiSpinnerModule } from '@ui/spinner'; @NgModule({ diff --git a/apps/isa-app/src/page/customer/create-customer/create-webshop-customer/create-webshop-customer.component.html b/apps/isa-app/src/page/customer/create-customer/create-webshop-customer/create-webshop-customer.component.html index da5f8c0bc..d36b8a75e 100644 --- a/apps/isa-app/src/page/customer/create-customer/create-webshop-customer/create-webshop-customer.component.html +++ b/apps/isa-app/src/page/customer/create-customer/create-webshop-customer/create-webshop-customer.component.html @@ -1,8 +1,10 @@

Kundendaten erfassen

- Wenn Sie möchten legen wir Ihnen
- gerne ein Onlinekonto an. Dort können
+ Wenn Sie möchten legen wir Ihnen +
+ gerne ein Onlinekonto an. Dort können +
Sie Ihre Bestellungen einsehen.

@@ -11,8 +13,7 @@ [p4mUser]="false" customerType="webshop" (valueChanges)="customerTypeChanged($event)" - > - + > - + >

Wir werden Ihnen Werbung zu ähnlichen Produkten oder Dienstleistungen aus unserem Sortiment per E-Mail zusenden. Sie können der @@ -49,8 +49,7 @@ (onInit)="addFormBlock('organisation', $event)" [data]="data.organisation" (dataChanges)="patchFormData('organisation', $event)" - > - + > - + >

Das Anlegen geht für Sie noch schneller, wenn wir Ihnen das initiale Passwort per SMS auf Ihr Mobilgerät schicken.

diff --git a/apps/isa-app/src/page/customer/create-customer/create-webshop-customer/create-webshop-customer.component.ts b/apps/isa-app/src/page/customer/create-customer/create-webshop-customer/create-webshop-customer.component.ts index 2da19a13f..eddeba2e8 100644 --- a/apps/isa-app/src/page/customer/create-customer/create-webshop-customer/create-webshop-customer.component.ts +++ b/apps/isa-app/src/page/customer/create-customer/create-webshop-customer/create-webshop-customer.component.ts @@ -2,7 +2,11 @@ import { Component, ChangeDetectionStrategy, ViewChild } from '@angular/core'; import { ValidatorFn, Validators } from '@angular/forms'; import { CustomerDTO } from '@generated/swagger/crm-api'; import { map } from 'rxjs/operators'; -import { AddressFormBlockComponent, AddressFormBlockData, DeviatingAddressFormBlockComponent } from '../../components/form-blocks'; +import { + AddressFormBlockComponent, + AddressFormBlockData, + DeviatingAddressFormBlockComponent, +} from '../../components/form-blocks'; import { NameFormBlockData } from '../../components/form-blocks/name/name-form-block-data'; import { validateEmail } from '../../validators/email-validator'; import { AbstractCreateCustomer } from '../abstract-create-customer'; diff --git a/apps/isa-app/src/page/customer/create-customer/create-webshop-customer/create-webshop-customer.module.ts b/apps/isa-app/src/page/customer/create-customer/create-webshop-customer/create-webshop-customer.module.ts index c230250a5..d566aa5c5 100644 --- a/apps/isa-app/src/page/customer/create-customer/create-webshop-customer/create-webshop-customer.module.ts +++ b/apps/isa-app/src/page/customer/create-customer/create-webshop-customer/create-webshop-customer.module.ts @@ -7,7 +7,11 @@ import { BirthDateFormBlockModule } from '../../components/form-blocks/birth-dat import { NameFormBlockModule } from '../../components/form-blocks/name'; import { OrganisationFormBlockModule } from '../../components/form-blocks/organisation'; import { CustomerTypeSelectorModule } from '../../components/customer-type-selector'; -import { DeviatingAddressFormBlockComponentModule, EmailFormBlockModule, PhoneNumbersFormBlockModule } from '../../components/form-blocks'; +import { + DeviatingAddressFormBlockComponentModule, + EmailFormBlockModule, + PhoneNumbersFormBlockModule, +} from '../../components/form-blocks'; import { UiSpinnerModule } from '@ui/spinner'; @NgModule({ diff --git a/apps/isa-app/src/page/customer/create-customer/customer-create-form-data.ts b/apps/isa-app/src/page/customer/create-customer/customer-create-form-data.ts index 1d792b8a0..635b3883a 100644 --- a/apps/isa-app/src/page/customer/create-customer/customer-create-form-data.ts +++ b/apps/isa-app/src/page/customer/create-customer/customer-create-form-data.ts @@ -1,5 +1,9 @@ import { CustomerDTO, CustomerInfoDTO } from '@generated/swagger/crm-api'; -import { AddressFormBlockData, DeviatingAddressFormBlockData, PhoneNumbersFormBlockData } from '../components/form-blocks'; +import { + AddressFormBlockData, + DeviatingAddressFormBlockData, + PhoneNumbersFormBlockData, +} from '../components/form-blocks'; import { InterestsFormBlockData } from '../components/form-blocks/interests/interests-form-block-data'; import { NameFormBlockData } from '../components/form-blocks/name/name-form-block-data'; import { OrganisationFormBlockData } from '../components/form-blocks/organisation/organisation-form-block-data'; @@ -73,7 +77,9 @@ export function mapCustomerInfoDtoToCustomerCreateFormData(customerInfoDto: Cust return dic; }, {}); - const newsletter = !!customerInfoDto.features?.find((f) => f.key === 'kubi_newsletter' && f.group === 'KUBI_NEWSLETTER'); + const newsletter = !!customerInfoDto.features?.find( + (f) => f.key === 'kubi_newsletter' && f.group === 'KUBI_NEWSLETTER', + ); const hasLocalityCard = !!p4m; diff --git a/apps/isa-app/src/page/customer/create-customer/update-p4m-webshop-customer/update-p4m-webshop-customer.component.html b/apps/isa-app/src/page/customer/create-customer/update-p4m-webshop-customer/update-p4m-webshop-customer.component.html index dfc21c9c2..0c9ec0c3f 100644 --- a/apps/isa-app/src/page/customer/create-customer/update-p4m-webshop-customer/update-p4m-webshop-customer.component.html +++ b/apps/isa-app/src/page/customer/create-customer/update-p4m-webshop-customer/update-p4m-webshop-customer.component.html @@ -2,8 +2,12 @@

Kundenkartendaten erfasen

Bitte erfassen Sie die Kundenkarte

- - + - + > - + > - + > - + - + - +

Rechnungsadresse

@@ -100,8 +101,7 @@ (dataChanges)="patchFormData('birthDate', $event)" [requiredMark]="true" [validatorFns]="birthDateValidatorFns" - > - + > (new Date(prev.isDefault) > new Date(curr.isDefault) ? prev : curr)); + const defaultPayer = payers.reduce((prev, curr) => + new Date(prev.isDefault) > new Date(curr.isDefault) ? prev : curr, + ); return defaultPayer.payer.data; } @@ -142,7 +144,9 @@ export class UpdateP4MWebshopCustomerComponent extends AbstractCreateCustomer im if (newsletter) { customer.features.push(newsletter); } else { - customer.features = customer.features.filter((feature) => feature.key !== 'kubi_newsletter' && feature.group !== 'KUBI_NEWSLETTER'); + customer.features = customer.features.filter( + (feature) => feature.key !== 'kubi_newsletter' && feature.group !== 'KUBI_NEWSLETTER', + ); } res = await this.customerService.updateToP4MOnlineCustomer(customer); diff --git a/apps/isa-app/src/page/customer/customer-search/add-shipping-address-main-view/add-shipping-address-main-view.component.ts b/apps/isa-app/src/page/customer/customer-search/add-shipping-address-main-view/add-shipping-address-main-view.component.ts index c59e766f0..f767dd2a9 100644 --- a/apps/isa-app/src/page/customer/customer-search/add-shipping-address-main-view/add-shipping-address-main-view.component.ts +++ b/apps/isa-app/src/page/customer/customer-search/add-shipping-address-main-view/add-shipping-address-main-view.component.ts @@ -127,7 +127,11 @@ export class AddShippingAddressMainViewComponent implements OnInit, OnDestroy { address: addressValidationResult, }; - const result = await this._customerService.createShippingAddress(this._store.customerId, shippingAddress, formData.isDefault); + const result = await this._customerService.createShippingAddress( + this._store.customerId, + shippingAddress, + formData.isDefault, + ); this._navigation.navigateToDetails({ processId: this._store.processId, customerId: this._store.customerId }); } catch (error) { diff --git a/apps/isa-app/src/page/customer/customer-search/customer-search.component.ts b/apps/isa-app/src/page/customer/customer-search/customer-search.component.ts index fbd3c43ea..de129c581 100644 --- a/apps/isa-app/src/page/customer/customer-search/customer-search.component.ts +++ b/apps/isa-app/src/page/customer/customer-search/customer-search.component.ts @@ -91,9 +91,11 @@ export class CustomerSearchComponent implements OnInit, OnDestroy { this.checkBreadcrumbs(); // Wenn der delay nicht angewendet wird, dann wird die Breacrumb zwei mal angelegt - this._customerChangedSubscription = this._store.customer$.pipe(takeUntil(this._onDestroy$), delay(1)).subscribe((c) => { - this.checkDetailsBreadcrumb(); - }); + this._customerChangedSubscription = this._store.customer$ + .pipe(takeUntil(this._onDestroy$), delay(1)) + .subscribe((c) => { + this.checkDetailsBreadcrumb(); + }); this._eventsSubscription = this._router.events.pipe(takeUntil(this._onDestroy$)).subscribe((event) => { if (event instanceof NavigationEnd) { @@ -128,7 +130,11 @@ export class CustomerSearchComponent implements OnInit, OnDestroy { } else if (response.hits > 1) { const route = this._navigation.listRoute({ processId, filter }); - if ((['details'].includes(this.breadcrumb) && response?.result?.some((c) => c.id === this._store.customerId)) || restored) { + if ( + (['details'].includes(this.breadcrumb) && + response?.result?.some((c) => c.id === this._store.customerId)) || + restored + ) { await this._router.navigate([], { queryParams: route.queryParams }); } else { await this._router.navigate(route.path, { queryParams: route.queryParams }); @@ -330,7 +336,10 @@ export class CustomerSearchComponent implements OnInit, OnDestroy { const fullName = `${customer?.firstName ?? ''} ${customer?.lastName ?? ''}`.trim(); if (!detailsBreadcrumb) { - const navigation = this._navigation.detailsRoute({ processId: this._store.processId, customerId: this._store.customerId }); + const navigation = this._navigation.detailsRoute({ + processId: this._store.processId, + customerId: this._store.customerId, + }); const breadcrumb: Breadcrumb = { key: this._store.processId, @@ -343,7 +352,10 @@ export class CustomerSearchComponent implements OnInit, OnDestroy { this._breadcrumbService.addBreadcrumb(breadcrumb); } else if (!!fullName) { - const navigation = this._navigation.detailsRoute({ processId: this._store.processId, customerId: this._store.customerId }); + const navigation = this._navigation.detailsRoute({ + processId: this._store.processId, + customerId: this._store.customerId, + }); this._breadcrumbService.patchBreadcrumb(detailsBreadcrumb.id, { name: fullName, @@ -366,7 +378,10 @@ export class CustomerSearchComponent implements OnInit, OnDestroy { if (this.breadcrumb === 'history') { if (!historyBreadcrumb) { - const navigation = this._navigation.historyRoute({ processId: this._store.processId, customerId: this._store.customerId }); + const navigation = this._navigation.historyRoute({ + processId: this._store.processId, + customerId: this._store.customerId, + }); const breadcrumb: Breadcrumb = { key: this._store.processId, @@ -379,7 +394,10 @@ export class CustomerSearchComponent implements OnInit, OnDestroy { this._breadcrumbService.addBreadcrumb(breadcrumb); } else { - const navigation = this._navigation.historyRoute({ processId: this._store.processId, customerId: this._store.customerId }); + const navigation = this._navigation.historyRoute({ + processId: this._store.processId, + customerId: this._store.customerId, + }); this._breadcrumbService.patchBreadcrumb(historyBreadcrumb.id, { path: navigation.path, @@ -462,7 +480,11 @@ export class CustomerSearchComponent implements OnInit, OnDestroy { async checkOrdersBreadcrumb() { const ordersBreadcrumb = await this.getOrdersBreadcrumb(); - if (this.breadcrumb === 'orders' || this.breadcrumb === 'order-details' || this.breadcrumb === 'order-details-history') { + if ( + this.breadcrumb === 'orders' || + this.breadcrumb === 'order-details' || + this.breadcrumb === 'order-details-history' + ) { if (!ordersBreadcrumb) { const navigation = this._navigation.ordersRoute({ processId: this._store.processId, diff --git a/apps/isa-app/src/page/customer/customer-search/details-main-view/details-main-view-billing-addresses/details-main-view-billing-addresses.component.ts b/apps/isa-app/src/page/customer/customer-search/details-main-view/details-main-view-billing-addresses/details-main-view-billing-addresses.component.ts index c0294be49..c1ad8ad8c 100644 --- a/apps/isa-app/src/page/customer/customer-search/details-main-view/details-main-view-billing-addresses/details-main-view-billing-addresses.component.ts +++ b/apps/isa-app/src/page/customer/customer-search/details-main-view/details-main-view-billing-addresses/details-main-view-billing-addresses.component.ts @@ -44,9 +44,11 @@ export class DetailsMainViewBillingAddressesComponent isNotBusinessKonto$ = this._store.isBusinessKonto$.pipe(map((isBusinessKonto) => !isBusinessKonto)); - showCustomerAddress$ = combineLatest([this._store.isBusinessKonto$, this._store.isMitarbeiter$, this._store.isKundenkarte$]).pipe( - map(([isBusinessKonto, isMitarbeiter, isKundenkarte]) => isBusinessKonto || isMitarbeiter || isKundenkarte), - ); + showCustomerAddress$ = combineLatest([ + this._store.isBusinessKonto$, + this._store.isMitarbeiter$, + this._store.isKundenkarte$, + ]).pipe(map(([isBusinessKonto, isMitarbeiter, isKundenkarte]) => isBusinessKonto || isMitarbeiter || isKundenkarte)); get showCustomerAddress() { return this._store.isBusinessKonto || this._store.isMitarbeiter; @@ -57,7 +59,10 @@ export class DetailsMainViewBillingAddressesComponent this._store.isOnlineKontoMitKundenkarte$, this._store.isKundenkarte$, ]).pipe( - map(([isOnlinekonto, isOnlineKontoMitKundenkarte, isKundenkarte]) => isOnlinekonto || isOnlineKontoMitKundenkarte || isKundenkarte), + map( + ([isOnlinekonto, isOnlineKontoMitKundenkarte, isKundenkarte]) => + isOnlinekonto || isOnlineKontoMitKundenkarte || isKundenkarte, + ), ); canEditAddress$ = combineLatest([this._store.isKundenkarte$]).pipe(map(([isKundenkarte]) => isKundenkarte)); @@ -70,7 +75,11 @@ export class DetailsMainViewBillingAddressesComponent map(([processId, customerId, isB2b]) => this._navigation.editRoute({ processId, customerId, isB2b })), ); - addBillingAddressRoute$ = combineLatest([this.canAddNewAddress$, this._store.processId$, this._store.customerId$]).pipe( + addBillingAddressRoute$ = combineLatest([ + this.canAddNewAddress$, + this._store.processId$, + this._store.customerId$, + ]).pipe( map(([canAddNewAddress, processId, customerId]) => canAddNewAddress ? this._navigation.addBillingAddressRoute({ processId, customerId }) : undefined, ), @@ -84,7 +93,11 @@ export class DetailsMainViewBillingAddressesComponent } editRoute(payerId: number) { - return this._navigation.editBillingAddressRoute({ customerId: this._store.customerId, payerId, processId: this._store.processId }); + return this._navigation.editBillingAddressRoute({ + customerId: this._store.customerId, + payerId, + processId: this._store.processId, + }); } ngOnInit() { diff --git a/apps/isa-app/src/page/customer/customer-search/details-main-view/details-main-view-delivery-addresses/details-main-view-delivery-addresses.component.ts b/apps/isa-app/src/page/customer/customer-search/details-main-view/details-main-view-delivery-addresses/details-main-view-delivery-addresses.component.ts index 17a664cf7..257165015 100644 --- a/apps/isa-app/src/page/customer/customer-search/details-main-view/details-main-view-delivery-addresses/details-main-view-delivery-addresses.component.ts +++ b/apps/isa-app/src/page/customer/customer-search/details-main-view/details-main-view-delivery-addresses/details-main-view-delivery-addresses.component.ts @@ -47,9 +47,11 @@ export class DetailsMainViewDeliveryAddressesComponent private _onDestroy$ = new Subject(); - showCustomerAddress$ = combineLatest([this._store.isBusinessKonto$, this._store.isMitarbeiter$, this._store.isKundenkarte$]).pipe( - map(([isBusinessKonto, isMitarbeiter, isKundenkarte]) => isBusinessKonto || isMitarbeiter || isKundenkarte), - ); + showCustomerAddress$ = combineLatest([ + this._store.isBusinessKonto$, + this._store.isMitarbeiter$, + this._store.isKundenkarte$, + ]).pipe(map(([isBusinessKonto, isMitarbeiter, isKundenkarte]) => isBusinessKonto || isMitarbeiter || isKundenkarte)); get showCustomerAddress() { return this._store.isBusinessKonto || this._store.isMitarbeiter; @@ -74,7 +76,11 @@ export class DetailsMainViewDeliveryAddressesComponent map(([processId, customerId, isB2b]) => this._navigation.editRoute({ processId, customerId, isB2b })), ); - addShippingAddressRoute$ = combineLatest([this.canAddNewAddress$, this._store.processId$, this._store.customerId$]).pipe( + addShippingAddressRoute$ = combineLatest([ + this.canAddNewAddress$, + this._store.processId$, + this._store.customerId$, + ]).pipe( map(([canAddNewAddress, processId, customerId]) => canAddNewAddress ? this._navigation.addShippingAddressRoute({ processId, customerId }) : undefined, ), @@ -90,9 +96,11 @@ export class DetailsMainViewDeliveryAddressesComponent }), ); - canEditAddress$ = combineLatest([this._store.isKundenkarte$, this._store.isBusinessKonto$, this._store.isMitarbeiter$]).pipe( - map(([isKundenkarte, isBusinessKonto, isMitarbeiter]) => isKundenkarte || isBusinessKonto || isMitarbeiter), - ); + canEditAddress$ = combineLatest([ + this._store.isKundenkarte$, + this._store.isBusinessKonto$, + this._store.isMitarbeiter$, + ]).pipe(map(([isKundenkarte, isBusinessKonto, isMitarbeiter]) => isKundenkarte || isBusinessKonto || isMitarbeiter)); constructor() { super({ diff --git a/apps/isa-app/src/page/customer/customer-search/details-main-view/details-main-view.component.html b/apps/isa-app/src/page/customer/customer-search/details-main-view/details-main-view.component.html index 9ebcea458..7b038c4cd 100644 --- a/apps/isa-app/src/page/customer/customer-search/details-main-view/details-main-view.component.html +++ b/apps/isa-app/src/page/customer/customer-search/details-main-view/details-main-view.component.html @@ -160,7 +160,7 @@ class="text-white text-lg bg-brand rounded-full px-5 py-3 absolute top-[calc(100vh-19.375rem)] left-1/2 -translate-x-1/2 font-bold disabled:bg-inactive-branch" [disabled]="showLoader$ | async" > - Weiter zur Artikelsuche + Weiter zur Artikelsuche diff --git a/apps/isa-app/src/page/customer/customer-search/details-main-view/details-main-view.component.ts b/apps/isa-app/src/page/customer/customer-search/details-main-view/details-main-view.component.ts index 1f90abbef..53ff57c6b 100644 --- a/apps/isa-app/src/page/customer/customer-search/details-main-view/details-main-view.component.ts +++ b/apps/isa-app/src/page/customer/customer-search/details-main-view/details-main-view.component.ts @@ -3,9 +3,19 @@ import { Subject, combineLatest } from 'rxjs'; import { first, map, switchMap, takeUntil } from 'rxjs/operators'; import { CustomerSearchNavigation } from '@shared/services/navigation'; import { CustomerSearchStore } from '../store'; -import { ShippingAddressDTO, NotificationChannel, ShoppingCartDTO, PayerDTO, BuyerDTO } from '@generated/swagger/checkout-api'; +import { + ShippingAddressDTO, + NotificationChannel, + ShoppingCartDTO, + PayerDTO, + BuyerDTO, +} from '@generated/swagger/checkout-api'; import { DomainCheckoutService } from '@domain/checkout'; -import { CantAddCustomerToCartData, CantAddCustomerToCartModalComponent, CantSelectGuestModalComponent } from '../../modals'; +import { + CantAddCustomerToCartData, + CantAddCustomerToCartModalComponent, + CantSelectGuestModalComponent, +} from '../../modals'; import { UiModalService } from '@ui/modal'; import { ComponentStore } from '@ngrx/component-store'; import { ApplicationService } from '@core/application'; @@ -30,7 +40,10 @@ export interface CustomerDetailsViewMainState { changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, }) -export class CustomerDetailsViewMainComponent extends ComponentStore implements OnInit, OnDestroy { +export class CustomerDetailsViewMainComponent + extends ComponentStore + implements OnInit, OnDestroy +{ private _store = inject(CustomerSearchStore); private _navigation = inject(CustomerSearchNavigation); private _checkoutService = inject(DomainCheckoutService); @@ -91,9 +104,13 @@ export class CustomerDetailsViewMainComponent extends ComponentStore s.customer?.customerNumber); - customerNumberDig$ = this._store.select((s) => s.customer?.linkedRecords?.find((r) => r.repository === 'dig')?.number); + customerNumberDig$ = this._store.select( + (s) => s.customer?.linkedRecords?.find((r) => r.repository === 'dig')?.number, + ); - customerNumberBeeline$ = this._store.select((s) => s.customer?.linkedRecords?.find((r) => r.repository === 'beeline')?.number); + customerNumberBeeline$ = this._store.select( + (s) => s.customer?.linkedRecords?.find((r) => r.repository === 'beeline')?.number, + ); gender$ = this._store.select((s) => this._genderSettings.getGenderByValue(s.customer?.gender)); @@ -386,7 +403,10 @@ export class CustomerDetailsViewMainComponent extends ComponentStore { - const nav = this._navigation.addShippingAddressRoute({ processId: this.processId, customerId: this.customer.id }); + const nav = this._navigation.addShippingAddressRoute({ + processId: this.processId, + customerId: this.customer.id, + }); this._router.navigate(nav.path, { queryParams: nav.queryParams, queryParamsHandling: 'merge' }); }, }, @@ -438,7 +458,10 @@ export class CustomerDetailsViewMainComponent extends ComponentStore implements OnInit, OnDestroy { +export class EditBillingAddressMainViewComponent + extends ComponentStore + implements OnInit, OnDestroy +{ private _customerService = inject(CrmCustomerService); private _addressSelection = inject(AddressSelectionModalService); private _store = inject(CustomerSearchStore); @@ -150,7 +162,9 @@ export class EditBillingAddressMainViewComponent extends ComponentStore
diff --git a/apps/isa-app/src/page/customer/customer-search/edit-main-view/customer-data-edit-b2c.component.html b/apps/isa-app/src/page/customer/customer-search/edit-main-view/customer-data-edit-b2c.component.html index 037e48c24..f568c44b6 100644 --- a/apps/isa-app/src/page/customer/customer-search/edit-main-view/customer-data-edit-b2c.component.html +++ b/apps/isa-app/src/page/customer/customer-search/edit-main-view/customer-data-edit-b2c.component.html @@ -94,7 +94,7 @@
diff --git a/apps/isa-app/src/page/customer/customer-search/edit-main-view/customer-data-edit.component.ts b/apps/isa-app/src/page/customer/customer-search/edit-main-view/customer-data-edit.component.ts index aeb8f79a3..488eb4ba9 100644 --- a/apps/isa-app/src/page/customer/customer-search/edit-main-view/customer-data-edit.component.ts +++ b/apps/isa-app/src/page/customer/customer-search/edit-main-view/customer-data-edit.component.ts @@ -79,7 +79,8 @@ export abstract class CustomerDataEditComponent implements OnInit { this.isOnlineOrCustomerCardUser$ = combineLatest([this.customerType$, this.customerFeatures$]).pipe( map( ([type, features]) => - type === 'webshop' || !!features?.find((feature) => feature?.key === 'p4muser' || feature?.key === 'd-account'), + type === 'webshop' || + !!features?.find((feature) => feature?.key === 'p4muser' || feature?.key === 'd-account'), ), ); this.isWebshopOrGuest$ = this.customerType$.pipe(map((type) => type === 'webshop' || type === 'guest')); @@ -112,14 +113,18 @@ export abstract class CustomerDataEditComponent implements OnInit { const isBranch = customerType === 'store'; const isWebshop = customerType === 'webshop'; const isCard = customerFeatures.find((feature) => feature.key === 'p4muser'); - const zipCodeValidators = (isWebshop && isCard) || isWebshop || isB2b ? [Validators.required, zipCodeValidator()] : []; // #2573 Validierung nur für Onlinekonto, Onlinekonto+Kundenkarte, Business Konto + const zipCodeValidators = + (isWebshop && isCard) || isWebshop || isB2b ? [Validators.required, zipCodeValidator()] : []; // #2573 Validierung nur für Onlinekonto, Onlinekonto+Kundenkarte, Business Konto this.control = fb.group( { gender: fb.control(customerDTO?.gender, [isBranch ? Validators.required : () => null]), title: fb.control(customerDTO?.title), lastName: fb.control(customerDTO?.lastName, [Validators.required]), firstName: fb.control(customerDTO?.firstName, [Validators.required]), - dateOfBirth: fb.control(customerDTO?.dateOfBirth, [isWebshop && isCard ? Validators.required : () => null, UiValidators.date]), + dateOfBirth: fb.control(customerDTO?.dateOfBirth, [ + isWebshop && isCard ? Validators.required : () => null, + UiValidators.date, + ]), communicationDetails: fb.group({ email: fb.control(customerDTO?.communicationDetails?.email, [validateEmail]), phone: fb.control(customerDTO?.communicationDetails?.phone), diff --git a/apps/isa-app/src/page/customer/customer-search/edit-shipping-address-main-view/edit-shipping-address-main-view.component.ts b/apps/isa-app/src/page/customer/customer-search/edit-shipping-address-main-view/edit-shipping-address-main-view.component.ts index 5d4b3869a..d57996f33 100644 --- a/apps/isa-app/src/page/customer/customer-search/edit-shipping-address-main-view/edit-shipping-address-main-view.component.ts +++ b/apps/isa-app/src/page/customer/customer-search/edit-shipping-address-main-view/edit-shipping-address-main-view.component.ts @@ -39,7 +39,10 @@ export interface EditShippingAddressMainViewState { CheckboxComponent, ], }) -export class EditShippingAddressMainViewComponent extends ComponentStore implements OnInit, OnDestroy { +export class EditShippingAddressMainViewComponent + extends ComponentStore + implements OnInit, OnDestroy +{ private _activatedRoute = inject(ActivatedRoute); private _customerService = inject(CrmCustomerService); private _addressSelection = inject(AddressSelectionModalService); @@ -78,7 +81,9 @@ export class EditShippingAddressMainViewComponent extends ComponentStore params.shippingAddressId), - switchMap((shippingAddressId) => this._customerService.getShippingAddress(shippingAddressId).pipe(map((res) => res.result))), + switchMap((shippingAddressId) => + this._customerService.getShippingAddress(shippingAddressId).pipe(map((res) => res.result)), + ), ); get shippingAddressId() { diff --git a/apps/isa-app/src/page/customer/customer-search/filter-main-view/filter-main-view.component.html b/apps/isa-app/src/page/customer/customer-search/filter-main-view/filter-main-view.component.html index bb2d67257..fdfcc03dc 100644 --- a/apps/isa-app/src/page/customer/customer-search/filter-main-view/filter-main-view.component.html +++ b/apps/isa-app/src/page/customer/customer-search/filter-main-view/filter-main-view.component.html @@ -30,7 +30,7 @@ class="bg-white border-2 border-solid border-brand text-brand text-xl font-bold rounded-full px-6 py-3 disabled:border-components-button-disabled-content disabled:text-components-button-disabled-content" [disabled]="fetching$ | async" > - Filter zurücksetzen + Filter zurücksetzen
diff --git a/apps/isa-app/src/page/customer/customer-search/filter-main-view/filter-main-view.component.ts b/apps/isa-app/src/page/customer/customer-search/filter-main-view/filter-main-view.component.ts index 6fbcad812..0f0985025 100644 --- a/apps/isa-app/src/page/customer/customer-search/filter-main-view/filter-main-view.component.ts +++ b/apps/isa-app/src/page/customer/customer-search/filter-main-view/filter-main-view.component.ts @@ -54,10 +54,14 @@ export class CustomerFilterMainViewComponent { hasSelectedOptions(filter: Filter) { // Is Query available - const hasInputOptions = !!filter.input.find((input) => !!input.input.find((fi) => fi.hasFilterInputOptionsSelected())); + const hasInputOptions = !!filter.input.find( + (input) => !!input.input.find((fi) => fi.hasFilterInputOptionsSelected()), + ); // Are filter or filterChips selected - const hasFilterOptions = !!filter.filter.find((input) => !!input.input.find((fi) => fi.hasFilterInputOptionsSelected())); + const hasFilterOptions = !!filter.filter.find( + (input) => !!input.input.find((fi) => fi.hasFilterInputOptionsSelected()), + ); return hasInputOptions || hasFilterOptions; } diff --git a/apps/isa-app/src/page/customer/customer-search/history-main-view/history-main-view.component.html b/apps/isa-app/src/page/customer/customer-search/history-main-view/history-main-view.component.html index 3a3233c13..b4d41eb3a 100644 --- a/apps/isa-app/src/page/customer/customer-search/history-main-view/history-main-view.component.html +++ b/apps/isa-app/src/page/customer/customer-search/history-main-view/history-main-view.component.html @@ -25,7 +25,7 @@
- +
diff --git a/apps/isa-app/src/page/customer/customer-search/history-main-view/history-main-view.component.ts b/apps/isa-app/src/page/customer/customer-search/history-main-view/history-main-view.component.ts index ca63e1d8d..f21a9dd1d 100644 --- a/apps/isa-app/src/page/customer/customer-search/history-main-view/history-main-view.component.ts +++ b/apps/isa-app/src/page/customer/customer-search/history-main-view/history-main-view.component.ts @@ -21,7 +21,10 @@ export interface CustomerHistoryViewMainState { changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, }) -export class CustomerHistoryMainViewComponent extends ComponentStore implements AfterViewInit { +export class CustomerHistoryMainViewComponent + extends ComponentStore + implements AfterViewInit +{ private _store = inject(CustomerSearchStore); private _customerService = inject(CrmCustomerService); private _navigation = inject(CustomerSearchNavigation); @@ -62,7 +65,9 @@ export class CustomerHistoryMainViewComponent extends ComponentStore this._customerService .getCustomerHistory(customerId) - .pipe(tapResponse(this.handleFetchHistoryResponse, this.handleFetchHistoryError, this.handleFetchHistoryComplete)), + .pipe( + tapResponse(this.handleFetchHistoryResponse, this.handleFetchHistoryError, this.handleFetchHistoryComplete), + ), ), ), ); diff --git a/apps/isa-app/src/page/customer/customer-search/kundenkarte-main-view/kundenkarte-main-view.component.html b/apps/isa-app/src/page/customer/customer-search/kundenkarte-main-view/kundenkarte-main-view.component.html index c5d92a46c..9ade42b68 100644 --- a/apps/isa-app/src/page/customer/customer-search/kundenkarte-main-view/kundenkarte-main-view.component.html +++ b/apps/isa-app/src/page/customer/customer-search/kundenkarte-main-view/kundenkarte-main-view.component.html @@ -3,7 +3,8 @@

Kundenkarte

- Alle Infos zu Ihrer Kundenkarte
+ Alle Infos zu Ihrer Kundenkarte +
und allen Partnerkarten.

Keine Kundenkarte gefunden.

diff --git a/apps/isa-app/src/page/customer/customer-search/main-view/main-view.component.html b/apps/isa-app/src/page/customer/customer-search/main-view/main-view.component.html index e3829fe2e..9aefddc64 100644 --- a/apps/isa-app/src/page/customer/customer-search/main-view/main-view.component.html +++ b/apps/isa-app/src/page/customer/customer-search/main-view/main-view.component.html @@ -21,7 +21,7 @@ [class.active]="hasFilter$ | async" > - Filter + Filter

diff --git a/apps/isa-app/src/page/customer/customer-search/order-details-history-main-view/order-details-history-main-view.component.html b/apps/isa-app/src/page/customer/customer-search/order-details-history-main-view/order-details-history-main-view.component.html index 810a113ac..dac6987f9 100644 --- a/apps/isa-app/src/page/customer/customer-search/order-details-history-main-view/order-details-history-main-view.component.html +++ b/apps/isa-app/src/page/customer/customer-search/order-details-history-main-view/order-details-history-main-view.component.html @@ -23,7 +23,7 @@

- +
diff --git a/apps/isa-app/src/page/customer/customer-search/order-details-history-main-view/order-details-history-main-view.component.ts b/apps/isa-app/src/page/customer/customer-search/order-details-history-main-view/order-details-history-main-view.component.ts index 17b830980..f05dffa59 100644 --- a/apps/isa-app/src/page/customer/customer-search/order-details-history-main-view/order-details-history-main-view.component.ts +++ b/apps/isa-app/src/page/customer/customer-search/order-details-history-main-view/order-details-history-main-view.component.ts @@ -93,7 +93,9 @@ export class CustomerOrderDetailsHistoryMainViewComponent switchMap((orderItemSubsetId) => this._omsService .getHistory(orderItemSubsetId) - .pipe(tapResponse(this.handleFetchHistoryResponse, this.handleFetchHistoryError, this.handleFetchHistoryComplete)), + .pipe( + tapResponse(this.handleFetchHistoryResponse, this.handleFetchHistoryError, this.handleFetchHistoryComplete), + ), ), ), ); diff --git a/apps/isa-app/src/page/customer/customer-search/order-details-main-view/order-details-main-view.component.html b/apps/isa-app/src/page/customer/customer-search/order-details-main-view/order-details-main-view.component.html index 5ae6e81c6..7d17f4cc2 100644 --- a/apps/isa-app/src/page/customer/customer-search/order-details-main-view/order-details-main-view.component.html +++ b/apps/isa-app/src/page/customer/customer-search/order-details-main-view/order-details-main-view.component.html @@ -48,7 +48,8 @@
- {{ order?.orderValue | currency: order?.orderValueCurrency : 'code' }} | + {{ order?.orderValue | currency: order?.orderValueCurrency : 'code' }} + | {{ order?.items?.length }} Artikel
@@ -66,8 +67,10 @@ - - + @@ -83,6 +86,6 @@ - + diff --git a/apps/isa-app/src/page/customer/customer-search/order-details-main-view/order-details-main-view.component.ts b/apps/isa-app/src/page/customer/customer-search/order-details-main-view/order-details-main-view.component.ts index eb59862e3..385b75709 100644 --- a/apps/isa-app/src/page/customer/customer-search/order-details-main-view/order-details-main-view.component.ts +++ b/apps/isa-app/src/page/customer/customer-search/order-details-main-view/order-details-main-view.component.ts @@ -3,7 +3,16 @@ import { CustomerSearchStore } from '../store'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { map, takeUntil, tap } from 'rxjs/operators'; import { Subject, combineLatest } from 'rxjs'; -import { AsyncPipe, CurrencyPipe, DatePipe, NgFor, NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault } from '@angular/common'; +import { + AsyncPipe, + CurrencyPipe, + DatePipe, + NgFor, + NgIf, + NgSwitch, + NgSwitchCase, + NgSwitchDefault, +} from '@angular/common'; import { OrderProcessingStatusPipe } from '@shared/pipes/order'; import { BranchNamePipe, ResolveBranchPipe } from '@shared/pipes/branch'; import { AddressPipe } from '@shared/pipes/customer'; @@ -56,7 +65,9 @@ export class OrderDetailsMainViewComponent implements OnInit, OnDestroy { customer$ = this._store.customer$; - accountType$ = this.customer$.pipe(map((customer) => customer?.features?.find((feature) => feature.group === 'd-customertype'))); + accountType$ = this.customer$.pipe( + map((customer) => customer?.features?.find((feature) => feature.group === 'd-customertype')), + ); accountTypeKey$ = this.accountType$.pipe(map((accountType) => accountType?.key)); @@ -76,7 +87,12 @@ export class OrderDetailsMainViewComponent implements OnInit, OnDestroy { map(([customerId, processId]) => this._navigation.ordersRoute({ processId, customerId })), ); - orderDetailsHistoryRoute$ = combineLatest([this.customerId$, this._store.processId$, this.orderId$, this.orderItemId$]).pipe( + orderDetailsHistoryRoute$ = combineLatest([ + this.customerId$, + this._store.processId$, + this.orderId$, + this.orderItemId$, + ]).pipe( map(([customerId, processId, orderId, orderItemId]) => this._navigation.orderDetailsHistoryRoute({ processId, customerId, orderId, orderItemId }), ), diff --git a/apps/isa-app/src/page/customer/customer-search/order-details-main-view/order-item-list-item/order-item-list-item.component.html b/apps/isa-app/src/page/customer/customer-search/order-details-main-view/order-item-list-item/order-item-list-item.component.html index 113c4f547..36c340a74 100644 --- a/apps/isa-app/src/page/customer/customer-search/order-details-main-view/order-item-list-item/order-item-list-item.component.html +++ b/apps/isa-app/src/page/customer/customer-search/order-details-main-view/order-item-list-item/order-item-list-item.component.html @@ -11,8 +11,9 @@ [queryParams]="orderDetailsHistoryRoute.urlTree.queryParams" [queryParamsHandling]="'merge'" class="text-brand font-bold text-xl" - >Historie + Historie +
{{ orderItem?.product?.name }} diff --git a/apps/isa-app/src/page/customer/customer-search/order-details-main-view/order-item-list-item/order-item-list-item.component.ts b/apps/isa-app/src/page/customer/customer-search/order-details-main-view/order-item-list-item/order-item-list-item.component.ts index af13c58df..98f4923a3 100644 --- a/apps/isa-app/src/page/customer/customer-search/order-details-main-view/order-item-list-item/order-item-list-item.component.ts +++ b/apps/isa-app/src/page/customer/customer-search/order-details-main-view/order-item-list-item/order-item-list-item.component.ts @@ -62,7 +62,12 @@ export class CustomerOrderItemListItemComponent implements OnInit, OnDestroy { orderItemSubsetItem$ = this._orderItemSub.pipe(map((orderItem) => orderItem?.subsetItems?.[0]?.data)); - orderDetailsHistoryRoute$ = combineLatest([this.customerId$, this._store.processId$, this.orderId$, this._orderItemSub]).pipe( + orderDetailsHistoryRoute$ = combineLatest([ + this.customerId$, + this._store.processId$, + this.orderId$, + this._orderItemSub, + ]).pipe( map(([customerId, processId, orderId, orderItem]) => this._navigation.orderDetailsHistoryRoute({ processId, customerId, orderId, orderItemId: orderItem?.id }), ), diff --git a/apps/isa-app/src/page/customer/customer-search/order-details-side-view/order-details-side-view.component.ts b/apps/isa-app/src/page/customer/customer-search/order-details-side-view/order-details-side-view.component.ts index 3b9fe4a3e..a36369045 100644 --- a/apps/isa-app/src/page/customer/customer-search/order-details-side-view/order-details-side-view.component.ts +++ b/apps/isa-app/src/page/customer/customer-search/order-details-side-view/order-details-side-view.component.ts @@ -14,7 +14,16 @@ import { OrderItemProcessingStatusPipe } from '@shared/pipes/order'; styleUrls: ['order-details-side-view.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'page-customer-order-details-side-view' }, - imports: [CustomerNamePipe, AsyncPipe, NgFor, ProductImagePipe, RouterLink, NgIf, RouterLinkActive, OrderItemProcessingStatusPipe], + imports: [ + CustomerNamePipe, + AsyncPipe, + NgFor, + ProductImagePipe, + RouterLink, + NgIf, + RouterLinkActive, + OrderItemProcessingStatusPipe, + ], }) export class OrderDetailsSideViewComponent { customer$ = this._store.customer$; diff --git a/apps/isa-app/src/page/customer/customer-search/orders-main-view/order-list-item/order-list-item.component.html b/apps/isa-app/src/page/customer/customer-search/orders-main-view/order-list-item/order-list-item.component.html index fefd8d646..e291c6a3f 100644 --- a/apps/isa-app/src/page/customer/customer-search/orders-main-view/order-list-item/order-list-item.component.html +++ b/apps/isa-app/src/page/customer/customer-search/orders-main-view/order-list-item/order-list-item.component.html @@ -40,7 +40,7 @@
{{ orderListItem.orderValue | currency: orderListItem.currency : 'code' }} - | {{ orderListItem.itemsCount }} Artikel + | {{ orderListItem.itemsCount }} Artikel
diff --git a/apps/isa-app/src/page/customer/customer-search/orders-main-view/order-list-item/order-list-item.component.ts b/apps/isa-app/src/page/customer/customer-search/orders-main-view/order-list-item/order-list-item.component.ts index 195ee00a7..798837a42 100644 --- a/apps/isa-app/src/page/customer/customer-search/orders-main-view/order-list-item/order-list-item.component.ts +++ b/apps/isa-app/src/page/customer/customer-search/orders-main-view/order-list-item/order-list-item.component.ts @@ -16,7 +16,16 @@ import { RouterLink } from '@angular/router'; styleUrls: ['order-list-item.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'page-customer-order-list-item' }, - imports: [DatePipe, OrderProcessingStatusPipe, OrderDestinationPipe, CurrencyPipe, NgIf, AddressPipe, AsyncPipe, RouterLink], + imports: [ + DatePipe, + OrderProcessingStatusPipe, + OrderDestinationPipe, + CurrencyPipe, + NgIf, + AddressPipe, + AsyncPipe, + RouterLink, + ], }) export class CustomerOrderListItemComponent { private _store = inject(CustomerSearchStore); @@ -33,6 +42,8 @@ export class CustomerOrderListItemComponent { this._orderListItemSub.next(value); } orderDetailsRoute$ = combineLatest([this._store.processId$, this._store.customerId$, this._orderListItemSub]).pipe( - map(([processId, customerId, order]) => this._navigation.orderDetialsRoute({ processId, customerId, orderId: order?.id })), + map(([processId, customerId, order]) => + this._navigation.orderDetialsRoute({ processId, customerId, orderId: order?.id }), + ), ); } diff --git a/apps/isa-app/src/page/customer/customer-search/orders-main-view/orders-main-view.component.html b/apps/isa-app/src/page/customer/customer-search/orders-main-view/orders-main-view.component.html index 0a3636d2e..08def054c 100644 --- a/apps/isa-app/src/page/customer/customer-search/orders-main-view/orders-main-view.component.html +++ b/apps/isa-app/src/page/customer/customer-search/orders-main-view/orders-main-view.component.html @@ -9,7 +9,8 @@

Bestellungen

- Übersicht aller offenen und
+ Übersicht aller offenen und +
früheren Bestellungen

@@ -17,7 +18,7 @@ class="grid grid-flow-row gap-px-3 -mx-6 -mb-8 mt-8 overflow-scroll max-h-[calc(100vh-27.125rem)] scroll-bar" [class.fetching-min-h]="fetching$ | async" > - +
diff --git a/apps/isa-app/src/page/customer/customer-search/orders-main-view/orders-main-view.component.ts b/apps/isa-app/src/page/customer/customer-search/orders-main-view/orders-main-view.component.ts index dd5d30abd..04b224c43 100644 --- a/apps/isa-app/src/page/customer/customer-search/orders-main-view/orders-main-view.component.ts +++ b/apps/isa-app/src/page/customer/customer-search/orders-main-view/orders-main-view.component.ts @@ -16,7 +16,16 @@ import { CustomerMenuComponent } from '../../components/customer-menu'; styleUrls: ['orders-main-view.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'page-customer-orders-main-view' }, - imports: [CustomerMenuComponent, AsyncPipe, NgFor, NgIf, RouterLink, IconComponent, LoaderComponent, CustomerOrderListItemComponent], + imports: [ + CustomerMenuComponent, + AsyncPipe, + NgFor, + NgIf, + RouterLink, + IconComponent, + LoaderComponent, + CustomerOrderListItemComponent, + ], }) export class CustomerOrdersMainViewComponent implements OnInit, OnDestroy { private _store = inject(CustomerSearchStore); diff --git a/apps/isa-app/src/page/customer/customer-search/results-main-view/results-main-view.component.html b/apps/isa-app/src/page/customer/customer-search/results-main-view/results-main-view.component.html index a026b61de..860dc042a 100644 --- a/apps/isa-app/src/page/customer/customer-search/results-main-view/results-main-view.component.html +++ b/apps/isa-app/src/page/customer/customer-search/results-main-view/results-main-view.component.html @@ -24,7 +24,7 @@
- {{ hits$ | async }} Treffer + {{ hits$ | async }} Treffer - +> diff --git a/apps/isa-app/src/page/customer/customer-search/results-main-view/results-main-view.component.ts b/apps/isa-app/src/page/customer/customer-search/results-main-view/results-main-view.component.ts index 676fed44f..b546d9477 100644 --- a/apps/isa-app/src/page/customer/customer-search/results-main-view/results-main-view.component.ts +++ b/apps/isa-app/src/page/customer/customer-search/results-main-view/results-main-view.component.ts @@ -1,4 +1,12 @@ -import { Component, ChangeDetectionStrategy, OnInit, OnDestroy, AfterContentInit, ViewChild, inject } from '@angular/core'; +import { + Component, + ChangeDetectionStrategy, + OnInit, + OnDestroy, + AfterContentInit, + ViewChild, + inject, +} from '@angular/core'; import { NavigationEnd, Router } from '@angular/router'; import { CustomerSearchStore } from '../store/customer-search.store'; import { BehaviorSubject, Subject, Subscription, combineLatest, race } from 'rxjs'; diff --git a/apps/isa-app/src/page/customer/customer-search/results-side-view/results-side-view.component.html b/apps/isa-app/src/page/customer/customer-search/results-side-view/results-side-view.component.html index 13161f73e..d0cbd9ca5 100644 --- a/apps/isa-app/src/page/customer/customer-search/results-side-view/results-side-view.component.html +++ b/apps/isa-app/src/page/customer/customer-search/results-side-view/results-side-view.component.html @@ -34,7 +34,7 @@ - {{ hits$ | async }} Treffer + {{ hits$ | async }} Treffer - +> diff --git a/apps/isa-app/src/page/customer/customer-search/store/customer-search.store.ts b/apps/isa-app/src/page/customer/customer-search/store/customer-search.store.ts index 4d2ae3c83..30af0223e 100644 --- a/apps/isa-app/src/page/customer/customer-search/store/customer-search.store.ts +++ b/apps/isa-app/src/page/customer/customer-search/store/customer-search.store.ts @@ -5,7 +5,17 @@ import { CustomerSearchState } from './customer-search.state'; import * as S from './selectors'; import { inject, Injectable, OnDestroy } from '@angular/core'; import { Observable, Subject } from 'rxjs'; -import { distinctUntilChanged, filter, switchMap, takeUntil, tap, withLatestFrom, delayWhen, first, map } from 'rxjs/operators'; +import { + distinctUntilChanged, + filter, + switchMap, + takeUntil, + tap, + withLatestFrom, + delayWhen, + first, + map, +} from 'rxjs/operators'; import { CrmCustomerService } from '@domain/crm'; import { Result } from '@domain/defs'; import { CustomerDTO, ListResponseArgsOfCustomerInfoDTO, QuerySettingsDTO } from '@generated/swagger/crm-api'; @@ -199,7 +209,13 @@ export class CustomerSearchStore extends ComponentStore imp switchMap(({ customerId }) => this._customerService .getCustomer(+customerId, 2) - .pipe(tapResponse(this.handleSelectCustomerResponse, this.handleSelectCustomerError, this.handleSelectCustomerComplete)), + .pipe( + tapResponse( + this.handleSelectCustomerResponse, + this.handleSelectCustomerError, + this.handleSelectCustomerComplete, + ), + ), ), ), ); @@ -228,7 +244,9 @@ export class CustomerSearchStore extends ComponentStore imp switchMap((orderId) => this._omsService .getOrder(orderId) - .pipe(tapResponse(this.handleSelectOrderResponse, this.handleSelectOrderError, this.handleSelectOrderComplete)), + .pipe( + tapResponse(this.handleSelectOrderResponse, this.handleSelectOrderError, this.handleSelectOrderComplete), + ), ), ), ); @@ -286,7 +304,9 @@ export class CustomerSearchStore extends ComponentStore imp switchMap(() => this._customerService .filterSettings() - .pipe(tapResponse(this.handleFetchFilterResponse, this.handleFetchFilterError, this.handleFetchFilterComplete)), + .pipe( + tapResponse(this.handleFetchFilterResponse, this.handleFetchFilterError, this.handleFetchFilterComplete), + ), ), ), ); @@ -304,50 +324,63 @@ export class CustomerSearchStore extends ComponentStore imp this.patchState({ fetchingFilter: false }); }; - search = this.effect(($: Observable<{ resetScrollIndex?: boolean; ignoreRestore?: boolean; skipNavigation?: boolean }>) => - $.pipe( - delayWhen(() => - this.filter$.pipe( - filter((filter) => !!filter), - first(), + search = this.effect( + ($: Observable<{ resetScrollIndex?: boolean; ignoreRestore?: boolean; skipNavigation?: boolean }>) => + $.pipe( + delayWhen(() => + this.filter$.pipe( + filter((filter) => !!filter), + first(), + ), + ), + withLatestFrom(this.filter$, this.processId$), + map(([a1, a2, a3]) => { + // #4564 Setze "customer" undefined immer wenn neu gesucht wird, + // da sonst Änderungen einer zweiten ISA am Kunden, selbst nach erneuter Suche, nicht geupdated werden, + // da noch der alte Kundendatensatz im Store gespeichert ist + this.patchState({ + fetchingCustomerList: true, + customerList: [], + customer: undefined, + customerListCount: 0, + message: '', + }); + + let retored = false; + if (a1.ignoreRestore) { + this.resetScrollIndex(); + } else { + retored = this.restoreSearchResult(); + } + + return [a1, a2, a3, retored] as [ + { ignoreRestore?: boolean; skipNavigation?: boolean }, + Filter, + number, + boolean, + ]; + }), + switchMap(([{ ignoreRestore, skipNavigation }, filter, processId, restored]) => + this._customerService + .getCustomersWithQueryToken({ + ...filter.getQueryToken(), + take: this.customerList?.length || 20, + }) + .pipe( + takeUntil(this._cancelSearch), + tapResponse( + this.handleSearchResponse(filter, processId, ignoreRestore ? false : restored, !!skipNavigation), + this.handleSearchError, + this.handleSearchComplete, + ), + ), ), ), - withLatestFrom(this.filter$, this.processId$), - map(([a1, a2, a3]) => { - // #4564 Setze "customer" undefined immer wenn neu gesucht wird, - // da sonst Änderungen einer zweiten ISA am Kunden, selbst nach erneuter Suche, nicht geupdated werden, - // da noch der alte Kundendatensatz im Store gespeichert ist - this.patchState({ fetchingCustomerList: true, customerList: [], customer: undefined, customerListCount: 0, message: '' }); - - let retored = false; - if (a1.ignoreRestore) { - this.resetScrollIndex(); - } else { - retored = this.restoreSearchResult(); - } - - return [a1, a2, a3, retored] as [{ ignoreRestore?: boolean; skipNavigation?: boolean }, Filter, number, boolean]; - }), - switchMap(([{ ignoreRestore, skipNavigation }, filter, processId, restored]) => - this._customerService - .getCustomersWithQueryToken({ - ...filter.getQueryToken(), - take: this.customerList?.length || 20, - }) - .pipe( - takeUntil(this._cancelSearch), - tapResponse( - this.handleSearchResponse(filter, processId, ignoreRestore ? false : restored, !!skipNavigation), - this.handleSearchError, - this.handleSearchComplete, - ), - ), - ), - ), ); handleSearchResponse = - (filter: Filter, processId: number, restored: boolean, skipNavigation: boolean) => (result: ListResponseArgsOfCustomerInfoDTO) => { + (filter: Filter, processId: number, restored: boolean, skipNavigation: boolean) => + (result: ListResponseArgsOfCustomerInfoDTO) => { this.patchState({ customerList: result.result, customerListCount: result.hits, diff --git a/apps/isa-app/src/page/customer/customer-search/store/selectors.ts b/apps/isa-app/src/page/customer/customer-search/store/selectors.ts index 4f46c3448..31abc94f0 100644 --- a/apps/isa-app/src/page/customer/customer-search/store/selectors.ts +++ b/apps/isa-app/src/page/customer/customer-search/store/selectors.ts @@ -48,7 +48,9 @@ export function selectHasStoreFeature(s: CustomerSearchState) { } export function selectIsBestellungOhneKonto(s: CustomerSearchState) { - return (selectHasWebshopFeature(s) && selectHasGuestFeature(s)) || (selectHasStoreFeature(s) && selectHasGuestFeature(s)); + return ( + (selectHasWebshopFeature(s) && selectHasGuestFeature(s)) || (selectHasStoreFeature(s) && selectHasGuestFeature(s)) + ); } export function selectIsOnlinekonto(s: CustomerSearchState) { diff --git a/apps/isa-app/src/page/customer/modals/cant-add-customer-to-cart-modal/cant-add-customer-to-cart.component.ts b/apps/isa-app/src/page/customer/modals/cant-add-customer-to-cart-modal/cant-add-customer-to-cart.component.ts index d473e8bf3..b151acac3 100644 --- a/apps/isa-app/src/page/customer/modals/cant-add-customer-to-cart-modal/cant-add-customer-to-cart.component.ts +++ b/apps/isa-app/src/page/customer/modals/cant-add-customer-to-cart-modal/cant-add-customer-to-cart.component.ts @@ -3,7 +3,10 @@ import { Router } from '@angular/router'; import { ApplicationService } from '@core/application'; import { UiModalRef } from '@ui/modal'; import { isBoolean } from '@utils/common'; -import { encodeFormData, mapCustomerDtoToCustomerCreateFormData } from '../../create-customer/customer-create-form-data'; +import { + encodeFormData, + mapCustomerDtoToCustomerCreateFormData, +} from '../../create-customer/customer-create-form-data'; import { CantAddCustomerToCartData } from './cant-add-customer-to-cart.data'; import { CustomerCreateNavigation } from '@shared/services/navigation'; diff --git a/apps/isa-app/src/page/customer/modals/cant-select-guest/cant-select-guest-modal.component.html b/apps/isa-app/src/page/customer/modals/cant-select-guest/cant-select-guest-modal.component.html index 5bb5a792b..91b38c1c6 100644 --- a/apps/isa-app/src/page/customer/modals/cant-select-guest/cant-select-guest-modal.component.html +++ b/apps/isa-app/src/page/customer/modals/cant-select-guest/cant-select-guest-modal.component.html @@ -9,9 +9,9 @@

Verwenden Sie bitte ein bestehendes Konto oder legen Sie den Kunden neu an.

diff --git a/apps/isa-app/src/page/customer/routes.ts b/apps/isa-app/src/page/customer/routes.ts index 3645f95ee..55330792d 100644 --- a/apps/isa-app/src/page/customer/routes.ts +++ b/apps/isa-app/src/page/customer/routes.ts @@ -42,8 +42,16 @@ export const routes: Routes = [ children: [ { path: 'search', component: CustomerMainViewComponent, data: { side: 'main', breadcrumb: 'main' } }, { path: 'search/list', component: CustomerResultsMainViewComponent, data: { breadcrumb: 'search' } }, - { path: 'search/filter', component: CustomerFilterMainViewComponent, data: { side: 'results', breadcrumb: 'filter' } }, - { path: 'search/:customerId', component: CustomerDetailsViewMainComponent, data: { side: 'results', breadcrumb: 'details' } }, + { + path: 'search/filter', + component: CustomerFilterMainViewComponent, + data: { side: 'results', breadcrumb: 'filter' }, + }, + { + path: 'search/:customerId', + component: CustomerDetailsViewMainComponent, + data: { side: 'results', breadcrumb: 'details' }, + }, { path: 'search/:customerId/history', component: CustomerHistoryMainViewComponent, @@ -74,8 +82,16 @@ export const routes: Routes = [ component: CustomerOrderDetailsHistoryMainViewComponent, data: { side: 'order-details', breadcrumb: 'order-details-history' }, }, - { path: 'search/:customerId/edit/b2b', component: CustomerDataEditB2BComponent, data: { side: 'results', breadcrumb: 'edit' } }, - { path: 'search/:customerId/edit', component: CustomerDataEditB2CComponent, data: { side: 'results', breadcrumb: 'edit' } }, + { + path: 'search/:customerId/edit/b2b', + component: CustomerDataEditB2BComponent, + data: { side: 'results', breadcrumb: 'edit' }, + }, + { + path: 'search/:customerId/edit', + component: CustomerDataEditB2CComponent, + data: { side: 'results', breadcrumb: 'edit' }, + }, { path: 'search/:customerId/billingaddress/add', component: AddBillingAddressMainViewComponent, @@ -126,7 +142,11 @@ export const routes: Routes = [ { path: 'create/guest', component: CreateGuestCustomerComponent }, { path: 'create/webshop-p4m', component: CreateP4MCustomerComponent, data: { customerType: 'webshop' } }, { path: 'create/store-p4m', component: CreateP4MCustomerComponent, data: { customerType: 'store' } }, - { path: 'create/webshop-p4m/update', component: UpdateP4MWebshopCustomerComponent, data: { customerType: 'webshop' } }, + { + path: 'create/webshop-p4m/update', + component: UpdateP4MWebshopCustomerComponent, + data: { customerType: 'webshop' }, + }, { path: 'create-customer-main', outlet: 'side', diff --git a/apps/isa-app/src/page/dashboard/kpi-card/kpi-card.component.html b/apps/isa-app/src/page/dashboard/kpi-card/kpi-card.component.html index ab728b42c..c00a9964b 100644 --- a/apps/isa-app/src/page/dashboard/kpi-card/kpi-card.component.html +++ b/apps/isa-app/src/page/dashboard/kpi-card/kpi-card.component.html @@ -6,5 +6,5 @@
{{ item.label }} von {{ item.target }} schon geschafft
- + diff --git a/apps/isa-app/src/page/goods-in/goods-in-cleanup-list/goods-in-cleanup-list.component.ts b/apps/isa-app/src/page/goods-in/goods-in-cleanup-list/goods-in-cleanup-list.component.ts index 31185e2d5..fdd0ecedb 100644 --- a/apps/isa-app/src/page/goods-in/goods-in-cleanup-list/goods-in-cleanup-list.component.ts +++ b/apps/isa-app/src/page/goods-in/goods-in-cleanup-list/goods-in-cleanup-list.component.ts @@ -1,4 +1,13 @@ -import { ChangeDetectionStrategy, Component, OnDestroy, OnInit, QueryList, ViewChild, ViewChildren, inject } from '@angular/core'; +import { + ChangeDetectionStrategy, + Component, + OnDestroy, + OnInit, + QueryList, + ViewChild, + ViewChildren, + inject, +} from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { BreadcrumbService } from '@core/breadcrumb'; import { CommandService } from '@core/command'; @@ -44,7 +53,9 @@ export class GoodsInCleanupListComponent implements OnInit, OnDestroy { actions$ = combineLatest([this.items$, this.selectedOrderItemSubsetIds$]).pipe( map(([items, selectedOrderItemSubsetIds]) => - items?.find((item) => selectedOrderItemSubsetIds?.find((orderItemSubsetId) => item.orderItemSubsetId === orderItemSubsetId)), + items?.find((item) => + selectedOrderItemSubsetIds?.find((orderItemSubsetId) => item.orderItemSubsetId === orderItemSubsetId), + ), ), map((item) => item?.actions?.filter((action) => this.selectionRules(action))), ); @@ -58,7 +69,9 @@ export class GoodsInCleanupListComponent implements OnInit, OnDestroy { const items = this._store.results; const selectedOrderItemSubsetIds = this.selectedOrderItemSubsetIds; - return items.filter((item) => selectedOrderItemSubsetIds.some((orderItemSubsetId) => item.orderItemSubsetId === orderItemSubsetId)); + return items.filter((item) => + selectedOrderItemSubsetIds.some((orderItemSubsetId) => item.orderItemSubsetId === orderItemSubsetId), + ); } byBuyerNumberFn = (item: OrderItemListItemDTO) => item.buyerNumber; @@ -126,7 +139,9 @@ export class GoodsInCleanupListComponent implements OnInit, OnDestroy { .pipe(first()) .toPromise(); - breadcrumbsToDelete = breadcrumbsToDelete.filter((crumb) => !crumb.tags.includes('cleanup') && !crumb.tags.includes('main')); + breadcrumbsToDelete = breadcrumbsToDelete.filter( + (crumb) => !crumb.tags.includes('cleanup') && !crumb.tags.includes('main'), + ); breadcrumbsToDelete.forEach((crumb) => { this._breadcrumb.removeBreadcrumb(crumb.id, true); @@ -175,7 +190,9 @@ export class GoodsInCleanupListComponent implements OnInit, OnDestroy { }); } else if (included && !selected) { this._store.patchState({ - selectedOrderItemSubsetIds: this._store.selectedOrderItemSubsetIds.filter((id) => id !== item?.orderItemSubsetId), + selectedOrderItemSubsetIds: this._store.selectedOrderItemSubsetIds.filter( + (id) => id !== item?.orderItemSubsetId, + ), }); } } @@ -202,7 +219,11 @@ export class GoodsInCleanupListComponent implements OnInit, OnDestroy { const selectedSubsetIds = await this.selectedOrderItemSubsetIds$.pipe(first()).toPromise(); const itemsToUpdate = items.filter((item) => selectedSubsetIds.includes(item.orderItemSubsetId)); const itemQuantity = new Map(items.map((item) => [item.orderItemSubsetId, item.quantity])); - const data: OrderItemsContext = { items: itemsToUpdate, shippingDelayComment: `Aktion: ${action.label}`, itemQuantity }; + const data: OrderItemsContext = { + items: itemsToUpdate, + shippingDelayComment: `Aktion: ${action.label}`, + itemQuantity, + }; try { await this._commandService.handleCommand(action.command, data); diff --git a/apps/isa-app/src/page/goods-in/goods-in-list/goods-in-list-item/goods-in-list-item.component.scss b/apps/isa-app/src/page/goods-in/goods-in-list/goods-in-list-item/goods-in-list-item.component.scss index e417943fb..88f9c1761 100644 --- a/apps/isa-app/src/page/goods-in/goods-in-list/goods-in-list-item/goods-in-list-item.component.scss +++ b/apps/isa-app/src/page/goods-in/goods-in-list/goods-in-list-item/goods-in-list-item.component.scss @@ -37,7 +37,7 @@ @apply grid; grid-template-columns: 100px auto; grid-template-rows: auto auto auto; - grid-template-areas: 'cover title' 'cover comment' 'cover details'; + grid-template-areas: "cover title" "cover comment" "cover details"; } .grid-container-tablet { @@ -71,7 +71,7 @@ .details { @apply grid grid-flow-row gap-1; grid-template-columns: 40% auto; - grid-template-areas: 'format supplier' 'ean item-id' 'price status' 'quantity order-date' 'empty date'; + grid-template-areas: "format supplier" "ean item-id" "price status" "quantity order-date" "empty date"; grid-area: details; } diff --git a/apps/isa-app/src/page/goods-in/goods-in-list/goods-in-list.component.ts b/apps/isa-app/src/page/goods-in/goods-in-list/goods-in-list.component.ts index 49a8bfbbf..ced23452e 100644 --- a/apps/isa-app/src/page/goods-in/goods-in-list/goods-in-list.component.ts +++ b/apps/isa-app/src/page/goods-in/goods-in-list/goods-in-list.component.ts @@ -161,7 +161,10 @@ export class GoodsInListComponent implements OnInit, AfterViewInit, OnDestroy { } private async _getScrollPositionFromCache(): Promise { - return await this._cache.get({ processId: this._config.get('process.ids.goodsIn'), token: this.SCROLL_POSITION_TOKEN }); + return await this._cache.get({ + processId: this._config.get('process.ids.goodsIn'), + token: this.SCROLL_POSITION_TOKEN, + }); } navigateToDetails(orderItem: OrderItemListItemDTO) { @@ -180,7 +183,9 @@ export class GoodsInListComponent implements OnInit, AfterViewInit, OnDestroy { .pipe(first()) .toPromise(); - breadcrumbsToDelete = breadcrumbsToDelete.filter((crumb) => !crumb.tags.includes('list') && !crumb.tags.includes('main')); + breadcrumbsToDelete = breadcrumbsToDelete.filter( + (crumb) => !crumb.tags.includes('list') && !crumb.tags.includes('main'), + ); breadcrumbsToDelete.forEach((crumb) => { this._breadcrumb.removeBreadcrumb(crumb.id, true); diff --git a/apps/isa-app/src/page/goods-in/goods-in-list/goods-in-list.store.ts b/apps/isa-app/src/page/goods-in/goods-in-list/goods-in-list.store.ts index 32de0368d..496b01fb4 100644 --- a/apps/isa-app/src/page/goods-in/goods-in-list/goods-in-list.store.ts +++ b/apps/isa-app/src/page/goods-in/goods-in-list/goods-in-list.store.ts @@ -5,7 +5,11 @@ import { DomainGoodsService } from '@domain/oms'; import { ComponentStore } from '@ngrx/component-store'; import { tapResponse } from '@ngrx/operators'; -import { ListResponseArgsOfOrderItemListItemDTO, OrderItemListItemDTO, QueryTokenDTO } from '@generated/swagger/oms-api'; +import { + ListResponseArgsOfOrderItemListItemDTO, + OrderItemListItemDTO, + QueryTokenDTO, +} from '@generated/swagger/oms-api'; import { UiFilter } from '@ui/filter'; import { isResponseArgs } from '@utils/object'; import { Observable, Subject } from 'rxjs'; diff --git a/apps/isa-app/src/page/goods-in/goods-in-remission-preview/goods-in-remission-preview.component.html b/apps/isa-app/src/page/goods-in/goods-in-remission-preview/goods-in-remission-preview.component.html index 1b1d7df99..0c3b943e1 100644 --- a/apps/isa-app/src/page/goods-in/goods-in-remission-preview/goods-in-remission-preview.component.html +++ b/apps/isa-app/src/page/goods-in/goods-in-remission-preview/goods-in-remission-preview.component.html @@ -2,7 +2,8 @@

Abholfachremissionsvorschau

- Diese Artikel sind aus
+ Diese Artikel sind aus +
dem Abholfach zu remittieren

@@ -30,8 +31,7 @@ [showCompartmentCode]="firstItem" [showSupplier]="true" (click)="navigateToDetails(item)" - > - + >
@@ -61,5 +61,5 @@ Zur Bestellpostensuche - Zur Remission + Zur Remission diff --git a/apps/isa-app/src/page/goods-in/goods-in-remission-preview/goods-in-remission-preview.component.ts b/apps/isa-app/src/page/goods-in/goods-in-remission-preview/goods-in-remission-preview.component.ts index be5ba8b71..a3fb98688 100644 --- a/apps/isa-app/src/page/goods-in/goods-in-remission-preview/goods-in-remission-preview.component.ts +++ b/apps/isa-app/src/page/goods-in/goods-in-remission-preview/goods-in-remission-preview.component.ts @@ -89,7 +89,10 @@ export class GoodsInRemissionPreviewComponent implements OnInit, OnDestroy { } private async _getScrollPositionFromCache(): Promise { - return await this._cache.get({ processId: this._config.get('process.ids.goodsIn'), token: this.SCROLL_POSITION_TOKEN }); + return await this._cache.get({ + processId: this._config.get('process.ids.goodsIn'), + token: this.SCROLL_POSITION_TOKEN, + }); } async createBreadcrumb() { @@ -121,7 +124,9 @@ export class GoodsInRemissionPreviewComponent implements OnInit, OnDestroy { .pipe(first()) .toPromise(); - breadcrumbsToDelete = breadcrumbsToDelete.filter((crumb) => !crumb.tags.includes('preview') && !crumb.tags.includes('main')); + breadcrumbsToDelete = breadcrumbsToDelete.filter( + (crumb) => !crumb.tags.includes('preview') && !crumb.tags.includes('main'), + ); breadcrumbsToDelete.forEach((crumb) => { this._breadcrumb.removeBreadcrumb(crumb.id, true); diff --git a/apps/isa-app/src/page/goods-in/goods-in-remission-preview/goods-in-remission-preview.module.ts b/apps/isa-app/src/page/goods-in/goods-in-remission-preview/goods-in-remission-preview.module.ts index decc63df3..46be6089a 100644 --- a/apps/isa-app/src/page/goods-in/goods-in-remission-preview/goods-in-remission-preview.module.ts +++ b/apps/isa-app/src/page/goods-in/goods-in-remission-preview/goods-in-remission-preview.module.ts @@ -9,7 +9,14 @@ import { UiSpinnerModule } from '@ui/spinner'; import { GoodsInRemissionPreviewComponent } from './goods-in-remission-preview.component'; @NgModule({ - imports: [CommonModule, UiCommonModule, UiScrollContainerModule, UiSpinnerModule, GoodsInOutOrderGroupModule, RouterModule], + imports: [ + CommonModule, + UiCommonModule, + UiScrollContainerModule, + UiSpinnerModule, + GoodsInOutOrderGroupModule, + RouterModule, + ], exports: [GoodsInRemissionPreviewComponent], declarations: [GoodsInRemissionPreviewComponent], providers: [], diff --git a/apps/isa-app/src/page/goods-in/goods-in-reservation/goods-in-reservation-selectable.pipe.ts b/apps/isa-app/src/page/goods-in/goods-in-reservation/goods-in-reservation-selectable.pipe.ts index bcff03ce0..3e14c68d0 100644 --- a/apps/isa-app/src/page/goods-in/goods-in-reservation/goods-in-reservation-selectable.pipe.ts +++ b/apps/isa-app/src/page/goods-in/goods-in-reservation/goods-in-reservation-selectable.pipe.ts @@ -15,7 +15,10 @@ export class GoodsInReservationSelectablePipe implements PipeTransform { const firstSelectedItem = selectedItems[0]; const selectedLabel = firstSelectedItem.actions.find((action) => selectionRules(action)).label; return item?.actions?.some( - (action) => selectionRules(action) && action.label === selectedLabel && item?.features?.paid === firstSelectedItem?.features?.paid, + (action) => + selectionRules(action) && + action.label === selectedLabel && + item?.features?.paid === firstSelectedItem?.features?.paid, ); } else { return item?.actions?.some((action) => selectionRules(action)); diff --git a/apps/isa-app/src/page/goods-in/goods-in-reservation/goods-in-reservation.component.ts b/apps/isa-app/src/page/goods-in/goods-in-reservation/goods-in-reservation.component.ts index 93fde8262..36262ffed 100644 --- a/apps/isa-app/src/page/goods-in/goods-in-reservation/goods-in-reservation.component.ts +++ b/apps/isa-app/src/page/goods-in/goods-in-reservation/goods-in-reservation.component.ts @@ -1,4 +1,13 @@ -import { ChangeDetectionStrategy, Component, OnDestroy, OnInit, QueryList, ViewChild, ViewChildren, inject } from '@angular/core'; +import { + ChangeDetectionStrategy, + Component, + OnDestroy, + OnInit, + QueryList, + ViewChild, + ViewChildren, + inject, +} from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { BreadcrumbService } from '@core/breadcrumb'; import { CommandService } from '@core/command'; @@ -52,12 +61,16 @@ export class GoodsInReservationComponent implements OnInit, OnDestroy { const items = this._store.results; const selectedOrderItemSubsetIds = this.selectedOrderItemSubsetIds; - return items.filter((item) => selectedOrderItemSubsetIds.some((orderItemSubsetId) => item.orderItemSubsetId === orderItemSubsetId)); + return items.filter((item) => + selectedOrderItemSubsetIds.some((orderItemSubsetId) => item.orderItemSubsetId === orderItemSubsetId), + ); } actions$ = combineLatest([this.items$, this.selectedOrderItemSubsetIds$]).pipe( map(([items, selectedOrderItemSubsetIds]) => - items?.find((item) => selectedOrderItemSubsetIds?.find((orderItemSubsetId) => item.orderItemSubsetId === orderItemSubsetId)), + items?.find((item) => + selectedOrderItemSubsetIds?.find((orderItemSubsetId) => item.orderItemSubsetId === orderItemSubsetId), + ), ), map((item) => item?.actions?.filter((action) => this.selectionRules(action))), ); @@ -127,7 +140,9 @@ export class GoodsInReservationComponent implements OnInit, OnDestroy { .pipe(first()) .toPromise(); - breadcrumbsToDelete = breadcrumbsToDelete.filter((crumb) => !crumb.tags.includes('reservation') && !crumb.tags.includes('main')); + breadcrumbsToDelete = breadcrumbsToDelete.filter( + (crumb) => !crumb.tags.includes('reservation') && !crumb.tags.includes('main'), + ); breadcrumbsToDelete.forEach((crumb) => { this._breadcrumb.removeBreadcrumb(crumb.id, true); @@ -190,7 +205,9 @@ export class GoodsInReservationComponent implements OnInit, OnDestroy { }); } else if (included && !selected) { this._store.patchState({ - selectedOrderItemSubsetIds: this._store.selectedOrderItemSubsetIds.filter((id) => id !== item?.orderItemSubsetId), + selectedOrderItemSubsetIds: this._store.selectedOrderItemSubsetIds.filter( + (id) => id !== item?.orderItemSubsetId, + ), }); } } @@ -216,7 +233,9 @@ export class GoodsInReservationComponent implements OnInit, OnDestroy { for (const buyerNumber of buyerNumbers) { const itemsToUpdateForEachCustomer = itemsToUpdate.filter((item) => item.buyerNumber === buyerNumber); - const itemsToUpdateGroupedByCommand = itemsToUpdateForEachCustomer.reduce>((acc, item) => { + const itemsToUpdateGroupedByCommand = itemsToUpdateForEachCustomer.reduce< + Record + >((acc, item) => { const command = item.actions.find((a) => a.value === action.value)?.command; if (!acc[command]) { acc[command] = []; diff --git a/apps/isa-app/src/page/goods-in/goods-in-reservation/goods-in-reservation.store.ts b/apps/isa-app/src/page/goods-in/goods-in-reservation/goods-in-reservation.store.ts index d807b8aa4..7cac576b3 100644 --- a/apps/isa-app/src/page/goods-in/goods-in-reservation/goods-in-reservation.store.ts +++ b/apps/isa-app/src/page/goods-in/goods-in-reservation/goods-in-reservation.store.ts @@ -5,7 +5,11 @@ import { DomainGoodsService } from '@domain/oms'; import { ComponentStore } from '@ngrx/component-store'; import { tapResponse } from '@ngrx/operators'; -import { ListResponseArgsOfOrderItemListItemDTO, OrderItemListItemDTO, QueryTokenDTO } from '@generated/swagger/oms-api'; +import { + ListResponseArgsOfOrderItemListItemDTO, + OrderItemListItemDTO, + QueryTokenDTO, +} from '@generated/swagger/oms-api'; import { isResponseArgs } from '@utils/object'; import { Subject } from 'rxjs'; import { switchMap, tap, withLatestFrom } from 'rxjs/operators'; diff --git a/apps/isa-app/src/page/package-inspection/components/package-details-list/package-details-list-item.component.html b/apps/isa-app/src/page/package-inspection/components/package-details-list/package-details-list-item.component.html index 7a2e593ff..55f669577 100644 --- a/apps/isa-app/src/page/package-inspection/components/package-details-list/package-details-list-item.component.html +++ b/apps/isa-app/src/page/package-inspection/components/package-details-list/package-details-list-item.component.html @@ -20,7 +20,7 @@ {{ item?.product?.ean }}
- Band/Serie {{ item?.product?.volume }} + Band/Serie {{ item?.product?.volume }}
@@ -46,8 +46,9 @@ [yPosition]="'above'" [xPosition]="'after'" [closeable]="true" - >Dieser Filialbestand ist exklusive der Packstück Liefermenge. + Dieser Filialbestand ist exklusive der Packstück Liefermenge. + Filialbestand diff --git a/apps/isa-app/src/page/package-inspection/components/package-details-list/package-details-list.store.ts b/apps/isa-app/src/page/package-inspection/components/package-details-list/package-details-list.store.ts index 3d0c52f63..70f8b532b 100644 --- a/apps/isa-app/src/page/package-inspection/components/package-details-list/package-details-list.store.ts +++ b/apps/isa-app/src/page/package-inspection/components/package-details-list/package-details-list.store.ts @@ -39,7 +39,8 @@ export class PackageDetailsListStore extends ComponentStore state.arrivalStatus; - static ITEM_BY_EAN = (ean: string) => (state: PackageDetailsListState) => state.items.find((i) => i.product.ean === ean); + static ITEM_BY_EAN = (ean: string) => (state: PackageDetailsListState) => + state.items.find((i) => i.product.ean === ean); static STOCKINFO_BY_EAN = (ean: string) => (state: PackageDetailsListState) => state.stockInfos[ean]; diff --git a/apps/isa-app/src/page/package-inspection/package-details/package-details.component.html b/apps/isa-app/src/page/package-inspection/package-details/package-details.component.html index f2ddca6e7..83cb9dc0d 100644 --- a/apps/isa-app/src/page/package-inspection/package-details/package-details.component.html +++ b/apps/isa-app/src/page/package-inspection/package-details/package-details.component.html @@ -9,7 +9,7 @@
{{ packageDetails.package.packageNumber }} - | + | {{ packageDetails.package.deliveryNoteNumber }}
@@ -46,8 +46,9 @@ [yPosition]="'above'" [xPosition]="'after'" [closeable]="true" - >Zur erneuten Prüfung 7 Tage nach Avisierung. + Zur erneuten Prüfung 7 Tage nach Avisierung. +
Gescannt am - {{ packageDetails.package.arrivalChecked | date: 'dd.MM.YYYY | HH:mm' }} Uhr + {{ packageDetails.package.arrivalChecked | date: 'dd.MM.YYYY | HH:mm' }} Uhr
- {{ packageDetails?.package?.items ?? '-' }} Exemplare + {{ packageDetails?.package?.items ?? '-' }} + Exemplare
diff --git a/apps/isa-app/src/page/package-inspection/package-inspection.module.ts b/apps/isa-app/src/page/package-inspection/package-inspection.module.ts index 320e26fbf..937125ee6 100644 --- a/apps/isa-app/src/page/package-inspection/package-inspection.module.ts +++ b/apps/isa-app/src/page/package-inspection/package-inspection.module.ts @@ -7,7 +7,12 @@ import { PackageResultModule } from './package-result'; import { packageInspectionRoutes } from './routes'; @NgModule({ - imports: [RouterModule.forChild(packageInspectionRoutes), BreadcrumbModule, PackageResultModule, PackageDetailsModule], + imports: [ + RouterModule.forChild(packageInspectionRoutes), + BreadcrumbModule, + PackageResultModule, + PackageDetailsModule, + ], declarations: [PackageInspectionComponent], exports: [PackageInspectionComponent], }) diff --git a/apps/isa-app/src/page/package-inspection/package-result/package-result.component.html b/apps/isa-app/src/page/package-inspection/package-result/package-result.component.html index c153b79f4..db6a655de 100644 --- a/apps/isa-app/src/page/package-inspection/package-result/package-result.component.html +++ b/apps/isa-app/src/page/package-inspection/package-result/package-result.component.html @@ -55,7 +55,7 @@ (click)="applyFilter()" [disabled]="store.fetching$ | async" > - Filter anwenden + Filter anwenden diff --git a/apps/isa-app/src/page/package-inspection/package-result/package-result.component.store.ts b/apps/isa-app/src/page/package-inspection/package-result/package-result.component.store.ts index e14c33ff3..958285fa2 100644 --- a/apps/isa-app/src/page/package-inspection/package-result/package-result.component.store.ts +++ b/apps/isa-app/src/page/package-inspection/package-result/package-result.component.store.ts @@ -11,7 +11,10 @@ import { debounceTime, filter, switchMap, takeUntil, tap, withLatestFrom } from import { INITIAL_RESULT_COMPONENT_STATE, PackageResultComponentState } from './package-result.component.state'; @Injectable() -export class PackageResultComponentStore extends ComponentStore implements OnStoreInit, OnDestroy { +export class PackageResultComponentStore + extends ComponentStore + implements OnStoreInit, OnDestroy +{ showFilter$ = this.select((state) => state.showFilter); fetching$ = this.select((state) => state.fetching); @@ -82,7 +85,10 @@ export class PackageResultComponentStore extends ComponentStore ({ ...state, packages })); - appendPackages = this.updater((state, packages: PackageDTO2[]) => ({ ...state, packages: [...state.packages, ...packages] })); + appendPackages = this.updater((state, packages: PackageDTO2[]) => ({ + ...state, + packages: [...state.packages, ...packages], + })); setTotal = this.updater((state, total: number) => ({ ...state, total })); @@ -102,7 +108,9 @@ export class PackageResultComponentStore extends ComponentStore $.pipe( switchMap((_) => - this._packageInspectionService.getQuerySettings().pipe(tapResponse(this.onFetchSettingsResponse, this.onFetchError)), + this._packageInspectionService + .getQuerySettings() + .pipe(tapResponse(this.onFetchSettingsResponse, this.onFetchError)), ), ), ); diff --git a/apps/isa-app/src/page/package-inspection/package-result/package-result.component.ts b/apps/isa-app/src/page/package-inspection/package-result/package-result.component.ts index 043ba1378..50727f99f 100644 --- a/apps/isa-app/src/page/package-inspection/package-result/package-result.component.ts +++ b/apps/isa-app/src/page/package-inspection/package-result/package-result.component.ts @@ -234,8 +234,14 @@ export class PackageResultComponent implements OnInit, AfterViewInit, OnDestroy } async removeBreadcrumbs(): Promise { - const detailsCrumbs = await this._breadcrumb.getBreadcrumbsByKeyAndTag$(this.breadcrumbKey, 'details').pipe(first()).toPromise(); - const filterCrumbs = await this._breadcrumb.getBreadcrumbsByKeyAndTag$(this.breadcrumbKey, 'filter').pipe(first()).toPromise(); + const detailsCrumbs = await this._breadcrumb + .getBreadcrumbsByKeyAndTag$(this.breadcrumbKey, 'details') + .pipe(first()) + .toPromise(); + const filterCrumbs = await this._breadcrumb + .getBreadcrumbsByKeyAndTag$(this.breadcrumbKey, 'filter') + .pipe(first()) + .toPromise(); const crumbs = [...detailsCrumbs, ...filterCrumbs]; for (let crumb of crumbs) { await this._breadcrumb.removeBreadcrumb(crumb.id); diff --git a/apps/isa-app/src/page/package-inspection/package-result/package-result.module.ts b/apps/isa-app/src/page/package-inspection/package-result/package-result.module.ts index 2c207f73d..c1c41b231 100644 --- a/apps/isa-app/src/page/package-inspection/package-result/package-result.module.ts +++ b/apps/isa-app/src/page/package-inspection/package-result/package-result.module.ts @@ -9,7 +9,14 @@ import { PackageListModule } from '@shared/components/package-list'; import { IconComponent } from '@shared/components/icon'; @NgModule({ - imports: [CommonModule, PackageListModule, IconComponent, UiFilterNextModule, SharedFilterOverlayModule, UiSpinnerModule], + imports: [ + CommonModule, + PackageListModule, + IconComponent, + UiFilterNextModule, + SharedFilterOverlayModule, + UiSpinnerModule, + ], exports: [PackageResultComponent], declarations: [PackageResultComponent], }) diff --git a/apps/isa-app/src/page/pickup-shelf/pickup-shelf-base.component.ts b/apps/isa-app/src/page/pickup-shelf/pickup-shelf-base.component.ts index 5a9bf19f7..07ca91523 100644 --- a/apps/isa-app/src/page/pickup-shelf/pickup-shelf-base.component.ts +++ b/apps/isa-app/src/page/pickup-shelf/pickup-shelf-base.component.ts @@ -146,7 +146,9 @@ export abstract class PickupShelfBaseComponent implements OnInit { abstract getNameForMainBreadcrumb(data: GetNameForBreadcrumbData): string | Promise; - abstract getPathForMainBreadcrumb(data: GetPathForBreadcrumbData): NavigationRoute | null | Promise; + abstract getPathForMainBreadcrumb( + data: GetPathForBreadcrumbData, + ): NavigationRoute | null | Promise; private async _removeAllBreadcrumbs() { const crumbs = await this._getBreadcrumb(); @@ -263,7 +265,10 @@ export abstract class PickupShelfBaseComponent implements OnInit { await this._removeBreadcrumbs(breadcrumbs); } - private async _checkAndUpdateWareneingangsListeBreadcrumb({ processId, queryParams }: GetNameAndPathForBreadcrumbData) { + private async _checkAndUpdateWareneingangsListeBreadcrumb({ + processId, + queryParams, + }: GetNameAndPathForBreadcrumbData) { const breadcrumbs = await this._getBreadcrumb('wareneingangsliste'); let listBreadcrumb: Breadcrumb = breadcrumbs.pop(); @@ -296,7 +301,10 @@ export abstract class PickupShelfBaseComponent implements OnInit { await this._removeBreadcrumbs(breadcrumbs); } - private async _checkAndUpdateAbholfachremissionsvorschauBreadcrumb({ processId, queryParams }: GetNameAndPathForBreadcrumbData) { + private async _checkAndUpdateAbholfachremissionsvorschauBreadcrumb({ + processId, + queryParams, + }: GetNameAndPathForBreadcrumbData) { const breadcrumbs = await this._getBreadcrumb('preview'); let listBreadcrumb: Breadcrumb = breadcrumbs.pop(); @@ -331,7 +339,9 @@ export abstract class PickupShelfBaseComponent implements OnInit { abstract getNameForListBreadcrumb(data: GetNameForBreadcrumbData): string | Promise; - abstract getPathFoListBreadcrumb(data: GetPathForBreadcrumbData): NavigationRoute | null | Promise; + abstract getPathFoListBreadcrumb( + data: GetPathForBreadcrumbData, + ): NavigationRoute | null | Promise; private async _checkAndUpdateListBreadcrumb({ processId, queryParams, view }: GetNameAndPathForBreadcrumbData) { const breadcrumbs = await this._getBreadcrumb('list'); @@ -401,13 +411,23 @@ export abstract class PickupShelfBaseComponent implements OnInit { abstract getPathForDetail(item: DBHOrderItemListItemDTO): Observable; - abstract getPathForDetailForDetailBreadcrumb(data: GetPathForBreadcrumbData): NavigationRoute | null | Promise; + abstract getPathForDetailForDetailBreadcrumb( + data: GetPathForBreadcrumbData, + ): NavigationRoute | null | Promise; private async _checkAndUpdateDetailBreadcrumb({ processId, queryParams, view }: GetNameAndPathForBreadcrumbData) { const breadcrumbs = await this._getBreadcrumb('details'); let detailBreadcrumb: Breadcrumb = breadcrumbs.pop(); - const shouldHaveBreadcrumb = ['details', 'edit', 'history', 'reservation', 'cleanup', 'wareneingangsliste', 'remission'].includes(view); + const shouldHaveBreadcrumb = [ + 'details', + 'edit', + 'history', + 'reservation', + 'cleanup', + 'wareneingangsliste', + 'remission', + ].includes(view); if (shouldHaveBreadcrumb) { const name = await this.getNameForDetailBreadcrumb({ processId, queryParams }); @@ -435,7 +455,9 @@ export abstract class PickupShelfBaseComponent implements OnInit { abstract getPathForEdit(item: DBHOrderItemListItemDTO): Observable; - abstract getPathForEditBreadcrumb(data: GetPathForBreadcrumbData): NavigationRoute | null | Promise; + abstract getPathForEditBreadcrumb( + data: GetPathForBreadcrumbData, + ): NavigationRoute | null | Promise; abstract getNameForEditBreadcrumb(data: GetNameForBreadcrumbData): string | Promise; @@ -471,7 +493,9 @@ export abstract class PickupShelfBaseComponent implements OnInit { abstract getPathForHistory(item: DBHOrderItemListItemDTO): Observable; - abstract getPathForHistoryBreadcrumb(data: GetPathForBreadcrumbData): NavigationRoute | null | Promise; + abstract getPathForHistoryBreadcrumb( + data: GetPathForBreadcrumbData, + ): NavigationRoute | null | Promise; abstract getNameForHistoryBreadcrumb(data: GetNameForBreadcrumbData): string | Promise; diff --git a/apps/isa-app/src/page/pickup-shelf/pickup-shelf-details-base.component.ts b/apps/isa-app/src/page/pickup-shelf/pickup-shelf-details-base.component.ts index 229726eef..4dfdb5549 100644 --- a/apps/isa-app/src/page/pickup-shelf/pickup-shelf-details-base.component.ts +++ b/apps/isa-app/src/page/pickup-shelf/pickup-shelf-details-base.component.ts @@ -48,7 +48,9 @@ export abstract class PickupShelfDetailsBaseComponent { orderNumber: params.orderNumber ? decodeURIComponent(params.orderNumber) : undefined, compartmentCode: params.compartmentCode ? decodeURIComponent(params.compartmentCode) : undefined, compartmentInfo: params.compartmentInfo ? decodeURIComponent(params.compartmentInfo) : undefined, - orderItemProcessingStatus: (params.orderItemProcessingStatus ? +params.orderItemProcessingStatus : undefined) as any, + orderItemProcessingStatus: (params.orderItemProcessingStatus + ? +params.orderItemProcessingStatus + : undefined) as any, orderItemSubsetId: params.orderItemSubsetId ? +params.orderItemSubsetId : undefined, }); }); @@ -114,7 +116,9 @@ export abstract class PickupShelfDetailsBaseComponent { }); ctx.items.forEach((item) => { - const updatedItem = updatedDetailsItems?.find((detailsItem) => detailsItem?.orderItemSubsetId === item?.orderItemSubsetId); + const updatedItem = updatedDetailsItems?.find( + (detailsItem) => detailsItem?.orderItemSubsetId === item?.orderItemSubsetId, + ); if (!updatedItem) return; diff --git a/apps/isa-app/src/page/pickup-shelf/pickup-shelf-in/pickup-shelf-in-list/pickup-shelf-in-list.component.html b/apps/isa-app/src/page/pickup-shelf/pickup-shelf-in/pickup-shelf-in-list/pickup-shelf-in-list.component.html index bdb838972..b6ab83f09 100644 --- a/apps/isa-app/src/page/pickup-shelf/pickup-shelf-in/pickup-shelf-in-list/pickup-shelf-in-list.component.html +++ b/apps/isa-app/src/page/pickup-shelf/pickup-shelf-in/pickup-shelf-in-list/pickup-shelf-in-list.component.html @@ -41,7 +41,8 @@
- Es sind im Moment keine Bestellposten vorhanden,
+ Es sind im Moment keine Bestellposten vorhanden, +
die bearbeitet werden können.

{{ firstItem?.organisation }} - - + - {{ firstItem?.lastName }} {{ firstItem?.firstName }}

diff --git a/apps/isa-app/src/page/pickup-shelf/pickup-shelf-in/pickup-shelf-in-main/pickup-shelf-in-main.component.ts b/apps/isa-app/src/page/pickup-shelf/pickup-shelf-in/pickup-shelf-in-main/pickup-shelf-in-main.component.ts index 93a55e1ac..aad29ea41 100644 --- a/apps/isa-app/src/page/pickup-shelf/pickup-shelf-in/pickup-shelf-in-main/pickup-shelf-in-main.component.ts +++ b/apps/isa-app/src/page/pickup-shelf/pickup-shelf-in/pickup-shelf-in-main/pickup-shelf-in-main.component.ts @@ -15,7 +15,8 @@ export class PickUpShelfInMainComponent implements OnInit { showFilter: boolean = false; get sideOutlet() { - return this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'side')?.snapshot?.routeConfig?.path; + return this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'side')?.snapshot + ?.routeConfig?.path; } constructor(private _activatedRoute: ActivatedRoute) {} diff --git a/apps/isa-app/src/page/pickup-shelf/pickup-shelf-in/pickup-shelf-in.component.ts b/apps/isa-app/src/page/pickup-shelf/pickup-shelf-in/pickup-shelf-in.component.ts index fa3ea39f3..7d757f9ad 100644 --- a/apps/isa-app/src/page/pickup-shelf/pickup-shelf-in/pickup-shelf-in.component.ts +++ b/apps/isa-app/src/page/pickup-shelf/pickup-shelf-in/pickup-shelf-in.component.ts @@ -9,7 +9,11 @@ import { provideActionHandlers } from '@core/command'; import { ActionHandlerServices } from '@domain/oms'; import { Config } from '@core/config'; import { ActionHandlerService } from '../services/action-handler.service'; -import { GetNameForBreadcrumbData, GetPathForBreadcrumbData, PickupShelfBaseComponent } from '../pickup-shelf-base.component'; +import { + GetNameForBreadcrumbData, + GetPathForBreadcrumbData, + PickupShelfBaseComponent, +} from '../pickup-shelf-base.component'; import { DBHOrderItemListItemDTO } from '@generated/swagger/oms-api'; import { Observable, of } from 'rxjs'; import { map, take } from 'rxjs/operators'; @@ -219,21 +223,27 @@ export class PickupShelfInComponent extends PickupShelfBaseComponent { } async regsiterFetchListResponseHandler() { - this.listStore.fetchListResponse$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async ({ processId, queryParams, response }) => { - /** - * Wenn die Suche erfolgreich war, wird der Benutzer auf die Liste oder Detailseite des gefundenen Artikels weitergeleitet. - */ - const filterQueryParams = this.listStore.filter.getQueryParams(); + this.listStore.fetchListResponse$ + .pipe(takeUntilDestroyed(this.destroyRef)) + .subscribe(async ({ processId, queryParams, response }) => { + /** + * Wenn die Suche erfolgreich war, wird der Benutzer auf die Liste oder Detailseite des gefundenen Artikels weitergeleitet. + */ + const filterQueryParams = this.listStore.filter.getQueryParams(); - if (response.hits === 1) { - const detailsPath = await this.getPathForDetail(response.result[0]).pipe(take(1)).toPromise(); - await this.router.navigate(detailsPath.path, { queryParams: { ...queryParams, ...filterQueryParams, ...detailsPath.queryParams } }); - } else if (response.hits > 1) { - const listPath = await this.getPathFoListBreadcrumb({ processId, queryParams }); - await this.router.navigate(listPath.path, { queryParams: { ...queryParams, ...filterQueryParams, ...listPath.queryParams } }); - } else { - await this.router.navigate([], { queryParams: { ...queryParams, ...filterQueryParams } }); - } - }); + if (response.hits === 1) { + const detailsPath = await this.getPathForDetail(response.result[0]).pipe(take(1)).toPromise(); + await this.router.navigate(detailsPath.path, { + queryParams: { ...queryParams, ...filterQueryParams, ...detailsPath.queryParams }, + }); + } else if (response.hits > 1) { + const listPath = await this.getPathFoListBreadcrumb({ processId, queryParams }); + await this.router.navigate(listPath.path, { + queryParams: { ...queryParams, ...filterQueryParams, ...listPath.queryParams }, + }); + } else { + await this.router.navigate([], { queryParams: { ...queryParams, ...filterQueryParams } }); + } + }); } } diff --git a/apps/isa-app/src/page/pickup-shelf/pickup-shelf-out/pickup-shelf-out-main-side-view/pickup-shelf-out-main-side-view.component.html b/apps/isa-app/src/page/pickup-shelf/pickup-shelf-out/pickup-shelf-out-main-side-view/pickup-shelf-out-main-side-view.component.html index 39c0e992f..5317e6e5d 100644 --- a/apps/isa-app/src/page/pickup-shelf/pickup-shelf-out/pickup-shelf-out-main-side-view/pickup-shelf-out-main-side-view.component.html +++ b/apps/isa-app/src/page/pickup-shelf/pickup-shelf-out/pickup-shelf-out-main-side-view/pickup-shelf-out-main-side-view.component.html @@ -1,10 +1,14 @@

Warenausgabe

- Suchen Sie den Bestellposten via
- Kundenname, Bestellnummer, Vorgang ID,
- Abholscheinnummer, Abholfachnummer,
- Kundenkartennummer oder scannen Sie die
+ Suchen Sie den Bestellposten via +
+ Kundenname, Bestellnummer, Vorgang ID, +
+ Abholscheinnummer, Abholfachnummer, +
+ Kundenkartennummer oder scannen Sie die +
Kundenkarte.

diff --git a/apps/isa-app/src/page/pickup-shelf/pickup-shelf-out/pickup-shelf-out-main/pickup-shelf-out-main.component.ts b/apps/isa-app/src/page/pickup-shelf/pickup-shelf-out/pickup-shelf-out-main/pickup-shelf-out-main.component.ts index 7867d8c64..d99aea6b3 100644 --- a/apps/isa-app/src/page/pickup-shelf/pickup-shelf-out/pickup-shelf-out-main/pickup-shelf-out-main.component.ts +++ b/apps/isa-app/src/page/pickup-shelf/pickup-shelf-out/pickup-shelf-out-main/pickup-shelf-out-main.component.ts @@ -15,7 +15,8 @@ export class PickupShelfOutMainComponent implements OnInit { showFilter: boolean = false; get sideOutlet() { - return this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'side')?.snapshot?.routeConfig?.path; + return this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'side')?.snapshot + ?.routeConfig?.path; } constructor(private _activatedRoute: ActivatedRoute) {} diff --git a/apps/isa-app/src/page/pickup-shelf/pickup-shelf-out/pickup-shelf-out.component.ts b/apps/isa-app/src/page/pickup-shelf/pickup-shelf-out/pickup-shelf-out.component.ts index 37276cc3a..4840e6ac5 100644 --- a/apps/isa-app/src/page/pickup-shelf/pickup-shelf-out/pickup-shelf-out.component.ts +++ b/apps/isa-app/src/page/pickup-shelf/pickup-shelf-out/pickup-shelf-out.component.ts @@ -4,7 +4,11 @@ import { SharedSplitscreenComponent } from '@shared/components/splitscreen'; import { PickupShelfStore, PickupShelfDetailsStore } from '../store'; import { provideComponentStore } from '@ngrx/component-store'; import { PickupShelfIOService, PickupShelfOutService } from '@domain/pickup-shelf'; -import { GetNameForBreadcrumbData, GetPathForBreadcrumbData, PickupShelfBaseComponent } from '../pickup-shelf-base.component'; +import { + GetNameForBreadcrumbData, + GetPathForBreadcrumbData, + PickupShelfBaseComponent, +} from '../pickup-shelf-base.component'; import { NavigationRoute, PickUpShelfOutNavigationService } from '@shared/services/navigation'; import { AsyncPipe } from '@angular/common'; import { DBHOrderItemListItemDTO } from '@generated/swagger/oms-api'; @@ -60,7 +64,10 @@ export class PickupShelfOutComponent extends PickupShelfBaseComponent { return 'Warenausgabe'; } - getPathForMainBreadcrumb(data: { processId: number; queryParams: Record }): NavigationRoute | Promise { + getPathForMainBreadcrumb(data: { + processId: number; + queryParams: Record; + }): NavigationRoute | Promise { return this._pickupShelfOutNavigationService.defaultRoute({ processId: data.processId }); } @@ -207,22 +214,28 @@ export class PickupShelfOutComponent extends PickupShelfBaseComponent { } async regsiterFetchListResponseHandler() { - this.listStore.fetchListResponse$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async ({ processId, queryParams, response }) => { - /** - * Wenn die Suche erfolgreich war, wird der Benutzer auf die Liste oder Detailseite des gefundenen Artikels weitergeleitet. - */ - const filterQueryParams = this.listStore.filter.getQueryParams(); + this.listStore.fetchListResponse$ + .pipe(takeUntilDestroyed(this.destroyRef)) + .subscribe(async ({ processId, queryParams, response }) => { + /** + * Wenn die Suche erfolgreich war, wird der Benutzer auf die Liste oder Detailseite des gefundenen Artikels weitergeleitet. + */ + const filterQueryParams = this.listStore.filter.getQueryParams(); - if (response.hits === 1) { - const detailsPath = await this.getPathForDetail(response.result[0]).pipe(take(1)).toPromise(); - await this.router.navigate(detailsPath.path, { queryParams: { ...queryParams, ...filterQueryParams, ...detailsPath.queryParams } }); - } else if (response.hits > 1) { - const listPath = await this.getPathFoListBreadcrumb({ processId, queryParams }); - await this.router.navigate(listPath.path, { queryParams: { ...queryParams, ...filterQueryParams, ...listPath.queryParams } }); - } else { - await this.router.navigate([], { queryParams: { ...queryParams, ...filterQueryParams } }); - } - }); + if (response.hits === 1) { + const detailsPath = await this.getPathForDetail(response.result[0]).pipe(take(1)).toPromise(); + await this.router.navigate(detailsPath.path, { + queryParams: { ...queryParams, ...filterQueryParams, ...detailsPath.queryParams }, + }); + } else if (response.hits > 1) { + const listPath = await this.getPathFoListBreadcrumb({ processId, queryParams }); + await this.router.navigate(listPath.path, { + queryParams: { ...queryParams, ...filterQueryParams, ...listPath.queryParams }, + }); + } else { + await this.router.navigate([], { queryParams: { ...queryParams, ...filterQueryParams } }); + } + }); } // Ticket 4720 WA // Trefferliste wird übersprungen - Bei mehreren Bestellposten pro Bestellung soll IMMER auf Trefferliste navigiert werden diff --git a/apps/isa-app/src/page/pickup-shelf/services/action-handler.service.ts b/apps/isa-app/src/page/pickup-shelf/services/action-handler.service.ts index 4f4362a97..fd6868614 100644 --- a/apps/isa-app/src/page/pickup-shelf/services/action-handler.service.ts +++ b/apps/isa-app/src/page/pickup-shelf/services/action-handler.service.ts @@ -1,7 +1,13 @@ import { Injectable, inject } from '@angular/core'; import { CommandService } from '@core/command'; import { DomainReceiptService, OrderItemsContext } from '@domain/oms'; -import { DBHOrderItemListItemDTO, KeyValueDTOOfStringAndString, OrderDTO, ReceiptDTO, ReceiptType } from '@generated/swagger/oms-api'; +import { + DBHOrderItemListItemDTO, + KeyValueDTOOfStringAndString, + OrderDTO, + ReceiptDTO, + ReceiptType, +} from '@generated/swagger/oms-api'; import { catchError, map } from 'rxjs/operators'; @Injectable() diff --git a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-details-covers/pickup-shelf-details-covers.component.html b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-details-covers/pickup-shelf-details-covers.component.html index c4deebdcc..0fe1fd164 100644 --- a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-details-covers/pickup-shelf-details-covers.component.html +++ b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-details-covers/pickup-shelf-details-covers.component.html @@ -16,5 +16,5 @@ - + diff --git a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-details-covers/pickup-shelf-details-covers.component.ts b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-details-covers/pickup-shelf-details-covers.component.ts index ca5466ff1..124d688b0 100644 --- a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-details-covers/pickup-shelf-details-covers.component.ts +++ b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-details-covers/pickup-shelf-details-covers.component.ts @@ -54,7 +54,10 @@ export class PickUpShelfDetailsCoversComponent { // Items einer Gruppe anhand des readyForPickup Datums sortieren groupedItems.forEach( - (group) => (group.items = group.items.sort((a, b) => new Date(b.readyForPickUp).getTime() - new Date(a.readyForPickUp).getTime())), + (group) => + (group.items = group.items.sort( + (a, b) => new Date(b.readyForPickUp).getTime() - new Date(a.readyForPickUp).getTime(), + )), ); return groupedItems; diff --git a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-details-header/pickup-shelf-details-header.component.scss b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-details-header/pickup-shelf-details-header.component.scss index d4fe23347..d2982ff4b 100644 --- a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-details-header/pickup-shelf-details-header.component.scss +++ b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-details-header/pickup-shelf-details-header.component.scss @@ -24,11 +24,11 @@ @apply grid grid-flow-row gap-x-6 gap-y-[0.375rem]; grid-template-columns: 50% auto; grid-template-areas: - 'buyernumber .' - 'ordernumber .' - 'orderdate processingstatus' - 'ordersource changedate' - 'dignotification pickup'; + "buyernumber ." + "ordernumber ." + "orderdate processingstatus" + "ordersource changedate" + "dignotification pickup"; .detail { shared-icon { diff --git a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-details-items-group/pickup-shelf-details-items-group.component.ts b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-details-items-group/pickup-shelf-details-items-group.component.ts index dd076c51c..faede1eec 100644 --- a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-details-items-group/pickup-shelf-details-items-group.component.ts +++ b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-details-items-group/pickup-shelf-details-items-group.component.ts @@ -31,7 +31,9 @@ export class PickUpShelfDetailsItemsGroupComponent implements OnInit { openAddresses: boolean = false; get showAddresses(): boolean { - return (this.order?.orderType === 2 || this.order?.orderType === 4) && (!!this.order?.shipping || !!this.order?.billing); + return ( + (this.order?.orderType === 2 || this.order?.orderType === 4) && (!!this.order?.shipping || !!this.order?.billing) + ); } get showFeature(): boolean { @@ -51,7 +53,9 @@ export class PickUpShelfDetailsItemsGroupComponent implements OnInit { ); selectedOrderItemCount$ = this._store.selectedOrderItemIds$.pipe( - map((ids) => this.groupedItems?.filter((groupedItem) => ids?.includes(groupedItem?.orderItemSubsetId))?.length ?? 0), + map( + (ids) => this.groupedItems?.filter((groupedItem) => ids?.includes(groupedItem?.orderItemSubsetId))?.length ?? 0, + ), ); constructor() {} diff --git a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-filter/pickup-shelf-filter.component.html b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-filter/pickup-shelf-filter.component.html index be114e0bb..a32de6a1c 100644 --- a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-filter/pickup-shelf-filter.component.html +++ b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-filter/pickup-shelf-filter.component.html @@ -28,7 +28,7 @@
diff --git a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-filter/pickup-shelf-filter.component.ts b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-filter/pickup-shelf-filter.component.ts index 32c61a924..6430136f2 100644 --- a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-filter/pickup-shelf-filter.component.ts +++ b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-filter/pickup-shelf-filter.component.ts @@ -25,11 +25,13 @@ export class PickupShelfFilterComponent { filter$ = this.store.filter$; get sideOutlet() { - return this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'side')?.snapshot?.routeConfig?.path; + return this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'side')?.snapshot + ?.routeConfig?.path; } get primaryOutlet() { - return this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'primary')?.snapshot?.routeConfig?.path; + return this._activatedRoute?.parent?.children?.find((childRoute) => childRoute?.outlet === 'primary')?.snapshot + ?.routeConfig?.path; } fetching$: Observable = this.store.fetchingList$; @@ -145,10 +147,14 @@ export class PickupShelfFilterComponent { hasSelectedOptions(filter: Filter) { // Is Query available - const hasInputOptions = !!filter.input.find((input) => !!input.input.find((fi) => fi.hasFilterInputOptionsSelected())); + const hasInputOptions = !!filter.input.find( + (input) => !!input.input.find((fi) => fi.hasFilterInputOptionsSelected()), + ); // Are filter or filterChips selected - const hasFilterOptions = !!filter.filter.find((input) => !!input.input.find((fi) => fi.hasFilterInputOptionsSelected())); + const hasFilterOptions = !!filter.filter.find( + (input) => !!input.input.find((fi) => fi.hasFilterInputOptionsSelected()), + ); return hasInputOptions || hasFilterOptions; } } diff --git a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-history/pickup-shelf-history.component.html b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-history/pickup-shelf-history.component.html index 8170dc9cb..7b845f7b8 100644 --- a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-history/pickup-shelf-history.component.html +++ b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-history/pickup-shelf-history.component.html @@ -20,5 +20,5 @@
- + diff --git a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-history/pickup-shelf-history.component.ts b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-history/pickup-shelf-history.component.ts index 741b98644..239ec6ccb 100644 --- a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-history/pickup-shelf-history.component.ts +++ b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-history/pickup-shelf-history.component.ts @@ -37,20 +37,28 @@ export class PickUpShelfHistoryComponent extends PickupShelfDetailsBaseComponent switchMap(([orderNumber, compartmentCode]) => this._pickupShelfIOService .getOrderItemsByOrderNumberOrCompartmentCode({ compartmentCode, orderNumber }) - .pipe(map((response) => response?.result?.find((listItem) => listItem?.orderItemSubsetId === this.orderItemSubsetId))), + .pipe( + map((response) => + response?.result?.find((listItem) => listItem?.orderItemSubsetId === this.orderItemSubsetId), + ), + ), ), shareReplay(), ); customerName$ = this.historyItem$.pipe( map((historyItem) => - [historyItem?.organisation ?? historyItem?.organisation, historyItem?.lastName, historyItem?.firstName].filter((i) => !!i).join(', '), + [historyItem?.organisation ?? historyItem?.organisation, historyItem?.lastName, historyItem?.firstName] + .filter((i) => !!i) + .join(', '), ), ); customerNumber$ = this.historyItem$.pipe(map((historyItem) => historyItem?.buyerNumber)); - history$ = this.historyItem$.pipe(switchMap((historyItem) => this._omsService.getHistory(historyItem?.orderItemSubsetId).pipe(take(1)))); + history$ = this.historyItem$.pipe( + switchMap((historyItem) => this._omsService.getHistory(historyItem?.orderItemSubsetId).pipe(take(1))), + ); constructor( private _activatedRoute: ActivatedRoute, diff --git a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-list-item/pickup-shelf-list-item-loader.component.css b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-list-item/pickup-shelf-list-item-loader.component.css index 8807aa870..826f013d1 100644 --- a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-list-item/pickup-shelf-list-item-loader.component.css +++ b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-list-item/pickup-shelf-list-item-loader.component.css @@ -1,8 +1,8 @@ :host { @apply grid h-28 p-4 rounded bg-white gap-x-4; grid-template-areas: - 'cover author ean order' - 'cover title quantity .'; + "cover author ean order" + "cover title quantity ."; grid-template-columns: auto 1fr 1fr auto; } diff --git a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-list-item/pickup-shelf-list-item.component.css b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-list-item/pickup-shelf-list-item.component.css index 744d08623..e3d37b1f2 100644 --- a/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-list-item/pickup-shelf-list-item.component.css +++ b/apps/isa-app/src/page/pickup-shelf/shared/pickup-shelf-list-item/pickup-shelf-list-item.component.css @@ -13,10 +13,10 @@ grid-template-columns: 3.125rem auto; grid-template-rows: 2rem auto; grid-template-areas: - 'extras extras extras' - 'thumbnail details details' - '. info select' - '. comment comment'; + "extras extras extras" + "thumbnail details details" + ". info select" + ". comment comment"; } .page-pickup-shelf-list-item__item-grid-container-main { @@ -24,8 +24,8 @@ grid-template-rows: auto; grid-template-columns: 3.125rem 35% auto auto 3rem; grid-template-areas: - 'thumbnail details info extras select' - '. comment comment . .'; + "thumbnail details info extras select" + ". comment comment . ."; } .page-pickup-shelf-list-item__item-grid-container-secondary { @@ -33,8 +33,8 @@ grid-template-rows: auto; grid-template-columns: 3.125rem 35% auto; grid-template-areas: - 'thumbnail details info extras' - '. comment comment .'; + "thumbnail details info extras" + ". comment comment ."; } .page-pickup-shelf-list-item__item-thumbnail { diff --git a/apps/isa-app/src/page/pickup-shelf/shared/pipes/processing-status.pipe.ts b/apps/isa-app/src/page/pickup-shelf/shared/pipes/processing-status.pipe.ts index 693e81456..eee5611f5 100644 --- a/apps/isa-app/src/page/pickup-shelf/shared/pipes/processing-status.pipe.ts +++ b/apps/isa-app/src/page/pickup-shelf/shared/pipes/processing-status.pipe.ts @@ -63,6 +63,10 @@ export class PickupShelfProcessingStatusPipe implements PipeTransform { }; transform(value: OrderItemProcessingStatusValue, color?: boolean): string { - return !!color ? this.color[value] : ProcessingStatusNameMap.get(value) ? ProcessingStatusNameMap.get(value).value : ''; + return !!color + ? this.color[value] + : ProcessingStatusNameMap.get(value) + ? ProcessingStatusNameMap.get(value).value + : ''; } } diff --git a/apps/isa-app/src/page/pickup-shelf/store/pickup-shelf-details.selectors.ts b/apps/isa-app/src/page/pickup-shelf/store/pickup-shelf-details.selectors.ts index ce5e11a86..e308d4936 100644 --- a/apps/isa-app/src/page/pickup-shelf/store/pickup-shelf-details.selectors.ts +++ b/apps/isa-app/src/page/pickup-shelf/store/pickup-shelf-details.selectors.ts @@ -10,7 +10,8 @@ export const selectOrderItemsRaw = (s: PickupShelfDetailsState) => s.orderItems; export const selectFetchingOrderItems = (s: PickupShelfDetailsState) => s.fetchingOrderItems; -export const selectDisplayedOrderItemProcessingStatus = (s: PickupShelfDetailsState) => s.displayedOrderItemProcessingStatus; +export const selectDisplayedOrderItemProcessingStatus = (s: PickupShelfDetailsState) => + s.displayedOrderItemProcessingStatus; export const selectDisplayedCompartmentCode = (s: PickupShelfDetailsState) => s.displayedCompartmentCode; @@ -88,7 +89,8 @@ export const selectFetchReceipts = (s: PickupShelfDetailsState) => !!s.fetchingR export const selectSelectedOrderItemIds = (s: PickupShelfDetailsState) => s.selectedOrderItemIds ?? []; -export const selectPreviousSelectedOrderItemSubsetId = (s: PickupShelfDetailsState) => s.previousSelectedOrderItemSubsetId; +export const selectPreviousSelectedOrderItemSubsetId = (s: PickupShelfDetailsState) => + s.previousSelectedOrderItemSubsetId; export const selectOrderItemSubsetLoading = (s: PickupShelfDetailsState) => s.orderItemSubsetLoading; @@ -169,29 +171,34 @@ export const selectNotifications = (orderItemSubsetId: number) => (s: PickupShel ); }; -export const selectLatestNotificationDatesFor = (orderItemSubsetId: number, keys: string[]) => (s: PickupShelfDetailsState) => { - const notifications = selectNotifications(orderItemSubsetId)(s); - let dates: Array<{ type: string; dates: Date[] }> = []; +export const selectLatestNotificationDatesFor = + (orderItemSubsetId: number, keys: string[]) => (s: PickupShelfDetailsState) => { + const notifications = selectNotifications(orderItemSubsetId)(s); + let dates: Array<{ type: string; dates: Date[] }> = []; - for (const key of keys) { - const notification = notifications?.[key] ?? []; + for (const key of keys) { + const notification = notifications?.[key] ?? []; - const validDates = notification.filter((date) => { - // check if curr is an invalid date - return !isNaN(date.getTime()); - }); + const validDates = notification.filter((date) => { + // check if curr is an invalid date + return !isNaN(date.getTime()); + }); - const mappedDates = { type: key, dates: validDates }; + const mappedDates = { type: key, dates: validDates }; - if (mappedDates.dates?.length > 0) { - dates.push(mappedDates); + if (mappedDates.dates?.length > 0) { + dates.push(mappedDates); + } } - } - return dates; -}; + return dates; + }; export const selectLatestEmailNotificationDates = (orderItemSubsetId: number) => (s: PickupShelfDetailsState) => { - return selectLatestNotificationDatesFor(orderItemSubsetId, ['NOTIFICATION_EMAIL', 'REMINDER_EMAIL', 'ORDERCONFIRMATION_EMAIL'])(s); + return selectLatestNotificationDatesFor(orderItemSubsetId, [ + 'NOTIFICATION_EMAIL', + 'REMINDER_EMAIL', + 'ORDERCONFIRMATION_EMAIL', + ])(s); }; export const selectLatestSmsNotificationDate2 = (orderItemSubsetId: number) => (s: PickupShelfDetailsState) => { diff --git a/apps/isa-app/src/page/pickup-shelf/store/pickup-shelf-details.store.ts b/apps/isa-app/src/page/pickup-shelf/store/pickup-shelf-details.store.ts index a3999f1f0..244198688 100644 --- a/apps/isa-app/src/page/pickup-shelf/store/pickup-shelf-details.store.ts +++ b/apps/isa-app/src/page/pickup-shelf/store/pickup-shelf-details.store.ts @@ -285,9 +285,14 @@ export class PickupShelfDetailsStore extends ComponentStore { - return { ...state, selectedOrderItemQuantity: { ...state.selectedOrderItemQuantity, [orderItemSubsetId]: quantity } }; - }); + setSelectedOrderItemQuantity = this.updater( + (state, { orderItemSubsetId, quantity }: { orderItemSubsetId: number; quantity: number }) => { + return { + ...state, + selectedOrderItemQuantity: { ...state.selectedOrderItemQuantity, [orderItemSubsetId]: quantity }, + }; + }, + ); setPreviousSelectedOrderItemSubsetId(previousSelectedOrderItemSubsetId: number) { this.patchState({ previousSelectedOrderItemSubsetId }); @@ -299,7 +304,9 @@ export class PickupShelfDetailsStore extends ComponentStore id !== item?.orderItemSubsetId) }); + this.patchState({ + selectedOrderItemIds: this.selectedOrderItemIds.filter((id) => id !== item?.orderItemSubsetId), + }); } } @@ -342,7 +349,9 @@ export class PickupShelfDetailsStore extends ComponentStore { + private fetchReceiptsDone = ( + res: ResponseArgsOfIEnumerableOfValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO, + ) => { const receipts = res.result.map((r) => r.item3?.data).filter((f) => !!f); this.patchState({ receipts, fetchingReceipts: false }); }; @@ -356,13 +365,19 @@ export class PickupShelfDetailsStore extends ComponentStore from(this.beforeFetchOrder(orderId)).pipe(map(() => ({ orderId })))), switchMap(({ orderId }) => - this._pickupShelfService.getOrderByOrderId(orderId).pipe(tapResponse(this.fetchOrderSuccess, this.fetchOrderFailed)), + this._pickupShelfService + .getOrderByOrderId(orderId) + .pipe(tapResponse(this.fetchOrderSuccess, this.fetchOrderFailed)), ), ), ); private beforeFetchOrder = async (orderId) => { - const order = (await this._cacheService.get({ name: 'order', orderId, store: 'PickupShelfDetailsStore' })) ?? { id: orderId }; + const order = (await this._cacheService.get({ + name: 'order', + orderId, + store: 'PickupShelfDetailsStore', + })) ?? { id: orderId }; const customer = await this._cacheService.get({ name: 'customer', orderId, @@ -375,9 +390,13 @@ export class PickupShelfDetailsStore extends ComponentStore { this.patchState({ fetchingOrder: false, order: res.result }); - this._cacheService.set({ name: 'order', orderId: res.result.id, store: 'PickupShelfDetailsStore' }, res.result, { - ttl: 3600000, - }); + this._cacheService.set( + { name: 'order', orderId: res.result.id, store: 'PickupShelfDetailsStore' }, + res.result, + { + ttl: 3600000, + }, + ); this.fetchCustomer({ buyerNumber: res.result.buyer.buyerNumber }); this._runCheckTrigger.next(); @@ -404,12 +423,18 @@ export class PickupShelfDetailsStore extends ComponentStore from(this.beforeFetchOrderItems(data)).pipe(map(() => data))), withLatestFrom(this._listStore.filter$), switchMap(([{ compartmentCode, orderNumber, compartmentInfo, orderItemProcessingStatus, done }, filter]) => - this._pickupShelfIOService.getOrderItemsByOrderNumberOrCompartmentCode({ compartmentCode, orderNumber, filter }).pipe( - tapResponse( - (r) => this.fetchOrderItemsSuccess({ compartmentCode, compartmentInfo, orderItemProcessingStatus }, done?.resolve)(r), - (e) => this.fetchOrderItemsFailed(done?.reject)(e), + this._pickupShelfIOService + .getOrderItemsByOrderNumberOrCompartmentCode({ compartmentCode, orderNumber, filter }) + .pipe( + tapResponse( + (r) => + this.fetchOrderItemsSuccess( + { compartmentCode, compartmentInfo, orderItemProcessingStatus }, + done?.resolve, + )(r), + (e) => this.fetchOrderItemsFailed(done?.reject)(e), + ), ), - ), ), ), ); @@ -497,7 +522,9 @@ export class PickupShelfDetailsStore extends ComponentStore this.customer?.customerNumber !== buyerNumber), switchMap(({ buyerNumber }) => from(this.beforeFetchCustomer()).pipe(map(() => ({ buyerNumber })))), switchMap(({ buyerNumber }) => - this._customerService.getCustomers(buyerNumber).pipe(tapResponse(this.fetchCustomerSuccess, this.fetchCustomerFailed)), + this._customerService + .getCustomers(buyerNumber) + .pipe(tapResponse(this.fetchCustomerSuccess, this.fetchCustomerFailed)), ), ), ); @@ -556,17 +583,18 @@ export class PickupShelfDetailsStore extends ComponentStore }>) => - $.pipe( - mergeMap((data) => - this._pickupShelfService.patchOrderItemSubset(data.item, data.changes).pipe( - tapResponse( - (res) => this.patchOrderItemSubsetDone(data.item)(res), - (err) => this.patchOrderItemSubsetError(err), + patchOrderItemSubset = this.effect( + ($: Observable<{ item: DBHOrderItemListItemDTO; changes: Partial }>) => + $.pipe( + mergeMap((data) => + this._pickupShelfService.patchOrderItemSubset(data.item, data.changes).pipe( + tapResponse( + (res) => this.patchOrderItemSubsetDone(data.item)(res), + (err) => this.patchOrderItemSubsetError(err), + ), ), ), ), - ), ); private patchOrderItemSubsetDone = (item: DBHOrderItemListItemDTO) => (res: ResponseArgsOfOrderItemSubsetDTO) => { @@ -581,7 +609,10 @@ export class PickupShelfDetailsStore extends ComponentStore }) => { + ( + state, + { orderItemSubsetId, changes }: { orderItemSubsetId: number; changes: Partial }, + ) => { return { ...state, orderItems: @@ -649,10 +683,11 @@ export class PickupShelfDetailsStore extends ComponentStore (res: ListResponseArgsOfOrderItemSubsetTaskListItemDTO) => { - this.setOrderItemSubsetTaskFetching({ orderItemSubsetId: item.orderItemSubsetId, fetching: false }); - this.setOrderItemSubsetTasks({ orderItemSubsetId: item.orderItemSubsetId, tasks: res.result }); - }; + private fetchOrderItemSubsetTasksDone = + (item: DBHOrderItemListItemDTO) => (res: ListResponseArgsOfOrderItemSubsetTaskListItemDTO) => { + this.setOrderItemSubsetTaskFetching({ orderItemSubsetId: item.orderItemSubsetId, fetching: false }); + this.setOrderItemSubsetTasks({ orderItemSubsetId: item.orderItemSubsetId, tasks: res.result }); + }; private fetchOrderItemSubsetTasksFailed = (item: DBHOrderItemListItemDTO) => (err: any) => { this.setOrderItemSubsetTaskFetching({ orderItemSubsetId: item.orderItemSubsetId, fetching: false }); @@ -672,15 +707,17 @@ export class PickupShelfDetailsStore extends ComponentStore { - return { - ...state, - orderItemSubsetTasks: { - ...state.orderItemSubsetTasks, - [data.orderItemSubsetId]: data.tasks, - }, - }; - }); + setOrderItemSubsetTasks = this.updater( + (state, data: { orderItemSubsetId: number; tasks: OrderItemSubsetTaskListItemDTO[] }) => { + return { + ...state, + orderItemSubsetTasks: { + ...state.orderItemSubsetTasks, + [data.orderItemSubsetId]: data.tasks, + }, + }; + }, + ); getOrderItemSubsetTasks$ = (orderItemSubsetId: number) => { return this.select(Selectors.selectOrderItemSubsetTasks(orderItemSubsetId)); diff --git a/apps/isa-app/src/page/pickup-shelf/store/pickup-shelf.store.ts b/apps/isa-app/src/page/pickup-shelf/store/pickup-shelf.store.ts index 02242d1b7..79ae81495 100644 --- a/apps/isa-app/src/page/pickup-shelf/store/pickup-shelf.store.ts +++ b/apps/isa-app/src/page/pickup-shelf/store/pickup-shelf.store.ts @@ -164,7 +164,8 @@ export class PickupShelfStore extends ComponentStore implement removeSelectedListItems = this.updater((state, listItems: DBHOrderItemListItemDTO[]) => ({ ...state, - selectedListItems: state.selectedListItems?.filter((li) => !listItems.some((l) => l.orderItemId === li.orderItemId)) ?? [], + selectedListItems: + state.selectedListItems?.filter((li) => !listItems.some((l) => l.orderItemId === li.orderItemId)) ?? [], })); resetSelectedListItems = this.updater((state) => ({ ...state, selectedListItems: [] })); @@ -178,7 +179,9 @@ export class PickupShelfStore extends ComponentStore implement switchMap(() => from(this.beforeFetchQuerySettings())), filter((shouldFetch) => shouldFetch), switchMap(() => - this._pickupShelfIOService.getQuerySettings().pipe(tapResponse(this.fetchQuerySettingsDone, this.fetchQuerySettingsError)), + this._pickupShelfIOService + .getQuerySettings() + .pipe(tapResponse(this.fetchQuerySettingsDone, this.fetchQuerySettingsError)), ), ), ); @@ -205,7 +208,10 @@ export class PickupShelfStore extends ComponentStore implement private fetchQuerySettingsDone = (resp: ResponseArgsOfQuerySettingsDTO) => { this.patchState({ fetchingQuerySettings: false, querySettings: resp.result }); - this._cacheService.set({ name: 'pickup-shelf', providerName: this._pickupShelfIOService.name() }, resp.result); + this._cacheService.set( + { name: 'pickup-shelf', providerName: this._pickupShelfIOService.name() }, + resp.result, + ); }; private fetchQuerySettingsError = (err: any) => { @@ -241,7 +247,8 @@ export class PickupShelfStore extends ComponentStore implement takeUntil(this._cancelListRequests), takeUntil(this._cancelSubject), tapResponse( - (res) => this.fetchListDone({ processId, queryParams: filter.getQueryParams(), emitFetchListResponse })(res), + (res) => + this.fetchListDone({ processId, queryParams: filter.getQueryParams(), emitFetchListResponse })(res), (err) => this.fetchListError(err), () => this.patchState({ fetchingList: false }), ), @@ -254,7 +261,10 @@ export class PickupShelfStore extends ComponentStore implement this.cancelListRequests(); this.patchState({ fetchingList: true }); const queryToken = filter.getQueryParams(); - const cachedListResponse = await this._cacheService.get({ processId, queryToken }); + const cachedListResponse = await this._cacheService.get({ + processId, + queryToken, + }); let list: DBHOrderItemListItemDTO[] = []; @@ -284,7 +294,10 @@ export class PickupShelfStore extends ComponentStore implement this._fetchListResponse.next({ processId, response, queryParams }); } - this._cacheService.set({ processId, queryToken: queryParams }, response); + this._cacheService.set( + { processId, queryToken: queryParams }, + response, + ); }; private fetchListError = (err: any) => { @@ -329,8 +342,14 @@ export class PickupShelfStore extends ComponentStore implement }; patchOrderItem = this.updater( - (state, { orderItemSubsetId, changes }: { orderItemSubsetId: number; changes: Partial }) => { - return { ...state, list: this.list.map((li) => (li.orderItemSubsetId === orderItemSubsetId ? { ...li, ...changes } : li)) }; + ( + state, + { orderItemSubsetId, changes }: { orderItemSubsetId: number; changes: Partial }, + ) => { + return { + ...state, + list: this.list.map((li) => (li.orderItemSubsetId === orderItemSubsetId ? { ...li, ...changes } : li)), + }; }, ); } diff --git a/apps/isa-app/src/page/remission/add-product/add-product.component.html b/apps/isa-app/src/page/remission/add-product/add-product.component.html index ae3ee0149..a3363f6d4 100644 --- a/apps/isa-app/src/page/remission/add-product/add-product.component.html +++ b/apps/isa-app/src/page/remission/add-product/add-product.component.html @@ -1,8 +1,10 @@

Artikel hinzufügen

- Geben Sie die ISBN/EAN ein oder
- öffnen Sie einen externen Scanner
+ Geben Sie die ISBN/EAN ein oder +
+ öffnen Sie einen externen Scanner +
um den Artikel hinzuzufügen.

diff --git a/apps/isa-app/src/page/remission/add-product/add-product.component.ts b/apps/isa-app/src/page/remission/add-product/add-product.component.ts index 7045a83d9..8a2672acc 100644 --- a/apps/isa-app/src/page/remission/add-product/add-product.component.ts +++ b/apps/isa-app/src/page/remission/add-product/add-product.component.ts @@ -80,7 +80,10 @@ export class AddProductComponent implements OnInit, OnDestroy { modal.afterClosed$.pipe(takeUntil(this._onDestroy)).subscribe((result) => { if (result.data) { this._remissionListStore._triggerReload$.next(true); - this._router.navigate(['..', 'list'], { relativeTo: this._activatedRoute, queryParams: this.queryParams }); + this._router.navigate(['..', 'list'], { + relativeTo: this._activatedRoute, + queryParams: this.queryParams, + }); } }); } diff --git a/apps/isa-app/src/page/remission/create-remission/create-remission.component.html b/apps/isa-app/src/page/remission/create-remission/create-remission.component.html index d98171fa2..635773f34 100644 --- a/apps/isa-app/src/page/remission/create-remission/create-remission.component.html +++ b/apps/isa-app/src/page/remission/create-remission/create-remission.component.html @@ -2,13 +2,15 @@

Warenbegleitschein eröffnen

- Um einen Warenbegleitschein zu
+ Um einen Warenbegleitschein zu +
eröffnen, - scannen Sie die Packstück-ID
+ scannen Sie die Packstück-ID +
oder lassen Sie diese automatisch generieren.
- lassen Sie diesen automatisch generieren. + lassen Sie diesen automatisch generieren.

diff --git a/apps/isa-app/src/page/remission/create-remission/create-remission.component.ts b/apps/isa-app/src/page/remission/create-remission/create-remission.component.ts index 10ab893a7..e86c9a9df 100644 --- a/apps/isa-app/src/page/remission/create-remission/create-remission.component.ts +++ b/apps/isa-app/src/page/remission/create-remission/create-remission.component.ts @@ -27,7 +27,9 @@ export class CreateRemissionComponent implements OnInit { hint$ = new Subject(); get supplierId(): number { - return this._activatedRoute?.snapshot?.queryParams?.supplier ? +this._activatedRoute?.snapshot?.queryParams?.supplier : 2; // Set Supplier Blank as Default + return this._activatedRoute?.snapshot?.queryParams?.supplier + ? +this._activatedRoute?.snapshot?.queryParams?.supplier + : 2; // Set Supplier Blank as Default } get source(): string { diff --git a/apps/isa-app/src/page/remission/finish-remission/finish-remission.component.html b/apps/isa-app/src/page/remission/finish-remission/finish-remission.component.html index cd9a0b76b..5e83e9571 100644 --- a/apps/isa-app/src/page/remission/finish-remission/finish-remission.component.html +++ b/apps/isa-app/src/page/remission/finish-remission/finish-remission.component.html @@ -7,8 +7,19 @@

Wanne abgeschlossen

- Legen Sie abschließend den "Blank
Beizettel" in die abgeschlossene
Wanne. Der Warenbegleitschein
wird nach Abschluss - der
Remission versendet. Zum Öffnen
eines neuen Warenbegleitscheins
setzen Sie die Remission fort. + Legen Sie abschließend den "Blank +
+ Beizettel" in die abgeschlossene +
+ Wanne. Der Warenbegleitschein +
+ wird nach Abschluss der +
+ Remission versendet. Zum Öffnen +
+ eines neuen Warenbegleitscheins +
+ setzen Sie die Remission fort.

diff --git a/apps/isa-app/src/page/remission/finish-shipping-document/finish-shipping-document.component.html b/apps/isa-app/src/page/remission/finish-shipping-document/finish-shipping-document.component.html index 2c7e9e81e..922292e2a 100644 --- a/apps/isa-app/src/page/remission/finish-shipping-document/finish-shipping-document.component.html +++ b/apps/isa-app/src/page/remission/finish-shipping-document/finish-shipping-document.component.html @@ -1,6 +1,12 @@

Wannennummer scannen

-

Scannen Sie die Wannennummer
um den Warenbegleitschein
der Wanne zuordnen zu können.

+

+ Scannen Sie die Wannennummer +
+ um den Warenbegleitschein +
+ der Wanne zuordnen zu können. +

{{ title }}

- {{ item.product.productGroup }}:{{ item.product.productGroup | productGroup }} + + {{ item.product.productGroup }}:{{ item.product.productGroup | productGroup }} +
@@ -27,8 +27,8 @@ {{ assortment.key }} - {{ assortment.label }} + + {{ assortment.label }}
diff --git a/apps/isa-app/src/page/remission/modals/add-product-to-shipping-document-modal/add-product-to-shipping-document-modal.component.ts b/apps/isa-app/src/page/remission/modals/add-product-to-shipping-document-modal/add-product-to-shipping-document-modal.component.ts index eecc9d1ad..509231f59 100644 --- a/apps/isa-app/src/page/remission/modals/add-product-to-shipping-document-modal/add-product-to-shipping-document-modal.component.ts +++ b/apps/isa-app/src/page/remission/modals/add-product-to-shipping-document-modal/add-product-to-shipping-document-modal.component.ts @@ -21,7 +21,9 @@ export class AddProductToShippingDocumentModalComponent implements OnInit { remissionPlacementTypes: RemissionPlacementType[] = ['Stapel', 'Leistung']; form: UntypedFormGroup; - constructor(private _modalRef: UiModalRef<{ action: string; quantity?: number; placementType?: RemissionPlacementType }>) {} + constructor( + private _modalRef: UiModalRef<{ action: string; quantity?: number; placementType?: RemissionPlacementType }>, + ) {} ngOnInit() { this.form = new UntypedFormGroup({ @@ -38,7 +40,11 @@ export class AddProductToShippingDocumentModalComponent implements OnInit { if (this.form.value.quantity == 0) { this.notFound(); } else { - this._modalRef.close({ action: 'remit', quantity: this.form.value.quantity, placementType: this.form.value.placementType }); + this._modalRef.close({ + action: 'remit', + quantity: this.form.value.quantity, + placementType: this.form.value.placementType, + }); } } } diff --git a/apps/isa-app/src/page/remission/modals/add-product-to-shipping-document-modal/add-product-to-shipping-document-modal.module.ts b/apps/isa-app/src/page/remission/modals/add-product-to-shipping-document-modal/add-product-to-shipping-document-modal.module.ts index 218a90736..6e64f575d 100644 --- a/apps/isa-app/src/page/remission/modals/add-product-to-shipping-document-modal/add-product-to-shipping-document-modal.module.ts +++ b/apps/isa-app/src/page/remission/modals/add-product-to-shipping-document-modal/add-product-to-shipping-document-modal.module.ts @@ -8,7 +8,15 @@ import { UiSelectModule } from '@ui/select'; import { AddProductToShippingDocumentModalComponent } from './add-product-to-shipping-document-modal.component'; @NgModule({ - imports: [CommonModule, UiCommonModule, UiSelectModule, UiInputModule, UiFormControlModule, FormsModule, ReactiveFormsModule], + imports: [ + CommonModule, + UiCommonModule, + UiSelectModule, + UiInputModule, + UiFormControlModule, + FormsModule, + ReactiveFormsModule, + ], exports: [AddProductToShippingDocumentModalComponent], declarations: [AddProductToShippingDocumentModalComponent], providers: [], diff --git a/apps/isa-app/src/page/remission/remission-list/remission-list-item/remission-list-item.component.html b/apps/isa-app/src/page/remission/remission-list/remission-list-item/remission-list-item.component.html index 608c1fd65..f8eb52857 100644 --- a/apps/isa-app/src/page/remission/remission-list/remission-list-item/remission-list-item.component.html +++ b/apps/isa-app/src/page/remission/remission-list/remission-list-item/remission-list-item.component.html @@ -14,9 +14,9 @@
- {{ item?.dto?.impediment?.comment ? item?.dto?.impediment?.comment : 'Restmenge' }} - ({{ item?.dto?.impediment?.attempts }}) + + {{ item?.dto?.impediment?.comment ? item?.dto?.impediment?.comment : 'Restmenge' }} + ({{ item?.dto?.impediment?.attempts }})
@@ -51,8 +51,8 @@ {{ assortment.key }} - {{ assortment.label }} + + {{ assortment.label }}
diff --git a/apps/isa-app/src/page/remission/remission-list/remission-list-item/remission-list-item.component.scss b/apps/isa-app/src/page/remission/remission-list/remission-list-item/remission-list-item.component.scss index 9b32521e3..d514e8769 100644 --- a/apps/isa-app/src/page/remission/remission-list/remission-list-item/remission-list-item.component.scss +++ b/apps/isa-app/src/page/remission/remission-list/remission-list-item/remission-list-item.component.scss @@ -8,8 +8,8 @@ grid-template-columns: auto auto; grid-template-rows: auto; grid-template-areas: - 'contributors product-group' - 'title department'; + "contributors product-group" + "title department"; } .contributors { diff --git a/apps/isa-app/src/page/remission/remission-list/remission-list-item/remission-list-item.component.ts b/apps/isa-app/src/page/remission/remission-list/remission-list-item/remission-list-item.component.ts index e9af2ddc2..57b3d07fb 100644 --- a/apps/isa-app/src/page/remission/remission-list/remission-list-item/remission-list-item.component.ts +++ b/apps/isa-app/src/page/remission/remission-list/remission-list-item/remission-list-item.component.ts @@ -49,7 +49,9 @@ export class RemissionListItemComponent implements OnDestroy { } get enableChangeRemissionQuantity() { - return this.enableToRemit ? this.item.inStock > 0 && this.item.remissionQuantity > 0 : this.item.remissionQuantity > 0; + return this.enableToRemit + ? this.item.inStock > 0 && this.item.remissionQuantity > 0 + : this.item.remissionQuantity > 0; } get showImpediment() { @@ -98,7 +100,8 @@ export class RemissionListItemComponent implements OnDestroy { quantity: result.data.quantity, placementType: result.data.placementType, impedimentComment: this.item.remissionQuantity > result.data.quantity ? 'Restmenge' : '', - remainingQuantity: this.item.inStock - result.data.quantity <= 0 ? null : this.item.inStock - result.data.quantity, + remainingQuantity: + this.item.inStock - result.data.quantity <= 0 ? null : this.item.inStock - result.data.quantity, }); } else if (result?.data?.action === 'notFound') { this.returnImpediment(); @@ -183,7 +186,10 @@ export class RemissionListItemComponent implements OnDestroy { const items = await this._store.items$.pipe(first()).toPromise(); const itemsByEan = items?.filter( - (i) => i.dto.product.ean === this.item.dto.product.ean && i.dto.id !== this.item.dto.id && i.placementType === 'Stapel', + (i) => + i.dto.product.ean === this.item.dto.product.ean && + i.dto.id !== this.item.dto.id && + i.placementType === 'Stapel', ); if (itemsByEan?.length > 0) { diff --git a/apps/isa-app/src/page/remission/remission-list/remission-list.component-store.ts b/apps/isa-app/src/page/remission/remission-list/remission-list.component-store.ts index 4627e0310..73da9dbc1 100644 --- a/apps/isa-app/src/page/remission/remission-list/remission-list.component-store.ts +++ b/apps/isa-app/src/page/remission/remission-list/remission-list.component-store.ts @@ -244,7 +244,9 @@ export class RemissionListComponentStore extends ComponentStore tapResponse( (settings) => { // Filtergruppen ausblenden, wenn keine Werte innerhalb des Filters für die Anzeige vorhanden sind - settings?.filter?.forEach((filter) => (filter.input = filter.input?.filter((input) => input.options?.values?.length > 0))); + settings?.filter?.forEach( + (filter) => (filter.input = filter.input?.filter((input) => input.options?.values?.length > 0)), + ); const filter = UiFilter.create(settings); @@ -274,7 +276,9 @@ export class RemissionListComponentStore extends ComponentStore options$.pipe( withLatestFrom(this.filter$, this.selectedSource$, this.selectedSupplier$, this.searchOptions$, this.items$), filter(([, filter, source, supplier]) => !!supplier?.id && !!source && !!filter), - filter(([, filter, source]) => (source === 'Abteilungsremission' ? !!filter.getQueryToken().filter.abteilungen : true)), + filter(([, filter, source]) => + source === 'Abteilungsremission' ? !!filter.getQueryToken().filter.abteilungen : true, + ), tap(([options]) => { this.setFetching(true); options?.newSearch ? this.setSearchResult({ result: [], hits: 0 }) : null; @@ -387,7 +391,8 @@ export class RemissionListComponentStore extends ComponentStore ...state, filter, pflichtQueryParams: this.selectedSource === 'Pflichtremission' ? filter.getQueryParams() : this.pflichtQueryParams, - abteilungQueryParams: this.selectedSource === 'Abteilungsremission' ? filter.getQueryParams() : this.abteilungQueryParams, + abteilungQueryParams: + this.selectedSource === 'Abteilungsremission' ? filter.getQueryParams() : this.abteilungQueryParams, })); setItems = this.updater((state, items) => ({ @@ -482,7 +487,8 @@ export class RemissionListComponentStore extends ComponentStore this.setSearchResult({ result: [], hits: 0 }); this.clearCache(); - const queryParams = this.selectedSource === 'Abteilungsremission' ? this.pflichtQueryParams : this.abteilungQueryParams; + const queryParams = + this.selectedSource === 'Abteilungsremission' ? this.pflichtQueryParams : this.abteilungQueryParams; await this._router.navigate([], { queryParams: { ...queryParams, @@ -502,7 +508,8 @@ export class RemissionListComponentStore extends ComponentStore this.clearCache(); // Damit beim Wechsel der Filter korrekt wiederhergestellt wird, werden die QueryParams im Store gemerkt und beim navigieren übergeben - const queryParams = this.selectedSource === 'Abteilungsremission' ? this.pflichtQueryParams : this.abteilungQueryParams; + const queryParams = + this.selectedSource === 'Abteilungsremission' ? this.pflichtQueryParams : this.abteilungQueryParams; await this._router.navigate([], { queryParams: { ...queryParams, diff --git a/apps/isa-app/src/page/remission/remission-list/remission-list.component.html b/apps/isa-app/src/page/remission/remission-list/remission-list.component.html index 6ffaf1c0e..c667215ce 100644 --- a/apps/isa-app/src/page/remission/remission-list/remission-list.component.html +++ b/apps/isa-app/src/page/remission/remission-list/remission-list.component.html @@ -25,7 +25,8 @@

- Wählen Sie den Bereich aus dem
+ Wählen Sie den Bereich aus dem +
Sie Artikel remittieren möchten.

@@ -67,7 +68,8 @@ [queryParams]="queryParams$ | async" routerLink="../shipping-documents" > - Warenbegleitscheine ({{ returnCount ?? 0 }}) + Warenbegleitscheine + ({{ returnCount ?? 0 }})

@@ -88,8 +90,8 @@ class="bg-white text-center font-semibold text-inactive-branch py-10 rounded" [ngSwitch]="showSelectDepartmenttext$ | async" > - Wählen Sie die Abteilung, aus der Sie remittieren möchten. - Es sind im Moment keine Artikel vorhanden + Wählen Sie die Abteilung, aus der Sie remittieren möchten. + Es sind im Moment keine Artikel vorhanden
diff --git a/apps/isa-app/src/page/remission/remission-list/remission-list.component.ts b/apps/isa-app/src/page/remission/remission-list/remission-list.component.ts index 1eae0f4a3..709edf12b 100644 --- a/apps/isa-app/src/page/remission/remission-list/remission-list.component.ts +++ b/apps/isa-app/src/page/remission/remission-list/remission-list.component.ts @@ -152,27 +152,29 @@ export class RemissionListComponent implements OnInit, OnDestroy { ) {} ngOnInit() { - this._activatedRoute.queryParams.pipe(takeUntil(this._onDestroy$), debounceTime(0)).subscribe(async (queryParams) => { - const { supplier, source } = queryParams; + this._activatedRoute.queryParams + .pipe(takeUntil(this._onDestroy$), debounceTime(0)) + .subscribe(async (queryParams) => { + const { supplier, source } = queryParams; - if (supplier) { - this._remissionListStore.setSelectedSupplierId(+supplier); - } + if (supplier) { + this._remissionListStore.setSelectedSupplierId(+supplier); + } - if (source) { - this._remissionListStore.setSelectedSource(source); - } + if (source) { + this._remissionListStore.setSelectedSource(source); + } - const data = await this._remissionListStore.getCachedData(); - if (data.items?.length !== 0) { - this._remissionListStore.setItems(data.items); - this._remissionListStore.setHits(data.hits); - this.scrollTop(Number(queryParams?.scroll_position ?? 0)); - } + const data = await this._remissionListStore.getCachedData(); + if (data.items?.length !== 0) { + this._remissionListStore.setItems(data.items); + this._remissionListStore.setHits(data.hits); + this.scrollTop(Number(queryParams?.scroll_position ?? 0)); + } - await this.updateBreadcrumb(queryParams); - await this.removeBreadcrumbs(); - }); + await this.updateBreadcrumb(queryParams); + await this.removeBreadcrumbs(); + }); this._remissionListStore.filter$ .pipe(takeUntil(this._onDestroy$), withLatestFrom(this._remissionListStore.selectedSource$)) @@ -273,11 +275,23 @@ export class RemissionListComponent implements OnInit, OnDestroy { } async removeBreadcrumbs() { - await this._breadcrumb.removeBreadcrumbsByKeyAndTags(this._remissionListStore.processId, ['remission', 'shipping-documents']); - await this._breadcrumb.removeBreadcrumbsByKeyAndTags(this._remissionListStore.processId, ['remission', 'add-product']); + await this._breadcrumb.removeBreadcrumbsByKeyAndTags(this._remissionListStore.processId, [ + 'remission', + 'shipping-documents', + ]); + await this._breadcrumb.removeBreadcrumbsByKeyAndTags(this._remissionListStore.processId, [ + 'remission', + 'add-product', + ]); await this._breadcrumb.removeBreadcrumbsByKeyAndTags(this._remissionListStore.processId, ['remission', 'create']); - await this._breadcrumb.removeBreadcrumbsByKeyAndTags(this._remissionListStore.processId, ['remission', 'finish-shipping-document']); - await this._breadcrumb.removeBreadcrumbsByKeyAndTags(this._remissionListStore.processId, ['remission', 'finish-remission']); + await this._breadcrumb.removeBreadcrumbsByKeyAndTags(this._remissionListStore.processId, [ + 'remission', + 'finish-shipping-document', + ]); + await this._breadcrumb.removeBreadcrumbsByKeyAndTags(this._remissionListStore.processId, [ + 'remission', + 'finish-remission', + ]); } shippingDocumentDeleted() { diff --git a/apps/isa-app/src/page/remission/remission.component.html b/apps/isa-app/src/page/remission/remission.component.html index e699649a1..b40a286a9 100644 --- a/apps/isa-app/src/page/remission/remission.component.html +++ b/apps/isa-app/src/page/remission/remission.component.html @@ -1 +1,2 @@ - + + diff --git a/apps/isa-app/src/page/remission/shared/shipping-document-details/shipping-document-details-item/shipping-document-details-item.component.html b/apps/isa-app/src/page/remission/shared/shipping-document-details/shipping-document-details-item/shipping-document-details-item.component.html index b2e637cc6..87204a093 100644 --- a/apps/isa-app/src/page/remission/shared/shipping-document-details/shipping-document-details-item/shipping-document-details-item.component.html +++ b/apps/isa-app/src/page/remission/shared/shipping-document-details/shipping-document-details-item/shipping-document-details-item.component.html @@ -12,9 +12,9 @@

{{ title }}

- {{ item.product.productGroup }}:{{ item.product.productGroup | productGroup }} + + {{ item.product.productGroup }}:{{ item.product.productGroup | productGroup }} +
Remi-Menge
@@ -22,7 +22,7 @@
diff --git a/apps/isa-app/src/page/remission/shared/shipping-document-details/shipping-document-details.component.html b/apps/isa-app/src/page/remission/shared/shipping-document-details/shipping-document-details.component.html index 5e1b32796..902f6c74a 100644 --- a/apps/isa-app/src/page/remission/shared/shipping-document-details/shipping-document-details.component.html +++ b/apps/isa-app/src/page/remission/shared/shipping-document-details/shipping-document-details.component.html @@ -58,8 +58,7 @@ [canRemoveItem]="canRemoveItems" [loading]="loading" (removeItem)="removeItem($event)" - > - + >
diff --git a/apps/isa-app/src/page/remission/shared/shipping-document-details/shipping-document-details.component.ts b/apps/isa-app/src/page/remission/shared/shipping-document-details/shipping-document-details.component.ts index e19a06171..fd4e3e5a2 100644 --- a/apps/isa-app/src/page/remission/shared/shipping-document-details/shipping-document-details.component.ts +++ b/apps/isa-app/src/page/remission/shared/shipping-document-details/shipping-document-details.component.ts @@ -69,7 +69,11 @@ export class SharedShippingDocumentDetailsComponent { await this._remissionService.deleteReturn(this.return.id); this.deleted.emit(this.return); } catch (err) { - this._modal.open({ content: UiErrorModalComponent, title: 'Fehler beim Löschen des Warenbegleitscheins', data: err }); + this._modal.open({ + content: UiErrorModalComponent, + title: 'Fehler beim Löschen des Warenbegleitscheins', + data: err, + }); } } diff --git a/apps/isa-app/src/page/remission/shipping-document-list/shipping-document-details/shipping-document-details.component.html b/apps/isa-app/src/page/remission/shipping-document-list/shipping-document-details/shipping-document-details.component.html index d45c74d01..bcd1d775b 100644 --- a/apps/isa-app/src/page/remission/shipping-document-list/shipping-document-details/shipping-document-details.component.html +++ b/apps/isa-app/src/page/remission/shipping-document-list/shipping-document-details/shipping-document-details.component.html @@ -9,8 +9,10 @@

- Bitte prüfen Sie, ob die Artikel in der Wanne
- mit den Titeln auf dem Warenbegleitschein
+ Bitte prüfen Sie, ob die Artikel in der Wanne +
+ mit den Titeln auf dem Warenbegleitschein +
identisch sind.

diff --git a/apps/isa-app/src/page/remission/shipping-document-list/shipping-document-details/shipping-document-details.component.ts b/apps/isa-app/src/page/remission/shipping-document-list/shipping-document-details/shipping-document-details.component.ts index b4ca7b59a..4d662c888 100644 --- a/apps/isa-app/src/page/remission/shipping-document-list/shipping-document-details/shipping-document-details.component.ts +++ b/apps/isa-app/src/page/remission/shipping-document-list/shipping-document-details/shipping-document-details.component.ts @@ -115,7 +115,9 @@ export class ShippingDocumentDetailsComponent extends ComponentStore returnDto?.id)); - this.hasItems$ = this.return$.pipe(map((returnDto) => returnDto?.receipts?.find((_) => true)?.data?.items?.length > 0)); + this.hasItems$ = this.return$.pipe( + map((returnDto) => returnDto?.receipts?.find((_) => true)?.data?.items?.length > 0), + ); } removeBreadcrumbs() { @@ -260,7 +262,11 @@ export class ShippingDocumentDetailsComponent extends ComponentStore - params?.id ? this.patchState({ remissionStarted: false }) : params?.returnId ? this.patchState({ remissionStarted: true }) : '', + params?.id + ? this.patchState({ remissionStarted: false }) + : params?.returnId + ? this.patchState({ remissionStarted: true }) + : '', ), map(([_, params]) => params?.id ?? params?.returnId), filter((id) => !!id), @@ -269,7 +275,9 @@ export class ShippingDocumentDetailsComponent extends ComponentStore { const firstReceipt = r?.receipts?.find((_) => true)?.data; const packageNumber = - firstReceipt?.packages?.find((_) => true)?.data?.packageNumber ?? this._activatedRoute?.snapshot?.params?.packageNumber ?? ''; + firstReceipt?.packages?.find((_) => true)?.data?.packageNumber ?? + this._activatedRoute?.snapshot?.params?.packageNumber ?? + ''; this.setPackageNumber(packageNumber); this.setReturn(r); diff --git a/apps/isa-app/src/page/remission/shipping-document-list/shipping-document-list.component.ts b/apps/isa-app/src/page/remission/shipping-document-list/shipping-document-list.component.ts index 7eec44adb..248f0f912 100644 --- a/apps/isa-app/src/page/remission/shipping-document-list/shipping-document-list.component.ts +++ b/apps/isa-app/src/page/remission/shipping-document-list/shipping-document-list.component.ts @@ -31,7 +31,10 @@ export class ShippingDocumentListComponent implements OnInit { this.removeDetailBreadcrumbs(); this.returns$ = combineLatest([ this._remissionService.getReturns({ returncompleted: false }), - this._remissionService.getReturns({ returncompleted: true, start: this._dateAdapter.addCalendarDays(new Date(), -7) }), + this._remissionService.getReturns({ + returncompleted: true, + start: this._dateAdapter.addCalendarDays(new Date(), -7), + }), ]).pipe( map(([returns, returnsLastWeek]) => { return [...returns, ...returnsLastWeek]; diff --git a/apps/isa-app/src/page/task-calendar/components/task-info/task-info.component.ts b/apps/isa-app/src/page/task-calendar/components/task-info/task-info.component.ts index c81a1c571..0b15b2d96 100644 --- a/apps/isa-app/src/page/task-calendar/components/task-info/task-info.component.ts +++ b/apps/isa-app/src/page/task-calendar/components/task-info/task-info.component.ts @@ -97,7 +97,9 @@ export class TaskInfoComponent implements OnChanges { teaser$ = this.info$.pipe( filter((info) => !isNullOrUndefined(info)), - switchMap((info) => this.domainTaskCalendarService.getTeaserFile({ infoId: info.id }).pipe(catchError((error) => [undefined]))), + switchMap((info) => + this.domainTaskCalendarService.getTeaserFile({ infoId: info.id }).pipe(catchError((error) => [undefined])), + ), ); attachments$ = this.info$.pipe( @@ -131,7 +133,8 @@ export class TaskInfoComponent implements OnChanges { showUpdateComment$ = combineLatest([this.info$, this.processingStatus$]).pipe( map( - ([info, processingStatus]) => !!info.updateComment && ((info.successor && processingStatus.includes('Removed')) || info.predecessor), + ([info, processingStatus]) => + !!info.updateComment && ((info.successor && processingStatus.includes('Removed')) || info.predecessor), ), ); diff --git a/apps/isa-app/src/page/task-calendar/components/task-list/pipes/filter-status.pipe.ts b/apps/isa-app/src/page/task-calendar/components/task-list/pipes/filter-status.pipe.ts index ea95d4446..fea01bd21 100644 --- a/apps/isa-app/src/page/task-calendar/components/task-list/pipes/filter-status.pipe.ts +++ b/apps/isa-app/src/page/task-calendar/components/task-list/pipes/filter-status.pipe.ts @@ -9,7 +9,11 @@ import { DisplayInfoDTO } from '@generated/swagger/eis-api'; export class FilterStatusPipe implements PipeTransform { constructor(private domainTaskCalendarService: DomainTaskCalendarService) {} - transform(items: DisplayInfoDTO[], includes: ProcessingStatusList = [], excludes: ProcessingStatusList = []): DisplayInfoDTO[] { + transform( + items: DisplayInfoDTO[], + includes: ProcessingStatusList = [], + excludes: ProcessingStatusList = [], + ): DisplayInfoDTO[] { return items?.filter((item) => { const processingStatus = this.domainTaskCalendarService.getProcessingStatusList(item); let isIncluded = false; diff --git a/apps/isa-app/src/page/task-calendar/components/task-list/task-list-group.component.html b/apps/isa-app/src/page/task-calendar/components/task-list/task-list-group.component.html index 8b4c5c6db..4f7d98a13 100644 --- a/apps/isa-app/src/page/task-calendar/components/task-list/task-list-group.component.html +++ b/apps/isa-app/src/page/task-calendar/components/task-list/task-list-group.component.html @@ -4,7 +4,7 @@
- {{ items?.length }} Aufgaben und Infos + {{ items?.length }} Aufgaben und Infos

diff --git a/apps/isa-app/src/page/task-calendar/components/task-list/task-list-item.component.html b/apps/isa-app/src/page/task-calendar/components/task-list/task-list-item.component.html index 2616933d0..555b046af 100644 --- a/apps/isa-app/src/page/task-calendar/components/task-list/task-list-item.component.html +++ b/apps/isa-app/src/page/task-calendar/components/task-list/task-list-item.component.html @@ -10,8 +10,8 @@
- {{ item?.timeFrom | date: 'HH:mm' }} - {{ item?.timeTo | date: 'HH:mm' }} - Ganztägig + {{ item?.timeFrom | date: 'HH:mm' }} - {{ item?.timeTo | date: 'HH:mm' }} + Ganztägig diff --git a/apps/isa-app/src/page/task-calendar/components/task-list/task-list-item.component.ts b/apps/isa-app/src/page/task-calendar/components/task-list/task-list-item.component.ts index f40c3338a..d9138a586 100644 --- a/apps/isa-app/src/page/task-calendar/components/task-list/task-list-item.component.ts +++ b/apps/isa-app/src/page/task-calendar/components/task-list/task-list-item.component.ts @@ -35,7 +35,9 @@ export class TaskListItemComponent implements OnChanges { hasComments$ = this.item$.pipe(map((item) => item.comments > 0)); - hasIcon$ = combineLatest([this.isInfoOrPreInfo$, this.hasComments$]).pipe(map(([infoOrPreInfo, comments]) => infoOrPreInfo || comments)); + hasIcon$ = combineLatest([this.isInfoOrPreInfo$, this.hasComments$]).pipe( + map(([infoOrPreInfo, comments]) => infoOrPreInfo || comments), + ); indicatorColor$ = this.item$.pipe(map((item) => this.domainTaskCalendarService.getProcessingStatusColorCode(item))); diff --git a/apps/isa-app/src/page/task-calendar/components/task-list/task-list.component.ts b/apps/isa-app/src/page/task-calendar/components/task-list/task-list.component.ts index f6fc9d7ff..be77361bb 100644 --- a/apps/isa-app/src/page/task-calendar/components/task-list/task-list.component.ts +++ b/apps/isa-app/src/page/task-calendar/components/task-list/task-list.component.ts @@ -54,7 +54,9 @@ export class TaskListComponent { } } - isToday$ = this.selected$.pipe(map((selected) => this.dateAdapter.equals({ first: selected, second: this.today, precision: 'day' }))); + isToday$ = this.selected$.pipe( + map((selected) => this.dateAdapter.equals({ first: selected, second: this.today, precision: 'day' })), + ); overdueItems$ = combineLatest([this.items$, this.selected$]).pipe( map(([items, selectedDate]) => { @@ -72,7 +74,11 @@ export class TaskListComponent { map(([list, date]) => list.filter((item) => !!item?.successor - ? this.dateAdapter.equals({ first: new Date(item.publicationDate || item.taskDate), second: date, precision: 'day' }) + ? this.dateAdapter.equals({ + first: new Date(item.publicationDate || item.taskDate), + second: date, + precision: 'day', + }) : item, ), ), @@ -107,11 +113,17 @@ export class TaskListComponent { map(([list, date]) => list.filter((item) => !!item?.successor - ? this.dateAdapter.equals({ first: new Date(item.publicationDate || item.taskDate), second: date, precision: 'day' }) + ? this.dateAdapter.equals({ + first: new Date(item.publicationDate || item.taskDate), + second: date, + precision: 'day', + }) : item, ), ), - map((list) => this.domainTaskCalendarService.sort(list, ['Overdue', 'InProcess', 'Approved', 'Completed', 'Removed'])), + map((list) => + this.domainTaskCalendarService.sort(list, ['Overdue', 'InProcess', 'Approved', 'Completed', 'Removed']), + ), map((list) => list.sort((a, b) => this.domainTaskCalendarService.moveRemovedToEnd(a, b))), ); @@ -133,11 +145,15 @@ export class TaskListComponent { withLatestFrom(this.selected$), map(([list, date]) => list.filter((item) => - !!item?.successor ? this.dateAdapter.equals({ first: new Date(item.publicationDate), second: date, precision: 'day' }) : item, + !!item?.successor + ? this.dateAdapter.equals({ first: new Date(item.publicationDate), second: date, precision: 'day' }) + : item, ), ), // Sortierung der aufgaben nach Rot => Gelb => Grau => Grün - map((list) => this.domainTaskCalendarService.sort(list, ['Overdue', 'InProcess', 'Approved', 'Completed', 'Removed'])), + map((list) => + this.domainTaskCalendarService.sort(list, ['Overdue', 'InProcess', 'Approved', 'Completed', 'Removed']), + ), map((list) => list.sort((a, b) => this.domainTaskCalendarService.moveRemovedToEnd(a, b))), ); diff --git a/apps/isa-app/src/page/task-calendar/components/task-list/task-list.module.ts b/apps/isa-app/src/page/task-calendar/components/task-list/task-list.module.ts index f2aad9adf..f8fe2f03c 100644 --- a/apps/isa-app/src/page/task-calendar/components/task-list/task-list.module.ts +++ b/apps/isa-app/src/page/task-calendar/components/task-list/task-list.module.ts @@ -13,7 +13,15 @@ import { UiSpinnerModule } from '@ui/spinner'; import { UiScrollContainerModule } from '@ui/scroll-container'; @NgModule({ - imports: [CommonModule, UiCommonModule, UiSpinnerModule, UiTshirtModule, UiIconModule, RouterModule, UiScrollContainerModule], + imports: [ + CommonModule, + UiCommonModule, + UiSpinnerModule, + UiTshirtModule, + UiIconModule, + RouterModule, + UiScrollContainerModule, + ], exports: [TaskListComponent, TaskListGroupComponent, TaskListItemComponent], declarations: [TaskListComponent, TaskListGroupComponent, TaskListItemComponent, FilterStatusPipe, FilterTypePipe], }) diff --git a/apps/isa-app/src/page/task-calendar/components/task-searchbar/task-searchbar.component.ts b/apps/isa-app/src/page/task-calendar/components/task-searchbar/task-searchbar.component.ts index f7b56024b..56f4dd72a 100644 --- a/apps/isa-app/src/page/task-calendar/components/task-searchbar/task-searchbar.component.ts +++ b/apps/isa-app/src/page/task-calendar/components/task-searchbar/task-searchbar.component.ts @@ -95,7 +95,9 @@ export class TaskSearchbarComponent implements OnInit, OnDestroy { } updateBreadcrumbs(params?: Params) { - this._breadcrumb.patchBreadcrumbByKeyAndTags(this._config.get('process.ids.taskCalendar'), ['task-calendar'], { params }); + this._breadcrumb.patchBreadcrumbByKeyAndTags(this._config.get('process.ids.taskCalendar'), ['task-calendar'], { + params, + }); } navigate(uri: string, queryParams?: Params) { diff --git a/apps/isa-app/src/page/task-calendar/containers/task-calendar-filter/task-calendar-filter.component.html b/apps/isa-app/src/page/task-calendar/containers/task-calendar-filter/task-calendar-filter.component.html index 874cd19dd..66cb02c3f 100644 --- a/apps/isa-app/src/page/task-calendar/containers/task-calendar-filter/task-calendar-filter.component.html +++ b/apps/isa-app/src/page/task-calendar/containers/task-calendar-filter/task-calendar-filter.component.html @@ -16,11 +16,11 @@
diff --git a/apps/isa-app/src/page/task-calendar/containers/task-calendar-filter/task-calendar-filter.component.ts b/apps/isa-app/src/page/task-calendar/containers/task-calendar-filter/task-calendar-filter.component.ts index 125cc950a..b10a7eaaa 100644 --- a/apps/isa-app/src/page/task-calendar/containers/task-calendar-filter/task-calendar-filter.component.ts +++ b/apps/isa-app/src/page/task-calendar/containers/task-calendar-filter/task-calendar-filter.component.ts @@ -52,7 +52,9 @@ export class TaskCalendarFilterComponent implements OnInit, OnDestroy { } updateBreadcrumbs(params?: Params) { - this._breadcrumb.patchBreadcrumbByKeyAndTags(this._config.get('process.ids.taskCalendar'), ['task-calendar'], { params }); + this._breadcrumb.patchBreadcrumbByKeyAndTags(this._config.get('process.ids.taskCalendar'), ['task-calendar'], { + params, + }); } async applyFilter(filters: UiFilter) { diff --git a/apps/isa-app/src/page/task-calendar/modals/article-list/article-list-details/article-list-details.component.html b/apps/isa-app/src/page/task-calendar/modals/article-list/article-list-details/article-list-details.component.html index 11812bfd0..2d386272f 100644 --- a/apps/isa-app/src/page/task-calendar/modals/article-list/article-list-details/article-list-details.component.html +++ b/apps/isa-app/src/page/task-calendar/modals/article-list/article-list-details/article-list-details.component.html @@ -6,7 +6,8 @@ {{ article?.text }}

diff --git a/apps/isa-app/src/page/task-calendar/modals/article-list/article-list-modal.component.html b/apps/isa-app/src/page/task-calendar/modals/article-list/article-list-modal.component.html index 1be403055..28581368c 100644 --- a/apps/isa-app/src/page/task-calendar/modals/article-list/article-list-modal.component.html +++ b/apps/isa-app/src/page/task-calendar/modals/article-list/article-list-modal.component.html @@ -7,7 +7,8 @@

{{ article?.text | trim: 50 }}

diff --git a/apps/isa-app/src/page/task-calendar/modals/article-list/article-list-modal.component.ts b/apps/isa-app/src/page/task-calendar/modals/article-list/article-list-modal.component.ts index b1b58de3f..b6907e0e4 100644 --- a/apps/isa-app/src/page/task-calendar/modals/article-list/article-list-modal.component.ts +++ b/apps/isa-app/src/page/task-calendar/modals/article-list/article-list-modal.component.ts @@ -19,7 +19,9 @@ import { ProductCatalogNavigationService } from '@shared/services/navigation'; export class ArticleListModalComponent { productCatalogNavigationService = inject(ProductCatalogNavigationService); - articles$ = this.domainTaskCalendarService.getArticles({ infoId: this.modalRef.data.id }).pipe(map((response) => response.result)); + articles$ = this.domainTaskCalendarService + .getArticles({ infoId: this.modalRef.data.id }) + .pipe(map((response) => response.result)); expandedArticle: ArticleDTO; constructor( @@ -43,7 +45,9 @@ export class ArticleListModalComponent { data: { printerType: 'Office', print: (printer) => - this.domainPrinterService.printDisplayInfoDTOArticles({ articles, printer, title: `${this.modalRef.data.title}` }).toPromise(), + this.domainPrinterService + .printDisplayInfoDTOArticles({ articles, printer, title: `${this.modalRef.data.title}` }) + .toPromise(), } as PrintModalData, config: { panelClass: [], @@ -62,7 +66,10 @@ export class ArticleListModalComponent { const articles = await this.articles$.toPromise(); const taskCalendarSearch: string = articles.map((article: ArticleDTO) => article.ean).join(';'); const lastActivatedProcessId = ( - await this._applicationService.getLastActivatedProcessWithSectionAndType$('customer', 'cart').pipe(first()).toPromise() + await this._applicationService + .getLastActivatedProcessWithSectionAndType$('customer', 'cart') + .pipe(first()) + .toPromise() )?.id; this.modalRef.close('closeAll'); diff --git a/apps/isa-app/src/page/task-calendar/modals/camera/camera-capture-modal.component.html b/apps/isa-app/src/page/task-calendar/modals/camera/camera-capture-modal.component.html index 23b9bf137..55047305c 100644 --- a/apps/isa-app/src/page/task-calendar/modals/camera/camera-capture-modal.component.html +++ b/apps/isa-app/src/page/task-calendar/modals/camera/camera-capture-modal.component.html @@ -6,6 +6,6 @@ diff --git a/apps/isa-app/src/page/task-calendar/modals/pdf-viewer/pdf-viewer-modal.component.ts b/apps/isa-app/src/page/task-calendar/modals/pdf-viewer/pdf-viewer-modal.component.ts index e9947e9cf..960bea85d 100644 --- a/apps/isa-app/src/page/task-calendar/modals/pdf-viewer/pdf-viewer-modal.component.ts +++ b/apps/isa-app/src/page/task-calendar/modals/pdf-viewer/pdf-viewer-modal.component.ts @@ -55,7 +55,9 @@ export class PdfViewerModalComponent { const data: PrintModalData = { printerType: 'Office', print: (printer) => - this.domainPrinterService.printPdf({ printer, data: this.taskCalendarService.removeMetaDataFromBase64(base64data) }).toPromise(), + this.domainPrinterService + .printPdf({ printer, data: this.taskCalendarService.removeMetaDataFromBase64(base64data) }) + .toPromise(), }; this.uiModal.open({ content: PrintModalComponent, diff --git a/apps/isa-app/src/page/task-calendar/modals/task/task-modal.component.html b/apps/isa-app/src/page/task-calendar/modals/task/task-modal.component.html index 9173435b2..ed0b81170 100644 --- a/apps/isa-app/src/page/task-calendar/modals/task/task-modal.component.html +++ b/apps/isa-app/src/page/task-calendar/modals/task/task-modal.component.html @@ -32,7 +32,11 @@
-
Bitte fotografieren Sie die Präsentation, um die
Aufgabe abschließen zu können
+
+ Bitte fotografieren Sie die Präsentation, um die +
+ Aufgabe abschließen zu können +
{ if (info.publicationDate && info.taskDate && info.taskOverdueDate) { - return this.dateAdapter.isLessThan({ first: this.dateAdapter.today(), second: new Date(info.taskDate), precision: 'day' }); + return this.dateAdapter.isLessThan({ + first: this.dateAdapter.today(), + second: new Date(info.taskDate), + precision: 'day', + }); } return this.dateAdapter.isLessThan({ first: this.dateAdapter.today(), @@ -66,9 +70,13 @@ export class TaskModalComponent { cameraPreview$ = this.info$.pipe( switchMap((info) => - this.domainTaskCalendarService.getConfirmationFiles({ infoId: info.id }).pipe(map((response) => response.result[0])), + this.domainTaskCalendarService + .getConfirmationFiles({ infoId: info.id }) + .pipe(map((response) => response.result[0])), + ), + switchMap((file) => + !isNullOrUndefined(file?.id) ? this.domainTaskCalendarService.getFile({ fileId: file.id }) : [undefined], ), - switchMap((file) => (!isNullOrUndefined(file?.id) ? this.domainTaskCalendarService.getFile({ fileId: file.id }) : [undefined])), ); showStartEditCta$ = this.processingStatus$.pipe( @@ -84,14 +92,18 @@ export class TaskModalComponent { showCompleteEditCta$ = combineLatest([this.processingStatus$, this.info$]).pipe( map( ([processingStatus, info]) => - processingStatus.includes('InProcess') && !info.requiresImageOnConfirmation && !processingStatus.includes('Removed'), + processingStatus.includes('InProcess') && + !info.requiresImageOnConfirmation && + !processingStatus.includes('Removed'), ), ); showCameraCta$ = combineLatest([this.processingStatus$, this.info$]).pipe( map( ([processingStatus, info]) => - processingStatus.includes('InProcess') && info.requiresImageOnConfirmation && !processingStatus.includes('Removed'), + processingStatus.includes('InProcess') && + info.requiresImageOnConfirmation && + !processingStatus.includes('Removed'), ), ); diff --git a/apps/isa-app/src/page/task-calendar/page-task-calendar.component.html b/apps/isa-app/src/page/task-calendar/page-task-calendar.component.html index 0f4f59c47..ac53d52c5 100644 --- a/apps/isa-app/src/page/task-calendar/page-task-calendar.component.html +++ b/apps/isa-app/src/page/task-calendar/page-task-calendar.component.html @@ -15,6 +15,8 @@
- - + diff --git a/apps/isa-app/src/page/task-calendar/page-task-calendar.component.ts b/apps/isa-app/src/page/task-calendar/page-task-calendar.component.ts index c79102779..e3d4d56b3 100644 --- a/apps/isa-app/src/page/task-calendar/page-task-calendar.component.ts +++ b/apps/isa-app/src/page/task-calendar/page-task-calendar.component.ts @@ -52,13 +52,15 @@ export class PageTaskCalendarComponent implements OnInit, OnDestroy { this.searchbar?.focus(); }); - this._activatedRoute.queryParams.pipe(takeUntil(this._onDestroy$), debounceTime(250)).subscribe(async (queryParams) => { - const filters = UiFilter.create(await this.taskCalendarStore.selectInitialFilter.pipe(first()).toPromise()); - if (queryParams) { - filters.fromQueryParams(queryParams); - } - this.taskCalendarStore.setFilter({ filters }); - }); + this._activatedRoute.queryParams + .pipe(takeUntil(this._onDestroy$), debounceTime(250)) + .subscribe(async (queryParams) => { + const filters = UiFilter.create(await this.taskCalendarStore.selectInitialFilter.pipe(first()).toPromise()); + if (queryParams) { + filters.fromQueryParams(queryParams); + } + this.taskCalendarStore.setFilter({ filters }); + }); this.taskCalendarStore.loadItems(); } diff --git a/apps/isa-app/src/page/task-calendar/pages/task-search/task-search.component.html b/apps/isa-app/src/page/task-calendar/pages/task-search/task-search.component.html index 374731668..f29b6d065 100644 --- a/apps/isa-app/src/page/task-calendar/pages/task-search/task-search.component.html +++ b/apps/isa-app/src/page/task-calendar/pages/task-search/task-search.component.html @@ -21,5 +21,5 @@ diff --git a/apps/isa-app/src/page/task-calendar/pages/task-search/task-search.component.ts b/apps/isa-app/src/page/task-calendar/pages/task-search/task-search.component.ts index 401c821d8..c50e085ae 100644 --- a/apps/isa-app/src/page/task-calendar/pages/task-search/task-search.component.ts +++ b/apps/isa-app/src/page/task-calendar/pages/task-search/task-search.component.ts @@ -24,7 +24,8 @@ export class TaskSearchComponent implements OnInit, OnDestroy, AfterViewInit { today = this.dateAdapter.today(); todayKey = this.domainTaskCalendarService.getDateGroupKey(new Date().toISOString()); - byDate = (item: DisplayInfoDTO) => this.domainTaskCalendarService.getDateGroupKey(item.taskDate || item.publicationDate); + byDate = (item: DisplayInfoDTO) => + this.domainTaskCalendarService.getDateGroupKey(item.taskDate || item.publicationDate); searchResults$ = this.taskCalendarStore.searchResults$; searchResultsLength$ = this.searchResults$.pipe(map((r) => r.length || 0)); @@ -33,33 +34,48 @@ export class TaskSearchComponent implements OnInit, OnDestroy, AfterViewInit { displayItems$ = this.searchResults$.pipe( map((r) => { const grouped = groupBy(r, this.byDate); - grouped.sort((a, b) => this.dateAdapter.parseDate(a.group).getTime() - this.dateAdapter.parseDate(b.group).getTime()); + grouped.sort( + (a, b) => this.dateAdapter.parseDate(a.group).getTime() - this.dateAdapter.parseDate(b.group).getTime(), + ); return grouped; }), // Sortierung der aufgaben nach Rot => Gelb => Grau => Grün map((grouped) => grouped.map((g) => ({ ...g, - items: this.domainTaskCalendarService.sort(g.items, ['Overdue', 'InProcess', 'Approved', 'Completed', 'Removed']), + items: this.domainTaskCalendarService.sort(g.items, [ + 'Overdue', + 'InProcess', + 'Approved', + 'Completed', + 'Removed', + ]), })), ), // Entfernte ans ende der Gruppe setzen - map((grouped) => grouped.map((g) => ({ ...g, items: g.items.sort((a, b) => this.domainTaskCalendarService.moveRemovedToEnd(a, b)) }))), + map((grouped) => + grouped.map((g) => ({ + ...g, + items: g.items.sort((a, b) => this.domainTaskCalendarService.moveRemovedToEnd(a, b)), + })), + ), ); showEmptyMessage$ = combineLatest([this.fetching$, this.searchResultsLength$, this.taskCalendarStore.hits$]).pipe( map(([fetching, length, hits]) => !fetching && length <= 0 && hits === 0), ); - previousBreadcrumb$: Observable = this._breadcrumb.getBreadcrumbsByKeyAndTags$(this._taskCalendarKey, ['task-calendar']).pipe( - map((breadcrumbs) => { - if (breadcrumbs?.length > 1) { - return breadcrumbs[breadcrumbs.length - 2]; - } - // Fallback wenn kein vorheriger Breadcrumb existiert - return { path: '/filiale/task-calendar/tasks', name: 'Aufgaben', section: 'branch', key: 'task-calendar' }; - }), - ); + previousBreadcrumb$: Observable = this._breadcrumb + .getBreadcrumbsByKeyAndTags$(this._taskCalendarKey, ['task-calendar']) + .pipe( + map((breadcrumbs) => { + if (breadcrumbs?.length > 1) { + return breadcrumbs[breadcrumbs.length - 2]; + } + // Fallback wenn kein vorheriger Breadcrumb existiert + return { path: '/filiale/task-calendar/tasks', name: 'Aufgaben', section: 'branch', key: 'task-calendar' }; + }), + ); constructor( private dateAdapter: DateAdapter, @@ -71,10 +87,12 @@ export class TaskSearchComponent implements OnInit, OnDestroy, AfterViewInit { ) {} ngOnInit() { - this._activatedRoute.queryParams.pipe(takeUntil(this._onDestroy$), debounceTime(250)).subscribe(async (queryParams) => { - this.taskCalendarStore.search({ clear: true }); - this.updateBreadcrumb(queryParams); - }); + this._activatedRoute.queryParams + .pipe(takeUntil(this._onDestroy$), debounceTime(250)) + .subscribe(async (queryParams) => { + this.taskCalendarStore.search({ clear: true }); + this.updateBreadcrumb(queryParams); + }); this.taskCalendarStore.focusSearchbar(); } diff --git a/apps/isa-app/src/page/task-calendar/pages/tasks/tasks.component.ts b/apps/isa-app/src/page/task-calendar/pages/tasks/tasks.component.ts index e4799a18d..4f7c34fc1 100644 --- a/apps/isa-app/src/page/task-calendar/pages/tasks/tasks.component.ts +++ b/apps/isa-app/src/page/task-calendar/pages/tasks/tasks.component.ts @@ -95,7 +95,10 @@ export class TasksComponent implements OnInit { } removeSearchBreadcrumbs() { - this.breadcrumb.removeBreadcrumbsByKeyAndTags(this._config.get('process.ids.taskCalendar'), ['task-calendar', 'search']); + this.breadcrumb.removeBreadcrumbsByKeyAndTags(this._config.get('process.ids.taskCalendar'), [ + 'task-calendar', + 'search', + ]); } updateBreadcrumb({ displayDate, selectedDate }: { displayDate?: Date; selectedDate?: Date }) { diff --git a/apps/isa-app/src/page/task-calendar/task-calendar.store.ts b/apps/isa-app/src/page/task-calendar/task-calendar.store.ts index 364f36abb..3d92c3fda 100644 --- a/apps/isa-app/src/page/task-calendar/task-calendar.store.ts +++ b/apps/isa-app/src/page/task-calendar/task-calendar.store.ts @@ -45,11 +45,17 @@ export class TaskCalendarStore extends ComponentStore impleme readonly selectDisplayedDate = this.select((s) => s.displayedDate); - readonly selectSelectedYear = this.select(this.selectSelectedDate, (selectedDate) => this.dateAdapter.getYear(selectedDate)); + readonly selectSelectedYear = this.select(this.selectSelectedDate, (selectedDate) => + this.dateAdapter.getYear(selectedDate), + ); - readonly selectSelectedMonth = this.select(this.selectSelectedDate, (selectedDate) => this.dateAdapter.getMonth(selectedDate)); + readonly selectSelectedMonth = this.select(this.selectSelectedDate, (selectedDate) => + this.dateAdapter.getMonth(selectedDate), + ); - readonly selectedCalendarWeek = this.select(this.selectSelectedDate, (selectedDate) => this.dateAdapter.getCalendarWeek(selectedDate)); + readonly selectedCalendarWeek = this.select(this.selectSelectedDate, (selectedDate) => + this.dateAdapter.getCalendarWeek(selectedDate), + ); readonly selectDisplayInfos = this.select((s) => s.displayInfos); @@ -203,7 +209,8 @@ export class TaskCalendarStore extends ComponentStore impleme response = this.preparePreInfos(response); const results = this.get((s) => s.searchResults); - const searchResults = results.length > 0 && !options?.clear ? [...results, ...response.result] : [...response.result]; + const searchResults = + results.length > 0 && !options?.clear ? [...results, ...response.result] : [...response.result]; const sorted = searchResults.sort((a, b) => this.dateAdapter.findClosestDate( new Date(a.taskDate || a.publicationDate), @@ -212,7 +219,9 @@ export class TaskCalendarStore extends ComponentStore impleme ); const searchTarget = sorted?.length > 0 - ? this.domainTaskCalendarService.getDateGroupKey(sorted[0].taskDate || sorted[0].publicationDate) + ? this.domainTaskCalendarService.getDateGroupKey( + sorted[0].taskDate || sorted[0].publicationDate, + ) : ''; this.patchState({ @@ -314,7 +323,11 @@ export class TaskCalendarStore extends ComponentStore impleme switchMap((_) => this.domainTaskCalendarService.getSettings()), tapResponse( (response: QuerySettingsDTO) => { - this.patchState({ filter: UiFilter.create(response), initialFilter: UiFilter.create(response), fetchingFilter: false }); + this.patchState({ + filter: UiFilter.create(response), + initialFilter: UiFilter.create(response), + fetchingFilter: false, + }); }, (error) => { console.error(error); diff --git a/apps/isa-app/src/scss/_components.scss b/apps/isa-app/src/scss/_components.scss index 58868e8f7..c001819c0 100644 --- a/apps/isa-app/src/scss/_components.scss +++ b/apps/isa-app/src/scss/_components.scss @@ -1 +1 @@ -@import './components/icon'; +@import "./components/icon"; diff --git a/apps/isa-app/src/scss/components/_icon.scss b/apps/isa-app/src/scss/components/_icon.scss index 9bb360c3d..f208db27a 100644 --- a/apps/isa-app/src/scss/components/_icon.scss +++ b/apps/isa-app/src/scss/components/_icon.scss @@ -8,7 +8,7 @@ .icon, .icon-outlined { - font-family: 'Material Symbols Outlined'; + font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal; font-size: 24px; @@ -19,12 +19,12 @@ white-space: nowrap; word-wrap: normal; direction: ltr; - -webkit-font-feature-settings: 'liga'; + -webkit-font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; } .icon-rounded { - font-family: 'Material Symbols Rounded'; + font-family: "Material Symbols Rounded"; font-weight: normal; font-style: normal; font-size: 24px; @@ -35,12 +35,12 @@ white-space: nowrap; word-wrap: normal; direction: ltr; - -webkit-font-feature-settings: 'liga'; + -webkit-font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; } .icon-sharp { - font-family: 'Material Symbols Sharp'; + font-family: "Material Symbols Sharp"; font-weight: normal; font-style: normal; font-size: 24px; @@ -51,7 +51,7 @@ white-space: nowrap; word-wrap: normal; direction: ltr; - -webkit-font-feature-settings: 'liga'; + -webkit-font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; } @@ -116,6 +116,10 @@ } .icon { - font-variation-settings: 'FILL' var(--icon-fill), 'wght' var(--icon-weight), 'GRAD' var(--icon-grade), 'opsz' var(--icon-optical-size); + font-variation-settings: + "FILL" var(--icon-fill), + "wght" var(--icon-weight), + "GRAD" var(--icon-grade), + "opsz" var(--icon-optical-size); } } diff --git a/apps/isa-app/src/shared/components/branch-selector/branch-selector.component.ts b/apps/isa-app/src/shared/components/branch-selector/branch-selector.component.ts index 055e88e31..68aac755b 100644 --- a/apps/isa-app/src/shared/components/branch-selector/branch-selector.component.ts +++ b/apps/isa-app/src/shared/components/branch-selector/branch-selector.component.ts @@ -264,7 +264,10 @@ export class BranchSelectorComponent implements OnInit, OnDestroy, AfterViewInit @HostListener('window:click', ['$event']) outsideClick(event?: MouseEvent) { - if (this.focused && !(this._elementRef.nativeElement.contains(event?.target) || this._elementRef.nativeElement === event?.target)) { + if ( + this.focused && + !(this._elementRef.nativeElement.contains(event?.target) || this._elementRef.nativeElement === event?.target) + ) { this.onClose(event); } } diff --git a/apps/isa-app/src/shared/components/branch-selector/branch-selector.store.ts b/apps/isa-app/src/shared/components/branch-selector/branch-selector.store.ts index 0e7ba015e..accd6e09f 100644 --- a/apps/isa-app/src/shared/components/branch-selector/branch-selector.store.ts +++ b/apps/isa-app/src/shared/components/branch-selector/branch-selector.store.ts @@ -171,7 +171,9 @@ export class BranchSelectorStore extends ComponentStore { perimeterSearchResponseFn = ({ response, branches }: { response: PlaceDto[]; branches: BranchDTO[] }) => { const place = response?.find((_) => true); const branch = this._findNearestBranchByPlace({ place, branches }); - const filteredBranches = [...branches]?.sort((a: BranchDTO, b: BranchDTO) => branchSorterFn(a, b, branch))?.slice(0, 10); + const filteredBranches = [...branches] + ?.sort((a: BranchDTO, b: BranchDTO) => branchSorterFn(a, b, branch)) + ?.slice(0, 10); this.setFilteredBranches(filteredBranches ?? []); }; @@ -236,7 +238,9 @@ export class BranchSelectorStore extends ComponentStore { const placeGeoLocation = { longitude: Number(place?.lon), latitude: Number(place?.lat) } as GeoLocation; return ( branches?.reduce((a, b) => - geoDistance(placeGeoLocation, a.address.geoLocation) > geoDistance(placeGeoLocation, b.address.geoLocation) ? b : a, + geoDistance(placeGeoLocation, a.address.geoLocation) > geoDistance(placeGeoLocation, b.address.geoLocation) + ? b + : a, ) ?? {} ); } diff --git a/apps/isa-app/src/shared/components/breadcrumb/breadcrumb.component.css b/apps/isa-app/src/shared/components/breadcrumb/breadcrumb.component.css index bba8ff5b0..d2a60bd68 100644 --- a/apps/isa-app/src/shared/components/breadcrumb/breadcrumb.component.css +++ b/apps/isa-app/src/shared/components/breadcrumb/breadcrumb.component.css @@ -8,7 +8,7 @@ .shared-breadcrumb__prefix::after { @apply block w-6 -right-6 inset-y-0 absolute; - content: ''; + content: ""; box-shadow: 16px 0px 24px 0px white inset; } @@ -18,7 +18,7 @@ .shared-breadcrumb__suffix::before { @apply block w-6 -left-6 inset-y-0 absolute; - content: ''; + content: ""; box-shadow: -16px 0px 24px 0px white inset; } diff --git a/apps/isa-app/src/shared/components/breadcrumb/breadcrumb.component.html b/apps/isa-app/src/shared/components/breadcrumb/breadcrumb.component.html index c547eece9..e5f5474fd 100644 --- a/apps/isa-app/src/shared/components/breadcrumb/breadcrumb.component.html +++ b/apps/isa-app/src/shared/components/breadcrumb/breadcrumb.component.html @@ -6,7 +6,8 @@ [routerLink]="crumb.path" [queryParams]="crumb.params" > - Zurück + + Zurück
diff --git a/apps/isa-app/src/shared/components/breadcrumb/breadcrumb.component.ts b/apps/isa-app/src/shared/components/breadcrumb/breadcrumb.component.ts index da62c5173..cf4d664f7 100644 --- a/apps/isa-app/src/shared/components/breadcrumb/breadcrumb.component.ts +++ b/apps/isa-app/src/shared/components/breadcrumb/breadcrumb.component.ts @@ -1,4 +1,12 @@ -import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, Input, QueryList, ViewChildren } from '@angular/core'; +import { + AfterViewInit, + ChangeDetectionStrategy, + Component, + ElementRef, + Input, + QueryList, + ViewChildren, +} from '@angular/core'; import { Breadcrumb, BreadcrumbService } from '@core/breadcrumb'; import { ComponentStore } from '@ngrx/component-store'; import { isEqual } from 'lodash'; @@ -62,7 +70,9 @@ export class BreadcrumbComponent extends ComponentStore = this.breadcrumbs$.pipe(map((crumbs) => crumbs[crumbs.length - 2])); + readonly previousBreadcrumb$: Observable = this.breadcrumbs$.pipe( + map((crumbs) => crumbs[crumbs.length - 2]), + ); constructor(private _breadcrumbService: BreadcrumbService) { super(DEFAULT_BREADCRUMB_COMPONENT_STATE); diff --git a/apps/isa-app/src/shared/components/filter-overlay/filter-overlay.component.ts b/apps/isa-app/src/shared/components/filter-overlay/filter-overlay.component.ts index 27d0ce3c0..9842ea706 100644 --- a/apps/isa-app/src/shared/components/filter-overlay/filter-overlay.component.ts +++ b/apps/isa-app/src/shared/components/filter-overlay/filter-overlay.component.ts @@ -22,7 +22,10 @@ import { Subject } from 'rxjs'; exportAs: 'shellFilterOverlay', animations: [ trigger('slideInOut', [ - transition(':enter', [style({ transform: 'translateX(100%)' }), animate('250ms', style({ transform: 'translateX(0%)' }))]), + transition(':enter', [ + style({ transform: 'translateX(100%)' }), + animate('250ms', style({ transform: 'translateX(0%)' })), + ]), transition(':leave', [style({ transform: '*' }), animate('250ms', style({ transform: 'translateX(100%)' }))]), ]), ], diff --git a/apps/isa-app/src/shared/components/filter/filter-group/filter-filter-group-filter/filter-filter-group-filter.component.html b/apps/isa-app/src/shared/components/filter/filter-group/filter-filter-group-filter/filter-filter-group-filter.component.html index cb2aac7a8..1ff437625 100644 --- a/apps/isa-app/src/shared/components/filter/filter-group/filter-filter-group-filter/filter-filter-group-filter.component.html +++ b/apps/isa-app/src/shared/components/filter/filter-group/filter-filter-group-filter/filter-filter-group-filter.component.html @@ -11,12 +11,12 @@
{{ input?.label }}
- - + + + + + +
@@ -27,8 +27,7 @@ [class.remove-rounded-top-left]="isFirstInputSelected" class="options" [inputOptions]="activeInput?.options" -> - +>
{{ activeInput?.description }}

- + diff --git a/apps/isa-app/src/shared/components/filter/filter-group/filter-filter-group-filter/filter-filter-group-filter.component.ts b/apps/isa-app/src/shared/components/filter/filter-group/filter-filter-group-filter/filter-filter-group-filter.component.ts index 1ccf9ef16..a4b8a3ede 100644 --- a/apps/isa-app/src/shared/components/filter/filter-group/filter-filter-group-filter/filter-filter-group-filter.component.ts +++ b/apps/isa-app/src/shared/components/filter/filter-group/filter-filter-group-filter/filter-filter-group-filter.component.ts @@ -28,7 +28,10 @@ export class FilterFilterGroupFilterComponent { private _activeInput: FilterInput; get activeInput() { - return this.uiInputGroup?.input?.find((f) => f?.key === this._activeInput?.key) || this.uiInputGroup?.input?.find((f) => f); + return ( + this.uiInputGroup?.input?.find((f) => f?.key === this._activeInput?.key) || + this.uiInputGroup?.input?.find((f) => f) + ); } get isFirstInputSelected() { diff --git a/apps/isa-app/src/shared/components/filter/filter.module.ts b/apps/isa-app/src/shared/components/filter/filter.module.ts index 334cf3f1b..062962336 100644 --- a/apps/isa-app/src/shared/components/filter/filter.module.ts +++ b/apps/isa-app/src/shared/components/filter/filter.module.ts @@ -9,7 +9,13 @@ import { FilterFilterGroupFilterModule } from './filter-group/filter-filter-grou import { FilterInputModule } from './shared/filter-input'; @NgModule({ - imports: [CommonModule, FilterInputGroupMainModule, FilterFilterGroupMainModule, FilterFilterGroupFilterModule, FilterInputModule], + imports: [ + CommonModule, + FilterInputGroupMainModule, + FilterFilterGroupMainModule, + FilterFilterGroupFilterModule, + FilterInputModule, + ], exports: [ FilterComponent, InputGroupSelectorPipe, diff --git a/apps/isa-app/src/shared/components/filter/order-by-filter/order-by-filter.component.ts b/apps/isa-app/src/shared/components/filter/order-by-filter/order-by-filter.component.ts index 904078e28..b014b34b6 100644 --- a/apps/isa-app/src/shared/components/filter/order-by-filter/order-by-filter.component.ts +++ b/apps/isa-app/src/shared/components/filter/order-by-filter/order-by-filter.component.ts @@ -1,4 +1,12 @@ -import { Component, ChangeDetectionStrategy, Input, ChangeDetectorRef, Output, EventEmitter, OnInit } from '@angular/core'; +import { + Component, + ChangeDetectionStrategy, + Input, + ChangeDetectorRef, + Output, + EventEmitter, + OnInit, +} from '@angular/core'; import { OrderBy } from '../tree'; @Component({ diff --git a/apps/isa-app/src/shared/components/filter/shared/filter-input-options/filter-input-option-bool/filter-input-option-bool.component.ts b/apps/isa-app/src/shared/components/filter/shared/filter-input-options/filter-input-option-bool/filter-input-option-bool.component.ts index 4e5d15823..57dce3c88 100644 --- a/apps/isa-app/src/shared/components/filter/shared/filter-input-options/filter-input-option-bool/filter-input-option-bool.component.ts +++ b/apps/isa-app/src/shared/components/filter/shared/filter-input-options/filter-input-option-bool/filter-input-option-bool.component.ts @@ -1,4 +1,12 @@ -import { Component, ChangeDetectionStrategy, Input, ChangeDetectorRef, OnDestroy, Output, EventEmitter } from '@angular/core'; +import { + Component, + ChangeDetectionStrategy, + Input, + ChangeDetectorRef, + OnDestroy, + Output, + EventEmitter, +} from '@angular/core'; import { Subscription } from 'rxjs'; import { IOption, Option } from '../../../tree'; diff --git a/apps/isa-app/src/shared/components/filter/shared/filter-input-options/filter-input-options.component.html b/apps/isa-app/src/shared/components/filter/shared/filter-input-options/filter-input-options.component.html index bc2b093f5..4e248fc6e 100644 --- a/apps/isa-app/src/shared/components/filter/shared/filter-input-options/filter-input-options.component.html +++ b/apps/isa-app/src/shared/components/filter/shared/filter-input-options/filter-input-options.component.html @@ -25,7 +25,7 @@ > - +
@@ -33,9 +33,13 @@ - - - - + + diff --git a/apps/isa-app/src/shared/components/filter/shared/filter-input-options/filter-input-options.component.ts b/apps/isa-app/src/shared/components/filter/shared/filter-input-options/filter-input-options.component.ts index 1b5023b33..097987fca 100644 --- a/apps/isa-app/src/shared/components/filter/shared/filter-input-options/filter-input-options.component.ts +++ b/apps/isa-app/src/shared/components/filter/shared/filter-input-options/filter-input-options.component.ts @@ -38,7 +38,8 @@ export class FilterInputOptionsComponent { } get scrollPersantage() { - const scrollHeight = this.inputOptionsConainterNative?.scrollHeight - this.inputOptionsConainterNative?.clientHeight; + const scrollHeight = + this.inputOptionsConainterNative?.scrollHeight - this.inputOptionsConainterNative?.clientHeight; if (scrollHeight === 0) { return 0; } diff --git a/apps/isa-app/src/shared/components/filter/testing/query-settings.data.ts b/apps/isa-app/src/shared/components/filter/testing/query-settings.data.ts index 96cb337d1..b8dceaa58 100644 --- a/apps/isa-app/src/shared/components/filter/testing/query-settings.data.ts +++ b/apps/isa-app/src/shared/components/filter/testing/query-settings.data.ts @@ -1,7 +1,12 @@ import { IFilter } from '../tree'; export const querySettingsData: IFilter = { - input: [{ group: 'main', input: [{ key: 'qs', placeholder: 'ISBN/EAN, Titel, Kundenname', type: 1, constraint: '^.{2,100}$' }] }], + input: [ + { + group: 'main', + input: [{ key: 'qs', placeholder: 'ISBN/EAN, Titel, Kundenname', type: 1, constraint: '^.{2,100}$' }], + }, + ], filter: [ { group: 'main', diff --git a/apps/isa-app/src/shared/components/filter/tree/filter.ts b/apps/isa-app/src/shared/components/filter/tree/filter.ts index cde04272d..0ba0cceda 100644 --- a/apps/isa-app/src/shared/components/filter/tree/filter.ts +++ b/apps/isa-app/src/shared/components/filter/tree/filter.ts @@ -131,7 +131,11 @@ export class Filter implements IFilter { // Select nested options from queryParams const optionsWithChildOptions = this._getChildOptions(input); const parentKey = key?.split('_')[0]; - if (optionsWithChildOptions?.length > 0 && parentKey === input.key && ALLOWED_SUB_OPTIONS.includes(input.type)) { + if ( + optionsWithChildOptions?.length > 0 && + parentKey === input.key && + ALLOWED_SUB_OPTIONS.includes(input.type) + ) { for (let option of optionsWithChildOptions) { const subKey = key?.split('_')[1]; if (subKey === option.key) { diff --git a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-covers/goods-in-out-order-details-covers.component.html b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-covers/goods-in-out-order-details-covers.component.html index b34d043a0..d7a780ec2 100644 --- a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-covers/goods-in-out-order-details-covers.component.html +++ b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-covers/goods-in-out-order-details-covers.component.html @@ -16,5 +16,5 @@ - + diff --git a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-covers/goods-in-out-order-details-covers.component.ts b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-covers/goods-in-out-order-details-covers.component.ts index 806d50af4..bcad52148 100644 --- a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-covers/goods-in-out-order-details-covers.component.ts +++ b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-covers/goods-in-out-order-details-covers.component.ts @@ -73,7 +73,10 @@ export class SharedGoodsInOutOrderDetailsCoversComponent // Items einer Gruppe anhand des readyForPickup Datums sortieren groupedItems.forEach( - (group) => (group.items = group.items.sort((a, b) => new Date(b.readyForPickUp).getTime() - new Date(a.readyForPickUp).getTime())), + (group) => + (group.items = group.items.sort( + (a, b) => new Date(b.readyForPickUp).getTime() - new Date(a.readyForPickUp).getTime(), + )), ); return groupedItems; diff --git a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-header/goods-in-out-order-details-header.component.html b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-header/goods-in-out-order-details-header.component.html index bc897f011..bd69c8b0a 100644 --- a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-header/goods-in-out-order-details-header.component.html +++ b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-header/goods-in-out-order-details-header.component.html @@ -21,7 +21,7 @@

{{ orderItem?.organisation }} - - + - {{ orderItem?.lastName }} {{ orderItem?.firstName }}
@@ -32,7 +32,7 @@
- {{ orderItem?.features?.paid }} + {{ orderItem?.features?.paid }}
@@ -40,7 +40,7 @@ d="M880-740v520q0 24-18 42t-42 18H140q-24 0-42-18t-18-42v-520q0-24 18-42t42-18h680q24 0 42 18t18 42ZM140-631h680v-109H140v109Zm0 129v282h680v-282H140Zm0 282v-520 520Z" /> - Bezahlt über KulturPass + Bezahlt über KulturPass
@@ -59,8 +59,12 @@
Status
- - + {{ orderItem?.processingStatus | processingStatus }} @@ -276,8 +280,7 @@ [disabledDaysOfWeek]="[0]" [selected]="orderItem?.pickUpDeadline" (save)="updatePickupDeadline($event)" - > - + >
@@ -308,10 +311,9 @@ [disabledDaysOfWeek]="[0]" [selected]="(preferredPickUpDate$ | async) || today" (save)="updatePreferredPickUpDate($event)" - > - + >
- + @@ -326,7 +328,7 @@ {{ orderItem?.estimatedShippingDate | date: 'dd.MM.yy' }} - + - + >
diff --git a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-header/goods-in-out-order-details-header.component.ts b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-header/goods-in-out-order-details-header.component.ts index fa5687dc2..cfa6383f9 100644 --- a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-header/goods-in-out-order-details-header.component.ts +++ b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-header/goods-in-out-order-details-header.component.ts @@ -12,7 +12,12 @@ import { import { CrmCustomerService } from '@domain/crm'; import { DomainOmsService } from '@domain/oms'; import { NotificationChannel } from '@generated/swagger/checkout-api'; -import { DBHOrderItemListItemDTO, KeyValueDTOOfStringAndString, OrderDTO, OrderItemListItemDTO } from '@generated/swagger/oms-api'; +import { + DBHOrderItemListItemDTO, + KeyValueDTOOfStringAndString, + OrderDTO, + OrderItemListItemDTO, +} from '@generated/swagger/oms-api'; import { DateAdapter } from '@ui/common'; import { cloneDeep } from 'lodash'; import { BehaviorSubject, combineLatest } from 'rxjs'; @@ -73,7 +78,9 @@ export class SharedGoodsInOutOrderDetailsHeaderComponent implements OnChanges { shareReplay(), ); - statusActions$ = this.orderItem$.pipe(map((orderItem) => orderItem?.actions?.filter((action) => action.enabled === false))); + statusActions$ = this.orderItem$.pipe( + map((orderItem) => orderItem?.actions?.filter((action) => action.enabled === false)), + ); showMultiselect$ = combineLatest([this.host.orderItems$, this.host.fetchPartial$, this.host.itemsSelectable$]).pipe( map(([orderItems, fetchPartial, multiSelect]) => multiSelect && fetchPartial && orderItems?.length > 1), @@ -96,7 +103,9 @@ export class SharedGoodsInOutOrderDetailsHeaderComponent implements OnChanges { } get showAddresses(): boolean { - return (this.order?.orderType === 2 || this.order?.orderType === 4) && (!!this.order?.shipping || !!this.order?.billing); + return ( + (this.order?.orderType === 2 || this.order?.orderType === 4) && (!!this.order?.shipping || !!this.order?.billing) + ); } get showFeature(): boolean { @@ -179,7 +188,12 @@ export class SharedGoodsInOutOrderDetailsHeaderComponent implements OnChanges { if (this.dateAdapter.compareDate(estimatedShippingDate, new Date(item.pickUpDeadline)) !== 0) { try { const res = await this.omsService - .setEstimatedShippingDate(item.orderId, item.orderItemId, item.orderItemSubsetId, estimatedShippingDate?.toISOString()) + .setEstimatedShippingDate( + item.orderId, + item.orderItemId, + item.orderItemSubsetId, + estimatedShippingDate?.toISOString(), + ) .pipe(first()) .toPromise(); item.estimatedShippingDate = res.estimatedShippingDate; @@ -242,7 +256,9 @@ export class SharedGoodsInOutOrderDetailsHeaderComponent implements OnChanges { ?.reduce((acc, item) => { return [...acc, ...item.data.subsetItems]; }, []) - ?.filter((a) => !!a.data.preferredPickUpDate && (!this.selectedOrderItemId || this.selectedOrderItemId === a.data.id)); + ?.filter( + (a) => !!a.data.preferredPickUpDate && (!this.selectedOrderItemId || this.selectedOrderItemId === a.data.id), + ); if (subsetItems?.length > 0) { latestDate = new Date( subsetItems?.reduce((a, b) => { diff --git a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-item/goods-in-out-order-details-item.component.html b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-item/goods-in-out-order-details-item.component.html index 2ccdfaf91..7148e8b48 100644 --- a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-item/goods-in-out-order-details-item.component.html +++ b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-item/goods-in-out-order-details-item.component.html @@ -10,18 +10,22 @@ - Per E-Mail benachrichtigt
+ Per E-Mail benachrichtigt +
- {{ notification | date: 'dd.MM.yyyy | HH:mm' }} Uhr
+ {{ notification | date: 'dd.MM.yyyy | HH:mm' }} Uhr +
- Per SMS benachrichtigt
+ Per SMS benachrichtigt +
- {{ notification | date: 'dd.MM.yyyy | HH:mm' }} Uhr
+ {{ notification | date: 'dd.MM.yyyy | HH:mm' }} Uhr +
@@ -51,15 +55,14 @@
Menge
- {{ orderItem?.quantity }}x + {{ orderItem?.quantity }}x - + > (von {{ orderItem?.overallQuantity }})
@@ -77,7 +80,8 @@ @@ -98,8 +102,9 @@ orderItemFeature(orderItem) === 'B2B-Versand' || orderItemFeature(orderItem) === 'DIG-Versand' " - >{{ orderItem?.estimatedDelivery ? 'Lieferung zwischen' : 'Lieferung ab' }} + {{ orderItem?.estimatedDelivery ? 'Lieferung zwischen' : 'Lieferung ab' }} + Abholung ab @@ -174,17 +179,18 @@
- +
diff --git a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-item/goods-in-out-order-details-item.component.ts b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-item/goods-in-out-order-details-item.component.ts index d300a6585..313c74290 100644 --- a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-item/goods-in-out-order-details-item.component.ts +++ b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-item/goods-in-out-order-details-item.component.ts @@ -82,7 +82,13 @@ export class SharedGoodsInOutOrderDetailsItemComponent filter((oi) => !!oi), switchMap((oi) => this._omsService - .getCompletedTasks({ orderId: oi.orderId, orderItemId: oi.orderItemId, orderItemSubsetId: oi.orderItemSubsetId, take: 4, skip: 0 }) + .getCompletedTasks({ + orderId: oi.orderId, + orderItemId: oi.orderItemId, + orderItemSubsetId: oi.orderItemSubsetId, + take: 4, + skip: 0, + }) .pipe(catchError(() => NEVER)), ), ); @@ -124,9 +130,11 @@ export class SharedGoodsInOutOrderDetailsItemComponent return this._host.itemsSelectable && this._host.orderItems.length > 1 && this._host.fetchPartial; } - readonly selectable$ = combineLatest([this._host.orderItems$, this._host.itemsSelectable$, this._host.fetchPartial$]).pipe( - map(([orderItems, selectable, fetchPartial]) => orderItems.length > 1 && selectable && fetchPartial), - ); + readonly selectable$ = combineLatest([ + this._host.orderItems$, + this._host.itemsSelectable$, + this._host.fetchPartial$, + ]).pipe(map(([orderItems, selectable, fetchPartial]) => orderItems.length > 1 && selectable && fetchPartial)); get receipts() { return this.get((s) => s.receipts); @@ -211,7 +219,12 @@ export class SharedGoodsInOutOrderDetailsItemComponent try { this.specialCommentControl.reset(this.specialCommentControl.value); const res = await this._omsService - .patchComment({ orderId, orderItemId, orderItemSubsetId, specialComment: this.specialCommentControl.value ?? '' }) + .patchComment({ + orderId, + orderItemId, + orderItemSubsetId, + specialComment: this.specialCommentControl.value ?? '', + }) .pipe(first()) .toPromise(); @@ -233,7 +246,11 @@ export class SharedGoodsInOutOrderDetailsItemComponent async openHistory() { this.fetchHistory$.next(true); try { - const customerName = [this.orderItem?.organisation ?? this.orderItem.organisation, this.orderItem.lastName, this.orderItem.firstName] + const customerName = [ + this.orderItem?.organisation ?? this.orderItem.organisation, + this.orderItem.lastName, + this.orderItem.firstName, + ] .filter((i) => !!i) .join(', '); const customerNumber = this.orderItem.buyerNumber; @@ -259,7 +276,9 @@ export class SharedGoodsInOutOrderDetailsItemComponent this._modal.open({ content: UiMessageModalComponent, title: 'Keine Einträge in der Historie gefunden', - data: { message: `Es konnten keine Einträge für ${customerName} mit der Kundennummer ${customerNumber} gefunden werden.` }, + data: { + message: `Es konnten keine Einträge für ${customerName} mit der Kundennummer ${customerNumber} gefunden werden.`, + }, }); } } @@ -283,7 +302,8 @@ export class SharedGoodsInOutOrderDetailsItemComponent orderItemFeature(orderItemListItem: OrderItemListItemDTO) { const orderItems = this.order?.items; - return orderItems?.find((orderItem) => orderItem.data.id === orderItemListItem.orderItemId)?.data?.features?.orderType; + return orderItems?.find((orderItem) => orderItem.data.id === orderItemListItem.orderItemId)?.data?.features + ?.orderType; } triggerResize() { diff --git a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-tags/goods-in-out-order-details-tags.component.ts b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-tags/goods-in-out-order-details-tags.component.ts index 54fb139d5..d30966ed7 100644 --- a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-tags/goods-in-out-order-details-tags.component.ts +++ b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details-tags/goods-in-out-order-details-tags.component.ts @@ -1,4 +1,13 @@ -import { Component, ChangeDetectionStrategy, Host, OnInit, OnDestroy, ChangeDetectorRef, forwardRef, EventEmitter } from '@angular/core'; +import { + Component, + ChangeDetectionStrategy, + Host, + OnInit, + OnDestroy, + ChangeDetectorRef, + forwardRef, + EventEmitter, +} from '@angular/core'; import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; import { BehaviorSubject, Subscription } from 'rxjs'; import { first, map } from 'rxjs/operators'; @@ -8,7 +17,13 @@ import { first, map } from 'rxjs/operators'; templateUrl: 'goods-in-out-order-details-tags.component.html', styleUrls: ['goods-in-out-order-details-tags.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SharedGoodsInOutOrderDetailsTagsComponent), multi: true }], + providers: [ + { + provide: NG_VALUE_ACCESSOR, + useExisting: forwardRef(() => SharedGoodsInOutOrderDetailsTagsComponent), + multi: true, + }, + ], standalone: false, }) export class SharedGoodsInOutOrderDetailsTagsComponent implements OnInit, OnDestroy, ControlValueAccessor { @@ -55,7 +70,9 @@ export class SharedGoodsInOutOrderDetailsTagsComponent implements OnInit, OnDest ngOnInit() { this.subscription.add( - this.selected$.pipe(map((selected) => (this.defaultTags.includes(selected) ? '' : selected))).subscribe(this.inputValueSubject), + this.selected$ + .pipe(map((selected) => (this.defaultTags.includes(selected) ? '' : selected))) + .subscribe(this.inputValueSubject), ); } diff --git a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details.component.html b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details.component.html index f9880938f..f0e57f38a 100644 --- a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details.component.html +++ b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-details/goods-in-out-order-details.component.html @@ -18,9 +18,9 @@ [class.cta-action-secondary]="!action.selected" (click)="handleAction(action, { compartmentCode: latestCompartmentCode, compartmentInfo: latestCompartmentInfo })" > - {{ latestCompartmentCode$ | async | addToPreviousCompartmentCodeLabelPipe }} zubuchen + + {{ latestCompartmentCode$ | async | addToPreviousCompartmentCodeLabelPipe }} zubuchen +
@@ -80,7 +80,7 @@ - + @@ -94,7 +94,7 @@ {{ items[i]?.estimatedShippingDate | date: 'dd.MM.yy' }} - + - + > @@ -135,8 +134,7 @@ [selected]="items[i]?.pickUpDeadline" saveLabel="Übernehmen" (save)="changePickupDeadline($event, items[i]); deadlineDatepicker.close()" - > - + > diff --git a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-edit/goods-in-out-order-edit.component.ts b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-edit/goods-in-out-order-edit.component.ts index cc4f2f4f7..09c30963f 100644 --- a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-edit/goods-in-out-order-edit.component.ts +++ b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-edit/goods-in-out-order-edit.component.ts @@ -15,7 +15,10 @@ import { } from '@angular/core'; import { UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms'; import { DomainOmsService } from '@domain/oms'; -import { emailNotificationValidator, mobileNotificationValidator } from '@shared/components/notification-channel-control'; +import { + emailNotificationValidator, + mobileNotificationValidator, +} from '@shared/components/notification-channel-control'; import { DBHOrderItemListItemDTO, NotificationChannel, @@ -136,7 +139,10 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy orderId: fb.control({ value: items[0].orderId, disabled: true }), orderNumber: fb.control({ value: items[0].orderNumber, disabled: true }), orderDate: fb.control({ value: this.datePipe.transform(items[0].orderDate), disabled: true }), - clientChannel: fb.control({ value: (await this.getOrderSource()) ?? items[0].features?.orderSource, disabled: true }), + clientChannel: fb.control({ + value: (await this.getOrderSource()) ?? items[0].features?.orderSource, + disabled: true, + }), buyerNumber: fb.control({ value: items[0].buyerNumber, disabled: true }), firstName: fb.control({ value: items[0].firstName, disabled: !this.canEditNameFields }), lastName: fb.control({ value: items[0].lastName, disabled: !this.canEditNameFields }), @@ -149,7 +155,10 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy let statusCodes: StockStatusCodeDTO[]; if (item.supplierId) { try { - statusCodes = await this.omsService.getStockStatusCodes({ supplierId: item.supplierId }).pipe(first()).toPromise(); + statusCodes = await this.omsService + .getStockStatusCodes({ supplierId: item.supplierId }) + .pipe(first()) + .toPromise(); } catch (error) {} } const fbItem = fb.group({ @@ -157,7 +166,10 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy compartmentInfo: fb.control(item.compartmentInfo), orderItemId: fb.control(item.orderItemId), orderItemSubsetId: fb.control(item.orderItemSubsetId), - processingStatus: fb.control({ value: this.processingStatusPipe.transform(item.processingStatus), disabled: true }), + processingStatus: fb.control({ + value: this.processingStatusPipe.transform(item.processingStatus), + disabled: true, + }), estimatedShippingDate: fb.control(item.estimatedShippingDate), pickUpDeadline: fb.control({ value: item.pickUpDeadline, @@ -170,7 +182,10 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy name: fb.control(item.product?.name), ean: fb.control(item.product?.ean, [Validators.required]), quantity: fb.control({ value: item.quantity + ' x', disabled: true }), - price: fb.control(this.formatPrice(item?.price), [Validators.required, Validators.pattern(/^\d+([\,]\d{1,2})?$/)]), + price: fb.control(this.formatPrice(item?.price), [ + Validators.required, + Validators.pattern(/^\d+([\,]\d{1,2})?$/), + ]), currency: fb.control(item.currency), targetBranch: fb.control({ value: item.targetBranch, disabled: true }), supplier: fb.control({ value: item.supplier, disabled: true }), @@ -208,7 +223,11 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy this.notificationsGroup.reset(notifications); } } catch (error) { - this._modal.open({ content: UiErrorModalComponent, data: error, title: 'Fehler beim abrufen der Benachrichtigung' }); + this._modal.open({ + content: UiErrorModalComponent, + data: error, + title: 'Fehler beim abrufen der Benachrichtigung', + }); } } @@ -296,7 +315,11 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy try { await this.patchNotifications(); } catch (error) { - this._modal.open({ content: UiErrorModalComponent, data: error, title: 'Fehler beim Aktualisieren der Benachrichtigung' }); + this._modal.open({ + content: UiErrorModalComponent, + data: error, + title: 'Fehler beim Aktualisieren der Benachrichtigung', + }); throw error; } } @@ -322,7 +345,11 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy }; } } catch (error) { - this._modal.open({ content: UiErrorModalComponent, data: error, title: 'Fehler beim Aktualisieren der Meldenummer' }); + this._modal.open({ + content: UiErrorModalComponent, + data: error, + title: 'Fehler beim Aktualisieren der Meldenummer', + }); throw error; } @@ -357,7 +384,11 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy .toPromise(); } } catch (error) { - this._modal.open({ content: UiErrorModalComponent, data: error, title: 'Fehler beim Aktualisieren des Bestellpostens' }); + this._modal.open({ + content: UiErrorModalComponent, + data: error, + title: 'Fehler beim Aktualisieren des Bestellpostens', + }); throw error; } @@ -388,7 +419,11 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy ); } } catch (error) { - this._modal.open({ content: UiErrorModalComponent, data: error, title: 'Fehler beim Aktualisieren des Bestellpostens' }); + this._modal.open({ + content: UiErrorModalComponent, + data: error, + title: 'Fehler beim Aktualisieren des Bestellpostens', + }); throw error; } } @@ -417,12 +452,18 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy } firstOrLastNameOrOrganisationChanged() { - return this.control.get('firstName').dirty || this.control.get('lastName').dirty || this.control.get('organisation').dirty; + return ( + this.control.get('firstName').dirty || + this.control.get('lastName').dirty || + this.control.get('organisation').dirty + ); } getFormGroupByOrderItemSubsetId(orderItemSubsetId: number): UntypedFormGroup { const arr = this.control.get('items') as UntypedFormArray; - return arr.controls.find((c) => (c as UntypedFormGroup).controls.orderItemSubsetId.value === orderItemSubsetId) as UntypedFormGroup; + return arr.controls.find( + (c) => (c as UntypedFormGroup).controls.orderItemSubsetId.value === orderItemSubsetId, + ) as UntypedFormGroup; } isOrderItemDirty(group: UntypedFormGroup) { diff --git a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-group/goods-in-out-order-group-item.component.html b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-group/goods-in-out-order-group-item.component.html index abcfb0b7a..3a271399e 100644 --- a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-group/goods-in-out-order-group-item.component.html +++ b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-group/goods-in-out-order-group-item.component.html @@ -4,7 +4,7 @@
- {{ item.features?.paid }} + {{ item.features?.paid }}
@@ -12,7 +12,7 @@ d="M880-740v520q0 24-18 42t-42 18H140q-24 0-42-18t-18-42v-520q0-24 18-42t42-18h680q24 0 42 18t18 42ZM140-631h680v-109H140v109Zm0 129v282h680v-282H140Zm0 282v-520 520Z" /> - Bezahlt über KulturPass + Bezahlt über KulturPass
@@ -85,8 +85,7 @@ [range]="item?.quantity" [(ngModel)]="item.quantity" [showSpinner]="false" - > - + >
{{ item.quantity }}x
@@ -120,7 +119,7 @@
- +
diff --git a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-group/goods-in-out-order-group-item.component.scss b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-group/goods-in-out-order-group-item.component.scss index 356474d30..080a22005 100644 --- a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-group/goods-in-out-order-group-item.component.scss +++ b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-group/goods-in-out-order-group-item.component.scss @@ -121,6 +121,10 @@ ui-quantity-dropdown { height: 22px; } -::ng-deep .branch shared-goods-in-out-order-group-item .goods-in-out-order-group-item-details-data .item-processing-status { +::ng-deep + .branch + shared-goods-in-out-order-group-item + .goods-in-out-order-group-item-details-data + .item-processing-status { color: #9ca5b0 !important; } diff --git a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-group/goods-in-out-order-group.component.html b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-group/goods-in-out-order-group.component.html index 9b8ff834a..6529a20de 100644 --- a/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-group/goods-in-out-order-group.component.html +++ b/apps/isa-app/src/shared/components/goods-in-out/goods-in-out-order-group/goods-in-out-order-group.component.html @@ -1,7 +1,7 @@

{{ item?.organisation }} - - + - {{ item?.lastName }} {{ item?.firstName }}

diff --git a/apps/isa-app/src/shared/components/goods-in-out/pipes/processing-status-options.pipe.ts b/apps/isa-app/src/shared/components/goods-in-out/pipes/processing-status-options.pipe.ts index 2c3e0ce17..70b9fcd25 100644 --- a/apps/isa-app/src/shared/components/goods-in-out/pipes/processing-status-options.pipe.ts +++ b/apps/isa-app/src/shared/components/goods-in-out/pipes/processing-status-options.pipe.ts @@ -35,7 +35,9 @@ export class ProcessingStatusOptionsPipe implements PipeTransform { standalone: false, }) export class ProcessingStatusOptionsKeyValuePipe implements PipeTransform { - transform(states: KeyValue[]): KeyValue[] { + transform( + states: KeyValue[], + ): KeyValue[] { return states .filter((state) => !state.value.disabled) .sort((a, b) => { diff --git a/apps/isa-app/src/shared/components/goods-in-out/pipes/processing-status.pipe.ts b/apps/isa-app/src/shared/components/goods-in-out/pipes/processing-status.pipe.ts index 34682ade4..5085f191b 100644 --- a/apps/isa-app/src/shared/components/goods-in-out/pipes/processing-status.pipe.ts +++ b/apps/isa-app/src/shared/components/goods-in-out/pipes/processing-status.pipe.ts @@ -17,6 +17,10 @@ export class ProcessingStatusPipe implements PipeTransform { }; transform(value: OrderItemProcessingStatusValue, type: 'icon' | 'text' = 'text'): string { - return type === 'icon' ? this.icon[value] : ProcessingStatusNameMap.get(value) ? ProcessingStatusNameMap.get(value).value : ''; + return type === 'icon' + ? this.icon[value] + : ProcessingStatusNameMap.get(value) + ? ProcessingStatusNameMap.get(value).value + : ''; } } diff --git a/apps/isa-app/src/shared/components/history/history-list.component.scss b/apps/isa-app/src/shared/components/history/history-list.component.scss index c40c51d45..7fe09fd73 100644 --- a/apps/isa-app/src/shared/components/history/history-list.component.scss +++ b/apps/isa-app/src/shared/components/history/history-list.component.scss @@ -18,7 +18,7 @@ .log-entry { &:before { - content: ''; + content: ""; position: absolute; height: calc(100% + 40px); width: 1px; @@ -48,7 +48,7 @@ &:before { @apply absolute; - content: ''; + content: ""; background: #aeb7c1; top: var(--timeline-bar-dots-top-offset); left: calc((-1 * var(--timeline-bar-dots-top-offset)) - 1px); diff --git a/apps/isa-app/src/shared/components/history/history-list.component.spec.ts b/apps/isa-app/src/shared/components/history/history-list.component.spec.ts index 134381764..830ca9f91 100644 --- a/apps/isa-app/src/shared/components/history/history-list.component.spec.ts +++ b/apps/isa-app/src/shared/components/history/history-list.component.spec.ts @@ -1,5 +1,9 @@ import { createComponentFactory, Spectator } from '@ngneat/spectator'; -import { SharedHistoryListComponent, SharedHistoryLogEntryComponent, SharedHistoryLogEntryModule } from '@shared/components/history'; +import { + SharedHistoryListComponent, + SharedHistoryLogEntryComponent, + SharedHistoryLogEntryModule, +} from '@shared/components/history'; import { HistoryDTO } from '@generated/swagger/crm-api'; describe('SharedHistoryListComponent', () => { diff --git a/apps/isa-app/src/shared/components/history/history-log-entry/history-log-entry.component.html b/apps/isa-app/src/shared/components/history/history-log-entry/history-log-entry.component.html index ccbc7b652..8d74e0775 100644 --- a/apps/isa-app/src/shared/components/history/history-log-entry/history-log-entry.component.html +++ b/apps/isa-app/src/shared/components/history/history-log-entry/history-log-entry.component.html @@ -2,7 +2,8 @@
- {{ historyLogEntryData.changed | date }} | + {{ historyLogEntryData.changed | date }} + | {{ historyLogEntryData.changed | date: 'shortTime' }} Uhr
@@ -31,7 +32,8 @@
- {{ historyLogEntryData.created | date }} | + {{ historyLogEntryData.created | date }} + | {{ historyLogEntryData.created | date: 'shortTime' }} Uhr
diff --git a/apps/isa-app/src/shared/components/history/history-log-entry/history-log-entry.component.spec.ts b/apps/isa-app/src/shared/components/history/history-log-entry/history-log-entry.component.spec.ts index b4adc7e02..c7ca5fc0d 100644 --- a/apps/isa-app/src/shared/components/history/history-log-entry/history-log-entry.component.spec.ts +++ b/apps/isa-app/src/shared/components/history/history-log-entry/history-log-entry.component.spec.ts @@ -139,7 +139,9 @@ describe('SharedHistoryLogEntryComponent', () => { const history: HistoryDTO = { id: 1, values: [historyLogEntryValues] }; spectator.setInput('historyLogEntryData', history); spectator.detectComponentChanges(); - expect(spectator.query(SharedHistoryLogEntryValuesComponent).historyLogEntryValues).toEqual(historyLogEntryValues); + expect(spectator.query(SharedHistoryLogEntryValuesComponent).historyLogEntryValues).toEqual( + historyLogEntryValues, + ); }); }); }); diff --git a/apps/isa-app/src/shared/components/icon/icon.component.ts b/apps/isa-app/src/shared/components/icon/icon.component.ts index b67b40e2b..f1926e5d5 100644 --- a/apps/isa-app/src/shared/components/icon/icon.component.ts +++ b/apps/isa-app/src/shared/components/icon/icon.component.ts @@ -1,4 +1,13 @@ -import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core'; +import { + ChangeDetectionStrategy, + ChangeDetectorRef, + Component, + Input, + OnChanges, + OnDestroy, + OnInit, + SimpleChanges, +} from '@angular/core'; import { IconRegistry } from './icon-registry'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; diff --git a/apps/isa-app/src/shared/components/input-control/error.component.ts b/apps/isa-app/src/shared/components/input-control/error.component.ts index 0bfed0df6..a0daa7d23 100644 --- a/apps/isa-app/src/shared/components/input-control/error.component.ts +++ b/apps/isa-app/src/shared/components/input-control/error.component.ts @@ -2,11 +2,13 @@ import { ChangeDetectionStrategy, Component, Input, TemplateRef, ViewChild } fro @Component({ selector: 'shared-input-control-error', - template: ` -
- -
-
`, + template: ` + +
+ +
+
+ `, changeDetection: ChangeDetectionStrategy.Default, standalone: false, }) diff --git a/apps/isa-app/src/shared/components/input-control/indicator.component.ts b/apps/isa-app/src/shared/components/input-control/indicator.component.ts index 821e37363..5a2ab3b1d 100644 --- a/apps/isa-app/src/shared/components/input-control/indicator.component.ts +++ b/apps/isa-app/src/shared/components/input-control/indicator.component.ts @@ -2,11 +2,13 @@ import { ChangeDetectionStrategy, Component, Input, TemplateRef, ViewChild } fro @Component({ selector: 'shared-input-control-indicator', - template: ` -
- -
-
`, + template: ` + +
+ +
+
+ `, changeDetection: ChangeDetectionStrategy.Default, standalone: false, }) diff --git a/apps/isa-app/src/shared/components/input-control/input-control.component.html b/apps/isa-app/src/shared/components/input-control/input-control.component.html index 703f75d44..8fed45f3e 100644 --- a/apps/isa-app/src/shared/components/input-control/input-control.component.html +++ b/apps/isa-app/src/shared/components/input-control/input-control.component.html @@ -1,4 +1,4 @@ - +
@@ -7,4 +7,4 @@
- + diff --git a/apps/isa-app/src/shared/components/input-control/input-control.component.ts b/apps/isa-app/src/shared/components/input-control/input-control.component.ts index 1577134c0..8b5b48587 100644 --- a/apps/isa-app/src/shared/components/input-control/input-control.component.ts +++ b/apps/isa-app/src/shared/components/input-control/input-control.component.ts @@ -1,7 +1,14 @@ import { OnDestroy } from '@angular/core'; import { QueryList } from '@angular/core'; import { ContentChildren } from '@angular/core'; -import { Component, ChangeDetectionStrategy, ViewEncapsulation, AfterContentInit, ContentChild, ViewChild } from '@angular/core'; +import { + Component, + ChangeDetectionStrategy, + ViewEncapsulation, + AfterContentInit, + ContentChild, + ViewChild, +} from '@angular/core'; import { Subscription } from 'rxjs'; import { ErrorComponent } from './error.component'; import { IndicatorComponent } from './indicator.component'; diff --git a/apps/isa-app/src/shared/components/input-control/input-control.module.ts b/apps/isa-app/src/shared/components/input-control/input-control.module.ts index 95be7115e..f6823f744 100644 --- a/apps/isa-app/src/shared/components/input-control/input-control.module.ts +++ b/apps/isa-app/src/shared/components/input-control/input-control.module.ts @@ -11,7 +11,14 @@ import { IndicatorComponent } from './indicator.component'; @NgModule({ imports: [CommonModule], - exports: [InputControlComponent, InputDirective, PrefixDirective, SuffixDirective, ErrorComponent, IndicatorComponent], + exports: [ + InputControlComponent, + InputDirective, + PrefixDirective, + SuffixDirective, + ErrorComponent, + IndicatorComponent, + ], declarations: [ InputControlComponent, InputDirective, diff --git a/apps/isa-app/src/shared/components/input-control/input.directive.ts b/apps/isa-app/src/shared/components/input-control/input.directive.ts index 60a27e0fa..65327d778 100644 --- a/apps/isa-app/src/shared/components/input-control/input.directive.ts +++ b/apps/isa-app/src/shared/components/input-control/input.directive.ts @@ -28,7 +28,15 @@ export class InputDirective implements OnInit, OnDestroy { ngOnDestroy(): void {} - private _getControlStatus({ status, dirty, touched }: { status: string; dirty: boolean; touched: boolean }): SharedInputControlStatus[] { + private _getControlStatus({ + status, + dirty, + touched, + }: { + status: string; + dirty: boolean; + touched: boolean; + }): SharedInputControlStatus[] { const result: SharedInputControlStatus[] = []; if (status === 'VALID') { diff --git a/apps/isa-app/src/shared/components/input-control/types.ts b/apps/isa-app/src/shared/components/input-control/types.ts index 77aef908c..da64e05e3 100644 --- a/apps/isa-app/src/shared/components/input-control/types.ts +++ b/apps/isa-app/src/shared/components/input-control/types.ts @@ -1 +1,9 @@ -export type SharedInputControlStatus = 'valid' | 'invalid' | 'disabled' | 'pending' | 'dirty' | 'pristine' | 'touched' | 'untouched'; +export type SharedInputControlStatus = + | 'valid' + | 'invalid' + | 'disabled' + | 'pending' + | 'dirty' + | 'pristine' + | 'touched' + | 'untouched'; diff --git a/apps/isa-app/src/shared/components/loader/skeleton-loader.component.css b/apps/isa-app/src/shared/components/loader/skeleton-loader.component.css index 10bb69956..0d5ac787e 100644 --- a/apps/isa-app/src/shared/components/loader/skeleton-loader.component.css +++ b/apps/isa-app/src/shared/components/loader/skeleton-loader.component.css @@ -7,7 +7,12 @@ @apply w-full h-full; animation: load 1s ease-in-out infinite; - background: linear-gradient(75deg, rgba(238, 238, 238, 1) 0%, rgba(190, 190, 190, 1) 50%, rgba(238, 238, 238, 1) 100%); + background: linear-gradient( + 75deg, + rgba(238, 238, 238, 1) 0%, + rgba(190, 190, 190, 1) 50%, + rgba(238, 238, 238, 1) 100% + ); } @keyframes load { diff --git a/apps/isa-app/src/shared/components/menu/menu-template.component.ts b/apps/isa-app/src/shared/components/menu/menu-template.component.ts index f68754d7f..a8ae5229a 100644 --- a/apps/isa-app/src/shared/components/menu/menu-template.component.ts +++ b/apps/isa-app/src/shared/components/menu/menu-template.component.ts @@ -3,7 +3,9 @@ import { MenuComponent } from './menu.component'; @Component({ selector: 'menu-template', - template: ``, + template: ` + + `, exportAs: 'menuTemplate', standalone: false, }) diff --git a/apps/isa-app/src/shared/components/menu/menu-trigger.directive.ts b/apps/isa-app/src/shared/components/menu/menu-trigger.directive.ts index 285019138..cd5f0f2ba 100644 --- a/apps/isa-app/src/shared/components/menu/menu-trigger.directive.ts +++ b/apps/isa-app/src/shared/components/menu/menu-trigger.directive.ts @@ -42,7 +42,9 @@ export class MenuTriggerDirective implements OnDestroy { positionStrategy: this._overlay .position() .flexibleConnectedTo(this._elementRef) - .withPositions([{ originX: this.originX, originY: this.originY, overlayX: this.overlayX, overlayY: this.overlayY }]), + .withPositions([ + { originX: this.originX, originY: this.originY, overlayX: this.overlayX, overlayY: this.overlayY }, + ]), scrollStrategy: this._overlay.scrollStrategies.reposition(), hasBackdrop: false, }); diff --git a/apps/isa-app/src/shared/components/menu/menu.component.ts b/apps/isa-app/src/shared/components/menu/menu.component.ts index ab7f0950a..fa3a3ddac 100644 --- a/apps/isa-app/src/shared/components/menu/menu.component.ts +++ b/apps/isa-app/src/shared/components/menu/menu.component.ts @@ -3,7 +3,9 @@ import { MenuItemDirective } from './menu-item.directive'; @Component({ selector: 'menu, shared-menu', - template: ``, + template: ` + + `, host: { class: 'menu', role: 'menu' }, exportAs: 'menu', standalone: false, diff --git a/apps/isa-app/src/shared/components/notification-channel-control/notification-channel-control.component.html b/apps/isa-app/src/shared/components/notification-channel-control/notification-channel-control.component.html index a98100d63..8f5b0c4f4 100644 --- a/apps/isa-app/src/shared/components/notification-channel-control/notification-channel-control.component.html +++ b/apps/isa-app/src/shared/components/notification-channel-control/notification-channel-control.component.html @@ -1,5 +1,5 @@
- + { - let values = []; + this.notificationChannels$ = this.notificationChannelControl.valueChanges + .pipe(startWith(this.notificationChannelControl.value)) + .pipe( + map((value) => { + let values = []; - this.options?.forEach((option) => { - if (value & option) { - values.push(option); + this.options?.forEach((option) => { + if (value & option) { + values.push(option); + } + }); + return values; + }), + tap(() => { + this.updateValidity(); + + if (this.hasError) { + this.toggle(true); } - }); - return values; - }), - tap(() => { - this.updateValidity(); - if (this.hasError) { - this.toggle(true); - } - - this._cdr.markForCheck(); - }), - ); + this._cdr.markForCheck(); + }), + ); } else { this.notificationChannels$ = NEVER; } @@ -171,7 +173,10 @@ export class SharedNotificationChannelControlComponent // Auf den Pickup Shelf Edit Seiten soll der Erneut senden button immer ersichtlich sein // Wenn die Felder Email und SMS angehakt wurden, soll der Button nur einmal angezeigt werden showSendAgainActionForMobile() { - return this.channelActionName === 'Erneut senden' && (this.getNotificationChannel() === 2 || this.getNotificationChannel() !== 1); + return ( + this.channelActionName === 'Erneut senden' && + (this.getNotificationChannel() === 2 || this.getNotificationChannel() !== 1) + ); } toggle(value?: boolean) { diff --git a/apps/isa-app/src/shared/components/package-list/package-list-item.component.html b/apps/isa-app/src/shared/components/package-list/package-list-item.component.html index 09715d82f..eb8039ebc 100644 --- a/apps/isa-app/src/shared/components/package-list/package-list-item.component.html +++ b/apps/isa-app/src/shared/components/package-list/package-list-item.component.html @@ -2,7 +2,7 @@ {{ package?.packageNumber }} - | + | {{ package?.deliveryNoteNumber }} @@ -10,7 +10,10 @@
{{ package?.estimatedDeliveryDate | date }}
-
{{ package?.items ?? '-' }} Exemplare
+
+ {{ package?.items ?? '-' }} + Exemplare +
- + diff --git a/apps/isa-app/src/shared/components/package-list/package-list.component.ts b/apps/isa-app/src/shared/components/package-list/package-list.component.ts index dda96db11..1bf09d0ac 100644 --- a/apps/isa-app/src/shared/components/package-list/package-list.component.ts +++ b/apps/isa-app/src/shared/components/package-list/package-list.component.ts @@ -1,4 +1,13 @@ -import { Component, ChangeDetectionStrategy, Input, EventEmitter, Output, ViewChild, AfterViewInit, OnDestroy } from '@angular/core'; +import { + Component, + ChangeDetectionStrategy, + Input, + EventEmitter, + Output, + ViewChild, + AfterViewInit, + OnDestroy, +} from '@angular/core'; import { PackageDTO2 } from '@generated/swagger/wws-api'; import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling'; import { asapScheduler, Subject } from 'rxjs'; diff --git a/apps/isa-app/src/shared/components/select/select.component.ts b/apps/isa-app/src/shared/components/select/select.component.ts index 96f73bb66..325b03a14 100644 --- a/apps/isa-app/src/shared/components/select/select.component.ts +++ b/apps/isa-app/src/shared/components/select/select.component.ts @@ -35,7 +35,10 @@ import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop'; imports: [IconComponent, NgIf], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true }], }) -export class SelectComponent extends BaseFormControlDirective implements AfterContentInit, ControlValueAccessor, OnDestroy { +export class SelectComponent + extends BaseFormControlDirective + implements AfterContentInit, ControlValueAccessor, OnDestroy +{ private destroyRef = inject(DestroyRef); @ContentChildren(SelectOptionComponent) diff --git a/apps/isa-app/src/shared/directives/router-link-active/regex-router-link-active.directive.ts b/apps/isa-app/src/shared/directives/router-link-active/regex-router-link-active.directive.ts index d750e08b2..8a3dedd12 100644 --- a/apps/isa-app/src/shared/directives/router-link-active/regex-router-link-active.directive.ts +++ b/apps/isa-app/src/shared/directives/router-link-active/regex-router-link-active.directive.ts @@ -1,5 +1,15 @@ import { coerceStringArray } from '@angular/cdk/coercion'; -import { DestroyRef, Directive, ElementRef, EventEmitter, Input, OnInit, Output, Renderer2, inject } from '@angular/core'; +import { + DestroyRef, + Directive, + ElementRef, + EventEmitter, + Input, + OnInit, + Output, + Renderer2, + inject, +} from '@angular/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { NavigationEnd, Router } from '@angular/router'; import { ComponentStore } from '@ngrx/component-store'; @@ -11,7 +21,10 @@ export interface SharedRouterLinkActiveDirectiveState { } @Directive({ selector: '[sharedRegexRouterLinkActive]', standalone: true }) -export class RegexRouterLinkActiveDirective extends ComponentStore implements OnInit { +export class RegexRouterLinkActiveDirective + extends ComponentStore + implements OnInit +{ destroyRef = inject(DestroyRef); router = inject(Router); diff --git a/apps/isa-app/src/shared/pipes/customer/country.pipe.ts b/apps/isa-app/src/shared/pipes/customer/country.pipe.ts index fe70b475d..cebcc286d 100644 --- a/apps/isa-app/src/shared/pipes/customer/country.pipe.ts +++ b/apps/isa-app/src/shared/pipes/customer/country.pipe.ts @@ -16,7 +16,12 @@ export class CountryPipe implements PipeTransform, OnDestroy { private inputKey = new BehaviorSubject(undefined); private displayKey = new BehaviorSubject(undefined); - private countrySubscription = combineLatest([this.inputValue, this.inputKey, this.displayKey, this.customerService.getCountries()]) + private countrySubscription = combineLatest([ + this.inputValue, + this.inputKey, + this.displayKey, + this.customerService.getCountries(), + ]) .pipe(debounceTime(1)) .subscribe(([value, inputKey, displayKey, countries]) => { let nextResult = this.result; diff --git a/apps/isa-app/src/shared/pipes/product-group/product-group.pipe.ts b/apps/isa-app/src/shared/pipes/product-group/product-group.pipe.ts index de365d760..42a889998 100644 --- a/apps/isa-app/src/shared/pipes/product-group/product-group.pipe.ts +++ b/apps/isa-app/src/shared/pipes/product-group/product-group.pipe.ts @@ -19,7 +19,9 @@ export class SharedProductGroupPipe implements PipeTransform, OnDestroy { switchMap((productGroup) => this._domainRemission .getProductGroups() - .pipe(map((productGroups) => productGroups.find((productGroupItem) => productGroupItem.key === productGroup))), + .pipe( + map((productGroups) => productGroups.find((productGroupItem) => productGroupItem.key === productGroup)), + ), ), ) .subscribe((productGroup) => { diff --git a/apps/isa-app/src/shared/services/navigation/checkout-navigation.service.ts b/apps/isa-app/src/shared/services/navigation/checkout-navigation.service.ts index 13f3263da..7cbf43436 100644 --- a/apps/isa-app/src/shared/services/navigation/checkout-navigation.service.ts +++ b/apps/isa-app/src/shared/services/navigation/checkout-navigation.service.ts @@ -8,19 +8,36 @@ export class CheckoutNavigationService extends NavigationService { super(_router); } - getCheckoutReviewPath(processId?: number): { path: any[]; extras?: NavigationExtras; navigate: () => Promise } { - const path = ['/kunde', processId, 'cart', { outlets: { primary: ['review'], side: ['details'] } }].filter((x) => !!x); - return { path, navigate: this._createNavigationFn(path) }; - } - - getCheckoutSummaryPath({ processId, orderIds, extras }: { processId?: number; orderIds?: string; extras?: NavigationExtras }): { + getCheckoutReviewPath(processId?: number): { path: any[]; extras?: NavigationExtras; navigate: () => Promise; } { - const path = ['/kunde', processId, 'cart', { outlets: { primary: ['summary', orderIds].filter((x) => !!x), side: null } }].filter( + const path = ['/kunde', processId, 'cart', { outlets: { primary: ['review'], side: ['details'] } }].filter( (x) => !!x, ); + return { path, navigate: this._createNavigationFn(path) }; + } + + getCheckoutSummaryPath({ + processId, + orderIds, + extras, + }: { + processId?: number; + orderIds?: string; + extras?: NavigationExtras; + }): { + path: any[]; + extras?: NavigationExtras; + navigate: () => Promise; + } { + const path = [ + '/kunde', + processId, + 'cart', + { outlets: { primary: ['summary', orderIds].filter((x) => !!x), side: null } }, + ].filter((x) => !!x); return { path, navigate: this._createNavigationFn(path, extras), diff --git a/apps/isa-app/src/shared/services/navigation/customer-create.navigation.ts b/apps/isa-app/src/shared/services/navigation/customer-create.navigation.ts index 226070b92..8704039d6 100644 --- a/apps/isa-app/src/shared/services/navigation/customer-create.navigation.ts +++ b/apps/isa-app/src/shared/services/navigation/customer-create.navigation.ts @@ -36,7 +36,11 @@ export class CustomerCreateNavigation { return this._router.navigate(route.path, { queryParams: route.queryParams }); } - createCustomerRoute(params: { processId: NumberInput; customerType?: string; customerInfo?: CustomerInfoDTO }): NavigationRoute { + createCustomerRoute(params: { + processId: NumberInput; + customerType?: string; + customerInfo?: CustomerInfoDTO; + }): NavigationRoute { const path = [ '/kunde', coerceNumberProperty(params.processId), @@ -49,7 +53,9 @@ export class CustomerCreateNavigation { }, ]; - let formData = params?.customerInfo ? encodeFormData(mapCustomerInfoDtoToCustomerCreateFormData(params.customerInfo)) : undefined; + let formData = params?.customerInfo + ? encodeFormData(mapCustomerInfoDtoToCustomerCreateFormData(params.customerInfo)) + : undefined; const urlTree = this._router.createUrlTree(path, { queryParams: { @@ -66,7 +72,13 @@ export class CustomerCreateNavigation { }; } - upgradeCustomerRoute({ processId, customerInfo }: { processId: NumberInput; customerInfo: CustomerInfoDTO }): NavigationRoute { + upgradeCustomerRoute({ + processId, + customerInfo, + }: { + processId: NumberInput; + customerInfo: CustomerInfoDTO; + }): NavigationRoute { const formData = encodeFormData(mapCustomerInfoDtoToCustomerCreateFormData(customerInfo)); const path = [ '/kunde', @@ -74,7 +86,10 @@ export class CustomerCreateNavigation { 'customer', { outlets: { - primary: ['create', customerInfo?.features?.find((feature) => feature.key === 'webshop') ? 'webshop-p4m' : 'store-p4m'], + primary: [ + 'create', + customerInfo?.features?.find((feature) => feature.key === 'webshop') ? 'webshop-p4m' : 'store-p4m', + ], side: 'create-customer-main', }, }, diff --git a/apps/isa-app/src/shared/services/navigation/customer-orders-navigation.service.ts b/apps/isa-app/src/shared/services/navigation/customer-orders-navigation.service.ts index bc52bb850..05fbc459b 100644 --- a/apps/isa-app/src/shared/services/navigation/customer-orders-navigation.service.ts +++ b/apps/isa-app/src/shared/services/navigation/customer-orders-navigation.service.ts @@ -8,8 +8,14 @@ export class CustomerOrdersNavigationService extends NavigationService { super(_router); } - getCustomerOrdersBasePath(processId?: number): { path: any[]; extras?: NavigationExtras; navigate: () => Promise } { - const path = ['/kunde', processId, 'order', { outlets: { primary: ['filter'], side: ['search'] } }].filter((x) => !!x); + getCustomerOrdersBasePath(processId?: number): { + path: any[]; + extras?: NavigationExtras; + navigate: () => Promise; + } { + const path = ['/kunde', processId, 'order', { outlets: { primary: ['filter'], side: ['search'] } }].filter( + (x) => !!x, + ); return { path, navigate: this._createNavigationFn(path) }; } @@ -41,7 +47,12 @@ export class CustomerOrdersNavigationService extends NavigationService { '/kunde', processId, 'order', - { outlets: { primary: ['filter', orderId, compartmentCode, processingStatus].filter((x) => !!x), side: ['results'] } }, + { + outlets: { + primary: ['filter', orderId, compartmentCode, processingStatus].filter((x) => !!x), + side: ['results'], + }, + }, ].filter((x) => !!x); return { path, diff --git a/apps/isa-app/src/shared/services/navigation/customer-search.navigation.ts b/apps/isa-app/src/shared/services/navigation/customer-search.navigation.ts index 4c5231ce7..53b79e125 100644 --- a/apps/isa-app/src/shared/services/navigation/customer-search.navigation.ts +++ b/apps/isa-app/src/shared/services/navigation/customer-search.navigation.ts @@ -31,7 +31,11 @@ export class CustomerSearchNavigation { return this._router.navigate(route.path, { queryParams: route.queryParams }); } - detailsRoute(params: { processId: NumberInput; customerId: NumberInput; customer?: CustomerDTO | CustomerInfoDTO }): NavigationRoute { + detailsRoute(params: { + processId: NumberInput; + customerId: NumberInput; + customer?: CustomerDTO | CustomerInfoDTO; + }): NavigationRoute { const path = [ '/kunde', coerceNumberProperty(params.processId), @@ -55,7 +59,11 @@ export class CustomerSearchNavigation { }; } - navigateToDetails(params: { processId: NumberInput; customerId: NumberInput; customer?: CustomerDTO }): Promise { + navigateToDetails(params: { + processId: NumberInput; + customerId: NumberInput; + customer?: CustomerDTO; + }): Promise { const route = this.detailsRoute(params); return this._router.navigate(route.path, { queryParams: route.queryParams }); } @@ -87,14 +95,24 @@ export class CustomerSearchNavigation { return this._router.navigate(route.path, { queryParams: route.queryParams }); } - editBillingAddressRoute(params: { processId: NumberInput; customerId: NumberInput; payerId: NumberInput }): NavigationRoute { + editBillingAddressRoute(params: { + processId: NumberInput; + customerId: NumberInput; + payerId: NumberInput; + }): NavigationRoute { const path = [ '/kunde', coerceNumberProperty(params.processId), 'customer', { outlets: { - primary: ['search', coerceNumberProperty(params.customerId), 'billingaddress', coerceNumberProperty(params.payerId), 'edit'], + primary: [ + 'search', + coerceNumberProperty(params.customerId), + 'billingaddress', + coerceNumberProperty(params.payerId), + 'edit', + ], side: 'results', }, }, @@ -109,7 +127,11 @@ export class CustomerSearchNavigation { }; } - navigateToEditBillingAddress(params: { processId: NumberInput; customerId: NumberInput; payerId: NumberInput }): Promise { + navigateToEditBillingAddress(params: { + processId: NumberInput; + customerId: NumberInput; + payerId: NumberInput; + }): Promise { const route = this.editBillingAddressRoute(params); return this._router.navigate(route.path, { queryParams: route.queryParams }); } @@ -141,7 +163,11 @@ export class CustomerSearchNavigation { return this._router.navigate(route.path, { queryParams: route.queryParams }); } - editShippingAddressRoute(params: { processId: NumberInput; customerId: NumberInput; shippingAddressId: NumberInput }): NavigationRoute { + editShippingAddressRoute(params: { + processId: NumberInput; + customerId: NumberInput; + shippingAddressId: NumberInput; + }): NavigationRoute { const path = [ '/kunde', coerceNumberProperty(params.processId), @@ -169,7 +195,11 @@ export class CustomerSearchNavigation { }; } - ordersRoute(params: { processId: NumberInput; customerId: NumberInput; customer?: CustomerDTO | CustomerInfoDTO }): NavigationRoute { + ordersRoute(params: { + processId: NumberInput; + customerId: NumberInput; + customer?: CustomerDTO | CustomerInfoDTO; + }): NavigationRoute { const path = [ '/kunde', coerceNumberProperty(params.processId), @@ -275,7 +305,12 @@ export class CustomerSearchNavigation { 'customer', { outlets: { - primary: ['search', coerceNumberProperty(params.customerId), 'edit', params.isB2b ? 'b2b' : undefined]?.filter((v) => !!v), + primary: [ + 'search', + coerceNumberProperty(params.customerId), + 'edit', + params.isB2b ? 'b2b' : undefined, + ]?.filter((v) => !!v), side: 'results', }, }, diff --git a/apps/isa-app/src/shared/services/navigation/pickup-shelf-in-navigation.service.ts b/apps/isa-app/src/shared/services/navigation/pickup-shelf-in-navigation.service.ts index 7321d5529..831377234 100644 --- a/apps/isa-app/src/shared/services/navigation/pickup-shelf-in-navigation.service.ts +++ b/apps/isa-app/src/shared/services/navigation/pickup-shelf-in-navigation.service.ts @@ -38,7 +38,9 @@ export class PickupShelfInNavigationService { } filterRoute(): NavigationRoute { - const path = ['/filiale', 'pickup-shelf', { outlets: { primary: ['list', 'filter'], side: ['list'] } }].filter((v) => !!v); + const path = ['/filiale', 'pickup-shelf', { outlets: { primary: ['list', 'filter'], side: ['list'] } }].filter( + (v) => !!v, + ); const queryParams = {}; diff --git a/apps/isa-app/src/shared/services/navigation/pickup-shelf-out-navigation.service.ts b/apps/isa-app/src/shared/services/navigation/pickup-shelf-out-navigation.service.ts index 5b33e1b73..9508ff8f0 100644 --- a/apps/isa-app/src/shared/services/navigation/pickup-shelf-out-navigation.service.ts +++ b/apps/isa-app/src/shared/services/navigation/pickup-shelf-out-navigation.service.ts @@ -9,7 +9,9 @@ export class PickUpShelfOutNavigationService { private readonly _router = inject(Router); defaultRoute({ processId }: { processId?: number }): NavigationRoute { - const path = ['/kunde', processId, 'pickup-shelf', { outlets: { primary: ['main'], side: ['search'] } }].filter((v) => !!v); + const path = ['/kunde', processId, 'pickup-shelf', { outlets: { primary: ['main'], side: ['search'] } }].filter( + (v) => !!v, + ); const queryParams = {}; @@ -23,9 +25,12 @@ export class PickUpShelfOutNavigationService { } listRoute({ processId }: { processId?: number }): NavigationRoute { - const path = ['/kunde', processId ? processId : undefined, 'pickup-shelf', { outlets: { primary: ['list'], side: null } }].filter( - (v) => !!v, - ); + const path = [ + '/kunde', + processId ? processId : undefined, + 'pickup-shelf', + { outlets: { primary: ['list'], side: null } }, + ].filter((v) => !!v); const queryParams = {}; @@ -99,9 +104,14 @@ export class PickUpShelfOutNavigationService { 'pickup-shelf', { outlets: { - primary: ['order', item.orderId, encodeURIComponent(item.orderNumber), 'item', 'status', item.processingStatus].filter( - (v) => !!v, - ), + primary: [ + 'order', + item.orderId, + encodeURIComponent(item.orderNumber), + 'item', + 'status', + item.processingStatus, + ].filter((v) => !!v), side: ['list'], }, }, @@ -162,9 +172,15 @@ export class PickUpShelfOutNavigationService { 'pickup-shelf', { outlets: { - primary: ['order', item.orderId, encodeURIComponent(item.orderNumber), 'item', 'status', item.processingStatus, 'edit'].filter( - (v) => !!v, - ), + primary: [ + 'order', + item.orderId, + encodeURIComponent(item.orderNumber), + 'item', + 'status', + item.processingStatus, + 'edit', + ].filter((v) => !!v), side: ['list'], }, }, diff --git a/apps/isa-app/src/shared/services/navigation/product-catalog-navigation.service.ts b/apps/isa-app/src/shared/services/navigation/product-catalog-navigation.service.ts index 758f2bed0..c31ac38cf 100644 --- a/apps/isa-app/src/shared/services/navigation/product-catalog-navigation.service.ts +++ b/apps/isa-app/src/shared/services/navigation/product-catalog-navigation.service.ts @@ -8,8 +8,14 @@ export class ProductCatalogNavigationService extends NavigationService { super(_router); } - getArticleSearchBasePath(processId?: number): { path: any[]; extras?: NavigationExtras; navigate: () => Promise } { - const path = ['/kunde', processId, 'product', { outlets: { primary: ['filter'], side: ['search'] } }].filter((x) => !!x); + getArticleSearchBasePath(processId?: number): { + path: any[]; + extras?: NavigationExtras; + navigate: () => Promise; + } { + const path = ['/kunde', processId, 'product', { outlets: { primary: ['filter'], side: ['search'] } }].filter( + (x) => !!x, + ); return { path, navigate: this._createNavigationFn(path) }; } @@ -24,7 +30,15 @@ export class ProductCatalogNavigationService extends NavigationService { }; } - getArticleSearchResultsAndFilterPath({ processId, itemId, extras }: { processId?: number; itemId?: number; extras?: NavigationExtras }): { + getArticleSearchResultsAndFilterPath({ + processId, + itemId, + extras, + }: { + processId?: number; + itemId?: number; + extras?: NavigationExtras; + }): { path: any[]; extras?: NavigationExtras; navigate: () => Promise; @@ -41,7 +55,16 @@ export class ProductCatalogNavigationService extends NavigationService { }; } - getArticleDetailsPath({ processId, itemId, extras }: { processId: number; itemId?: number; ean?: string; extras?: NavigationExtras }): { + getArticleDetailsPath({ + processId, + itemId, + extras, + }: { + processId: number; + itemId?: number; + ean?: string; + extras?: NavigationExtras; + }): { path: any[]; extras?: NavigationExtras; navigate: () => Promise; @@ -58,7 +81,16 @@ export class ProductCatalogNavigationService extends NavigationService { }; } - getArticleDetailsPathByEan({ processId, ean, extras }: { processId: number; itemId?: number; ean?: string; extras?: NavigationExtras }): { + getArticleDetailsPathByEan({ + processId, + ean, + extras, + }: { + processId: number; + itemId?: number; + ean?: string; + extras?: NavigationExtras; + }): { path: any[]; extras?: NavigationExtras; navigate: () => Promise; @@ -67,7 +99,12 @@ export class ProductCatalogNavigationService extends NavigationService { '/kunde', processId, 'product', - { outlets: { primary: ['details', ean, 'ean'].filter((x) => !!x), side: ['results', ean, 'ean'].filter((x) => !!x) } }, + { + outlets: { + primary: ['details', ean, 'ean'].filter((x) => !!x), + side: ['results', ean, 'ean'].filter((x) => !!x), + }, + }, ].filter((x) => !!x); return { path, diff --git a/apps/isa-app/src/shared/shell/process-bar/process-bar-item/process-bar-item.component.ts b/apps/isa-app/src/shared/shell/process-bar/process-bar-item/process-bar-item.component.ts index 6774d6ee6..3b722d319 100644 --- a/apps/isa-app/src/shared/shell/process-bar/process-bar-item/process-bar-item.component.ts +++ b/apps/isa-app/src/shared/shell/process-bar/process-bar-item/process-bar-item.component.ts @@ -83,7 +83,9 @@ export class ShellProcessBarItemComponent implements OnInit, OnDestroy, OnChange } initLatestBreadcrumb$() { - this.latestBreadcrumb$ = this.process$.pipe(switchMap((process) => this._breadcrumb.getLastActivatedBreadcrumbByKey$(process?.id))); + this.latestBreadcrumb$ = this.process$.pipe( + switchMap((process) => this._breadcrumb.getLastActivatedBreadcrumbByKey$(process?.id)), + ); } initRouterLink$() { diff --git a/apps/isa-app/src/shared/shell/process-bar/process-bar.component.ts b/apps/isa-app/src/shared/shell/process-bar/process-bar.component.ts index ed8199771..7396f72db 100644 --- a/apps/isa-app/src/shared/shell/process-bar/process-bar.component.ts +++ b/apps/isa-app/src/shared/shell/process-bar/process-bar.component.ts @@ -134,7 +134,10 @@ export class ShellProcessBarComponent implements OnInit { if (processes.length === 0) { this._router.navigate(['/kunde', 'dashboard']); } else { - const lastest = processes.reduce((prev, current) => (prev.activated > current.activated ? prev : current), processes[0]); + const lastest = processes.reduce( + (prev, current) => (prev.activated > current.activated ? prev : current), + processes[0], + ); const crumb = await this._breadcrumb.getLastActivatedBreadcrumbByKey$(lastest.id).pipe(first()).toPromise(); if (crumb) { this._router.navigate(coerceArray(crumb.path), { queryParams: crumb.params }); diff --git a/apps/isa-app/src/shared/shell/side-menu/side-menu.component.html b/apps/isa-app/src/shared/shell/side-menu/side-menu.component.html index 61bf61368..388741943 100644 --- a/apps/isa-app/src/shared/shell/side-menu/side-menu.component.html +++ b/apps/isa-app/src/shared/shell/side-menu/side-menu.component.html @@ -1,5 +1,5 @@
@@ -80,7 +80,7 @@ - Warenausgabe + Warenausgabe - Bestellungen + Bestellungen
@@ -232,7 +232,7 @@ - Remission + Remission - Wareneingang + Wareneingang
diff --git a/apps/isa-app/src/shared/shell/side-menu/side-menu.component.ts b/apps/isa-app/src/shared/shell/side-menu/side-menu.component.ts index 3b62f1c99..e999996e9 100644 --- a/apps/isa-app/src/shared/shell/side-menu/side-menu.component.ts +++ b/apps/isa-app/src/shared/shell/side-menu/side-menu.component.ts @@ -193,7 +193,11 @@ export class ShellSideMenuComponent { this._cdr.markForCheck(); } - getLastNavigationByProcessId(id: number, fallback?: { path: string[]; queryParams: any }, pathContainsString?: string) { + getLastNavigationByProcessId( + id: number, + fallback?: { path: string[]; queryParams: any }, + pathContainsString?: string, + ) { return this._breadcrumbService.getBreadcrumbByKey$(id)?.pipe( map((breadcrumbs) => { const lastCrumb = breadcrumbs @@ -257,7 +261,9 @@ export class ShellSideMenuComponent { } checkIfArrayContainsUndefinedOrNull(array: any[]) { - return array?.includes(undefined) || array?.includes('undefined') || array?.includes(null) || array?.includes('null'); + return ( + array?.includes(undefined) || array?.includes('undefined') || array?.includes(null) || array?.includes('null') + ); } getLastActivatedCustomerProcessId$() { diff --git a/apps/isa-app/src/shared/shell/top-bar/top-bar.component.html b/apps/isa-app/src/shared/shell/top-bar/top-bar.component.html index 439a78676..da7fcc52a 100644 --- a/apps/isa-app/src/shared/shell/top-bar/top-bar.component.html +++ b/apps/isa-app/src/shared/shell/top-bar/top-bar.component.html @@ -27,7 +27,8 @@
- Dashboard + + Dashboard - {{ monthName$ | async }} {{ yearName$ | async }} + {{ monthName$ | async }} {{ yearName$ | async }} diff --git a/apps/isa-app/src/ui/filter/filter-group/components/filter-group/filter-group.component.scss b/apps/isa-app/src/ui/filter/filter-group/components/filter-group/filter-group.component.scss index 387b0ecc5..fe620aa19 100644 --- a/apps/isa-app/src/ui/filter/filter-group/components/filter-group/filter-group.component.scss +++ b/apps/isa-app/src/ui/filter/filter-group/components/filter-group/filter-group.component.scss @@ -23,7 +23,7 @@ } ::ng-deep ui-filter-group, -::ng-deep [theme='customer'] ui-filter-group { +::ng-deep [theme="customer"] ui-filter-group { ui-icon { @apply text-glitter; } @@ -37,7 +37,7 @@ } } -::ng-deep ui-filter-group[theme='filter'] { +::ng-deep ui-filter-group[theme="filter"] { ui-icon { @apply text-wild-blue-yonder; } @@ -58,7 +58,7 @@ } } -::ng-deep [theme='branch'] ui-filter-group { +::ng-deep [theme="branch"] ui-filter-group { ui-icon { @apply text-munsell; } diff --git a/apps/isa-app/src/ui/filter/filter-group/components/range-filter/range-filter.component.ts b/apps/isa-app/src/ui/filter/filter-group/components/range-filter/range-filter.component.ts index 5329bc4ef..fde756b8b 100644 --- a/apps/isa-app/src/ui/filter/filter-group/components/range-filter/range-filter.component.ts +++ b/apps/isa-app/src/ui/filter/filter-group/components/range-filter/range-filter.component.ts @@ -1,4 +1,13 @@ -import { Component, ChangeDetectionStrategy, Input, ChangeDetectorRef, OnInit, Output, OnChanges, EventEmitter } from '@angular/core'; +import { + Component, + ChangeDetectionStrategy, + Input, + ChangeDetectorRef, + OnInit, + Output, + OnChanges, + EventEmitter, +} from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; import { RangeFilter, SelectFilter } from '../../../models'; import { FilterGroup } from '../../filter-group'; diff --git a/apps/isa-app/src/ui/filter/filter-group/components/range-filter/range-filter.validator.ts b/apps/isa-app/src/ui/filter/filter-group/components/range-filter/range-filter.validator.ts index f80677032..9610347e6 100644 --- a/apps/isa-app/src/ui/filter/filter-group/components/range-filter/range-filter.validator.ts +++ b/apps/isa-app/src/ui/filter/filter-group/components/range-filter/range-filter.validator.ts @@ -2,33 +2,39 @@ import { AbstractControl, ValidationErrors } from '@angular/forms'; import { RangeFilter, RangeFilterOption } from '../../../models'; import { FilterGroup } from '../../filter-group'; -export const maxValueRelativeTo = (relativeToSelector: (control: AbstractControl) => AbstractControl) => (control: AbstractControl) => { - const relativeTo: AbstractControl = relativeToSelector?.call(null, control); +export const maxValueRelativeTo = + (relativeToSelector: (control: AbstractControl) => AbstractControl) => (control: AbstractControl) => { + const relativeTo: AbstractControl = relativeToSelector?.call(null, control); + + if (!relativeTo || !relativeTo.value || !control.value) { + return null; + } + + if (+control.value > +relativeTo.value) { + return { + maxValueRelativeTo: `"Von" ${control.value} darf nicht größer sein als "Bis" ${relativeTo.value} sein.`, + }; + } - if (!relativeTo || !relativeTo.value || !control.value) { return null; - } + }; - if (+control.value > +relativeTo.value) { - return { maxValueRelativeTo: `"Von" ${control.value} darf nicht größer sein als "Bis" ${relativeTo.value} sein.` }; - } +export const minValueRelativeTo = + (relativeToSelector: (control: AbstractControl) => AbstractControl) => (control: AbstractControl) => { + const relativeTo: AbstractControl = relativeToSelector?.call(null, control); - return null; -}; + if (!relativeTo || !relativeTo.value || !control.value) { + return null; + } -export const minValueRelativeTo = (relativeToSelector: (control: AbstractControl) => AbstractControl) => (control: AbstractControl) => { - const relativeTo: AbstractControl = relativeToSelector?.call(null, control); + if (+control.value < +relativeTo.value) { + return { + maxValueRelativeTo: `"Bis" ${control.value} darf nicht kleiner sein als "Von" ${relativeTo.value} sein.`, + }; + } - if (!relativeTo || !relativeTo.value || !control.value) { return null; - } - - if (+control.value < +relativeTo.value) { - return { maxValueRelativeTo: `"Bis" ${control.value} darf nicht kleiner sein als "Von" ${relativeTo.value} sein.` }; - } - - return null; -}; + }; export function startValidator(filter: RangeFilter, filterGroup: FilterGroup, preSelectCategory: () => void) { return (control: AbstractControl): null | ValidationErrors => { @@ -90,7 +96,11 @@ function checkBoundaries(value: string, option: RangeFilterOption): string { if (Number(value) <= Number(option.maxValue) && Number(value) >= Number(option.minValue)) { return value; } else { - return Number(value) > Number(option.maxValue) ? option.maxValue : Number(value) < Number(option.minValue) ? option.minValue : ''; + return Number(value) > Number(option.maxValue) + ? option.maxValue + : Number(value) < Number(option.minValue) + ? option.minValue + : ''; } } diff --git a/apps/isa-app/src/ui/filter/filter-group/components/select-filter/select-filter-option.component.ts b/apps/isa-app/src/ui/filter/filter-group/components/select-filter/select-filter-option.component.ts index f59970e19..05d464934 100644 --- a/apps/isa-app/src/ui/filter/filter-group/components/select-filter/select-filter-option.component.ts +++ b/apps/isa-app/src/ui/filter/filter-group/components/select-filter/select-filter-option.component.ts @@ -1,4 +1,13 @@ -import { Component, Input, ChangeDetectionStrategy, Output, EventEmitter, ChangeDetectorRef, OnChanges, OnInit } from '@angular/core'; +import { + Component, + Input, + ChangeDetectionStrategy, + Output, + EventEmitter, + ChangeDetectorRef, + OnChanges, + OnInit, +} from '@angular/core'; import { SelectFilter, SelectFilterOption } from '../../../models'; import { FilterGroup } from '../../filter-group'; diff --git a/apps/isa-app/src/ui/filter/filter-group/filter-group.module.ts b/apps/isa-app/src/ui/filter/filter-group/filter-group.module.ts index 495705e0f..ea35f2493 100644 --- a/apps/isa-app/src/ui/filter/filter-group/filter-group.module.ts +++ b/apps/isa-app/src/ui/filter/filter-group/filter-group.module.ts @@ -11,7 +11,12 @@ import { UiCheckboxModule } from '@ui/checkbox'; @NgModule({ imports: [CommonModule, UiIconModule, FormsModule, UiInputModule, ReactiveFormsModule, UiCheckboxModule], exports: [UiFilterGroupComponent, FormsModule, UiCheckboxModule], - declarations: [UiFilterGroupComponent, UiSelectFilterComponent, UiSelectFilterOptionComponent, UiRangeFilterComponent], + declarations: [ + UiFilterGroupComponent, + UiSelectFilterComponent, + UiSelectFilterOptionComponent, + UiRangeFilterComponent, + ], providers: [], }) export class UiFilterGroupModule {} diff --git a/apps/isa-app/src/ui/filter/filter-group/filter-group.ts b/apps/isa-app/src/ui/filter/filter-group/filter-group.ts index 54d304773..b81cad2ee 100644 --- a/apps/isa-app/src/ui/filter/filter-group/filter-group.ts +++ b/apps/isa-app/src/ui/filter/filter-group/filter-group.ts @@ -125,7 +125,10 @@ export abstract class FilterGroup { } } - getSubOptionRef(filter: SelectFilter, option: SelectFilterOption): { subOption: SelectFilterOption; parentOption: SelectFilterOption } { + getSubOptionRef( + filter: SelectFilter, + option: SelectFilterOption, + ): { subOption: SelectFilterOption; parentOption: SelectFilterOption } { let subOption: SelectFilterOption; let parentOption: SelectFilterOption; const filterRef = this.getSelectFilterRef(filter); diff --git a/apps/isa-app/src/ui/filter/next/filter-group/filter-filter-group-filter/filter-filter-group-filter.component.html b/apps/isa-app/src/ui/filter/next/filter-group/filter-filter-group-filter/filter-filter-group-filter.component.html index 4795d3ba6..982eec45b 100644 --- a/apps/isa-app/src/ui/filter/next/filter-group/filter-filter-group-filter/filter-filter-group-filter.component.html +++ b/apps/isa-app/src/ui/filter/next/filter-group/filter-filter-group-filter/filter-filter-group-filter.component.html @@ -22,14 +22,13 @@ [class.remove-rounded-top-left]="isFirstInputSelected" class="options" [inputOptions]="activeInput?.options" -> - +>

{{ activeInput?.description }}

- + diff --git a/apps/isa-app/src/ui/filter/next/filter-group/filter-filter-group-filter/filter-filter-group-filter.component.ts b/apps/isa-app/src/ui/filter/next/filter-group/filter-filter-group-filter/filter-filter-group-filter.component.ts index b026ac624..2cc98e35e 100644 --- a/apps/isa-app/src/ui/filter/next/filter-group/filter-filter-group-filter/filter-filter-group-filter.component.ts +++ b/apps/isa-app/src/ui/filter/next/filter-group/filter-filter-group-filter/filter-filter-group-filter.component.ts @@ -28,7 +28,10 @@ export class UiFilterFilterGroupFilterComponent { private _activeInput: UiInput; get activeInput() { - return this.uiInputGroup?.input?.find((f) => f?.key === this._activeInput?.key) || this.uiInputGroup?.input?.find((f) => f); + return ( + this.uiInputGroup?.input?.find((f) => f?.key === this._activeInput?.key) || + this.uiInputGroup?.input?.find((f) => f) + ); } get isFirstInputSelected() { diff --git a/apps/isa-app/src/ui/filter/next/order-by-filter/order-by-filter.component.ts b/apps/isa-app/src/ui/filter/next/order-by-filter/order-by-filter.component.ts index fd14f4e63..f1b6701d8 100644 --- a/apps/isa-app/src/ui/filter/next/order-by-filter/order-by-filter.component.ts +++ b/apps/isa-app/src/ui/filter/next/order-by-filter/order-by-filter.component.ts @@ -1,4 +1,12 @@ -import { Component, ChangeDetectionStrategy, Input, ChangeDetectorRef, Output, EventEmitter, OnInit } from '@angular/core'; +import { + Component, + ChangeDetectionStrategy, + Input, + ChangeDetectorRef, + Output, + EventEmitter, + OnInit, +} from '@angular/core'; import { UiOrderBy } from '@ui/filter'; @Component({ diff --git a/apps/isa-app/src/ui/filter/next/shared/filter-input-options/filter-input-option-bool/filter-input-option-bool.component.ts b/apps/isa-app/src/ui/filter/next/shared/filter-input-options/filter-input-option-bool/filter-input-option-bool.component.ts index 2da18f76f..2ee3c3e08 100644 --- a/apps/isa-app/src/ui/filter/next/shared/filter-input-options/filter-input-option-bool/filter-input-option-bool.component.ts +++ b/apps/isa-app/src/ui/filter/next/shared/filter-input-options/filter-input-option-bool/filter-input-option-bool.component.ts @@ -1,4 +1,12 @@ -import { Component, ChangeDetectionStrategy, Input, ChangeDetectorRef, OnDestroy, Output, EventEmitter } from '@angular/core'; +import { + Component, + ChangeDetectionStrategy, + Input, + ChangeDetectorRef, + OnDestroy, + Output, + EventEmitter, +} from '@angular/core'; import { Subscription } from 'rxjs'; import { IUiOption, UiOption } from '../../../tree'; diff --git a/apps/isa-app/src/ui/filter/next/shared/filter-input-options/filter-input-option-date-range/filter-input-option-date-range.component.html b/apps/isa-app/src/ui/filter/next/shared/filter-input-options/filter-input-option-date-range/filter-input-option-date-range.component.html index 2dafe40dc..ecc1a0a6e 100644 --- a/apps/isa-app/src/ui/filter/next/shared/filter-input-options/filter-input-option-date-range/filter-input-option-date-range.component.html +++ b/apps/isa-app/src/ui/filter/next/shared/filter-input-options/filter-input-option-date-range/filter-input-option-date-range.component.html @@ -8,7 +8,7 @@ [attr.data-selected]="uiStartOption?.selected" >
- {{ uiStartOption?.label }}: + {{ uiStartOption?.label }}:
- {{ uiStopOption?.label }}: + {{ uiStopOption?.label }}:
diff --git a/apps/isa-app/src/ui/filter/next/shared/filter-input-options/filter-input-option-tri-state/filter-input-option-tri-state.component.html b/apps/isa-app/src/ui/filter/next/shared/filter-input-options/filter-input-option-tri-state/filter-input-option-tri-state.component.html index e9255cd38..2dd0e598d 100644 --- a/apps/isa-app/src/ui/filter/next/shared/filter-input-options/filter-input-option-tri-state/filter-input-option-tri-state.component.html +++ b/apps/isa-app/src/ui/filter/next/shared/filter-input-options/filter-input-option-tri-state/filter-input-option-tri-state.component.html @@ -6,7 +6,7 @@ [attr.data-selected]="uiOption?.selected" >
- + {{ uiOption?.label }}
- - - - + + diff --git a/apps/isa-app/src/ui/filter/next/shared/filter-input-options/filter-input-options.component.ts b/apps/isa-app/src/ui/filter/next/shared/filter-input-options/filter-input-options.component.ts index f353b655b..9960f48d1 100644 --- a/apps/isa-app/src/ui/filter/next/shared/filter-input-options/filter-input-options.component.ts +++ b/apps/isa-app/src/ui/filter/next/shared/filter-input-options/filter-input-options.component.ts @@ -39,7 +39,8 @@ export class UiFilterInputOptionsComponent { } get scrollPersantage() { - const scrollHeight = this.inputOptionsConainterNative?.scrollHeight - this.inputOptionsConainterNative?.clientHeight; + const scrollHeight = + this.inputOptionsConainterNative?.scrollHeight - this.inputOptionsConainterNative?.clientHeight; if (scrollHeight === 0) { return 0; } diff --git a/apps/isa-app/src/ui/filter/next/testing/query-settings.data.ts b/apps/isa-app/src/ui/filter/next/testing/query-settings.data.ts index b1ea3e6fc..c599968ca 100644 --- a/apps/isa-app/src/ui/filter/next/testing/query-settings.data.ts +++ b/apps/isa-app/src/ui/filter/next/testing/query-settings.data.ts @@ -1,7 +1,12 @@ import { IUiFilter } from '../tree'; export const querySettingsData: IUiFilter = { - input: [{ group: 'main', input: [{ key: 'qs', placeholder: 'ISBN/EAN, Titel, Kundenname', type: 1, constraint: '^.{2,100}$' }] }], + input: [ + { + group: 'main', + input: [{ key: 'qs', placeholder: 'ISBN/EAN, Titel, Kundenname', type: 1, constraint: '^.{2,100}$' }], + }, + ], filter: [ { group: 'main', diff --git a/apps/isa-app/src/ui/filter/selected-filter-options/pipe/selected-filters.pipe.ts b/apps/isa-app/src/ui/filter/selected-filter-options/pipe/selected-filters.pipe.ts index b15b50736..182d60e5f 100644 --- a/apps/isa-app/src/ui/filter/selected-filter-options/pipe/selected-filters.pipe.ts +++ b/apps/isa-app/src/ui/filter/selected-filter-options/pipe/selected-filters.pipe.ts @@ -15,7 +15,8 @@ export class SelectedFiltersPipe implements PipeTransform { private flatten(arr: T[], property: keyof T): T[] { return arr.reduce( - (acc, curr) => acc.concat(Array.isArray(curr[property]) ? this.flatten(curr[property] as unknown as T[], property) : curr), + (acc, curr) => + acc.concat(Array.isArray(curr[property]) ? this.flatten(curr[property] as unknown as T[], property) : curr), [], ); } diff --git a/apps/isa-app/src/ui/filter/selected-filter-options/selected-filter-options.module.ts b/apps/isa-app/src/ui/filter/selected-filter-options/selected-filter-options.module.ts index 0fb74f5bb..49fc934f4 100644 --- a/apps/isa-app/src/ui/filter/selected-filter-options/selected-filter-options.module.ts +++ b/apps/isa-app/src/ui/filter/selected-filter-options/selected-filter-options.module.ts @@ -7,7 +7,12 @@ import { UiIconModule } from '@ui/icon'; @NgModule({ imports: [CommonModule, UiIconModule], exports: [UiSelectedFilterOptionsComponent, CheckAllChildOptionsSelectedPipe, FilterResetWordingPipe], - declarations: [UiSelectedFilterOptionsComponent, SelectedFiltersPipe, FilterResetWordingPipe, CheckAllChildOptionsSelectedPipe], + declarations: [ + UiSelectedFilterOptionsComponent, + SelectedFiltersPipe, + FilterResetWordingPipe, + CheckAllChildOptionsSelectedPipe, + ], providers: [], }) export class UiSelectedFilterOptionsModule {} diff --git a/apps/isa-app/src/ui/filter/utils/flatten-select-filter-option.ts b/apps/isa-app/src/ui/filter/utils/flatten-select-filter-option.ts index 4b024327b..da08ce97e 100644 --- a/apps/isa-app/src/ui/filter/utils/flatten-select-filter-option.ts +++ b/apps/isa-app/src/ui/filter/utils/flatten-select-filter-option.ts @@ -2,7 +2,11 @@ import { SelectFilterOption } from '../models'; export function flattenSelectFilterOption(options: SelectFilterOption[]): SelectFilterOption[] { return options.reduce( - (acc, option) => [...acc, option, ...(Array.isArray(option.options) ? flattenSelectFilterOption(option.options) : [])], + (acc, option) => [ + ...acc, + option, + ...(Array.isArray(option.options) ? flattenSelectFilterOption(option.options) : []), + ], [], ); } diff --git a/apps/isa-app/src/ui/form-control/ui-form-control.component.scss b/apps/isa-app/src/ui/form-control/ui-form-control.component.scss index d1328a30d..ed78fef3e 100644 --- a/apps/isa-app/src/ui/form-control/ui-form-control.component.scss +++ b/apps/isa-app/src/ui/form-control/ui-form-control.component.scss @@ -25,7 +25,7 @@ button.clear { @apply font-bold flex-grow; } - input:not([type='radio']):not([type='checkbox']) { + input:not([type="radio"]):not([type="checkbox"]) { @apply outline-none border-none font-bold text-p1; &:disabled, @@ -34,25 +34,25 @@ button.clear { } } - input[type='radio'], - input[type='checkbox'] { + input[type="radio"], + input[type="checkbox"] { @apply appearance-none bg-current; height: 1em; width: 1em; - &[type='radio'] { - mask: url('/assets/images/radio.svg') no-repeat; + &[type="radio"] { + mask: url("/assets/images/radio.svg") no-repeat; &:checked { - mask: url('/assets/images/radio_checked.svg') no-repeat; + mask: url("/assets/images/radio_checked.svg") no-repeat; } } - &[type='checkbox'] { - mask: url('/assets/images/checkbox.svg') no-repeat; + &[type="checkbox"] { + mask: url("/assets/images/checkbox.svg") no-repeat; &:checked { - mask: url('/assets/images/checkbox_checked.svg') no-repeat; + mask: url("/assets/images/checkbox_checked.svg") no-repeat; } } } @@ -66,8 +66,8 @@ button.clear { } } -:host[type='radio'][variant='default'] ::ng-deep, -:host[type='checkbox'][variant='default'] ::ng-deep { +:host[type="radio"][variant="default"] ::ng-deep, +:host[type="checkbox"][variant="default"] ::ng-deep { .input-wrapper { @apply grid grid-flow-col gap-4; } @@ -95,9 +95,9 @@ button.clear { } } -:host[variant='default'] { +:host[variant="default"] { ::ng-deep { - input:not([type='radio']):not([type='checkbox']), + input:not([type="radio"]):not([type="checkbox"]), ui-select { @apply border-t-0 border-l-0 border-r-0 border-solid pt-px-20 pb-px-10; border-bottom-width: 2px; @@ -111,7 +111,7 @@ button.clear { } } -:host[variant='default']:not([type='radio']):not([type='checkbox']) { +:host[variant="default"]:not([type="radio"]):not([type="checkbox"]) { @apply relative mt-px-20; label { @@ -133,7 +133,7 @@ button.clear { } } -:host[variant='inline'] { +:host[variant="inline"] { .input-wrapper { @apply gap-0; } diff --git a/apps/isa-app/src/ui/form-control/ui-form-control.component.ts b/apps/isa-app/src/ui/form-control/ui-form-control.component.ts index a4560b425..0c9df4f66 100644 --- a/apps/isa-app/src/ui/form-control/ui-form-control.component.ts +++ b/apps/isa-app/src/ui/form-control/ui-form-control.component.ts @@ -73,9 +73,11 @@ export class UiFormControlComponent implements AfterContentInit, OnDestroy { ngAfterContentInit() { if (this.ngControl) { this.subscriptions.add( - combineLatest([this.ngControl.control.statusChanges, this.ngControl.control.valueChanges]).subscribe((value) => { - this.cdr.markForCheck(); - }), + combineLatest([this.ngControl.control.statusChanges, this.ngControl.control.valueChanges]).subscribe( + (value) => { + this.cdr.markForCheck(); + }, + ), ); } } diff --git a/apps/isa-app/src/ui/form-field/form-field.component.scss b/apps/isa-app/src/ui/form-field/form-field.component.scss index d253a1b34..7100ac7d2 100644 --- a/apps/isa-app/src/ui/form-field/form-field.component.scss +++ b/apps/isa-app/src/ui/form-field/form-field.component.scss @@ -26,7 +26,7 @@ .ui-input:required + ui-label::after { display: inline; - content: '*'; + content: "*"; } .ui-input + ui-label { diff --git a/apps/isa-app/src/ui/form-field/form-field.component.ts b/apps/isa-app/src/ui/form-field/form-field.component.ts index f30aca0a9..126814aff 100644 --- a/apps/isa-app/src/ui/form-field/form-field.component.ts +++ b/apps/isa-app/src/ui/form-field/form-field.component.ts @@ -1,4 +1,12 @@ -import { Component, ChangeDetectionStrategy, HostBinding, ViewEncapsulation, ContentChild, AfterContentInit, Input } from '@angular/core'; +import { + Component, + ChangeDetectionStrategy, + HostBinding, + ViewEncapsulation, + ContentChild, + AfterContentInit, + Input, +} from '@angular/core'; import { UiInputDirective } from './input'; import { UiLabelComponent } from './label'; diff --git a/apps/isa-app/src/ui/input/ui-radio-input.directive.ts b/apps/isa-app/src/ui/input/ui-radio-input.directive.ts index bfc3c7869..a404b8e73 100644 --- a/apps/isa-app/src/ui/input/ui-radio-input.directive.ts +++ b/apps/isa-app/src/ui/input/ui-radio-input.directive.ts @@ -35,7 +35,10 @@ import { DOCUMENT } from '@angular/common'; exportAs: 'uiInput', standalone: false, }) -export class UiRadioInputDirective extends UiFormControlDirective implements ControlValueAccessor, OnChanges, OnDestroy { +export class UiRadioInputDirective + extends UiFormControlDirective + implements ControlValueAccessor, OnChanges, OnDestroy +{ @Input() value: any; @@ -71,9 +74,10 @@ export class UiRadioInputDirective extends UiFormControlDirective implement this.uiInputCheckedSubscription.unsubscribe(); } - this.uiInputCheckedSubscription = fromEvent(this.document.querySelectorAll(`input[name=${this.name}]`), 'uiInputChecked').subscribe( - () => this.render(), - ); + this.uiInputCheckedSubscription = fromEvent( + this.document.querySelectorAll(`input[name=${this.name}]`), + 'uiInputChecked', + ).subscribe(() => this.render()); } ngOnChanges({ name }: SimpleChanges): void { diff --git a/apps/isa-app/src/ui/modal/debug-modal/debug-modal.component.ts b/apps/isa-app/src/ui/modal/debug-modal/debug-modal.component.ts index 76b5c420b..f40479fb7 100644 --- a/apps/isa-app/src/ui/modal/debug-modal/debug-modal.component.ts +++ b/apps/isa-app/src/ui/modal/debug-modal/debug-modal.component.ts @@ -4,7 +4,9 @@ import { UiModalRef } from '../defs'; @Component({ selector: 'ui-debug-modal', styleUrls: ['./debug-modal.component.scss'], - template: `
 {{ modalRef.data | json }} 
`, + template: ` +
 {{ modalRef.data | json }} 
+ `, standalone: false, }) export class UiDebugModalComponent implements OnInit { diff --git a/apps/isa-app/src/ui/modal/dialog/open-dialog.interceptor.ts b/apps/isa-app/src/ui/modal/dialog/open-dialog.interceptor.ts index ffb8e412c..5ef09c091 100644 --- a/apps/isa-app/src/ui/modal/dialog/open-dialog.interceptor.ts +++ b/apps/isa-app/src/ui/modal/dialog/open-dialog.interceptor.ts @@ -1,4 +1,11 @@ -import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from '@angular/common/http'; +import { + HttpErrorResponse, + HttpEvent, + HttpHandler, + HttpInterceptor, + HttpRequest, + HttpResponse, +} from '@angular/common/http'; import { Injectable } from '@angular/core'; import { UiModalService } from '../modal.service'; import { UiDialogModalComponent } from './dialog-modal.component'; diff --git a/apps/isa-app/src/ui/modal/error-modal/error-modal.component.ts b/apps/isa-app/src/ui/modal/error-modal/error-modal.component.ts index 25ae2ff58..758f8ad42 100644 --- a/apps/isa-app/src/ui/modal/error-modal/error-modal.component.ts +++ b/apps/isa-app/src/ui/modal/error-modal/error-modal.component.ts @@ -25,7 +25,9 @@ export class UiErrorModalComponent implements OnInit { if (this.error instanceof HttpErrorResponse) { if (isResponseArgs(this.error?.error)) { return ( - this.getMessageFromInvalidProperties(this.error?.error?.invalidProperties) || this.error?.error?.message || this.error?.message + this.getMessageFromInvalidProperties(this.error?.error?.invalidProperties) || + this.error?.error?.message || + this.error?.message ); } return this.getMessageFromHttpErrorResponse(this.error); diff --git a/apps/isa-app/src/ui/modal/modal.component.ts b/apps/isa-app/src/ui/modal/modal.component.ts index ab2227450..ccad309ab 100644 --- a/apps/isa-app/src/ui/modal/modal.component.ts +++ b/apps/isa-app/src/ui/modal/modal.component.ts @@ -1,4 +1,13 @@ -import { Component, ChangeDetectionStrategy, OnInit, TemplateRef, Type, ChangeDetectorRef, OnDestroy, HostBinding } from '@angular/core'; +import { + Component, + ChangeDetectionStrategy, + OnInit, + TemplateRef, + Type, + ChangeDetectorRef, + OnDestroy, + HostBinding, +} from '@angular/core'; import { Subscription } from 'rxjs'; import { UiModalRef } from './defs/modal-ref'; diff --git a/apps/isa-app/src/ui/modal/modal.module.ts b/apps/isa-app/src/ui/modal/modal.module.ts index 8916adbca..03061e45c 100644 --- a/apps/isa-app/src/ui/modal/modal.module.ts +++ b/apps/isa-app/src/ui/modal/modal.module.ts @@ -13,8 +13,20 @@ import { UiPromptModalComponent } from './prompt-modal'; @NgModule({ imports: [CommonModule, OverlayModule, UiIconModule], - declarations: [UiModalComponent, UiDebugModalComponent, UiMessageModalComponent, UiDialogModalComponent, UiPromptModalComponent], - exports: [UiModalComponent, UiDebugModalComponent, UiMessageModalComponent, UiDialogModalComponent, UiPromptModalComponent], + declarations: [ + UiModalComponent, + UiDebugModalComponent, + UiMessageModalComponent, + UiDialogModalComponent, + UiPromptModalComponent, + ], + exports: [ + UiModalComponent, + UiDebugModalComponent, + UiMessageModalComponent, + UiDialogModalComponent, + UiPromptModalComponent, + ], }) export class UiModalModule { static forRoot(): ModuleWithProviders { diff --git a/apps/isa-app/src/ui/modal/prompt-modal/prompt-modal.component.ts b/apps/isa-app/src/ui/modal/prompt-modal/prompt-modal.component.ts index 470ee2823..3b111ef25 100644 --- a/apps/isa-app/src/ui/modal/prompt-modal/prompt-modal.component.ts +++ b/apps/isa-app/src/ui/modal/prompt-modal/prompt-modal.component.ts @@ -18,7 +18,9 @@ import { PromptModalData } from './prompt-modal.data'; />
- +
`, styleUrls: ['./prompt-modal.component.scss'], diff --git a/apps/isa-app/src/ui/notes/ui-notes.component.ts b/apps/isa-app/src/ui/notes/ui-notes.component.ts index 2c46e8265..2fe4bb961 100644 --- a/apps/isa-app/src/ui/notes/ui-notes.component.ts +++ b/apps/isa-app/src/ui/notes/ui-notes.component.ts @@ -1,4 +1,14 @@ -import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core'; +import { + ChangeDetectorRef, + Component, + EventEmitter, + Input, + OnChanges, + OnDestroy, + OnInit, + Output, + SimpleChanges, +} from '@angular/core'; import { UntypedFormControl, Validators } from '@angular/forms'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; diff --git a/apps/isa-app/src/ui/progress/ui-circle-progress.component.ts b/apps/isa-app/src/ui/progress/ui-circle-progress.component.ts index 91fabc74b..650fd62a9 100644 --- a/apps/isa-app/src/ui/progress/ui-circle-progress.component.ts +++ b/apps/isa-app/src/ui/progress/ui-circle-progress.component.ts @@ -1,4 +1,12 @@ -import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'; +import { + ChangeDetectionStrategy, + ChangeDetectorRef, + Component, + Input, + OnChanges, + OnInit, + SimpleChanges, +} from '@angular/core'; @Component({ selector: 'ui-circle-progress', diff --git a/apps/isa-app/src/ui/quantity-dropdown/quantity-dropdown.component.html b/apps/isa-app/src/ui/quantity-dropdown/quantity-dropdown.component.html index a0fb78833..e6cf33fbb 100644 --- a/apps/isa-app/src/ui/quantity-dropdown/quantity-dropdown.component.html +++ b/apps/isa-app/src/ui/quantity-dropdown/quantity-dropdown.component.html @@ -24,8 +24,7 @@ yPosition="below" xPosition="after" #quantityControl - > - + > `, + template: ` + + `, standalone: false, }) class TestComponent { diff --git a/apps/isa-app/src/ui/select-bullet/select-bullet.component.ts b/apps/isa-app/src/ui/select-bullet/select-bullet.component.ts index bb8aad31d..841fa3592 100644 --- a/apps/isa-app/src/ui/select-bullet/select-bullet.component.ts +++ b/apps/isa-app/src/ui/select-bullet/select-bullet.component.ts @@ -1,4 +1,12 @@ -import { ChangeDetectionStrategy, ChangeDetectorRef, Component, forwardRef, HostBinding, HostListener, Input } from '@angular/core'; +import { + ChangeDetectionStrategy, + ChangeDetectorRef, + Component, + forwardRef, + HostBinding, + HostListener, + Input, +} from '@angular/core'; import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; @Component({ diff --git a/apps/isa-app/src/ui/select/ui-select-option.component.ts b/apps/isa-app/src/ui/select/ui-select-option.component.ts index 1e092d0c7..5e04c650e 100644 --- a/apps/isa-app/src/ui/select/ui-select-option.component.ts +++ b/apps/isa-app/src/ui/select/ui-select-option.component.ts @@ -1,4 +1,13 @@ -import { Component, ChangeDetectionStrategy, Input, HostListener, EventEmitter, Output, ElementRef, ViewChild } from '@angular/core'; +import { + Component, + ChangeDetectionStrategy, + Input, + HostListener, + EventEmitter, + Output, + ElementRef, + ViewChild, +} from '@angular/core'; @Component({ selector: 'ui-select-option', diff --git a/apps/isa-app/src/ui/slider/slider.component.ts b/apps/isa-app/src/ui/slider/slider.component.ts index 85148a774..432f92977 100644 --- a/apps/isa-app/src/ui/slider/slider.component.ts +++ b/apps/isa-app/src/ui/slider/slider.component.ts @@ -69,10 +69,16 @@ export class UiSliderComponent implements AfterViewInit, OnDestroy { } scrollLeft() { - this.slideWrapperNativeElement.scrollTo({ left: this.slideWrapperNativeElement.scrollLeft - this.scrollDistance, behavior: 'smooth' }); + this.slideWrapperNativeElement.scrollTo({ + left: this.slideWrapperNativeElement.scrollLeft - this.scrollDistance, + behavior: 'smooth', + }); } scrollRight() { - this.slideWrapperNativeElement.scrollTo({ left: this.slideWrapperNativeElement.scrollLeft + this.scrollDistance, behavior: 'smooth' }); + this.slideWrapperNativeElement.scrollTo({ + left: this.slideWrapperNativeElement.scrollLeft + this.scrollDistance, + behavior: 'smooth', + }); } } diff --git a/apps/isa-app/src/utils/common/contains-element.ts b/apps/isa-app/src/utils/common/contains-element.ts index 976aa7afa..1d0aaa133 100644 --- a/apps/isa-app/src/utils/common/contains-element.ts +++ b/apps/isa-app/src/utils/common/contains-element.ts @@ -3,7 +3,9 @@ export function containsElement(parentElement: Element, targetElement: Element): return true; } else if (parentElement.hasChildNodes()) { const children = Array.from(parentElement.children); - return children.some((childElement) => childElement === targetElement || containsElement(childElement, targetElement)); + return children.some( + (childElement) => childElement === targetElement || containsElement(childElement, targetElement), + ); } return false; } diff --git a/apps/isa-app/src/utils/common/debounce.decorator.ts b/apps/isa-app/src/utils/common/debounce.decorator.ts index 1e66440df..29894227b 100644 --- a/apps/isa-app/src/utils/common/debounce.decorator.ts +++ b/apps/isa-app/src/utils/common/debounce.decorator.ts @@ -1,7 +1,11 @@ import { DebounceSettings, debounce as lodashDebounce } from 'lodash'; export function debounce(wait: number, options?: DebounceSettings): MethodDecorator { - return (target: Object, propertyKey: string, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor => { + return ( + target: Object, + propertyKey: string, + descriptor: TypedPropertyDescriptor, + ): TypedPropertyDescriptor => { const currentMethod = descriptor.value; descriptor.value = lodashDebounce(currentMethod, wait, options); return descriptor; diff --git a/apps/isa-app/src/utils/common/memorize.decorator.ts b/apps/isa-app/src/utils/common/memorize.decorator.ts index 4849ad249..29111455a 100644 --- a/apps/isa-app/src/utils/common/memorize.decorator.ts +++ b/apps/isa-app/src/utils/common/memorize.decorator.ts @@ -3,7 +3,10 @@ import { v4 } from 'uuid'; const memorizeCache: { ttl: number; result: any; args: any[]; id: string }[] = []; -export function memorize(options?: { ttl?: number; comparer?: (current: any[], prev: any[]) => boolean }): MethodDecorator { +export function memorize(options?: { + ttl?: number; + comparer?: (current: any[], prev: any[]) => boolean; +}): MethodDecorator { const id = v4(); const comparer = options?.comparer || _.isEqual; const ttl = options?.ttl || Infinity; diff --git a/paragon-preset.js b/paragon-preset.js index 5cbe3ab1d..2dbedda87 100644 --- a/paragon-preset.js +++ b/paragon-preset.js @@ -71,7 +71,7 @@ module.exports = { button: 'var(--par-border-radius-button)', }, scale: { - '98': '98%', + 98: '98%', }, fontFamily: { sans: ['var(--par-font-family)', ...defaultTheme.fontFamily.sans],