- Projects: Shared / Personal
This commit is contained in:
@@ -172,6 +172,7 @@ module.exports = function (ctx) {
|
|||||||
'QAvatar',
|
'QAvatar',
|
||||||
'QImg',
|
'QImg',
|
||||||
'QSplitter',
|
'QSplitter',
|
||||||
|
'QRating',
|
||||||
'QSeparator'
|
'QSeparator'
|
||||||
],
|
],
|
||||||
directives: [
|
directives: [
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { tools } from '../../store/Modules/tools'
|
|||||||
import Quasar from 'quasar'
|
import Quasar from 'quasar'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
name: 'Header',
|
||||||
components: {
|
components: {
|
||||||
drawer,
|
drawer,
|
||||||
messagePopover
|
messagePopover
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { Component } from 'vue-property-decorator'
|
|||||||
import { tools } from '@src/store/Modules/tools'
|
import { tools } from '@src/store/Modules/tools'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
name: 'Logo'
|
||||||
})
|
})
|
||||||
export default class Logo extends Vue {
|
export default class Logo extends Vue {
|
||||||
get logoimg() {
|
get logoimg() {
|
||||||
|
|||||||
@@ -50,50 +50,73 @@ export default class SingleProject extends Vue {
|
|||||||
|
|
||||||
@Prop({ required: true }) public itemproject: IProject
|
@Prop({ required: true }) public itemproject: IProject
|
||||||
|
|
||||||
@Watch('itemproject.enableExpiring') public valueChanged4() {
|
@Watch('itemproject.enableExpiring')
|
||||||
|
public valueChanged4() {
|
||||||
this.watchupdate('enableExpiring')
|
this.watchupdate('enableExpiring')
|
||||||
}
|
}
|
||||||
|
|
||||||
@Watch('itemproject.expiring_at') public valueChanged2() {
|
@Watch('itemproject.expiring_at')
|
||||||
|
public valueChanged2() {
|
||||||
this.watchupdate('expiring_at')
|
this.watchupdate('expiring_at')
|
||||||
}
|
}
|
||||||
|
|
||||||
@Watch('itemproject.descr') public valueChanged5() {
|
@Watch('itemproject.descr')
|
||||||
|
public valueChanged5() {
|
||||||
this.precDescr = this.itemproject.descr
|
this.precDescr = this.itemproject.descr
|
||||||
}
|
}
|
||||||
|
|
||||||
@Watch('itemproject.longdescr') public valueChangedlongdescr() {
|
@Watch('itemproject.longdescr')
|
||||||
|
public valueChangedlongdescr() {
|
||||||
this.watchupdate('longdescr')
|
this.watchupdate('longdescr')
|
||||||
}
|
}
|
||||||
|
|
||||||
@Watch('itemproject.hoursplanned') public valueChangedhoursplanned() {
|
@Watch('itemproject.hoursplanned')
|
||||||
|
public valueChangedhoursplanned() {
|
||||||
this.watchupdate('hoursplanned')
|
this.watchupdate('hoursplanned')
|
||||||
}
|
}
|
||||||
@Watch('itemproject.hoursworked') public valueChangedhoursworked() {
|
|
||||||
|
@Watch('itemproject.hoursworked')
|
||||||
|
public valueChangedhoursworked() {
|
||||||
this.watchupdate('hoursworked')
|
this.watchupdate('hoursworked')
|
||||||
}
|
}
|
||||||
@Watch('itemproject.begin_development') public valueChangedbegin_development() {
|
|
||||||
|
@Watch('itemproject.begin_development')
|
||||||
|
public valueChangedbegin_development() {
|
||||||
this.watchupdate('begin_development')
|
this.watchupdate('begin_development')
|
||||||
}
|
}
|
||||||
@Watch('itemproject.hoursweeky_plannedtowork') public valueChangedhoursweeky_plannedtowork() {
|
|
||||||
|
@Watch('itemproject.hoursweeky_plannedtowork')
|
||||||
|
public valueChangedhoursweeky_plannedtowork() {
|
||||||
this.watchupdate('hoursweeky_plannedtowork')
|
this.watchupdate('hoursweeky_plannedtowork')
|
||||||
}
|
}
|
||||||
@Watch('itemproject.begin_test') public valueChangedbegin_test() {
|
|
||||||
|
@Watch('itemproject.begin_test')
|
||||||
|
public valueChangedbegin_test() {
|
||||||
this.watchupdate('begin_test')
|
this.watchupdate('begin_test')
|
||||||
}
|
}
|
||||||
@Watch('itemproject.actualphase') public valueChangedactualphase() {
|
|
||||||
|
@Watch('itemproject.actualphase')
|
||||||
|
public valueChangedactualphase() {
|
||||||
this.watchupdate('actualphase')
|
this.watchupdate('actualphase')
|
||||||
}
|
}
|
||||||
@Watch('itemproject.privacyread') public valueChanged_privacyread() {
|
|
||||||
|
@Watch('itemproject.privacyread')
|
||||||
|
public valueChanged_privacyread() {
|
||||||
this.watchupdate('privacyread')
|
this.watchupdate('privacyread')
|
||||||
}
|
}
|
||||||
@Watch('itemproject.privacywrite') public valueChanged_privacywrite() {
|
|
||||||
|
@Watch('itemproject.privacywrite')
|
||||||
|
public valueChanged_privacywrite() {
|
||||||
this.watchupdate('privacywrite')
|
this.watchupdate('privacywrite')
|
||||||
}
|
}
|
||||||
@Watch('itemproject.totalphases') public valueChangedtotalphases() {
|
|
||||||
|
@Watch('itemproject.totalphases')
|
||||||
|
public valueChangedtotalphases() {
|
||||||
this.watchupdate('totalphases')
|
this.watchupdate('totalphases')
|
||||||
}
|
}
|
||||||
@Watch('itemproject.progressCalc') public valueChanged6() {
|
|
||||||
|
@Watch('itemproject.progressCalc')
|
||||||
|
public valueChanged6() {
|
||||||
console.log('itemproject.progressCalc')
|
console.log('itemproject.progressCalc')
|
||||||
this.updateClasses()
|
this.updateClasses()
|
||||||
|
|
||||||
@@ -147,26 +170,28 @@ export default class SingleProject extends Vue {
|
|||||||
this.classDescrEdit += ' titleLista-item'
|
this.classDescrEdit += ' titleLista-item'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.itemproject.progressCalc > 100)
|
this.percProgress = 'percProgress'
|
||||||
this.itemproject.progressCalc = 100
|
|
||||||
|
|
||||||
this.classExpiring = 'flex-item data-item shadow-1 hide-if-small'
|
this.classExpiring = 'flex-item data-item shadow-1 hide-if-small'
|
||||||
this.classExpiringEx = ''
|
this.classExpiringEx = ''
|
||||||
|
|
||||||
this.percentageProgress = this.itemproject.progressCalc
|
|
||||||
|
|
||||||
this.percProgress = 'percProgress'
|
|
||||||
|
|
||||||
this.colProgress = tools.getProgressColor(this.itemproject.progressCalc)
|
|
||||||
|
|
||||||
this.percProgress += ' ' + tools.getProgressClassColor(this.itemproject.progressCalc)
|
|
||||||
|
|
||||||
this.clButtPopover = this.sel ? 'pos-item-popover comp_selected' : 'pos-item-popover'
|
this.clButtPopover = this.sel ? 'pos-item-popover comp_selected' : 'pos-item-popover'
|
||||||
|
|
||||||
|
if (!!this.itemproject) {
|
||||||
if (this.itemproject.statusproj !== tools.Status.COMPLETED) {
|
if (this.itemproject.statusproj !== tools.Status.COMPLETED) {
|
||||||
this.clButtPopover += ' pos-item-popover_cursor'
|
this.clButtPopover += ' pos-item-popover_cursor'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.itemproject.progressCalc > 100)
|
||||||
|
this.itemproject.progressCalc = 100
|
||||||
|
|
||||||
|
this.percentageProgress = this.itemproject.progressCalc
|
||||||
|
|
||||||
|
this.colProgress = tools.getProgressColor(this.itemproject.progressCalc)
|
||||||
|
this.percProgress += ' ' + tools.getProgressClassColor(this.itemproject.progressCalc)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (this.isProject()) {
|
if (this.isProject()) {
|
||||||
this.menuPopupProj = tools.menuPopupProj[UserStore.state.lang]
|
this.menuPopupProj = tools.menuPopupProj[UserStore.state.lang]
|
||||||
}
|
}
|
||||||
@@ -194,8 +219,10 @@ export default class SingleProject extends Vue {
|
|||||||
public clickRiga(clickmenu: boolean = false) {
|
public clickRiga(clickmenu: boolean = false) {
|
||||||
console.log('CLICK RIGA PROJ ************')
|
console.log('CLICK RIGA PROJ ************')
|
||||||
|
|
||||||
if (!this.sel) {
|
// if (!this.sel) {
|
||||||
|
|
||||||
if (!this.inEdit) {
|
if (!this.inEdit) {
|
||||||
|
console.log('entrato...')
|
||||||
// this.attivaEdit = true
|
// this.attivaEdit = true
|
||||||
this.$emit('deselectAllRowstodo', null, false)
|
this.$emit('deselectAllRowstodo', null, false)
|
||||||
this.$emit('deselectAllRowsproj', this.itemproject, true)
|
this.$emit('deselectAllRowsproj', this.itemproject, true)
|
||||||
@@ -207,7 +234,6 @@ export default class SingleProject extends Vue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public selectRiga() {
|
public selectRiga() {
|
||||||
// console.log('selectRiga', this.itemproject.descr)
|
// console.log('selectRiga', this.itemproject.descr)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import { SingleTodo } from '../SingleTodo'
|
|||||||
const namespace: string = 'Todos'
|
const namespace: string = 'Todos'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
name: 'CTodo',
|
||||||
components: { SingleTodo },
|
components: { SingleTodo },
|
||||||
filters: {
|
filters: {
|
||||||
capitalize(value) {
|
capitalize(value) {
|
||||||
@@ -22,6 +23,7 @@ const namespace: string = 'Todos'
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
export default class CTodo extends Vue {
|
export default class CTodo extends Vue {
|
||||||
public $q: any
|
public $q: any
|
||||||
public todotop: string = ''
|
public todotop: string = ''
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { Watch } from 'vue-property-decorator'
|
import { Watch } from 'vue-property-decorator'
|
||||||
import { GlobalStore } from '../../store/Modules'
|
import { GlobalStore } from '../../store/Modules'
|
||||||
|
import Component from 'vue-class-component'
|
||||||
|
|
||||||
export default class MenuOne extends Vue {
|
export default class MenuOne extends Vue {
|
||||||
|
|
||||||
|
|||||||
@@ -3,25 +3,37 @@
|
|||||||
<q-list class="rounded-borders text-primary">
|
<q-list class="rounded-borders text-primary">
|
||||||
<template v-for="(parent, index) in getmenu">
|
<template v-for="(parent, index) in getmenu">
|
||||||
<!--<div class="q-list-header">{{replaceUnderlineToSpace(index)}}</div>-->
|
<!--<div class="q-list-header">{{replaceUnderlineToSpace(index)}}</div>-->
|
||||||
<div v-for="item in parent.routes">
|
<div v-for="myitemmenu in parent.routes">
|
||||||
<div v-if="item.routes2">
|
<div v-if="!!myitemmenu.routes2">
|
||||||
<q-expansion-item
|
<q-expansion-item
|
||||||
:header-inset-level="item.level_parent"
|
:header-inset-level="myitemmenu.level_parent"
|
||||||
:content-inset-level="item.level_parent"
|
:content-inset-level="myitemmenu.level_parent"
|
||||||
:label="getLabelByItem(item)"
|
:label="getLabelByItem(myitemmenu)"
|
||||||
:icon="item.materialIcon"
|
:icon="myitemmenu.materialIcon"
|
||||||
expand-icon-class="my-menu-separat"
|
expand-icon-class="my-menu-separat"
|
||||||
header-class="my-menu"
|
header-class="my-menu"
|
||||||
active-class="my-menu-active"
|
active-class="my-menu-active">
|
||||||
>
|
|
||||||
|
|
||||||
<q-expansion-item v-for="(child2, index) in item.routes2" :to="child2.route" :key="index"
|
<q-expansion-item v-for="(child2, index) in myitemmenu.routes2"
|
||||||
:header-inset-level="item.level_child"
|
:key="index"
|
||||||
|
:to="child2.route"
|
||||||
|
:header-inset-level="myitemmenu.level_child"
|
||||||
:duration="300"
|
:duration="300"
|
||||||
expand-icon="map"
|
expand-icon="map"
|
||||||
active-class="my-menu-active"
|
active-class="my-menu-active"
|
||||||
class="item item-link drawer-closer cursor-pointer my-menu"
|
class="item item-link drawer-closer cursor-pointer my-menu"
|
||||||
:label="getLabelByItem(child2)">
|
:label="getLabelByItem(child2)">
|
||||||
|
<q-expansion-item v-if="!!child2.routes2" v-for="(child3, index) in child2.routes2"
|
||||||
|
:key="index"
|
||||||
|
:to="child3.route"
|
||||||
|
:header-inset-level="myitemmenu.level_child"
|
||||||
|
:duration="300"
|
||||||
|
expand-icon="map"
|
||||||
|
active-class="my-menu-active"
|
||||||
|
class="item item-link drawer-closer cursor-pointer my-menu"
|
||||||
|
:label="getLabelByItem(child3)">
|
||||||
|
</q-expansion-item>
|
||||||
|
|
||||||
</q-expansion-item>
|
</q-expansion-item>
|
||||||
|
|
||||||
</q-expansion-item>
|
</q-expansion-item>
|
||||||
@@ -33,24 +45,20 @@
|
|||||||
clickable
|
clickable
|
||||||
v-ripple
|
v-ripple
|
||||||
exact
|
exact
|
||||||
:to="item.route"
|
:to="myitemmenu.route"
|
||||||
active-class="my-menu-active"
|
active-class="my-menu-active">
|
||||||
>
|
|
||||||
<q-item-section avatar class="my-menu-icon">
|
<q-item-section avatar class="my-menu-icon">
|
||||||
<q-icon :name="item.materialIcon"/>
|
<q-icon :name="myitemmenu.materialIcon"/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
<q-item-section class="my-menu">
|
<q-item-section class="my-menu">
|
||||||
{{$t(item.name)}}
|
{{$t(myitemmenu.name)}}
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</q-slide-transition>
|
</q-slide-transition>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--<q-separator spaced />-->
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
|||||||
@@ -62,18 +62,23 @@ export interface IGlobalState {
|
|||||||
|
|
||||||
export interface IMenuList {
|
export interface IMenuList {
|
||||||
nametranslate: string
|
nametranslate: string
|
||||||
description: string
|
description?: string
|
||||||
idelem?: string
|
idelem?: string
|
||||||
icon?: string
|
icon?: string
|
||||||
|
name?: string
|
||||||
|
level_parent?: number
|
||||||
|
level_child?: number
|
||||||
|
urlroute?: string
|
||||||
|
routes2?: IMenuList[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IListRoutes {
|
export interface IListRoutes {
|
||||||
route: string
|
route: string
|
||||||
faIcon: string
|
faIcon?: string
|
||||||
materialIcon: string
|
materialIcon?: string
|
||||||
name: string
|
name: string
|
||||||
text?: string
|
text?: string
|
||||||
routes2: []
|
routes2?: IListRoutes[]
|
||||||
level_parent: number
|
level_parent?: number
|
||||||
level_child: number
|
level_child?: number
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export interface IProject {
|
|||||||
enableExpiring?: boolean
|
enableExpiring?: boolean
|
||||||
id_prev?: string
|
id_prev?: string
|
||||||
modified?: boolean
|
modified?: boolean
|
||||||
|
favourite?: number
|
||||||
pos?: number
|
pos?: number
|
||||||
order?: number
|
order?: number
|
||||||
live_url?: string
|
live_url?: string
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ export const routesList: IMyRouteConfig[] = [
|
|||||||
// component: () => import('@/root/malaga/malaga.vue')
|
// component: () => import('@/root/malaga/malaga.vue')
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
path: '/projects/:idProj',
|
path: '/' + RouteNames.projects + '/:idProj',
|
||||||
name: RouteNames.projects,
|
name: RouteNames.projects,
|
||||||
component: () => import('@/views/projects/proj-list/proj-list.vue'),
|
component: () => import('@/views/projects/proj-list/proj-list.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
@@ -109,7 +109,7 @@ export const routesList: IMyRouteConfig[] = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/myprojects/:idProj',
|
path: '/' + RouteNames.myprojects + '/:idProj',
|
||||||
name: RouteNames.myprojects,
|
name: RouteNames.myprojects,
|
||||||
component: () => import('@/views/projects/proj-list/proj-list.vue'),
|
component: () => import('@/views/projects/proj-list/proj-list.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
@@ -119,7 +119,32 @@ export const routesList: IMyRouteConfig[] = [
|
|||||||
}
|
}
|
||||||
// middleware: [auth]
|
// middleware: [auth]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/' + RouteNames.listprojects,
|
||||||
|
name: RouteNames.listprojects,
|
||||||
|
component: () => import('@/views/projects/proj-list/proj-list.vue'),
|
||||||
|
meta: {
|
||||||
|
requiresAuth: true,
|
||||||
|
async asyncData() {
|
||||||
|
await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true })
|
||||||
}
|
}
|
||||||
|
// middleware: [auth]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/' + RouteNames.favouriteprojects,
|
||||||
|
name: RouteNames.favouriteprojects,
|
||||||
|
component: () => import('@/views/projects/proj-list/proj-list.vue'),
|
||||||
|
meta: {
|
||||||
|
requiresAuth: true,
|
||||||
|
async asyncData() {
|
||||||
|
await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true })
|
||||||
|
}
|
||||||
|
// middleware: [auth]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -2,5 +2,8 @@ export const RouteNames = {
|
|||||||
home: 'home',
|
home: 'home',
|
||||||
login: 'login',
|
login: 'login',
|
||||||
projects: 'projects',
|
projects: 'projects',
|
||||||
myprojects: 'myprojects'
|
projectsshared: 'projectsShared',
|
||||||
|
myprojects: 'myprojects',
|
||||||
|
favouriteprojects: 'favproj',
|
||||||
|
listprojects: 'listproj'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,8 +127,10 @@ const messages = {
|
|||||||
Admin: 'Admin',
|
Admin: 'Admin',
|
||||||
Test1: 'Test1',
|
Test1: 'Test1',
|
||||||
Test2: 'Test2',
|
Test2: 'Test2',
|
||||||
Projects: 'Progetti Condivisi',
|
projects: 'Progetti',
|
||||||
MyProjects: 'Progetti Personali'
|
favproj: 'Favoriti',
|
||||||
|
projectsShared: 'Condivisi',
|
||||||
|
myprojects: 'Personali'
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
authentication: {
|
authentication: {
|
||||||
@@ -388,8 +390,10 @@ const messages = {
|
|||||||
Admin: 'Administración',
|
Admin: 'Administración',
|
||||||
Test1: 'Test1',
|
Test1: 'Test1',
|
||||||
Test2: 'Test2',
|
Test2: 'Test2',
|
||||||
Projects: 'Proyectos Compartidos',
|
projects: 'Proyectos',
|
||||||
MyProjects: 'Proyectos Personales',
|
favproj: 'Favoritos',
|
||||||
|
projectsShared: 'Compartidos',
|
||||||
|
myprojects: 'Personales',
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
authentication: {
|
authentication: {
|
||||||
@@ -642,8 +646,10 @@ const messages = {
|
|||||||
Admin: 'Admin',
|
Admin: 'Admin',
|
||||||
Test1: 'Test1',
|
Test1: 'Test1',
|
||||||
Test2: 'Test2',
|
Test2: 'Test2',
|
||||||
Projects: 'Shared Projects',
|
projects: 'Projects',
|
||||||
MyProjects: 'Personal Projects',
|
favproj: 'Favorite',
|
||||||
|
projectsShared: 'Shared',
|
||||||
|
myprojects: 'Personals',
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
authentication: {
|
authentication: {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import * as ApiTables from '@src/store/Modules/ApiTables'
|
|||||||
import { GlobalStore, Projects, Todos, UserStore } from '@store'
|
import { GlobalStore, Projects, Todos, UserStore } from '@store'
|
||||||
import messages from '../../statics/i18n'
|
import messages from '../../statics/i18n'
|
||||||
import globalroutines from './../../globalroutines/index'
|
import globalroutines from './../../globalroutines/index'
|
||||||
|
import { RouteNames } from '@src/router/route-names'
|
||||||
|
|
||||||
let stateConnDefault = 'online'
|
let stateConnDefault = 'online'
|
||||||
|
|
||||||
@@ -72,7 +73,7 @@ async function getstateConnSaved() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function addRoute(myarr, values) {
|
function addRoute(myarr, values: IListRoutes) {
|
||||||
myarr.push(values)
|
myarr.push(values)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,73 +115,131 @@ namespace Getters {
|
|||||||
console.log('getmenu')
|
console.log('getmenu')
|
||||||
|
|
||||||
const arrlista = GlobalStore.state.listatodo
|
const arrlista = GlobalStore.state.listatodo
|
||||||
const lista = []
|
const lista: IListRoutes[] = []
|
||||||
|
|
||||||
arrlista.forEach((elem: IMenuList) => {
|
arrlista.forEach((elem: IMenuList) => {
|
||||||
const item = {
|
const item: IListRoutes = {
|
||||||
faIcon: 'fa fa-list-alt',
|
faIcon: 'fa fa-list-alt',
|
||||||
materialIcon: 'todo',
|
materialIcon: 'todo',
|
||||||
name: 'pages.' + elem.description,
|
name: 'pages.' + elem.description,
|
||||||
route: '/todo/' + elem.nametranslate
|
route: '/todo/' + elem.nametranslate
|
||||||
}
|
}
|
||||||
lista.push(item)
|
lista.push(item)
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const arrlistaprojtutti = Projects.getters.listaprojects(false)
|
const SHOW_PROJINTHEMENU = false
|
||||||
const arrlistaprojmiei = Projects.getters.listaprojects(true)
|
|
||||||
const listaprojectstutti = []
|
|
||||||
const listaprojectsmiei = []
|
|
||||||
|
|
||||||
for (const elem of arrlistaprojtutti) {
|
let arrlistafavourite = []
|
||||||
const item = {
|
let arrlistaprojtutti = []
|
||||||
materialIcon: 'next_week',
|
let arrlistaprojmiei = []
|
||||||
name: elem.nametranslate,
|
if (SHOW_PROJINTHEMENU) {
|
||||||
text: elem.description,
|
arrlistaprojtutti = Projects.getters.listaprojects(false, false)
|
||||||
route: tools.getUrlByTipoProj(false) + elem.idelem
|
arrlistaprojmiei = Projects.getters.listaprojects(true, false)
|
||||||
}
|
arrlistafavourite = Projects.getters.listaprojects(false, true)
|
||||||
listaprojectstutti.push(item)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const elem of arrlistaprojmiei) {
|
const arrMenu: IMenuList[] = []
|
||||||
const item = {
|
|
||||||
materialIcon: 'next_week',
|
// PROGETTI -> FAVORITI :
|
||||||
name: elem.nametranslate,
|
if (arrlistafavourite.length > 0) {
|
||||||
text: elem.description,
|
arrMenu.push({
|
||||||
route: tools.getUrlByTipoProj(true) + elem.idelem
|
icon: '',
|
||||||
}
|
nametranslate: 'pages.' + RouteNames.favouriteprojects,
|
||||||
listaprojectsmiei.push(item)
|
urlroute: RouteNames.favouriteprojects,
|
||||||
|
level_parent: 0.0,
|
||||||
|
level_child: 0.5,
|
||||||
|
routes2: arrlistafavourite,
|
||||||
|
idelem: ''
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PROGETTI -> CONDIVISI :
|
||||||
|
arrMenu.push({
|
||||||
|
icon: '',
|
||||||
|
nametranslate: 'pages.' + RouteNames.projectsshared,
|
||||||
|
urlroute: 'projects',
|
||||||
|
level_parent: 0.0,
|
||||||
|
level_child: 0.5,
|
||||||
|
routes2: arrlistaprojtutti,
|
||||||
|
idelem: process.env.PROJECT_ID_MAIN
|
||||||
|
})
|
||||||
|
|
||||||
|
// PROGETTI -> PERSONALI :
|
||||||
|
arrMenu.push({
|
||||||
|
icon: '',
|
||||||
|
nametranslate: 'pages.' + RouteNames.myprojects,
|
||||||
|
urlroute: 'myprojects',
|
||||||
|
level_parent: 0.0,
|
||||||
|
level_child: 0.5,
|
||||||
|
routes2: arrlistaprojmiei,
|
||||||
|
idelem: process.env.PROJECT_ID_MAIN
|
||||||
|
})
|
||||||
|
|
||||||
|
const listaprojectMenu: IListRoutes[] = tools.convertMenuListInListRoutes(arrMenu)
|
||||||
|
|
||||||
const arrroutes: IListRoutes[] = []
|
const arrroutes: IListRoutes[] = []
|
||||||
|
|
||||||
addRoute(arrroutes, { route: '/', faIcon: 'fa fa-home', materialIcon: 'home', name: 'pages.home' }) // HOME
|
addRoute(arrroutes, { route: '/', faIcon: 'fa fa-home', materialIcon: 'home', name: 'pages.home' }) // HOME
|
||||||
|
|
||||||
if (!process.env.PROD) {
|
if (!process.env.PROD) {
|
||||||
addRoute(arrroutes, { route: '/todo', faIcon: 'fa fa-list-alt', materialIcon: 'format_list_numbered', name: 'pages.Todo',
|
addRoute(arrroutes, {
|
||||||
|
route: '/todo', faIcon: 'fa fa-list-alt', materialIcon: 'format_list_numbered', name: 'pages.Todo',
|
||||||
routes2: lista,
|
routes2: lista,
|
||||||
level_parent: 0.5,
|
level_parent: 0.5,
|
||||||
level_child: 0.5
|
level_child: 0.5
|
||||||
})
|
})
|
||||||
|
|
||||||
addRoute(arrroutes,{ route: tools.getUrlByTipoProj(false) + process.env.PROJECT_ID_MAIN, faIcon: 'fa fa-list-alt', materialIcon: 'next_week', name: 'pages.Projects',
|
|
||||||
routes2: listaprojectstutti,
|
|
||||||
level_parent: 0,
|
|
||||||
level_child: 0.5
|
|
||||||
})
|
|
||||||
|
|
||||||
addRoute(arrroutes,{ route: tools.getUrlByTipoProj(true) + process.env.PROJECT_ID_MAIN, faIcon: 'fa fa-list-alt', materialIcon: 'next_week', name: 'pages.MyProjects',
|
|
||||||
routes2: listaprojectsmiei,
|
|
||||||
level_parent: 0,
|
|
||||||
level_child: 0.5
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const myarrproj = []
|
||||||
|
for (const myitem of listaprojectMenu) {
|
||||||
|
addRoute(myarrproj, myitem)
|
||||||
|
}
|
||||||
|
|
||||||
|
addRoute(arrroutes, {
|
||||||
|
route: '', faIcon: 'fa fa-list-alt', materialIcon: 'next_week', name: 'pages.projects',
|
||||||
|
routes2: myarrproj,
|
||||||
|
level_parent: 0.0,
|
||||||
|
level_child: 0.5
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log('arrroutes', arrroutes)
|
||||||
|
console.log('listaprojectMenu', listaprojectMenu)
|
||||||
|
// console.log('arrlistaprojmiei', arrlistaprojmiei)
|
||||||
|
|
||||||
if (UserStore.state.isAdmin) {
|
if (UserStore.state.isAdmin) {
|
||||||
addRoute(arrroutes, { route: '/category', faIcon: 'fa fa-list-alt', materialIcon: 'category', name: 'pages.Category' })
|
addRoute(arrroutes, {
|
||||||
addRoute(arrroutes, { route: '/admin/cfgserv', faIcon: 'fa fa-database', materialIcon: 'event_seat', name: 'pages.Admin' })
|
route: '/category',
|
||||||
addRoute(arrroutes, { route: '/admin/testp1/par1', faIcon: 'fa fa-database', materialIcon: 'restore', name: 'pages.Test1' })
|
faIcon: 'fa fa-list-alt',
|
||||||
addRoute(arrroutes, { route: '/admin/testp1/par2', faIcon: 'fa fa-database', materialIcon: 'restore', name: 'pages.Test2' })
|
materialIcon: 'category',
|
||||||
|
name: 'pages.Category',
|
||||||
|
level_parent: 0.0,
|
||||||
|
level_child: 0.0
|
||||||
|
})
|
||||||
|
addRoute(arrroutes, {
|
||||||
|
route: '/admin/cfgserv',
|
||||||
|
faIcon: 'fa fa-database',
|
||||||
|
materialIcon: 'event_seat',
|
||||||
|
name: 'pages.Admin',
|
||||||
|
level_parent: 0.0,
|
||||||
|
level_child: 0.0
|
||||||
|
})
|
||||||
|
addRoute(arrroutes, {
|
||||||
|
route: '/admin/testp1/par1',
|
||||||
|
faIcon: 'fa fa-database',
|
||||||
|
materialIcon: 'restore',
|
||||||
|
name: 'pages.Test1',
|
||||||
|
level_parent: 0.0,
|
||||||
|
level_child: 0.0
|
||||||
|
})
|
||||||
|
addRoute(arrroutes, {
|
||||||
|
route: '/admin/testp1/par2',
|
||||||
|
faIcon: 'fa fa-database',
|
||||||
|
materialIcon: 'restore',
|
||||||
|
name: 'pages.Test2',
|
||||||
|
level_parent: 0.0,
|
||||||
|
level_child: 0.0
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
state.menulinks = {
|
state.menulinks = {
|
||||||
@@ -192,7 +251,7 @@ namespace Getters {
|
|||||||
|
|
||||||
return state.menulinks
|
return state.menulinks
|
||||||
|
|
||||||
console.log('state.menulinks', state.menulinks)
|
// console.log('state.menulinks', state.menulinks)
|
||||||
|
|
||||||
}, 'getmenu')
|
}, 'getmenu')
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ const stateglob: IProjectsState = {
|
|||||||
const listFieldsToChange: string [] = ['descr', 'longdescr', 'hoursplanned', 'hoursworked', 'id_parent', 'statusproj',
|
const listFieldsToChange: string [] = ['descr', 'longdescr', 'hoursplanned', 'hoursworked', 'id_parent', 'statusproj',
|
||||||
'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progressCalc', 'live_url', 'test_url',
|
'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progressCalc', 'live_url', 'test_url',
|
||||||
'begin_development', 'begin_test', 'actualphase', 'totalphases', 'hoursweeky_plannedtowork', 'endwork_estimate',
|
'begin_development', 'begin_test', 'actualphase', 'totalphases', 'hoursweeky_plannedtowork', 'endwork_estimate',
|
||||||
'privacyread', 'privacywrite', 'id_main_project', 'typeproj']
|
'privacyread', 'privacywrite', 'id_main_project', 'typeproj', 'favourite']
|
||||||
|
|
||||||
const listFieldsUpdateCalculation: string [] = ['hoursplanned', 'hoursworked', 'progressCalc', 'endwork_estimate']
|
const listFieldsUpdateCalculation: string [] = ['hoursplanned', 'hoursworked', 'progressCalc', 'endwork_estimate']
|
||||||
|
|
||||||
@@ -51,11 +51,11 @@ function updateDataCalculated(projout, projin) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function getproj(projects, idproj, miei: boolean) {
|
function getproj(projects, idproj, miei: boolean, favourite: boolean) {
|
||||||
if (miei) {
|
if (miei && !favourite) {
|
||||||
return tools.mapSort(projects.filter((proj) => (proj.id_parent === idproj) && proj.userId === UserStore.state.userId))
|
return tools.mapSort(projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId === UserStore.state.userId)))
|
||||||
} else {
|
} else {
|
||||||
return tools.mapSort(projects.filter((proj) => (proj.id_parent === idproj) && proj.userId !== UserStore.state.userId ))
|
return tools.mapSort(projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId !== UserStore.state.userId)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,21 +104,21 @@ namespace Getters {
|
|||||||
// console.log('projs_dacompletare', miei)
|
// console.log('projs_dacompletare', miei)
|
||||||
if (state.projects) {
|
if (state.projects) {
|
||||||
// console.log('state.projects', state.projects)
|
// console.log('state.projects', state.projects)
|
||||||
return getproj(state.projects, id_parent, miei)
|
return getproj(state.projects, id_parent, miei, false)
|
||||||
} else {
|
} else {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
}, 'projs_dacompletare')
|
}, 'projs_dacompletare')
|
||||||
|
|
||||||
const listaprojects = b.read((state: IProjectsState) => (miei: boolean): IMenuList[] => {
|
const listaprojects = b.read((state: IProjectsState) => (miei: boolean, favourite: boolean): IMenuList[] => {
|
||||||
if (state.projects) {
|
if (state.projects) {
|
||||||
// console.log('state.projects', state.projects)
|
// console.log('state.projects', state.projects)
|
||||||
const listaproj = getproj(state.projects, process.env.PROJECT_ID_MAIN, miei)
|
const listaproj = getproj(state.projects, process.env.PROJECT_ID_MAIN, miei, favourite)
|
||||||
const myarr: IMenuList[] = []
|
const myarr: IMenuList[] = []
|
||||||
for (const proj of listaproj) {
|
for (const proj of listaproj) {
|
||||||
myarr.push({ nametranslate: '', description: proj.descr, idelem: proj._id })
|
myarr.push({ nametranslate: '', description: proj.descr, idelem: proj._id })
|
||||||
}
|
}
|
||||||
console.log(' myarr', myarr, listaproj)
|
// console.log(' myarr', myarr, listaproj)
|
||||||
return myarr
|
return myarr
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -146,7 +146,7 @@ namespace Getters {
|
|||||||
}, 'getRecordById')
|
}, 'getRecordById')
|
||||||
|
|
||||||
const getifCanISeeProj = b.read((state: IProjectsState) => (proj: IProject): boolean => {
|
const getifCanISeeProj = b.read((state: IProjectsState) => (proj: IProject): boolean => {
|
||||||
if (proj === undefined)
|
if ((proj === undefined) || (proj === null))
|
||||||
return false
|
return false
|
||||||
|
|
||||||
if (!!UserStore.state) {
|
if (!!UserStore.state) {
|
||||||
@@ -164,7 +164,7 @@ namespace Getters {
|
|||||||
}, 'getifCanISeeProj')
|
}, 'getifCanISeeProj')
|
||||||
|
|
||||||
const CanIModifyPanelPrivacy = b.read((state: IProjectsState) => (proj: IProject): boolean => {
|
const CanIModifyPanelPrivacy = b.read((state: IProjectsState) => (proj: IProject): boolean => {
|
||||||
if (proj === undefined)
|
if ((proj === undefined) || (proj === null))
|
||||||
return false
|
return false
|
||||||
|
|
||||||
if (!!UserStore) {
|
if (!!UserStore) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import globalroutines from './../../globalroutines/index'
|
|||||||
import { costanti } from './costanti'
|
import { costanti } from './costanti'
|
||||||
import { translation } from './translation'
|
import { translation } from './translation'
|
||||||
import Quasar, { date } from 'quasar'
|
import Quasar, { date } from 'quasar'
|
||||||
import { IProject, ITodo, Privacy } from '@src/model'
|
import { IListRoutes, IMenuList, IProject, ITodo, Privacy } from '@src/model'
|
||||||
import * as ApiTables from '@src/store/Modules/ApiTables'
|
import * as ApiTables from '@src/store/Modules/ApiTables'
|
||||||
import translate from '@src/globalroutines/util'
|
import translate from '@src/globalroutines/util'
|
||||||
|
|
||||||
@@ -27,6 +27,7 @@ export const tools = {
|
|||||||
|
|
||||||
FIRST_PROJ: '5ca8f17fcd40dc5012f53346',
|
FIRST_PROJ: '5ca8f17fcd40dc5012f53346',
|
||||||
|
|
||||||
|
WHAT_NOTHING: 0,
|
||||||
WHAT_TODO: 1,
|
WHAT_TODO: 1,
|
||||||
WHAT_PROJECT: 2,
|
WHAT_PROJECT: 2,
|
||||||
|
|
||||||
@@ -1375,11 +1376,35 @@ export const tools = {
|
|||||||
return idproj === process.env.PROJECT_ID_MAIN
|
return idproj === process.env.PROJECT_ID_MAIN
|
||||||
},
|
},
|
||||||
|
|
||||||
getUrlByTipoProj(miei) {
|
getUrlByTipoProj(miei, name?: string) {
|
||||||
|
if (!!name)
|
||||||
|
return '/' + name + '/'
|
||||||
|
|
||||||
if (miei)
|
if (miei)
|
||||||
return '/myprojects/'
|
return '/myprojects/'
|
||||||
else
|
else
|
||||||
return '/projects/'
|
return '/projects/'
|
||||||
|
},
|
||||||
|
|
||||||
|
convertMenuListInListRoutes(arrlista: IMenuList[]) {
|
||||||
|
const lista = []
|
||||||
|
if (arrlista === undefined)
|
||||||
|
return lista
|
||||||
|
for (const elem of arrlista) {
|
||||||
|
const item: IListRoutes = {
|
||||||
|
faIcon: 'fa fa-list-alt',
|
||||||
|
materialIcon: elem.icon,
|
||||||
|
name: elem.nametranslate,
|
||||||
|
text: elem.description,
|
||||||
|
route: tools.getUrlByTipoProj(false, elem.urlroute) + elem.idelem,
|
||||||
|
routes2: tools.convertMenuListInListRoutes(elem.routes2),
|
||||||
|
level_parent: elem.level_parent,
|
||||||
|
level_child: elem.level_child
|
||||||
|
|
||||||
|
}
|
||||||
|
lista.push(item)
|
||||||
|
}
|
||||||
|
return lista
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ export default class ProjList extends Vue {
|
|||||||
@Watch('$route.name')
|
@Watch('$route.name')
|
||||||
public changename() {
|
public changename() {
|
||||||
console.log('tools.getUrlByTipoProj(this.areMyProjects)', tools.getUrlByTipoProj(this.areMyProjects))
|
console.log('tools.getUrlByTipoProj(this.areMyProjects)', tools.getUrlByTipoProj(this.areMyProjects))
|
||||||
|
this.changeparent()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Watch('$route.params.idProj')
|
@Watch('$route.params.idProj')
|
||||||
@@ -403,6 +404,8 @@ export default class ProjList extends Vue {
|
|||||||
this.idsel = id
|
this.idsel = id
|
||||||
this.whatisSel = tools.WHAT_PROJECT
|
this.whatisSel = tools.WHAT_PROJECT
|
||||||
this.itemselproj = Projects.getters.getRecordById(this.idsel)
|
this.itemselproj = Projects.getters.getRecordById(this.idsel)
|
||||||
|
if ((this.itemselproj === undefined || this.itemselproj === null))
|
||||||
|
this.whatisSel = tools.WHAT_NOTHING
|
||||||
}
|
}
|
||||||
public setitemsel(item: ITodo) {
|
public setitemsel(item: ITodo) {
|
||||||
this.whatisSel = tools.WHAT_TODO
|
this.whatisSel = tools.WHAT_TODO
|
||||||
@@ -422,7 +425,7 @@ export default class ProjList extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public deselectAllRowstodo(item: ITodo, check, onlythis: boolean = false) {
|
public deselectAllRowstodo(item: ITodo, check, onlythis: boolean = false) {
|
||||||
// console.log('PROJ-LIST deselectAllRowstodo : ', item)
|
console.log('PROJ-LIST deselectAllRowstodo : ', item)
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
|
||||||
@@ -452,7 +455,7 @@ export default class ProjList extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public deselectAllRowsproj(item: IProject, check, onlythis: boolean = false) {
|
public deselectAllRowsproj(item: IProject, check, onlythis: boolean = false) {
|
||||||
// console.log('deselectAllRowsproj: ', item)
|
console.log('deselectAllRowsproj: ', item)
|
||||||
|
|
||||||
for (const i in this.$refs.singleproject) {
|
for (const i in this.$refs.singleproject) {
|
||||||
|
|
||||||
@@ -478,7 +481,11 @@ export default class ProjList extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public updateclasses() {
|
public updateclasses() {
|
||||||
|
if (!!!this.itemselproj) {
|
||||||
this.colProgress = tools.getProgressColor(this.itemselproj.progressCalc)
|
this.colProgress = tools.getProgressColor(this.itemselproj.progressCalc)
|
||||||
|
} else {
|
||||||
|
this.whatisSel = tools.WHAT_NOTHING
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public checkUpdate() {
|
public checkUpdate() {
|
||||||
|
|||||||
@@ -116,6 +116,14 @@
|
|||||||
<!--ID = {{itemselproj._id}}-->
|
<!--ID = {{itemselproj._id}}-->
|
||||||
<div class="q-pa-xs clMain">
|
<div class="q-pa-xs clMain">
|
||||||
<div class="flex-container clMain">
|
<div class="flex-container clMain">
|
||||||
|
<!--<q-rating-->
|
||||||
|
<!--v-model="itemselproj.favourite"-->
|
||||||
|
<!--class="flex-item flex-icon"-->
|
||||||
|
<!--size="2em"-->
|
||||||
|
<!--:max="1"-->
|
||||||
|
<!--color="primary">-->
|
||||||
|
|
||||||
|
<!--</q-rating>-->
|
||||||
<q-icon class="flex-item flex-icon" name="format_align_center"/>
|
<q-icon class="flex-item flex-icon" name="format_align_center"/>
|
||||||
<div class="flex-item projecttitle shadow-4">
|
<div class="flex-item projecttitle shadow-4">
|
||||||
{{itemselproj.descr}}
|
{{itemselproj.descr}}
|
||||||
|
|||||||
Reference in New Issue
Block a user