qdadm 0.51.6 → 0.51.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -327,18 +327,17 @@ export function useEntityItemFormPage(config = {}) {
|
|
|
327
327
|
const listRoute = findListRoute()
|
|
328
328
|
router.push(listRoute)
|
|
329
329
|
} else if (!isEdit.value) {
|
|
330
|
-
// "Create" without close:
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
})
|
|
330
|
+
// "Create" without close: navigate to edit route for the created entity
|
|
331
|
+
const createdId = responseData?.id || responseData?.uuid
|
|
332
|
+
if (createdId) {
|
|
333
|
+
// Build edit route: replace 'create' suffix with ':id/edit'
|
|
334
|
+
const currentRouteName = route.name || ''
|
|
335
|
+
const editRouteName = currentRouteName.replace(/(-create|-new)$/, '-edit')
|
|
336
|
+
router.push({
|
|
337
|
+
name: editRouteName,
|
|
338
|
+
params: { ...route.params, id: createdId }
|
|
339
|
+
})
|
|
340
|
+
}
|
|
342
341
|
}
|
|
343
342
|
// Edit mode without close: just stay on page (data already updated)
|
|
344
343
|
|
|
@@ -1133,6 +1132,14 @@ export function useEntityItemFormPage(config = {}) {
|
|
|
1133
1132
|
}
|
|
1134
1133
|
})
|
|
1135
1134
|
|
|
1135
|
+
// Watch for route changes (e.g., create → edit navigation)
|
|
1136
|
+
// Vue reuses the component, so onMounted won't fire again
|
|
1137
|
+
watch(entityId, (newId, oldId) => {
|
|
1138
|
+
if (newId !== oldId && loadOnMount) {
|
|
1139
|
+
load()
|
|
1140
|
+
}
|
|
1141
|
+
})
|
|
1142
|
+
|
|
1136
1143
|
// ============ FORMPAGE PROPS/EVENTS ============
|
|
1137
1144
|
|
|
1138
1145
|
/**
|