Few little fixes and tweaks

This commit is contained in:
Colin Dawson 2026-02-05 09:37:15 +00:00
parent 697725f2dc
commit 2f661239bc
3 changed files with 22 additions and 7 deletions

View File

@ -1,9 +1,22 @@
import { getCurrentUser } from "../../modules/frame/services/authenticationService";
interface DateViewProps {
value: Date;
}
export function DateView(props: DateViewProps): JSX.Element {
const options : Intl.DateTimeFormatOptions = { year: '2-digit', month: 'short', day: 'numeric', hour12:true, hour:"2-digit", minute:"2-digit" };
const options: Intl.DateTimeFormatOptions = {
year: "2-digit",
month: "short",
day: "2-digit",
hour12: false,
hour: "2-digit",
minute: "2-digit",
};
return <>{props.value.toLocaleString(undefined,options)}</>
const currentuser = getCurrentUser();
return (
<>{props.value.toLocaleString(currentuser?.preferredLocale, options)}</>
);
}

View File

@ -28,6 +28,7 @@ export const availableLocales = [
export const baseLocales = [
"en",
"es",
"fr",
"ur"
] as const;
@ -40,6 +41,7 @@ export const fallbackLng = {
"en"
],
"es-ES": [
"es",
"en"
],
"fr-CA": [

View File

@ -16,7 +16,7 @@ const ErrorLogs = (): JSX.Element => {
data: [],
});
const [sortColumn, setSortColumn] = useState<Column<ErrorLog>>({
key: "Id",
key: "id",
label: t("Id"),
order: "desc",
});