qdadm 0.51.3 → 0.51.4
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
|
@@ -99,7 +99,7 @@ export function useEntityItemFormPage(config = {}) {
|
|
|
99
99
|
// Form options
|
|
100
100
|
loadOnMount = true,
|
|
101
101
|
enableGuard = true,
|
|
102
|
-
redirectOnCreate
|
|
102
|
+
// redirectOnCreate removed: "Create" now resets form, "Create & Close" navigates
|
|
103
103
|
usePatch = false, // Use PATCH instead of PUT for updates
|
|
104
104
|
// Hooks for custom behavior
|
|
105
105
|
transformLoad = (data) => data,
|
|
@@ -319,20 +319,24 @@ export function useEntityItemFormPage(config = {}) {
|
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
if (andClose) {
|
|
322
|
-
//
|
|
322
|
+
// Navigate to list route (or previous page)
|
|
323
323
|
const listRoute = findListRoute()
|
|
324
324
|
router.push(listRoute)
|
|
325
|
-
} else if (!isEdit.value
|
|
326
|
-
//
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
325
|
+
} else if (!isEdit.value) {
|
|
326
|
+
// "Create" without close: reset form for new entry, stay on route
|
|
327
|
+
data.value = deepClone(initialData)
|
|
328
|
+
originalData.value = null
|
|
329
|
+
takeSnapshot()
|
|
330
|
+
errors.value = {}
|
|
331
|
+
submitted.value = false
|
|
332
|
+
toast.add({
|
|
333
|
+
severity: 'info',
|
|
334
|
+
summary: 'Ready',
|
|
335
|
+
detail: 'Form reset for new entry',
|
|
336
|
+
life: 2000
|
|
337
|
+
})
|
|
335
338
|
}
|
|
339
|
+
// Edit mode without close: just stay on page (data already updated)
|
|
336
340
|
|
|
337
341
|
return responseData
|
|
338
342
|
} catch (error) {
|