Client: Fixed filter types: removed OFormTemplateOnly and OFormOnly, added Pdf

This commit is contained in:
Ilya Oleshko 2024-07-11 17:47:33 +03:00
parent f88093df6f
commit 084f619011
5 changed files with 18 additions and 40 deletions

View File

@ -1112,12 +1112,9 @@ const SectionFilterContent = ({
label = t("Media");
break;
case FilterType.FilesOnly.toString():
label = t("AllFiles");
label = t("Translations:Files");
break;
case FilterType.OFormTemplateOnly.toString():
label = t("FormsTemplates");
break;
case FilterType.OFormOnly.toString():
case FilterType.Pdf.toString():
label = t("Forms");
break;
}
@ -1640,18 +1637,18 @@ const SectionFilterContent = ({
isLast: !isTrash,
},
...folders,
{
id: "filter_type-all-files",
key: FilterType.FilesOnly.toString(),
group: FilterGroups.filterType,
label: t("Translations:Files").toLowerCase(),
},
{
id: "filter_type-documents",
key: FilterType.DocumentsOnly.toString(),
group: FilterGroups.filterType,
label: t("Common:Documents").toLowerCase(),
},
{
id: "filter_type-presentations",
key: FilterType.PresentationsOnly.toString(),
group: FilterGroups.filterType,
label: t("Translations:Presentations").toLowerCase(),
},
{
id: "filter_type-spreadsheets",
key: FilterType.SpreadsheetsOnly.toString(),
@ -1659,27 +1656,20 @@ const SectionFilterContent = ({
label: t("Translations:Spreadsheets").toLowerCase(),
},
{
id: "filter_type-form-templates",
key: FilterType.OFormTemplateOnly.toString(),
id: "filter_type-presentations",
key: FilterType.PresentationsOnly.toString(),
group: FilterGroups.filterType,
label: t("FormsTemplates").toLowerCase(),
label: t("Translations:Presentations").toLowerCase(),
},
{
id: "filter_type-forms",
key: FilterType.OFormOnly.toString(),
key: FilterType.Pdf.toString(),
group: FilterGroups.filterType,
label: t("Forms").toLowerCase(),
},
...archives,
...images,
...media,
{
id: "filter_type-all-files",
key: FilterType.FilesOnly.toString(),
group: FilterGroups.filterType,
label: t("AllFiles").toLowerCase(),
},
];
const subjectOptions = [

View File

@ -112,11 +112,7 @@ const FileSelector = (props) => {
label: t(`Translations:Spreadsheets`),
},
{
key: FilterType.OFormTemplateOnly,
label: t(`Files:FormsTemplates`),
},
{
key: FilterType.OFormOnly,
key: FilterType.Pdf,
label: t(`Files:Forms`),
},
{
@ -133,7 +129,7 @@ const FileSelector = (props) => {
},
{
key: FilterType.FilesOnly,
label: t(`Files:AllFiles`),
label: t(`Translations:Files`),
},
];

View File

@ -138,7 +138,7 @@ export const FilterBlock = ({ t, config, setConfig }) => {
const filterOptions = [
{
key: "filter-type-all",
label: t("Files:AllFiles"),
label: t("Translations:Files"),
typeKey: FilterType.FilesOnly,
},
{
@ -176,15 +176,10 @@ export const FilterBlock = ({ t, config, setConfig }) => {
label: t("Files:Media"),
typeKey: FilterType.MediaOnly,
},
{
key: "filter-type-forms-templates",
label: t("Files:FormsTemplates"),
typeKey: FilterType.OFormTemplateOnly,
},
{
key: "filter-type-forms",
label: t("Files:Forms"),
typeKey: FilterType.OFormOnly,
typeKey: FilterType.Pdf,
},
];

View File

@ -82,10 +82,7 @@ const Sdk = ({
[FilterType.FoldersOnly]: t("Common:SelectTypeFiles", {
type: t("Translations:Folders").toLowerCase(),
}),
[FilterType.OFormTemplateOnly]: t("Common:SelectTypeFiles", {
type: t("Files:FormsTemplates").toLowerCase(),
}),
[FilterType.OFormOnly]: t("Common:SelectTypeFiles", {
[FilterType.Pdf]: t("Common:SelectTypeFiles", {
type: t("Files:Forms").toLowerCase(),
}),
EditorSupportedTypes: t("Common:SelectTypeFiles", {

View File

@ -3541,7 +3541,7 @@ class FilesStore {
case FilterType.ArchiveOnly:
return t("Archives");
case FilterType.FilesOnly:
return t("AllFiles");
return t("Translations:Files");
case `room-${RoomsType.FillingFormsRoom}`:
return t("Common:FillingFormRooms");
case `room-${RoomsType.CustomRoom}`: