fix(ui) : show type name and ref in slot selects, stay on page after save
- PieceSelect, ProductSelect, ComposantSelect: show type name and "Ref." prefix in dropdown descriptions (matching create page format) - Category edit pages (component, piece, product): stay on page after successful save instead of navigating back to list - Component and product edit pages: same — stay on page after save Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -98,8 +98,12 @@ const updateValue = (value: string | number | null | undefined) => {
|
||||
|
||||
const formatDescription = (option: any) => {
|
||||
const parts: string[] = []
|
||||
const typeName = option?.typeComposant?.name
|
||||
if (typeName) {
|
||||
parts.push(typeName)
|
||||
}
|
||||
if (option?.reference) {
|
||||
parts.push(option.reference)
|
||||
parts.push(`Ref. ${option.reference}`)
|
||||
}
|
||||
if (option?.prix !== undefined && option.prix !== null) {
|
||||
const price = Number(option.prix)
|
||||
|
||||
@@ -98,8 +98,12 @@ const updateValue = (value: string | number | null | undefined) => {
|
||||
|
||||
const formatDescription = (option: any) => {
|
||||
const parts: string[] = []
|
||||
const typeName = option?.typePiece?.name
|
||||
if (typeName) {
|
||||
parts.push(typeName)
|
||||
}
|
||||
if (option?.reference) {
|
||||
parts.push(option.reference)
|
||||
parts.push(`Ref. ${option.reference}`)
|
||||
}
|
||||
if (option?.prix !== undefined && option.prix !== null) {
|
||||
const price = Number(option.prix)
|
||||
|
||||
@@ -98,8 +98,12 @@ const updateValue = (value: string | number | null | undefined) => {
|
||||
|
||||
const formatDescription = (option: any) => {
|
||||
const parts: string[] = []
|
||||
const typeName = option?.typeProduct?.name
|
||||
if (typeName) {
|
||||
parts.push(typeName)
|
||||
}
|
||||
if (option?.reference) {
|
||||
parts.push(option.reference)
|
||||
parts.push(`Ref. ${option.reference}`)
|
||||
}
|
||||
if (option?.supplierPrice !== undefined && option.supplierPrice !== null) {
|
||||
const price = Number(option.supplierPrice)
|
||||
|
||||
Reference in New Issue
Block a user