- added fields: longdescr, hoursworked, hoursplanned
This commit is contained in:
@@ -9,8 +9,8 @@ $heightdescr: 20px;
|
||||
|
||||
.flex-item{
|
||||
// background-color: #d5e2eb;
|
||||
padding: 0px;
|
||||
margin: 1px;
|
||||
padding: 2px;
|
||||
margin: 2px;
|
||||
margin-left: 3px;
|
||||
margin-right: 3px;
|
||||
color: #000;
|
||||
@@ -195,16 +195,6 @@ $heightdescr: 20px;
|
||||
.colProgress {
|
||||
}
|
||||
|
||||
.lowperc {
|
||||
color: red;
|
||||
}
|
||||
.medperc {
|
||||
color: blue;
|
||||
}
|
||||
.highperc {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.percompleted {
|
||||
color: $colcompleted
|
||||
}
|
||||
@@ -264,6 +254,7 @@ $heightdescr: 20px;
|
||||
|
||||
.divdescrTot, .divdescrTot > div > div > div > div > textarea {
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.divdescrTot {
|
||||
|
||||
@@ -54,6 +54,16 @@ export default class SingleProject extends Vue {
|
||||
this.precDescr = this.itemproject.descr
|
||||
}
|
||||
|
||||
@Watch('itemproject.longdescr') public valueChangedlongdescr() {
|
||||
this.watchupdate('longdescr')
|
||||
}
|
||||
|
||||
@Watch('itemproject.hoursplanned') public valueChangedhoursplanned() {
|
||||
this.watchupdate('hoursplanned')
|
||||
}
|
||||
@Watch('itemproject.hoursworked') public valueChangedhoursworked() {
|
||||
this.watchupdate('hoursworked')
|
||||
}
|
||||
@Watch('itemproject.progressCalc') public valueChanged6() {
|
||||
console.log('itemproject.progressCalc')
|
||||
this.updateClasses()
|
||||
@@ -106,18 +116,9 @@ export default class SingleProject extends Vue {
|
||||
|
||||
this.percProgress = 'percProgress'
|
||||
|
||||
let mycolcl = ''
|
||||
if (this.itemproject.progressCalc < 33) {
|
||||
mycolcl = ' lowperc'
|
||||
} else if (this.itemproject.progressCalc < 66) {
|
||||
mycolcl = ' medperc'
|
||||
} else {
|
||||
mycolcl = ' highperc'
|
||||
}
|
||||
this.colProgress = tools.getProgressColor(this.itemproject.progressCalc)
|
||||
|
||||
this.colProgress = mycolcl
|
||||
|
||||
this.percProgress += mycolcl
|
||||
this.percProgress += ' ' + tools.getProgressClassColor(this.itemproject.progressCalc)
|
||||
|
||||
this.clButtPopover = this.sel ? 'pos-item-popover comp_selected' : 'pos-item-popover'
|
||||
|
||||
@@ -165,7 +166,7 @@ export default class SingleProject extends Vue {
|
||||
|
||||
if (!this.sel) {
|
||||
if (!this.inEdit) {
|
||||
this.attivaEdit = true
|
||||
// this.attivaEdit = true
|
||||
this.$emit('deselectAllRows', this.itemproject, true)
|
||||
|
||||
if (!this.sel) {
|
||||
@@ -209,10 +210,25 @@ export default class SingleProject extends Vue {
|
||||
}
|
||||
}
|
||||
|
||||
public clickRow() {
|
||||
public clickProject() {
|
||||
this.$emit('idsel', this.itemproject._id)
|
||||
this.clickRiga()
|
||||
}
|
||||
|
||||
public activeEdit(){
|
||||
console.log('Attiva Edit')
|
||||
this.attivaEdit = true
|
||||
this.editProject()
|
||||
}
|
||||
|
||||
get getrouteto(){
|
||||
return '/projects/' + this.itemproject._id
|
||||
}
|
||||
|
||||
public goIntoTheProject() {
|
||||
this.$router.replace('/projects/' + this.itemproject._id)
|
||||
}
|
||||
|
||||
public editProject() {
|
||||
console.log('INIZIO - editProject')
|
||||
if (this.attivaEdit) {
|
||||
@@ -269,7 +285,7 @@ export default class SingleProject extends Vue {
|
||||
this.deselectRiga()
|
||||
this.clickMenu(tools.MenuAction.DELETE)
|
||||
.then(() => {
|
||||
this.faiFocus('insertTask', true)
|
||||
this.faiFocus('insertProjectBottom', true)
|
||||
return
|
||||
})
|
||||
}
|
||||
@@ -297,7 +313,7 @@ export default class SingleProject extends Vue {
|
||||
this.deselectRiga()
|
||||
this.clickMenu(tools.MenuAction.DELETE)
|
||||
.then(() => {
|
||||
this.faiFocus('insertTask', true)
|
||||
this.faiFocus('insertProjectBottom', true)
|
||||
return
|
||||
})
|
||||
}
|
||||
@@ -310,14 +326,14 @@ export default class SingleProject extends Vue {
|
||||
} else {
|
||||
e.preventDefault()
|
||||
this.deselectRiga()
|
||||
this.faiFocus('insertTask', false)
|
||||
this.faiFocus('insertProjectBottom', false)
|
||||
}
|
||||
}
|
||||
|
||||
// console.log('keyDownArea', e)
|
||||
if (e.key === 'Escape') {
|
||||
this.deselectRiga()
|
||||
// this.faiFocus('insertTask', true)
|
||||
// this.faiFocus('insertProject', true)
|
||||
console.log('LOAD this.precDescr', this.precDescr)
|
||||
this.precDescr = this.itemproject.descr
|
||||
}
|
||||
@@ -397,10 +413,8 @@ export default class SingleProject extends Vue {
|
||||
return await this.askConfirmDelete()
|
||||
} else if (action === tools.MenuAction.TOGGLE_EXPIRING) {
|
||||
return await this.enableExpiring()
|
||||
} else if (action === tools.MenuAction.COMPLETED) {
|
||||
return await this.setCompleted()
|
||||
} else if (action === tools.MenuAction.PROGRESS_BAR) {
|
||||
return await this.updatedata('progressCalc')
|
||||
} else if (action === tools.MenuAction.EDIT) {
|
||||
this.activeEdit()
|
||||
} else if (action === 0) {
|
||||
this.deselectAndExitEdit()
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<template>
|
||||
<div :class="getClassRow()" @click="clickRow">
|
||||
<div :class="getClassRow()" @click="clickProject">
|
||||
|
||||
<q-btn class="flex-item donotdrag " size="sm" push color="primary" round icon="arrow_forward"
|
||||
:to="getrouteto" />
|
||||
|
||||
<div class="flex-item donotdrag divdescrTot">
|
||||
<q-input v-if="(sel)" hide-underline type="textarea" ref="inputdescr"
|
||||
<q-input v-if="(sel && inEdit)" hide-underline type="textarea" ref="inputdescr"
|
||||
v-model.trim="precDescr"
|
||||
autogrow
|
||||
borderless
|
||||
|
||||
Reference in New Issue
Block a user