mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
21 lines
558 B
TypeScript
21 lines
558 B
TypeScript
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,
|
|
}
|