Web: Client: fix getting dates in portal language format instead of user language in info panel

This commit is contained in:
Aleksandr Lushkin 2023-09-04 13:50:30 +02:00
parent 21f8f74f47
commit 69165ea30f

View File

@ -15,6 +15,7 @@ import {
getFileTypeName,
} from "@docspace/client/src/helpers/filesUtils";
import CommentEditor from "../sub-components/CommentEditor";
import { getCookie } from "@docspace/common/utils";
// Property Content Components
@ -58,7 +59,7 @@ export const decodeString = (str) => {
};
export const parseAndFormatDate = (date, personal, culture) => {
const locale = personal ? localStorage.getItem(LANGUAGE) : culture;
const locale = getCookie(LANGUAGE) || culture;
const correctDate = getCorrectDate(locale, date);
return correctDate;
};
@ -119,7 +120,8 @@ class DetailsHelper {
};
getNeededProperties = () => {
return (this.item.isRoom
return (
this.item.isRoom
? [
"Owner",
this.item.providerKey && "Storage Type",