Fixed Bug 68940 - Rooms.FormRoom. When you click the Back button inside a Form room on the Start filling panel, a list of all rooms is displayed, including rooms from the Archive.
This commit is contained in:
parent
254e4d24e3
commit
72d9b4a0df
@ -135,6 +135,7 @@ export type UseFilesHelpersProps = {
|
||||
setIsFirstLoad: (value: boolean) => void;
|
||||
withCreate: boolean;
|
||||
setSelectedItemId: (value: number | string) => void;
|
||||
setSelectedItemType: (value?: "rooms" | "files") => void;
|
||||
};
|
||||
|
||||
export type TUseInputItemHelper = {
|
||||
|
@ -82,6 +82,7 @@ const useFilesHelper = ({
|
||||
setIsFirstLoad,
|
||||
withCreate,
|
||||
setSelectedItemId,
|
||||
setSelectedItemType,
|
||||
}: UseFilesHelpersProps) => {
|
||||
const { t } = useTranslation(["Common"]);
|
||||
|
||||
@ -341,14 +342,20 @@ const useFilesHelper = ({
|
||||
hotkey: "f",
|
||||
onCreateClick: () => addInputItem(t("NewFolder"), FolderSvgUrl),
|
||||
onBackClick: () => {
|
||||
setSelectedItemId(current.parentId);
|
||||
let isRooms;
|
||||
setBreadCrumbs((val) => {
|
||||
const newVal = [...val];
|
||||
|
||||
newVal.pop();
|
||||
const item = newVal.pop();
|
||||
|
||||
isRooms = !!item?.roomType;
|
||||
|
||||
return newVal;
|
||||
});
|
||||
|
||||
if (isRooms) setSelectedItemType("rooms");
|
||||
|
||||
setSelectedItemId(current.parentId);
|
||||
},
|
||||
});
|
||||
} else {
|
||||
@ -430,6 +437,7 @@ const useFilesHelper = ({
|
||||
t,
|
||||
setSelectedItemId,
|
||||
rootThirdPartyId,
|
||||
setSelectedItemType,
|
||||
],
|
||||
);
|
||||
|
||||
|
@ -240,6 +240,7 @@ const FilesSelector = ({
|
||||
setIsInit,
|
||||
withCreate,
|
||||
setSelectedItemId,
|
||||
setSelectedItemType,
|
||||
});
|
||||
|
||||
const onClickBreadCrumb = React.useCallback(
|
||||
|
Loading…
Reference in New Issue
Block a user