- add fields: typeproj and id_main_project

This commit is contained in:
Paolo Arena
2019-04-09 21:07:16 +02:00
parent 884d84e2df
commit fd20048934
10 changed files with 449 additions and 183 deletions

View File

@@ -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')
}
/*

View File

@@ -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
}

View File

@@ -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'
}
},

View File

@@ -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 })

View File

@@ -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

View File

@@ -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();},
}

View File

@@ -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
}
}

View File

@@ -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: ''
}
}

View File

@@ -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
}
}

View File

@@ -11,7 +11,7 @@
<div>
<div class="divtitlecat clMain">
<div class="flex-container clMain">
<q-btn v-if="!!getidProjParentAtt" size="sm" push color="secondary" round
<q-btn v-if="!!getIdParent && CanISeeProject" size="sm" push color="secondary" round
icon="arrow_back"
:to="getrouteup">
@@ -122,95 +122,112 @@
:label="$t('proj.longdescr')"
outlined
debounce="1000"
autogrow
/>
</div>
</div>
<div class="flex-container clMain">
<q-icon class="flex-item flex-icon" name="work_outline"/>
<div class="flex-item itemdescr">
<q-input
ref="input2"
readonly
v-model="itemselproj.hoursworked"
type="number"
rounded outlined
:label="$t('proj.hoursworked')"
debounce="500"></q-input>
<CProgress descr="" :progressval="getCalcHoursWorked"></CProgress>
</div>
<q-icon class="flex-item flex-icon" name="watch_later"/>
<div class="flex-item itemdata content-center">
<q-input
ref="input3"
type="number"
readonly
v-model="itemselproj.hoursplanned"
rounded outlined
:label="$t('proj.hoursplanned')"
debounce="500">
autogrow>
</q-input>
<CProgress :descr="$t('proj.progresstask')"
:progressval="itemselproj.progressCalc"></CProgress>
</div>
</div>
<div class="flex-container clMain">
<q-icon class="flex-item flex-icon" name="developer_mode"/>
<div class="flex-item itemdata">
<CDate :mydate="itemselproj.begin_development"
@input="itemselproj.begin_development = new Date(arguments[0])"
:label="$t('proj.begin_development')">
</CDate>
</div>
<div style="margin: 10px;"></div>
<div class="flex-item itemdata">
<CDate :mydate="itemselproj.begin_test" @input="itemselproj.begin_test = new Date(arguments[0])"
:label="$t('proj.begin_test')">
</CDate>
</div>
</div>
<div class="flex-container clMain">
<q-icon class="flex-item flex-icon" name="outlined_flag"/>
<div v-if="isMainProject" class="flex-container clMain">
<q-icon class="flex-item flex-icon" name="lock"/>
<div class="flex-item itemstatus">
<q-select rounded outlined v-model="itemselproj.actualphase" :options="selectPhase"
:label="$t('proj.actualphase')" emit-value map-options>
<q-select :readonly="readonly_PanelPrivacy"
rounded outlined v-model="itemselproj.privacyread" :options="selectPrivacy"
:label="$t('proj.privacyread')" emit-value map-options>
</q-select>
</div>
<q-icon class="flex-item flex-icon" name="outlined_flag"/>
<q-icon class="flex-item flex-icon" name="edit"/>
<div class="flex-item itemstatus">
<q-select rounded outlined v-model="itemselproj.totalphases" :options="selectPhase"
:label="$t('proj.totalphases')" emit-value map-options>
<q-select :readonly="readonly_PanelPrivacy" rounded outlined
v-model="itemselproj.privacywrite" :options="selectPrivacy"
:label="$t('proj.privacywrite')" emit-value map-options>
</q-select>
</div>
</div>
<div v-if="CanISeeProject">
<div class="flex-container clMain">
<q-icon class="flex-item flex-icon" name="work_outline"/>
<div class="flex-item itemdescr">
<q-input
ref="input2"
readonly
v-model="itemselproj.hoursworked"
type="number"
rounded outlined
:label="$t('proj.hoursworked')"
debounce="500"></q-input>
<CProgress descr="" :progressval="getCalcHoursWorked"></CProgress>
</div>
<q-icon class="flex-item flex-icon" name="watch_later"/>
<div class="flex-item itemdata content-center">
<q-input
ref="input3"
type="number"
readonly
v-model="itemselproj.hoursplanned"
rounded outlined
:label="$t('proj.hoursplanned')"
debounce="500">
<div class="flex-container clMain">
<q-icon class="flex-item flex-icon" name="watch_later"/>
<div class="flex-item itemdata content-center">
<q-input
ref="input3"
type="number"
v-model="itemselproj.hoursweeky_plannedtowork"
rounded outlined
maxlength="2"
:label="$t('proj.hoursweeky_plannedtowork')"
debounce="500">
</q-input>
<CProgress :progressval="calcprogressWeekly"></CProgress>
</q-input>
<CProgress :descr="$t('proj.progresstask')"
:progressval="itemselproj.progressCalc"></CProgress>
</div>
</div>
<q-icon class="flex-item flex-icon" name="developer_mode"/>
<div class="flex-item itemdata">
<CDate color="green-2" :mydate="calcEndWork_Estimate" :readonly="true"
:label="$t('proj.endwork_estimate')">
</CDate>
<div class="flex-container clMain">
<q-icon class="flex-item flex-icon" name="developer_mode"/>
<div class="flex-item itemdata">
<CDate :mydate="itemselproj.begin_development"
@input="itemselproj.begin_development = new Date(arguments[0])"
:label="$t('proj.begin_development')">
</CDate>
</div>
<div style="margin: 10px;"></div>
<div class="flex-item itemdata">
<CDate :mydate="itemselproj.begin_test"
@input="itemselproj.begin_test = new Date(arguments[0])"
:label="$t('proj.begin_test')">
</CDate>
</div>
</div>
<div class="flex-container clMain">
<q-icon class="flex-item flex-icon" name="outlined_flag"/>
<div class="flex-item itemstatus">
<q-select rounded outlined v-model="itemselproj.actualphase" :options="selectPhase"
:label="$t('proj.actualphase')" emit-value map-options>
</q-select>
</div>
<q-icon class="flex-item flex-icon" name="outlined_flag"/>
<div class="flex-item itemstatus">
<q-select rounded outlined v-model="itemselproj.totalphases" :options="selectPhase"
:label="$t('proj.totalphases')" emit-value map-options>
</q-select>
</div>
</div>
<div class="flex-container clMain">
<q-icon class="flex-item flex-icon" name="watch_later"/>
<div class="flex-item itemdata content-center">
<q-input
ref="input3"
type="number"
v-model="itemselproj.hoursweeky_plannedtowork"
rounded outlined
maxlength="2"
:label="$t('proj.hoursweeky_plannedtowork')"
debounce="500">
</q-input>
<CProgress :progressval="calcprogressWeekly"></CProgress>
</div>
<q-icon class="flex-item flex-icon" name="developer_mode"/>
<div class="flex-item itemdata">
<CDate color="green-2" :mydate="calcEndWork_Estimate" :readonly="true"
:label="$t('proj.endwork_estimate')">
</CDate>
</div>
</div>
</div>
</div>
</template>
<template v-else-if="(whatisSel === tools.WHAT_TODO) && (!!itemtodosel.descr)" v-slot:after>
<div class="q-pa-xs clMain">