OBPIH-6170 Add an endpoint to delete a product supplier preference#4531
OBPIH-6170 Add an endpoint to delete a product supplier preference#4531awalkowiak merged 2 commits intofeature/product-supplier-list-redesignfrom
Conversation
| preferenceType: defaultPreferenceType?.preferenceType ? { | ||
| id: defaultPreferenceType.preferenceType.id, | ||
| label: defaultPreferenceType.preferenceType.name, | ||
| value: defaultPreferenceType.preferenceType.id, | ||
| } : undefined, | ||
| validityStartDate: defaultPreferenceType?.validityStartDate ?? undefined, | ||
| validityEndDate: defaultPreferenceType?.validityEndDate ?? undefined, | ||
| bidName: defaultPreferenceType?.bidName ?? undefined, |
There was a problem hiding this comment.
it would be better to store all those values under the same key - it will allow us to clear/reset those values simultaneously.
I mean adding:
(here, in the default values)
defaultPreferenceType: {
...defaultPreferenceType,
preferenceType: {
id: defaultPreferenceType?.preferenceType?.id,
label: defaultPreferenceType?.preferenceType?.name,
value: defaultPreferenceType?.preferenceType?.id,
},
},
and then in DefaultPreferenceType.jsx for each controller prepend: defaultPreferenceType
There was a problem hiding this comment.
I think we can do such adjustments in the "handle save action" ticket. For now I've just adjusted it to the current logic for the substitution to work as Katarzyna asked me to do.
Additionally - to the backend, it will still have to be sent via productSupplierPreferences array - in onSubmit we will have to append the default there in order for the backend to work. We will distinguish on the backend then, via destinationParty whether it is the default or not.
…4531) * OBPIH-6170 Substitute default preference type when editing a product supplier * OBPIH-6170 Add an endpoint to delete a product supplier preference
No description provided.