@oniti/quasar-ui-vlank-collection-crud 3.7.43 → 3.7.45
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/index.common.js +3 -3
- package/dist/index.esm.js +3 -3
- package/dist/index.umd.js +132 -420
- package/dist/index.umd.min.js +3 -3
- package/package.json +1 -1
- package/src/components/VlankCollectionCrud.vue +2 -5
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @oniti/quasar-ui-vlank-collection-crud v3.
|
|
3
|
-
* (c)
|
|
2
|
+
* @oniti/quasar-ui-vlank-collection-crud v3.5.11
|
|
3
|
+
* (c) 2022 Oniti
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -77,8 +77,7 @@
|
|
|
77
77
|
}, props.props.modalDeleteOptions.dialog, {
|
|
78
78
|
"transition-show": __props.isMobile ? 'slide-up' : 'fade',
|
|
79
79
|
"transition-hide": __props.isMobile ? 'slide-down' : 'fade',
|
|
80
|
-
|
|
81
|
-
position: "standard",
|
|
80
|
+
position: __props.isMobile ? 'bottom' : 'standard',
|
|
82
81
|
"full-width": __props.isMobile
|
|
83
82
|
}), {
|
|
84
83
|
default: vue.withCtx(function () { return [
|
|
@@ -154,7 +153,7 @@
|
|
|
154
153
|
}, 16 /* FULL_PROPS */)
|
|
155
154
|
]; }),
|
|
156
155
|
_: 3 /* FORWARDED */
|
|
157
|
-
}, 16 /* FULL_PROPS */, ["modelValue", "transition-show", "transition-hide", "full-width"]))
|
|
156
|
+
}, 16 /* FULL_PROPS */, ["modelValue", "transition-show", "transition-hide", "position", "full-width"]))
|
|
158
157
|
}
|
|
159
158
|
}
|
|
160
159
|
|
|
@@ -166,6 +165,7 @@
|
|
|
166
165
|
var _hoisted_2$3 = /*#__PURE__*/vue.createTextVNode("Modification");
|
|
167
166
|
|
|
168
167
|
|
|
168
|
+
|
|
169
169
|
var script$4 = {
|
|
170
170
|
__name: 'VlankEditModal',
|
|
171
171
|
props: {
|
|
@@ -174,15 +174,14 @@
|
|
|
174
174
|
modalEditOptions: Object,
|
|
175
175
|
collection: String,
|
|
176
176
|
extraRequestParams: Object,
|
|
177
|
-
useSendFiles: Boolean,
|
|
178
177
|
storeKey: String,
|
|
179
178
|
isMobile: Boolean,
|
|
180
179
|
closeModalAfterValidation: Boolean,
|
|
181
180
|
propsLibelleTitle: String,
|
|
182
181
|
},
|
|
183
182
|
emits: ['close'],
|
|
184
|
-
setup: function setup(__props, ref
|
|
185
|
-
var $emit = ref
|
|
183
|
+
setup: function setup(__props, ref) {
|
|
184
|
+
var $emit = ref.emit;
|
|
186
185
|
|
|
187
186
|
|
|
188
187
|
var props = __props;
|
|
@@ -213,70 +212,28 @@
|
|
|
213
212
|
|
|
214
213
|
function onConfirmeEditAdd() {
|
|
215
214
|
var action = props.localDetail.uuid ? "update" : "create";
|
|
216
|
-
var message_notification = props.localDetail.uuid
|
|
217
|
-
? "Modification effectuée"
|
|
218
|
-
: "Création effectuée";
|
|
219
215
|
var extraParams =
|
|
220
216
|
action === "update"
|
|
221
217
|
? Object.assign({}, props.extraRequestParams.update)
|
|
222
218
|
: Object.assign({}, props.extraRequestParams.store);
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
.then(function (obj) {
|
|
236
|
-
if (props.closeModalAfterValidation) {
|
|
237
|
-
close(obj, action);
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
} else {
|
|
241
|
-
$collectionCrud
|
|
242
|
-
.collectionAction({
|
|
243
|
-
collectionName: props.collection,
|
|
244
|
-
action: action,
|
|
245
|
-
params: Object.assign({}, props.localDetail, extraParams),
|
|
246
|
-
list_field: props.storeKey
|
|
247
|
-
})
|
|
248
|
-
.then(function (obj) {
|
|
249
|
-
if (props.closeModalAfterValidation) {
|
|
250
|
-
close(obj, action);
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
|
-
}
|
|
219
|
+
$collectionCrud
|
|
220
|
+
.collectionAction({
|
|
221
|
+
collectionName: props.collection,
|
|
222
|
+
action: action,
|
|
223
|
+
params: Object.assign({}, props.localDetail, extraParams),
|
|
224
|
+
list_field: props.storeKey
|
|
225
|
+
})
|
|
226
|
+
.then(function (obj) {
|
|
227
|
+
if (props.closeModalAfterValidation) {
|
|
228
|
+
close(obj, action);
|
|
229
|
+
}
|
|
230
|
+
});
|
|
254
231
|
}
|
|
255
232
|
|
|
256
233
|
function close(obj, action) {
|
|
257
234
|
$emit("close", { obj: obj, action: action });
|
|
258
235
|
}
|
|
259
236
|
|
|
260
|
-
var modalContent = vue.ref(null);
|
|
261
|
-
var modalContentDetail = vue.ref(null);
|
|
262
|
-
|
|
263
|
-
var observer = new ResizeObserver(function (entries) {
|
|
264
|
-
entries.forEach(function (entry) {
|
|
265
|
-
scrollAreaStyle.value.height = props.isMobile ? '100vh' : entry.contentRect.height < 800 ? entry.contentRect.height + 'px' : '80vh';
|
|
266
|
-
});
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
var scrollAreaStyle = vue.ref({
|
|
270
|
-
height: props.isMobile ? '100vh' : modalContent.value ? modalContent.value.clientHeight < 800 ? modalContent.value.clientHeight + 'px' : '80vh' : '80vh'
|
|
271
|
-
});
|
|
272
|
-
|
|
273
|
-
vue.watch(modalContent, function (value) {
|
|
274
|
-
scrollAreaStyle.value.height = props.isMobile ? '100vh' : value ? value.clientHeight < 800 ? value.clientHeight + 'px' : '80vh' : '80vh';
|
|
275
|
-
if(modalContent.value){
|
|
276
|
-
observer.observe(modalContent.value);
|
|
277
|
-
}
|
|
278
|
-
}, { immediate: true, deep: true });
|
|
279
|
-
|
|
280
237
|
return function (_ctx, _cache) {
|
|
281
238
|
var _directive_close_popup = vue.resolveDirective("close-popup");
|
|
282
239
|
|
|
@@ -376,24 +333,13 @@
|
|
|
376
333
|
]; }),
|
|
377
334
|
_: 3 /* FORWARDED */
|
|
378
335
|
}, 16 /* FULL_PROPS */, ["class"]),
|
|
379
|
-
vue.
|
|
380
|
-
|
|
381
|
-
},
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
ref: modalContent
|
|
387
|
-
}, [
|
|
388
|
-
vue.renderSlot(_ctx.$slots, "create-edit-modal-content", {
|
|
389
|
-
data: props.localDetail,
|
|
390
|
-
ref_key: "modalContentDetail",
|
|
391
|
-
ref: modalContentDetail
|
|
392
|
-
})
|
|
393
|
-
], 2 /* CLASS */)
|
|
394
|
-
]; }),
|
|
395
|
-
_: 3 /* FORWARDED */
|
|
396
|
-
}, 8 /* PROPS */, ["style"]),
|
|
336
|
+
vue.createElementVNode("div", {
|
|
337
|
+
class: vue.normalizeClass({'mobile-content': __props.isMobile })
|
|
338
|
+
}, [
|
|
339
|
+
vue.renderSlot(_ctx.$slots, "create-edit-modal-content", {
|
|
340
|
+
data: props.localDetail
|
|
341
|
+
})
|
|
342
|
+
], 2 /* CLASS */),
|
|
397
343
|
(!__props.isMobile)
|
|
398
344
|
? (vue.openBlock(), vue.createBlock(vue.unref(quasar.QCardActions), {
|
|
399
345
|
key: 0,
|
|
@@ -476,11 +422,9 @@
|
|
|
476
422
|
props: {
|
|
477
423
|
data: Object,
|
|
478
424
|
colOptions: Object,
|
|
479
|
-
props: Object
|
|
480
|
-
rowIndex: Number,
|
|
481
|
-
cellIndex: Number,
|
|
425
|
+
props: Object
|
|
482
426
|
},
|
|
483
|
-
emits: ['update'
|
|
427
|
+
emits: ['update'],
|
|
484
428
|
setup: function setup(__props, ref$1) {
|
|
485
429
|
var $emit = ref$1.emit;
|
|
486
430
|
|
|
@@ -496,7 +440,9 @@
|
|
|
496
440
|
|
|
497
441
|
var getRawValue = vue.computed({
|
|
498
442
|
get: function () {
|
|
499
|
-
|
|
443
|
+
if (props.colOptions.format)
|
|
444
|
+
{ return props.colOptions.format(localDetail.value[props.colOptions.name]); }
|
|
445
|
+
else { return localDetail.value[props.colOptions.name]; }
|
|
500
446
|
},
|
|
501
447
|
set: function (newValue) {
|
|
502
448
|
localDetail.value[props.colOptions.name] = newValue;
|
|
@@ -529,22 +475,13 @@
|
|
|
529
475
|
list_field: props.props.storeKey
|
|
530
476
|
})
|
|
531
477
|
.then(function (obj) {
|
|
532
|
-
$emit("update", { obj: obj, action: "update"
|
|
533
|
-
$emit("onClickTabHandler", props.rowIndex, props.cellIndex);
|
|
534
|
-
}});
|
|
478
|
+
$emit("update", { obj: obj, action: "update" });
|
|
535
479
|
});
|
|
536
480
|
}
|
|
537
481
|
|
|
538
|
-
function onEditCellHandler(field, value) {
|
|
539
|
-
$emit("onEditCellHandler", field, value);
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
function onClickTabHandler(event) {
|
|
543
|
-
var newValue = event.target.value;
|
|
544
|
-
$emit("onClickTabHandler", props.rowIndex, props.cellIndex, newValue != localValue.value);
|
|
545
|
-
}
|
|
546
|
-
|
|
547
482
|
return function (_ctx, _cache) {
|
|
483
|
+
var _component_q_input = vue.resolveComponent("q-input");
|
|
484
|
+
|
|
548
485
|
return (vue.openBlock(), vue.createElementBlock("td", null, [
|
|
549
486
|
(localDetail.value[props.colOptions.name] && props.colOptions.type === 'boolean')
|
|
550
487
|
? vue.renderSlot(_ctx.$slots, getScopedSlotName('boolean-check', props.colOptions.name), { key: 0 }, function () { return [
|
|
@@ -562,21 +499,18 @@
|
|
|
562
499
|
modelValue: localValue.value,
|
|
563
500
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) { return ((localValue).value = $event); }),
|
|
564
501
|
"auto-save": "",
|
|
565
|
-
onSave: onSave
|
|
566
|
-
onKeydown: vue.withKeys(vue.withModifiers(onClickTabHandler, ["prevent","stop"]), ["tab"])
|
|
502
|
+
onSave: onSave
|
|
567
503
|
}, {
|
|
568
504
|
default: vue.withCtx(function (scope) { return [
|
|
569
|
-
vue.createVNode(
|
|
570
|
-
autofocus: "",
|
|
571
|
-
"emit-value": "",
|
|
505
|
+
vue.createVNode(_component_q_input, {
|
|
572
506
|
modelValue: scope.value,
|
|
573
|
-
"onUpdate:modelValue":
|
|
507
|
+
"onUpdate:modelValue": function ($event) { return ((scope.value) = $event); },
|
|
574
508
|
label: props.colOptions.label,
|
|
575
509
|
onKeyup: vue.withKeys(scope.set, ["enter"])
|
|
576
|
-
}
|
|
510
|
+
}, null, 8 /* PROPS */, ["modelValue", "onUpdate:modelValue", "label", "onKeyup"])
|
|
577
511
|
]; }),
|
|
578
512
|
_: 1 /* STABLE */
|
|
579
|
-
}, 8 /* PROPS */, ["modelValue"
|
|
513
|
+
}, 8 /* PROPS */, ["modelValue"])
|
|
580
514
|
]))
|
|
581
515
|
}
|
|
582
516
|
}
|
|
@@ -620,7 +554,6 @@
|
|
|
620
554
|
table: {
|
|
621
555
|
title: "Titre Non défini",
|
|
622
556
|
},
|
|
623
|
-
useSendFiles: false,
|
|
624
557
|
extraRequestParams: {
|
|
625
558
|
index: {},
|
|
626
559
|
show: {},
|
|
@@ -647,12 +580,10 @@
|
|
|
647
580
|
props.modalEditOptions);
|
|
648
581
|
props.modalEditOptions.showBtn = Object.assign({}, defaultOptions.modalEditOptions.showBtn,
|
|
649
582
|
props.modalEditOptions.showBtn);
|
|
650
|
-
var extraRequestParamsTemp = {};
|
|
651
583
|
Object.keys(defaultOptions.extraRequestParams).forEach(function (key) {
|
|
652
|
-
|
|
584
|
+
props.extraRequestParams[key] = Object.assign({}, defaultOptions.extraRequestParams[key],
|
|
653
585
|
props.extraRequestParams[key]);
|
|
654
586
|
});
|
|
655
|
-
props.extraRequestParams = extraRequestParamsTemp;
|
|
656
587
|
return props;
|
|
657
588
|
});
|
|
658
589
|
|
|
@@ -758,9 +689,7 @@
|
|
|
758
689
|
align: "left",
|
|
759
690
|
sortable: true,
|
|
760
691
|
type: "string",
|
|
761
|
-
classes: props.value.getRowCellClass,
|
|
762
692
|
};
|
|
763
|
-
|
|
764
693
|
// Option de la table par défaut
|
|
765
694
|
var defautOptionsTable = {
|
|
766
695
|
loading: $collectionCrud.getFromCollection(
|
|
@@ -772,8 +701,7 @@
|
|
|
772
701
|
"row-key": function (row) { return config.columns
|
|
773
702
|
.filter(function (c) { return c.name !== undefined || c.field !== undefined; })
|
|
774
703
|
.map(function (c) { return row[c.name ? c.name : c.field]; })
|
|
775
|
-
.join()
|
|
776
|
-
row[$collectionCrud.getRouteParameterName(props.value.collection)]; },
|
|
704
|
+
.join(); },
|
|
777
705
|
"rows-per-page-options": [20, 50, 100],
|
|
778
706
|
};
|
|
779
707
|
|
|
@@ -869,7 +797,7 @@
|
|
|
869
797
|
/**
|
|
870
798
|
* Renvoie le nom de la route pour les liens de type A pour les édition en page
|
|
871
799
|
*/
|
|
872
|
-
|
|
800
|
+
var collectionCreateNamedRoute = vue.computed(function () {
|
|
873
801
|
return props.value.collection + "-store";
|
|
874
802
|
});
|
|
875
803
|
|
|
@@ -882,10 +810,6 @@
|
|
|
882
810
|
return typeof options.to === "function";
|
|
883
811
|
}
|
|
884
812
|
|
|
885
|
-
function getAdditionalClassActionBtns(row) {
|
|
886
|
-
return props.value.getRowCellClass ? ' '+props.value.getRowCellClass(row) : "";
|
|
887
|
-
}
|
|
888
|
-
|
|
889
813
|
return {
|
|
890
814
|
customFields: customFields,
|
|
891
815
|
table: table,
|
|
@@ -894,7 +818,6 @@
|
|
|
894
818
|
collectionEditNamedRoute: collectionEditNamedRoute,
|
|
895
819
|
collectionCreateNamedRoute: collectionCreateNamedRoute,
|
|
896
820
|
isTdClickable: isTdClickable,
|
|
897
|
-
getAdditionalClassActionBtns: getAdditionalClassActionBtns,
|
|
898
821
|
};
|
|
899
822
|
}
|
|
900
823
|
|
|
@@ -1165,7 +1088,6 @@
|
|
|
1165
1088
|
var rowsPerPage = ref.rowsPerPage;
|
|
1166
1089
|
var sortBy = ref.sortBy;
|
|
1167
1090
|
var descending = ref.descending;
|
|
1168
|
-
|
|
1169
1091
|
var filter = options.filter;
|
|
1170
1092
|
asyncProps.value = options;
|
|
1171
1093
|
|
|
@@ -1258,7 +1180,6 @@
|
|
|
1258
1180
|
stringlifyAndCheck(newValue.index, extraRequestParamsIndexStringlify)
|
|
1259
1181
|
) {
|
|
1260
1182
|
getList(true);
|
|
1261
|
-
extraRequestParamsIndexStringlify.value = JSON.stringify(newValue.index);
|
|
1262
1183
|
}
|
|
1263
1184
|
}
|
|
1264
1185
|
});
|
|
@@ -1285,26 +1206,11 @@
|
|
|
1285
1206
|
}
|
|
1286
1207
|
}
|
|
1287
1208
|
|
|
1288
|
-
function useSelection(props)
|
|
1289
|
-
{
|
|
1290
|
-
var selectedData = vue.ref([]);
|
|
1291
|
-
var selectionMode = vue.ref(props.value.table.selection ? props.value.table.selection : 'none');
|
|
1292
|
-
|
|
1293
|
-
vue.watch(selectedData,function(){
|
|
1294
|
-
props.value.table.selected = selectedData.value;
|
|
1295
|
-
});
|
|
1296
|
-
|
|
1297
|
-
return {
|
|
1298
|
-
selectedData: selectedData,
|
|
1299
|
-
selectionMode: selectionMode,
|
|
1300
|
-
}
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
1209
|
var _hoisted_1$2 = { class: "col" };
|
|
1304
1210
|
var _hoisted_2$2 = { key: 1 };
|
|
1305
1211
|
var _hoisted_3$2 = { key: 2 };
|
|
1306
1212
|
var _hoisted_4$2 = ["props", "onClick"];
|
|
1307
|
-
var _hoisted_5$
|
|
1213
|
+
var _hoisted_5$2 = ["props", "onClick"];
|
|
1308
1214
|
var _hoisted_6 = { class: "top-right-content" };
|
|
1309
1215
|
var _hoisted_7 = { id: "search-slot" };
|
|
1310
1216
|
var _hoisted_8 = { id: "top-right-under-add" };
|
|
@@ -1321,10 +1227,6 @@
|
|
|
1321
1227
|
showBtnEdit: Boolean,
|
|
1322
1228
|
showSlideLeft: Boolean,
|
|
1323
1229
|
showBtnCreate: Boolean,
|
|
1324
|
-
showBtnCreateTooltip:{
|
|
1325
|
-
type: Boolean,
|
|
1326
|
-
default: false
|
|
1327
|
-
},
|
|
1328
1230
|
storeKey: {
|
|
1329
1231
|
type: String,
|
|
1330
1232
|
default: 'list'
|
|
@@ -1359,7 +1261,6 @@
|
|
|
1359
1261
|
type: Object,
|
|
1360
1262
|
default: vue.ref({})
|
|
1361
1263
|
},
|
|
1362
|
-
useSendFiles: Boolean,
|
|
1363
1264
|
modalDeleteOptions: Object,
|
|
1364
1265
|
modalEditOptions: Object,
|
|
1365
1266
|
persistTableOptions: Object,
|
|
@@ -1373,18 +1274,12 @@
|
|
|
1373
1274
|
type: Boolean,
|
|
1374
1275
|
default: true
|
|
1375
1276
|
},
|
|
1376
|
-
getRowCellClass: {
|
|
1377
|
-
type: Function,
|
|
1378
|
-
default: null
|
|
1379
|
-
},
|
|
1380
1277
|
},
|
|
1381
1278
|
emits: [
|
|
1382
1279
|
"detailChange",
|
|
1383
1280
|
"modalOpenCreateUpdate",
|
|
1384
1281
|
"actionsCallback",
|
|
1385
|
-
"actionsSlideLeft",
|
|
1386
|
-
"onEditCellHandler"
|
|
1387
|
-
],
|
|
1282
|
+
"actionsSlideLeft" ],
|
|
1388
1283
|
setup: function setup(__props, ref$1) {
|
|
1389
1284
|
var $emit = ref$1.emit;
|
|
1390
1285
|
|
|
@@ -1407,8 +1302,8 @@
|
|
|
1407
1302
|
});
|
|
1408
1303
|
|
|
1409
1304
|
var isMobile = vue.computed(function () {
|
|
1410
|
-
if ($q.config.collectionCrudOptions && $q.config.collectionCrudOptions.maximalMobileScreenSize) {
|
|
1411
|
-
return
|
|
1305
|
+
if ($q.config.collectionCrudOptions && $q.screen.lt[$q.config.collectionCrudOptions.maximalMobileScreenSize]) {
|
|
1306
|
+
return $q.screen.lt[$q.config.collectionCrudOptions.maximalMobileScreenSize]
|
|
1412
1307
|
} else {
|
|
1413
1308
|
return $q.screen.lt.md
|
|
1414
1309
|
}
|
|
@@ -1445,7 +1340,6 @@
|
|
|
1445
1340
|
var collectionEditNamedRoute = ref$4.collectionEditNamedRoute;
|
|
1446
1341
|
var collectionCreateNamedRoute = ref$4.collectionCreateNamedRoute;
|
|
1447
1342
|
var isTdClickable = ref$4.isTdClickable;
|
|
1448
|
-
var getAdditionalClassActionBtns = ref$4.getAdditionalClassActionBtns;
|
|
1449
1343
|
|
|
1450
1344
|
var ref$5 = usePagination(props);
|
|
1451
1345
|
var pagination = ref$5.pagination;
|
|
@@ -1477,10 +1371,6 @@
|
|
|
1477
1371
|
var onCloseEditModal = ref$7.onCloseEditModal;
|
|
1478
1372
|
var onCloseDeleteModal = ref$7.onCloseDeleteModal;
|
|
1479
1373
|
|
|
1480
|
-
var ref$8 = useSelection(props);
|
|
1481
|
-
var selectedData = ref$8.selectedData;
|
|
1482
|
-
var selectionMode = ref$8.selectionMode;
|
|
1483
|
-
|
|
1484
1374
|
|
|
1485
1375
|
useWatchs($attrs, getList, pagination, ccrudTable);
|
|
1486
1376
|
|
|
@@ -1502,7 +1392,7 @@
|
|
|
1502
1392
|
clearTimeout(timer);
|
|
1503
1393
|
});
|
|
1504
1394
|
function onClickRow(row) {
|
|
1505
|
-
|
|
1395
|
+
onClickEdit(row);
|
|
1506
1396
|
}
|
|
1507
1397
|
function onSlideLeft(details, row) {
|
|
1508
1398
|
$emit("actionsSlideLeft", details, row);
|
|
@@ -1532,58 +1422,10 @@
|
|
|
1532
1422
|
document.getElementsByClassName(slideItemClass)[index].style.visibility = 'hidden';
|
|
1533
1423
|
}
|
|
1534
1424
|
}
|
|
1425
|
+
//
|
|
1535
1426
|
|
|
1536
|
-
function onEditCellHandler(field, value) {
|
|
1537
|
-
$emit("onEditCellHandler", field, value);
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
// Gestion de la tabulation dans le tableau
|
|
1541
|
-
var popupCells = vue.ref([]);
|
|
1542
|
-
|
|
1543
|
-
var delayNextTabOption = vue.ref(null);
|
|
1544
|
-
vue.watch(rows, function (newValue, oldValue) {
|
|
1545
|
-
if (delayNextTabOption.value) {
|
|
1546
|
-
setTimeout(function () {
|
|
1547
|
-
if (delayNextTabOption.value) {
|
|
1548
|
-
onClickTabHandler(delayNextTabOption.value.rowIndex, delayNextTabOption.value.cellIndex, false, false);
|
|
1549
|
-
}
|
|
1550
|
-
}, 400);
|
|
1551
|
-
}
|
|
1552
|
-
}, { deep: true });
|
|
1553
|
-
|
|
1554
|
-
function onClickTabHandler(rowIndex, cellIndex, updated, openPrevious) {
|
|
1555
|
-
if ( updated === void 0 ) updated = false;
|
|
1556
|
-
if ( openPrevious === void 0 ) openPrevious = true;
|
|
1557
|
-
|
|
1558
|
-
if (openPrevious) {
|
|
1559
|
-
popupCells.value[rowIndex + '_' + cellIndex].$el.click();
|
|
1560
|
-
}
|
|
1561
|
-
if (updated) {
|
|
1562
|
-
delayNextTabOption.value = {
|
|
1563
|
-
rowIndex: rowIndex,
|
|
1564
|
-
cellIndex: cellIndex
|
|
1565
|
-
};
|
|
1566
|
-
} else {
|
|
1567
|
-
delayNextTabOption.value = null;
|
|
1568
|
-
popupCells.value[getNextCellIndex(rowIndex, cellIndex)].$el.click();
|
|
1569
|
-
}
|
|
1570
|
-
}
|
|
1571
|
-
function getRowIndex(row) {
|
|
1572
|
-
return rows.value.indexOf(row);
|
|
1573
|
-
}function getNextCellIndex(rowIndex, cellIndex) {
|
|
1574
|
-
if (getEditablesTd.value.length > parseInt(cellIndex) + 1) {
|
|
1575
|
-
return rowIndex + '_' + (parseInt(cellIndex) + 1)
|
|
1576
|
-
} else {
|
|
1577
|
-
return (parseInt(rowIndex) + 1) + '_' + 0
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
function onClearSearchHandler() {
|
|
1581
|
-
filter.value = "";
|
|
1582
|
-
}
|
|
1583
1427
|
|
|
1584
1428
|
return function (_ctx, _cache) {
|
|
1585
|
-
var _component_q_tooltip = vue.resolveComponent("q-tooltip");
|
|
1586
|
-
|
|
1587
1429
|
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
|
|
1588
1430
|
vue.createVNode(vue.unref(quasar.QTable), vue.mergeProps({
|
|
1589
1431
|
flat: "",
|
|
@@ -1591,13 +1433,10 @@
|
|
|
1591
1433
|
}, vue.unref(table), {
|
|
1592
1434
|
filter: filter.value,
|
|
1593
1435
|
onRequest: vue.unref(asyncRequest),
|
|
1594
|
-
ref_key: "ccrudTable",
|
|
1595
|
-
ref: ccrudTable,
|
|
1596
1436
|
pagination: vue.unref(pagination),
|
|
1597
1437
|
"onUpdate:pagination": _cache[1] || (_cache[1] = function ($event) { return (vue.isRef(pagination) ? (pagination).value = $event : null); }),
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
"onUpdate:selected": _cache[2] || (_cache[2] = function ($event) { return (vue.isRef(selectedData) ? (selectedData).value = $event : null); })
|
|
1438
|
+
ref_key: "ccrudTable",
|
|
1439
|
+
ref: ccrudTable
|
|
1601
1440
|
}), vue.createSlots({
|
|
1602
1441
|
"top-left": vue.withCtx(function () { return [
|
|
1603
1442
|
vue.createElementVNode("div", null, [
|
|
@@ -1615,27 +1454,16 @@
|
|
|
1615
1454
|
modelValue: filter.value,
|
|
1616
1455
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) { return ((filter).value = $event); }),
|
|
1617
1456
|
placeholder: "Recherche",
|
|
1618
|
-
|
|
1619
|
-
|
|
1457
|
+
filled: "",
|
|
1458
|
+
"bg-color": "grey-2",
|
|
1459
|
+
square: "",
|
|
1620
1460
|
style: {"width":"180px"}
|
|
1621
1461
|
}, {
|
|
1622
1462
|
append: vue.withCtx(function () { return [
|
|
1623
|
-
(
|
|
1624
|
-
? (vue.openBlock(), vue.createBlock(vue.unref(quasar.QBtn), {
|
|
1625
|
-
key: 0,
|
|
1626
|
-
dense: "",
|
|
1627
|
-
flat: "",
|
|
1628
|
-
round: "",
|
|
1629
|
-
icon: "mdi-close",
|
|
1630
|
-
onClick: onClearSearchHandler
|
|
1631
|
-
}))
|
|
1632
|
-
: (vue.openBlock(), vue.createBlock(vue.unref(quasar.QIcon), {
|
|
1633
|
-
key: 1,
|
|
1634
|
-
name: "search"
|
|
1635
|
-
}))
|
|
1463
|
+
vue.createVNode(vue.unref(quasar.QIcon), { name: "search" })
|
|
1636
1464
|
]; }),
|
|
1637
1465
|
_: 1 /* STABLE */
|
|
1638
|
-
}, 8 /* PROPS */, ["modelValue"
|
|
1466
|
+
}, 8 /* PROPS */, ["modelValue"]))
|
|
1639
1467
|
: vue.createCommentVNode("v-if", true),
|
|
1640
1468
|
(vue.unref(showBtnCreatePage))
|
|
1641
1469
|
? (vue.openBlock(), vue.createBlock(vue.unref(quasar.QBtn), {
|
|
@@ -1647,19 +1475,7 @@
|
|
|
1647
1475
|
color: "primary",
|
|
1648
1476
|
style: {"margin-left":"1em"},
|
|
1649
1477
|
square: ""
|
|
1650
|
-
},
|
|
1651
|
-
default: vue.withCtx(function () { return [
|
|
1652
|
-
(__props.showBtnCreateTooltip)
|
|
1653
|
-
? (vue.openBlock(), vue.createBlock(_component_q_tooltip, { key: 0 }, {
|
|
1654
|
-
default: vue.withCtx(function () { return [
|
|
1655
|
-
vue.renderSlot(_ctx.$slots, "create-btn-tooltip")
|
|
1656
|
-
]; }),
|
|
1657
|
-
_: 3 /* FORWARDED */
|
|
1658
|
-
}))
|
|
1659
|
-
: vue.createCommentVNode("v-if", true)
|
|
1660
|
-
]; }),
|
|
1661
|
-
_: 3 /* FORWARDED */
|
|
1662
|
-
}, 8 /* PROPS */, ["to", "label"]))
|
|
1478
|
+
}, null, 8 /* PROPS */, ["to", "label"]))
|
|
1663
1479
|
: (vue.unref(showBtnCreate))
|
|
1664
1480
|
? (vue.openBlock(), vue.createBlock(vue.unref(quasar.QBtn), {
|
|
1665
1481
|
key: 2,
|
|
@@ -1669,19 +1485,7 @@
|
|
|
1669
1485
|
style: {"margin-left":"1em"},
|
|
1670
1486
|
onClick: vue.unref(onClickAdd),
|
|
1671
1487
|
square: ""
|
|
1672
|
-
},
|
|
1673
|
-
default: vue.withCtx(function () { return [
|
|
1674
|
-
(__props.showBtnCreateTooltip)
|
|
1675
|
-
? (vue.openBlock(), vue.createBlock(_component_q_tooltip, { key: 0 }, {
|
|
1676
|
-
default: vue.withCtx(function () { return [
|
|
1677
|
-
vue.renderSlot(_ctx.$slots, "create-btn-tooltip")
|
|
1678
|
-
]; }),
|
|
1679
|
-
_: 3 /* FORWARDED */
|
|
1680
|
-
}))
|
|
1681
|
-
: vue.createCommentVNode("v-if", true)
|
|
1682
|
-
]; }),
|
|
1683
|
-
_: 3 /* FORWARDED */
|
|
1684
|
-
}, 8 /* PROPS */, ["label", "onClick"]))
|
|
1488
|
+
}, null, 8 /* PROPS */, ["label", "onClick"]))
|
|
1685
1489
|
: vue.createCommentVNode("v-if", true),
|
|
1686
1490
|
vue.renderSlot(_ctx.$slots, "top-right-after-add")
|
|
1687
1491
|
]),
|
|
@@ -1696,7 +1500,7 @@
|
|
|
1696
1500
|
return [
|
|
1697
1501
|
vue.createElementVNode("td", {
|
|
1698
1502
|
props: props,
|
|
1699
|
-
class:
|
|
1503
|
+
class: "action-buttons"
|
|
1700
1504
|
}, [
|
|
1701
1505
|
vue.renderSlot(_ctx.$slots, "row-action-before-controllers", {
|
|
1702
1506
|
key: 0,
|
|
@@ -1716,18 +1520,24 @@
|
|
|
1716
1520
|
? (vue.openBlock(), vue.createBlock(vue.unref(quasar.QBtn), {
|
|
1717
1521
|
key: 2,
|
|
1718
1522
|
type: "a",
|
|
1719
|
-
to: {
|
|
1523
|
+
to: {
|
|
1524
|
+
name: vue.unref(collectionEditNamedRoute),
|
|
1525
|
+
params: ( obj = {}, obj[vue.unref(route_parameter_name)] = props.row[vue.unref(route_parameter_name)], obj ),
|
|
1526
|
+
},
|
|
1720
1527
|
color: "primary",
|
|
1721
1528
|
icon: "edit",
|
|
1722
1529
|
flat: "",
|
|
1723
1530
|
round: vue.unref(isMobile)
|
|
1724
1531
|
}, null, 8 /* PROPS */, ["to", "round"]))
|
|
1725
1532
|
: vue.createCommentVNode("v-if", true),
|
|
1726
|
-
(!__props.editablePage &&
|
|
1533
|
+
(!__props.editablePage && __props.displayActionCallback(props.row, 'show'))
|
|
1727
1534
|
? (vue.openBlock(), vue.createBlock(vue.unref(quasar.QBtn), {
|
|
1728
1535
|
key: 3,
|
|
1729
1536
|
type: "a",
|
|
1730
|
-
to: {
|
|
1537
|
+
to: {
|
|
1538
|
+
name: vue.unref(collectionEditNamedRoute),
|
|
1539
|
+
params: ( obj$1 = {}, obj$1[vue.unref(route_parameter_name)] = props.row[vue.unref(route_parameter_name)], obj$1 ),
|
|
1540
|
+
},
|
|
1731
1541
|
color: "primary",
|
|
1732
1542
|
icon: "mdi-magnify-plus-outline",
|
|
1733
1543
|
flat: ""
|
|
@@ -1746,7 +1556,7 @@
|
|
|
1746
1556
|
vue.renderSlot(_ctx.$slots, "row-action-after-controllers", {
|
|
1747
1557
|
data: props.row
|
|
1748
1558
|
})
|
|
1749
|
-
],
|
|
1559
|
+
], 8 /* PROPS */, _hoisted_9)
|
|
1750
1560
|
];
|
|
1751
1561
|
}),
|
|
1752
1562
|
_: 2 /* DYNAMIC */
|
|
@@ -1774,13 +1584,13 @@
|
|
|
1774
1584
|
default: vue.withCtx(function () { return [
|
|
1775
1585
|
vue.createVNode(vue.unref(quasar.QItem), {
|
|
1776
1586
|
style: {"align-items":"center"},
|
|
1777
|
-
class:
|
|
1587
|
+
class: "mobile-item"
|
|
1778
1588
|
}, {
|
|
1779
1589
|
default: vue.withCtx(function () { return [
|
|
1780
1590
|
vue.createCommentVNode(" On affiche la première colonne seulement et on garde celle des actions "),
|
|
1781
1591
|
vue.createVNode(vue.unref(quasar.QItemSection), {
|
|
1782
1592
|
class: "mobile-item-content",
|
|
1783
|
-
onClick: function ($event) { return (vue.unref(showBtnEdit) ? onClickRow(props.row)
|
|
1593
|
+
onClick: function ($event) { return (vue.unref(showBtnEdit) ? onClickRow(props.row):''); }
|
|
1784
1594
|
}, {
|
|
1785
1595
|
default: vue.withCtx(function () { return [
|
|
1786
1596
|
(vue.unref($slots)['body-cell-mobile'])
|
|
@@ -1796,7 +1606,7 @@
|
|
|
1796
1606
|
_: 2 /* DYNAMIC */
|
|
1797
1607
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]),
|
|
1798
1608
|
vue.createVNode(vue.unref(quasar.QItemSection), {
|
|
1799
|
-
style: {"display":"flex","flex-direction":"row"
|
|
1609
|
+
style: {"display":"flex","flex-direction":"row"},
|
|
1800
1610
|
side: ""
|
|
1801
1611
|
}, {
|
|
1802
1612
|
default: vue.withCtx(function () { return [
|
|
@@ -1810,7 +1620,7 @@
|
|
|
1810
1620
|
}, 1024 /* DYNAMIC_SLOTS */)
|
|
1811
1621
|
]; }),
|
|
1812
1622
|
_: 2 /* DYNAMIC */
|
|
1813
|
-
},
|
|
1623
|
+
}, 1024 /* DYNAMIC_SLOTS */)
|
|
1814
1624
|
]; }),
|
|
1815
1625
|
_: 2 /* DYNAMIC */
|
|
1816
1626
|
}, [
|
|
@@ -1846,7 +1656,7 @@
|
|
|
1846
1656
|
? (vue.openBlock(), vue.createElementBlock("td", {
|
|
1847
1657
|
props: props,
|
|
1848
1658
|
key: options.slotName,
|
|
1849
|
-
class: vue.normalizeClass(
|
|
1659
|
+
class: vue.normalizeClass(vue.unref(isTdClickable)(options) ? 'cursor-pointer' : ''),
|
|
1850
1660
|
onClick: function ($event) { return (vue.unref(isTdClickable)(options) ? options.to(props.row) : null); }
|
|
1851
1661
|
}, [
|
|
1852
1662
|
(props.row[options.field])
|
|
@@ -1868,11 +1678,11 @@
|
|
|
1868
1678
|
: (vue.openBlock(), vue.createElementBlock("td", {
|
|
1869
1679
|
props: props,
|
|
1870
1680
|
key: options.slotName + '-else',
|
|
1871
|
-
class:
|
|
1681
|
+
class: "cursor-pointer",
|
|
1872
1682
|
onClick: function ($event) { return (options.to(props.row)); }
|
|
1873
1683
|
}, vue.toDisplayString(options.format
|
|
1874
|
-
|
|
1875
|
-
|
|
1684
|
+
? options.format(props.row)
|
|
1685
|
+
: props.row[options.field]), 9 /* TEXT, PROPS */, _hoisted_5$2))
|
|
1876
1686
|
]; })
|
|
1877
1687
|
}
|
|
1878
1688
|
}),
|
|
@@ -1884,22 +1694,17 @@
|
|
|
1884
1694
|
]; })
|
|
1885
1695
|
}
|
|
1886
1696
|
}),
|
|
1887
|
-
vue.renderList(vue.unref(getEditablesTd), function (config
|
|
1697
|
+
vue.renderList(vue.unref(getEditablesTd), function (config) {
|
|
1888
1698
|
return {
|
|
1889
1699
|
name: config.slotName,
|
|
1890
1700
|
fn: vue.withCtx(function (slotProps) { return [
|
|
1891
1701
|
(vue.unref(editOnTable))
|
|
1892
1702
|
? (vue.openBlock(), vue.createBlock(script$3, {
|
|
1893
|
-
ref: function (el) { popupCells.value[getRowIndex(slotProps.row) + '_' + index] = el; },
|
|
1894
1703
|
key: config.slotName,
|
|
1895
|
-
rowIndex: getRowIndex(slotProps.row),
|
|
1896
|
-
cellIndex: index,
|
|
1897
1704
|
data: slotProps.row,
|
|
1898
1705
|
props: vue.unref(props),
|
|
1899
1706
|
colOptions: config.options,
|
|
1900
|
-
onUpdate: vue.unref(onUpdateTd)
|
|
1901
|
-
onOnEditCellHandler: onEditCellHandler,
|
|
1902
|
-
onOnClickTabHandler: onClickTabHandler
|
|
1707
|
+
onUpdate: vue.unref(onUpdateTd)
|
|
1903
1708
|
}, vue.createSlots({ _: 2 /* DYNAMIC */ }, [
|
|
1904
1709
|
vue.renderList(vue.unref($slots), function (_, slot) {
|
|
1905
1710
|
return {
|
|
@@ -1909,12 +1714,12 @@
|
|
|
1909
1714
|
]; })
|
|
1910
1715
|
}
|
|
1911
1716
|
})
|
|
1912
|
-
]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["
|
|
1717
|
+
]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["data", "props", "colOptions", "onUpdate"]))
|
|
1913
1718
|
: vue.createCommentVNode("v-if", true)
|
|
1914
1719
|
]; })
|
|
1915
1720
|
}
|
|
1916
1721
|
})
|
|
1917
|
-
]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */, ["rows", "filter", "onRequest", "pagination"
|
|
1722
|
+
]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */, ["rows", "filter", "onRequest", "pagination"]),
|
|
1918
1723
|
vue.createCommentVNode(" Modal de Confirmation Suppression "),
|
|
1919
1724
|
vue.createVNode(script$5, {
|
|
1920
1725
|
localDetail: localDetail.value,
|
|
@@ -1950,7 +1755,7 @@
|
|
|
1950
1755
|
name: slot,
|
|
1951
1756
|
fn: vue.withCtx(function (scope) { return [
|
|
1952
1757
|
(vue.openBlock(), vue.createElementBlock("div", {
|
|
1953
|
-
class: vue.normalizeClass(vue.unref(isMobile) ? 'mobile-content modal-content'
|
|
1758
|
+
class: vue.normalizeClass(vue.unref(isMobile) ? 'mobile-content modal-content':'modal-content'),
|
|
1954
1759
|
key: slot
|
|
1955
1760
|
}, [
|
|
1956
1761
|
vue.renderSlot(_ctx.$slots, slot, vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
@@ -1965,35 +1770,23 @@
|
|
|
1965
1770
|
|
|
1966
1771
|
};
|
|
1967
1772
|
|
|
1968
|
-
var css_248z$2 = "\n.action-buttons[data-v-60881ef8] {\n text-align: end;\n}\n.modal-content[data-v-60881ef8] {\n padding: 15px;\n}\n.q-table-control[data-v-60881ef8] {\n flex: 0 1 55%;\n}\n#search-slot[data-v-60881ef8] {\n display: flex;\n
|
|
1773
|
+
var css_248z$2 = "\n.action-buttons[data-v-60881ef8] {\n text-align: end;\n}\n.modal-content[data-v-60881ef8] {\n padding: 15px;\n}\n.q-table-control[data-v-60881ef8] {\n flex: 0 1 55%;\n}\n#search-slot[data-v-60881ef8] {\n display: flex;\n}\n#top-right-under-add[data-v-60881ef8] {\n margin-top: 20px;\n display: flex;\n flex-direction: column;\n}\n.mobile-item[data-v-60881ef8] {\n min-height: 8.5vh;\n border-bottom: solid 1px lightgrey;\n}\n.mobile-item-content>span[data-v-60881ef8] {\n word-break: break-all;\n}\n.body-cell-mobile[data-v-60881ef8] {\n word-break: break-all;\n}\n";
|
|
1969
1774
|
styleInject(css_248z$2);
|
|
1970
1775
|
|
|
1971
1776
|
script$2.__scopeId = "data-v-60881ef8";
|
|
1972
1777
|
script$2.__file = "src/components/VlankCollectionCrud.vue";
|
|
1973
1778
|
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
router.push(localStorageRoute);
|
|
1982
|
-
localStorage.removeItem(route.meta.goBackRoute);
|
|
1983
|
-
} else if (route.meta.mainParentRoutePath) {
|
|
1984
|
-
router.push(route.meta.mainParentRoutePath);
|
|
1985
|
-
} else {
|
|
1986
|
-
router.go(-1);
|
|
1987
|
-
}
|
|
1988
|
-
}
|
|
1989
|
-
|
|
1990
|
-
var _hoisted_1$1 = { style: {"display":"flex","align-items":"center"} };
|
|
1991
|
-
var _hoisted_2$1 = { key: 0 };
|
|
1992
|
-
var _hoisted_3$1 = {
|
|
1779
|
+
var _hoisted_1$1 = {
|
|
1780
|
+
key: 0,
|
|
1781
|
+
class: "edit-page-header"
|
|
1782
|
+
};
|
|
1783
|
+
var _hoisted_2$1 = { style: {"display":"flex","align-items":"center"} };
|
|
1784
|
+
var _hoisted_3$1 = { key: 0 };
|
|
1785
|
+
var _hoisted_4$1 = {
|
|
1993
1786
|
key: 1,
|
|
1994
1787
|
class: "edit-page-body"
|
|
1995
1788
|
};
|
|
1996
|
-
var
|
|
1789
|
+
var _hoisted_5$1 = {
|
|
1997
1790
|
key: 2,
|
|
1998
1791
|
class: "edit-page-body"
|
|
1999
1792
|
};
|
|
@@ -2007,17 +1800,12 @@
|
|
|
2007
1800
|
var $emit = ref$1.emit;
|
|
2008
1801
|
|
|
2009
1802
|
|
|
2010
|
-
var route = vueRouter.useRoute();
|
|
2011
1803
|
var router = vueRouter.useRouter();
|
|
1804
|
+
var route = vueRouter.useRoute();
|
|
2012
1805
|
var store = vuex.useStore();
|
|
2013
1806
|
var collectionCrud = vue.inject('vlank-ccrud');
|
|
2014
1807
|
|
|
2015
1808
|
|
|
2016
|
-
function onClickBackTemplate(){
|
|
2017
|
-
onClickBack(route, router);
|
|
2018
|
-
}
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
1809
|
|
|
2022
1810
|
var localDetail = vue.ref(null);
|
|
2023
1811
|
var containerMode = vue.ref(route.meta.containerMode);
|
|
@@ -2045,6 +1833,13 @@
|
|
|
2045
1833
|
: { label: "Valider", icon: "mdi-check" };
|
|
2046
1834
|
});
|
|
2047
1835
|
|
|
1836
|
+
var onClickBack = function () {
|
|
1837
|
+
if (route.meta.mainParentRoutePath) {
|
|
1838
|
+
router.push(route.meta.mainParentRoutePath);
|
|
1839
|
+
} else {
|
|
1840
|
+
router.go(-1);
|
|
1841
|
+
}
|
|
1842
|
+
};
|
|
2048
1843
|
var onCustomTitle = function (title) {
|
|
2049
1844
|
customTitle.value = title;
|
|
2050
1845
|
};
|
|
@@ -2061,48 +1856,20 @@
|
|
|
2061
1856
|
var onExtraRequestParams = function (extraRequestParamsValue) {
|
|
2062
1857
|
if (extraRequestParamsValue) { extraRequestParams.value = extraRequestParamsValue; }
|
|
2063
1858
|
};
|
|
2064
|
-
|
|
2065
|
-
var submitLoading = vue.ref(false);
|
|
2066
1859
|
var onClickSubmit = function () {
|
|
2067
|
-
|
|
2068
|
-
if (route.meta.useSendFiles) {
|
|
2069
|
-
collectionCrud
|
|
2070
|
-
.collectionAction({
|
|
2071
|
-
collectionName: route.meta.collection,
|
|
2072
|
-
action: "send-file",
|
|
2073
|
-
params: Object.assign({}, localDetail.value, extraRequestParams.value),
|
|
2074
|
-
axios_options: {
|
|
2075
|
-
oniti_success_notification_message: 'Modification effectuée'
|
|
2076
|
-
},
|
|
2077
|
-
})
|
|
2078
|
-
.then(function (obj) {
|
|
2079
|
-
submitCallback(obj);
|
|
2080
|
-
}).finally(function () {
|
|
2081
|
-
submitLoading.value = false;
|
|
2082
|
-
});
|
|
2083
|
-
} else {
|
|
2084
|
-
collectionCrud
|
|
1860
|
+
collectionCrud
|
|
2085
1861
|
.collectionAction({
|
|
2086
1862
|
collectionName: route.meta.collection,
|
|
2087
1863
|
action: "update",
|
|
2088
1864
|
params: Object.assign({}, localDetail.value, extraRequestParams.value),
|
|
2089
1865
|
})
|
|
2090
1866
|
.then(function (obj) {
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
1867
|
+
if (route.meta.goBackAfterValidation) {
|
|
1868
|
+
onClickBack();
|
|
1869
|
+
}
|
|
1870
|
+
localDetail.value = obj;
|
|
2094
1871
|
});
|
|
2095
|
-
}
|
|
2096
1872
|
};
|
|
2097
|
-
|
|
2098
|
-
function submitCallback(obj) {
|
|
2099
|
-
if (route.meta.goBackAfterValidation) {
|
|
2100
|
-
onClickBack(route, router);
|
|
2101
|
-
}
|
|
2102
|
-
localDetail.value = JSON.parse(JSON.stringify(obj));
|
|
2103
|
-
previousLocalDetail.value = JSON.parse(JSON.stringify(obj));
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
1873
|
var onSubscribe = function (mutation, state) {
|
|
2107
1874
|
|
|
2108
1875
|
if (
|
|
@@ -2114,27 +1881,15 @@
|
|
|
2114
1881
|
}
|
|
2115
1882
|
};
|
|
2116
1883
|
|
|
2117
|
-
|
|
2118
|
-
var actual_route = route;
|
|
2119
|
-
var actual_collection = vue.ref(route.meta.collection);
|
|
2120
|
-
vue.watch(router.currentRoute,function (new_current_route, old_current_route ) {
|
|
2121
|
-
if(new_current_route.meta.collection){
|
|
2122
|
-
actual_route = new_current_route;
|
|
2123
|
-
route_parameter_name = collectionCrud.getRouteParameterName(new_current_route.meta.collection);
|
|
2124
|
-
propsLibelleTitle.value = new_current_route.meta.propsLibelleTitle;
|
|
2125
|
-
actual_collection.value = new_current_route.meta.collection;
|
|
2126
|
-
fetchDetail();
|
|
2127
|
-
}
|
|
2128
|
-
},{deep:true});
|
|
2129
|
-
|
|
2130
|
-
function fetchDetail(){
|
|
1884
|
+
vue.onMounted(function () {
|
|
2131
1885
|
var obj;
|
|
2132
1886
|
|
|
2133
1887
|
if (!containerMode.value) {
|
|
2134
|
-
var parameter_route_value =
|
|
1888
|
+
var parameter_route_value = route.params[route_parameter_name];
|
|
1889
|
+
|
|
2135
1890
|
collectionCrud
|
|
2136
1891
|
.collectionAction({
|
|
2137
|
-
collectionName:
|
|
1892
|
+
collectionName: route.meta.collection,
|
|
2138
1893
|
action: "detail",
|
|
2139
1894
|
lazy: true,
|
|
2140
1895
|
params: ( obj = {}, obj[route_parameter_name] = parameter_route_value, obj ),
|
|
@@ -2143,24 +1898,7 @@
|
|
|
2143
1898
|
localDetail.value = Object.assign({}, obj);
|
|
2144
1899
|
$emit("collectionCrudUpdateLocalDetail", localDetail.value);
|
|
2145
1900
|
});
|
|
2146
|
-
}else {
|
|
2147
|
-
localDetail.value = null;
|
|
2148
|
-
}
|
|
2149
|
-
}
|
|
2150
|
-
|
|
2151
|
-
var isLocalDetailUpdated = vue.ref(false);
|
|
2152
|
-
var previousLocalDetail = vue.ref(null);
|
|
2153
|
-
|
|
2154
|
-
vue.watch(localDetail, function (newVal) {
|
|
2155
|
-
if (newVal && !previousLocalDetail.value) {
|
|
2156
|
-
previousLocalDetail.value = JSON.parse(JSON.stringify(newVal));
|
|
2157
|
-
} else {
|
|
2158
|
-
isLocalDetailUpdated.value = JSON.stringify(newVal) !== JSON.stringify(previousLocalDetail.value);
|
|
2159
1901
|
}
|
|
2160
|
-
}, {deep:true});
|
|
2161
|
-
|
|
2162
|
-
vue.onMounted(function () {
|
|
2163
|
-
fetchDetail();
|
|
2164
1902
|
unsubscribe = store.subscribe(onSubscribe);
|
|
2165
1903
|
});
|
|
2166
1904
|
|
|
@@ -2170,46 +1908,41 @@
|
|
|
2170
1908
|
}
|
|
2171
1909
|
});
|
|
2172
1910
|
|
|
1911
|
+
var route_parameter_name = collectionCrud.getRouteParameterName(route.meta.collection);
|
|
2173
1912
|
|
|
2174
1913
|
return function (_ctx, _cache) {
|
|
2175
1914
|
return (vue.openBlock(), vue.createBlock(vue.unref(quasar.QPage), null, {
|
|
2176
1915
|
default: vue.withCtx(function () { return [
|
|
2177
1916
|
(!containerMode.value)
|
|
2178
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
2179
|
-
|
|
2180
|
-
key: actual_collection.value
|
|
2181
|
-
}, [
|
|
2182
|
-
vue.createElementVNode("div", _hoisted_1$1, [
|
|
1917
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
|
|
1918
|
+
vue.createElementVNode("div", _hoisted_2$1, [
|
|
2183
1919
|
vue.createVNode(vue.unref(quasar.QBtn), {
|
|
2184
|
-
onClick:
|
|
1920
|
+
onClick: onClickBack,
|
|
2185
1921
|
color: "primary",
|
|
2186
1922
|
icon: "arrow_back"
|
|
2187
1923
|
}),
|
|
2188
1924
|
vue.createElementVNode("h2", null, vue.toDisplayString(vue.unref(getTitle)), 1 /* TEXT */)
|
|
2189
1925
|
]),
|
|
2190
1926
|
(!containerMode.value && editablePage.value)
|
|
2191
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
1927
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$1, [
|
|
2192
1928
|
vue.createVNode(vue.unref(quasar.QBtn), {
|
|
1929
|
+
color: "primary",
|
|
2193
1930
|
icon: vue.unref(getSubmitBtn).icon,
|
|
2194
|
-
onClick: onClickSubmit
|
|
2195
|
-
disable: !isLocalDetailUpdated.value,
|
|
2196
|
-
color: isLocalDetailUpdated.value ? 'primary' : 'grey-5',
|
|
2197
|
-
loading: submitLoading.value
|
|
1931
|
+
onClick: onClickSubmit
|
|
2198
1932
|
}, {
|
|
2199
1933
|
default: vue.withCtx(function () { return [
|
|
2200
1934
|
vue.createTextVNode(vue.toDisplayString(vue.unref(getSubmitBtn).label), 1 /* TEXT */)
|
|
2201
1935
|
]; }),
|
|
2202
1936
|
_: 1 /* STABLE */
|
|
2203
|
-
}, 8 /* PROPS */, ["icon"
|
|
1937
|
+
}, 8 /* PROPS */, ["icon"])
|
|
2204
1938
|
]))
|
|
2205
1939
|
: vue.createCommentVNode("v-if", true)
|
|
2206
1940
|
]))
|
|
2207
1941
|
: vue.createCommentVNode("v-if", true),
|
|
2208
1942
|
(localDetail.value)
|
|
2209
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
1943
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1, [
|
|
2210
1944
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(Components__default["default"])[vue.unref(formComponent)]), {
|
|
2211
1945
|
data: localDetail.value,
|
|
2212
|
-
key: localDetail.value[vue.unref(route_parameter_name)],
|
|
2213
1946
|
onExtraRequestParams: onExtraRequestParams,
|
|
2214
1947
|
onCustomTitle: onCustomTitle,
|
|
2215
1948
|
onCustomSubmitBtn: onCustomSubmitBtn,
|
|
@@ -2217,7 +1950,7 @@
|
|
|
2217
1950
|
onEditablePage: onEditablePage
|
|
2218
1951
|
}, null, 40 /* PROPS, HYDRATE_EVENTS */, ["data"]))
|
|
2219
1952
|
]))
|
|
2220
|
-
: (vue.openBlock(), vue.createElementBlock("div",
|
|
1953
|
+
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$1, [
|
|
2221
1954
|
vue.createVNode(vue.unref(quasar.QSpinner), {
|
|
2222
1955
|
class: "loader",
|
|
2223
1956
|
color: "accent"
|
|
@@ -2261,15 +1994,10 @@
|
|
|
2261
1994
|
var $emit = ref$1.emit;
|
|
2262
1995
|
|
|
2263
1996
|
|
|
2264
|
-
var route = vueRouter.useRoute();
|
|
2265
1997
|
var router = vueRouter.useRouter();
|
|
1998
|
+
var route = vueRouter.useRoute();
|
|
2266
1999
|
var collectionCrud = vue.inject('vlank-ccrud');
|
|
2267
2000
|
|
|
2268
|
-
function onClickBackTemplate(){
|
|
2269
|
-
onClickBack(route, router);
|
|
2270
|
-
}
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
2001
|
|
|
2274
2002
|
|
|
2275
2003
|
var localDetail = vue.ref(null);
|
|
@@ -2296,6 +2024,14 @@
|
|
|
2296
2024
|
: { label: "Valider", icon: "mdi-check" };
|
|
2297
2025
|
});
|
|
2298
2026
|
|
|
2027
|
+
var onClickBack = function () {
|
|
2028
|
+
if (route.meta.mainParentRoutePath) {
|
|
2029
|
+
router.push(route.meta.mainParentRoutePath);
|
|
2030
|
+
} else {
|
|
2031
|
+
router.go(-1);
|
|
2032
|
+
}
|
|
2033
|
+
};
|
|
2034
|
+
|
|
2299
2035
|
var onCustomSubmitBtn = function (button) {
|
|
2300
2036
|
customSubmitBtn.value.label = button.label;
|
|
2301
2037
|
customSubmitBtn.value.icon = button.icon;
|
|
@@ -2307,27 +2043,8 @@
|
|
|
2307
2043
|
var onExtraRequestParams = function (extraRequestParamsValue) {
|
|
2308
2044
|
if (extraRequestParamsValue) { extraRequestParams.value = extraRequestParamsValue; }
|
|
2309
2045
|
};
|
|
2310
|
-
|
|
2311
|
-
var submitLoading = vue.ref(false);
|
|
2312
2046
|
var onClickSubmit = function () {
|
|
2313
|
-
|
|
2314
|
-
if (route.meta.useSendFiles) {
|
|
2315
|
-
collectionCrud
|
|
2316
|
-
.collectionAction({
|
|
2317
|
-
collectionName: route.meta.collection,
|
|
2318
|
-
action: "send-file",
|
|
2319
|
-
params: Object.assign({}, localDetail.value, extraRequestParams.value),
|
|
2320
|
-
})
|
|
2321
|
-
.then(function (obj) {
|
|
2322
|
-
if (route.meta.goBackAfterValidation) {
|
|
2323
|
-
onClickBack(route, router);
|
|
2324
|
-
}
|
|
2325
|
-
localDetail.value = obj;
|
|
2326
|
-
}).finally(function () {
|
|
2327
|
-
submitLoading.value = false;
|
|
2328
|
-
});
|
|
2329
|
-
} else {
|
|
2330
|
-
collectionCrud
|
|
2047
|
+
collectionCrud
|
|
2331
2048
|
.collectionAction({
|
|
2332
2049
|
collectionName: route.meta.collection,
|
|
2333
2050
|
action: "create",
|
|
@@ -2335,14 +2052,10 @@
|
|
|
2335
2052
|
})
|
|
2336
2053
|
.then(function (obj) {
|
|
2337
2054
|
if (route.meta.goBackAfterValidation) {
|
|
2338
|
-
onClickBack(
|
|
2055
|
+
onClickBack();
|
|
2339
2056
|
}
|
|
2340
2057
|
localDetail.value = obj;
|
|
2341
|
-
}).finally(function () {
|
|
2342
|
-
submitLoading.value = false;
|
|
2343
2058
|
});
|
|
2344
|
-
}
|
|
2345
|
-
|
|
2346
2059
|
};
|
|
2347
2060
|
vue.onMounted(function () {
|
|
2348
2061
|
collectionCrud
|
|
@@ -2365,7 +2078,7 @@
|
|
|
2365
2078
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
2366
2079
|
vue.createElementVNode("div", _hoisted_2, [
|
|
2367
2080
|
vue.createVNode(vue.unref(quasar.QBtn), {
|
|
2368
|
-
onClick:
|
|
2081
|
+
onClick: onClickBack,
|
|
2369
2082
|
color: "primary",
|
|
2370
2083
|
icon: "arrow_back"
|
|
2371
2084
|
}),
|
|
@@ -2376,14 +2089,13 @@
|
|
|
2376
2089
|
vue.createVNode(vue.unref(quasar.QBtn), {
|
|
2377
2090
|
color: "primary",
|
|
2378
2091
|
icon: vue.unref(getSubmitBtn).icon,
|
|
2379
|
-
onClick: onClickSubmit
|
|
2380
|
-
loading: submitLoading.value
|
|
2092
|
+
onClick: onClickSubmit
|
|
2381
2093
|
}, {
|
|
2382
2094
|
default: vue.withCtx(function () { return [
|
|
2383
2095
|
vue.createTextVNode(vue.toDisplayString(vue.unref(getSubmitBtn).label), 1 /* TEXT */)
|
|
2384
2096
|
]; }),
|
|
2385
2097
|
_: 1 /* STABLE */
|
|
2386
|
-
}, 8 /* PROPS */, ["icon"
|
|
2098
|
+
}, 8 /* PROPS */, ["icon"])
|
|
2387
2099
|
]))
|
|
2388
2100
|
: vue.createCommentVNode("v-if", true)
|
|
2389
2101
|
]))
|
|
@@ -2417,7 +2129,7 @@
|
|
|
2417
2129
|
script.__scopeId = "data-v-29e3989a";
|
|
2418
2130
|
script.__file = "src/components/VlankCreatePage.vue";
|
|
2419
2131
|
|
|
2420
|
-
var version = '3.
|
|
2132
|
+
var version = '3.5.11';
|
|
2421
2133
|
|
|
2422
2134
|
function install (app) {
|
|
2423
2135
|
app.component(script$2.name, script$2);
|