diff --git a/package.json b/package.json
index 82eb3c9..eaca40a 100755
--- a/package.json
+++ b/package.json
@@ -28,7 +28,7 @@
"dependencies": {
"@babel/plugin-transform-runtime": "^7.4.0",
"@babel/runtime": "^7.0.0",
- "@quasar/extras": "^1.1.0",
+ "@quasar/extras": "^1.1.2",
"@types/vuelidate": "^0.7.0",
"@vue/eslint-config-standard": "^4.0.0",
"acorn": "^6.0.0",
@@ -50,7 +50,7 @@
"normalize.css": "^8.0.0",
"npm": "^6.9.0",
"nprogress": "^0.2.0",
- "quasar": "^1.0.0-beta.17",
+ "quasar": "^1.0.0-beta.21",
"quasar-extras": "^2.0.8",
"register-service-worker": "^1.0.0",
"vee-validate": "^2.1.2",
@@ -85,7 +85,7 @@
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-syntax-import-meta": "^7.2.0",
"@babel/preset-env": "^7.4.2",
- "@quasar/app": "^1.0.0-beta.18",
+ "@quasar/app": "^1.0.0-beta.22",
"@quasar/quasar-app-extension-typescript": "^1.0.0-alpha.11",
"@types/dotenv": "^4.0.3",
"@types/jest": "^23.1.4",
diff --git a/quasar.conf.js b/quasar.conf.js
index a2dd8d7..4b46c4e 100644
--- a/quasar.conf.js
+++ b/quasar.conf.js
@@ -116,7 +116,7 @@ module.exports = function (ctx) {
},
devServer: {
https: false,
- port: 8080,
+ port: 8082,
open: false // opens browser window automatically
},
// framework: 'all' --- includes everything; for dev only!
diff --git a/src-pwa/custom-service-worker.js b/src-pwa/custom-service-worker.js
index ab44698..94d4337 100644
--- a/src-pwa/custom-service-worker.js
+++ b/src-pwa/custom-service-worker.js
@@ -6,7 +6,7 @@
// Questo è il swSrc
-console.log(' [ VER-0.0.61 ] _---------________------ PAO: this is my custom service worker');
+console.log(' [ VER-0.0.63 ] _---------________------ PAO: this is my custom service worker');
importScripts('../statics/js/idb.js');
importScripts('../statics/js/storage.js');
diff --git a/src/components/CDate/CDate.scss b/src/components/CDate/CDate.scss
index 929046c..4d5ffed 100644
--- a/src/components/CDate/CDate.scss
+++ b/src/components/CDate/CDate.scss
@@ -1,20 +1,5 @@
$heightBtn: 100%;
-.flex-item{
- // background-color: #d5e2eb;
- display: flex;
- padding: 2px;
- margin: 2px;
- margin-left: 3px;
- margin-right: 3px;
- color: #000;
- font-size: 1rem;
- height: $heightBtn;
- line-height: $heightBtn;
- vertical-align: middle;
- //flex: 0 0 100%;
-}
-
.progress-item {
margin: 1px;
padding: 2px;
diff --git a/src/components/CProgress/CProgress.scss b/src/components/CProgress/CProgress.scss
index 331af6a..6141abf 100644
--- a/src/components/CProgress/CProgress.scss
+++ b/src/components/CProgress/CProgress.scss
@@ -1,20 +1,5 @@
$heightBtn: 100%;
-.flex-item{
- // background-color: #d5e2eb;
- display: flex;
- padding: 2px;
- margin: 2px;
- margin-left: 3px;
- margin-right: 3px;
- color: #000;
- font-size: 1rem;
- height: $heightBtn;
- line-height: $heightBtn;
- vertical-align: middle;
- //flex: 0 0 100%;
-}
-
.progress-item {
margin: 1px;
padding: 2px;
diff --git a/src/components/Header/Header.ts b/src/components/Header/Header.ts
index 0546c8a..1f986d8 100644
--- a/src/components/Header/Header.ts
+++ b/src/components/Header/Header.ts
@@ -9,7 +9,7 @@ import { GlobalStore, UserStore } from '@modules'
import { Watch } from 'vue-property-decorator'
import { tools } from '../../store/Modules/tools'
-import Quasar from 'quasar'
+import Quasar, { Screen } from 'quasar'
@Component({
name: 'Header',
@@ -43,6 +43,14 @@ export default class Header extends Vue {
// { label: 'German', icon: 'fa-flag-de', value: 'de', image: '../statics/images/de.png', short: 'DE' },
]
+ get getappname(){
+ if (Screen.width < 400) {
+ return this.$t('msg.myAppNameShort')
+ } else {
+ return this.$t('msg.myAppName')
+ }
+ }
+
get conn_changed() {
return GlobalStore.state.stateConnection
}
diff --git a/src/components/Header/Header.vue b/src/components/Header/Header.vue
index 4aaa312..9799886 100644
--- a/src/components/Header/Header.vue
+++ b/src/components/Header/Header.vue
@@ -39,7 +39,7 @@
- {{$t('msg.myAppName')}}
+ {{getappname}}
+
diff --git a/src/model/index.ts b/src/model/index.ts
index 738de7a..0f2cd7c 100644
--- a/src/model/index.ts
+++ b/src/model/index.ts
@@ -8,3 +8,5 @@ export * from './key-value'
export * from './Categories'
export * from './Todos'
export * from './Projects'
+
+export * from './Calendar'
diff --git a/src/statics/i18n.js b/src/statics/i18n.js
index ac007ae..6b2c7b8 100644
--- a/src/statics/i18n.js
+++ b/src/statics/i18n.js
@@ -8,6 +8,7 @@ const msgglobal = {
no: 'No',
delete: 'Elimina',
cancel: 'Annulla',
+ today: 'Oggi',
msg: {
titledeleteTask: 'Elimina Task',
deleteTask: "Vuoi Eliminare {mytodo}?"
@@ -147,6 +148,20 @@ const msgglobal = {
themecolor: 'Tema Colore',
themebgcolor: 'Tema Colore Sfondo'
},
+ cal: {
+ starttime: 'Dalle',
+ endtime: 'alle',
+ duration: 'Durata',
+ hours: 'Orario',
+ where: 'Dove',
+ teacher: 'Insegnante',
+ enterdate: 'Inserisci data',
+ details: 'Dettagli',
+ infoextra: 'Date e Ora Extra:',
+ alldayevent: 'Tutto il giorno',
+ eventstartdatetime: 'Data e Ora Inizio Evento',
+ enterEndDateTime: 'Data e Ora Fine Evento'
+ }
},
'es': {
dialog: {
@@ -155,6 +170,7 @@ const msgglobal = {
no: 'No',
delete: 'Borrar',
cancel: 'Cancelar',
+ today: 'Hoy',
msg: {
titledeleteTask: 'Borrar Tarea',
deleteTask: 'Quieres borrar {mytodo}?'
@@ -288,6 +304,20 @@ const msgglobal = {
themecolor: 'Tema Colores',
themebgcolor: 'Tema Colores Fondo'
},
+ cal: {
+ starttime: 'Inicio',
+ endtime: 'fin',
+ duration: 'Duración',
+ hours: 'Tiempo',
+ where: 'Donde',
+ teacher: 'Maestro',
+ enterdate: 'Ingresar la fecha',
+ details: 'Detalles',
+ infoextra: 'Fecha y Hora Extras:',
+ alldayevent: 'Todo el dia',
+ eventstartdatetime: 'Evento de inicio de fecha y hora',
+ enterEndDateTime: 'Fecha y hora del evento final'
+ }
},
'enUs': {
dialog: {
@@ -296,6 +326,7 @@ const msgglobal = {
no: 'No',
delete: 'Delete',
cancel: 'Cancel',
+ today: 'Today',
msg: {
titledeleteTask: 'Delete Task',
deleteTask: 'Delete Task {mytodo}?'
@@ -429,6 +460,20 @@ const msgglobal = {
themecolor: 'Theme Color',
themebgcolor: 'Theme Color Background'
},
+ cal: {
+ starttime: 'From',
+ endtime: 'to',
+ duration: 'Duration',
+ hours: 'Hours',
+ where: 'Where',
+ teacher: 'Teacher',
+ enterdate: 'Enter date',
+ details: 'Details',
+ infoextra: 'Extra Info DateTime',
+ alldayevent: 'All-Day event',
+ eventstartdatetime: 'Event start date and time',
+ enterEndDateTime: 'Event end date and time'
+ }
},
};
diff --git a/src/store/Modules/GlobalStore.ts b/src/store/Modules/GlobalStore.ts
index c9ca8ec..11b8ca5 100644
--- a/src/store/Modules/GlobalStore.ts
+++ b/src/store/Modules/GlobalStore.ts
@@ -16,6 +16,7 @@ import { GlobalStore, Projects, Todos, UserStore } from '@store'
import messages from '../../statics/i18n'
import globalroutines from './../../globalroutines/index'
+
import { cfgrouter } from '../../router/route-config'
let stateConnDefault = 'online'
diff --git a/src/store/Modules/Projects.ts b/src/store/Modules/Projects.ts
index d67a03f..ec94b3b 100644
--- a/src/store/Modules/Projects.ts
+++ b/src/store/Modules/Projects.ts
@@ -56,13 +56,14 @@ function updateDataCalculated(projout, projin) {
}
function getproj(projects, idproj, tipoproj: string) {
+ console.log('getproj', tipoproj)
if (tipoproj === RouteNames.myprojects)
- return tools.mapSort(projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId === UserStore.state.userId) && (proj.privacyread === Privacy.onlyme)))
+ return projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId === UserStore.state.userId) && (proj.privacyread === Privacy.onlyme))
else if (tipoproj === RouteNames.projectsshared)
- return tools.mapSort(projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId === UserStore.state.userId) && (proj.privacyread !== Privacy.onlyme)))
+ return projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId === UserStore.state.userId) && (proj.privacyread !== Privacy.onlyme))
else if (tipoproj === RouteNames.projectsall)
- return tools.mapSort(projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId !== UserStore.state.userId) ))
+ return projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId !== UserStore.state.userId) )
}
namespace Getters {
@@ -110,7 +111,7 @@ namespace Getters {
}, 'getRecordEmpty')
const projs_dacompletare = b.read((state: IProjectsState) => (id_parent: string, tipoproj: string): IProject[] => {
- // console.log('projs_dacompletare', miei)
+ // console.log('projs_dacompletare')
if (state.projects) {
// console.log('state.projects', state.projects)
return getproj(state.projects, id_parent, tipoproj)
@@ -121,7 +122,7 @@ namespace Getters {
const listaprojects = b.read((state: IProjectsState) => (tipoproj: string): IMenuList[] => {
if (state.projects) {
- // console.log('state.projects', state.projects)
+ console.log('listaprojects')
const listaproj = getproj(state.projects, process.env.PROJECT_ID_MAIN, tipoproj)
const myarr: IMenuList[] = []
for (const proj of listaproj) {
diff --git a/src/store/Modules/Todos.ts b/src/store/Modules/Todos.ts
index 21aed3e..d0bab4c 100644
--- a/src/store/Modules/Todos.ts
+++ b/src/store/Modules/Todos.ts
@@ -92,30 +92,41 @@ namespace Getters {
return objtodo
}, 'getRecordEmpty')
const items_dacompletare = b.read((stateparam: ITodosState) => (cat: string): ITodo[] => {
+ // console.log('items_dacompletare')
const indcat = getindexbycategory(cat)
+ let arrout = []
// console.log('items_dacompletare', 'indcat', indcat, stateparam.todos[indcat])
if (stateparam.todos[indcat]) {
- return stateparam.todos[indcat].filter((todo) => todo.statustodo !== tools.Status.COMPLETED)
+ arrout = stateparam.todos[indcat].filter((todo) => todo.statustodo !== tools.Status.COMPLETED)
} else {
- return []
+ arrout = []
}
+
+ // return tools.mapSort(arrout)
+ return arrout
}, 'items_dacompletare')
const todos_completati = b.read((stateparam: ITodosState) => (cat: string): ITodo[] => {
+ console.log('todos_completati')
const indcat = getindexbycategory(cat)
if (stateparam.todos[indcat]) {
+ let arrout = []
if (stateparam.showtype === costanti.ShowTypeTask.SHOW_LAST_N_COMPLETED) { // Show only the first N completed
- return stateparam.todos[indcat].filter((todo) => todo.statustodo === tools.Status.COMPLETED).slice(0, stateparam.visuLastCompleted)
+ arrout = stateparam.todos[indcat].filter((todo) => todo.statustodo === tools.Status.COMPLETED).slice(0, stateparam.visuLastCompleted)
}
else if (stateparam.showtype === costanti.ShowTypeTask.SHOW_ONLY_TOCOMPLETE) {
- return []
+ arrout = []
}
else if (stateparam.showtype === costanti.ShowTypeTask.SHOW_ALL) {
- return stateparam.todos[indcat].filter((todo) => todo.statustodo === tools.Status.COMPLETED)
+ arrout = stateparam.todos[indcat].filter((todo) => todo.statustodo === tools.Status.COMPLETED)
}
else {
- return []
+ arrout = []
}
+
+ return arrout
+ // return tools.mapSort(arrout)
+
} else {
return []
}
diff --git a/src/store/Modules/index.ts b/src/store/Modules/index.ts
index d6241a2..941c962 100644
--- a/src/store/Modules/index.ts
+++ b/src/store/Modules/index.ts
@@ -3,3 +3,4 @@ export {default as GlobalStore} from './GlobalStore'
export {default as UserStore} from './UserStore'
export {default as Todos} from './Todos'
export {default as Projects} from './Projects'
+export {default as CalendarStore} from './Store/calendar/CalendarStore'
diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts
index e3f185f..ae81236 100644
--- a/src/store/Modules/tools.ts
+++ b/src/store/Modules/tools.ts
@@ -2,7 +2,7 @@ import { Todos, Projects, UserStore } from '@store'
import globalroutines from './../../globalroutines/index'
import { costanti } from './costanti'
import { translation } from './translation'
-import Quasar, { date } from 'quasar'
+import Quasar, { date, Screen } from 'quasar'
import { IListRoutes, IMenuList, IProject, ITodo, Privacy } from '@src/model'
import * as ApiTables from '@src/store/Modules/ApiTables'
import translate from '@src/globalroutines/util'
@@ -65,6 +65,14 @@ export const tools = {
COMPLETED: 10
},
+ DateFormatter: new Intl.DateTimeFormat(this.getLocale() || void 0, {
+ weekday: 'long',
+ day: 'numeric',
+ month: 'long',
+ year: 'numeric'
+ // timeZone: 'UTC'
+ }),
+
selectPhase: {
it: [
{
@@ -285,6 +293,21 @@ export const tools = {
{
id: 10,
disable: false,
+ label: 'Modifica',
+ value: lists.MenuAction.EDIT,
+ icon: 'create'
+ },
+ {
+ id: 11,
+ disable: false,
+ label: 'Elimina',
+ value: lists.MenuAction.DELETE,
+ icon: 'delete',
+ checked: false
+ },
+ {
+ id: 12,
+ disable: false,
label: '',
value: lists.MenuAction.PROGRESS_BAR,
icon: 'rowing',
@@ -332,14 +355,6 @@ export const tools = {
value: lists.MenuAction.TOGGLE_EXPIRING,
icon: 'date_range',
checked: true
- },
- {
- id: 50,
- disable: false,
- label: 'Elimina',
- value: lists.MenuAction.DELETE,
- icon: 'delete',
- checked: false
}
],
es:
@@ -351,6 +366,21 @@ export const tools = {
value: lists.MenuAction.CUT,
icon: 'undo'
},
+ {
+ id: 7,
+ disable: false,
+ label: 'Editar',
+ value: lists.MenuAction.EDIT,
+ icon: 'create'
+ },
+ {
+ id: 8,
+ disable: false,
+ label: 'Borrar',
+ value: lists.MenuAction.DELETE,
+ icon: 'delete',
+ checked: false
+ },
{
id: 10,
disable: false,
@@ -401,14 +431,6 @@ export const tools = {
value: lists.MenuAction.TOGGLE_EXPIRING,
icon: 'date_range',
checked: true
- },
- {
- id: 50,
- disable: false,
- label: 'Borrar',
- value: lists.MenuAction.DELETE,
- icon: 'delete',
- checked: false
}
],
enUs:
@@ -420,6 +442,21 @@ export const tools = {
value: lists.MenuAction.CUT,
icon: 'undo'
},
+ {
+ id: 7,
+ disable: false,
+ label: 'Edit',
+ value: lists.MenuAction.EDIT,
+ icon: 'create'
+ },
+ {
+ id: 8,
+ disable: false,
+ label: 'Delete',
+ value: lists.MenuAction.DELETE,
+ icon: 'trash',
+ checked: false
+ },
{
id: 10,
disable: false,
@@ -470,14 +507,6 @@ export const tools = {
value: lists.MenuAction.TOGGLE_EXPIRING,
icon: 'date_range',
checked: true
- },
- {
- id: 50,
- disable: false,
- label: 'Delete',
- value: lists.MenuAction.DELETE,
- icon: 'trash',
- checked: false
}
]
}
@@ -489,21 +518,29 @@ export const tools = {
id: 5,
disable: false,
label: 'Taglia',
- value: 71, // CUT
+ value: lists.MenuAction.CUT,
icon: 'undo'
},
{
id: 10,
disable: false,
label: 'Modifica',
- value: 160, // EDIT
+ value: lists.MenuAction.EDIT,
icon: 'create'
},
+ {
+ id: 11,
+ disable: false,
+ label: 'Elimina',
+ value: lists.MenuAction.DELETE,
+ icon: 'delete',
+ checked: false
+ },
{
id: 40,
disable: false,
label: 'Imposta Scadenza',
- value: 101, // TOGGLE_EXPIRING
+ value: lists.MenuAction.TOGGLE_EXPIRING,
icon: 'date_range',
checked: true
},
@@ -524,14 +561,6 @@ export const tools = {
icon: 'format_color_fill',
checked: false,
arrlista: lists.selectTheme
- },
- {
- id: 50,
- disable: false,
- label: 'Elimina',
- value: 100, // DELETE
- icon: 'delete',
- checked: false
}
],
es:
@@ -540,21 +569,29 @@ export const tools = {
id: 5,
disable: false,
label: 'Cortar',
- value: 71, // CUT
+ value: lists.MenuAction.CUT,
icon: 'undo'
},
{
id: 10,
disable: false,
label: 'Editar',
- value: 160, // EDIT
+ value: lists.MenuAction.EDIT,
icon: 'create'
},
+ {
+ id: 11,
+ disable: false,
+ label: 'Borrar',
+ value: 100, // DELETE
+ icon: 'delete',
+ checked: false
+ },
{
id: 40,
disable: false,
label: 'Establecer expiración',
- value: 101, // TOGGLE_EXPIRING
+ value: lists.MenuAction.TOGGLE_EXPIRING,
icon: 'date_range',
checked: true
},
@@ -575,14 +612,6 @@ export const tools = {
icon: 'format_color_fill',
checked: false,
arrlista: lists.selectTheme
- },
- {
- id: 50,
- disable: false,
- label: 'Borrar',
- value: 100, // DELETE
- icon: 'delete',
- checked: false
}
],
enUs:
@@ -598,7 +627,7 @@ export const tools = {
id: 10,
disable: false,
label: 'Edit',
- value: 160, // EDIT
+ value: lists.MenuAction.EDIT,
icon: 'create'
},
{
@@ -1205,6 +1234,7 @@ export const tools = {
,
getLastListNotCompleted(nametable, cat, tipoproj: string) {
+ // console.log('getLastListNotCompleted')
// const module = tools.getModulesByTable(nametable)
let arr = []
if (nametable === 'projects')
@@ -1243,9 +1273,7 @@ export const tools = {
}
,
- showNotif(q
- :
- any, msg, data ?: INotify | null
+ showNotif(q: any, msg, data ?: INotify | null
) {
let myicon = data ? data.icon : 'ion-add'
if (!myicon) {
@@ -1394,7 +1422,8 @@ export const tools = {
,
mapSort(linkedList) {
- const sortedList = []
+ console.log('mapSort')
+ let sortedList = []
const map = new Map()
let currentId = null
@@ -1438,11 +1467,28 @@ export const tools = {
}
}
- // console.log('DOPO sortedList', sortedList);
+ // Now Order by Priority
+ if (!!sortedList) {
+ if (sortedList.length > 0) {
+ if (sortedList[0].priority !== undefined) {
+ const sortednew = []
+ let myarr = []
+ for (const priorelem of lists.selectPriority.it) {
+ const myprior = priorelem.value
+ myarr = sortedList.filter((item) => item.priority === myprior)
+ if (myarr !== undefined)
+ sortednew.push(...myarr)
+ }
+
+ sortedList = sortednew
+ }
+ }
+ }
+
+ // console.log('DOPO sortedList', sortedList)
return sortedList
- }
- ,
+ },
getProgressClassColor(progress) {
if (progress > 66) {
@@ -1509,6 +1555,13 @@ export const tools = {
return value.charAt(0).toUpperCase() + value.slice(1)
},
+ firstchars(value, numchars = 200) {
+ if (!value) {
+ return ''
+ }
+ return value.substring(0, numchars) + '...'
+ },
+
getDateNow() {
const mydate = new Date()
return mydate
@@ -1593,7 +1646,7 @@ export const tools = {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready
- .then(function (swreg) {
+ .then((swreg) => {
swreg.showNotification('Successfully subscribed!', options)
})
}
@@ -1633,12 +1686,16 @@ export const tools = {
}
navigator.serviceWorker.ready
- .then(function (swreg) {
+ .then((swreg) => {
swreg.showNotification('aaa', options)
})
}
},
+ getemailto(text) {
+ return 'mailto:' + text
+ },
+
askfornotification() {
tools.showNotif(this.$q, this.$t('notification.waitingconfirm'), { color: 'positive', icon: 'notifications' })
@@ -1653,5 +1710,129 @@ export const tools = {
}
})
+ },
+
+ heightgallery() {
+ if (Screen.width < 400) {
+ return '200px'
+ } else if (Screen.width < 600) {
+ return '300px'
+ } else {
+ return '500px'
+ }
+ },
+
+ myheight_imgtitle() {
+ if (Screen.width < 400) {
+ return '250'
+ } else if (Screen.width < 600) {
+ return '350'
+ } else {
+ return '350'
+ }
+ },
+
+ myheight_dialog() {
+ if (Screen.width < 400) {
+ return '350'
+ } else if (Screen.width < 600) {
+ return '400'
+ } else {
+ return '500'
+ }
+ },
+
+ styles_imgtitle() {
+ if (Screen.width < 400) {
+ return 'max-height: 250px'
+ } else {
+ return 'max-height: 350px'
+ }
+ },
+
+ /*
+
+
+ With srcset & sizes
+
+
+ */
+
+ getsizes() {
+ return '(max-width: 400px) 400w, ' +
+ '(min-width: 400px) and (max-width: 800px) 800w, ' +
+ '(min-width: 800px) and (max-width: 1200px) 1200w, ' +
+ '(min-width: 1200px) 1600w'
+ },
+
+ maxwidth_imgtitle() {
+ if (Screen.width < 400) {
+ return 'max-width: 250px'
+ } else {
+ return 'max-width: 350px'
+ }
+ },
+
+ mywidth_imgtitle() {
+ if (Screen.width < 400) {
+ return '250'
+ } else if (Screen.width < 600) {
+ return '350'
+ } else {
+ return '350'
+ }
+ },
+
+ mymargin_imgtitle() {
+ return 'auto'
+ },
+
+ showthumbnails() {
+ if (Screen.width < 400) {
+ return false
+ } else if (Screen.width < 600) {
+ return true
+ } else {
+ return true
+ }
+ },
+
+ padTime(val) {
+ val = Math.floor(val)
+ if (val < 10) {
+ return '0' + val
+ }
+ return val + ''
+ },
+
+ getLocale() {
+ return UserStore.state.lang
+ },
+
+ getDateStr(mydate) {
+ if (this.DateFormatter && this.getLocale()) {
+ const date = new Date(mydate)
+ return this.titleFormatter.format(date)
+ }
+ return ''
}
+
+// getLocale() {
+ // if (navigator.languages && navigator.languages.length > 0) {
+ // return navigator.languages[0]
+ // } else {
+ // return navigator.userLanguages || navigator.language || navigator.browserLanguages || 'it-IT'
+ // }
+ // }
}
diff --git a/src/views/projects/proj-list/proj-list.scss b/src/views/projects/proj-list/proj-list.scss
index 644d81d..b0dc147 100644
--- a/src/views/projects/proj-list/proj-list.scss
+++ b/src/views/projects/proj-list/proj-list.scss
@@ -95,20 +95,6 @@ $heightBtn: 100%;
flex: 1;
}
-.flex-item{
- // background-color: #d5e2eb;
- padding: 0px;
- margin: 1px;
- margin-left: 3px;
- margin-right: 3px;
- color: #000;
- font-size: 0.85rem;
- height: $heightBtn;
- line-height: $heightBtn;
- vertical-align: middle;
- //flex: 0 0 100%;
-}
-
.itemdescr{
font-size: 1rem;
flex: 1;
diff --git a/src/views/projects/proj-list/proj-list.ts b/src/views/projects/proj-list/proj-list.ts
index cf03552..5c32d76 100644
--- a/src/views/projects/proj-list/proj-list.ts
+++ b/src/views/projects/proj-list/proj-list.ts
@@ -38,6 +38,8 @@ const namespace: string = 'Projects'
export default class ProjList extends Vue {
public $q: any
public projbottom: string = ''
+ public prova: string = ''
+ public provatr: string = ''
public polling = null
public service: any
public scrollable = true
@@ -66,10 +68,10 @@ export default class ProjList extends Vue {
@Getter('projs_dacompletare', { namespace })
public projs_dacompletare: (state: IProjectsState, id_parent: string, tipoproj: string) => IProject[]
- @Watch('projs_dacompletare')
- public changeitems() {
- this.updateindexProj()
- }
+ // @Watch('projs_dacompletare')
+ // public changeitems() {
+ // this.updateindexProj()
+ // }
@Watch('$route.name')
public changename() {
@@ -99,6 +101,10 @@ export default class ProjList extends Vue {
// console.log('idproj', this.idProjAtt, 'params' , this.$route.params)
}
+ public keyDownArea(e) {
+ console.log('keyDownArea')
+ }
+
get classTitle() {
let cl = 'flex-item categorytitle shadow-4'
if (!!this.itemprojparent) {
@@ -400,6 +406,7 @@ export default class ProjList extends Vue {
}
public dbInsert() {
+ console.log('dbInsert')
const descr = this.projbottom.trim()
this.projbottom = ''
@@ -432,11 +439,13 @@ export default class ProjList extends Vue {
}
public getCompProjectById(id): SingleProject {
- console.log('this.$refs.singleproject', this.$refs.singleproject)
- for (const elem of this.$refs.singleproject) {
- // @ts-ignore
- if (elem.itemproject._id === id) {
- return elem
+ if (!!this.$refs.singleproject) {
+ console.log('this.$refs.singleproject', this.$refs.singleproject)
+ for (const elem of this.$refs.singleproject) {
+ // @ts-ignore
+ if (elem.itemproject._id === id) {
+ return elem
+ }
}
}
}
@@ -494,10 +503,32 @@ export default class ProjList extends Vue {
this.whatisSel = tools.WHAT_NOTHING
// console.log('readonly = true')
this.readonly = true
+
+ this.checkiftoenable()
}
public setitemsel(item: ITodo) {
- this.whatisSel = tools.WHAT_TODO
this.itemtodosel = item
+ if (item !== null)
+ this.whatisSel = tools.WHAT_TODO
+ else
+ this.whatisSel = tools.WHAT_NOTHING
+
+ this.checkiftoenable()
+ }
+
+ public checkiftoenable() {
+ if (this.whatisSel === tools.WHAT_NOTHING)
+ this.splitterModel = 100
+ else
+ this.splitterModel = 0
+ }
+
+ public setdeselectrow() {
+ console.log('setdeselectrow')
+ this.itemtodosel = null
+ this.itemselproj = null
+ this.whatisSel = tools.WHAT_NOTHING
+ this.checkiftoenable()
}
public cambiadata(value) {
@@ -542,9 +573,14 @@ export default class ProjList extends Vue {
}
}
- public deselectAllRowsproj(item: IProject, check, onlythis: boolean = false) {
+ public deselectAllRowsproj(item: IProject, check, onlythis: boolean = false, deselectRiga: boolean = false) {
// console.log('deselectAllRowsproj: ', item)
+ if (deselectRiga) {
+ this.setdeselectrow()
+ return
+ }
+
if (!!item && check) {
// This is the new selected
// console.log('readonly = false')
@@ -552,6 +588,9 @@ export default class ProjList extends Vue {
this.readonly = false
}
+ if (this.$refs.singleproject === undefined)
+ return
+
for (const i in this.$refs.singleproject) {
const contr = this.$refs.singleproject[i] as SingleProject
diff --git a/src/views/projects/proj-list/proj-list.vue b/src/views/projects/proj-list/proj-list.vue
index 374e4f3..ada8b29 100644
--- a/src/views/projects/proj-list/proj-list.vue
+++ b/src/views/projects/proj-list/proj-list.vue
@@ -100,12 +100,12 @@