From daea8aa656338dea96b91a1859ac6c2357e1d021 Mon Sep 17 00:00:00 2001 From: Caroline Desprat Date: Fri, 25 Oct 2024 15:51:55 +0000 Subject: [PATCH] feat: create task settings to have visible properties selectable --- src/composables/task-settings.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/composables/task-settings.js diff --git a/src/composables/task-settings.js b/src/composables/task-settings.js new file mode 100644 index 0000000000..6fc86101aa --- /dev/null +++ b/src/composables/task-settings.js @@ -0,0 +1,30 @@ +import { computed } from 'vue' +import { useI18n } from 'vue-i18n' + +export function useTaskSettings() { + const { t } = useI18n() + + const propertiesOrder = ['id', 'name', 'createdAt', 'progress', 'result', 'state'] + + const propertiesLabel = computed(() => { + return { + id: 'id', + name: 'name', + createdAt: 'createdAt', + progress: 'progress', + result: 'result', + state: 'state' + } + }) + + const propertiesIcon = { + id: 'image', + name: 'file-text', + createdAt: 'quotes', + progress: 'user-circle', + result: 'tree-structure', + state: 'hash' + } + + return { propertiesOrder, propertiesLabel, propertiesIcon } +}