Few little fixes and tweaks
This commit is contained in:
parent
697725f2dc
commit
2f661239bc
@ -1,9 +1,22 @@
|
|||||||
interface DateViewProps{
|
import { getCurrentUser } from "../../modules/frame/services/authenticationService";
|
||||||
value : Date;
|
|
||||||
|
interface DateViewProps {
|
||||||
|
value: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function DateView( props: DateViewProps) : JSX.Element {
|
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)}</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|||||||
@ -28,6 +28,7 @@ export const availableLocales = [
|
|||||||
|
|
||||||
export const baseLocales = [
|
export const baseLocales = [
|
||||||
"en",
|
"en",
|
||||||
|
"es",
|
||||||
"fr",
|
"fr",
|
||||||
"ur"
|
"ur"
|
||||||
] as const;
|
] as const;
|
||||||
@ -40,6 +41,7 @@ export const fallbackLng = {
|
|||||||
"en"
|
"en"
|
||||||
],
|
],
|
||||||
"es-ES": [
|
"es-ES": [
|
||||||
|
"es",
|
||||||
"en"
|
"en"
|
||||||
],
|
],
|
||||||
"fr-CA": [
|
"fr-CA": [
|
||||||
|
|||||||
@ -16,7 +16,7 @@ const ErrorLogs = (): JSX.Element => {
|
|||||||
data: [],
|
data: [],
|
||||||
});
|
});
|
||||||
const [sortColumn, setSortColumn] = useState<Column<ErrorLog>>({
|
const [sortColumn, setSortColumn] = useState<Column<ErrorLog>>({
|
||||||
key: "Id",
|
key: "id",
|
||||||
label: t("Id"),
|
label: t("Id"),
|
||||||
order: "desc",
|
order: "desc",
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user