Move Project
This commit is contained in:
@@ -6,11 +6,13 @@
|
|||||||
|
|
||||||
// Questo è il swSrc
|
// Questo è il swSrc
|
||||||
|
|
||||||
console.log(' [ VER-0.0.27 ] _---------________------ PAO: this is my custom service worker');
|
console.log(' [ VER-0.0.61 ] _---------________------ PAO: this is my custom service worker');
|
||||||
|
|
||||||
importScripts('../statics/js/idb.js');
|
importScripts('../statics/js/idb.js');
|
||||||
importScripts('../statics/js/storage.js');
|
importScripts('../statics/js/storage.js');
|
||||||
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.0.0/workbox-sw.js'); //++Todo: Replace with local workbox.js
|
importScripts('../statics/js/workbox-sw.js');
|
||||||
|
|
||||||
|
// importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.0.0/workbox-sw.js');
|
||||||
|
|
||||||
|
|
||||||
let port = 3000;
|
let port = 3000;
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ export default class SingleProject extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// console.log('focus()')
|
// console.log('focus()')
|
||||||
}, 500)
|
}, 400)
|
||||||
}
|
}
|
||||||
|
|
||||||
public getFocus(e) {
|
public getFocus(e) {
|
||||||
@@ -486,6 +486,12 @@ export default class SingleProject extends Vue {
|
|||||||
return await this.enableExpiring()
|
return await this.enableExpiring()
|
||||||
} else if (action === tools.MenuAction.EDIT) {
|
} else if (action === tools.MenuAction.EDIT) {
|
||||||
this.activeEdit()
|
this.activeEdit()
|
||||||
|
} else if (action === tools.MenuAction.CUT) {
|
||||||
|
const myaction = {
|
||||||
|
type: tools.MenuAction.CUT,
|
||||||
|
_id: this.itemproject._id
|
||||||
|
}
|
||||||
|
return await Projects.actions.ActionCutPaste(myaction)
|
||||||
} else if (action === 0) {
|
} else if (action === 0) {
|
||||||
this.deselectAndExitEdit()
|
this.deselectAndExitEdit()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,11 @@ import objectId from '@src/js/objectId'
|
|||||||
import { UserStore } from '@store'
|
import { UserStore } from '@store'
|
||||||
import { tools } from '@src/store/Modules/tools'
|
import { tools } from '@src/store/Modules/tools'
|
||||||
|
|
||||||
|
export interface IAction {
|
||||||
|
type: number
|
||||||
|
_id: any
|
||||||
|
}
|
||||||
|
|
||||||
export interface IProject {
|
export interface IProject {
|
||||||
_id?: any,
|
_id?: any,
|
||||||
userId?: string
|
userId?: string
|
||||||
@@ -43,6 +48,7 @@ export interface IProjectsState {
|
|||||||
projects: IProject[]
|
projects: IProject[]
|
||||||
insidePending: boolean
|
insidePending: boolean
|
||||||
visuLastCompleted: number
|
visuLastCompleted: number
|
||||||
|
action: IAction
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Privacy = {
|
export const Privacy = {
|
||||||
|
|||||||
@@ -246,6 +246,7 @@ const messages = {
|
|||||||
proj: {
|
proj: {
|
||||||
newproj: 'Titolo Progetto',
|
newproj: 'Titolo Progetto',
|
||||||
newsubproj: 'Titolo Sotto-Progetto',
|
newsubproj: 'Titolo Sotto-Progetto',
|
||||||
|
insertbottom: 'Inserisci Nuovo Project',
|
||||||
longdescr: 'Descrizione',
|
longdescr: 'Descrizione',
|
||||||
hoursplanned: 'Ore Preventivate',
|
hoursplanned: 'Ore Preventivate',
|
||||||
hoursadded: 'Ore Aggiuntive',
|
hoursadded: 'Ore Aggiuntive',
|
||||||
@@ -502,6 +503,7 @@ const messages = {
|
|||||||
proj: {
|
proj: {
|
||||||
newproj: 'Título Projecto',
|
newproj: 'Título Projecto',
|
||||||
newsubproj: 'Título Sub-Projecto',
|
newsubproj: 'Título Sub-Projecto',
|
||||||
|
insertbottom: 'Añadir nuevo Proyecto',
|
||||||
longdescr: 'Descripción',
|
longdescr: 'Descripción',
|
||||||
hoursplanned: 'Horas Estimadas',
|
hoursplanned: 'Horas Estimadas',
|
||||||
hoursadded: 'Horas Adicional',
|
hoursadded: 'Horas Adicional',
|
||||||
@@ -758,6 +760,7 @@ const messages = {
|
|||||||
proj: {
|
proj: {
|
||||||
newproj: 'Project Title',
|
newproj: 'Project Title',
|
||||||
newsubproj: 'SubProject Title',
|
newsubproj: 'SubProject Title',
|
||||||
|
insertbottom: 'Insert New Project',
|
||||||
longdescr: 'Description',
|
longdescr: 'Description',
|
||||||
hoursplanned: 'Estimated Hours',
|
hoursplanned: 'Estimated Hours',
|
||||||
hoursadded: 'Additional Hours',
|
hoursadded: 'Additional Hours',
|
||||||
|
|||||||
@@ -108,14 +108,22 @@ async function Sync_Execute(cmd, tablesync, nametab, method, item: ITodo, id, ms
|
|||||||
cmdSw = DB.CMD_SYNC
|
cmdSw = DB.CMD_SYNC
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// console.log('cmdSw', cmdSw)
|
||||||
|
|
||||||
|
// if ('serviceWorker' in navigator) {
|
||||||
|
// console.log('serviceWorker PRESENTE')
|
||||||
|
// } else {
|
||||||
|
// console.log('serviceWorker NON PRESENTE !')
|
||||||
|
// }
|
||||||
|
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
return await navigator.serviceWorker.ready
|
return await navigator.serviceWorker.ready
|
||||||
.then((sw) => {
|
.then((sw) => {
|
||||||
// console.log('---------------------- navigator.serviceWorker.ready')
|
// console.log('---------------------- navigator.serviceWorker.ready')
|
||||||
|
|
||||||
return globalroutines(null, 'write', tablesync, item, id)
|
return globalroutines(null, 'write', tablesync, item, id)
|
||||||
.then((id) => {
|
.then((ris) => {
|
||||||
// console.log('id', id)
|
console.log('ris write:', ris)
|
||||||
const sep = '|'
|
const sep = '|'
|
||||||
|
|
||||||
const multiparams = cmdSw + sep + tablesync + sep + nametab + sep + method + sep + UserStore.state.x_auth_token + sep + UserStore.state.lang
|
const multiparams = cmdSw + sep + tablesync + sep + nametab + sep + method + sep + UserStore.state.x_auth_token + sep + UserStore.state.lang
|
||||||
@@ -145,6 +153,9 @@ async function Sync_Execute(cmd, tablesync, nametab, method, item: ITodo, id, ms
|
|||||||
console.error('Errore in globalroutines', tablesync, nametab, err)
|
console.error('Errore in globalroutines', tablesync, nametab, err)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error('Errore catch in globalroutines write', tablesync, nametab, err)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -408,6 +419,7 @@ export async function table_ModifyRecord(nametable, myitem, listFieldsToChange,
|
|||||||
tools.notifyarraychanged(miorec)
|
tools.notifyarraychanged(miorec)
|
||||||
|
|
||||||
// 2) Modify on IndexedDb
|
// 2) Modify on IndexedDb
|
||||||
|
console.log('// 2) Modify on IndexedDb', miorec)
|
||||||
return globalroutines(null, 'write', nametable, miorec)
|
return globalroutines(null, 'write', nametable, miorec)
|
||||||
.then((ris) => {
|
.then((ris) => {
|
||||||
|
|
||||||
|
|||||||
@@ -181,15 +181,12 @@ namespace Getters {
|
|||||||
|
|
||||||
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) {
|
addRoute(arrroutes, {
|
||||||
addRoute(arrroutes, {
|
route: '/todo', faIcon: 'fa fa-list-alt', materialIcon: 'format_list_numbered', name: 'pages.Todo',
|
||||||
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
|
})
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const myarrproj = []
|
const myarrproj = []
|
||||||
for (const myitem of listaprojectMenu) {
|
for (const myitem of listaprojectMenu) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { IProject, IProjectsState, IDrag, IMenuList } from 'model'
|
import { IProject, IProjectsState, IDrag, IMenuList, IAction } from 'model'
|
||||||
import { Privacy } from '@src/model'
|
import { Privacy } from '@src/model'
|
||||||
import { storeBuilder } from './Store/Store'
|
import { storeBuilder } from './Store/Store'
|
||||||
|
|
||||||
@@ -18,7 +18,11 @@ const stateglob: IProjectsState = {
|
|||||||
showtype: costanti.ShowTypeTask.SHOW_LAST_N_COMPLETED,
|
showtype: costanti.ShowTypeTask.SHOW_LAST_N_COMPLETED,
|
||||||
projects: [],
|
projects: [],
|
||||||
insidePending: false,
|
insidePending: false,
|
||||||
visuLastCompleted: 10
|
visuLastCompleted: 10,
|
||||||
|
action: {
|
||||||
|
type: 0,
|
||||||
|
_id: ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const listFieldsToChange: string [] = ['descr', 'longdescr', 'hoursplanned', 'hoursworked', 'id_parent', 'statusproj',
|
const listFieldsToChange: string [] = ['descr', 'longdescr', 'hoursplanned', 'hoursworked', 'id_parent', 'statusproj',
|
||||||
@@ -94,7 +98,7 @@ namespace Getters {
|
|||||||
begin_development: tools.getDateNull(),
|
begin_development: tools.getDateNull(),
|
||||||
begin_test: tools.getDateNull(),
|
begin_test: tools.getDateNull(),
|
||||||
hoursweeky_plannedtowork: 0,
|
hoursweeky_plannedtowork: 0,
|
||||||
endwork_estimate: tools.getDateNull()
|
endwork_estimate: tools.getDateNull(),
|
||||||
}
|
}
|
||||||
|
|
||||||
return obj
|
return obj
|
||||||
@@ -240,10 +244,23 @@ namespace Mutations {
|
|||||||
ApiTables.removeitemfromarray(state.projects, ind)
|
ApiTables.removeitemfromarray(state.projects, ind)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function movemyitem(state: IProjectsState, { myitemorig, myitemdest } ) {
|
||||||
|
const indorig = tools.getIndexById(state.projects, myitemorig._id)
|
||||||
|
|
||||||
|
// console.log('myitemorig', myitemorig, 'indorig', indorig)
|
||||||
|
// console.log('myitemdest', myitemdest)
|
||||||
|
|
||||||
|
state.projects.splice(indorig, 1)
|
||||||
|
state.projects.push(myitemdest)
|
||||||
|
|
||||||
|
await Actions.actions.modify({ myitem: myitemdest, field: 'id_parent' })
|
||||||
|
}
|
||||||
|
|
||||||
export const mutations = {
|
export const mutations = {
|
||||||
deletemyitem: b.commit(deletemyitem),
|
deletemyitem: b.commit(deletemyitem),
|
||||||
createNewItem: b.commit(createNewItem),
|
createNewItem: b.commit(createNewItem),
|
||||||
updateProject: b.commit(updateProject)
|
updateProject: b.commit(updateProject),
|
||||||
|
movemyitem: b.commit(movemyitem)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -380,12 +397,43 @@ namespace Actions {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function ActionCutPaste(context, action: IAction) {
|
||||||
|
|
||||||
|
if (action.type === tools.MenuAction.CUT)
|
||||||
|
stateglob.action = action
|
||||||
|
else if (action.type === tools.MenuAction.PASTE) {
|
||||||
|
if (stateglob.action.type === tools.MenuAction.CUT) {
|
||||||
|
|
||||||
|
// Change id_parent
|
||||||
|
const orig_obj = Getters.getters.getRecordById(stateglob.action._id)
|
||||||
|
const dest = Getters.getters.getRecordById(action._id)
|
||||||
|
|
||||||
|
// console.log('dest', dest)
|
||||||
|
|
||||||
|
const dest_obj = tools.jsonCopy(orig_obj)
|
||||||
|
|
||||||
|
if (!!dest_obj) {
|
||||||
|
dest_obj.id_parent = dest._id
|
||||||
|
dest_obj.id_main_project = dest.id_main_project
|
||||||
|
dest_obj.modified = true
|
||||||
|
dest_obj.id_prev = null
|
||||||
|
|
||||||
|
await Mutations.mutations.movemyitem({ myitemorig: orig_obj, myitemdest: dest_obj })
|
||||||
|
}
|
||||||
|
|
||||||
|
stateglob.action.type = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
export const actions = {
|
export const actions = {
|
||||||
dbLoad: b.dispatch(dbLoad),
|
dbLoad: b.dispatch(dbLoad),
|
||||||
swapElems: b.dispatch(swapElems),
|
swapElems: b.dispatch(swapElems),
|
||||||
deleteItem: b.dispatch(deleteItem),
|
deleteItem: b.dispatch(deleteItem),
|
||||||
dbInsert: b.dispatch(dbInsert),
|
dbInsert: b.dispatch(dbInsert),
|
||||||
modify: b.dispatch(modify)
|
modify: b.dispatch(modify),
|
||||||
|
ActionCutPaste: b.dispatch(ActionCutPaste)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ export const tools = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
MenuAction: {
|
MenuAction: {
|
||||||
|
CUT: 71,
|
||||||
|
PASTE: 72,
|
||||||
DELETE: 100,
|
DELETE: 100,
|
||||||
TOGGLE_EXPIRING: 101,
|
TOGGLE_EXPIRING: 101,
|
||||||
COMPLETED: 110,
|
COMPLETED: 110,
|
||||||
@@ -480,6 +482,12 @@ export const tools = {
|
|||||||
|
|
||||||
menuPopupProj: {
|
menuPopupProj: {
|
||||||
it: [
|
it: [
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
label: 'Taglia',
|
||||||
|
value: 71, // CUT
|
||||||
|
icon: 'undo'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 10,
|
id: 10,
|
||||||
label: 'Modifica',
|
label: 'Modifica',
|
||||||
@@ -503,6 +511,12 @@ export const tools = {
|
|||||||
],
|
],
|
||||||
es:
|
es:
|
||||||
[
|
[
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
label: 'Cortar',
|
||||||
|
value: 71, // CUT
|
||||||
|
icon: 'undo'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 10,
|
id: 10,
|
||||||
label: 'Editar',
|
label: 'Editar',
|
||||||
@@ -526,6 +540,12 @@ export const tools = {
|
|||||||
],
|
],
|
||||||
enUs:
|
enUs:
|
||||||
[
|
[
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
label: 'Cut',
|
||||||
|
value: 71, // CUT
|
||||||
|
icon: 'undo'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 10,
|
id: 10,
|
||||||
label: 'Edit',
|
label: 'Edit',
|
||||||
@@ -582,14 +602,23 @@ export const tools = {
|
|||||||
|
|
||||||
menuPopupConfigProject: {
|
menuPopupConfigProject: {
|
||||||
it: [
|
it: [
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
disable: false,
|
||||||
|
label: translation.it.action.paste,
|
||||||
|
value: 72, // Action.PASTE
|
||||||
|
icon: 'file_copy'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
|
disable: false,
|
||||||
label: translation.it.proj.newsubproj,
|
label: translation.it.proj.newsubproj,
|
||||||
value: 200, // ADD_PROJECT
|
value: 200, // ADD_PROJECT
|
||||||
icon: 'next_week'
|
icon: 'next_week'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 10,
|
id: 10,
|
||||||
|
disable: false,
|
||||||
label: translation.it.task.showtask,
|
label: translation.it.task.showtask,
|
||||||
value: 150, // SHOW_TASK
|
value: 150, // SHOW_TASK
|
||||||
icon: 'rowing'
|
icon: 'rowing'
|
||||||
@@ -597,14 +626,23 @@ export const tools = {
|
|||||||
],
|
],
|
||||||
es:
|
es:
|
||||||
[
|
[
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
disable: false,
|
||||||
|
label: translation.es.action.paste,
|
||||||
|
value: 72, // Action.PASTE
|
||||||
|
icon: 'file_copy'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
|
disable: false,
|
||||||
label: translation.es.proj.newsubproj,
|
label: translation.es.proj.newsubproj,
|
||||||
value: 200, // ADD_PROJECT
|
value: 200, // ADD_PROJECT
|
||||||
icon: 'next_week'
|
icon: 'next_week'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 10,
|
id: 10,
|
||||||
|
disable: false,
|
||||||
label: translation.es.task.showtask,
|
label: translation.es.task.showtask,
|
||||||
value: 150,
|
value: 150,
|
||||||
icon: 'rowing'
|
icon: 'rowing'
|
||||||
@@ -612,14 +650,23 @@ export const tools = {
|
|||||||
],
|
],
|
||||||
enUs:
|
enUs:
|
||||||
[
|
[
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
disable: false,
|
||||||
|
label: translation.enUs.action.paste,
|
||||||
|
value: 72, // Action.PASTE
|
||||||
|
icon: 'file_copy'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
label: translation.it.proj.newsubproj,
|
disable: false,
|
||||||
|
label: translation.enUs.proj.newsubproj,
|
||||||
value: 200, // ADD_PROJECT
|
value: 200, // ADD_PROJECT
|
||||||
icon: 'next_week'
|
icon: 'next_week'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 10,
|
id: 10,
|
||||||
|
disable: false,
|
||||||
label: translation.enUs.task.showtask,
|
label: translation.enUs.task.showtask,
|
||||||
value: 150,
|
value: 150,
|
||||||
icon: 'rowing'
|
icon: 'rowing'
|
||||||
@@ -629,8 +676,16 @@ export const tools = {
|
|||||||
|
|
||||||
menuPopupConfigMAINProject: {
|
menuPopupConfigMAINProject: {
|
||||||
it: [
|
it: [
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
disable: false,
|
||||||
|
label: translation.it.action.paste,
|
||||||
|
value: 72, // Action.PASTE
|
||||||
|
icon: 'file_copy'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
|
disable: false,
|
||||||
label: translation.it.proj.newproj,
|
label: translation.it.proj.newproj,
|
||||||
value: 200, // ADD_PROJECT
|
value: 200, // ADD_PROJECT
|
||||||
icon: 'next_week'
|
icon: 'next_week'
|
||||||
@@ -638,8 +693,16 @@ export const tools = {
|
|||||||
],
|
],
|
||||||
es:
|
es:
|
||||||
[
|
[
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
disable: false,
|
||||||
|
label: translation.es.action.paste,
|
||||||
|
value: 72, // Action.PASTE
|
||||||
|
icon: 'file_copy'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
|
disable: false,
|
||||||
label: translation.es.proj.newproj,
|
label: translation.es.proj.newproj,
|
||||||
value: 200, // ADD_PROJECT
|
value: 200, // ADD_PROJECT
|
||||||
icon: 'next_week'
|
icon: 'next_week'
|
||||||
@@ -647,9 +710,17 @@ export const tools = {
|
|||||||
],
|
],
|
||||||
enUs:
|
enUs:
|
||||||
[
|
[
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
disable: false,
|
||||||
|
label: translation.enUs.action.paste,
|
||||||
|
value: 72, // Action.PASTE
|
||||||
|
icon: 'file_copy'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
label: translation.it.proj.newproj,
|
disable: false,
|
||||||
|
label: translation.enUs.proj.newproj,
|
||||||
value: 200, // ADD_PROJECT
|
value: 200, // ADD_PROJECT
|
||||||
icon: 'next_week'
|
icon: 'next_week'
|
||||||
}
|
}
|
||||||
@@ -660,6 +731,7 @@ export const tools = {
|
|||||||
it: [
|
it: [
|
||||||
{
|
{
|
||||||
id: 10,
|
id: 10,
|
||||||
|
disable: false,
|
||||||
label: 'Mostra gli ultimi N completati',
|
label: 'Mostra gli ultimi N completati',
|
||||||
value: costanti.ShowTypeTask.SHOW_LAST_N_COMPLETED,
|
value: costanti.ShowTypeTask.SHOW_LAST_N_COMPLETED,
|
||||||
icon: 'rowing',
|
icon: 'rowing',
|
||||||
@@ -667,6 +739,7 @@ export const tools = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 20,
|
id: 20,
|
||||||
|
disable: false,
|
||||||
label: 'Compiti da Completare',
|
label: 'Compiti da Completare',
|
||||||
value: costanti.ShowTypeTask.SHOW_ONLY_TOCOMPLETE,
|
value: costanti.ShowTypeTask.SHOW_ONLY_TOCOMPLETE,
|
||||||
icon: 'rowing',
|
icon: 'rowing',
|
||||||
@@ -674,6 +747,7 @@ export const tools = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 30,
|
id: 30,
|
||||||
|
disable: false,
|
||||||
label: 'Tutti i compiti',
|
label: 'Tutti i compiti',
|
||||||
value: costanti.ShowTypeTask.SHOW_ALL,
|
value: costanti.ShowTypeTask.SHOW_ALL,
|
||||||
icon: 'check_circle',
|
icon: 'check_circle',
|
||||||
@@ -684,6 +758,7 @@ export const tools = {
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
id: 10,
|
id: 10,
|
||||||
|
disable: false,
|
||||||
label: 'Mostrar los ultimos N completados',
|
label: 'Mostrar los ultimos N completados',
|
||||||
value: costanti.ShowTypeTask.SHOW_LAST_N_COMPLETED,
|
value: costanti.ShowTypeTask.SHOW_LAST_N_COMPLETED,
|
||||||
icon: 'rowing',
|
icon: 'rowing',
|
||||||
@@ -691,6 +766,7 @@ export const tools = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 20,
|
id: 20,
|
||||||
|
disable: false,
|
||||||
label: 'Tareas para completar',
|
label: 'Tareas para completar',
|
||||||
value: costanti.ShowTypeTask.SHOW_ONLY_TOCOMPLETE,
|
value: costanti.ShowTypeTask.SHOW_ONLY_TOCOMPLETE,
|
||||||
icon: 'rowing',
|
icon: 'rowing',
|
||||||
@@ -698,6 +774,7 @@ export const tools = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 30,
|
id: 30,
|
||||||
|
disable: false,
|
||||||
label: 'Todos las Tareas',
|
label: 'Todos las Tareas',
|
||||||
value: costanti.ShowTypeTask.SHOW_ALL,
|
value: costanti.ShowTypeTask.SHOW_ALL,
|
||||||
icon: 'check_circle',
|
icon: 'check_circle',
|
||||||
@@ -708,6 +785,7 @@ export const tools = {
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
id: 10,
|
id: 10,
|
||||||
|
disable: false,
|
||||||
label: 'Show last N Completed',
|
label: 'Show last N Completed',
|
||||||
value: costanti.ShowTypeTask.SHOW_LAST_N_COMPLETED,
|
value: costanti.ShowTypeTask.SHOW_LAST_N_COMPLETED,
|
||||||
icon: 'rowing',
|
icon: 'rowing',
|
||||||
@@ -715,6 +793,7 @@ export const tools = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 20,
|
id: 20,
|
||||||
|
disable: false,
|
||||||
label: 'Task to complete',
|
label: 'Task to complete',
|
||||||
value: costanti.ShowTypeTask.SHOW_ONLY_TOCOMPLETE,
|
value: costanti.ShowTypeTask.SHOW_ONLY_TOCOMPLETE,
|
||||||
icon: 'rowing',
|
icon: 'rowing',
|
||||||
@@ -722,6 +801,7 @@ export const tools = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 30,
|
id: 30,
|
||||||
|
disable: false,
|
||||||
label: 'All Tasks',
|
label: 'All Tasks',
|
||||||
value: costanti.ShowTypeTask.SHOW_ALL,
|
value: costanti.ShowTypeTask.SHOW_ALL,
|
||||||
icon: 'check_circle',
|
icon: 'check_circle',
|
||||||
@@ -1405,6 +1485,6 @@ export const tools = {
|
|||||||
lista.push(item)
|
lista.push(item)
|
||||||
}
|
}
|
||||||
return lista
|
return lista
|
||||||
}
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ export const translation = {
|
|||||||
task: {
|
task: {
|
||||||
showtask: 'Mostra Task',
|
showtask: 'Mostra Task',
|
||||||
},
|
},
|
||||||
|
action: {
|
||||||
|
paste: 'Incolla'
|
||||||
|
},
|
||||||
end: ''
|
end: ''
|
||||||
},
|
},
|
||||||
es: {
|
es: {
|
||||||
@@ -31,6 +34,9 @@ export const translation = {
|
|||||||
task: {
|
task: {
|
||||||
showtask: 'Mostrar Tarea',
|
showtask: 'Mostrar Tarea',
|
||||||
},
|
},
|
||||||
|
action: {
|
||||||
|
paste: 'Pegar'
|
||||||
|
},
|
||||||
end: ''
|
end: ''
|
||||||
},
|
},
|
||||||
enUs: {
|
enUs: {
|
||||||
@@ -48,6 +54,9 @@ export const translation = {
|
|||||||
task: {
|
task: {
|
||||||
showtask: 'Show Task',
|
showtask: 'Show Task',
|
||||||
},
|
},
|
||||||
|
action: {
|
||||||
|
paste: 'Paste'
|
||||||
|
},
|
||||||
end: ''
|
end: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { Component, Watch } from 'vue-property-decorator'
|
import { Component, Watch } from 'vue-property-decorator'
|
||||||
|
|
||||||
import { IDrag, IProject, IProjectsState, ITodo, Privacy, TypeProj } from '../../../model/index'
|
import { IAction, IDrag, IProject, IProjectsState, ITodo, Privacy, TypeProj } from '../../../model/index'
|
||||||
import { SingleProject } from '../../../components/projects/SingleProject/index'
|
import { SingleProject } from '../../../components/projects/SingleProject/index'
|
||||||
import { CTodo } from '../../../components/todos/CTodo'
|
import { CTodo } from '../../../components/todos/CTodo'
|
||||||
|
|
||||||
@@ -164,10 +164,16 @@ export default class ProjList extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get menuPopupConfigProject() {
|
get menuPopupConfigProject() {
|
||||||
|
let mymenu = null
|
||||||
if (this.isMainProject)
|
if (this.isMainProject)
|
||||||
return tools.menuPopupConfigMAINProject[UserStore.state.lang]
|
mymenu = tools.menuPopupConfigMAINProject[UserStore.state.lang]
|
||||||
else
|
else
|
||||||
return tools.menuPopupConfigProject[UserStore.state.lang]
|
mymenu = tools.menuPopupConfigProject[UserStore.state.lang]
|
||||||
|
|
||||||
|
if (mymenu.length > 0)
|
||||||
|
mymenu[0].disable = !(Projects.state.action.type === tools.MenuAction.CUT)
|
||||||
|
|
||||||
|
return mymenu
|
||||||
}
|
}
|
||||||
|
|
||||||
get listOptionShowTask() {
|
get listOptionShowTask() {
|
||||||
@@ -370,6 +376,14 @@ export default class ProjList extends Vue {
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
elem.activeEdit()
|
elem.activeEdit()
|
||||||
// console.log('idnewelem', idnewelem, 'Elem Trovato', elem)
|
// console.log('idnewelem', idnewelem, 'Elem Trovato', elem)
|
||||||
|
} else if (action === tools.MenuAction.PASTE) {
|
||||||
|
|
||||||
|
const myaction: IAction = {
|
||||||
|
type: tools.MenuAction.PASTE,
|
||||||
|
_id: this.itemselproj._id
|
||||||
|
}
|
||||||
|
|
||||||
|
return await Projects.actions.ActionCutPaste(myaction)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
</q-list>
|
</q-list>
|
||||||
</q-menu>
|
</q-menu>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item v-else v-close-popup clickable :icon="field.icon"
|
<q-item v-else v-close-popup clickable :icon="field.icon" :disable="field.disable"
|
||||||
@click="clickMenuProjList(field.value)">
|
@click="clickMenuProjList(field.value)">
|
||||||
|
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
@@ -100,6 +100,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<q-separator></q-separator>
|
<q-separator></q-separator>
|
||||||
|
|
||||||
|
<q-input v-if="CanIModifyPanelPrivacy" ref="insertProjBottom" v-model="projbottom"
|
||||||
|
style="margin-left: 6px;"
|
||||||
|
color="blue-12"
|
||||||
|
:label="$t('proj.insertbottom')"
|
||||||
|
:after="[{icon: 'arrow_forward', content: true, handler () {}}]"
|
||||||
|
v-on:keyup.enter="dbInsert(false)">
|
||||||
|
|
||||||
|
</q-input>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<q-separator></q-separator>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--CanIModifyPanelPrivacy = {{CanIModifyPanelPrivacy}}<br>-->
|
<!--CanIModifyPanelPrivacy = {{CanIModifyPanelPrivacy}}<br>-->
|
||||||
<!--CanIModifyPanelPrivacySel = {{CanIModifyPanelPrivacySel}}<br>-->
|
<!--CanIModifyPanelPrivacySel = {{CanIModifyPanelPrivacySel}}<br>-->
|
||||||
<!--CanISeeProject = {{CanISeeProject}}<br>-->
|
<!--CanISeeProject = {{CanISeeProject}}<br>-->
|
||||||
|
|||||||
Reference in New Issue
Block a user