From 47b01c9002958251163406994a5b052f72d44f74 Mon Sep 17 00:00:00 2001
From: Paolo Arena
Date: Thu, 25 Feb 2021 03:00:29 +0100
Subject: [PATCH] Reportistica Ore 3
---
.../CEventsCalendar/CEventsCalendar.ts | 20 ++-
.../CEventsCalendar/CEventsCalendar.vue | 12 +-
src/components/CGridTableRec/CGridTableRec.ts | 8 +-
.../CGridTableRec/CGridTableRec.vue | 2 +-
src/components/CHours/CHours.ts | 1 +
src/components/CMyPopupEdit/CMyPopupEdit.ts | 14 +-
src/components/CMyPopupEdit/CMyPopupEdit.vue | 25 +++-
src/components/CMySelect/CMySelect.ts | 1 +
src/components/CMySelect/CMySelect.vue | 4 +-
src/model/GlobalStore.ts | 1 +
src/store/Modules/tools.ts | 73 ++++++++++-
src/views/projects/proj-list/proj-list.ts | 1 +
src/views/projects/report/report.ts | 121 +++++++++++++++---
src/views/projects/report/report.vue | 73 +++++++++--
14 files changed, 304 insertions(+), 52 deletions(-)
diff --git a/src/components/CEventsCalendar/CEventsCalendar.ts b/src/components/CEventsCalendar/CEventsCalendar.ts
index 9f503b8..9d6e16b 100755
--- a/src/components/CEventsCalendar/CEventsCalendar.ts
+++ b/src/components/CEventsCalendar/CEventsCalendar.ts
@@ -57,7 +57,7 @@ export default class CEventsCalendar extends MixinEvents {
public $q
public $t: any
public calendarView = 'month'
- public selectedDate = '2019-04-01'
+ public selectedDate = ''
public tabeditor: string = 'details'
public formDefault: IEvents = {
title: '',
@@ -381,16 +381,21 @@ export default class CEventsCalendar extends MixinEvents {
}
public mounted() {
- this.selectedDate = this.formatDate(tools.getDateNow())
this.$root.$on('calendar:next', this.calendarNext)
this.$root.$on('calendar:prev', this.calendarPrev)
this.$root.$on('calendar:today', this.calendarToday)
+
+ this.SetToday()
// CalendarStore.state.eventlist = events
this.updateFormatters()
}
public beforeMount() {
+ console.log('mounted')
+ this.selectedDate = this.formatDate(tools.getDateNow())
+ console.log('this.selectedDate', this.selectedDate)
+
CalendarStore.state.locale = toolsext.getLocale()
this.updateFormatters()
}
@@ -976,6 +981,7 @@ export default class CEventsCalendar extends MixinEvents {
public getEvents(dt) {
const eventsloc = []
+ console.log('dt', dt)
for (let i = 0; i < CalendarStore.state.eventlist.length; ++i) {
let added = false
@@ -984,11 +990,11 @@ export default class CEventsCalendar extends MixinEvents {
// check for overlapping times
const startTime = CalendarStore.state.eventlist[i].dateTimeStart
const endTime = CalendarStore.state.eventlist[i].dateTimeEnd
- for (let j = 0; j < eventsloc.length; ++j) {
- const startTime2 = eventsloc[j].dateTimeStart
- const endTime2 = eventsloc[j].dateTimeEnd
+ for (const item of eventsloc) {
+ const startTime2 = item.dateTimeStart
+ const endTime2 = item.dateTimeEnd
if (date.isBetweenDates(startTime, startTime2, endTime2) || date.isBetweenDates(endTime, startTime2, endTime2)) {
- eventsloc[j].side = 'left'
+ item.side = 'left'
eventsloc.push(CalendarStore.state.eventlist[i])
added = true
break
@@ -1008,6 +1014,8 @@ export default class CEventsCalendar extends MixinEvents {
}
}
}
+ if (eventsloc.length > 0)
+ console.log('eventsloc', eventsloc)
return eventsloc
}
diff --git a/src/components/CEventsCalendar/CEventsCalendar.vue b/src/components/CEventsCalendar/CEventsCalendar.vue
index 39d0158..d835065 100755
--- a/src/components/CEventsCalendar/CEventsCalendar.vue
+++ b/src/components/CEventsCalendar/CEventsCalendar.vue
@@ -516,8 +516,8 @@
dayPadding="35px 2px"
>
-
-
+
+
-
+
-
+
-
-
+
+
diff --git a/src/components/CHours/CHours.ts b/src/components/CHours/CHours.ts
index 628f43f..cbf6185 100755
--- a/src/components/CHours/CHours.ts
+++ b/src/components/CHours/CHours.ts
@@ -37,6 +37,7 @@ export default class CHours extends MixinBase {
lk_LF: 'userId',
lk_FF: '_id',
lk_as: 'user',
+ af_objId_tab: 'myId',
lk_proj: {
todoId: 1, userId: 1, descr: 1, date: 1, time_start: 1, time_end: 1, hours: 1,
username: 1, name: 1, surname: 1
diff --git a/src/components/CMyPopupEdit/CMyPopupEdit.ts b/src/components/CMyPopupEdit/CMyPopupEdit.ts
index 74478b1..475fc37 100755
--- a/src/components/CMyPopupEdit/CMyPopupEdit.ts
+++ b/src/components/CMyPopupEdit/CMyPopupEdit.ts
@@ -52,10 +52,13 @@ export default class CMyPopupEdit extends Vue {
this.$emit('update:row', newval)
}
- public changevalRec(newval) {
+ public getrealval(newval) {
if (this.col.fieldtype === tools.FieldType.hours) {
newval = newval.value
}
+ }
+
+ public changevalRec(newval) {
console.log('this.row', this.row, 'this.col', this.col, 'newval', newval)
console.log('this.row[this.col.name]', this.row[this.col.name])
this.row[this.col.name] = newval
@@ -63,6 +66,15 @@ export default class CMyPopupEdit extends Vue {
this.$emit('update:row', this.row)
}
+ public changevalRecHours(newval) {
+ if (this.col.fieldtype === tools.FieldType.hours) {
+ newval = newval.value
+ }
+ this.changevalRec(newval)
+
+ this.myvalue = newval
+ }
+
public updatedata() {
this.mounted()
}
diff --git a/src/components/CMyPopupEdit/CMyPopupEdit.vue b/src/components/CMyPopupEdit/CMyPopupEdit.vue
index 927ca33..d14c3e7 100755
--- a/src/components/CMyPopupEdit/CMyPopupEdit.vue
+++ b/src/components/CMyPopupEdit/CMyPopupEdit.vue
@@ -50,14 +50,25 @@
+
+
-
-
+
+
+
+
+
-
+
-
+
+ -->
@@ -41,7 +58,7 @@
:key="index"
class="flex justify-center text-h7"
>
- {{ event.totalhours }}
+ {{ event.totalhours }}
@@ -49,7 +66,7 @@
:key="index"
class="flex justify-center text-h7 boldhigh text-blue"
>
- Tot: {{ event.totalacchours }}
+ [{{ event.totalacchours }}]
@@ -66,8 +83,44 @@
+
+
+
+
+
+ {{ event.totalhours }}
+
+
+
+
+ [{{ event.totalacchours }}]
+
+
+
+
+ {{ event.title }}
+
+
+
+
+
+
+
+
+