This commit is contained in:
2022-02-25 20:08:26 +00:00
parent 96a878ebe7
commit 5018a227b4
5 changed files with 94 additions and 83 deletions

View File

@@ -1,5 +1,6 @@
<template>
<v-sheet color="white" elevation="4" height="300px" style="overflow: hidden;">
<!-- <v-sheet color="white" elevation="4" height="400px" style="overflow: scroll;"> -->
<v-sheet color="white" height="420px" style="overflow: auto;" elevation="4">
<slot name="dash-title">
<v-toolbar flat dense>
<template v-if="showMoreButton">

View File

@@ -23,7 +23,7 @@
<gz-chart-line
:width="400"
:height="240"
:height="330"
:chart-data="chartData"
:options="timeLineChartOptions"
/>
@@ -46,6 +46,7 @@
</v-card-title>
<v-card-text style="height: 500px;">
{{ settings }}
<v-select
v-model="localSettings.dateRange"
:items="selectLists.dateFilterTokens"
@@ -116,6 +117,9 @@ export default {
xAxes: [
{
type: "time",
time: {
unit: this.settings.unit
},
gridLines: {
drawOnChartArea: false
}
@@ -140,9 +144,9 @@ export default {
return {
datasets: [
{
label: this.$ay.t("BillableHours"),
label: this.$ay.t("WorkOrderItemLaborServiceRateQuantity"),
borderColor: Palette.color.soft_deep_blue,
backgroundColor: Palette.color.soft_deep_blue,
//backgroundColor: Palette.color.soft_deep_blue,
fill: false,
radius: 0,
hoverRadius: 10,
@@ -239,7 +243,7 @@ ORDER BY timeframe ASC
if (res.error) {
this.errorMessage = res.error;
} else {
console.log(res);
// console.log(res);
this.obj = res.data;
}
} catch (error) {
@@ -307,7 +311,8 @@ async function fetchTranslatedText() {
"DateRangePreviousYearLastMonth",
"DateRangePreviousYearNextMonth",
"TimeSpanDays",
"TimeSpanMonths"
"TimeSpanMonths",
"WorkOrderItemLaborServiceRateQuantity"
]);
}
@@ -321,10 +326,9 @@ function populateSelectionLists(vm) {
{ name: vm.$ay.t("DateRangeToday"), id: "*today*" },
{ name: vm.$ay.t("DateRangeLastWeek"), id: "*lastweek*" },
{ name: vm.$ay.t("DateRangeThisWeek"), id: "*thisweek*" },
{ name: vm.$ay.t("DateRangeNextWeek"), id: "*nextweek*" },
{ name: vm.$ay.t("DateRangeLastMonth"), id: "*lastmonth*" },
{ name: vm.$ay.t("DateRangeThisMonth"), id: "*thismonth*" },
{ name: vm.$ay.t("DateRangeNextMonth"), id: "*nextmonth*" },
{ name: vm.$ay.t("DateRange14DayWindow"), id: "*14daywindow*" },
{ name: vm.$ay.t("DateRangePast"), id: "*past*" },
{ name: vm.$ay.t("DateRangeLastYear"), id: "*lastyear*" }, //prior year from jan to dec

View File

@@ -10,31 +10,33 @@
v-on="$listeners"
>
<template slot="main">
<v-calendar
ref="calendar"
color="primary"
type="day"
hide-header
:now="now"
:interval-count="intervalCount"
:first-time="startAt"
:events="events"
:event-color="getEventColor"
:locale="languageName"
@click:event="showEvent"
>
<template v-slot:event="{ event, eventSummary }">
<div>
<!-- eslint-disable vue/no-v-html -->
<span
:class="event.textColor + '--text'"
v-html="eventSummary()"
/><v-icon v-if="!event.editable" x-small :color="event.textColor">
$ayiLock</v-icon
>
</div>
</template>
</v-calendar>
<v-sheet height="345">
<v-calendar
ref="calendar"
color="primary"
type="day"
hide-header
:now="now"
:interval-count="intervalCount"
:first-time="startAt"
:events="events"
:event-color="getEventColor"
:locale="languageName"
@click:event="showEvent"
>
<template v-slot:event="{ event, eventSummary }">
<div>
<!-- eslint-disable vue/no-v-html -->
<span
:class="event.textColor + '--text'"
v-html="eventSummary()"
/><v-icon v-if="!event.editable" x-small :color="event.textColor">
$ayiLock</v-icon
>
</div>
</template>
</v-calendar>
</v-sheet>
</template>
</gz-dash>
</template>

View File

@@ -9,31 +9,33 @@
v-on="$listeners"
>
<template slot="main">
<v-calendar
ref="rvwcalendar"
color="primary"
type="day"
hide-header
:now="now"
:interval-count="intervalCount"
:first-time="startAt"
:events="events"
:event-color="getEventColor"
:locale="languageName"
@click:event="showEvent"
>
<template v-slot:event="{ event, eventSummary }">
<div>
<!-- eslint-disable vue/no-v-html -->
<span
:class="event.textColor + '--text'"
v-html="eventSummary()"
/><v-icon v-if="!event.editable" x-small :color="event.textColor">
$ayiLock</v-icon
>
</div>
</template>
</v-calendar>
<v-sheet height="345">
<v-calendar
ref="rvwcalendar"
color="primary"
type="day"
hide-header
:now="now"
:interval-count="intervalCount"
:first-time="startAt"
:events="events"
:event-color="getEventColor"
:locale="languageName"
@click:event="showEvent"
>
<template v-slot:event="{ event, eventSummary }">
<div>
<!-- eslint-disable vue/no-v-html -->
<span
:class="event.textColor + '--text'"
v-html="eventSummary()"
/><v-icon v-if="!event.editable" x-small :color="event.textColor">
$ayiLock</v-icon
>
</div>
</template>
</v-calendar>
</v-sheet>
</template>
</gz-dash>
</template>

View File

@@ -10,31 +10,33 @@
v-on="$listeners"
>
<template slot="main">
<v-calendar
ref="calendar"
color="primary"
type="day"
hide-header
:now="now"
:interval-count="intervalCount"
:first-time="startAt"
:events="events"
:event-color="getEventColor"
:locale="languageName"
@click:event="showEvent"
>
<template v-slot:event="{ event, eventSummary }">
<div>
<!-- eslint-disable vue/no-v-html -->
<span
:class="event.textColor + '--text'"
v-html="eventSummary()"
/><v-icon v-if="!event.editable" x-small :color="event.textColor">
$ayiLock</v-icon
>
</div>
</template>
</v-calendar>
<v-sheet height="345">
<v-calendar
ref="calendar"
color="primary"
type="day"
hide-header
:now="now"
:interval-count="intervalCount"
:first-time="startAt"
:events="events"
:event-color="getEventColor"
:locale="languageName"
@click:event="showEvent"
>
<template v-slot:event="{ event, eventSummary }">
<div>
<!-- eslint-disable vue/no-v-html -->
<span
:class="event.textColor + '--text'"
v-html="eventSummary()"
/><v-icon v-if="!event.editable" x-small :color="event.textColor">
$ayiLock</v-icon
>
</div>
</template>
</v-calendar>
</v-sheet>
</template>
</gz-dash>
</template>