Client: Fixed Bug 69303

Error occurred in the Documents Service (errorCode = -7)
This commit is contained in:
Akmal Isomadinov 2024-07-19 13:39:27 +05:00
parent b59e0a9969
commit f9af77e232
6 changed files with 20 additions and 2 deletions

View File

@ -68,6 +68,7 @@ const CreateEvent = ({
setPortalTariff,
withoutDialog,
preview,
toForm,
publicRoomKey,
actionEdit,
openOnNewPage,
@ -176,6 +177,8 @@ const CreateEvent = ({
searchParams.append("action", "edit");
}
if (toForm) searchParams.append("toForm", "true");
if (publicRoomKey) {
searchParams.append("share", publicRoomKey);
}

View File

@ -50,6 +50,7 @@ const GlobalEvents = ({ enablePlugins, eventListenerItemsList }) => {
templateId: null,
fromTemplate: null,
onClose: null,
toForm: false,
});
const [renameDialogProps, setRenameDialogProps] = useState({
@ -116,6 +117,7 @@ const GlobalEvents = ({ enablePlugins, eventListenerItemsList }) => {
preview: payload.preview ?? false,
actionEdit: payload.edit ?? false,
openEditor: payload.openEditor ?? true,
toForm: payload.toForm ?? false,
onClose: () => {
setCreateDialogProps({
visible: false,
@ -130,6 +132,7 @@ const GlobalEvents = ({ enablePlugins, eventListenerItemsList }) => {
preview: false,
actionEdit: false,
openEditor: true,
toForm: false,
});
},
});

View File

@ -417,6 +417,7 @@ class DialogsStore {
withoutDialog,
preview,
edit: true,
toForm: true,
};
event.payload = payload;

View File

@ -45,6 +45,7 @@ type TSearchParams = {
fromFile?: string;
fromTemplate?: string;
action?: string;
toForm?: string;
};
async function Page({ searchParams }: { searchParams: TSearchParams }) {
@ -65,6 +66,7 @@ async function Page({ searchParams }: { searchParams: TSearchParams }) {
fromTemplate,
formId,
action,
toForm,
} = searchParams;
if (!parentId || !fileTitle) redirect(baseURL);
@ -87,7 +89,14 @@ async function Page({ searchParams }: { searchParams: TSearchParams }) {
const { file, error } =
fromFile && templateId
? await fileCopyAs(templateId, fileTitle, parentId, false, password)
? await fileCopyAs(
templateId,
fileTitle,
parentId,
false,
password,
toForm,
)
: await createFile(parentId, fileTitle, templateId, formId);
if (!file) {

View File

@ -228,7 +228,7 @@ export type EditorProps = {
errorMessage?: string;
isSkipError?: boolean;
onDownloadAs: (obj: object) => void;
onDownloadAs?: (obj: object) => void;
onSDKRequestSharingSettings?: () => void;
onSDKRequestSaveAs?: (event: object) => void;
onSDKRequestInsertImage?: (event: object) => void;

View File

@ -54,6 +54,7 @@ export async function fileCopyAs(
destFolderId: string,
enableExternalExt?: boolean,
password?: string,
toForm?: string,
): Promise<{
file: TFile | undefined;
error:
@ -77,6 +78,7 @@ export async function fileCopyAs(
destFolderId: tryParseToNumber(destFolderId),
enableExternalExt,
password,
toForm: toForm === "true",
}),
);