mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
[Calendar] Fixed non working hours, added blockers to teams
This commit is contained in:
1 parent
f3f86261f4
commit
11c73b2b37
8 files changed
+281
-212
No files matched your search
@@ -50,10 +50,13 @@ export default {
|
||||
async updateUserInfo() {
|
||||
if (!(await this.v$.$validate())) return
|
||||
|
||||
const [sHours, sMinutes] = this.form.work_start.split(':');
|
||||
const [eHours, eMinutes] = this.form.work_end.split(':');
|
||||
|
||||
const data = {
|
||||
id: this.user.id,
|
||||
work_start: parseInt(this.form.work_start.split(':')[0]),
|
||||
work_end: parseInt(this.form.work_end.split(':')[0])
|
||||
work_start: parseFloat(sHours) * 60 + parseFloat(sMinutes),
|
||||
work_end: parseFloat(eHours) * 60 + parseFloat(eMinutes)
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -66,9 +69,18 @@ export default {
|
||||
|
||||
_setDates() {
|
||||
this.form = {
|
||||
work_start: this.user.work_start < 10 ? `0${this.user.work_start}:00` : `${this.user.work_start}:00`,
|
||||
work_end: this.user.work_end < 10 ? `0${this.user.work_end}:00` : `${this.user.work_end}:00`
|
||||
work_start: this.minutesToTime(this.user.work_start),
|
||||
work_end: this.minutesToTime(this.user.work_end)
|
||||
}
|
||||
},
|
||||
|
||||
minutesToTime(minutes) {
|
||||
var hours = Math.floor(minutes / 60)
|
||||
var mins = minutes % 60
|
||||
hours = (hours < 10 ? '0' : '') + hours
|
||||
mins = (mins < 10 ? '0' : '') + mins
|
||||
|
||||
return hours + ':' + mins
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user