@processmaker/screen-builder 3.5.0 → 3.5.1
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/vue-form-builder.es.js +36 -11
- package/dist/vue-form-builder.es.js.map +1 -1
- package/dist/vue-form-builder.umd.js +1 -1
- package/dist/vue-form-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/inspector/collection-display-mode.vue +22 -8
- package/src/components/inspector/collection-records-list.vue +10 -6
- package/src/components/renderer/form-collection-record-control.vue +7 -2
package/package.json
CHANGED
|
@@ -41,23 +41,37 @@ export default {
|
|
|
41
41
|
data() {
|
|
42
42
|
return {
|
|
43
43
|
mode: "",
|
|
44
|
-
submitCollectionCheck: null
|
|
44
|
+
submitCollectionCheck: null,
|
|
45
|
+
defaultMode: 'Edit',
|
|
45
46
|
};
|
|
46
47
|
},
|
|
47
48
|
computed: {
|
|
48
49
|
showCollectionCheck() {
|
|
49
|
-
return this.mode ===
|
|
50
|
+
return this.mode === this.defaultMode;
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
watch: {
|
|
54
|
+
value: {
|
|
55
|
+
handler(newValue) {
|
|
56
|
+
this.updateModeAndCollectionCheck(newValue);
|
|
57
|
+
},
|
|
58
|
+
deep: true,
|
|
50
59
|
}
|
|
51
60
|
},
|
|
52
61
|
mounted() {
|
|
53
|
-
// Set the
|
|
54
|
-
this.
|
|
55
|
-
this.submitCollectionCheck =
|
|
56
|
-
this.value.submitCollectionCheck !== undefined
|
|
57
|
-
? this.value.submitCollectionCheck
|
|
58
|
-
: true;
|
|
62
|
+
// Set the default data
|
|
63
|
+
this.updateModeAndCollectionCheck(this.value);
|
|
59
64
|
},
|
|
60
65
|
methods: {
|
|
66
|
+
/**
|
|
67
|
+
* Update the mode and collection check value
|
|
68
|
+
*
|
|
69
|
+
* @param {Object} value
|
|
70
|
+
*/
|
|
71
|
+
updateModeAndCollectionCheck(value) {
|
|
72
|
+
this.mode = value.modeId || this.defaultMode;
|
|
73
|
+
this.submitCollectionCheck = value.submitCollectionCheck ?? true;
|
|
74
|
+
},
|
|
61
75
|
saveFields() {
|
|
62
76
|
this.$emit("input", {
|
|
63
77
|
modeId: this.mode,
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
data-cy="inspector-collection"
|
|
11
11
|
/>
|
|
12
12
|
<b-form-text class="mt-2">
|
|
13
|
-
{{ $t("Collection Record Control is not available for Anonymous Web Entry") }}
|
|
13
|
+
{{ $t("Collection Record Control is not available for Anonymous Web Entry") }}
|
|
14
14
|
</b-form-text>
|
|
15
15
|
</b-form-group>
|
|
16
16
|
</div>
|
|
17
17
|
<div v-if="collectionId > 0" class="screen-link mt-2">
|
|
18
|
-
<a
|
|
18
|
+
<a
|
|
19
19
|
:href="`/designer/screen-builder/${
|
|
20
20
|
screenMode === 'display' ? idCollectionScreenView : idCollectionScreenEdit
|
|
21
|
-
}/edit`"
|
|
21
|
+
}/edit`"
|
|
22
22
|
target="_blank">
|
|
23
23
|
{{ $t(screenMode === 'display' ? "Open View Screen" : "Open Edit Screen") }}
|
|
24
24
|
<i class="ml-1 fas fa-external-link-alt" />
|
|
@@ -67,11 +67,15 @@ export default {
|
|
|
67
67
|
},
|
|
68
68
|
watch: {
|
|
69
69
|
value: {
|
|
70
|
-
handler(
|
|
71
|
-
if (!
|
|
70
|
+
handler(newValue) {
|
|
71
|
+
if (!newValue) {
|
|
72
|
+
// Clear collection id
|
|
73
|
+
this.collectionId = null;
|
|
74
|
+
|
|
72
75
|
return;
|
|
73
76
|
}
|
|
74
|
-
|
|
77
|
+
|
|
78
|
+
CONFIG_FIELDS.forEach((field) => (this[field] = newValue[field]));
|
|
75
79
|
},
|
|
76
80
|
immediate: true
|
|
77
81
|
},
|
|
@@ -63,7 +63,8 @@ export default {
|
|
|
63
63
|
flagDraft: {},
|
|
64
64
|
taskDraft: {},
|
|
65
65
|
enableDraft: true,
|
|
66
|
-
defaultColumnsRecordId: 1
|
|
66
|
+
defaultColumnsRecordId: 1,
|
|
67
|
+
defaultCollectionMode: 'Edit',
|
|
67
68
|
};
|
|
68
69
|
},
|
|
69
70
|
computed: {
|
|
@@ -148,13 +149,17 @@ export default {
|
|
|
148
149
|
const recordId = this.isMustache(this.record)
|
|
149
150
|
? this.defaultColumnsRecordId
|
|
150
151
|
: this.record;
|
|
152
|
+
|
|
151
153
|
if (this.isMustache(this.record)) {
|
|
152
154
|
this.hasMustache = true;
|
|
153
155
|
}
|
|
156
|
+
|
|
157
|
+
const collectionMode = this.collectionmode?.modeId ?? this.defaultCollectionMode;
|
|
158
|
+
|
|
154
159
|
this.loadRecordCollection(
|
|
155
160
|
this.collection.collectionId,
|
|
156
161
|
recordId,
|
|
157
|
-
|
|
162
|
+
collectionMode,
|
|
158
163
|
);
|
|
159
164
|
}
|
|
160
165
|
},
|