refactor: update import paths and adjust product category type handling

This commit is contained in:
Lorenz Hilpert
2025-03-27 17:02:25 +01:00
parent 0c2feb96ac
commit 81bec4b153
4 changed files with 3 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ import {
ReturnProcessQuestion,
ReturnProcessQuestionType,
} from './models';
import { CategoryQuestions, CategoryQuestionValidators } from './return-process-questions.token';
import { CategoryQuestions, CategoryQuestionValidators } from './return-process-questions';
import { KeyValue } from '@angular/common';
@Injectable({ providedIn: 'root' })

View File

@@ -45,7 +45,7 @@ export const ReturnProcessStore = signalStore(
}
},
setProductCategory: (id: number, category: string) => {
setProductCategory: (id: number, category: string | undefined) => {
const entity = store.entityMap()[id];
if (entity) {
patchState(store, updateEntity({ id: entity.id, changes: { productCategory: category } }));

View File

@@ -41,7 +41,7 @@ export class ReturnProcessQuestionsComponent {
return this.#returnProcessSerivce.availableCategories();
});
setProductCategory(category: string) {
setProductCategory(category: string | undefined) {
this.#returnProcessStore.setProductCategory(this.returnProcessId(), category);
}