@drax/crud-vue 0.28.0 → 0.29.0
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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.29.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./src/index.ts",
|
|
9
9
|
"module": "./src/index.ts",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"format": "prettier --write src/"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@drax/common-front": "^0.
|
|
28
|
-
"@drax/crud-front": "^0.
|
|
29
|
-
"@drax/crud-share": "^0.
|
|
30
|
-
"@drax/media-vue": "^0.
|
|
27
|
+
"@drax/common-front": "^0.29.0",
|
|
28
|
+
"@drax/crud-front": "^0.29.0",
|
|
29
|
+
"@drax/crud-share": "^0.29.0",
|
|
30
|
+
"@drax/media-vue": "^0.29.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"pinia": "^2.2.2",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"vue-tsc": "^2.1.10",
|
|
65
65
|
"vuetify": "^3.8.2"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "0a3f69beb23eb8768ebe7a3d41d61d4a6d40b104"
|
|
68
68
|
}
|
package/src/EntityCrud.ts
CHANGED
|
@@ -9,7 +9,7 @@ const {entity} = defineProps({
|
|
|
9
9
|
})
|
|
10
10
|
|
|
11
11
|
const {
|
|
12
|
-
exportFiles, exportListVisible, exportLoading
|
|
12
|
+
exportFiles, exportListVisible, exportLoading, exportError
|
|
13
13
|
} = useCrud(entity);
|
|
14
14
|
|
|
15
15
|
</script>
|
|
@@ -25,7 +25,10 @@ const {
|
|
|
25
25
|
|
|
26
26
|
</v-card-title>
|
|
27
27
|
<v-card-text>
|
|
28
|
-
<v-
|
|
28
|
+
<v-alert v-if="exportError" type="error">
|
|
29
|
+
{{ t('export.error.message') }}
|
|
30
|
+
</v-alert>
|
|
31
|
+
<v-table density="compact" v-else>
|
|
29
32
|
<thead>
|
|
30
33
|
<tr>
|
|
31
34
|
<th>Link</th><th>Rows</th><th>Time</th>
|
|
@@ -308,7 +308,7 @@ defineEmits(['updateValue'])
|
|
|
308
308
|
:append-icon="appendIcon"
|
|
309
309
|
:prepend-inner-icon="prependInnerIcon"
|
|
310
310
|
:append-inner-icon="appendInnerIcon"
|
|
311
|
-
|
|
311
|
+
:max="field.max"
|
|
312
312
|
>
|
|
313
313
|
<template v-if="field.endOfDay && field.showEndOfDayChip !== false" v-slot:append-inner>
|
|
314
314
|
<v-chip size="small">23:59</v-chip>
|
|
@@ -7,6 +7,13 @@ export function useCrud(entity: IEntityCrud) {
|
|
|
7
7
|
|
|
8
8
|
const store = useCrudStore()
|
|
9
9
|
|
|
10
|
+
const exportError = computed({
|
|
11
|
+
get() {
|
|
12
|
+
return store.exportError
|
|
13
|
+
}, set(value) {
|
|
14
|
+
store.setExportError(value)
|
|
15
|
+
}
|
|
16
|
+
})
|
|
10
17
|
|
|
11
18
|
const dialog = computed({
|
|
12
19
|
get() {
|
|
@@ -167,11 +174,13 @@ export function useCrud(entity: IEntityCrud) {
|
|
|
167
174
|
}
|
|
168
175
|
|
|
169
176
|
const headers: string = entity.exportHeaders.join(',')
|
|
177
|
+
const fileName: string = entity.exportFileName
|
|
170
178
|
|
|
171
179
|
const r: any = await entity?.provider.export({
|
|
172
180
|
format: format,
|
|
173
181
|
headers: headers,
|
|
174
182
|
separator: ";",
|
|
183
|
+
fileName: fileName,
|
|
175
184
|
orderBy: store.sortBy[0]?.key,
|
|
176
185
|
order: store.sortBy[0]?.order,
|
|
177
186
|
search: store.search,
|
|
@@ -186,6 +195,7 @@ export function useCrud(entity: IEntityCrud) {
|
|
|
186
195
|
return r
|
|
187
196
|
|
|
188
197
|
} catch (e) {
|
|
198
|
+
store.setExportError(true)
|
|
189
199
|
console.error("Error exporting csv", e)
|
|
190
200
|
} finally {
|
|
191
201
|
store.setExportLoading(false)
|
|
@@ -371,7 +381,7 @@ export function useCrud(entity: IEntityCrud) {
|
|
|
371
381
|
operation, dialog, form, notify, error, message, formValid,
|
|
372
382
|
loading, itemsPerPage, page, sortBy, search, totalItems, items,
|
|
373
383
|
prepareFilters, filters, clearFilters, applyFilters,
|
|
374
|
-
exportFiles, exportLoading, exportListVisible
|
|
384
|
+
exportFiles, exportLoading, exportListVisible, exportError
|
|
375
385
|
}
|
|
376
386
|
|
|
377
387
|
}
|
|
@@ -23,6 +23,7 @@ export const useCrudStore = defineStore('CrudStore', {
|
|
|
23
23
|
exportLoading: false,
|
|
24
24
|
exportFiles: [] as string[],
|
|
25
25
|
exportListVisible: false,
|
|
26
|
+
exportError: false
|
|
26
27
|
}
|
|
27
28
|
),
|
|
28
29
|
getters: {
|
|
@@ -116,6 +117,9 @@ export const useCrudStore = defineStore('CrudStore', {
|
|
|
116
117
|
setExportListVisible(exportListVisible: boolean) {
|
|
117
118
|
this.exportListVisible = exportListVisible
|
|
118
119
|
},
|
|
120
|
+
setExportError(error: boolean){
|
|
121
|
+
this.exportError = error
|
|
122
|
+
},
|
|
119
123
|
setFilters(filters: any[]) {
|
|
120
124
|
this.filters = filters
|
|
121
125
|
}
|