Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

refactor: updated dates format displayed in admin dashboard (#4605)

Joel Jacob Stephen5ad998f54a26
diff --git a/packages/hoppscotch-sh-admin/src/components/users/Details.vue b/packages/hoppscotch-sh-admin/src/components/users/Details.vue
index c85399b17..2015e6d02 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 892dfb6c5..d3a863839 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 a506a0d84..4f0c10536 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 95191b376..79f721f75 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