@live-change/frontend-auto-form 0.9.174 → 0.9.176
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/front/src/logic/editorData.js +15 -3
- package/package.json +13 -13
|
@@ -14,6 +14,7 @@ export default function editorData(options) {
|
|
|
14
14
|
|
|
15
15
|
const {
|
|
16
16
|
identifiers,
|
|
17
|
+
parameters = {},
|
|
17
18
|
service: serviceName,
|
|
18
19
|
model: modelName,
|
|
19
20
|
|
|
@@ -117,7 +118,8 @@ export default function editorData(options) {
|
|
|
117
118
|
editableProperties.map(prop => [prop, draftData.value.data[prop]])
|
|
118
119
|
.concat([[timeField, draftData.value.data[timeField]]])
|
|
119
120
|
))
|
|
120
|
-
const source = computed(() => editableDraftData.value || editableSavedData.value
|
|
121
|
+
const source = computed(() => editableDraftData.value || editableSavedData.value
|
|
122
|
+
|| deepmerge(defaultData(model), initialData))
|
|
121
123
|
|
|
122
124
|
const propertiesServerErrors = ref({})
|
|
123
125
|
const lastUploadedData = ref(null)
|
|
@@ -125,9 +127,19 @@ export default function editorData(options) {
|
|
|
125
127
|
let savePromise = null
|
|
126
128
|
const saving = ref(false)
|
|
127
129
|
async function saveData(data){
|
|
128
|
-
const
|
|
130
|
+
const savedIdentifiers = {}
|
|
131
|
+
for(const identifier of identifiersNames) {
|
|
132
|
+
if(typeof identifier === 'object') {
|
|
133
|
+
savedIdentifiers[identifier.name] = savedData.value?.[identifier.name] ?? draftData.value?.data?.[identifier.name]
|
|
134
|
+
} else {
|
|
135
|
+
savedIdentifiers[identifier] = savedData.value?.[identifier] ?? draftData.value?.data?.[identifier]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const requestData = {
|
|
129
139
|
...(updateDataProperty ? { [updateDataProperty]: data } : data),
|
|
130
|
-
...
|
|
140
|
+
...savedIdentifiers,
|
|
141
|
+
...identifiers,
|
|
142
|
+
...parameters,
|
|
131
143
|
}
|
|
132
144
|
if(savePromise) await savePromise // wait for previous save
|
|
133
145
|
saving.value = true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/frontend-auto-form",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.176",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "node server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"type": "module",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@fortawesome/fontawesome-free": "^6.7.2",
|
|
25
|
-
"@live-change/cli": "^0.9.
|
|
26
|
-
"@live-change/dao": "^0.9.
|
|
27
|
-
"@live-change/dao-vue3": "^0.9.
|
|
28
|
-
"@live-change/dao-websocket": "^0.9.
|
|
29
|
-
"@live-change/framework": "^0.9.
|
|
30
|
-
"@live-change/image-frontend": "^0.9.
|
|
31
|
-
"@live-change/image-service": "^0.9.
|
|
32
|
-
"@live-change/session-service": "^0.9.
|
|
33
|
-
"@live-change/vue3-components": "^0.9.
|
|
34
|
-
"@live-change/vue3-ssr": "^0.9.
|
|
25
|
+
"@live-change/cli": "^0.9.176",
|
|
26
|
+
"@live-change/dao": "^0.9.176",
|
|
27
|
+
"@live-change/dao-vue3": "^0.9.176",
|
|
28
|
+
"@live-change/dao-websocket": "^0.9.176",
|
|
29
|
+
"@live-change/framework": "^0.9.176",
|
|
30
|
+
"@live-change/image-frontend": "^0.9.176",
|
|
31
|
+
"@live-change/image-service": "^0.9.176",
|
|
32
|
+
"@live-change/session-service": "^0.9.176",
|
|
33
|
+
"@live-change/vue3-components": "^0.9.176",
|
|
34
|
+
"@live-change/vue3-ssr": "^0.9.176",
|
|
35
35
|
"@vueuse/core": "^12.3.0",
|
|
36
36
|
"codeceptjs-assert": "^0.0.5",
|
|
37
37
|
"compression": "^1.7.5",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"vue3-scroll-border": "0.1.7"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@live-change/codeceptjs-helper": "^0.9.
|
|
55
|
+
"@live-change/codeceptjs-helper": "^0.9.176",
|
|
56
56
|
"codeceptjs": "^3.6.10",
|
|
57
57
|
"generate-password": "1.7.1",
|
|
58
58
|
"playwright": "1.49.1",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"author": "Michał Łaszczewski <michal@laszczewski.pl>",
|
|
64
64
|
"license": "ISC",
|
|
65
65
|
"description": "",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "1906ed765adb9920002506775db28451b19fd993"
|
|
67
67
|
}
|