mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
fix(oms-data-access): unify electronic and nonbook item condition labels
Harmonize electronic device and nonbook item condition labels to consistently use "Geöffnet/Defekt" instead of "Geöffnet/Beschädigt" or "Beschädigt/Fehldruck". Also remove redundant defect verification question for electronic devices since the condition label already indicates this state. Additionally, add product features to receipt item data in return receipts to ensure proper product information is available for returns processing. Ref: #5083
This commit is contained in:
@@ -35,10 +35,9 @@ export const elektronischeGeraeteQuestions: ReturnProcessQuestion[] = [
|
||||
returnInfo: { itemCondition: 'Originalverpackt' },
|
||||
},
|
||||
{
|
||||
label: 'Geöffnet/Beschädigt',
|
||||
label: 'Geöffnet/Defekt',
|
||||
value: ItemConditionAnswer.Damaged,
|
||||
nextQuestion: ReturnProcessQuestionKey.ItemDefective,
|
||||
returnInfo: { itemCondition: 'Geöffnet/Beschädigt' },
|
||||
returnInfo: { itemCondition: 'Geöffnet/Defekt' },
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -60,22 +59,6 @@ export const elektronischeGeraeteQuestions: ReturnProcessQuestion[] = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: ReturnProcessQuestionKey.ItemDefective,
|
||||
description: 'Ist der Artikel defekt?',
|
||||
type: ReturnProcessQuestionType.Select,
|
||||
options: [
|
||||
{
|
||||
label: 'Ja',
|
||||
value: YesNoAnswer.Yes,
|
||||
returnInfo: { returnDetails: 'Artikel defekt' },
|
||||
},
|
||||
{
|
||||
label: 'Nein',
|
||||
value: YesNoAnswer.No,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: ReturnProcessQuestionKey.DeliveredItem,
|
||||
description: 'Welcher Artikel wurde geliefert?',
|
||||
|
||||
@@ -29,9 +29,9 @@ export const nonbookQuestions: ReturnProcessQuestion[] = [
|
||||
returnInfo: { itemCondition: 'Neuwertig/Originalverpackt' },
|
||||
},
|
||||
{
|
||||
label: 'Beschädigt/Fehldruck',
|
||||
label: 'Geöffnet/Defekt',
|
||||
value: ItemConditionAnswer.Damaged,
|
||||
returnInfo: { itemCondition: 'Beschädigt/Fehldruck' },
|
||||
returnInfo: { itemCondition: 'Geöffnet/Defekt' },
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -330,7 +330,10 @@ export class ReturnProcessService {
|
||||
otherProduct: returnInfo.otherProduct,
|
||||
returnDetails: returnInfo.returnDetails,
|
||||
returnReason: returnInfo.returnReason,
|
||||
receiptItem: { id: process.receiptItem.id },
|
||||
receiptItem: {
|
||||
id: process.receiptItem.id,
|
||||
data: { features: process.receiptItem.features },
|
||||
},
|
||||
};
|
||||
},
|
||||
);
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
import { z } from 'zod';
|
||||
import { Product } from '../models/product';
|
||||
|
||||
const ReceiptItemDataSchema = z.object({
|
||||
features: z.record(z.any()).optional(),
|
||||
});
|
||||
|
||||
const ReceiptItemSchema = z.object({
|
||||
id: z.number(),
|
||||
data: ReceiptItemDataSchema,
|
||||
});
|
||||
|
||||
export const ReturnReceiptValuesSchema = z.object({
|
||||
|
||||
Reference in New Issue
Block a user