@raclettejs/workbench 0.1.15 → 0.1.17
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/CHANGELOG.md +7 -0
- package/package.json +3 -3
- package/plugins/pacifico__compositions/frontend/widgets/CompositionListWidget.vue +45 -9
- package/plugins/pacifico__interactionLinks/frontend/widgets/InteractionLinkListWidget.vue +45 -9
- package/plugins/pacifico__tags/frontend/widgets/TagListWidget.vue +45 -7
- package/plugins/pacifico__users/frontend/widgets/UserListWidget.vue +45 -14
- package/services/frontend/src/app/components/BaseDataTable.vue +51 -45
- package/yarn.lock +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.17] - 06.11.2025 <a href="https://gitlab.com/raclettejs/workbench/-/compare/v0.1.15...v0.1.17" target="_blank" rel="noopener"><b>Overview of all changes</b></a>
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- added isDeleted switch to lists
|
|
15
|
+
- added hard deletion to all core types
|
|
16
|
+
|
|
10
17
|
## [0.1.15] - 02.11.2025 <a href="https://gitlab.com/raclettejs/workbench/-/compare/v0.1.13...v0.1.15" target="_blank" rel="noopener"><b>Overview of all changes</b></a>
|
|
11
18
|
|
|
12
19
|
### Updated
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raclettejs/workbench",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "racletteJS Workbench - used to configure your application, for dev and prod",
|
|
6
6
|
"repository": "https://gitlab.com/raclettejs/workbench",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
".": "./index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@raclettejs/core": "0.1.
|
|
34
|
+
"@raclettejs/core": "0.1.17",
|
|
35
35
|
"three": "0.180.0",
|
|
36
36
|
"vanta": "0.5.24"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@eslint/js": "9.35.0",
|
|
40
|
-
"@raclettejs/types": "0.1.
|
|
40
|
+
"@raclettejs/types": "0.1.17",
|
|
41
41
|
"@sinclair/typebox": "0.34.41",
|
|
42
42
|
"@types/ramda": "0.31.1",
|
|
43
43
|
"@vueuse/core": "13.9.0",
|
|
@@ -8,7 +8,28 @@
|
|
|
8
8
|
:data-name="$t('workbench.compositionList.dataName')"
|
|
9
9
|
:data-article="$t('workbench.compositionList.dataArticle')"
|
|
10
10
|
@delete="deleteComposition"
|
|
11
|
+
:itemsDeleted="showDeleted"
|
|
11
12
|
>
|
|
13
|
+
<template #actions>
|
|
14
|
+
<v-tooltip
|
|
15
|
+
:text="showDeleted ? $t('core.hideDeleted') : $t('core.showDeleted')"
|
|
16
|
+
>
|
|
17
|
+
<template v-slot:activator="{ props }">
|
|
18
|
+
<v-btn-toggle
|
|
19
|
+
density="compact"
|
|
20
|
+
v-bind="props"
|
|
21
|
+
v-model="showDeleted"
|
|
22
|
+
mandatory
|
|
23
|
+
:color="showDeleted ? 'error' : 'success'"
|
|
24
|
+
>
|
|
25
|
+
<v-btn :value="true">
|
|
26
|
+
<v-icon>mdi-table-eye-off</v-icon>
|
|
27
|
+
</v-btn>
|
|
28
|
+
<v-btn :value="false"><v-icon>mdi-table-eye</v-icon></v-btn>
|
|
29
|
+
</v-btn-toggle>
|
|
30
|
+
</template>
|
|
31
|
+
</v-tooltip>
|
|
32
|
+
</template>
|
|
12
33
|
<!-- Custom status column -->
|
|
13
34
|
<template #item.status="{ item }">
|
|
14
35
|
<v-icon
|
|
@@ -22,11 +43,12 @@
|
|
|
22
43
|
|
|
23
44
|
<script setup lang="ts">
|
|
24
45
|
import { usePluginApi } from "@raclettejs/core/orchestrator/composables"
|
|
25
|
-
import { computed } from "vue"
|
|
46
|
+
import { computed, watch, ref } from "vue"
|
|
26
47
|
import type { Composition } from "@raclettejs/core"
|
|
27
48
|
import { formatDistance } from "date-fns"
|
|
28
49
|
import BaseDataTable from "@app/components/BaseDataTable.vue"
|
|
29
50
|
import { useI18n } from "vue-i18n"
|
|
51
|
+
const showDeleted = ref(false)
|
|
30
52
|
|
|
31
53
|
const { t } = useI18n()
|
|
32
54
|
|
|
@@ -68,9 +90,7 @@ const {
|
|
|
68
90
|
data: compositions,
|
|
69
91
|
execute,
|
|
70
92
|
isLoading: compositionsLoading,
|
|
71
|
-
} = $data.composition.getAll(
|
|
72
|
-
options: { immediate: true },
|
|
73
|
-
})
|
|
93
|
+
} = $data.composition.getAll()
|
|
74
94
|
|
|
75
95
|
const { data: tags, isLoading: tagsLoading } = $data.tag.getAll({
|
|
76
96
|
options: { immediate: true },
|
|
@@ -79,9 +99,11 @@ const { data: users } = $data.user.getAll({
|
|
|
79
99
|
options: { immediate: true },
|
|
80
100
|
})
|
|
81
101
|
const { execute: executeDelete } = await $data.composition.delete({
|
|
82
|
-
options: { cb: () => execute() },
|
|
102
|
+
options: { cb: () => execute({ isDeleted: showDeleted.value }) },
|
|
103
|
+
})
|
|
104
|
+
const { execute: executeHardDelete } = await $data.composition.deleteHard({
|
|
105
|
+
options: { cb: () => execute({ isDeleted: showDeleted.value }) },
|
|
83
106
|
})
|
|
84
|
-
|
|
85
107
|
const parsedCompositions = computed(() => {
|
|
86
108
|
if (compositions.value && tags.value) {
|
|
87
109
|
return Object.values(
|
|
@@ -125,8 +147,22 @@ const getStatusColor = (status: string) => {
|
|
|
125
147
|
}
|
|
126
148
|
}
|
|
127
149
|
|
|
128
|
-
const deleteComposition = async (composition: Composition) =>
|
|
129
|
-
|
|
150
|
+
const deleteComposition = async (composition: Composition) => {
|
|
151
|
+
if (showDeleted.value) {
|
|
152
|
+
await executeHardDelete({ _id: composition._id })
|
|
153
|
+
} else {
|
|
154
|
+
await executeDelete({ _id: composition._id })
|
|
155
|
+
}
|
|
156
|
+
}
|
|
130
157
|
|
|
131
|
-
$socket.on("compositionCreated", () =>
|
|
158
|
+
$socket.on("compositionCreated", () =>
|
|
159
|
+
execute({ isDeleted: showDeleted.value }),
|
|
160
|
+
)
|
|
161
|
+
watch(
|
|
162
|
+
showDeleted,
|
|
163
|
+
() => {
|
|
164
|
+
execute({ isDeleted: showDeleted.value })
|
|
165
|
+
},
|
|
166
|
+
{ immediate: true },
|
|
167
|
+
)
|
|
132
168
|
</script>
|
|
@@ -8,7 +8,28 @@
|
|
|
8
8
|
:data-name="$t('workbench.interactionLinkList.dataName')"
|
|
9
9
|
:data-article="$t('workbench.interactionLinkList.dataArticle')"
|
|
10
10
|
@delete="deleteInteractionLink"
|
|
11
|
+
:itemsDeleted="showDeleted"
|
|
11
12
|
>
|
|
13
|
+
<template #actions>
|
|
14
|
+
<v-tooltip
|
|
15
|
+
:text="showDeleted ? $t('core.hideDeleted') : $t('core.showDeleted')"
|
|
16
|
+
>
|
|
17
|
+
<template v-slot:activator="{ props }">
|
|
18
|
+
<v-btn-toggle
|
|
19
|
+
density="compact"
|
|
20
|
+
v-bind="props"
|
|
21
|
+
v-model="showDeleted"
|
|
22
|
+
mandatory
|
|
23
|
+
:color="showDeleted ? 'error' : 'success'"
|
|
24
|
+
>
|
|
25
|
+
<v-btn :value="true">
|
|
26
|
+
<v-icon>mdi-table-eye-off</v-icon>
|
|
27
|
+
</v-btn>
|
|
28
|
+
<v-btn :value="false"><v-icon>mdi-table-eye</v-icon></v-btn>
|
|
29
|
+
</v-btn-toggle>
|
|
30
|
+
</template>
|
|
31
|
+
</v-tooltip>
|
|
32
|
+
</template>
|
|
12
33
|
<!-- Custom triggers column -->
|
|
13
34
|
<template #item.triggers="{ item }">
|
|
14
35
|
<span class="tw:flex tw:gap-2">
|
|
@@ -24,8 +45,9 @@ import BaseDataTable from "@app/components/BaseDataTable.vue"
|
|
|
24
45
|
import { InteractionLink } from "@raclettejs/core"
|
|
25
46
|
import { usePluginApi } from "@raclettejs/core/orchestrator/composables"
|
|
26
47
|
import { formatDistance } from "date-fns"
|
|
27
|
-
import { computed } from "vue"
|
|
48
|
+
import { computed, ref, watch } from "vue"
|
|
28
49
|
import { useI18n } from "vue-i18n"
|
|
50
|
+
const showDeleted = ref(false)
|
|
29
51
|
|
|
30
52
|
const { t } = useI18n()
|
|
31
53
|
|
|
@@ -72,9 +94,7 @@ const {
|
|
|
72
94
|
data: interactionLinks,
|
|
73
95
|
execute,
|
|
74
96
|
isLoading: interactionLinksLoading,
|
|
75
|
-
} = $data.interactionLink.getAll(
|
|
76
|
-
options: { immediate: true },
|
|
77
|
-
})
|
|
97
|
+
} = $data.interactionLink.getAll()
|
|
78
98
|
|
|
79
99
|
const { data: tags, isLoading: tagsLoading } = $data.tag.getAll({
|
|
80
100
|
options: { immediate: true },
|
|
@@ -89,9 +109,11 @@ const { data: compositions } = $data.composition.getAll({
|
|
|
89
109
|
})
|
|
90
110
|
|
|
91
111
|
const { execute: executeDelete } = $data.interactionLink.delete({
|
|
92
|
-
options: { cb: () => execute() },
|
|
112
|
+
options: { cb: () => execute({ isDeleted: showDeleted.value }) },
|
|
113
|
+
})
|
|
114
|
+
const { execute: executeHardDelete } = await $data.interactionLink.deleteHard({
|
|
115
|
+
options: { cb: () => execute({ isDeleted: showDeleted.value }) },
|
|
93
116
|
})
|
|
94
|
-
|
|
95
117
|
const parsedInteractionLinks = computed(() => {
|
|
96
118
|
if (interactionLinks.value && tags.value) {
|
|
97
119
|
return Object.values(
|
|
@@ -119,8 +141,22 @@ const parsedInteractionLinks = computed(() => {
|
|
|
119
141
|
return []
|
|
120
142
|
})
|
|
121
143
|
|
|
122
|
-
const deleteInteractionLink = async (interactionLink: InteractionLink) =>
|
|
123
|
-
|
|
144
|
+
const deleteInteractionLink = async (interactionLink: InteractionLink) => {
|
|
145
|
+
if (showDeleted.value) {
|
|
146
|
+
await executeHardDelete({ _id: interactionLink._id })
|
|
147
|
+
} else {
|
|
148
|
+
await executeDelete({ _id: interactionLink._id })
|
|
149
|
+
}
|
|
150
|
+
}
|
|
124
151
|
|
|
125
|
-
$socket.on("interactionLinkCreated", () =>
|
|
152
|
+
$socket.on("interactionLinkCreated", () =>
|
|
153
|
+
execute({ isDeleted: showDeleted.value }),
|
|
154
|
+
)
|
|
155
|
+
watch(
|
|
156
|
+
showDeleted,
|
|
157
|
+
() => {
|
|
158
|
+
execute({ isDeleted: showDeleted.value })
|
|
159
|
+
},
|
|
160
|
+
{ immediate: true },
|
|
161
|
+
)
|
|
126
162
|
</script>
|
|
@@ -8,17 +8,39 @@
|
|
|
8
8
|
:data-name="$t('workbench.tagList.dataName')"
|
|
9
9
|
:data-article="$t('workbench.tagList.dataArticle')"
|
|
10
10
|
@delete="deleteTag"
|
|
11
|
-
|
|
11
|
+
:itemsDeleted="showDeleted"
|
|
12
|
+
>
|
|
13
|
+
<template #actions>
|
|
14
|
+
<v-tooltip
|
|
15
|
+
:text="showDeleted ? $t('core.hideDeleted') : $t('core.showDeleted')"
|
|
16
|
+
>
|
|
17
|
+
<template v-slot:activator="{ props }">
|
|
18
|
+
<v-btn-toggle
|
|
19
|
+
density="compact"
|
|
20
|
+
v-bind="props"
|
|
21
|
+
v-model="showDeleted"
|
|
22
|
+
mandatory
|
|
23
|
+
:color="showDeleted ? 'error' : 'success'"
|
|
24
|
+
>
|
|
25
|
+
<v-btn :value="true">
|
|
26
|
+
<v-icon>mdi-table-eye-off</v-icon>
|
|
27
|
+
</v-btn>
|
|
28
|
+
<v-btn :value="false"><v-icon>mdi-table-eye</v-icon></v-btn>
|
|
29
|
+
</v-btn-toggle>
|
|
30
|
+
</template>
|
|
31
|
+
</v-tooltip>
|
|
32
|
+
</template>
|
|
33
|
+
</BaseDataTable>
|
|
12
34
|
</template>
|
|
13
35
|
|
|
14
36
|
<script setup lang="ts">
|
|
15
37
|
import { usePluginApi } from "@raclettejs/core/orchestrator/composables"
|
|
16
|
-
import { computed } from "vue"
|
|
38
|
+
import { computed, ref, watch } from "vue"
|
|
17
39
|
import type { Tag } from "@raclettejs/core"
|
|
18
40
|
import { useI18n } from "vue-i18n"
|
|
19
41
|
import BaseDataTable from "@app/components/BaseDataTable.vue"
|
|
20
42
|
import { formatDistance } from "date-fns"
|
|
21
|
-
|
|
43
|
+
const showDeleted = ref(false)
|
|
22
44
|
const { t } = useI18n()
|
|
23
45
|
|
|
24
46
|
const headers = computed<{ title: string; key: keyof Tag }[]>(() => [
|
|
@@ -51,13 +73,16 @@ const {
|
|
|
51
73
|
execute,
|
|
52
74
|
isLoading: tagsLoading,
|
|
53
75
|
} = $data.tag.getAll({
|
|
76
|
+
params: { isDeleted: false },
|
|
54
77
|
options: { immediate: true },
|
|
55
78
|
})
|
|
56
79
|
|
|
57
80
|
const { execute: executeDelete } = $data.tag.delete({
|
|
58
|
-
options: { cb: () => execute() },
|
|
81
|
+
options: { cb: () => execute({ isDeleted: showDeleted.value }) },
|
|
82
|
+
})
|
|
83
|
+
const { execute: executeHardDelete } = await $data.tag.deleteHard({
|
|
84
|
+
options: { cb: () => execute({ isDeleted: showDeleted.value }) },
|
|
59
85
|
})
|
|
60
|
-
|
|
61
86
|
const parsedTags = computed(() => {
|
|
62
87
|
if (tags.value) {
|
|
63
88
|
return Object.values(tags.value as { [key: string]: Tag }).map((tag) => ({
|
|
@@ -69,7 +94,20 @@ const parsedTags = computed(() => {
|
|
|
69
94
|
return []
|
|
70
95
|
})
|
|
71
96
|
|
|
72
|
-
const deleteTag = async (tag: Tag) =>
|
|
97
|
+
const deleteTag = async (tag: Tag) => {
|
|
98
|
+
if (showDeleted.value) {
|
|
99
|
+
await executeHardDelete({ _id: tag._id })
|
|
100
|
+
} else {
|
|
101
|
+
await executeDelete({ _id: tag._id })
|
|
102
|
+
}
|
|
103
|
+
}
|
|
73
104
|
|
|
74
|
-
$socket.on("tagCreated", () => execute())
|
|
105
|
+
$socket.on("tagCreated", () => execute({ isDeleted: showDeleted.value }))
|
|
106
|
+
watch(
|
|
107
|
+
showDeleted,
|
|
108
|
+
() => {
|
|
109
|
+
execute({ isDeleted: showDeleted.value })
|
|
110
|
+
},
|
|
111
|
+
{ immediate: true },
|
|
112
|
+
)
|
|
75
113
|
</script>
|
|
@@ -9,16 +9,39 @@
|
|
|
9
9
|
:data-article="$t('workbench.userList.dataArticle')"
|
|
10
10
|
:delete-validator="(user) => user._id !== $user?._id"
|
|
11
11
|
@delete="deleteUser"
|
|
12
|
-
|
|
12
|
+
:itemsDeleted="showDeleted"
|
|
13
|
+
>
|
|
14
|
+
<template #actions>
|
|
15
|
+
<v-tooltip
|
|
16
|
+
:text="showDeleted ? $t('core.hideDeleted') : $t('core.showDeleted')"
|
|
17
|
+
>
|
|
18
|
+
<template v-slot:activator="{ props }">
|
|
19
|
+
<v-btn-toggle
|
|
20
|
+
density="compact"
|
|
21
|
+
v-bind="props"
|
|
22
|
+
v-model="showDeleted"
|
|
23
|
+
mandatory
|
|
24
|
+
:color="showDeleted ? 'error' : 'success'"
|
|
25
|
+
>
|
|
26
|
+
<v-btn :value="true">
|
|
27
|
+
<v-icon>mdi-table-eye-off</v-icon>
|
|
28
|
+
</v-btn>
|
|
29
|
+
<v-btn :value="false"><v-icon>mdi-table-eye</v-icon></v-btn>
|
|
30
|
+
</v-btn-toggle>
|
|
31
|
+
</template>
|
|
32
|
+
</v-tooltip>
|
|
33
|
+
</template>
|
|
34
|
+
</BaseDataTable>
|
|
13
35
|
</template>
|
|
14
36
|
|
|
15
37
|
<script setup lang="ts">
|
|
16
38
|
import { usePluginApi } from "@raclettejs/core/orchestrator/composables"
|
|
17
|
-
import { computed } from "vue"
|
|
39
|
+
import { computed, watch, ref } from "vue"
|
|
18
40
|
import type { User } from "@raclettejs/core"
|
|
19
41
|
import { formatDistance } from "date-fns"
|
|
20
42
|
import { useI18n } from "vue-i18n"
|
|
21
43
|
import BaseDataTable from "@app/components/BaseDataTable.vue"
|
|
44
|
+
const showDeleted = ref(false)
|
|
22
45
|
|
|
23
46
|
const props = defineProps<{
|
|
24
47
|
uuid: string
|
|
@@ -51,22 +74,18 @@ const headers = computed<{ title: string; key: keyof User }[]>(() => [
|
|
|
51
74
|
|
|
52
75
|
const { $data, $socket, $user } = usePluginApi("raclette__core")
|
|
53
76
|
|
|
54
|
-
const {
|
|
55
|
-
data: users,
|
|
56
|
-
execute,
|
|
57
|
-
isLoading: usersLoading,
|
|
58
|
-
} = $data.user.getAll({
|
|
59
|
-
options: { immediate: true },
|
|
60
|
-
})
|
|
77
|
+
const { data: users, execute, isLoading: usersLoading } = $data.user.getAll()
|
|
61
78
|
|
|
62
79
|
const { data: tags, isLoading: tagsLoading } = $data.tag.getAll({
|
|
63
80
|
options: { immediate: true },
|
|
64
81
|
})
|
|
65
82
|
|
|
66
83
|
const { execute: executeDelete } = $data.user.delete({
|
|
67
|
-
options: { cb: () => execute() },
|
|
84
|
+
options: { cb: () => execute({ isDeleted: showDeleted.value }) },
|
|
85
|
+
})
|
|
86
|
+
const { execute: executeHardDelete } = await $data.user.deleteHard({
|
|
87
|
+
options: { cb: () => execute({ isDeleted: showDeleted.value }) },
|
|
68
88
|
})
|
|
69
|
-
|
|
70
89
|
const parsedUsers = computed(() => {
|
|
71
90
|
if (users.value && tags.value) {
|
|
72
91
|
return Object.values(users.value as { [key: string]: User }).map(
|
|
@@ -79,8 +98,20 @@ const parsedUsers = computed(() => {
|
|
|
79
98
|
}
|
|
80
99
|
return []
|
|
81
100
|
})
|
|
101
|
+
const deleteUser = async (user: User) => {
|
|
102
|
+
if (showDeleted.value) {
|
|
103
|
+
await executeHardDelete({ _id: user._id })
|
|
104
|
+
} else {
|
|
105
|
+
await executeDelete({ _id: user._id })
|
|
106
|
+
}
|
|
107
|
+
}
|
|
82
108
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
109
|
+
$socket.on("userCreated", () => execute({ isDeleted: showDeleted.value }))
|
|
110
|
+
watch(
|
|
111
|
+
showDeleted,
|
|
112
|
+
() => {
|
|
113
|
+
execute({ isDeleted: showDeleted.value })
|
|
114
|
+
},
|
|
115
|
+
{ immediate: true },
|
|
116
|
+
)
|
|
86
117
|
</script>
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
<!-- Additional action buttons slot -->
|
|
36
36
|
<slot name="actions" />
|
|
37
37
|
</div>
|
|
38
|
-
|
|
39
38
|
<!-- Data Table -->
|
|
40
39
|
<v-data-table
|
|
41
40
|
v-model:search="search"
|
|
@@ -47,6 +46,7 @@
|
|
|
47
46
|
:items="items"
|
|
48
47
|
:loading="loading"
|
|
49
48
|
@click:row="handleRowClick"
|
|
49
|
+
:class="{ itemsDeleted }"
|
|
50
50
|
>
|
|
51
51
|
<template
|
|
52
52
|
#item.color="{ item }"
|
|
@@ -112,50 +112,50 @@
|
|
|
112
112
|
<!-- Additional table slots (this caused the table to be empty) -->
|
|
113
113
|
<!-- <slot name="table-slots" /> -->
|
|
114
114
|
</v-data-table>
|
|
115
|
-
</div>
|
|
116
|
-
|
|
117
|
-
<!-- Delete Confirmation Dialog -->
|
|
118
|
-
<v-dialog
|
|
119
|
-
v-model="deleteDialog"
|
|
120
|
-
max-width="400"
|
|
121
|
-
v-if="showDeleteAction && itemToDelete"
|
|
122
|
-
>
|
|
123
|
-
<v-card>
|
|
124
|
-
<v-card-title class="text-h6">
|
|
125
|
-
{{
|
|
126
|
-
$t("workbench.baseDataTable.deleteDataTitle", {
|
|
127
|
-
dataName,
|
|
128
|
-
})
|
|
129
|
-
}}
|
|
130
|
-
</v-card-title>
|
|
131
115
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
<v-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
116
|
+
<!-- Delete Confirmation Dialog -->
|
|
117
|
+
<v-dialog
|
|
118
|
+
v-model="deleteDialog"
|
|
119
|
+
max-width="400"
|
|
120
|
+
v-if="showDeleteAction && itemToDelete"
|
|
121
|
+
>
|
|
122
|
+
<v-card>
|
|
123
|
+
<v-card-title class="text-h6">
|
|
124
|
+
{{
|
|
125
|
+
$t("workbench.baseDataTable.deleteDataTitle", {
|
|
126
|
+
dataName,
|
|
127
|
+
})
|
|
128
|
+
}}
|
|
129
|
+
</v-card-title>
|
|
130
|
+
|
|
131
|
+
<v-card-text
|
|
132
|
+
v-html="
|
|
133
|
+
$t('workbench.baseDataTable.deleteDataConfirmMessage', {
|
|
134
|
+
article: dataArticle,
|
|
135
|
+
dataName,
|
|
136
|
+
value:
|
|
137
|
+
itemToDelete.email ||
|
|
138
|
+
itemToDelete.title ||
|
|
139
|
+
itemToDelete.name ||
|
|
140
|
+
itemToDelete._id,
|
|
141
|
+
})
|
|
142
|
+
"
|
|
143
|
+
/>
|
|
144
|
+
<v-card-actions>
|
|
145
|
+
<v-spacer />
|
|
146
|
+
<v-btn variant="text" @click="deleteDialog = false">
|
|
147
|
+
{{ $t("workbench.baseDataTable.deleteDataConfirmCancel") }}
|
|
148
|
+
</v-btn>
|
|
149
|
+
<v-btn color="red" variant="flat" @click="confirmDelete">
|
|
150
|
+
{{ $t("workbench.baseDataTable.deleteDataConfirmButton") }}
|
|
151
|
+
</v-btn>
|
|
152
|
+
</v-card-actions>
|
|
153
|
+
</v-card>
|
|
154
|
+
</v-dialog>
|
|
155
|
+
|
|
156
|
+
<!-- Additional dialogs slot -->
|
|
157
|
+
<slot name="dialogs" />
|
|
158
|
+
</div>
|
|
159
159
|
</template>
|
|
160
160
|
|
|
161
161
|
<script setup lang="ts" generic="T extends Record<string, any>">
|
|
@@ -168,7 +168,7 @@ export interface BaseDataTableProps<T> {
|
|
|
168
168
|
// Data props
|
|
169
169
|
items?: T[]
|
|
170
170
|
loading?: boolean
|
|
171
|
-
|
|
171
|
+
itemsDeleted?: boolean
|
|
172
172
|
// Table configuration
|
|
173
173
|
headers: Array<{
|
|
174
174
|
title: string
|
|
@@ -201,6 +201,7 @@ export interface BaseDataTableProps<T> {
|
|
|
201
201
|
const props = withDefaults(defineProps<BaseDataTableProps<T>>(), {
|
|
202
202
|
uuid: undefined,
|
|
203
203
|
items: () => [],
|
|
204
|
+
itemsDeleted: false,
|
|
204
205
|
itemsPerPage: 50,
|
|
205
206
|
showCreateButton: true,
|
|
206
207
|
showActionsColumn: true,
|
|
@@ -292,3 +293,8 @@ const isDeleteDisabled = (item: T): boolean => {
|
|
|
292
293
|
return props.deleteValidator ? !props.deleteValidator(item) : false
|
|
293
294
|
}
|
|
294
295
|
</script>
|
|
296
|
+
<style lang="css">
|
|
297
|
+
.itemsDeleted .v-data-table__tr {
|
|
298
|
+
background-color: rgb(233, 190, 190);
|
|
299
|
+
}
|
|
300
|
+
</style>
|
package/yarn.lock
CHANGED
|
@@ -476,10 +476,10 @@
|
|
|
476
476
|
resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.9.tgz#d229a7b7f9dac167a156992ef23c7f023653f53b"
|
|
477
477
|
integrity sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==
|
|
478
478
|
|
|
479
|
-
"@raclettejs/core
|
|
480
|
-
version "0.1.
|
|
481
|
-
resolved "https://registry.yarnpkg.com/@raclettejs/core/-/core-0.1.
|
|
482
|
-
integrity sha512-
|
|
479
|
+
"@raclettejs/core@0.1.17":
|
|
480
|
+
version "0.1.17"
|
|
481
|
+
resolved "https://registry.yarnpkg.com/@raclettejs/core/-/core-0.1.17.tgz#36712a73791a5115b09c50fcbe8856793dd9ed9c"
|
|
482
|
+
integrity sha512-dMUW+/TikBRbZ4gOEvmSlwKJyRtvvGyJ9VFvhTbvYPMTjmnT/OzOIN9WMj6wG8b2tYFSNWtq+RNSQuc/G/nLxw==
|
|
483
483
|
dependencies:
|
|
484
484
|
chalk "5.6.2"
|
|
485
485
|
chokidar "3.6.0"
|
|
@@ -492,10 +492,10 @@
|
|
|
492
492
|
ramda "0.31.3"
|
|
493
493
|
tsc-alias "1.8.16"
|
|
494
494
|
|
|
495
|
-
"@raclettejs/types
|
|
496
|
-
version "0.1.
|
|
497
|
-
resolved "https://registry.yarnpkg.com/@raclettejs/types/-/types-0.1.
|
|
498
|
-
integrity sha512-
|
|
495
|
+
"@raclettejs/types@0.1.17":
|
|
496
|
+
version "0.1.17"
|
|
497
|
+
resolved "https://registry.yarnpkg.com/@raclettejs/types/-/types-0.1.17.tgz#ced377e5fa8879a5790b1c0c838f621917032690"
|
|
498
|
+
integrity sha512-WBhi6Nf/XJPlisF1stEB0KGo5TWw+EMaTuYt39fJKc+Vtyf/SFmZqP2D3BKlssE5N/8bo2DFgf2qUeKowo0onA==
|
|
499
499
|
dependencies:
|
|
500
500
|
"@types/node" "24.5.2"
|
|
501
501
|
fastify "5.6.0"
|