pgo-ui 1.1.37 → 1.1.39
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/dist/Radio-CSy8R44u.js +4 -0
- package/dist/{index-D3B3wyao.js → index-B-iYhmuS.js} +10 -9
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
- package/src/components/pgo/forms/DynamicForm.vue +5 -4
- package/src/components/pgo/forms/Form.vue +5 -6
- package/src/components/pgo/inputs/TextField.vue +2 -0
- package/dist/Radio-no6EzWlW.js +0 -4
package/package.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<!-- Render grouped fields -->
|
|
24
24
|
|
|
25
25
|
<!-- A0111904 -->
|
|
26
|
-
{{ valid }}
|
|
26
|
+
<!-- {{ valid }} -->
|
|
27
27
|
<template v-if="form.groups">
|
|
28
28
|
<template v-for="(group, id) in form.groups" :key="id">
|
|
29
29
|
<div v-if="shouldShowGroup(group)" class="mb-4">
|
|
@@ -846,9 +846,10 @@
|
|
|
846
846
|
}else {
|
|
847
847
|
submitData.status = 'submitted';
|
|
848
848
|
}
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
849
|
+
|
|
850
|
+
// if (formId.value) {
|
|
851
|
+
// // submitData.id = formId.value; // Ensure ID is included for updates
|
|
852
|
+
// }
|
|
852
853
|
// const isFullUrl = /^https?:\/\//i.test(props.form?.crudLink)
|
|
853
854
|
// let url = isFullUrl ? props.form?.crudLink : baseUrl + '/' + props.form?.crudLink
|
|
854
855
|
let completeUrl = ''
|
|
@@ -108,8 +108,8 @@ const setErrors = (backendErrorsObj) => {
|
|
|
108
108
|
// Find the field by matching the fieldKey prop
|
|
109
109
|
for (const [uid, field] of fields.entries()) {
|
|
110
110
|
if (field?.fieldKey === fieldKey && field?.setBackendError) {
|
|
111
|
-
//
|
|
112
|
-
|
|
111
|
+
// Store the uid → fieldKey mapping (in the separate map, NOT in backendErrors)
|
|
112
|
+
uidToFieldKey[uid] = fieldKey
|
|
113
113
|
// Set backend error on the field component
|
|
114
114
|
field.setBackendError(errorMessages)
|
|
115
115
|
}
|
|
@@ -140,13 +140,12 @@ const report = (uid, valid, fieldErrors, fieldBackendErrors) => {
|
|
|
140
140
|
|
|
141
141
|
// Clear backend errors for this field if no backend errors remain
|
|
142
142
|
if (!fieldBackendErrors || fieldBackendErrors.length === 0) {
|
|
143
|
-
// Use uid → fieldKey mapping to reliably find and clear the backend error
|
|
144
143
|
const fieldKey = uidToFieldKey[uid] || field?.fieldKey
|
|
145
144
|
if (fieldKey) {
|
|
146
145
|
delete backendErrors[fieldKey]
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
}
|
|
147
|
+
// Also clean up any leftover __uid_ keys
|
|
148
|
+
delete backendErrors['__uid_' + uid]
|
|
150
149
|
}
|
|
151
150
|
|
|
152
151
|
updateModelValue()
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
:lang="computedLang"
|
|
29
29
|
:width="width"
|
|
30
30
|
:rules="rules"
|
|
31
|
+
:field-key="fieldKey"
|
|
31
32
|
>
|
|
32
33
|
<template #control="{ attrs, events }">
|
|
33
34
|
<input
|
|
@@ -100,6 +101,7 @@ const props = defineProps({
|
|
|
100
101
|
items: { type: Array, default: () => [] },
|
|
101
102
|
itemText: { type: String, default: 'text' },
|
|
102
103
|
itemValue: { type: String, default: 'value' },
|
|
104
|
+
fieldKey: { type: String, default: '' },
|
|
103
105
|
})
|
|
104
106
|
|
|
105
107
|
// Inject dir from parent Card (if exists)
|
package/dist/Radio-no6EzWlW.js
DELETED