mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
chore(remission, navigation): update routing and remove unused helpers
This commit is contained in:
@@ -12,7 +12,7 @@ import { z } from 'zod';
|
||||
import { NgIconComponent, provideIcons } from '@ng-icons/core';
|
||||
import { isaActionChevronLeft } from '@isa/icons';
|
||||
import { ButtonComponent } from '@isa/ui/buttons';
|
||||
import { injectActivatedTabId } from '@isa/core/tabs';
|
||||
import { injectTabId } from '@isa/core/tabs';
|
||||
import { Location } from '@angular/common';
|
||||
import { ExpandableDirectives } from '@isa/ui/expandable';
|
||||
import { ProgressBarComponent } from '@isa/ui/progress-bar';
|
||||
@@ -52,7 +52,7 @@ export class ReturnDetailsComponent {
|
||||
#returnDetailsService = inject(ReturnDetailsService);
|
||||
#returnProcessStore = inject(ReturnProcessStore);
|
||||
|
||||
private processId = injectActivatedTabId();
|
||||
private processId = injectTabId();
|
||||
|
||||
private _router = inject(Router);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import { ReturnProcessComponent } from './return-process.component';
|
||||
|
||||
const mockActivatedProcessIdSignal = signal<number | null>(123);
|
||||
jest.mock('@isa/core/tabs', () => ({
|
||||
injectActivatedTabId: jest.fn(() => mockActivatedProcessIdSignal),
|
||||
injectTabId: jest.fn(() => mockActivatedProcessIdSignal),
|
||||
}));
|
||||
|
||||
jest.mock('scandit-web-datacapture-core', () => ({}));
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
ReturnProcessService,
|
||||
ReturnProcessStore,
|
||||
} from '@isa/oms/data-access';
|
||||
import { injectActivatedTabId } from '@isa/core/tabs';
|
||||
import { injectTabId } from '@isa/core/tabs';
|
||||
import { ReturnProcessItemComponent } from './return-process-item/return-process-item.component';
|
||||
import { Location } from '@angular/common';
|
||||
import { RouterLink } from '@angular/router';
|
||||
@@ -58,7 +58,7 @@ export class ReturnProcessComponent {
|
||||
#logger = logger();
|
||||
|
||||
/** Signal emitting the numeric ID of the currently active return process, derived from the route parameters. Null if no ID is present. */
|
||||
processId = injectActivatedTabId();
|
||||
processId = injectTabId();
|
||||
|
||||
#returnCanReturnService = inject(ReturnCanReturnService);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { computed, inject, Injectable } from '@angular/core';
|
||||
import { CanDeactivate } from '@angular/router';
|
||||
import { firstValueFrom } from 'rxjs';
|
||||
import { injectActivatedTabId } from '@isa/core/tabs';
|
||||
import { injectTabId } from '@isa/core/tabs';
|
||||
import { ReturnTaskListStore } from '@isa/oms/data-access';
|
||||
import { ReturnReviewComponent } from '../return-review.component';
|
||||
import { ConfirmationDialogComponent, injectDialog } from '@isa/ui/dialog';
|
||||
@@ -15,7 +15,7 @@ export class UncompletedTasksGuard
|
||||
title: 'Aufgaben erledigen',
|
||||
});
|
||||
|
||||
processId = injectActivatedTabId();
|
||||
processId = injectTabId();
|
||||
|
||||
uncompletedTaskListItems = computed(() => {
|
||||
const processId = this.processId();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
|
||||
import { PrintReceiptsService, ReturnProcessStore } from '@isa/oms/data-access';
|
||||
import { injectActivatedTabId } from '@isa/core/tabs';
|
||||
import { injectTabId } from '@isa/core/tabs';
|
||||
import { ReturnTaskListComponent } from '@isa/oms/shared/task-list';
|
||||
import { ReturnReviewHeaderComponent } from './return-review-header/return-review-header.component';
|
||||
|
||||
@@ -15,7 +15,7 @@ import { ReturnReviewHeaderComponent } from './return-review-header/return-revie
|
||||
export class ReturnReviewComponent {
|
||||
#printReceiptsService = inject(PrintReceiptsService);
|
||||
#returnProcessStore = inject(ReturnProcessStore);
|
||||
processId = injectActivatedTabId();
|
||||
processId = injectTabId();
|
||||
|
||||
async printReceipt() {
|
||||
const processId = this.processId();
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
} from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { CallbackResult, ListResponseArgs } from '@isa/common/data-access';
|
||||
import { injectActivatedTabId } from '@isa/core/tabs';
|
||||
import { injectTabId } from '@isa/core/tabs';
|
||||
import {
|
||||
ReceiptListItem,
|
||||
ReturnSearchStatus,
|
||||
@@ -38,7 +38,7 @@ export class ReturnSearchMainComponent {
|
||||
#route = inject(ActivatedRoute);
|
||||
#router = inject(Router);
|
||||
|
||||
private _processId = injectActivatedTabId();
|
||||
private _processId = injectTabId();
|
||||
private _filterService = inject(FilterService);
|
||||
private _returnSearchStore = inject(ReturnSearchStore);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
inject,
|
||||
linkedSignal,
|
||||
} from '@angular/core';
|
||||
import { injectActivatedTabId } from '@isa/core/tabs';
|
||||
import { injectTabId } from '@isa/core/tabs';
|
||||
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import {
|
||||
@@ -72,7 +72,7 @@ export class ReturnSearchResultComponent implements AfterViewInit {
|
||||
restoreScrollPosition = injectRestoreScrollPosition();
|
||||
|
||||
/** Current process ID from the activated route */
|
||||
processId = injectActivatedTabId();
|
||||
processId = injectTabId();
|
||||
|
||||
/** Store for managing return search data and operations */
|
||||
returnSearchStore = inject(ReturnSearchStore);
|
||||
|
||||
@@ -10,7 +10,7 @@ import { ReturnSummaryItemComponent } from './return-summary-item/return-summary
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
jest.mock('@isa/core/tabs', () => ({
|
||||
injectActivatedTabId: () => jest.fn(() => 1),
|
||||
injectTabId: () => jest.fn(() => 1),
|
||||
}));
|
||||
|
||||
const MOCK_RETURN_PROCESSES: ReturnProcess[] = [
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
signal,
|
||||
} from '@angular/core';
|
||||
import { ReturnSummaryItemComponent } from './return-summary-item/return-summary-item.component';
|
||||
import { injectActivatedTabId } from '@isa/core/tabs';
|
||||
import { injectTabId } from '@isa/core/tabs';
|
||||
import {
|
||||
ReturnProcess,
|
||||
ReturnProcessService,
|
||||
@@ -55,7 +55,7 @@ export class ReturnSummaryComponent {
|
||||
location = inject(Location);
|
||||
|
||||
/** The active process ID from the current route */
|
||||
processId = injectActivatedTabId();
|
||||
processId = injectTabId();
|
||||
|
||||
/** Filtered list of return processes for the current process ID */
|
||||
returnProcesses = computed<ReturnProcess[]>(() => {
|
||||
@@ -118,9 +118,13 @@ export class ReturnSummaryComponent {
|
||||
relativeTo: this.#activatedRoute,
|
||||
});
|
||||
} catch (error) {
|
||||
this.#logger.error('Error completing return process', error as Error, () => ({
|
||||
function: 'returnItemsAndPrintRecipt',
|
||||
}));
|
||||
this.#logger.error(
|
||||
'Error completing return process',
|
||||
error as Error,
|
||||
() => ({
|
||||
function: 'returnItemsAndPrintRecipt',
|
||||
}),
|
||||
);
|
||||
this.returnItemsAndPrintReciptStatus.set('error');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
} from '@isa/oms/data-access';
|
||||
import { IconButtonComponent } from '@isa/ui/buttons';
|
||||
import { firstValueFrom } from 'rxjs';
|
||||
import { injectActivatedTabId } from '@isa/core/tabs';
|
||||
import { injectTabId } from '@isa/core/tabs';
|
||||
import { logger, provideLoggerContext } from '@isa/core/logging';
|
||||
|
||||
// TODO: Komponente und logik benötigt review
|
||||
@@ -45,7 +45,7 @@ export class ReturnTaskListComponent {
|
||||
#returnTaskListStore = inject(ReturnTaskListStore);
|
||||
#logger = logger();
|
||||
|
||||
processId = injectActivatedTabId();
|
||||
processId = injectTabId();
|
||||
|
||||
appearanceClass = computed(
|
||||
() => `oms-shared-return-task-list__${this.appearance()}`,
|
||||
|
||||
Reference in New Issue
Block a user