From a0ef6e7dff3eb8eb5e922d60e24572d3b7423765 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 13 Apr 2021 00:27:41 +0200 Subject: [PATCH] Added basic visibility feature --- public/api/services/jsonBuilder.inc.php | 3 +- public/api/services/jugglDbApi.inc.php | 6 ++- src/components/forms/FormTagDetails.vue | 1 - src/components/juggl/JugglRecordsList.vue | 35 +++++++++++++++++- src/components/juggl/JugglTagField.vue | 19 +++++++++- src/store/modules/juggl.js | 45 +++++++++++++++++++++-- src/views/Home.vue | 8 ++-- 7 files changed, 101 insertions(+), 16 deletions(-) diff --git a/public/api/services/jsonBuilder.inc.php b/public/api/services/jsonBuilder.inc.php index 514c7a1..6cf5b0d 100644 --- a/public/api/services/jsonBuilder.inc.php +++ b/public/api/services/jsonBuilder.inc.php @@ -86,7 +86,8 @@ class JsonBuilder "record_tag_id" => "", "name" => "", "user_id" => "", - "visible" => "" + "visible" => "", + "bundle" => "" ); $this->jsonData['record_tags'] = array(); diff --git a/public/api/services/jugglDbApi.inc.php b/public/api/services/jugglDbApi.inc.php index 18170aa..c5a25fa 100644 --- a/public/api/services/jugglDbApi.inc.php +++ b/public/api/services/jugglDbApi.inc.php @@ -248,7 +248,7 @@ function updateRecordTag($user_id, $tag) // Update given parameters $data = []; - $props = ["name", "visible"]; + $props = ["name", "visible", "bundle"]; foreach ($props as $p) { if (array_key_exists ($p, $tag)) { $data[$p] = $tag[$p]; @@ -373,7 +373,9 @@ function getRecordExternalData($record) $data = [ "record_tag_id" => $tag["record_tag_id"], "name" => $tag["name"], - "user_id" => $tag["user_id"] + "user_id" => $tag["user_id"], + "visible" => $tag["visible"], + "bundle" => $tag["bundle"] ]; $tags[] = $data; } diff --git a/src/components/forms/FormTagDetails.vue b/src/components/forms/FormTagDetails.vue index 27f15fe..8ce6a5d 100644 --- a/src/components/forms/FormTagDetails.vue +++ b/src/components/forms/FormTagDetails.vue @@ -88,7 +88,6 @@ export default { created: function() { this.form.record_tag_id = this.tag.record_tag_id; this.form.name = this.tag.name; - console.log(this.tag); this.form.visible = this.tag.visible; } }; diff --git a/src/components/juggl/JugglRecordsList.vue b/src/components/juggl/JugglRecordsList.vue index ed62d88..45d03ac 100644 --- a/src/components/juggl/JugglRecordsList.vue +++ b/src/components/juggl/JugglRecordsList.vue @@ -1,6 +1,6 @@