mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-29 01:55:01 +00:00
refactor pickTemplate and adapt existing usage
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
|
||||
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};
|
Reference in New Issue
Block a user