2018-11-17 20:32:28 +01:00
|
|
|
export const rescodes = {
|
2019-02-06 18:47:54 +01:00
|
|
|
EMPTY: 0,
|
2018-11-17 20:32:28 +01:00
|
|
|
CALLING: 10,
|
|
|
|
|
OK: 20,
|
|
|
|
|
ERR_GENERICO: -1,
|
2019-02-06 18:47:54 +01:00
|
|
|
ERR_SERVERFETCH: -2,
|
|
|
|
|
ERR_AUTHENTICATION: -5,
|
2018-11-17 20:32:28 +01:00
|
|
|
DUPLICATE_EMAIL_ID: 11000,
|
2019-01-05 20:11:41 +01:00
|
|
|
DUPLICATE_USERNAME_ID: 11100,
|
|
|
|
|
|
2019-02-02 20:13:06 +01:00
|
|
|
LIST_END: '10000000',
|
|
|
|
|
LIST_START: '0',
|
2019-01-27 19:09:48 +01:00
|
|
|
|
2019-02-22 10:23:00 +01:00
|
|
|
SERVKEY_VERS: 'vers',
|
|
|
|
|
|
2019-01-05 20:11:41 +01:00
|
|
|
localStorage: {
|
2019-02-09 18:04:49 +01:00
|
|
|
verified_email: 'vf',
|
2019-02-13 18:48:30 +01:00
|
|
|
wasAlreadySubOnDb: 'sb',
|
2019-01-30 01:05:31 +01:00
|
|
|
categorySel: 'cs',
|
2019-01-05 20:11:41 +01:00
|
|
|
isLogged: 'ilog',
|
|
|
|
|
expirationDate: 'expdate',
|
|
|
|
|
leftDrawerOpen: 'ldo',
|
|
|
|
|
userId: 'uid',
|
|
|
|
|
token: 'tk',
|
2019-02-16 02:01:17 +01:00
|
|
|
username: 'uname',
|
2019-02-20 11:53:56 +01:00
|
|
|
lang: 'lg'
|
2019-01-14 22:40:30 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
Todos: {
|
2019-01-27 19:09:48 +01:00
|
|
|
PRIORITY_HIGH: 2,
|
|
|
|
|
PRIORITY_NORMAL: 1,
|
|
|
|
|
PRIORITY_LOW: 0
|
|
|
|
|
},
|
|
|
|
|
|
2019-02-02 20:13:06 +01:00
|
|
|
DB: {
|
2019-02-04 03:09:15 +01:00
|
|
|
CMD_SYNC_TODOS: 'sync-todos',
|
|
|
|
|
CMD_SYNC_NEW_TODOS: 'sync-new-todos',
|
2019-02-02 20:13:06 +01:00
|
|
|
CMD_DELETE_TODOS: 'sync-delete-todos',
|
2019-02-02 21:16:49 +01:00
|
|
|
TABLE_SYNC_TODOS : 'sync_todos',
|
2019-02-04 03:09:15 +01:00
|
|
|
TABLE_SYNC_TODOS_PATCH : 'sync_todos_patch',
|
2019-02-02 21:16:49 +01:00
|
|
|
TABLE_DELETE_TODOS : 'delete_todos'
|
2019-02-02 20:13:06 +01:00
|
|
|
},
|
|
|
|
|
|
2019-01-27 19:09:48 +01:00
|
|
|
MenuAction: {
|
2019-01-28 03:13:04 +01:00
|
|
|
DELETE: 100,
|
2019-01-28 13:31:41 +01:00
|
|
|
TOGGLE_EXPIRING: 101,
|
2019-01-29 00:48:04 +01:00
|
|
|
COMPLETED: 110,
|
2019-01-29 23:13:28 +01:00
|
|
|
PROGRESS_BAR: 120,
|
|
|
|
|
PRIORITY: 130
|
2019-01-14 22:40:30 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
selectPriority: {
|
|
|
|
|
'it': [
|
|
|
|
|
{
|
2019-01-16 02:26:43 +01:00
|
|
|
id: 1,
|
2019-01-14 22:40:30 +01:00
|
|
|
label: 'Alta',
|
2019-01-27 19:09:48 +01:00
|
|
|
value: 2,
|
2019-01-16 02:26:43 +01:00
|
|
|
icon: 'expand_less'
|
2019-01-14 22:40:30 +01:00
|
|
|
},
|
|
|
|
|
{
|
2019-01-16 02:26:43 +01:00
|
|
|
id: 2,
|
2019-01-14 22:40:30 +01:00
|
|
|
label: 'Normale',
|
2019-01-27 19:09:48 +01:00
|
|
|
value: 1,
|
2019-01-16 02:26:43 +01:00
|
|
|
icon: 'remove'
|
2019-01-14 22:40:30 +01:00
|
|
|
},
|
|
|
|
|
{
|
2019-01-16 02:26:43 +01:00
|
|
|
id: 3,
|
2019-01-14 22:40:30 +01:00
|
|
|
label: 'Bassa',
|
2019-01-27 19:09:48 +01:00
|
|
|
value: 0,
|
2019-01-16 02:26:43 +01:00
|
|
|
icon: 'expand_more'
|
2019-01-14 22:40:30 +01:00
|
|
|
}],
|
2019-02-19 02:33:02 +01:00
|
|
|
'esEs': [
|
2019-02-16 02:01:17 +01:00
|
|
|
{
|
|
|
|
|
id: 1,
|
|
|
|
|
label: 'Alta',
|
|
|
|
|
value: 2,
|
|
|
|
|
icon: 'expand_less'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 2,
|
|
|
|
|
label: 'Normal',
|
|
|
|
|
value: 1,
|
|
|
|
|
icon: 'remove'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 3,
|
|
|
|
|
label: 'Baja',
|
|
|
|
|
value: 0,
|
|
|
|
|
icon: 'expand_more'
|
|
|
|
|
}],
|
|
|
|
|
'enUs': [
|
|
|
|
|
{
|
|
|
|
|
id: 1,
|
|
|
|
|
label: 'High',
|
|
|
|
|
value: 2,
|
|
|
|
|
icon: 'expand_less'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 2,
|
|
|
|
|
label: 'Normal',
|
|
|
|
|
value: 1,
|
|
|
|
|
icon: 'remove'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 3,
|
|
|
|
|
label: 'Low',
|
|
|
|
|
value: 0,
|
|
|
|
|
icon: 'expand_more'
|
|
|
|
|
}],
|
|
|
|
|
'de': [
|
2019-01-14 22:40:30 +01:00
|
|
|
{
|
2019-01-16 02:26:43 +01:00
|
|
|
id: 1,
|
2019-01-14 22:40:30 +01:00
|
|
|
label: 'High',
|
2019-01-27 19:09:48 +01:00
|
|
|
value: 2,
|
2019-01-16 02:26:43 +01:00
|
|
|
icon: 'expand_less'
|
2019-01-14 22:40:30 +01:00
|
|
|
},
|
|
|
|
|
{
|
2019-01-16 02:26:43 +01:00
|
|
|
id: 2,
|
2019-01-14 22:40:30 +01:00
|
|
|
label: 'Normal',
|
2019-01-27 19:09:48 +01:00
|
|
|
value: 1,
|
2019-01-16 02:26:43 +01:00
|
|
|
icon: 'remove'
|
2019-01-14 22:40:30 +01:00
|
|
|
},
|
|
|
|
|
{
|
2019-01-16 02:26:43 +01:00
|
|
|
id: 3,
|
2019-01-14 22:40:30 +01:00
|
|
|
label: 'Low',
|
2019-01-27 19:09:48 +01:00
|
|
|
value: 0,
|
2019-01-16 02:26:43 +01:00
|
|
|
icon: 'expand_more'
|
2019-01-14 22:40:30 +01:00
|
|
|
}]
|
|
|
|
|
|
2019-02-16 02:01:17 +01:00
|
|
|
|
2019-01-27 19:09:48 +01:00
|
|
|
},
|
|
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
INDEX_MENU_DELETE: 4,
|
2019-01-29 03:12:18 +01:00
|
|
|
|
2019-01-27 19:09:48 +01:00
|
|
|
menuPopupTodo: {
|
|
|
|
|
'it': [
|
|
|
|
|
{
|
2019-01-29 23:13:28 +01:00
|
|
|
id: 10,
|
|
|
|
|
label: '',
|
2019-01-29 00:48:04 +01:00
|
|
|
value: 120, // PROGRESS_BAR
|
2019-01-29 23:13:28 +01:00
|
|
|
icon: 'rowing',
|
2019-01-29 00:48:04 +01:00
|
|
|
checked: true
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-01-29 23:13:28 +01:00
|
|
|
id: 20,
|
|
|
|
|
label: 'Imposta Priorità',
|
|
|
|
|
value: 130, // PRIORITY
|
|
|
|
|
icon: 'rowing',
|
|
|
|
|
checked: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 30,
|
2019-01-28 13:31:41 +01:00
|
|
|
label: 'Completato',
|
|
|
|
|
value: 110, // COMPLETED
|
|
|
|
|
icon: 'check_circle',
|
|
|
|
|
checked: true
|
2019-01-27 19:09:48 +01:00
|
|
|
},
|
|
|
|
|
{
|
2019-01-29 23:13:28 +01:00
|
|
|
id: 40,
|
2019-01-28 03:13:04 +01:00
|
|
|
label: 'Imposta Scadenza',
|
|
|
|
|
value: 101, // TOGGLE_EXPIRING
|
2019-01-28 13:31:41 +01:00
|
|
|
icon: 'date_range',
|
|
|
|
|
checked: true
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-01-29 23:13:28 +01:00
|
|
|
id: 50,
|
2019-02-02 20:13:06 +01:00
|
|
|
label: 'Elimina',
|
2019-01-28 13:31:41 +01:00
|
|
|
value: 100, // DELETE
|
|
|
|
|
icon: 'delete',
|
|
|
|
|
checked: false
|
2019-01-27 19:09:48 +01:00
|
|
|
}
|
|
|
|
|
],
|
2019-02-19 02:33:02 +01:00
|
|
|
'esEs': [
|
2019-02-16 02:01:17 +01:00
|
|
|
{
|
|
|
|
|
id: 10,
|
|
|
|
|
label: '',
|
|
|
|
|
value: 120, // PROGRESS_BAR
|
|
|
|
|
icon: 'rowing',
|
|
|
|
|
checked: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 20,
|
|
|
|
|
label: 'Establecer Prioridad',
|
|
|
|
|
value: 130, // PRIORITY
|
|
|
|
|
icon: 'rowing',
|
|
|
|
|
checked: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 30,
|
|
|
|
|
label: 'Completado',
|
|
|
|
|
value: 110, // COMPLETED
|
|
|
|
|
icon: 'check_circle',
|
|
|
|
|
checked: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 40,
|
|
|
|
|
label: 'Establecer expiración',
|
|
|
|
|
value: 101, // TOGGLE_EXPIRING
|
|
|
|
|
icon: 'date_range',
|
|
|
|
|
checked: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 50,
|
|
|
|
|
label: 'Borrar',
|
|
|
|
|
value: 100, // DELETE
|
|
|
|
|
icon: 'delete',
|
|
|
|
|
checked: false
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
'enUs': [
|
2019-01-27 19:09:48 +01:00
|
|
|
{
|
2019-01-29 23:13:28 +01:00
|
|
|
id: 10,
|
|
|
|
|
label: '',
|
2019-01-29 00:48:04 +01:00
|
|
|
value: 120, // PROGRESS_BAR
|
|
|
|
|
icon: 'check_circle',
|
|
|
|
|
checked: true
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-01-29 23:13:28 +01:00
|
|
|
id: 20,
|
|
|
|
|
label: 'Set Priority',
|
|
|
|
|
value: 130, // PRIORITY
|
|
|
|
|
icon: 'high_priority',
|
|
|
|
|
checked: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 30,
|
2019-01-28 13:31:41 +01:00
|
|
|
label: 'Completed',
|
|
|
|
|
value: 110, // COMPLETED
|
|
|
|
|
icon: 'check_circle',
|
|
|
|
|
checked: true
|
2019-01-27 19:09:48 +01:00
|
|
|
},
|
|
|
|
|
{
|
2019-01-29 23:13:28 +01:00
|
|
|
id: 40,
|
2019-01-28 03:13:04 +01:00
|
|
|
label: 'Set Expiring',
|
|
|
|
|
value: 101, // TOGGLE_EXPIRING
|
2019-01-28 13:31:41 +01:00
|
|
|
icon: 'date_range',
|
|
|
|
|
checked: true
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-01-29 23:13:28 +01:00
|
|
|
id: 50,
|
2019-01-28 13:31:41 +01:00
|
|
|
label: 'Delete',
|
|
|
|
|
value: 100, // DELETE
|
|
|
|
|
icon: 'trash',
|
|
|
|
|
checked: false
|
2019-01-27 19:09:48 +01:00
|
|
|
}
|
|
|
|
|
]
|
2019-02-03 03:44:25 +01:00
|
|
|
},
|
|
|
|
|
|
2019-02-15 01:25:44 +01:00
|
|
|
jsonCopy(src) {
|
|
|
|
|
return JSON.parse(JSON.stringify(src))
|
2019-02-20 11:53:56 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getItemLS(item) {
|
|
|
|
|
let ris = localStorage.getItem(item)
|
|
|
|
|
if ((ris == null) || (ris === '') || (ris === 'null'))
|
|
|
|
|
ris = ''
|
|
|
|
|
|
|
|
|
|
return ris
|
2019-02-15 01:25:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2019-01-14 22:40:30 +01:00
|
|
|
|
|
|
|
|
|
2018-11-17 20:32:28 +01:00
|
|
|
}
|