From 0d3541fcb7fad7b4755d8cacdacb7355e6f5a691 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Mon, 6 Mar 2023 14:35:13 +0530 Subject: [PATCH] fix: templatebuilder readonly - rename variable in evaluateFieldMeta - add action to templatebuilder --- models/baseModels/PrintTemplate.ts | 6 +++--- src/pages/TemplateBuilder/TemplateBuilder.vue | 19 +++++++++++++++++-- src/utils/doc.ts | 6 +++--- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/models/baseModels/PrintTemplate.ts b/models/baseModels/PrintTemplate.ts index 19deccf6..98f63337 100644 --- a/models/baseModels/PrintTemplate.ts +++ b/models/baseModels/PrintTemplate.ts @@ -25,9 +25,9 @@ export class PrintTemplate extends Doc { } readOnly: ReadOnlyMap = { - name: () => !!this.isCustom, - type: () => !!this.isCustom, - template: () => !!this.isCustom, + name: () => !this.isCustom, + type: () => !this.isCustom, + template: () => !this.isCustom, }; static lists: ListsMap = { diff --git a/src/pages/TemplateBuilder/TemplateBuilder.vue b/src/pages/TemplateBuilder/TemplateBuilder.vue index 5660a625..5e700982 100644 --- a/src/pages/TemplateBuilder/TemplateBuilder.vue +++ b/src/pages/TemplateBuilder/TemplateBuilder.vue @@ -157,6 +157,7 @@ @change=" async (e: Event) => await doc?.set('template', (e.target as HTMLTextAreaElement).value) " + :disabled="!doc?.isCustom" />