mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 16:13:50 +00:00
Fix: Fix entityId and return path when add a notification on a document's evaluation
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
const buildLinkCreate = function (relatedEntityClass: string, relatedEntityId: number, to: number | null, returnPath: string | null): string
|
||||
{
|
||||
const params = new URLSearchParams();
|
||||
params.append('entityClass', relatedEntityClass);
|
||||
params.append('entityId', relatedEntityId.toString());
|
||||
|
||||
if (null !== to) {
|
||||
params.append('tos[0]', to.toString());
|
||||
}
|
||||
|
||||
if (null !== returnPath) {
|
||||
params.append('returnPath', returnPath);
|
||||
}
|
||||
|
||||
return `/fr/notification/create?${params.toString()}`;
|
||||
}
|
||||
|
||||
export {
|
||||
buildLinkCreate,
|
||||
}
|
Reference in New Issue
Block a user