From a83fe561b9007740c7106e83ee63f0bf26cd97a8 Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 22 Jul 2026 09:18:23 +0200 Subject: [PATCH 1/2] Added the new property "readonly" to the UDF component to switch between edit and readonly mode for all the UDfs --- public/js/components/Udf/Udf.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/public/js/components/Udf/Udf.js b/public/js/components/Udf/Udf.js index c765d8a14..007eea236 100644 --- a/public/js/components/Udf/Udf.js +++ b/public/js/components/Udf/Udf.js @@ -26,7 +26,8 @@ export default { // The values as associative array modelValue: Object, // Show only fields with a name that exists in the filter - filter: [String, Array] + filter: [String, Array], + readonly: true }, data() { return { @@ -35,6 +36,13 @@ export default { }; }, computed: { + isPkValid() { + // If the provided pk is _not_ valid + return !Object.keys(this.pk).every(key => !this.pk[key]); + }, + getReadonly() { + return this.readonly; + }, filterArray() { if (!this.filter || Array.isArray(this.filter)) return this.filter; @@ -61,6 +69,10 @@ export default { }, watch: { pk(n, o) { + + // If the provided pk is _not_ valid + if (Object.keys(n).every(key => !n[key])) return; + if (!this.$refs.fetch) return; // NOTE(chris): no initial load yet @@ -124,6 +136,7 @@ export default { template: `
` -} \ No newline at end of file +} From 507b47e9ea14060a818d3fc3f5bd0084e9a78375 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 23 Jul 2026 07:59:02 +0200 Subject: [PATCH 2/2] add name to Udf component --- public/js/components/Udf/Udf.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/js/components/Udf/Udf.js b/public/js/components/Udf/Udf.js index 007eea236..cfb5384c8 100644 --- a/public/js/components/Udf/Udf.js +++ b/public/js/components/Udf/Udf.js @@ -4,6 +4,7 @@ import FormInput from '../Form/Input.js'; import ApiUdf from '../../api/udf.js'; export default { + name: 'CoreUdfCmpt', components: { CoreFetchCmpt, FormInput