From eafcca90f27cffe1b4294ec0c2fee1b486ea7992 Mon Sep 17 00:00:00 2001 From: cristij Date: Sun, 2 Sep 2018 15:45:19 +0300 Subject: [PATCH] Improve charts, convert rtl support page into a single dashboard page --- src/App.vue | 13 +- src/components/Cards/Card.vue | 4 +- src/components/Charts/BarChart.js | 4 +- src/components/Charts/LineChart.js | 2 +- src/layout/dashboard/DashboardLayout.vue | 2 +- src/pages/Dashboard.vue | 60 +++--- src/pages/RTLSupport.vue | 254 ----------------------- src/router/index.js | 2 +- src/router/routes.js | 8 +- 9 files changed, 53 insertions(+), 296 deletions(-) delete mode 100644 src/pages/RTLSupport.vue diff --git a/src/App.vue b/src/App.vue index 920c15a..0d3f47f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,16 +1,21 @@ diff --git a/src/components/Cards/Card.vue b/src/components/Cards/Card.vue index bdb7c3f..3fc00e3 100644 --- a/src/components/Cards/Card.vue +++ b/src/components/Cards/Card.vue @@ -3,7 +3,7 @@
-
+

{{title}}

{{subTitle}}

@@ -25,7 +25,7 @@ export default { title: String, subTitle: String, type: String, - cardHeaderClasses: [String, Object] + headerClasses: [String, Object, Array] } }; diff --git a/src/components/Charts/BarChart.js b/src/components/Charts/BarChart.js index 3a12c0c..80a8c74 100644 --- a/src/components/Charts/BarChart.js +++ b/src/components/Charts/BarChart.js @@ -42,8 +42,8 @@ export default { }, mounted() { this.$watch('chartData', (newVal, oldVal) => { - this.updateGradients(this.chartData); - if (oldVal === null) { + this.updateGradients(newVal); + if (!oldVal) { this.renderChart( this.chartData, this.extraOptions diff --git a/src/components/Charts/LineChart.js b/src/components/Charts/LineChart.js index d922ff7..d30f018 100644 --- a/src/components/Charts/LineChart.js +++ b/src/components/Charts/LineChart.js @@ -43,7 +43,7 @@ export default { mounted() { this.$watch('chartData', (newVal, oldVal) => { this.updateGradients(this.chartData); - if (oldVal === null) { + if (!oldVal) { this.renderChart( this.chartData, this.extraOptions diff --git a/src/layout/dashboard/DashboardLayout.vue b/src/layout/dashboard/DashboardLayout.vue index b150735..aa58639 100644 --- a/src/layout/dashboard/DashboardLayout.vue +++ b/src/layout/dashboard/DashboardLayout.vue @@ -9,7 +9,7 @@ - +
diff --git a/src/pages/Dashboard.vue b/src/pages/Dashboard.vue index 72b96a2..4550688 100644 --- a/src/pages/Dashboard.vue +++ b/src/pages/Dashboard.vue @@ -6,12 +6,14 @@