Doceditor: Added filling session id
This commit is contained in:
parent
5a3c98fa57
commit
271f4a7f87
@ -25,7 +25,15 @@
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
import { CompletedForm } from "@/components/completed-form";
|
||||
|
||||
async function Page() {
|
||||
interface PageProps {
|
||||
searchParams: Record<string, string | undefined>;
|
||||
}
|
||||
|
||||
async function Page({ searchParams }: PageProps) {
|
||||
const { share, fileId, fillingSessionId } = searchParams;
|
||||
|
||||
console.log({ share, fileId, fillingSessionId });
|
||||
|
||||
return <CompletedForm />;
|
||||
}
|
||||
|
||||
|
@ -58,6 +58,11 @@ type IConfigType = IConfig & {
|
||||
onRequestStartFilling?: (event: object) => void;
|
||||
onSubmit?: (event: object) => void;
|
||||
};
|
||||
editorConfig?: {
|
||||
customization?: {
|
||||
close?: Record<string, unknown>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
const Editor = ({
|
||||
@ -307,8 +312,18 @@ const Editor = ({
|
||||
newConfig.events.onSubmit = () => {
|
||||
const origin = window.location.origin;
|
||||
|
||||
const otherSearchParams = new URLSearchParams();
|
||||
|
||||
if (config?.fillingSessionId)
|
||||
otherSearchParams.append("fillingSessionId", config.fillingSessionId);
|
||||
|
||||
const combinedSearchParams = new URLSearchParams({
|
||||
...Object.fromEntries(searchParams),
|
||||
...Object.fromEntries(otherSearchParams),
|
||||
});
|
||||
|
||||
window.location.replace(
|
||||
`${origin}/doceditor/completed-form?${searchParams.toString()}`,
|
||||
`${origin}/doceditor/completed-form?${combinedSearchParams.toString()}`,
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -182,6 +182,8 @@ export interface IInitialConfig {
|
||||
errorMessage?: string;
|
||||
message?: undefined;
|
||||
startFilling?: boolean;
|
||||
|
||||
fillingSessionId?: string;
|
||||
}
|
||||
|
||||
export type TError = {
|
||||
|
Loading…
Reference in New Issue
Block a user