diff --git a/public/api/services/jsonBuilder.inc.php b/public/api/services/jsonBuilder.inc.php index 044c122..514c7a1 100644 --- a/public/api/services/jsonBuilder.inc.php +++ b/public/api/services/jsonBuilder.inc.php @@ -49,7 +49,9 @@ class JsonBuilder "user_id" => "", "start_date" => "", "duration" => "", - "record_count" => "" + "record_count" => "", + "color" => "", + "visible" => "" ); $this->jsonData['projects'] = array(); @@ -83,7 +85,8 @@ class JsonBuilder $columns = array( "record_tag_id" => "", "name" => "", - "user_id" => "" + "user_id" => "", + "visible" => "" ); $this->jsonData['record_tags'] = array(); diff --git a/public/api/services/jugglDbApi.inc.php b/public/api/services/jugglDbApi.inc.php index df8ffea..18170aa 100644 --- a/public/api/services/jugglDbApi.inc.php +++ b/public/api/services/jugglDbApi.inc.php @@ -228,7 +228,7 @@ function updateProject($user_id, $project) // Update given parameters $data = []; - $props = ["name", "start_date"]; + $props = ["name", "start_date", "color", "visible"]; foreach ($props as $p) { if (array_key_exists ($p, $project)) { $data[$p] = $project[$p]; @@ -248,7 +248,7 @@ function updateRecordTag($user_id, $tag) // Update given parameters $data = []; - $props = ["name"]; + $props = ["name", "visible"]; foreach ($props as $p) { if (array_key_exists ($p, $tag)) { $data[$p] = $tag[$p]; diff --git a/src/components/base/BaseColorText.vue b/src/components/base/BaseColorText.vue new file mode 100644 index 0000000..381a142 --- /dev/null +++ b/src/components/base/BaseColorText.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/src/components/forms/FormProjectDetails.vue b/src/components/forms/FormProjectDetails.vue index 09c047c..608212c 100644 --- a/src/components/forms/FormProjectDetails.vue +++ b/src/components/forms/FormProjectDetails.vue @@ -17,6 +17,9 @@ > + + + Something went wrong. @@ -59,7 +62,8 @@ export default { form: { project_id: undefined, start_date: undefined, - name: undefined + name: undefined, + color: undefined } }; }, @@ -72,6 +76,10 @@ export default { this.failed = false; this.working = true; + if (this.form.color == "") { + this.form.color = null; + } + store .dispatch("updateProject", this.form) .then(() => { @@ -96,6 +104,7 @@ export default { this.form.project_id = this.project.project_id; this.form.name = this.project.name; this.form.start_date = this.project.start_date; + this.form.color = this.project.color; } }; diff --git a/src/components/juggl/JugglProjectName.vue b/src/components/juggl/JugglProjectName.vue new file mode 100644 index 0000000..3e62f18 --- /dev/null +++ b/src/components/juggl/JugglProjectName.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/src/components/juggl/JugglProjectsPanel.vue b/src/components/juggl/JugglProjectsPanel.vue index 003df99..b88dccc 100644 --- a/src/components/juggl/JugglProjectsPanel.vue +++ b/src/components/juggl/JugglProjectsPanel.vue @@ -5,7 +5,7 @@ :key="project.project_id" @click="() => startProject(project.project_id)" > -

{{ project.name }}

+

{{ getDurationTimestamp(project.duration) }}

{{ project.record_count }} records

@@ -13,11 +13,15 @@