fix(custom-fields) : fix declaration order of resolvedStructure in usePieceEdit
This commit is contained in:
@@ -83,10 +83,6 @@ export function usePieceEdit(pieceId: string) {
|
|||||||
const constructeurIdsFromForm = computed(() => constructeurIdsFromLinks(constructeurLinks.value))
|
const constructeurIdsFromForm = computed(() => constructeurIdsFromLinks(constructeurLinks.value))
|
||||||
const productSelections = ref<(string | null)[]>([])
|
const productSelections = ref<(string | null)[]>([])
|
||||||
|
|
||||||
const resolvedStructure = computed<PieceModelStructure | null>(() =>
|
|
||||||
pieceTypeDetails.value?.structure ?? selectedType.value?.structure ?? null,
|
|
||||||
)
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
fields: customFieldInputs,
|
fields: customFieldInputs,
|
||||||
requiredFilled: requiredCustomFieldsFilled,
|
requiredFilled: requiredCustomFieldsFilled,
|
||||||
@@ -176,6 +172,10 @@ export function usePieceEdit(pieceId: string) {
|
|||||||
return pieceTypeList.value.find((type) => type.id === selectedTypeId.value) ?? null
|
return pieceTypeList.value.find((type) => type.id === selectedTypeId.value) ?? null
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const resolvedStructure = computed<PieceModelStructure | null>(() =>
|
||||||
|
pieceTypeDetails.value?.structure ?? selectedType.value?.structure ?? null,
|
||||||
|
)
|
||||||
|
|
||||||
const structureProducts = computed(() =>
|
const structureProducts = computed(() =>
|
||||||
getStructureProducts(resolvedStructure.value),
|
getStructureProducts(resolvedStructure.value),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user