Added begin_development and begin_test
Added status (changed completed field) fixed internet status connection.
This commit is contained in:
@@ -90,6 +90,12 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.itemdata{
|
||||
font-size: 1rem;
|
||||
flex: 1;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.progress-item {
|
||||
margin: 1px;
|
||||
padding: 2px;
|
||||
|
||||
@@ -48,7 +48,7 @@ export default class ProjList extends Vue {
|
||||
public percProgress: string = 'percProgress'
|
||||
|
||||
public $refs: {
|
||||
single: SingleProject[]
|
||||
singleproject: SingleProject[]
|
||||
}
|
||||
|
||||
get getrouteup() {
|
||||
@@ -102,15 +102,11 @@ export default class ProjList extends Vue {
|
||||
this.updateclasses()
|
||||
}
|
||||
|
||||
public getmyid(id) {
|
||||
return 'row' + id
|
||||
}
|
||||
|
||||
public showTask(field_value) {
|
||||
return field_value === tools.MenuAction.SHOW_TASK
|
||||
}
|
||||
|
||||
public async onEnd2(itemdragend) {
|
||||
public async onEndproj(itemdragend) {
|
||||
await Projects.actions.swapElems(itemdragend)
|
||||
}
|
||||
|
||||
@@ -130,7 +126,7 @@ export default class ProjList extends Vue {
|
||||
}
|
||||
|
||||
// console.log('args', args, itemdragend)
|
||||
this.onEnd2(itemdragend)
|
||||
this.onEndproj(itemdragend)
|
||||
})
|
||||
|
||||
$service.eventBus.$on('drag', (el, source) => {
|
||||
@@ -178,37 +174,60 @@ export default class ProjList extends Vue {
|
||||
public checkUpdate_everytime() {
|
||||
this.polling = setInterval(() => {
|
||||
this.checkUpdate()
|
||||
}, 60000)
|
||||
}, tools.NUMSEC_CHECKUPDATE)
|
||||
}
|
||||
|
||||
public beforeDestroy() {
|
||||
clearInterval(this.polling)
|
||||
}
|
||||
|
||||
public mydeleteItem(idobj: string) {
|
||||
// console.log('mydeleteItem', idobj)
|
||||
public mydeleteitemproj(idobj: string) {
|
||||
// console.log('mydeleteitemtodo', idobj)
|
||||
return Projects.actions.deleteItem({ idobj })
|
||||
}
|
||||
|
||||
public dbInsert(atfirst: boolean = false) {
|
||||
let descr = this.projbottom.trim()
|
||||
public dbInsert() {
|
||||
const descr = this.projbottom.trim()
|
||||
|
||||
if (descr === '') {
|
||||
return
|
||||
this.projbottom = ''
|
||||
|
||||
return this.addProject(descr)
|
||||
}
|
||||
|
||||
public async clickMenuProjList(action) {
|
||||
console.log('clickMenuProjList: ', action)
|
||||
if (action === tools.MenuAction.ADD_PROJECT) {
|
||||
const idnewelem = await this.addProject('')
|
||||
// get element by id
|
||||
const elem = this.getCompProjectById(idnewelem)
|
||||
// @ts-ignore
|
||||
elem.activeEdit()
|
||||
// console.log('idnewelem', idnewelem, 'Elem Trovato', elem)
|
||||
}
|
||||
}
|
||||
|
||||
public getCompProjectById(id): SingleProject {
|
||||
console.log('this.$refs.singleproject', this.$refs.singleproject)
|
||||
for (const elem of this.$refs.singleproject) {
|
||||
// @ts-ignore
|
||||
if (elem.itemproject._id === id)
|
||||
return elem
|
||||
}
|
||||
}
|
||||
|
||||
// const descr = this.$t('project.newproj').toString()
|
||||
|
||||
public async addProject(descr) {
|
||||
const myobj: IProject = {
|
||||
descr,
|
||||
id_parent: this.idProjAtt
|
||||
}
|
||||
|
||||
if (!tools.checkIfUserExist(this)) {
|
||||
return
|
||||
}
|
||||
|
||||
const myobj: IProject = {
|
||||
descr,
|
||||
id_parent: this.idProjAtt
|
||||
}
|
||||
|
||||
this.projbottom = ''
|
||||
|
||||
return Projects.actions.dbInsert({ myobj, atfirst })
|
||||
return await Projects.actions.dbInsert({ myobj, atfirst: false })
|
||||
}
|
||||
|
||||
public setidsel(id: string) {
|
||||
@@ -216,8 +235,8 @@ export default class ProjList extends Vue {
|
||||
this.itemsel = Projects.getters.getRecordById(this.idsel)
|
||||
}
|
||||
|
||||
public async updateitem({ myitem, field }) {
|
||||
console.log('calling MODIFY updateitem', myitem, field)
|
||||
public async updateitemproj({ myitem, field }) {
|
||||
console.log('calling MODIFY updateitemproj', myitem, field)
|
||||
|
||||
const itemdragend: IDrag = {
|
||||
id_proj: this.idProjAtt,
|
||||
@@ -232,12 +251,12 @@ export default class ProjList extends Vue {
|
||||
|
||||
}
|
||||
|
||||
public deselectAllRows(item: IProject, check, onlythis: boolean = false) {
|
||||
// console.log('deselectAllRows : ', item)
|
||||
public deselectAllRowsproj(item: IProject, check, onlythis: boolean = false) {
|
||||
// console.log('deselectAllRowsproj : ', item)
|
||||
|
||||
for (let i = 0; i < this.$refs.single.length; i++) {
|
||||
for (let i = 0; i < this.$refs.singleproject.length; i++) {
|
||||
|
||||
const contr = this.$refs.single[i] as SingleProject
|
||||
const contr = this.$refs.singleproject[i] as SingleProject
|
||||
// @ts-ignore
|
||||
const id = contr.itemproject._id
|
||||
// Don't deselect the actual clicked!
|
||||
@@ -271,6 +290,8 @@ export default class ProjList extends Vue {
|
||||
}
|
||||
|
||||
get getCalcHoursWorked() {
|
||||
if (this.itemsel.hoursplanned <= 0)
|
||||
return 0
|
||||
let myperc = Math.round(this.itemsel.hoursworked / this.itemsel.hoursplanned * 100)
|
||||
|
||||
return myperc
|
||||
|
||||
@@ -21,22 +21,20 @@
|
||||
icon="settings">
|
||||
<q-menu id="popconfig" self="top right">
|
||||
<q-list link separator no-border class="todo-menu">
|
||||
<q-item clickable v-for="field in menuPopupConfigProject"
|
||||
:key="field.value">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="field.icon"/>
|
||||
</q-item-section>
|
||||
<div v-for="field in menuPopupConfigProject" :key="field.value">
|
||||
<q-item clickable v-if="(field.value === 150)">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="field.icon"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>{{field.label}}</q-item-section>
|
||||
|
||||
<q-item-section side v-if="showTask(field.value)">
|
||||
<q-item-section>{{field.label}}</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-icon name="keyboard_arrow_right"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-menu auto-close anchor="bottom middle" self="top middle">
|
||||
<q-list dense>
|
||||
<q-item side :icon="field.icon">
|
||||
<q-item side clickable :icon="field.icon">
|
||||
|
||||
<q-item-section>
|
||||
<q-list dense>
|
||||
@@ -45,8 +43,7 @@
|
||||
:key="opt.value"
|
||||
@click="showtype = opt.value">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="opt.icon"
|
||||
inverted
|
||||
<q-icon :name="opt.icon" inverted
|
||||
color="primary"/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
@@ -58,8 +55,17 @@
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-item>
|
||||
<q-item v-else v-close-popup clickable :icon="field.icon"
|
||||
@click="clickMenuProjList(field.value)">
|
||||
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="field.icon"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>{{field.label}}</q-item-section>
|
||||
</q-item>
|
||||
</div>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
@@ -71,15 +77,17 @@
|
||||
<div>
|
||||
<!--<q-infinite-scroll :handler="loadMoreTodo" :offset="7">-->
|
||||
<div class="container" v-dragula="items_dacompletare(idProjAtt)" drake="second">
|
||||
<div :id="getmyid(myproj._id)" :index="index"
|
||||
<div :id="tools.getmyid(myproj._id)" :index="index"
|
||||
v-for="(myproj, index) in items_dacompletare(idProjAtt)"
|
||||
:key="myproj._id" class="myitemdrag">
|
||||
|
||||
<SingleProject ref="single" @deleteItem="mydeleteItem(myproj._id)"
|
||||
@eventupdate="updateitem"
|
||||
<SingleProject ref="singleproject" @deleteItemproj="mydeleteitemproj(myproj._id)"
|
||||
@eventupdateproj="updateitemproj"
|
||||
@idsel="setidsel"
|
||||
@deselectAllRows="deselectAllRows" @onEnd="onEnd2"
|
||||
:itemproject='myproj'/>
|
||||
@deselectAllRowsproj="deselectAllRowsproj" @onEnd="onEndproj"
|
||||
:itemproject='myproj'>
|
||||
|
||||
</SingleProject>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -91,7 +99,9 @@
|
||||
color="blue-12"
|
||||
:label="$t('todo.insertbottom')"
|
||||
:after="[{icon: 'arrow_forward', content: true, handler () {}}]"
|
||||
v-on:keyup.enter="dbInsert(false)"/>
|
||||
v-on:keyup.enter="dbInsert()">
|
||||
|
||||
</q-input>
|
||||
|
||||
<br>
|
||||
</div>
|
||||
@@ -135,7 +145,7 @@
|
||||
|
||||
</div>
|
||||
<q-icon class="flex-item flex-icon" name="watch_later"/>
|
||||
<div class="flex-item itemdescr content-center">
|
||||
<div class="flex-item itemdata content-center">
|
||||
<q-input
|
||||
ref="input"
|
||||
type="number"
|
||||
@@ -144,7 +154,32 @@
|
||||
:label="$t('proj.hoursplanned')"
|
||||
debounce="500"
|
||||
/>
|
||||
<CProgress :descr="$t('proj.progresstask')" :progressval="itemsel.progressCalc"></CProgress>
|
||||
<CProgress :descr="$t('proj.progresstask')"
|
||||
:progressval="itemsel.progressCalc"></CProgress>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-container clMain">
|
||||
<div style="margin: 10px;"></div>
|
||||
<div class="flex-item itemdata">
|
||||
<q-input v-model="itemsel.begin_development" mask="date" :hint="$t('proj.begin_development')">
|
||||
<!--<span class="data_string">{{tools.getstrDate(itemsel.begin_development)}}</span>-->
|
||||
<q-icon name="event" class="cursor-pointer">
|
||||
<q-popup-proxy>
|
||||
<q-date v-model="itemsel.begin_development" today-btn/>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</q-input>
|
||||
</div>
|
||||
<div style="margin: 10px;"></div>
|
||||
<div class="flex-item itemdata">
|
||||
<q-input v-model="itemsel.begin_test" mask="date" :hint="$t('proj.begin_test')">
|
||||
<!--<span class="data_string">{{tools.getstrDate(itemsel.begin_development)}}</span>-->
|
||||
<q-icon name="event" class="cursor-pointer">
|
||||
<q-popup-proxy>
|
||||
<q-date v-model="itemsel.begin_test" today-btn/>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</q-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user