Web: Client: fix getting dates in portal language format instead of user language in info panel
This commit is contained in:
parent
21f8f74f47
commit
69165ea30f
@ -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,39 +120,40 @@ class DetailsHelper {
|
||||
};
|
||||
|
||||
getNeededProperties = () => {
|
||||
return (this.item.isRoom
|
||||
? [
|
||||
"Owner",
|
||||
this.item.providerKey && "Storage Type",
|
||||
"Type",
|
||||
"Content",
|
||||
"Date modified",
|
||||
"Last modified by",
|
||||
"Creation date",
|
||||
this.item.tags.length && "Tags",
|
||||
]
|
||||
: this.item.isFolder
|
||||
? [
|
||||
"Owner",
|
||||
//"Location",
|
||||
"Type",
|
||||
"Content",
|
||||
"Date modified",
|
||||
"Last modified by",
|
||||
"Creation date",
|
||||
]
|
||||
: [
|
||||
"Owner",
|
||||
//"Location",
|
||||
"Type",
|
||||
"File extension",
|
||||
"Size",
|
||||
"Date modified",
|
||||
"Last modified by",
|
||||
"Creation date",
|
||||
"Versions",
|
||||
"Comments",
|
||||
]
|
||||
return (
|
||||
this.item.isRoom
|
||||
? [
|
||||
"Owner",
|
||||
this.item.providerKey && "Storage Type",
|
||||
"Type",
|
||||
"Content",
|
||||
"Date modified",
|
||||
"Last modified by",
|
||||
"Creation date",
|
||||
this.item.tags.length && "Tags",
|
||||
]
|
||||
: this.item.isFolder
|
||||
? [
|
||||
"Owner",
|
||||
//"Location",
|
||||
"Type",
|
||||
"Content",
|
||||
"Date modified",
|
||||
"Last modified by",
|
||||
"Creation date",
|
||||
]
|
||||
: [
|
||||
"Owner",
|
||||
//"Location",
|
||||
"Type",
|
||||
"File extension",
|
||||
"Size",
|
||||
"Date modified",
|
||||
"Last modified by",
|
||||
"Creation date",
|
||||
"Versions",
|
||||
"Comments",
|
||||
]
|
||||
).filter((nP) => !!nP);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user