From fd200489340a4aefe206dcc2b3fbcc904dcd638d Mon Sep 17 00:00:00 2001 From: Paolo Arena Date: Tue, 9 Apr 2019 21:07:16 +0200 Subject: [PATCH] - add fields: typeproj and id_main_project --- .../projects/SingleProject/SingleProject.ts | 15 +- src/model/Projects.ts | 16 ++ src/statics/i18n.js | 9 + src/store/Api/index.ts | 15 +- src/store/Modules/Projects.ts | 33 ++- src/store/Modules/UserStore.ts | 18 ++ src/store/Modules/tools.ts | 121 ++++++++++- src/store/Modules/translation.ts | 39 ++++ src/views/projects/proj-list/proj-list.ts | 199 +++++++++++------- src/views/projects/proj-list/proj-list.vue | 167 ++++++++------- 10 files changed, 449 insertions(+), 183 deletions(-) diff --git a/src/components/projects/SingleProject/SingleProject.ts b/src/components/projects/SingleProject/SingleProject.ts index dc08e41..4e06b72 100644 --- a/src/components/projects/SingleProject/SingleProject.ts +++ b/src/components/projects/SingleProject/SingleProject.ts @@ -77,6 +77,12 @@ export default class SingleProject extends Vue { @Watch('itemproject.actualphase') public valueChangedactualphase() { this.watchupdate('actualphase') } + @Watch('itemproject.privacyread') public valueChanged_privacyread() { + this.watchupdate('privacyread') + } + @Watch('itemproject.privacywrite') public valueChanged_privacywrite() { + this.watchupdate('privacywrite') + } @Watch('itemproject.totalphases') public valueChangedtotalphases() { this.watchupdate('totalphases') } @@ -88,8 +94,15 @@ export default class SingleProject extends Vue { this.watchupdate('progressCalc') } + get isMainProject() { + return tools.isMainProject(this.itemproject.id_parent) + } + get getlabeltext() { - return this.$t('proj.newproj') + if (this.isMainProject) + return this.$t('proj.newproj') + else + return this.$t('proj.newsubproj') } /* diff --git a/src/model/Projects.ts b/src/model/Projects.ts index c6cf366..35f2286 100644 --- a/src/model/Projects.ts +++ b/src/model/Projects.ts @@ -6,6 +6,8 @@ export interface IProject { _id?: any, userId?: string category?: string + typeproj?: number + id_main_project?: string id_parent?: string descr?: string longdescr?: string @@ -31,6 +33,8 @@ export interface IProject { begin_test?: Date totalphases?: number actualphase?: number + privacyread?: string + privacywrite?: string } export interface IProjectsState { @@ -39,3 +43,15 @@ export interface IProjectsState { insidePending: boolean visuLastCompleted: number } + +export const Privacy = { + all: 'all', + friends: 'friends', + mygroup: 'mygroup', + onlyme: 'onlyme' +} + +export const TypeProj = { + TYPE_PROJECT: 1, + TYPE_SUBDIR: 2 +} diff --git a/src/statics/i18n.js b/src/statics/i18n.js index 3d9e87c..d705c50 100644 --- a/src/statics/i18n.js +++ b/src/statics/i18n.js @@ -242,6 +242,7 @@ const messages = { connection: 'Connessione', proj: { newproj: 'Titolo Progetto', + newsubproj: 'Titolo Sotto-Progetto', longdescr: 'Descrizione', hoursplanned: 'Ore Preventivate', hoursadded: 'Ore Aggiuntive', @@ -252,6 +253,8 @@ const messages = { actualphase: 'Fase Attuale', hoursweeky_plannedtowork: 'Ore settimanali previste', endwork_estimate: 'Data fine lavori stimata', + privacyread:'Chi lo puo vedere:', + privacywrite:'Chi lo puo modificare:', totalphases: 'Totale Fasi' } }, @@ -492,6 +495,7 @@ const messages = { connection: 'Connection', proj: { newproj: 'Título Projecto', + newsubproj: 'Título Sub-Projecto', longdescr: 'Descripción', hoursplanned: 'Horas Estimadas', hoursadded: 'Horas Adicional', @@ -502,6 +506,8 @@ const messages = { actualphase: 'Fase Actual', hoursweeky_plannedtowork: 'Horarios semanales programados', endwork_estimate: 'Fecha estimada de finalización', + privacyread:'Quien puede verlo:', + privacywrite:'Quien puede modificarlo:', totalphases: 'Fases totales' } }, @@ -742,6 +748,7 @@ const messages = { connection: 'Conexión', proj: { newproj: 'Project Title', + newsubproj: 'SubProject Title', longdescr: 'Description', hoursplanned: 'Estimated Hours', hoursadded: 'Additional Hours', @@ -752,6 +759,8 @@ const messages = { actualphase: 'Actual Phase', hoursweeky_plannedtowork: 'Scheduled weekly hours', endwork_estimate: 'Estimated completion date', + privacyread:'Who can see it:', + privacywrite:'Who can modify if:', totalphases: 'Total Phase' } }, diff --git a/src/store/Api/index.ts b/src/store/Api/index.ts index c3b1381..1d42f49 100644 --- a/src/store/Api/index.ts +++ b/src/store/Api/index.ts @@ -156,12 +156,19 @@ export namespace ApiTool { // console.log('A1) INIZIO.............................................................') return globalroutines(null, 'readall', tablesync, null) .then((alldata) => { - const myrecs = [...alldata] + + let myrecs + + if (alldata === undefined) { + console.log('alldata NON DEFINITA') + return true + } else { + myrecs = [...alldata] + } const promises = myrecs.map((rec) => { let link = '/' + ApiTables.getLinkByTableName(nametab) - if (method !== 'POST') { link += '/' + rec._id } @@ -195,11 +202,11 @@ export namespace ApiTool { return (errorfromserver && !lettoqualcosa) }) - }).catch((e) => { + }).catch((error) => { + console.log('¨¨¨¨¨¨¨¨¨¨¨¨¨¨ errorfromserver:', errorfromserver, error) return (errorfromserver && !lettoqualcosa) }) .then((error) => { - console.log('¨¨¨¨¨¨¨¨¨¨¨¨¨¨ errorfromserver:', errorfromserver, error) const mystate = (error || errorfromserver) ? 'offline' : 'online' GlobalStore.mutations.setStateConnection(mystate) GlobalStore.mutations.saveConfig( { _id: costanti.CONFIG_ID_STATE_CONN, value: mystate }) diff --git a/src/store/Modules/Projects.ts b/src/store/Modules/Projects.ts index 72ccedf..7fa1143 100644 --- a/src/store/Modules/Projects.ts +++ b/src/store/Modules/Projects.ts @@ -20,7 +20,10 @@ const stateglob: IProjectsState = { visuLastCompleted: 10 } -const listFieldsToChange: string [] = ['descr', 'longdescr', 'hoursplanned', 'hoursworked', 'id_parent', 'statusproj', 'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progressCalc', 'live_url', 'test_url', 'begin_development', 'begin_test', 'actualphase', 'totalphases', 'hoursweeky_plannedtowork', 'endwork_estimate'] +const listFieldsToChange: string [] = ['descr', 'longdescr', 'hoursplanned', 'hoursworked', 'id_parent', 'statusproj', + 'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progressCalc', 'live_url', 'test_url', + 'begin_development', 'begin_test', 'actualphase', 'totalphases', 'hoursweeky_plannedtowork', 'endwork_estimate', + 'privacyread', 'privacywrite', 'id_main_project', 'typeproj'] const listFieldsUpdateCalculation: string [] = ['hoursplanned', 'hoursworked', 'progressCalc', 'endwork_estimate'] @@ -43,8 +46,8 @@ function initcat() { function updateDataCalculated(projout, projin) { listFieldsUpdateCalculation.forEach((field) => { - projout[field] = projin[field]; - }); + projout[field] = projin[field] + }) } namespace Getters { @@ -56,7 +59,9 @@ namespace Getters { _id: objectId(), descr: '', longdescr: '', + typeproj: 0, id_parent: '', + id_main_project: '', priority: tools.Priority.PRIORITY_NORMAL, statusproj: tools.Status.OPENED, created_at: tools.getDateNow(), @@ -75,6 +80,8 @@ namespace Getters { hoursworked: 0, hoursplanned: 0, progressCalc: 0, + privacyread: '', + privacywrite: '', begin_development: tools.getDateNull(), begin_test: tools.getDateNull(), hoursweeky_plannedtowork: 0, @@ -95,12 +102,13 @@ namespace Getters { const listaprojects = b.read((state: IProjectsState) => (): IMenuList[] => { if (state.projects) { - // console.log('state.projects', state.projects) + console.log('state.projects', state.projects) const listaproj = tools.mapSort(state.projects.filter((proj) => proj.id_parent === process.env.PROJECT_ID_MAIN)) const myarr: IMenuList[] = [] for (const proj of listaproj) { myarr.push({ nametranslate: '', description: proj.descr, idelem: proj._id }) } + console.log(' myarr', myarr, listaproj) return myarr } else { @@ -120,17 +128,6 @@ namespace Getters { return '' }, 'getDescrById') - const getParentById = b.read((state: IProjectsState) => (id: string): string => { - if (state.projects) { - const itemfound = state.projects.find((item) => item._id === id) - if (!!itemfound) { - return itemfound.id_parent - } - } - - return '' - }, 'getParentById') - const getRecordById = b.read((state: IProjectsState) => (id: string): IProject => { if (state.projects) { return state.projects.find((item) => item._id === id) @@ -151,13 +148,9 @@ namespace Getters { get getDescrById() { return getDescrById() }, - get getParentById() { - return getParentById() - }, get getRecordById() { return getRecordById() } - } } @@ -282,6 +275,8 @@ namespace Actions { objproj.descr = myobj.descr objproj.category = myobj.category objproj.id_parent = myobj.id_parent + objproj.id_main_project = myobj.id_main_project + objproj.typeproj = myobj.typeproj let elemtochange: IProject = null diff --git a/src/store/Modules/UserStore.ts b/src/store/Modules/UserStore.ts index 498d2d7..04d0916 100644 --- a/src/store/Modules/UserStore.ts +++ b/src/store/Modules/UserStore.ts @@ -67,6 +67,18 @@ namespace Getters { return state.servercode }, 'getServerCode') + const IsMyFriend = b.read((state) => (userIdOwner) => { + // ++TODO Check if userIdOwner is my friend + // userIdOwner is my friend ? + return true + }, 'IsMyFriend') + + const IsMyGroup = b.read((state) => (userIdOwner) => { + // ++TODO Check if userIdOwner is on my groups + // userIdOwner is on my groups ? + return true + }, 'IsMyGroup') + export const getters = { get lang() { return lang() @@ -80,6 +92,12 @@ namespace Getters { get getServerCode() { return getServerCode() }, + get IsMyFriend() { + return IsMyFriend() + }, + get IsMyGroup() { + return IsMyGroup() + } // get fullName() { return fullName();}, } diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts index 7aab703..7c7a141 100644 --- a/src/store/Modules/tools.ts +++ b/src/store/Modules/tools.ts @@ -3,7 +3,7 @@ import globalroutines from './../../globalroutines/index' import { costanti } from './costanti' import { translation } from './translation' import Quasar, { date } from 'quasar' -import { IProject, ITodo } from '@src/model' +import { IProject, ITodo, Privacy } from '@src/model' import * as ApiTables from '@src/store/Modules/ApiTables' import translate from '@src/globalroutines/util' @@ -136,8 +136,77 @@ export const tools = { value: 3 } ] - }, + + selectPrivacy: { + it: [ + { + id: 1, + label: translation.it.privacy.all, + value: Privacy.all + }, + { + id: 2, + label: translation.it.privacy.friends, + value: Privacy.friends + }, + { + id: 3, + label: translation.it.privacy.mygroup, + value: Privacy.mygroup + }, + { + id: 4, + label: translation.it.privacy.onlyme, + value: Privacy.onlyme + } + ], + es: [ + { + id: 1, + label: translation.es.privacy.all, + value: Privacy.all + }, + { + id: 2, + label: translation.es.privacy.friends, + value: Privacy.friends + }, + { + id: 3, + label: translation.es.privacy.mygroup, + value: Privacy.mygroup + }, + { + id: 4, + label: translation.es.privacy.onlyme, + value: Privacy.onlyme + } + ], + enUs: [ + { + id: 1, + label: translation.enUs.privacy.all, + value: Privacy.all + }, + { + id: 2, + label: translation.enUs.privacy.friends, + value: Privacy.friends + }, + { + id: 3, + label: translation.enUs.privacy.mygroup, + value: Privacy.mygroup + }, + { + id: 4, + label: translation.enUs.privacy.onlyme, + value: Privacy.onlyme + } + ] + }, + selectStatus: { it: [ { @@ -514,13 +583,13 @@ export const tools = { it: [ { id: 5, - label: 'Nuovo Progetto', + label: translation.it.proj.newsubproj, value: 200, // ADD_PROJECT icon: 'next_week' }, { id: 10, - label: 'Mostra Task', + label: translation.it.task.showtask, value: 150, // SHOW_TASK icon: 'rowing' } @@ -529,13 +598,13 @@ export const tools = { [ { id: 5, - label: 'Nuevo Projecto', + label: translation.es.proj.newsubproj, value: 200, // ADD_PROJECT icon: 'next_week' }, { id: 10, - label: 'Mostrar Tareas', + label: translation.es.task.showtask, value: 150, icon: 'rowing' } @@ -544,19 +613,47 @@ export const tools = { [ { id: 5, - label: 'New Project', + label: translation.it.proj.newsubproj, value: 200, // ADD_PROJECT icon: 'next_week' }, { id: 10, - label: 'Show Task', + label: translation.enUs.task.showtask, value: 150, icon: 'rowing' } ] - } - , + }, + + menuPopupConfigMAINProject: { + it: [ + { + id: 5, + label: translation.it.proj.newproj, + value: 200, // ADD_PROJECT + icon: 'next_week' + } + ], + es: + [ + { + id: 5, + label: translation.es.proj.newproj, + value: 200, // ADD_PROJECT + icon: 'next_week' + } + ], + enUs: + [ + { + id: 5, + label: translation.it.proj.newproj, + value: 200, // ADD_PROJECT + icon: 'next_week' + } + ] + }, listOptionShowTask: { it: [ @@ -1270,5 +1367,9 @@ export const tools = { return new Date().valueOf() }, + isMainProject(idproj) { + return idproj === process.env.PROJECT_ID_MAIN + } + } diff --git a/src/store/Modules/translation.ts b/src/store/Modules/translation.ts index 8a9661c..b848c80 100644 --- a/src/store/Modules/translation.ts +++ b/src/store/Modules/translation.ts @@ -1,14 +1,53 @@ export const translation = { it: { fase: 'Fase', + privacy: { + all: 'Tutti', + friends: 'Amici', + mygroup: 'Gruppo', + onlyme: 'Solo io' + }, + proj: { + newproj: 'Nuovo Progetto', + newsubproj: 'Nuovo Sotto-Progetto', + }, + task: { + showtask: 'Mostra Task', + }, end: '' }, es: { fase: 'Fase', + privacy: { + all: 'Todos', + friends: 'Amigos', + mygroup: 'Grupos', + onlyme: 'Solo yo' + }, + proj: { + newproj: 'Nuevo Projecto', + newsubproj: 'Nuevo Sub-Projecto', + }, + task: { + showtask: 'Mostrar Tarea', + }, end: '' }, enUs: { fase: 'Phase', + privacy: { + all: 'All', + friends: 'Friends', + mygroup: 'Group', + onlyme: 'Only me' + }, + proj: { + newproj: 'New Project', + newsubproj: 'New Sub-Project', + }, + task: { + showtask: 'Show Task', + }, end: '' } } diff --git a/src/views/projects/proj-list/proj-list.ts b/src/views/projects/proj-list/proj-list.ts index 9430c98..95c5949 100644 --- a/src/views/projects/proj-list/proj-list.ts +++ b/src/views/projects/proj-list/proj-list.ts @@ -1,7 +1,7 @@ import Vue from 'vue' import { Component, Watch } from 'vue-property-decorator' -import { IDrag, IProject, IProjectsState, ITodo } from '../../../model/index' +import { IDrag, IProject, IProjectsState, ITodo, Privacy, TypeProj } from '../../../model/index' import { SingleProject } from '../../../components/projects/SingleProject/index' import { CTodo } from '../../../components/todos/CTodo' @@ -41,7 +41,6 @@ export default class ProjList extends Vue { public scrollable = true public dragname: string = 'second' public idProjAtt: string = process.env.PROJECT_ID_MAIN - public idProjParentAtt: string = '' public splitterModel = 50 // start at 50% public itemproj: IProject = null public idsel: string = '' @@ -53,6 +52,7 @@ export default class ProjList extends Vue { public selectStatus: [] = tools.selectStatus[UserStore.state.lang] public selectPhase: [] = tools.selectPhase[UserStore.state.lang] + public selectPrivacy: [] = tools.selectPrivacy[UserStore.state.lang] public $refs: { singleproject: SingleProject[], @@ -64,13 +64,13 @@ export default class ProjList extends Vue { @Watch('items_dacompletare') public changeitems() { - this.idProjParentAtt = Projects.getters.getParentById(this.idProjAtt) + this.updateindexProj() } @Watch('$route.params.idProj') public changeparent() { this.idProjAtt = this.$route.params.idProj - this.idProjParentAtt = Projects.getters.getParentById(this.idProjAtt) + this.updateindexProj() this.selproj() } @@ -79,8 +79,31 @@ export default class ProjList extends Vue { this.updateclasses() } - get getidProjParentAtt() { - return this.idProjParentAtt + private updateindexProj() { + console.log('idProjAtt', this.idProjAtt) + this.itemproj = Projects.getters.getRecordById(this.idProjAtt) + console.log('this.itemproj', this.itemproj) + // console.log('idproj', this.idProjAtt, 'params' , this.$route.params) + } + + get readonly_PanelPrivacy() { + return !this.CanIModifyPanelPrivacy + } + + get CanISeeProject() { + + if (UserStore.state.userId === this.itemselproj.userId) // If it's the owner + return true + + return (this.itemselproj.privacyread === Privacy.all) || + (this.itemselproj.privacyread === Privacy.friends) && (UserStore.getters.IsMyFriend(this.itemselproj.userId)) + || ((this.itemselproj.privacyread === Privacy.mygroup) && (UserStore.getters.IsMyGroup(this.itemselproj.userId))) + } + + get CanIModifyPanelPrivacy() { + + if (UserStore.state.userId === this.itemselproj.userId) // If it's the owner + return true } // I use this because the statustodo will disappear from the UI, so it won't call the status changed... @@ -91,7 +114,7 @@ export default class ProjList extends Vue { } get getrouteup() { - return '/projects/' + this.idProjParentAtt + return '/projects/' + this.itemproj.id_parent } public selproj() { @@ -113,8 +136,26 @@ export default class ProjList extends Vue { GlobalStore.mutations.setShowType(value) } + get isRootProject() { + return this.idProjAtt === process.env.PROJECT_ID_MAIN + } + + get getIdParent() { + if (!!this.itemproj) + return this.itemproj.id_parent + else + return '' + } + + get isMainProject() { + return tools.isMainProject(this.idProjAtt) + } + get menuPopupConfigProject() { - return tools.menuPopupConfigProject[UserStore.state.lang] + if (this.isMainProject) + return tools.menuPopupConfigMAINProject[UserStore.state.lang] + else + return tools.menuPopupConfigProject[UserStore.state.lang] } get listOptionShowTask() { @@ -125,6 +166,70 @@ export default class ProjList extends Vue { return Projects.getters.getDescrById(this.idProjAtt) } + get getCalcHoursWorked() { + + if (this.itemselproj.hoursplanned <= 0) { + return 0 + } + return Math.round(this.itemselproj.hoursworked / this.itemselproj.hoursplanned * 100) + + } + + get calcprogressWeekly() { + + if (this.itemselproj.hoursplanned <= 0) { + return 0 + } + return Math.round(this.itemselproj.hoursworked / this.itemselproj.hoursplanned * 100) + } + + get calcEndWork_Estimate() { + if (date.isValid(this.itemselproj.begin_development) && (this.itemselproj.hoursweeky_plannedtowork > 0)) { + const hoursw = this.itemselproj.hoursweeky_plannedtowork + + try { + + let orerimaste = this.itemselproj.hoursplanned - this.itemselproj.hoursworked + if (orerimaste < 0) { + orerimaste = 0 + } + + const weeks = orerimaste / hoursw + const days = Math.round(weeks * 7) + + let mydate = this.itemselproj.begin_development + const datenow = tools.getDateNow() + // if begin is in the past, take the day now + if (date.getDateDiff(mydate, datenow) < 0) { + mydate = datenow + } + console.log('mydate', mydate) + this.itemselproj.endwork_estimate = date.addToDate(mydate, { days }) + + console.log(' days', days, 'weeks', weeks, 'orerimaste', orerimaste, 'dateestimated', this.itemselproj.endwork_estimate) + + return this.itemselproj.endwork_estimate + }catch (e) { + this.itemselproj.endwork_estimate = tools.getDateNull() + } + + return tools.getDateNull() + + } else { + return tools.getDateNull() + } + } + + get getCalcTodoHoursWorked() { + if (this.itemtodosel.hoursplanned <= 0) { + return 0 + } + const myperc = Math.round(this.itemtodosel.hoursworked / this.itemtodosel.hoursplanned * 100) + + return myperc + + } + public showTask(field_value) { return field_value === tools.MenuAction.SHOW_TASK } @@ -172,9 +277,7 @@ export default class ProjList extends Vue { this.splitterModel = 50 } this.idProjAtt = this.$route.params.idProj - this.idProjParentAtt = Projects.getters.getParentById(this.idProjAtt) - - console.log('this.idProjParentAtt', this.idProjParentAtt, 'idproj', this.idProjAtt, 'params' , this.$route.params) + this.updateindexProj() tools.touchmove(this.scrollable) } @@ -183,12 +286,9 @@ export default class ProjList extends Vue { console.log('LOAD PROJECTS....') if (!!this.$route.params.idProj) { this.idProjAtt = this.$route.params.idProj - this.idProjParentAtt = Projects.getters.getParentById(this.idProjAtt) - this.itemproj = Projects.getters.getRecordById(this.idProjAtt) + this.updateindexProj() } - // console.log('this.idProjAtt', this.idProjAtt, this.idProjParentAtt) - // Set last category selected // localStorage.setItem(tools.localStorage.categorySel, this.categoryAtt) @@ -206,8 +306,8 @@ export default class ProjList extends Vue { clearInterval(this.polling) } - public mydeleteitemproj(idobj: string) { - // console.log('mydeleteitemtodo', idobj) + public static mydeleteitemproj(idobj: string) { + console.log('mydeleteitemtodo', idobj) return Projects.actions.deleteItem({ idobj }) } @@ -249,6 +349,14 @@ export default class ProjList extends Vue { id_parent: this.idProjAtt } + if (this.isRootProject) { + myobj.typeproj = TypeProj.TYPE_PROJECT + myobj.id_main_project = this.idProjAtt + } else { + myobj.typeproj = TypeProj.TYPE_SUBDIR + myobj.id_main_project = this.itemproj.id_main_project + } + if (!tools.checkIfUserExist(this)) { return } @@ -340,54 +448,6 @@ export default class ProjList extends Vue { ApiTables.waitAndcheckPendingMsg() } - get getCalcHoursWorked() { - - if (this.itemselproj.hoursplanned <= 0) { - return 0 - } - return Math.round(this.itemselproj.hoursworked / this.itemselproj.hoursplanned * 100) - - } - - get calcprogressWeekly() { - - if (this.itemselproj.hoursplanned <= 0) { - return 0 - } - return Math.round(this.itemselproj.hoursworked / this.itemselproj.hoursplanned * 100) - } - - get calcEndWork_Estimate() { - if (date.isValid(this.itemselproj.begin_development) && (this.itemselproj.hoursweeky_plannedtowork > 0)) { - const hoursw = this.itemselproj.hoursweeky_plannedtowork - - try { - - let orerimaste = this.itemselproj.hoursplanned - this.itemselproj.hoursworked - if (orerimaste < 0) { - orerimaste = 0 - } - - const weeks = orerimaste / hoursw - const days = Math.round(weeks * 7) - - const mydate = this.itemselproj.begin_development - this.itemselproj.endwork_estimate = date.addToDate(mydate, { days }) - - console.log(' days', days, 'weeks', weeks, 'orerimaste', orerimaste, 'dateestimated', this.itemselproj.endwork_estimate) - - return this.itemselproj.endwork_estimate - }catch (e) { - this.itemselproj.endwork_estimate = tools.getDateNull() - } - - return tools.getDateNull() - - } else { - return tools.getDateNull() - } - } - private getElementIndex(el: any) { return [].slice.call(el.parentElement.children).indexOf(el) } @@ -396,14 +456,5 @@ export default class ProjList extends Vue { return parseInt(el.attributes.index.value, 10) } - get getCalcTodoHoursWorked() { - if (this.itemtodosel.hoursplanned <= 0) { - return 0 - } - const myperc = Math.round(this.itemtodosel.hoursworked / this.itemtodosel.hoursplanned * 100) - - return myperc - - } } diff --git a/src/views/projects/proj-list/proj-list.vue b/src/views/projects/proj-list/proj-list.vue index ada994e..8128f22 100644 --- a/src/views/projects/proj-list/proj-list.vue +++ b/src/views/projects/proj-list/proj-list.vue @@ -11,7 +11,7 @@
- @@ -122,95 +122,112 @@ :label="$t('proj.longdescr')" outlined debounce="1000" - autogrow - /> - -
-
-
- -
- - -
- -
- - + autogrow> - +
-
- -
- - -
-
-
- - -
-
-
- +
+
- +
- +
- +
+
+
+ +
+ + +
+ +
+ -
- -
- - - - + + +
- -
- - +
+ +
+ + +
+
+
+ + +
+
+
+ +
+ + +
+ +
+ + +
+
+ +
+ +
+ + + + +
+ +
+ + +
-
-