diff --git a/print_designer/public/js/print_designer/components/layout/AppDynamicTextModal.vue b/print_designer/public/js/print_designer/components/layout/AppDynamicTextModal.vue index ba6f9d5..f586f8d 100644 --- a/print_designer/public/js/print_designer/components/layout/AppDynamicTextModal.vue +++ b/print_designer/public/js/print_designer/components/layout/AppDynamicTextModal.vue @@ -223,12 +223,14 @@ onMounted(() => { hiddenFields.value = MainStore.isHiddenFieldsVisible; } fieldnames.value.forEach(async (field) => { - let rowValue = null; - if (props.table) { - rowValue = MainStore.docData[props.table.fieldname][0]; - field.value = await getFormattedValue(field, rowValue); - } else { - field.value = await getFormattedValue(field, null); + if (field.fieldtype != "StaticText" || !field.parseJinja) { + let rowValue = null; + if (props.table) { + rowValue = MainStore.docData[props.table.fieldname][0]; + field.value = await getFormattedValue(field, rowValue); + } else { + field.value = await getFormattedValue(field, null); + } } }); } diff --git a/print_designer/public/js/print_designer/utils.js b/print_designer/public/js/print_designer/utils.js index d65e630..536be9f 100644 --- a/print_designer/public/js/print_designer/utils.js +++ b/print_designer/public/js/print_designer/utils.js @@ -153,7 +153,6 @@ export const setCurrentElement = (event, element) => { }; const childrensCleanUp = (parentElement, element, isClone, isMainElement) => { const MainStore = useMainStore(); - const ElementStore = useElementStore(); !isMainElement && (element = { ...element }); !isClone && element && deleteSnapObjects(element); element.id = frappe.utils.get_random(10); @@ -169,7 +168,8 @@ const childrensCleanUp = (parentElement, element, isClone, isMainElement) => { element.snapEdges = []; if ( element.type == "table" || - (["text", "image", "barcode"].indexOf(element.type) != -1 && element.isDynamic) + element.type == "barcode" || + (["text", "image"].indexOf(element.type) != -1 && element.isDynamic) ) { if (["text", "barcode"].indexOf(element.type) != -1) { element.dynamicContent = [