This commit is contained in:
2022-02-25 20:58:01 +00:00
parent 4bcc457025
commit 58a636e24c
3 changed files with 36 additions and 6 deletions

View File

@@ -62,7 +62,12 @@ export default {
type: "GzDashLaborHoursPersonal",
scheduleableUserOnly: true,
singleOnly: false,
settings: { customTitle: null, dateRange: "*thismonth*", unit: "day" }
settings: {
customTitle: null,
dateRange: "*thismonth*",
unit: "day",
color: "#000000"
}
},
{
id: "dash-labor-hours-personal-bar",
@@ -71,7 +76,12 @@ export default {
type: "GzDashLaborHoursPersonalBar",
scheduleableUserOnly: true,
singleOnly: false,
settings: { customTitle: null, dateRange: "*thismonth*", unit: "day" }
settings: {
customTitle: null,
dateRange: "*thismonth*",
unit: "day",
color: "#000000"
}
},
{
id: "TestBarWidgetCountByUserType",

View File

@@ -67,6 +67,13 @@
v-model="localSettings.customTitle"
:label="$ay.t('Name')"
></v-text-field>
<v-color-picker
v-model="localSettings.color"
hide-mode-switch
hide-inputs
mode="hexa"
></v-color-picker>
</v-card-text>
<v-divider></v-divider>
@@ -91,7 +98,7 @@
</template>
<script>
import GzDash from "./dash-base.vue";
import Palette from "../api/palette";
//import Palette from "../api/palette";
export default {
components: {
GzDash
@@ -145,7 +152,7 @@ export default {
datasets: [
{
label: this.$ay.t("WorkOrderItemLaborServiceRateQuantity"),
backgroundColor: Palette.color.soft_green,
backgroundColor: this.settings.color ?? "#000000",
data: this.obj
}
]
@@ -170,6 +177,7 @@ export default {
this.settings.customTitle = this.localSettings.customTitle;
this.settings.dateRange = this.localSettings.dateRange;
this.settings.unit = this.localSettings.unit;
this.settings.color = this.localSettings.color;
this.$emit("dash-change");
this.context = false;
this.getDataFromApi();

View File

@@ -22,6 +22,7 @@
></gz-chart-line> -->
<gz-chart-line
v-if="visible"
:width="400"
:height="330"
:chart-data="chartData"
@@ -67,6 +68,13 @@
v-model="localSettings.customTitle"
:label="$ay.t('Name')"
></v-text-field>
<v-color-picker
v-model="localSettings.color"
hide-mode-switch
hide-inputs
mode="hexa"
></v-color-picker>
</v-card-text>
<v-divider></v-divider>
@@ -91,7 +99,6 @@
</template>
<script>
import GzDash from "./dash-base.vue";
import Palette from "../api/palette";
export default {
components: {
GzDash
@@ -102,6 +109,7 @@ export default {
data() {
return {
obj: {},
visible: true,
context: false,
localSettings: {},
selectLists: {
@@ -145,7 +153,7 @@ export default {
datasets: [
{
label: this.$ay.t("WorkOrderItemLaborServiceRateQuantity"),
borderColor: Palette.color.soft_deep_blue,
borderColor: this.settings.color ?? "#000000",
//backgroundColor: Palette.color.soft_deep_blue,
fill: false,
radius: 0,
@@ -175,9 +183,13 @@ export default {
this.settings.customTitle = this.localSettings.customTitle;
this.settings.dateRange = this.localSettings.dateRange;
this.settings.unit = this.localSettings.unit;
this.settings.color = this.localSettings.color;
this.$emit("dash-change");
this.context = false;
this.getDataFromApi();
this.visible = false;
this.visible = true;
},
async getDataFromApi() {