From 5f75e3a9ab2f5dbb1952f3d35a7521e74ba8a367 Mon Sep 17 00:00:00 2001 From: Andrew Brazzatti Date: Mon, 16 Dec 2024 07:58:52 +0000 Subject: [PATCH] Moved util functions to the template execution context as functions cannot be passed as imports --- typescript/api/services/TriggerService.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/typescript/api/services/TriggerService.ts b/typescript/api/services/TriggerService.ts index 0eb6a2382..ad6d2db9a 100644 --- a/typescript/api/services/TriggerService.ts +++ b/typescript/api/services/TriggerService.ts @@ -324,8 +324,6 @@ export module Services { moment: moment, numeral: numeral, _ : _, - addError: addError, - getErrorMessage: getErrorMessage, TranslationService: TranslationService } @@ -337,7 +335,8 @@ export module Services { template = compiledTemplate; } - const errorFieldList = template({oid:oid, record: record, options: options}); + const errorFieldList = template({oid:oid, record: record, options: options, addError: addError, + getErrorMessage: getErrorMessage}); const errorMap = {