From 4fa8ecf77287b727e3d5e8f96a30f408057e6572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 5 Feb 2024 17:41:44 +0100 Subject: [PATCH 1/9] Implement config for 'date-time' format --- .../{RelativeDateTime => DateTime}/Readme.md | 2 +- webapp/components/DateTime/index.vue | 29 +++++++++++++++++++ .../{RelativeDateTime => DateTime}/spec.js | 6 ++-- webapp/components/Modal/DeleteUserModal.vue | 6 ++-- webapp/components/RelativeDateTime/index.vue | 23 --------------- webapp/components/UserTeaser/UserTeaser.vue | 6 ++-- .../FiledReportsTable/FiledReportsTable.vue | 6 ++-- webapp/constants/dateTime.js | 5 ++++ 8 files changed, 47 insertions(+), 36 deletions(-) rename webapp/components/{RelativeDateTime => DateTime}/Readme.md (51%) create mode 100644 webapp/components/DateTime/index.vue rename webapp/components/{RelativeDateTime => DateTime}/spec.js (92%) delete mode 100644 webapp/components/RelativeDateTime/index.vue create mode 100644 webapp/constants/dateTime.js diff --git a/webapp/components/RelativeDateTime/Readme.md b/webapp/components/DateTime/Readme.md similarity index 51% rename from webapp/components/RelativeDateTime/Readme.md rename to webapp/components/DateTime/Readme.md index 5e04466f91..fa18a2c9d0 100644 --- a/webapp/components/RelativeDateTime/Readme.md +++ b/webapp/components/DateTime/Readme.md @@ -3,5 +3,5 @@ Relative time from 08.03.2017 ``` - + ``` \ No newline at end of file diff --git a/webapp/components/DateTime/index.vue b/webapp/components/DateTime/index.vue new file mode 100644 index 0000000000..8845f516e2 --- /dev/null +++ b/webapp/components/DateTime/index.vue @@ -0,0 +1,29 @@ + + + diff --git a/webapp/components/RelativeDateTime/spec.js b/webapp/components/DateTime/spec.js similarity index 92% rename from webapp/components/RelativeDateTime/spec.js rename to webapp/components/DateTime/spec.js index b0dd687b25..5c8bf8678c 100644 --- a/webapp/components/RelativeDateTime/spec.js +++ b/webapp/components/DateTime/spec.js @@ -1,9 +1,9 @@ import { shallowMount } from '@vue/test-utils' -import RelativeDateTime from './' +import DateTime from '.' const localVue = global.localVue -describe('RelativeDateTime', () => { +describe('DateTime', () => { let mocks let locale let dateTime @@ -17,7 +17,7 @@ describe('RelativeDateTime', () => { }) const Wrapper = () => { - return shallowMount(RelativeDateTime, { + return shallowMount(DateTime, { mocks, localVue, propsData: { diff --git a/webapp/components/Modal/DeleteUserModal.vue b/webapp/components/Modal/DeleteUserModal.vue index 8618582ee0..cdef4ac5f1 100644 --- a/webapp/components/Modal/DeleteUserModal.vue +++ b/webapp/components/Modal/DeleteUserModal.vue @@ -15,7 +15,7 @@ {{ $t('modals.deleteUser.created') }}
- +
@@ -49,7 +49,7 @@ import gql from 'graphql-tag' import { mapMutations } from 'vuex' import { SweetalertIcon } from 'vue-sweetalert-icons' -import RelativeDateTime from '~/components/RelativeDateTime' +import DateTime from '~/components/DateTime' import UserTeaser from '~/components/UserTeaser/UserTeaser' export default { @@ -57,7 +57,7 @@ export default { components: { UserTeaser, SweetalertIcon, - RelativeDateTime, + DateTime, }, props: { userdata: { type: Object, required: true }, diff --git a/webapp/components/RelativeDateTime/index.vue b/webapp/components/RelativeDateTime/index.vue deleted file mode 100644 index 19018c24bf..0000000000 --- a/webapp/components/RelativeDateTime/index.vue +++ /dev/null @@ -1,23 +0,0 @@ - - - diff --git a/webapp/components/UserTeaser/UserTeaser.vue b/webapp/components/UserTeaser/UserTeaser.vue index a82b910393..99ec1b35c7 100644 --- a/webapp/components/UserTeaser/UserTeaser.vue +++ b/webapp/components/UserTeaser/UserTeaser.vue @@ -36,7 +36,7 @@ - + {{ userName }} @@ -48,13 +48,13 @@