From 5ad998f54a26cf74c9ef19795f2732db923c9840 Mon Sep 17 00:00:00 2001 From: Joel Jacob Stephen <70131076+JoelJacobStephen@users.noreply.github.com> Date: Mon, 16 Dec 2024 02:43:21 -0600 Subject: [PATCH] refactor: updated dates format displayed in admin dashboard (#4605) --- packages/hoppscotch-sh-admin/src/components/users/Details.vue | 2 +- .../hoppscotch-sh-admin/src/components/users/SharedRequests.vue | 2 +- packages/hoppscotch-sh-admin/src/pages/users/index.vue | 2 +- packages/hoppscotch-sh-admin/src/pages/users/invited.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/hoppscotch-sh-admin/src/components/users/Details.vue b/packages/hoppscotch-sh-admin/src/components/users/Details.vue index c85399b1..2015e6d0 100644 --- a/packages/hoppscotch-sh-admin/src/components/users/Details.vue +++ b/packages/hoppscotch-sh-admin/src/components/users/Details.vue @@ -131,7 +131,7 @@ const emit = defineEmits<{ // Get Proper Date Formats const getCreatedDateAndTime = (date: string) => - format(new Date(date), 'd-MM-yyyy hh:mm a'); + format(new Date(date), 'd-MMMM-yyyy , hh:mm a'); // User Info const { uid, displayName, email, createdOn, lastActiveOn } = props.user; diff --git a/packages/hoppscotch-sh-admin/src/components/users/SharedRequests.vue b/packages/hoppscotch-sh-admin/src/components/users/SharedRequests.vue index 892dfb6c..d3a86383 100644 --- a/packages/hoppscotch-sh-admin/src/components/users/SharedRequests.vue +++ b/packages/hoppscotch-sh-admin/src/components/users/SharedRequests.vue @@ -110,7 +110,7 @@ const props = defineProps<{ }>(); // Get Desired Date Formats -const getCreatedDate = (date: string) => format(new Date(date), 'dd-MM-yyyy'); +const getCreatedDate = (date: string) => format(new Date(date), 'dd-MMMM-yyyy'); const getCreatedTime = (date: string) => format(new Date(date), 'hh:mm a'); //Fetch Shared Requests diff --git a/packages/hoppscotch-sh-admin/src/pages/users/index.vue b/packages/hoppscotch-sh-admin/src/pages/users/index.vue index a506a0d8..4f0c1053 100644 --- a/packages/hoppscotch-sh-admin/src/pages/users/index.vue +++ b/packages/hoppscotch-sh-admin/src/pages/users/index.vue @@ -290,7 +290,7 @@ const t = useI18n(); const toast = useToast(); // Time and Date Helpers -const getCreatedDate = (date: string) => format(new Date(date), 'dd-MM-yyyy'); +const getCreatedDate = (date: string) => format(new Date(date), 'dd-MMMM-yyyy'); const getCreatedTime = (date: string) => format(new Date(date), 'hh:mm a'); const getLastActiveOn = (date: string | null) => date ? useTimeAgo(date).value : t('users.not_available'); diff --git a/packages/hoppscotch-sh-admin/src/pages/users/invited.vue b/packages/hoppscotch-sh-admin/src/pages/users/invited.vue index 95191b37..79f721f7 100644 --- a/packages/hoppscotch-sh-admin/src/pages/users/invited.vue +++ b/packages/hoppscotch-sh-admin/src/pages/users/invited.vue @@ -147,7 +147,7 @@ const breakpoints = useBreakpoints(breakpointsTailwind); const lgAndLarger = breakpoints.greater('lg'); // Get Proper Date Formats -const getCreatedDate = (date: string) => format(new Date(date), 'dd-MM-yyyy'); +const getCreatedDate = (date: string) => format(new Date(date), 'dd-MMMM-yyyy'); const getCreatedTime = (date: string) => format(new Date(date), 'hh:mm a'); // Get Invited Users