mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
14 lines
495 B
JavaScript
14 lines
495 B
JavaScript
|
|
const buildLink = function(templateId, entityId, entityClass) {
|
|
const
|
|
entityIdEncoded = encodeURI(entityId),
|
|
returnPath = encodeURIComponent(window.location.pathname + window.location.search + window.location.hash),
|
|
entityClassEncoded = encodeURI(entityClass),
|
|
url = `/fr/doc/gen/generate/from/${templateId}/for/${entityClassEncoded}/${entityIdEncoded}?returnPath=${returnPath}`
|
|
;
|
|
console.log('computed Url');
|
|
return url;
|
|
};
|
|
|
|
export {buildLink};
|