From 7ff8bc642e8142c98d3ed0a71f58c2b3606374f7 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Tue, 19 Mar 2024 13:39:46 -0300 Subject: [PATCH] WIP --- src/components/WorkerTimeHourChip.vue | 123 +++++ src/composables/useVnConfirm.js | 23 + src/css/app.scss | 4 + src/pages/Worker/Card/WorkerTimeControl.vue | 484 ++++++++++++++++++-- 4 files changed, 588 insertions(+), 46 deletions(-) create mode 100644 src/components/WorkerTimeHourChip.vue create mode 100644 src/composables/useVnConfirm.js diff --git a/src/components/WorkerTimeHourChip.vue b/src/components/WorkerTimeHourChip.vue new file mode 100644 index 000000000..2dedf1be8 --- /dev/null +++ b/src/components/WorkerTimeHourChip.vue @@ -0,0 +1,123 @@ + + + + + + + +es: + Entrada: Entrada + Salida: Salida + Edit: Editar + This time entry will be deleted: Se eliminará la hora fichada + Are you sure you want to delete this entry?: ¿Seguro que quieres eliminarla? + Entry removed: Fichada borrada + diff --git a/src/composables/useVnConfirm.js b/src/composables/useVnConfirm.js new file mode 100644 index 000000000..76c3f4f28 --- /dev/null +++ b/src/composables/useVnConfirm.js @@ -0,0 +1,23 @@ +import VnConfirm from 'components/ui/VnConfirm.vue'; +import { useQuasar } from 'quasar'; + +export function useVnConfirm() { + const quasar = useQuasar(); + + const openConfirmationModal = (title, message, promise, successFn) => { + quasar + .dialog({ + component: VnConfirm, + componentProps: { + title: title, + message: message, + promise: promise, + }, + }) + .onOk(async () => { + if (successFn) successFn(); + }); + }; + + return { openConfirmationModal }; +} diff --git a/src/css/app.scss b/src/css/app.scss index 38dd642a3..388492432 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -97,6 +97,10 @@ select:-webkit-autofill { background-color: var(--vn-light-gray); } +.fill-icon { + font-variation-settings: 'FILL' 1; +} + /* Estilo para el asterisco en campos requeridos */ .q-field.required .q-field__label:after { content: ' *'; diff --git a/src/pages/Worker/Card/WorkerTimeControl.vue b/src/pages/Worker/Card/WorkerTimeControl.vue index 1eb6049bc..212eb0441 100644 --- a/src/pages/Worker/Card/WorkerTimeControl.vue +++ b/src/pages/Worker/Card/WorkerTimeControl.vue @@ -1,121 +1,404 @@