qdadm 0.51.6 → 0.51.7

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qdadm",
3
- "version": "0.51.6",
3
+ "version": "0.51.7",
4
4
  "description": "Vue 3 framework for admin dashboards with PrimeVue",
5
5
  "author": "quazardous",
6
6
  "license": "MIT",
@@ -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: reset form for new entry, stay on route
331
- data.value = deepClone(initialData)
332
- originalData.value = null
333
- takeSnapshot()
334
- errors.value = {}
335
- submitted.value = false
336
- toast.add({
337
- severity: 'info',
338
- summary: 'Ready',
339
- detail: 'Form reset for new entry',
340
- life: 2000
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