11<script setup lang="ts">
22import FormSection from ' @/Components/FormSection.vue' ;
33import PrimaryButton from ' @/packages/ui/src/Buttons/PrimaryButton.vue' ;
4- import {computed , ref } from ' vue' ;
4+ import {computed , ref , inject , type ComputedRef } from ' vue' ;
55import InputLabel from ' @/packages/ui/src/Input/InputLabel.vue' ;
66import {
77 api ,
@@ -23,6 +23,7 @@ import {useNotificationsStore} from "@/utils/notification";
2323import {useClipboard } from " @vueuse/core" ;
2424import { formatDateTimeLocalized } from " ../../../packages/ui/src/utils/time" ;
2525import {ClockIcon } from " @heroicons/vue/20/solid" ;
26+ import type { Organization } from ' @/packages/api/src' ;
2627
2728const queryClient = useQueryClient ();
2829
@@ -34,6 +35,8 @@ const newToken = ref('');
3435
3536const { copy, copied, isSupported } = useClipboard ();
3637
38+ const organization = inject <ComputedRef <Organization >>(' organization' );
39+
3740async function createApiToken(){
3841 await handleApiRequestNotifications (
3942 () =>
@@ -213,10 +216,10 @@ const revokeApiTokenMutation = useMutation({
213216 <div >{{ token.name }}</div >
214217 <div class =" text-sm text-text-tertiary space-x-3" >
215218 <span v-if =" token.created_at" >
216- Created at {{ formatDateTimeLocalized(token.created_at) }}
219+ Created at {{ formatDateTimeLocalized(token.created_at, organization?.date_format, organization?.time_format ) }}
217220 </span >
218221 <span v-if =" token.expires_at" >
219- Expires at {{ formatDateTimeLocalized(token.expires_at) }}
222+ Expires at {{ formatDateTimeLocalized(token.expires_at, organization?.date_format, organization?.time_format ) }}
220223 </span >
221224 <span v-if =" token.revoked" >
222225 Revoked
0 commit comments