9
.gitignore
vendored
9
.gitignore
vendored
@@ -30,12 +30,11 @@ yarn-error.log*
|
||||
coverage
|
||||
/_PROVE
|
||||
/_LOCALE
|
||||
deploy.sh
|
||||
deploy_on_production.sh
|
||||
deploy_on_test_server.sh
|
||||
send_to_production.sh
|
||||
compileandserve.sh
|
||||
deploy_all.sh
|
||||
deploy_frontend.sh
|
||||
mongodb_delete_pc_locale_paolo.sh
|
||||
deploy_on_production.sh
|
||||
deploy_on_test_server.sh
|
||||
send_to_production.sh
|
||||
send_to_test.sh
|
||||
serve_on_localhost.sh
|
||||
|
||||
1
cfg_locale
Symbolic link
1
cfg_locale
Symbolic link
@@ -0,0 +1 @@
|
||||
cfg_freeplanet.app/
|
||||
@@ -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",
|
||||
|
||||
@@ -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!
|
||||
@@ -172,6 +172,7 @@ module.exports = function (ctx) {
|
||||
'QAvatar',
|
||||
'QImg',
|
||||
'QSplitter',
|
||||
'QRating',
|
||||
'QSeparator'
|
||||
],
|
||||
directives: [
|
||||
|
||||
@@ -6,15 +6,17 @@
|
||||
|
||||
// Questo è il swSrc
|
||||
|
||||
console.log(' [ VER-0.0.27 ] _---------________------ 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');
|
||||
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;
|
||||
if (self.location.hostname === 'test.freeplanet.app') {
|
||||
if (self.location.hostname.startsWith('test')) {
|
||||
port = 3001;
|
||||
}
|
||||
// console.log('SW-06 1');
|
||||
@@ -66,7 +68,7 @@ if (workbox) {
|
||||
const debug = false;
|
||||
workbox.setConfig({ debug: debug });
|
||||
|
||||
workbox.core.setCacheNameDetails({ prefix: "freeplanet" });
|
||||
workbox.core.setCacheNameDetails({ prefix: self.location.hostname });
|
||||
|
||||
/**
|
||||
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
|
||||
@@ -279,7 +281,7 @@ if (workbox) {
|
||||
|
||||
// Storage
|
||||
workbox.routing.registerRoute(
|
||||
new RegExp(/.*(?:storage\.freeplanet)\.app.*$/),
|
||||
new RegExp(/.*(?:storage)/),
|
||||
workbox.strategies.staleWhileRevalidate({
|
||||
cacheName: 'storage',
|
||||
plugins: [
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import VueI18n from 'vue-i18n'
|
||||
import messages from '../statics/i18n'
|
||||
import { tools } from '../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
export default ({ app, store, Vue }) => {
|
||||
Vue.use(VueI18n)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
import { date } from 'quasar'
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -2,6 +2,7 @@ import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
@Component({
|
||||
name: 'CProgress'
|
||||
@@ -20,6 +21,7 @@ export default class CProgress extends Vue {
|
||||
@Prop({ required: true }) public progressval: number
|
||||
@Prop() public descr: string
|
||||
@Prop({ default: false }) public slider: boolean
|
||||
@Prop({ default: false }) public readonly: boolean
|
||||
|
||||
@Watch('progressval')
|
||||
public valchanged(value) {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<div class="flex-item progress-item shadow-1">
|
||||
<q-slider v-if="slider" label
|
||||
class="cpr-slider-item"
|
||||
:readonly="readonly"
|
||||
:value="progressval"
|
||||
:min="0"
|
||||
:max="100"
|
||||
@@ -12,6 +13,7 @@
|
||||
<q-linear-progress
|
||||
v-else
|
||||
stripe
|
||||
:readonly="readonly"
|
||||
rounded
|
||||
:value="progressval / 100"
|
||||
class="cpr-progrbar-item"
|
||||
|
||||
@@ -8,10 +8,12 @@ import { GlobalStore, UserStore } from '@modules'
|
||||
// import { StateConnection } from '../../model'
|
||||
import { Watch } from 'vue-property-decorator'
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
import Quasar from 'quasar'
|
||||
import Quasar, { Screen } from 'quasar'
|
||||
|
||||
@Component({
|
||||
name: 'Header',
|
||||
components: {
|
||||
drawer,
|
||||
messagePopover
|
||||
@@ -42,6 +44,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
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<q-avatar>
|
||||
<img :src="imglogo" height="27">
|
||||
</q-avatar>
|
||||
{{$t('msg.myAppName')}}
|
||||
{{getappname}}
|
||||
<div slot="subtitle">{{$t('msg.myDescriz')}} {{ getAppVersion() }}</div>
|
||||
</q-toolbar-title>
|
||||
|
||||
|
||||
@@ -2,4 +2,10 @@ export * from '../views/categories'
|
||||
export * from './todos'
|
||||
export * from './logo'
|
||||
export * from './CProgress'
|
||||
export * from './CCard'
|
||||
export * from './CPage'
|
||||
export * from './CTitle'
|
||||
export * from './CDate'
|
||||
export * from './BannerCookies'
|
||||
export * from './PagePolicy'
|
||||
export * from './FormNewsletter'
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
import Vue from 'vue'
|
||||
import { Component } from 'vue-property-decorator'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
@Component({
|
||||
name: 'Logo'
|
||||
})
|
||||
export default class Logo extends Vue {
|
||||
get logoimg() {
|
||||
return '../../' + tools.getimglogo()
|
||||
}
|
||||
|
||||
get logoalt() {
|
||||
return process.env.APP_NAME
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div id="logo">
|
||||
<img id="logoimg" alt="FreePlanet" :src=logoimg>
|
||||
<img id="logoimg" :alt="logoalt" :src=logoimg>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./logo.ts">
|
||||
|
||||
@@ -7,25 +7,11 @@ $heightBtn: 100%;
|
||||
$heightcounter: 26px;
|
||||
$heightdescr: 20px;
|
||||
|
||||
.flex-item{
|
||||
// background-color: #d5e2eb;
|
||||
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%;
|
||||
}
|
||||
|
||||
|
||||
.flex-container2 {
|
||||
flex-flow: row wrap;
|
||||
justify-content: space-between;
|
||||
margin: 0px 1px 0px 1px; // top right bottom left
|
||||
margin: 0px 10px 0px 10px; // top right bottom left
|
||||
}
|
||||
|
||||
// Set visibility: visible to the icon menu of pos-item-popover
|
||||
@@ -270,7 +256,7 @@ $heightdescr: 20px;
|
||||
//padding: 2px;
|
||||
min-width: 100px;
|
||||
text-align: left;
|
||||
color: blue !important;
|
||||
color: blue;
|
||||
overflow: hidden;
|
||||
|
||||
align-items: center;
|
||||
|
||||
@@ -3,6 +3,8 @@ import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { Projects, UserStore } from '@modules'
|
||||
import { tools } from '../../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { lists } from '../../../store/Modules/lists'
|
||||
|
||||
import { IProject } from '../../../model/index'
|
||||
|
||||
@@ -10,13 +12,14 @@ import { SubMenusProj } from '../SubMenusProj'
|
||||
import { CDate } from '../../CDate'
|
||||
|
||||
import { date } from 'quasar'
|
||||
import { GlobalStore } from '@store'
|
||||
import { RouteNames } from '@src/router/route-names'
|
||||
|
||||
@Component({
|
||||
components: { SubMenusProj, CDate },
|
||||
name: 'SingleProject'
|
||||
})
|
||||
export default class SingleProject extends Vue {
|
||||
public selectPriority: [] = []
|
||||
public menuPopupProj: any[] = []
|
||||
public classDescr: string = ''
|
||||
public classDescrEdit: string = ''
|
||||
@@ -50,50 +53,83 @@ export default class SingleProject extends Vue {
|
||||
|
||||
@Prop({ required: true }) public itemproject: IProject
|
||||
|
||||
@Watch('itemproject.enableExpiring') public valueChanged4() {
|
||||
@Watch('itemproject.enableExpiring')
|
||||
public valueChanged4() {
|
||||
this.watchupdate('enableExpiring')
|
||||
}
|
||||
|
||||
@Watch('itemproject.expiring_at') public valueChanged2() {
|
||||
@Watch('itemproject.expiring_at')
|
||||
public valueChanged2() {
|
||||
this.watchupdate('expiring_at')
|
||||
}
|
||||
|
||||
@Watch('itemproject.descr') public valueChanged5() {
|
||||
@Watch('itemproject.descr')
|
||||
public valueChanged5() {
|
||||
this.precDescr = this.itemproject.descr
|
||||
}
|
||||
|
||||
@Watch('itemproject.longdescr') public valueChangedlongdescr() {
|
||||
@Watch('itemproject.longdescr')
|
||||
public valueChangedlongdescr() {
|
||||
this.watchupdate('longdescr')
|
||||
}
|
||||
|
||||
@Watch('itemproject.hoursplanned') public valueChangedhoursplanned() {
|
||||
@Watch('itemproject.hoursplanned')
|
||||
public valueChangedhoursplanned() {
|
||||
this.watchupdate('hoursplanned')
|
||||
}
|
||||
@Watch('itemproject.hoursworked') public valueChangedhoursworked() {
|
||||
|
||||
@Watch('itemproject.themecolor')
|
||||
public valueChangedthemecolor() {
|
||||
this.watchupdate('themecolor')
|
||||
}
|
||||
|
||||
@Watch('itemproject.themebgcolor')
|
||||
public valueChangedthemebgcolor() {
|
||||
this.watchupdate('themebgcolor')
|
||||
}
|
||||
|
||||
@Watch('itemproject.hoursworked')
|
||||
public valueChangedhoursworked() {
|
||||
this.watchupdate('hoursworked')
|
||||
}
|
||||
@Watch('itemproject.begin_development') public valueChangedbegin_development() {
|
||||
|
||||
@Watch('itemproject.begin_development')
|
||||
public valueChangedbegin_development() {
|
||||
this.watchupdate('begin_development')
|
||||
}
|
||||
@Watch('itemproject.hoursweeky_plannedtowork') public valueChangedhoursweeky_plannedtowork() {
|
||||
|
||||
@Watch('itemproject.hoursweeky_plannedtowork')
|
||||
public valueChangedhoursweeky_plannedtowork() {
|
||||
this.watchupdate('hoursweeky_plannedtowork')
|
||||
}
|
||||
@Watch('itemproject.begin_test') public valueChangedbegin_test() {
|
||||
|
||||
@Watch('itemproject.begin_test')
|
||||
public valueChangedbegin_test() {
|
||||
this.watchupdate('begin_test')
|
||||
}
|
||||
@Watch('itemproject.actualphase') public valueChangedactualphase() {
|
||||
|
||||
@Watch('itemproject.actualphase')
|
||||
public valueChangedactualphase() {
|
||||
this.watchupdate('actualphase')
|
||||
}
|
||||
@Watch('itemproject.privacyread') public valueChanged_privacyread() {
|
||||
|
||||
@Watch('itemproject.privacyread')
|
||||
public valueChanged_privacyread() {
|
||||
this.watchupdate('privacyread')
|
||||
}
|
||||
@Watch('itemproject.privacywrite') public valueChanged_privacywrite() {
|
||||
|
||||
@Watch('itemproject.privacywrite')
|
||||
public valueChanged_privacywrite() {
|
||||
this.watchupdate('privacywrite')
|
||||
}
|
||||
@Watch('itemproject.totalphases') public valueChangedtotalphases() {
|
||||
|
||||
@Watch('itemproject.totalphases')
|
||||
public valueChangedtotalphases() {
|
||||
this.watchupdate('totalphases')
|
||||
}
|
||||
@Watch('itemproject.progressCalc') public valueChanged6() {
|
||||
|
||||
@Watch('itemproject.progressCalc')
|
||||
public valueChanged6() {
|
||||
console.log('itemproject.progressCalc')
|
||||
this.updateClasses()
|
||||
|
||||
@@ -112,12 +148,12 @@ export default class SingleProject extends Vue {
|
||||
return this.$t('proj.newsubproj')
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
public dateToYYYYMMDD(date) {
|
||||
// may have timezone caveats https://stackoverflow.com/a/29774197/1850609
|
||||
return date && date.toISOString().split('T')[0]
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
// Computed:
|
||||
get isSel() {
|
||||
@@ -134,7 +170,7 @@ export default class SingleProject extends Vue {
|
||||
|
||||
public watchupdate(field = '') {
|
||||
console.log('watchupdate PROJ', field)
|
||||
this.$emit('eventupdateproj', {myitem: this.itemproject, field } )
|
||||
this.$emit('eventupdateproj', { myitem: this.itemproject, field })
|
||||
this.updateicon()
|
||||
}
|
||||
|
||||
@@ -147,32 +183,37 @@ export default class SingleProject extends Vue {
|
||||
this.classDescrEdit += ' titleLista-item'
|
||||
}
|
||||
|
||||
if (this.itemproject.progressCalc > 100)
|
||||
this.itemproject.progressCalc = 100
|
||||
this.classDescr += ' text-' + this.itemproject.themecolor + ' bg-' + this.itemproject.themebgcolor
|
||||
this.classDescrEdit += ' text-' + this.itemproject.themecolor + ' bg-' + this.itemproject.themebgcolor
|
||||
|
||||
this.percProgress = 'percProgress'
|
||||
|
||||
this.classExpiring = 'flex-item data-item shadow-1 hide-if-small'
|
||||
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'
|
||||
|
||||
if (!!this.itemproject) {
|
||||
if (this.itemproject.statusproj !== tools.Status.COMPLETED) {
|
||||
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()) {
|
||||
this.menuPopupProj = tools.menuPopupProj[UserStore.state.lang]
|
||||
this.menuPopupProj = tools.menuPopupProj[toolsext.getLocale()]
|
||||
}
|
||||
else {
|
||||
this.menuPopupProj = []
|
||||
this.menuPopupProj.push(tools.menuPopupProj[UserStore.state.lang][tools.INDEX_MENU_DELETE])
|
||||
this.menuPopupProj.push(tools.menuPopupProj[toolsext.getLocale()][tools.INDEX_MENU_DELETE])
|
||||
}
|
||||
|
||||
}
|
||||
@@ -183,8 +224,6 @@ export default class SingleProject extends Vue {
|
||||
|
||||
this.updateClasses()
|
||||
|
||||
this.selectPriority = tools.selectPriority[UserStore.state.lang]
|
||||
|
||||
}
|
||||
|
||||
public getClassRow() {
|
||||
@@ -192,22 +231,23 @@ export default class SingleProject extends Vue {
|
||||
}
|
||||
|
||||
public clickRiga(clickmenu: boolean = false) {
|
||||
console.log('CLICK RIGA PROJ************')
|
||||
console.log('CLICK RIGA PROJ ************')
|
||||
|
||||
// if (!this.sel) {
|
||||
|
||||
if (!this.sel) {
|
||||
if (!this.inEdit) {
|
||||
// this.attivaEdit = true
|
||||
// console.log('entrato...')
|
||||
this.$emit('deselectAllRowstodo', null, false)
|
||||
this.$emit('deselectAllRowsproj', this.itemproject, true)
|
||||
|
||||
if (!this.sel) {
|
||||
this.selectRiga()
|
||||
} else {
|
||||
this.$emit('deselectAllRowsproj', null, false, false, true)
|
||||
this.deselectRiga()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public selectRiga() {
|
||||
// console.log('selectRiga', this.itemproject.descr)
|
||||
@@ -246,7 +286,7 @@ export default class SingleProject extends Vue {
|
||||
this.clickRiga()
|
||||
}
|
||||
|
||||
public activeEdit(){
|
||||
public activeEdit() {
|
||||
console.log('Attiva Edit')
|
||||
this.attivaEdit = true
|
||||
this.editProject()
|
||||
@@ -256,12 +296,16 @@ export default class SingleProject extends Vue {
|
||||
return this.itemproject.userId === UserStore.state.userId
|
||||
}
|
||||
|
||||
get tipoProj() {
|
||||
return this.$route.name
|
||||
}
|
||||
|
||||
get getrouteto() {
|
||||
return tools.getUrlByTipoProj(this.isMyProject) + this.itemproject._id
|
||||
return tools.getUrlByTipoProj(this.tipoProj) + this.itemproject._id
|
||||
}
|
||||
|
||||
public goIntoTheProject() {
|
||||
this.$router.replace(tools.getUrlByTipoProj(this.isMyProject) + this.itemproject._id)
|
||||
this.$router.replace(tools.getUrlByTipoProj(this.tipoProj) + this.itemproject._id)
|
||||
}
|
||||
|
||||
public editProject() {
|
||||
@@ -298,7 +342,7 @@ export default class SingleProject extends Vue {
|
||||
}
|
||||
|
||||
// console.log('focus()')
|
||||
}, 500)
|
||||
}, 400)
|
||||
}
|
||||
|
||||
public getFocus(e) {
|
||||
@@ -325,7 +369,7 @@ export default class SingleProject extends Vue {
|
||||
if (((e.keyCode === 46)) && (this.precDescr === '') && !e.shiftKey) {
|
||||
e.preventDefault()
|
||||
this.deselectRiga()
|
||||
this.clickMenu(tools.MenuAction.DELETE)
|
||||
this.clickMenu(lists.MenuAction.DELETE)
|
||||
.then(() => {
|
||||
this.faiFocus('insertProjectBottom', true)
|
||||
return
|
||||
@@ -336,7 +380,7 @@ export default class SingleProject extends Vue {
|
||||
|
||||
public keyDownArea(e) {
|
||||
console.log('keyDownArea')
|
||||
/*
|
||||
/*
|
||||
if ((e.key === 'ArrowUp') && !e.shiftKey) {
|
||||
e.key = 'Tab'
|
||||
e.shiftKey = true
|
||||
@@ -348,12 +392,12 @@ export default class SingleProject extends Vue {
|
||||
nextInput.focus()
|
||||
}
|
||||
}
|
||||
*/
|
||||
*/
|
||||
// Delete Key or Backspage
|
||||
if (((e.keyCode === 46)) && (this.precDescr === '') && !e.shiftKey) {
|
||||
e.preventDefault()
|
||||
this.deselectRiga()
|
||||
this.clickMenu(tools.MenuAction.DELETE)
|
||||
this.clickMenu(lists.MenuAction.DELETE)
|
||||
.then(() => {
|
||||
this.faiFocus('insertProjectBottom', true)
|
||||
return
|
||||
@@ -399,7 +443,7 @@ export default class SingleProject extends Vue {
|
||||
this.updateClasses()
|
||||
}
|
||||
|
||||
public aggiornaProgress(value, initialval){
|
||||
public aggiornaProgress(value, initialval) {
|
||||
if (value !== initialval) {
|
||||
this.itemproject.progressCalc = value
|
||||
this.updatedata('progressCalc')
|
||||
@@ -424,7 +468,7 @@ export default class SingleProject extends Vue {
|
||||
public updatedata(field: string) {
|
||||
// const myitem = tools.jsonCopy(this.itemproject)
|
||||
console.log('calling this.$emit(eventupdateproj)', this.itemproject)
|
||||
this.$emit('eventupdateproj', { myitem: this.itemproject, field } )
|
||||
this.$emit('eventupdateproj', { myitem: this.itemproject, field })
|
||||
}
|
||||
|
||||
public updateicon() {
|
||||
@@ -454,18 +498,58 @@ export default class SingleProject extends Vue {
|
||||
|
||||
public async clickMenu(action) {
|
||||
console.log('click menu: ', action)
|
||||
if (action === tools.MenuAction.DELETE) {
|
||||
if (action === lists.MenuAction.DELETE) {
|
||||
return await this.askConfirmDelete()
|
||||
} else if (action === tools.MenuAction.TOGGLE_EXPIRING) {
|
||||
} else if (action === lists.MenuAction.TOGGLE_EXPIRING) {
|
||||
return await this.enableExpiring()
|
||||
} else if (action === tools.MenuAction.EDIT) {
|
||||
} else if (action === lists.MenuAction.EDIT) {
|
||||
this.activeEdit()
|
||||
} else if (action === lists.MenuAction.CUT) {
|
||||
const myaction = {
|
||||
table: tools.projects,
|
||||
type: lists.MenuAction.CUT,
|
||||
_id: this.itemproject._id
|
||||
}
|
||||
return await Projects.actions.ActionCutPaste(myaction)
|
||||
} else if (action === 0) {
|
||||
this.deselectAndExitEdit()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public selectSubMenu(action, elem) {
|
||||
if (action === lists.MenuAction.PRIORITY) {
|
||||
this.setPriority(elem)
|
||||
} else if (action === lists.MenuAction.THEME) {
|
||||
this.setThemeColor(elem, false)
|
||||
} else if (action === lists.MenuAction.THEMEBG) {
|
||||
this.setThemeColor(elem, true)
|
||||
}
|
||||
}
|
||||
|
||||
public setThemeColor(newtheme, bg: boolean) {
|
||||
let changedfield = ''
|
||||
|
||||
if (bg) {
|
||||
if (this.itemproject.themebgcolor !== newtheme) {
|
||||
this.itemproject.themebgcolor = newtheme
|
||||
changedfield = 'themebgcolor'
|
||||
}
|
||||
} else {
|
||||
if (this.itemproject.themecolor !== newtheme) {
|
||||
this.itemproject.themecolor = newtheme
|
||||
changedfield = 'themecolor'
|
||||
}
|
||||
}
|
||||
|
||||
if (changedfield !== '') {
|
||||
this.updatedata(changedfield)
|
||||
|
||||
this.updateicon()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public setPriority(newpriority) {
|
||||
|
||||
if (this.itemproject.priority !== newpriority) {
|
||||
@@ -482,7 +566,7 @@ export default class SingleProject extends Vue {
|
||||
const deletestr = this.$t('dialog.delete')
|
||||
const cancelstr = this.$t('dialog.cancel')
|
||||
|
||||
const msg = this.$t('dialog.msg.deleteTask', {mytodo : this.itemproject.descr })
|
||||
const msg = this.$t('dialog.msg.deleteTask', { mytodo: this.itemproject.descr })
|
||||
|
||||
this.$q.dialog({
|
||||
cancel: {
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
icon="menu">
|
||||
<q-menu ref="popmenu" self="top right">
|
||||
<SubMenusProj :menuPopupProj="menuPopupProj" :itemproject="itemproject" @clickMenu="clickMenu"
|
||||
@setPriority="setPriority"></SubMenusProj>
|
||||
@selectSubMenu="selectSubMenu"></SubMenusProj>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,8 @@ import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { lists } from '@src/store/Modules/lists'
|
||||
import { UserStore } from '@store'
|
||||
import { IProject } from '../../../model/index'
|
||||
|
||||
@@ -16,18 +18,21 @@ import { IProject } from '../../../model/index'
|
||||
})
|
||||
|
||||
export default class SubMenusProj extends Vue {
|
||||
public selectPriority: [] = tools.selectPriority[UserStore.state.lang]
|
||||
|
||||
@Prop({ required: false }) public menuPopupProj: any[]
|
||||
@Prop({ required: false }) public itemproject: IProject
|
||||
public $q: any
|
||||
|
||||
get lists() {
|
||||
return lists
|
||||
}
|
||||
|
||||
public clickMenu(field) {
|
||||
this.$emit('clickMenu', field)
|
||||
}
|
||||
|
||||
public setPriority(field) {
|
||||
this.$emit('setPriority', field)
|
||||
public selectSubMenu(action, field) {
|
||||
this.$emit('selectSubMenu', action, field)
|
||||
}
|
||||
|
||||
public KeychangeProgress(e) {
|
||||
@@ -46,9 +51,4 @@ export default class SubMenusProj extends Vue {
|
||||
}
|
||||
}
|
||||
|
||||
public create() {
|
||||
this.selectPriority = tools.selectPriority[UserStore.state.lang]
|
||||
|
||||
console.log('CREAZIONE')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<q-list separator no-border class="todo-menu">
|
||||
<div v-for="field in menuPopupProj" :key="field.value">
|
||||
<q-item v-close-popup clickable v-if="(field.value !== 130) && (field.value !== 120)" :icon="field.icon"
|
||||
<q-item v-close-popup clickable
|
||||
v-if="(field.arrlista === undefined) && (field.value !== lists.MenuAction.PROGRESS_BAR)"
|
||||
:icon="field.icon"
|
||||
@click="clickMenu(field.value)">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="field.icon"/>
|
||||
@@ -11,11 +13,11 @@
|
||||
<q-item-label>{{field.label}}</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side top v-if="field.value === 101">
|
||||
<q-item-section side top v-if="field.value === lists.MenuAction.TOGGLE_EXPIRING">
|
||||
<q-checkbox v-model="itemproject.enableExpiring"/>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-if="(field.value === 120)" :icon="field.icon"
|
||||
<q-item clickable v-if="(field.value === lists.MenuAction.PROGRESS_BAR)" :icon="field.icon"
|
||||
@click="clickMenu(field.value)">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="field.icon"/>
|
||||
@@ -37,9 +39,10 @@
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-if="(field.value === 130)">
|
||||
<q-item clickable
|
||||
v-if="(field.arrlista !== undefined)">
|
||||
<q-item-section avatar>
|
||||
<q-icon name="priority_high" inverted color="primary"/>
|
||||
<q-icon :name="field.icon" inverted color="primary"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>{{field.label}}</q-item-section>
|
||||
@@ -54,14 +57,16 @@
|
||||
|
||||
<q-item-section>
|
||||
<q-list dense>
|
||||
<q-item clickable v-ripple v-for="fieldprior in selectPriority"
|
||||
<q-item clickable v-ripple v-for="fieldprior in field.arrlista"
|
||||
:key="fieldprior.value"
|
||||
@click="setPriority(fieldprior.value)">
|
||||
<q-item-section avatar>
|
||||
@click="selectSubMenu(field.value, fieldprior.value)">
|
||||
<q-item-section avatar v-if="!!fieldprior.icon">
|
||||
<q-icon :name="fieldprior.icon" inverted color="primary"/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<span :class="`text-`+fieldprior.value">
|
||||
{{fieldprior.label}}
|
||||
</span>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
|
||||
@@ -4,6 +4,8 @@ import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import { IDrag, IProject, ITodo, ITodosState } from '../../../model/index'
|
||||
|
||||
import { tools } from '../../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { lists } from '../../../store/Modules/lists'
|
||||
import * as ApiTables from '../../../store/Modules/ApiTables'
|
||||
|
||||
import { GlobalStore, Todos } from '@store'
|
||||
@@ -15,6 +17,7 @@ import { SingleTodo } from '../SingleTodo'
|
||||
const namespace: string = 'Todos'
|
||||
|
||||
@Component({
|
||||
name: 'CTodo',
|
||||
components: { SingleTodo },
|
||||
filters: {
|
||||
capitalize(value) {
|
||||
@@ -22,6 +25,7 @@ const namespace: string = 'Todos'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
export default class CTodo extends Vue {
|
||||
public $q: any
|
||||
public todotop: string = ''
|
||||
@@ -60,11 +64,11 @@ export default class CTodo extends Vue {
|
||||
}
|
||||
|
||||
get menuPopupConfigTodo() {
|
||||
return tools.menuPopupConfigTodo[UserStore.state.lang]
|
||||
return tools.menuPopupConfigTodo[toolsext.getLocale()]
|
||||
}
|
||||
|
||||
get listOptionShowTask() {
|
||||
return tools.listOptionShowTask[UserStore.state.lang]
|
||||
return tools.listOptionShowTask[toolsext.getLocale()]
|
||||
}
|
||||
|
||||
get TodosCount() {
|
||||
@@ -78,7 +82,7 @@ export default class CTodo extends Vue {
|
||||
public todos_completati: (state: ITodosState, category: string) => ITodo[]
|
||||
|
||||
public showTask(field_value) {
|
||||
return field_value === tools.MenuAction.SHOW_TASK
|
||||
return field_value === lists.MenuAction.SHOW_TASK
|
||||
}
|
||||
|
||||
public async onEndtodo(itemdragend) {
|
||||
@@ -174,22 +178,22 @@ export default class CTodo extends Vue {
|
||||
public async updateitemtodo({ myitem, field }) {
|
||||
console.log('calling MODIFY updateitemtodo', myitem, field)
|
||||
|
||||
const itemdragend: IDrag = {
|
||||
category: this.categoryAtt,
|
||||
field,
|
||||
idelemtochange: myitem._id,
|
||||
prioritychosen: myitem.priority,
|
||||
atfirst: false
|
||||
}
|
||||
|
||||
await Todos.actions.swapElems(itemdragend)
|
||||
// const itemdragend: IDrag = {
|
||||
// category: this.categoryAtt,
|
||||
// field,
|
||||
// idelemtochange: myitem._id,
|
||||
// prioritychosen: myitem.priority,
|
||||
// atfirst: false
|
||||
// }
|
||||
//
|
||||
// await Todos.actions.swapElems(itemdragend)
|
||||
|
||||
await Todos.actions.modify({ myitem, field })
|
||||
|
||||
}
|
||||
|
||||
public deselectAllRowsproj(item: IProject, check, onlythis: boolean = false) {
|
||||
this.$emit('deselectAllRowsproj', item, check, onlythis)
|
||||
public deselectAllRowsproj(item: IProject, check, onlythis: boolean = false, deselectRiga: boolean = false) {
|
||||
this.$emit('deselectAllRowsproj', item, check, onlythis, deselectRiga)
|
||||
}
|
||||
|
||||
public setitemsel(item: ITodo) {
|
||||
@@ -197,7 +201,7 @@ export default class CTodo extends Vue {
|
||||
}
|
||||
|
||||
public deselectAllRowstodo(item: ITodo, check, onlythis: boolean = false) {
|
||||
console.log('CTODO deselectAllRowstodo : ', item)
|
||||
// console.log('CTODO deselectAllRowstodo : ', item)
|
||||
|
||||
for (let i = 0; i < this.$refs.single.length; i++) {
|
||||
|
||||
@@ -216,6 +220,7 @@ export default class CTodo extends Vue {
|
||||
}
|
||||
}
|
||||
if (des) {
|
||||
// console.log('contr', contr)
|
||||
// @ts-ignore
|
||||
contr.deselectAndExitEdit()
|
||||
}
|
||||
|
||||
@@ -7,25 +7,10 @@ $heightBtn: 100%;
|
||||
$heightcounter: 26px;
|
||||
$heightdescr: 20px;
|
||||
|
||||
.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%;
|
||||
}
|
||||
|
||||
|
||||
.flex-container2 {
|
||||
flex-flow: row wrap;
|
||||
justify-content: space-between;
|
||||
margin: 0px 1px 0px 1px; // top right bottom left
|
||||
margin: 0px 10px 0px 10px; // top right bottom left
|
||||
}
|
||||
|
||||
// Set visibility: visible to the icon menu of pos-item-popover
|
||||
@@ -264,7 +249,6 @@ $heightdescr: 20px;
|
||||
//padding: 2px;
|
||||
min-width: 100px;
|
||||
text-align: left;
|
||||
color: blue !important;
|
||||
overflow: hidden;
|
||||
|
||||
align-items: center;
|
||||
@@ -272,8 +256,6 @@ $heightdescr: 20px;
|
||||
vertical-align: middle;
|
||||
line-height: 120%;
|
||||
|
||||
//background-color: #d50000;
|
||||
|
||||
//order: 2;
|
||||
|
||||
&.hide {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { UserStore } from '@modules'
|
||||
import { Projects, UserStore } from '@modules'
|
||||
import { tools } from '../../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { lists } from '../../../store/Modules/lists'
|
||||
|
||||
import { ITodo } from '../../../model/index'
|
||||
|
||||
@@ -17,7 +19,6 @@ import { CDate } from '../../CDate'
|
||||
name: 'SingleTodo'
|
||||
})
|
||||
export default class SingleTodo extends Vue {
|
||||
public selectPriority: [] = []
|
||||
public menuPopupTodo: any[] = []
|
||||
public iconCompleted: string = ''
|
||||
public classCompleted: string = ''
|
||||
@@ -41,6 +42,7 @@ export default class SingleTodo extends Vue {
|
||||
public itemtodoPrec: ITodo
|
||||
public clButtPopover: string = 'pos-item-popover'
|
||||
public numpos: number = 0
|
||||
public attivaEdit: boolean = false
|
||||
|
||||
public $q: any
|
||||
|
||||
@@ -90,6 +92,12 @@ export default class SingleTodo extends Vue {
|
||||
@Watch('itemtodo.assigned_to_userId') public valueChangedend_assigned_to_userId() {
|
||||
this.watchupdate('assigned_to_userId')
|
||||
}
|
||||
@Watch('itemtodo.themecolor') public valueChangedend_themecolor() {
|
||||
this.watchupdate('themecolor')
|
||||
}
|
||||
@Watch('itemtodo.themebgcolor') public valueChangedend_themebgcolor() {
|
||||
this.watchupdate('themebgcolor')
|
||||
}
|
||||
@Watch('itemtodo.phase') public valueChangedend_phase() {
|
||||
this.watchupdate('phase')
|
||||
}
|
||||
@@ -138,6 +146,9 @@ export default class SingleTodo extends Vue {
|
||||
this.classDescrEdit += ' titleLista-item'
|
||||
}
|
||||
|
||||
this.classDescr += ' text-' + this.itemtodo.themecolor + ' bg-' + this.itemtodo.themebgcolor
|
||||
this.classDescrEdit += ' text-' + this.itemtodo.themecolor + ' bg-' + this.itemtodo.themebgcolor
|
||||
|
||||
if (this.itemtodo.progress > 100)
|
||||
this.itemtodo.progress = 100
|
||||
|
||||
@@ -183,11 +194,11 @@ export default class SingleTodo extends Vue {
|
||||
}
|
||||
|
||||
if (this.isTodo()) {
|
||||
this.menuPopupTodo = tools.menuPopupTodo[UserStore.state.lang]
|
||||
this.menuPopupTodo = tools.menuPopupTodo[toolsext.getLocale()]
|
||||
}
|
||||
else {
|
||||
this.menuPopupTodo = []
|
||||
this.menuPopupTodo.push(tools.menuPopupTodo[UserStore.state.lang][tools.INDEX_MENU_DELETE])
|
||||
this.menuPopupTodo.push(tools.menuPopupTodo[toolsext.getLocale()][tools.INDEX_MENU_DELETE])
|
||||
}
|
||||
|
||||
}
|
||||
@@ -197,9 +208,6 @@ export default class SingleTodo extends Vue {
|
||||
this.updateicon()
|
||||
|
||||
this.updateClasses()
|
||||
|
||||
this.selectPriority = tools.selectPriority[UserStore.state.lang]
|
||||
|
||||
}
|
||||
|
||||
public getClassRow() {
|
||||
@@ -209,7 +217,6 @@ export default class SingleTodo extends Vue {
|
||||
public clickRiga(clickmenu: boolean = false) {
|
||||
// console.log('CLICK RIGA ************')
|
||||
|
||||
if (!this.sel) {
|
||||
if (!this.inEdit) {
|
||||
this.$emit('deselectAllRowsproj', null, false, false)
|
||||
this.$emit('deselectAllRowstodo', this.itemtodo, true)
|
||||
@@ -217,11 +224,11 @@ export default class SingleTodo extends Vue {
|
||||
if (!this.sel) {
|
||||
this.selectRiga()
|
||||
} else {
|
||||
this.$emit('deselectAllRowsproj', null, false, false, true)
|
||||
this.deselectRiga()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public selectRiga() {
|
||||
// console.log('selectRiga', this.itemtodo.descr)
|
||||
@@ -232,10 +239,11 @@ export default class SingleTodo extends Vue {
|
||||
}
|
||||
|
||||
public deselectRiga() {
|
||||
// console.log('DeselectRiga', this.itemtodo.descr)
|
||||
console.log('DeselectRiga', this.itemtodo.descr)
|
||||
this.sel = false
|
||||
this.classRow = ''
|
||||
this.inEdit = false
|
||||
this.attivaEdit = false
|
||||
this.updateClasses()
|
||||
}
|
||||
|
||||
@@ -261,7 +269,8 @@ export default class SingleTodo extends Vue {
|
||||
}
|
||||
|
||||
public editTodo() {
|
||||
if (this.itemtodo.statustodo !== tools.Status.COMPLETED) {
|
||||
|
||||
if (this.attivaEdit) {
|
||||
// console.log('INIZIO - editTodo')
|
||||
this.$emit('click')
|
||||
this.precDescr = this.itemtodo.descr
|
||||
@@ -293,7 +302,7 @@ export default class SingleTodo extends Vue {
|
||||
theField.focus()
|
||||
}
|
||||
// console.log('focus()')
|
||||
}, 300)
|
||||
}, 400)
|
||||
}
|
||||
|
||||
public exitEdit(singola: boolean = false) {
|
||||
@@ -303,6 +312,7 @@ export default class SingleTodo extends Vue {
|
||||
}
|
||||
// console.log('exitEdit')
|
||||
this.inEdit = false
|
||||
this.attivaEdit = false
|
||||
this.updateClasses()
|
||||
this.$emit('deselectAllRowsproj', null, false, false)
|
||||
this.$emit('deselectAllRowstodo', this.itemtodo, false, singola)
|
||||
@@ -315,7 +325,7 @@ export default class SingleTodo extends Vue {
|
||||
if (((e.keyCode === 8) || (e.keyCode === 46)) && (this.precDescr === '') && !e.shiftKey) {
|
||||
e.preventDefault()
|
||||
this.deselectRiga()
|
||||
this.clickMenu(tools.MenuAction.DELETE)
|
||||
this.clickMenu(lists.MenuAction.DELETE)
|
||||
.then(() => {
|
||||
this.faiFocus('insertTask', true)
|
||||
return
|
||||
@@ -343,7 +353,7 @@ export default class SingleTodo extends Vue {
|
||||
if (((e.keyCode === 8) || (e.keyCode === 46)) && (this.precDescr === '') && !e.shiftKey) {
|
||||
e.preventDefault()
|
||||
this.deselectRiga()
|
||||
this.clickMenu(tools.MenuAction.DELETE)
|
||||
this.clickMenu(lists.MenuAction.DELETE)
|
||||
.then(() => {
|
||||
this.faiFocus('insertTask', true)
|
||||
return
|
||||
@@ -384,6 +394,7 @@ export default class SingleTodo extends Vue {
|
||||
|
||||
this.watchupdate('descr')
|
||||
this.inEdit = false
|
||||
this.attivaEdit = false
|
||||
// this.precDescr = this.itemtodo.descr
|
||||
this.updateClasses()
|
||||
}
|
||||
@@ -450,22 +461,70 @@ export default class SingleTodo extends Vue {
|
||||
|
||||
}
|
||||
|
||||
public activeEdit() {
|
||||
console.log('Attiva Edit')
|
||||
this.attivaEdit = true
|
||||
this.editTodo()
|
||||
}
|
||||
|
||||
public async clickMenu(action) {
|
||||
console.log('click menu: ', action)
|
||||
if (action === tools.MenuAction.DELETE) {
|
||||
if (action === lists.MenuAction.DELETE) {
|
||||
return await this.askConfirmDelete()
|
||||
} else if (action === tools.MenuAction.TOGGLE_EXPIRING) {
|
||||
} else if (action === lists.MenuAction.TOGGLE_EXPIRING) {
|
||||
return await this.enableExpiring()
|
||||
} else if (action === tools.MenuAction.COMPLETED) {
|
||||
} else if (action === lists.MenuAction.COMPLETED) {
|
||||
return await this.setCompleted()
|
||||
} else if (action === tools.MenuAction.PROGRESS_BAR) {
|
||||
} else if (action === lists.MenuAction.EDIT) {
|
||||
this.activeEdit()
|
||||
} else if (action === lists.MenuAction.PROGRESS_BAR) {
|
||||
return await this.updatedata('progress')
|
||||
} else if (action === lists.MenuAction.CUT) {
|
||||
const myaction = {
|
||||
table: tools.todos,
|
||||
type: lists.MenuAction.CUT,
|
||||
_id: this.itemtodo._id,
|
||||
cat: this.itemtodo.category
|
||||
}
|
||||
return await Projects.actions.ActionCutPaste(myaction)
|
||||
} else if (action === 0) {
|
||||
this.deselectAndExitEdit()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public selectSubMenu(action, elem) {
|
||||
if (action === lists.MenuAction.PRIORITY) {
|
||||
this.setPriority(elem)
|
||||
} else if (action === lists.MenuAction.THEME) {
|
||||
this.setThemeColor(elem, false)
|
||||
} else if (action === lists.MenuAction.THEMEBG) {
|
||||
this.setThemeColor(elem, true)
|
||||
}
|
||||
}
|
||||
|
||||
public setThemeColor(newtheme, bg: boolean) {
|
||||
let changedfield = ''
|
||||
|
||||
if (bg){
|
||||
if (this.itemtodo.themebgcolor !== newtheme) {
|
||||
this.itemtodo.themebgcolor = newtheme
|
||||
changedfield = 'themebgcolor'
|
||||
}
|
||||
}else {
|
||||
if (this.itemtodo.themecolor !== newtheme) {
|
||||
this.itemtodo.themecolor = newtheme
|
||||
changedfield = 'themecolor'
|
||||
}
|
||||
}
|
||||
|
||||
if (changedfield !== '') {
|
||||
this.updatedata(changedfield)
|
||||
|
||||
this.updateicon()
|
||||
}
|
||||
}
|
||||
|
||||
public setPriority(newpriority) {
|
||||
|
||||
if (this.itemtodo.priority !== newpriority) {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</div>
|
||||
|
||||
<div class="flex-item donotdrag divdescrTot">
|
||||
<q-input v-if="sel && itemtodo.statustodo !== tools.Status.COMPLETED" hide-underline type="textarea" ref="inputdescr"
|
||||
<q-input v-if="sel && inEdit && itemtodo.statustodo !== tools.Status.COMPLETED" hide-underline type="textarea" ref="inputdescr"
|
||||
v-model.trim="precDescr"
|
||||
autogrow
|
||||
borderless
|
||||
@@ -65,14 +65,14 @@
|
||||
data_class="data_string" :readonly="!CanIModifyTodo">
|
||||
</CDate>
|
||||
</div>
|
||||
<div v-if="isTodo()" :class="classMenuBtn" @mousedown="clickRiga">
|
||||
<div :class="classMenuBtn" @mousedown="clickRiga">
|
||||
<q-btn flat
|
||||
:class="clButtPopover"
|
||||
:readonly="!CanIModifyTodo"
|
||||
icon="menu">
|
||||
<q-menu v-if="CanIModifyTodo" ref="popmenu" self="top right">
|
||||
<SubMenus :menuPopupTodo="menuPopupTodo" :itemtodo="itemtodo" @clickMenu="clickMenu"
|
||||
@setPriority="setPriority"></SubMenus>
|
||||
@selectSubMenu="selectSubMenu"></SubMenus>
|
||||
</q-menu>
|
||||
|
||||
</q-btn>
|
||||
|
||||
@@ -2,6 +2,8 @@ import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { lists } from '@src/store/Modules/lists'
|
||||
import { UserStore } from '@store'
|
||||
import { ITodo } from '../../../model/index'
|
||||
|
||||
@@ -16,18 +18,21 @@ import { ITodo } from '../../../model/index'
|
||||
})
|
||||
|
||||
export default class SubMenus extends Vue {
|
||||
public selectPriority: [] = tools.selectPriority[UserStore.state.lang]
|
||||
|
||||
@Prop({ required: false }) public menuPopupTodo: any[]
|
||||
@Prop({ required: false }) public itemtodo: ITodo
|
||||
public $q: any
|
||||
|
||||
get lists() {
|
||||
return lists
|
||||
}
|
||||
|
||||
public clickMenu(field) {
|
||||
this.$emit('clickMenu', field)
|
||||
}
|
||||
|
||||
public setPriority(field) {
|
||||
this.$emit('setPriority', field)
|
||||
public selectSubMenu(action, field) {
|
||||
this.$emit('selectSubMenu', action, field)
|
||||
}
|
||||
|
||||
public KeychangeProgress(e) {
|
||||
@@ -46,9 +51,4 @@ export default class SubMenus extends Vue {
|
||||
}
|
||||
}
|
||||
|
||||
public create() {
|
||||
this.selectPriority = tools.selectPriority[UserStore.state.lang]
|
||||
|
||||
console.log('CREAZIONE')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<q-list separator no-border class="todo-menu">
|
||||
<div v-for="field in menuPopupTodo" :key="field.value">
|
||||
<q-item v-close-popup clickable v-if="(field.value !== 130) && (field.value !== 120)" :icon="field.icon"
|
||||
<q-item v-close-popup clickable
|
||||
v-if="(field.arrlista === undefined) && (field.value !== 120)"
|
||||
:icon="field.icon"
|
||||
@click="clickMenu(field.value)">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="field.icon"/>
|
||||
@@ -11,14 +13,14 @@
|
||||
<q-item-label>{{field.label}}</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side top v-if="field.value === 101">
|
||||
<q-item-section side top v-if="field.value === lists.MenuAction.TOGGLE_EXPIRING">
|
||||
<q-checkbox v-model="itemtodo.enableExpiring"/>
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="field.value === 110">
|
||||
<q-item-section side v-if="field.value === lists.MenuAction.COMPLETED">
|
||||
<q-checkbox v-model="itemtodo.statustodo"/>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-if="(field.value === 120)" :icon="field.icon"
|
||||
<q-item clickable v-if="(field.value === lists.MenuAction.PROGRESS_BAR)" :icon="field.icon"
|
||||
@click="clickMenu(field.value)">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="field.icon"/>
|
||||
@@ -40,9 +42,10 @@
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-if="(field.value === 130)">
|
||||
<q-item clickable
|
||||
v-if="(field.arrlista !== undefined)">
|
||||
<q-item-section avatar>
|
||||
<q-icon name="priority_high" inverted color="primary"/>
|
||||
<q-icon :name="field.icon" inverted color="primary"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>{{field.label}}</q-item-section>
|
||||
@@ -57,14 +60,16 @@
|
||||
|
||||
<q-item-section>
|
||||
<q-list dense>
|
||||
<q-item clickable v-ripple v-for="fieldprior in selectPriority"
|
||||
<q-item clickable v-ripple v-for="fieldprior in field.arrlista"
|
||||
:key="fieldprior.value"
|
||||
@click="setPriority(fieldprior.value)">
|
||||
<q-item-section avatar>
|
||||
@click="selectSubMenu(field.value, fieldprior.value)">
|
||||
<q-item-section avatar v-if="!!fieldprior.icon">
|
||||
<q-icon :name="fieldprior.icon" inverted color="primary"/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<span :class="`text-`+fieldprior.value">
|
||||
{{fieldprior.label}}
|
||||
</span>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
|
||||
@@ -6,12 +6,14 @@ import { idbKeyval as storage } from '../js/storage.js'
|
||||
import { costanti } from '../store/Modules/costanti'
|
||||
import { ICfgData, IGlobalState } from '@src/model'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
|
||||
function saveConfigIndexDb(context) {
|
||||
|
||||
const data: ICfgData = {
|
||||
_id: costanti.CONFIG_ID_CFG,
|
||||
lang: UserStore.state.lang,
|
||||
lang: toolsext.getLocale(),
|
||||
token: UserStore.state.x_auth_token,
|
||||
userId: UserStore.state.userId
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { UserStore } from '@modules'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import messages from '../statics/i18n'
|
||||
|
||||
function translate(params) {
|
||||
const msg = params.split('.')
|
||||
const lang = UserStore.state.lang
|
||||
const lang = toolsext.getLocale()
|
||||
|
||||
const stringa = messages[lang]
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { GlobalStore } from '@modules'
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop } from 'vue-property-decorator'
|
||||
|
||||
const namespace: string = 'GlobalModule'
|
||||
const namespace: string = 'Drawer'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
|
||||
@@ -66,6 +66,10 @@
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.clexpansion{
|
||||
min-width: 0px !important;
|
||||
}
|
||||
|
||||
.my-menu-active {
|
||||
background-color: rgba(174, 189, 241, 0.71);
|
||||
}
|
||||
@@ -74,3 +78,7 @@
|
||||
min-width: 26px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.my-menu-icon-none > i{
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import { Watch } from 'vue-property-decorator'
|
||||
import { GlobalStore } from '../../store/Modules'
|
||||
import Component from 'vue-class-component'
|
||||
|
||||
export default class MenuOne extends Vue {
|
||||
|
||||
|
||||
@@ -3,25 +3,40 @@
|
||||
<q-list class="rounded-borders text-primary">
|
||||
<template v-for="(parent, index) in getmenu">
|
||||
<!--<div class="q-list-header">{{replaceUnderlineToSpace(index)}}</div>-->
|
||||
<div v-for="item in parent.routes">
|
||||
<div v-if="item.routes2">
|
||||
<div v-for="myitemmenu in parent.routes">
|
||||
<div v-if="!!myitemmenu.routes2">
|
||||
<q-expansion-item
|
||||
:header-inset-level="item.level_parent"
|
||||
:content-inset-level="item.level_parent"
|
||||
:label="getLabelByItem(item)"
|
||||
:icon="item.materialIcon"
|
||||
:header-inset-level="myitemmenu.level_parent"
|
||||
:content-inset-level="myitemmenu.level_parent"
|
||||
:label="getLabelByItem(myitemmenu)"
|
||||
:icon="myitemmenu.materialIcon"
|
||||
expand-icon-class="my-menu-separat"
|
||||
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"
|
||||
:header-inset-level="item.level_child"
|
||||
<q-expansion-item v-for="(child2, index) in myitemmenu.routes2"
|
||||
:key="index"
|
||||
:to="child2.route"
|
||||
:header-inset-level="child2.level_child"
|
||||
:duration="300"
|
||||
expand-icon="map"
|
||||
:icon="child2.materialIcon"
|
||||
active-class="my-menu-active"
|
||||
expand-icon-class="my-menu-icon-none"
|
||||
class="item item-link drawer-closer cursor-pointer my-menu"
|
||||
: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="child3.level_child"
|
||||
:duration="300"
|
||||
:icon="child3.materialIcon"
|
||||
:expand-icon="child3.icon"
|
||||
expand-icon-class="my-menu-separat"
|
||||
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>
|
||||
@@ -29,28 +44,37 @@
|
||||
<div v-else>
|
||||
<q-slide-transition :duration=200>
|
||||
<div v-show="true">
|
||||
<q-expansion-item
|
||||
:to="myitemmenu.route"
|
||||
:header-inset-level="myitemmenu.level_parent"
|
||||
:content-inset-level="myitemmenu.level_parent"
|
||||
:label="getLabelByItem(myitemmenu)"
|
||||
:icon="myitemmenu.materialIcon"
|
||||
expand-icon="none"
|
||||
header-class="my-menu"
|
||||
active-class="my-menu-active">
|
||||
</q-expansion-item>
|
||||
|
||||
|
||||
<!--
|
||||
<q-item
|
||||
clickable
|
||||
v-ripple
|
||||
exact
|
||||
:to="item.route"
|
||||
active-class="my-menu-active"
|
||||
>
|
||||
:to="myitemmenu.route"
|
||||
active-class="my-menu-active">
|
||||
<q-item-section avatar class="my-menu-icon">
|
||||
<q-icon :name="item.materialIcon"/>
|
||||
<q-icon :name="myitemmenu.materialIcon"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section class="my-menu">
|
||||
{{$t(item.name)}}
|
||||
{{$t(myitemmenu.name)}}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
-->
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
</div>
|
||||
|
||||
<!--<q-separator spaced />-->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
</q-list>
|
||||
|
||||
@@ -6,6 +6,7 @@ import { IPost } from '../../../model/index'
|
||||
|
||||
import './messagePopover.scss'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
@Component({
|
||||
})
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import { tools } from '../store/Modules/tools'
|
||||
|
||||
import { RouteNames } from '../router/route-names'
|
||||
|
||||
export default function auth({ next, router }) {
|
||||
const tok = tools.getItemLS(tools.localStorage.token)
|
||||
if (!tok) {
|
||||
return router.push({ name: RouteNames.login })
|
||||
return router.push({ name: 'login' })
|
||||
}
|
||||
|
||||
return next()
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { costanti } from "@src/store/Modules/costanti"
|
||||
import { UserStore } from "@store"
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { IAction } from '@src/model/Projects'
|
||||
|
||||
export interface IPost {
|
||||
title: string
|
||||
@@ -58,22 +56,28 @@ export interface IGlobalState {
|
||||
menulinks: {}
|
||||
listatodo: IMenuList[]
|
||||
arrConfig: IConfig[]
|
||||
lastaction: IAction
|
||||
}
|
||||
|
||||
export interface IMenuList {
|
||||
nametranslate: string
|
||||
description: string
|
||||
description?: string
|
||||
idelem?: string
|
||||
icon?: string
|
||||
name?: string
|
||||
level_parent?: number
|
||||
level_child?: number
|
||||
urlroute?: string
|
||||
routes2?: IMenuList[]
|
||||
}
|
||||
|
||||
export interface IListRoutes {
|
||||
route: string
|
||||
faIcon: string
|
||||
materialIcon: string
|
||||
faIcon?: string
|
||||
materialIcon?: string
|
||||
name: string
|
||||
text?: string
|
||||
routes2: []
|
||||
level_parent: number
|
||||
level_child: number
|
||||
routes2?: IListRoutes[]
|
||||
level_parent?: number
|
||||
level_child?: number
|
||||
}
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
import objectId from '@src/js/objectId'
|
||||
import { UserStore } from '@store'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
export interface IAction {
|
||||
table: string
|
||||
type: number
|
||||
_id: any
|
||||
cat?: string
|
||||
}
|
||||
|
||||
export interface IProject {
|
||||
_id?: any,
|
||||
@@ -20,11 +28,13 @@ export interface IProject {
|
||||
enableExpiring?: boolean
|
||||
id_prev?: string
|
||||
modified?: boolean
|
||||
favourite?: number
|
||||
pos?: number
|
||||
order?: number
|
||||
live_url?: string
|
||||
test_url?: string
|
||||
hoursplanned?: number
|
||||
hoursleft?: number
|
||||
hoursworked?: number
|
||||
progressCalc?: number
|
||||
begin_development?: Date
|
||||
@@ -35,6 +45,8 @@ export interface IProject {
|
||||
actualphase?: number
|
||||
privacyread?: string
|
||||
privacywrite?: string
|
||||
themecolor?: string
|
||||
themebgcolor?: string
|
||||
}
|
||||
|
||||
export interface IProjectsState {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { IAction } from '@src/model/Projects'
|
||||
|
||||
export interface ITodo {
|
||||
_id?: any,
|
||||
userId?: string
|
||||
@@ -21,6 +23,8 @@ export interface ITodo {
|
||||
hoursplanned?: number
|
||||
hoursworked?: number
|
||||
start_date?: Date
|
||||
themecolor?: string
|
||||
themebgcolor?: string
|
||||
}
|
||||
|
||||
export interface IParamTodo {
|
||||
@@ -40,7 +44,7 @@ export interface IDrag {
|
||||
category?: string
|
||||
id_proj?: string
|
||||
atfirst?: boolean
|
||||
mieiproj?: boolean
|
||||
tipoproj?: string
|
||||
}
|
||||
|
||||
export interface ITodosState {
|
||||
|
||||
@@ -8,3 +8,5 @@ export * from './key-value'
|
||||
export * from './Categories'
|
||||
export * from './Todos'
|
||||
export * from './Projects'
|
||||
|
||||
export * from './Calendar'
|
||||
|
||||
@@ -69,6 +69,10 @@ export default class Home extends Vue {
|
||||
GlobalStore.actions.prova()
|
||||
}
|
||||
|
||||
get tools() {
|
||||
return tools
|
||||
}
|
||||
|
||||
get isLogged() {
|
||||
return UserStore.state.isLogged
|
||||
}
|
||||
@@ -116,7 +120,7 @@ export default class Home extends Vue {
|
||||
}
|
||||
|
||||
public initprompt() {
|
||||
window.addEventListener('beforeinstallprompt', function(event) {
|
||||
window.addEventListener('beforeinstallprompt', (event) => {
|
||||
// console.log('******************************** beforeinstallprompt fired')
|
||||
event.preventDefault()
|
||||
// console.log('§§§§§§§§§§§§§§§§§§§§ IMPOSTA DEFERRED PROMPT !!!!!!!!!!!!!!!!! ')
|
||||
@@ -146,128 +150,31 @@ export default class Home extends Vue {
|
||||
this.$router.replace('/signup')
|
||||
}
|
||||
|
||||
public displayConfirmNotification() {
|
||||
let options = null
|
||||
if ('serviceWorker' in navigator) {
|
||||
options = {
|
||||
body: 'You successfully subscribed to our Notification service!',
|
||||
icon: '/statics/icons/app-icon-96x96.png',
|
||||
image: '/statics/images/sf-boat.jpg',
|
||||
dir: 'ltr',
|
||||
lang: 'enUs', // BCP 47,
|
||||
vibrate: [100, 50, 200],
|
||||
badge: '/statics/icons/app-icon-96x96.png',
|
||||
tag: 'confirm-notification',
|
||||
renotify: true, // if it's already sent, will Vibrate anyway
|
||||
actions: [
|
||||
{ action: 'confirm', title: 'Okay', icon: '/statics/icons/app-icon-96x96.png' },
|
||||
{ action: 'cancel', title: 'Cancel', icon: '/statics/icons/app-icon-96x96.png' }
|
||||
]
|
||||
}
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.ready
|
||||
.then(function(swreg) {
|
||||
swreg.showNotification('Successfully subscribed!', options)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public urlBase64ToUint8Array(base64String) {
|
||||
const padding = '='.repeat((4 - base64String.length % 4) % 4)
|
||||
const base64 = (base64String + padding)
|
||||
.replace(/\-/g, '+')
|
||||
.replace(/_/g, '/')
|
||||
|
||||
const rawData = window.atob(base64)
|
||||
const outputArray = new Uint8Array(rawData.length)
|
||||
|
||||
for (let i = 0; i < rawData.length; ++i) {
|
||||
outputArray[i] = rawData.charCodeAt(i)
|
||||
}
|
||||
return outputArray
|
||||
}
|
||||
|
||||
public dataURItoBlob(dataURI) {
|
||||
const byteString = atob(dataURI.split(',')[1])
|
||||
const mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]
|
||||
const ab = new ArrayBuffer(byteString.length)
|
||||
const ia = new Uint8Array(ab)
|
||||
for (let i = 0; i < byteString.length; i++) {
|
||||
ia[i] = byteString.charCodeAt(i)
|
||||
}
|
||||
const blob = new Blob([ab], { type: mimeString })
|
||||
return blob
|
||||
}
|
||||
|
||||
public showNotificationExample() {
|
||||
let options = null
|
||||
const mythis = this
|
||||
if ('serviceWorker' in navigator) {
|
||||
options = {
|
||||
body: mythis.$t('notification.subscribed'),
|
||||
icon: '/statics/icons/android-chrome-192x192.png',
|
||||
image: '/statics/images/freeplanet.png',
|
||||
dir: 'ltr',
|
||||
lang: 'enUs', // BCP 47,
|
||||
vibrate: [100, 50, 200],
|
||||
badge: '/statics/icons/android-chrome-192x192.png',
|
||||
tag: 'confirm-notification',
|
||||
renotify: true, // if it's already sent, will Vibrate anyway
|
||||
actions: [
|
||||
{ action: 'confirm', title: mythis.$t('dialog.ok'), icon: '/statics/icons/android-chrome-192x192.png' }
|
||||
// { action: 'cancel', title: 'Cancel', icon: '/statics/icons/android-chrome-192x192.png', }
|
||||
]
|
||||
}
|
||||
|
||||
navigator.serviceWorker.ready
|
||||
.then(function(swreg) {
|
||||
swreg.showNotification('aaa', options)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
public askfornotification() {
|
||||
tools.showNotif(this.$q, this.$t('notification.waitingconfirm'), {color: 'positive', icon: 'notifications'})
|
||||
|
||||
Notification.requestPermission((result) => {
|
||||
console.log('User Choice', result)
|
||||
if (result === 'granted') {
|
||||
tools.showNotif(this.$q, this.$t('notification.confirmed'), {color: 'positive', icon: 'notifications'})
|
||||
} else {
|
||||
tools.showNotif(this.$q, this.$t('notification.denied'), {color: 'negative', icon: 'notifications'})
|
||||
|
||||
// displayConfirmNotification();
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
public test_fetch() {
|
||||
fetch('https:/httpbin.org/post', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Accept': 'application/json'
|
||||
},
|
||||
// mode: 'no-cors',
|
||||
mode: 'cors',
|
||||
body: JSON.stringify({ message: 'Does this work?' })
|
||||
}).then(function(response) {
|
||||
console.log(response)
|
||||
if (response) {
|
||||
return response.json()
|
||||
}
|
||||
else {
|
||||
return null
|
||||
}
|
||||
}).then(function(data) {
|
||||
console.log(data)
|
||||
}).catch(function(err) {
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
// public test_fetch() {
|
||||
// fetch('https:/httpbin.org/post', {
|
||||
// method: 'POST',
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/json',
|
||||
// 'Accept': 'application/json'
|
||||
// },
|
||||
// // mode: 'no-cors',
|
||||
// mode: 'cors',
|
||||
// body: JSON.stringify({ message: 'Does this work?' })
|
||||
// }).then(function(response) {
|
||||
// console.log(response)
|
||||
// if (response) {
|
||||
// return response.json()
|
||||
// }
|
||||
// else {
|
||||
// return null
|
||||
// }
|
||||
// }).then(function(data) {
|
||||
// console.log(data)
|
||||
// }).catch(function(err) {
|
||||
// console.log(err)
|
||||
// })
|
||||
// }
|
||||
//
|
||||
|
||||
public openCreatePostModal() {
|
||||
console.log('APERTO ! openCreatePostModal')
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<div class="q-gutter-xs testo-banda clgutter">
|
||||
<div class="text-h1 shadow-max">{{appname}}</div>
|
||||
<div class="text-h1 shadow-max">{{$t('msg.myAppName')}}</div>
|
||||
<div class="text-subtitle1 shadow text-italic q-pl-sm">
|
||||
{{$t('msg.sottoTitoloApp')}}
|
||||
</div>
|
||||
@@ -83,7 +83,7 @@
|
||||
class="enable-notifications shadow"
|
||||
color="primary" rounded
|
||||
size="md"
|
||||
icon="notifications" @click="askfornotification"
|
||||
icon="notifications" @click="tools.askfornotification"
|
||||
:label="$t('notification.ask')"/>
|
||||
<!--<q-btn v-if="getPermission() === 'granted'" class="enable-notifications" color="primary" rounded size="lg" icon="notifications" @click="showNotificationExample" label="Send Notification"/>-->
|
||||
<!--<q-btn v-if="getPermission() === 'granted'" class="enable-notifications" color="secondary" rounded size="lg" icon="notifications" @click="createPushSubscription" label="Create Push Subscription !"/>-->
|
||||
@@ -110,7 +110,7 @@
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<div class="q-gutter-xs testo-banda clgutter">
|
||||
<div class="text-h1 shadow-max">FreePlanet</div>
|
||||
<div class="text-h1 shadow-max">{{$t('msg.myAppName')}}</div>
|
||||
<div class="text-subtitle1 shadow text-italic q-pl-sm">
|
||||
{{$t('msg.sottoTitoloApp')}}
|
||||
</div>
|
||||
@@ -170,7 +170,7 @@
|
||||
class="enable-notifications shadow"
|
||||
color="primary" rounded
|
||||
size="md"
|
||||
icon="notifications" @click="askfornotification"
|
||||
icon="notifications" @click="tools.askfornotification"
|
||||
:label="$t('notification.ask')"/>
|
||||
<!--<q-btn v-if="getPermission() === 'granted'" class="enable-notifications" color="primary" rounded size="lg" icon="notifications" @click="showNotificationExample" label="Send Notification"/>-->
|
||||
<!--<q-btn v-if="getPermission() === 'granted'" class="enable-notifications" color="secondary" rounded size="lg" icon="notifications" @click="createPushSubscription" label="Create Push Subscription !"/>-->
|
||||
@@ -201,7 +201,7 @@
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<div class="q-gutter-xs testo-banda clgutter">
|
||||
<div class="text-h1 shadow-max">FreePlanet</div>
|
||||
<div class="text-h1 shadow-max">{{getenv('APP_NAME')}}</div>
|
||||
<div class="text-subtitle1 shadow text-italic q-pl-sm">
|
||||
{{$t('msg.sottoTitoloApp')}}
|
||||
</div>
|
||||
@@ -261,7 +261,7 @@
|
||||
class="enable-notifications shadow"
|
||||
color="primary" rounded
|
||||
size="md"
|
||||
icon="notifications" @click="askfornotification"
|
||||
icon="notifications" @click="tools.askfornotification"
|
||||
:label="$t('notification.ask')"/>
|
||||
<!--<q-btn v-if="getPermission() === 'granted'" class="enable-notifications" color="primary" rounded size="lg" icon="notifications" @click="showNotificationExample" label="Send Notification"/>-->
|
||||
<!--<q-btn v-if="getPermission() === 'granted'" class="enable-notifications" color="secondary" rounded size="lg" icon="notifications" @click="createPushSubscription" label="Create Push Subscription !"/>-->
|
||||
@@ -300,6 +300,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="padding bg-primary landing__swirl-bg" v-scroll-reveal.reset>
|
||||
<div class="landing__features row justify-between items-start q-col-gutter-sm">
|
||||
<div class="col-12 col-sm-5">
|
||||
|
||||
@@ -2,11 +2,10 @@ import Vue from 'vue'
|
||||
import VueRouter, { RouterMode } from 'vue-router'
|
||||
import { PositionResult } from 'vue-router/types/router'
|
||||
|
||||
import { IMyRoute, IMyRouteRecord, routesList } from './route-config'
|
||||
import { IMyRoute, IMyRouteRecord, cfgrouter } from './route-config'
|
||||
import { ProgressBar } from '@src/store/Modules/Interface'
|
||||
import { isEqual } from 'lodash'
|
||||
import { UserStore } from '@store'
|
||||
import { RouteNames } from '@src/router/route-names'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
|
||||
Vue.use(VueRouter)
|
||||
@@ -17,7 +16,7 @@ Vue.use(VueRouter)
|
||||
|
||||
const Router = new VueRouter({
|
||||
scrollBehavior: () => ({ x: 0, y: 0 } as PositionResult),
|
||||
routes: routesList,
|
||||
routes: cfgrouter.routes,
|
||||
|
||||
// Leave these as is and change from quasar.conf.js instead!
|
||||
// quasar.conf.js -> build -> vueRouterMode
|
||||
@@ -124,7 +123,7 @@ Router.beforeEach(async (to: IMyRoute, from: IMyRoute, next) => {
|
||||
// next('/')
|
||||
}
|
||||
|
||||
return Router.push({ name: RouteNames.login })
|
||||
return Router.push({ name: 'login' })
|
||||
}
|
||||
} else if (to.matched.some((m) => m.meta.noAuth) && UserStore.state.isLogged) {
|
||||
next('/')
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { RouteConfig, Route, RouteRecord } from 'vue-router/types'
|
||||
|
||||
import { RouteNames } from './route-names'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
|
||||
import auth from '../middleware/auth'
|
||||
import { Projects, Todos } from "@store"
|
||||
import { GlobalStore, Projects, Todos, UserStore } from '@store'
|
||||
import { RouteNames } from '@src/router/route-names'
|
||||
import { IListRoutes, IMenuList } from '@src/model'
|
||||
|
||||
interface IMyMeta {
|
||||
title?: string,
|
||||
@@ -34,7 +35,8 @@ export interface IMyRouteConfig extends RouteConfig {
|
||||
meta?: IMyMeta
|
||||
}
|
||||
|
||||
export const routesList: IMyRouteConfig[] = [
|
||||
export const cfgrouter = {
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
name: RouteNames.home,
|
||||
@@ -97,31 +99,70 @@ export const routesList: IMyRouteConfig[] = [
|
||||
// component: () => import('@/root/malaga/malaga.vue')
|
||||
// },
|
||||
{
|
||||
path: '/projects/:idProj',
|
||||
name: RouteNames.projects,
|
||||
path: '/' + RouteNames.projectsall + '/:idProj',
|
||||
name: RouteNames.projectsall,
|
||||
component: () => import('@/views/projects/proj-list/proj-list.vue'),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
requiresAuth: false,
|
||||
async asyncData() {
|
||||
// await Todos.actions.dbLoad({ checkPending: false })
|
||||
await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true })
|
||||
}
|
||||
// middleware: [auth]
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/myprojects/:idProj',
|
||||
path: '/' + RouteNames.myprojects + '/:idProj',
|
||||
name: RouteNames.myprojects,
|
||||
component: () => import('@/views/projects/proj-list/proj-list.vue'),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
async asyncData() {
|
||||
// await Todos.actions.dbLoad({ checkPending: false })
|
||||
await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true })
|
||||
}
|
||||
// middleware: [auth]
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/' + RouteNames.projectsshared + '/:idProj',
|
||||
name: RouteNames.projectsshared,
|
||||
component: () => import('@/views/projects/proj-list/proj-list.vue'),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
async asyncData() {
|
||||
// await Todos.actions.dbLoad({ checkPending: false })
|
||||
await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true })
|
||||
}
|
||||
// middleware: [auth]
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/' + RouteNames.listprojects,
|
||||
name: RouteNames.listprojects,
|
||||
component: () => import('@/views/projects/proj-list/proj-list.vue'),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
async asyncData() {
|
||||
// await Todos.actions.dbLoad({ checkPending: false })
|
||||
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 Todos.actions.dbLoad({ checkPending: false })
|
||||
await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true })
|
||||
}
|
||||
// middleware: [auth]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
{
|
||||
@@ -135,7 +176,6 @@ export const routesList: IMyRouteConfig[] = [
|
||||
meta: { nametranslate: 'Update your Password' }
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
path: '/simpleform',
|
||||
component: () => import('@/views/form/simpleForm/simpleForm.vue'),
|
||||
@@ -146,4 +186,145 @@ export const routesList: IMyRouteConfig[] = [
|
||||
component: () => import('@/views/form/embeeded/embeeded.vue'),
|
||||
meta: { nametranslate: 'Embeeded' }
|
||||
}*/
|
||||
]
|
||||
],
|
||||
|
||||
getmenu() {
|
||||
const arrlista = GlobalStore.state.listatodo
|
||||
const lista: IListRoutes[] = []
|
||||
|
||||
arrlista.forEach((elem: IMenuList) => {
|
||||
const item: IListRoutes = {
|
||||
faIcon: 'fa fa-list-alt',
|
||||
materialIcon: 'todo',
|
||||
name: 'pages.' + elem.description,
|
||||
route: '/todo/' + elem.nametranslate
|
||||
}
|
||||
lista.push(item)
|
||||
})
|
||||
|
||||
const SHOW_PROJINTHEMENU = false
|
||||
|
||||
let arrlistafavourite = []
|
||||
let arrlistaprojtutti = []
|
||||
let arrlistaprojmiei = []
|
||||
if (SHOW_PROJINTHEMENU) {
|
||||
arrlistaprojtutti = Projects.getters.listaprojects(RouteNames.projectsall)
|
||||
arrlistaprojmiei = Projects.getters.listaprojects(RouteNames.myprojects)
|
||||
arrlistafavourite = Projects.getters.listaprojects(RouteNames.favouriteprojects)
|
||||
}
|
||||
|
||||
const arrMenu: IMenuList[] = []
|
||||
|
||||
// PROGETTI -> FAVORITI :
|
||||
if (arrlistafavourite.length > 0) {
|
||||
arrMenu.push({
|
||||
icon: 'favorite_border',
|
||||
nametranslate: 'pages.' + RouteNames.favouriteprojects,
|
||||
urlroute: RouteNames.favouriteprojects,
|
||||
level_parent: 0.0,
|
||||
level_child: 0.5,
|
||||
routes2: arrlistafavourite,
|
||||
idelem: ''
|
||||
})
|
||||
}
|
||||
|
||||
// PROGETTI -> TUTTI :
|
||||
arrMenu.push({
|
||||
icon: 'accessibility_new',
|
||||
nametranslate: 'pages.' + RouteNames.projectsall,
|
||||
urlroute: RouteNames.projectsall,
|
||||
level_parent: 0.0,
|
||||
level_child: 0.5,
|
||||
routes2: [],
|
||||
idelem: process.env.PROJECT_ID_MAIN
|
||||
})
|
||||
|
||||
// PROGETTI -> CONDIVISI :
|
||||
arrMenu.push({
|
||||
icon: 'people_outline',
|
||||
nametranslate: 'pages.' + RouteNames.projectsshared,
|
||||
urlroute: RouteNames.projectsshared,
|
||||
level_parent: 0.0,
|
||||
level_child: 0.5,
|
||||
routes2: arrlistaprojtutti,
|
||||
idelem: process.env.PROJECT_ID_MAIN
|
||||
})
|
||||
|
||||
// PROGETTI -> PERSONALI :
|
||||
arrMenu.push({
|
||||
icon: 'person',
|
||||
nametranslate: 'pages.' + RouteNames.myprojects,
|
||||
urlroute: RouteNames.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[] = []
|
||||
|
||||
tools.addRoute(arrroutes, { route: '/', faIcon: 'fa fa-home', materialIcon: 'home', name: 'pages.home' }) // HOME
|
||||
|
||||
tools.addRoute(arrroutes, {
|
||||
route: '/todo', faIcon: 'fa fa-list-alt', materialIcon: 'format_list_numbered', name: 'pages.Todo',
|
||||
routes2: lista,
|
||||
level_parent: 0.5,
|
||||
level_child: 0.5
|
||||
})
|
||||
|
||||
const myarrproj = []
|
||||
for (const myitem of listaprojectMenu) {
|
||||
tools.addRoute(myarrproj, myitem)
|
||||
}
|
||||
|
||||
tools.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) {
|
||||
tools.addRoute(arrroutes, {
|
||||
route: '/category',
|
||||
faIcon: 'fa fa-list-alt',
|
||||
materialIcon: 'category',
|
||||
name: 'pages.Category',
|
||||
level_parent: 0.0,
|
||||
level_child: 0.0
|
||||
})
|
||||
tools.addRoute(arrroutes, {
|
||||
route: '/admin/cfgserv',
|
||||
faIcon: 'fa fa-database',
|
||||
materialIcon: 'event_seat',
|
||||
name: 'pages.Admin',
|
||||
level_parent: 0.0,
|
||||
level_child: 0.0
|
||||
})
|
||||
tools.addRoute(arrroutes, {
|
||||
route: '/admin/testp1/par1',
|
||||
faIcon: 'fa fa-database',
|
||||
materialIcon: 'restore',
|
||||
name: 'pages.Test1',
|
||||
level_parent: 0.0,
|
||||
level_child: 0.0
|
||||
})
|
||||
tools.addRoute(arrroutes, {
|
||||
route: '/admin/testp1/par2',
|
||||
faIcon: 'fa fa-database',
|
||||
materialIcon: 'restore',
|
||||
name: 'pages.Test2',
|
||||
level_parent: 0.0,
|
||||
level_child: 0.0
|
||||
})
|
||||
}
|
||||
|
||||
return arrroutes
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,5 +2,9 @@ export const RouteNames = {
|
||||
home: 'home',
|
||||
login: 'login',
|
||||
projects: 'projects',
|
||||
myprojects: 'myprojects'
|
||||
projectsall: 'projall',
|
||||
projectsshared: 'projectsShared',
|
||||
myprojects: 'myprojects',
|
||||
favouriteprojects: 'favproj',
|
||||
listprojects: 'listproj'
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const messages = {
|
||||
import msg_website from './i18n_website'
|
||||
|
||||
const msgglobal = {
|
||||
it: {
|
||||
dialog: {
|
||||
ok: 'Ok',
|
||||
@@ -6,6 +8,7 @@ const messages = {
|
||||
no: 'No',
|
||||
delete: 'Elimina',
|
||||
cancel: 'Annulla',
|
||||
today: 'Oggi',
|
||||
msg: {
|
||||
titledeleteTask: 'Elimina Task',
|
||||
deleteTask: "Vuoi Eliminare {mytodo}?"
|
||||
@@ -14,122 +17,6 @@ const messages = {
|
||||
comp: {
|
||||
Conta: "Conta",
|
||||
},
|
||||
msg: {
|
||||
hello: 'Buongiorno',
|
||||
myAppName: 'FreePlanet',
|
||||
underconstruction: 'App in costruzione...',
|
||||
myDescriz: '',
|
||||
sottoTitoloApp: 'Il primo Vero Social',
|
||||
sottoTitoloApp2: 'Libero, Equo e Solidale',
|
||||
sottoTitoloApp3: 'dove Vive Consapevolezza e Aiuto Comunitario',
|
||||
sottoTitoloApp4: 'Gratuito e senza Pubblicità',
|
||||
},
|
||||
homepage: {
|
||||
descrapp_title1: 'Uniti per Evolvere e Sperimentare',
|
||||
descrapp_pag1: 'Riscopri come il valore della <strong>Condivisione</strong> e della <strong>Cooperazione</strong>, possa aiutarci a ritrovare il profondo ' +
|
||||
'senso della <strong>Vita</strong>, perduto in questa società consumista, e riporti quei <strong>Sani Pricìpi Naturali</strong> ed Umani di <strong>Fratellanza</strong>' +
|
||||
' che intere popolazioni antiche conoscevano bene.',
|
||||
descrapp_pag2: 'E\' giunta l\'ora di utilizzare i nuovi strumenti <strong>Tecnologici</strong> a nostro <strong>favore</strong>, per <strong>Liberarci</strong> ' +
|
||||
'così piano piano dalla <strong>schiavitù</strong> del <strong>"Lavoro per generare Denaro"</strong> e trasformando le nostre <strong>Capacitá</strong> in ' +
|
||||
'<strong>Risorse Umane</strong> per poterci sostenere e vivere in <strong>Armonia</strong> con gli altri.',
|
||||
freesocial: {
|
||||
title: 'Free Social',
|
||||
descr: 'Una Community organizzata per <strong>Categorie</strong>, dove potrai unirti a <strong>Gruppi Tematici</strong>, ' +
|
||||
'Condividere <strong>Esperienze</strong> e unire Competenze per organizzare e sostenere <strong>Progetti Innovativi</strong> per il Popolo.<br><br>' +
|
||||
'Verranno evidenziati sviluppi <strong>Etici</strong> come l\'<strong>Auto-Produzione</strong>, la <strong>Sostenibilitá</strong>, ' +
|
||||
'la Buona <strong>Salute Naturale</strong> e il <strong>Rispetto per l\'Ambiente</strong> e per tutti gli <strong>Esseri Viventi</strong> di questo ' +
|
||||
'<strong>Pianeta</strong>. Chiunque potrá esprimere il proprio <strong>Consenso o Dissenso</strong> partecipando a <strong>Sondaggi Interattivi</strong>' +
|
||||
' e realizzare insieme i <strong>Cambiamenti</strong> necessari alla nostra Società.',
|
||||
},
|
||||
freetalent: {
|
||||
title: 'Free Talent',
|
||||
descr: 'Condividi i tuoi <strong>Talenti</strong> e <strong>Abilità</strong>, ' +
|
||||
'al posto del denaro guadagnagnerai <strong>Tempo</strong>.<br> ' +
|
||||
'<strong>"1 ora"</strong> diventa moneta di scambio, uguale per tutti.<br>' +
|
||||
'Potrai utilizzare questi tuoi <strong>"Crediti Tempo"</strong> per soddisfare le tue necessità, cercando nelle <strong>Competenze Disponibili</strong>.<br>' +
|
||||
'Nel Dare e Ricevere, si creeranno così legami di <strong>Amicizia, Solidarietà, Cooperazione e Divertimento</strong><br><br>' +
|
||||
'Questo progetto vuole diffondere, ora in maniera informatizzata, questa realtà che gia esiste da tanti anni, e viene chiamata <strong>"Banca del Tempo"</strong>. ' +
|
||||
'Le <strong>segreterie</strong> sparse in tutto il mondo, serviranno a dare maggiore <strong>affidabilità</strong> e <strong>fiducia</strong> negli scambi di talenti tra persone sconosciute. ' +
|
||||
'Creeremo così una <strong>rete di fiducia</strong> nel vicinato, come giá viene praticato in numerosi <strong>Ecovillaggi</strong> e Comunità del mondo.',
|
||||
},
|
||||
freegas: {
|
||||
title: 'Free G.A.S.',
|
||||
descr: 'Ti piacerebbe utilizzare una App che ti permetta facilmente di acquistare Prodotti Locali direttamente dal <strong>Produttore</strong>?<br>' +
|
||||
'Con i <strong>Gruppi di Acquisto Solidale</strong> si evitano intermediazioni inutili, ottenendo parecchi benefici tra cui:<br>' +
|
||||
'<ul class="mylist" style="padding-left: 20px;"><li><strong>Qualitá Superiore</strong> del prodotto</li>' +
|
||||
'<li>Le <strong>Recensioni</strong> dei consumatori favoriranno i Produttori con Sani Intenti</li>' +
|
||||
'<li>Possiblità d\'interagire con il Produttore</li>' +
|
||||
'<li>Apertura alle Relazioni tra persone, condividendo <strong>Ricette</strong> e <strong>Consigli</strong> preziosi</li>' +
|
||||
'<li><strong>Risparmio</strong> di soldi (prezzi all\'Ingrosso)</li>' +
|
||||
'<li>Valorizzare il <strong>Territorio</strong> e l\'Economia <strong>Locale</strong></li>' +
|
||||
'<li>Condizioni <strong>Eque</strong> per i Lavoratori</li>' +
|
||||
'<li>Ridotto <strong>Impatto Ambientale</strong></ul>',
|
||||
},
|
||||
freeliving: {
|
||||
title: 'Free Co-Living',
|
||||
descr: 'Unire più realtà, condividendo l\'esperienza di abitare insieme, per un periodo definito:<br>' +
|
||||
'1) C\'è chi <strong>Vive solo</strong> ed ha una casa.<br>' +
|
||||
'2) Chi ha bisogno di un <strong>alloggio</strong> temporaneo.<br><br>' +
|
||||
'Oggi sempre più persone <strong>abitano da sole</strong> e vorrebbero continuare a vivere nella propria abitazione.<br>' +
|
||||
'Altre persone invece hanno bisogno di una <strong>stanza</strong>, per scelta o per necessita, ed in cambio sono disponibili a ' +
|
||||
'<strong>contribuire alle spese</strong> per le utenze domestiche o magari <strong>aiutare</strong> la persona a <strong>fare la spesa</strong>, cucinare, <strong>pulire casa</strong> oppure offrendogli semplicemente <strong>compagnia</strong>.<br><br>' +
|
||||
'Tramite questo strumento, le persone potranno trovarsi, mettersi in contatto e decidere in che forma <strong>co-abitare</strong> e per quanto tempo. Le <strong>recensioni</strong> rilasciate ed il <strong>dettaglio</strong> dei profili utenti, ' +
|
||||
'aiuterà nella scelta della persona più in <strong>sintonia</strong>.'
|
||||
|
||||
},
|
||||
freecollabora: {
|
||||
title: 'Chi può Collaborare?',
|
||||
descr: 'Tutti coloro che sono in linea con <strong>Princìpi Etici</strong> e ricerca del <strong>Benessere Globale del Pianeta</strong><br>' +
|
||||
'Pertanto sono i benvenuti:' +
|
||||
'<ul class="mylist" style="padding-left: 20px;">' +
|
||||
'<li><strong>Associazioni no-profit, Ecovillaggi, Comunità</strong></li>' +
|
||||
'<li>Gruppi che intendono promuovere <strong>Progetti Sociali Innovativi</strong> per una <strong>Decrescita Felice</strong></li>' +
|
||||
'<li>Chi gestisce un <strong>Gruppo di Acquisto Solidale (G.A.S.)</strong></li>' +
|
||||
'<li><strong>Produttori Locali Etici</strong></li>' +
|
||||
'<li>Chi gestisce una <strong>Banca del Tempo</strong></li>' +
|
||||
'<li><strong>Chiunque voglia partecipare</strong>, nella forma che ritiene più opportuna.</li>' +
|
||||
'</ul>',
|
||||
},
|
||||
freesostieni: {
|
||||
title: 'Come Sostenere il progetto?',
|
||||
descr: '<ul class="mylist" style="padding-left: 20px;">' +
|
||||
'<li><strong>Condividendolo</strong> a tutti coloro che vogliono far parte insieme della crescita e sviluppo di una Nuova Era</li>' +
|
||||
'<li>Rispondendo ai <strong>Sondaggi Popolari</strong> e lasciando <strong>Feedback</strong></li>' +
|
||||
'<li>Tramite una <strong>donazione</strong> (<strong>anche 1€</strong> ) per le spese.<br>' +
|
||||
'</ul>' +
|
||||
'Vedo un <strong>futuro</strong> dove non si utilizzerà più denaro. Dove le persone si <strong>aiuteranno</strong> a vicenda e non avranno bisogno di "possedere" cose, ma le <strong>condivideranno</strong> con gli altri.<br>',
|
||||
},
|
||||
multiplatform: {
|
||||
title: 'Multi-piattaforma',
|
||||
descr: 'E\' compatibile con Google Chrome, Firefox, Safari, iOS, Android e PC. L\'Applicazione s\'installa facilmente, senza passare dallo store. ' +
|
||||
'basta condividere il nome del sito <strong>www.freeplanet.app</strong>.<br>' +
|
||||
'Dopo la registrazione chiederà di aggiungerlo alla lista delle applicazioni e sullo sfondo',
|
||||
},
|
||||
free: {
|
||||
title: 'Gratuita, Open Source e Niente Pubblicità',
|
||||
descr: 'Questa App <strong>non è in vendita</strong>, non ha scopi commerciali, <strong>non ha prezzo</strong> ed appartiene al <strong>Popolo del Nuovo Mondo</strong>.<br>Chiunque potrá utilizzarla e beneficiarne.<br>A me il compito di gestirla e proteggerla. ' +
|
||||
'Verranno accettate solo donazioni Libere di privati ed Associazioni no-profit, in linea con i Principi, che serviranno per coprire le spese.<br>' +
|
||||
'<strong>Grazie a Tutti per il sostegno</strong>. '
|
||||
},
|
||||
contacts: 'Contatti'
|
||||
},
|
||||
pages: {
|
||||
home: 'Principale',
|
||||
SignUp: 'Registrazione',
|
||||
SignIn: 'Login',
|
||||
vreg: 'Verifica Reg',
|
||||
Test: 'Test',
|
||||
Category: 'Categorie',
|
||||
Todo: 'Todo',
|
||||
personal: 'Personale',
|
||||
work: 'Lavoro',
|
||||
shopping: 'Spesa',
|
||||
Admin: 'Admin',
|
||||
Test1: 'Test1',
|
||||
Test2: 'Test2',
|
||||
Projects: 'Progetti Condivisi',
|
||||
MyProjects: 'Progetti Personali'
|
||||
},
|
||||
components: {
|
||||
authentication: {
|
||||
login: {
|
||||
@@ -244,6 +131,7 @@ const messages = {
|
||||
proj: {
|
||||
newproj: 'Titolo Progetto',
|
||||
newsubproj: 'Titolo Sotto-Progetto',
|
||||
insertbottom: 'Inserisci Nuovo Project',
|
||||
longdescr: 'Descrizione',
|
||||
hoursplanned: 'Ore Preventivate',
|
||||
hoursadded: 'Ore Aggiuntive',
|
||||
@@ -256,8 +144,36 @@ const messages = {
|
||||
endwork_estimate: 'Data fine lavori stimata',
|
||||
privacyread: 'Chi lo puo vedere:',
|
||||
privacywrite: 'Chi lo puo modificare:',
|
||||
totalphases: 'Totale Fasi'
|
||||
totalphases: 'Totale Fasi',
|
||||
themecolor: 'Tema Colore',
|
||||
themebgcolor: 'Tema Colore Sfondo'
|
||||
},
|
||||
cal: {
|
||||
starttime: 'Dalle',
|
||||
endtime: 'alle',
|
||||
duration: 'Durata',
|
||||
hours: 'Orario',
|
||||
when: 'Quando',
|
||||
where: 'Dove',
|
||||
teacher: 'Con',
|
||||
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'
|
||||
},
|
||||
newsletter: {
|
||||
name: 'Il tuo Nome',
|
||||
namehint: 'Nome e Cognome',
|
||||
email: 'La tua Email',
|
||||
submit: 'Iscriviti',
|
||||
reset: 'Cancella',
|
||||
typesomething: 'Compilare correttamente il campo',
|
||||
acceptlicense: 'Accetto la licenza e i termini',
|
||||
license: 'Devi prima accettare la licenza e i termini',
|
||||
submitted: 'Iscritto'
|
||||
}
|
||||
},
|
||||
'es': {
|
||||
dialog: {
|
||||
@@ -266,6 +182,7 @@ const messages = {
|
||||
no: 'No',
|
||||
delete: 'Borrar',
|
||||
cancel: 'Cancelar',
|
||||
today: 'Hoy',
|
||||
msg: {
|
||||
titledeleteTask: 'Borrar Tarea',
|
||||
deleteTask: 'Quieres borrar {mytodo}?'
|
||||
@@ -274,123 +191,6 @@ const messages = {
|
||||
comp: {
|
||||
Conta: "Conta",
|
||||
},
|
||||
msg: {
|
||||
hello: 'Buenos Días',
|
||||
myAppName: 'FreePlanet',
|
||||
underconstruction: 'App en construcción...',
|
||||
myDescriz: '',
|
||||
sottoTitoloApp: 'El primer Verdadero Social',
|
||||
sottoTitoloApp2: 'Libre, justo y Solidario',
|
||||
sottoTitoloApp3: 'Donde vive Conciencia y Ayuda comunitaria',
|
||||
sottoTitoloApp4: 'Gratis y sin publicidad',
|
||||
},
|
||||
homepage: {
|
||||
descrapp_title1: 'Unidos para evolucionar y experimentar',
|
||||
descrapp_pag1: 'Redescubra cómo el valor de <strong>Compartir</strong> y <strong>Cooperación</strong> puede ayudarnos a encontrar el profundo ' +
|
||||
'sentido de la <strong>Vida</strong>, perdido en esta sociedad consumista, y mostrando esos <strong>Principios Naturales Saludables</strong> y la <strong>Hermandad Humana</strong>' +
|
||||
'que toda la población antigua conocía bien.',
|
||||
descrapp_pag2: 'Ha llegado el momento de utilizar las nuevas herramientas <strong>tecnológicas</strong> en nuestro <strong>favor</strong>, para <strong>liberarnos</strong> ' +
|
||||
'tan lentamente desde la <strong>esclavitud</strong> de <strong>"Trabaja para generar dinero"</strong> y transformando nuestra <strong>Capacidad</strong> en' +
|
||||
'<strong>Recursos humanos</strong> para poder apoyar y vivir en <strong>Armonia</strong> con otros.',
|
||||
freesocial: {
|
||||
title: 'Free Social',
|
||||
descr: 'Una comunidad organizada por <strong>Categorías</strong>, donde puedes unirte a <strong>Grupos temáticos</strong>, ' +
|
||||
'Compartir <strong>experiencias</strong> y combinar habilidades para organizar y apoyar <strong>proyectos innovadores</strong> para la gente.<br><br>' +
|
||||
'Los desarrollos <strong>éticos</strong> como <strong>:<br>Auto-producción</strong>, <strong>Sostenibilidad</strong>, ' +
|
||||
'la Buena <strong>Salud natural</strong> y <strong>Respeto por el Medio Ambiente</strong> y para todos los <strong>Seres vivos</strong> de este' +
|
||||
'<strong>Planeta</strong>. Cualquiera puede expresar su <strong>consentimiento o disidencia</strong> participando en <strong>Encuestas Interactivas</strong> ' +
|
||||
'y llevar a cabo juntos los <strong>Cambios</strong> necesarios para nuestra sociedad.',
|
||||
},
|
||||
freetalent: {
|
||||
title: 'Free Talent',
|
||||
descr: 'Comparte tus <strong>Talentos</strong> y <strong>Habilidades</strong>, ' +
|
||||
'en lugar de dinero, ganarás <strong>Tiempo</strong>. <br>' +
|
||||
'<strong>"1 hora"</strong> se convierte en una moneda de intercambio, igual para todos. <br>' +
|
||||
'Puedes usar estos <strong>"Créditos de tiempo"</strong> para satisfacer tus necesidades, buscando en <strong>Habilidades disponibles</strong>. <br> ' +
|
||||
'En Dar y Recibir, crearemos así vínculos de <strong>Amistad, Solidaridad, Cooperación y Diversión</strong>. <br> <br>' +
|
||||
'Este proyecto apunta a difundir esta realidad, que ya existe desde hace muchos años y se llama <strong>"Banco de tiempo"</strong>. ' +
|
||||
'Las <strong>secretarías</strong> dispersas por todo el mundo, servirán para dar mayor <strong>fiabilidad</strong> y <strong>confianza</strong> en el intercambio de talentos entre personas desconocidas. ' +
|
||||
'Así crearemos una <strong>red de confianza</strong> en el vecindario, como ya se practica en numerosos <strong>Ecoaldeas</strong> y en la Comunidades del mundo.',
|
||||
},
|
||||
freegas: {
|
||||
title: 'Free G.A.S. (G.C.S.)',
|
||||
descr: '¿Le gustaría usar una aplicación que le permita comprar productos locales directamente desde el <strong>Productor</strong>? <br> ' +
|
||||
'Con <strong>Grupos de Compra Solidarios</strong> evitamos intermediarios innecesarios, obteniendo muchos beneficios, incluyendo: <br>' +
|
||||
'<ul class = "mylist" style = "padding-left: 20px;"> <li> <strong>Superior Quality</strong> del producto </li>' +
|
||||
'<li> Opiniones <strong>de consumidores</strong> favorecerá a los productores con intenciones saludables </li>' +
|
||||
'<li> Posibilidad de interactuar con el Productor </li>' +
|
||||
'<li> Abierto a relaciones entre personas, compartiendo <strong>Recetas</strong> y <strong>Consejos</strong> preciosos </li>' +
|
||||
'<li> <strong>Ahorros</strong> de dinero (precios al por mayor) </li>' +
|
||||
'<li> Mejorando el <strong>Territorio</strong> y la Economía <strong>Local</strong> </li>' +
|
||||
'<li> Condiciones <strong>Justa</strong> para Trabajadores </li>' +
|
||||
'<li> Reducido <strong>Impacto Ambiental</strong> </ul>',
|
||||
},
|
||||
freeliving: {
|
||||
title: 'Free Co-Living',
|
||||
descr: 'Para unir más realidad, compartiendo la experiencia de vivir juntos, por un período definido: <br> ' +
|
||||
'1) Hay quien <strong>vive solo</strong> y tiene un hogar. <br>' +
|
||||
'2) Quién necesita un alojamiento <strong>temporal</strong>. <br><br>' +
|
||||
'Hoy en día, más y más personas <strong>viven solas</strong> y les gustaría seguir viviendo en sus propios hogares. <br>' +
|
||||
'Otras personas necesitan una <strong>Habitación</strong>, por elección o por necesidad, y a cambio están disponibles en' +
|
||||
'<strong>contribuir a los gastos</strong> para los billetes de casa o tal vez <strong>ayuda</strong> a la persona mayor para <strong>ir de compras</strong>, cocinar, <strong>limpiar casa</strong> o simplemente ofreciéndole <strong>compañía</strong>. <br><br> ' +
|
||||
'A través de esta herramienta, las personas pueden ponerse en contacto y decidir en qué forma <strong>co-habitar</strong>. Los <strong>comentarios</strong> publicados y el <strong>detalle</strong> de los perfiles de usuario, ' +
|
||||
'ayudará a elegir a la persona más en <strong>armonía</strong>.'
|
||||
|
||||
},
|
||||
freecollabora: {
|
||||
title: '¿Quién puede colaborar?',
|
||||
descr: 'Todos aquellos que están en línea con <strong>Principios éticos</strong> y la investigación de <strong>Bienestar Global del Planeta</strong> <br> ' +
|
||||
'Por eso son bienvenidos:' +
|
||||
'<ul class = "mylist" style = "padding-left: 20px;">' +
|
||||
'<li> <strong>Asociaciones sin ánimo de lucro, Ecoaldeas, Comunidades</strong> </li>' +
|
||||
'<li> Grupos que desean promover <strong>Proyectos sociales innovadores</strong> para <strong>Feliz Decrecimiento</strong> </li>' +
|
||||
'<li> Quién administra un <strong>Grupo de Compra Solidario (G.C.S.)</strong> </li>' +
|
||||
'<li><strong>Productores locales Éticos</strong></li>' +
|
||||
'<li> Quién administra un <strong>Banco de Tiempo</strong> </li>' +
|
||||
'<li> <strong>Cualquier persona que quiera participar</strong>, en la forma que considere más apropiada. </li>' +
|
||||
'</ul>',
|
||||
},
|
||||
freesostieni: {
|
||||
title: '¿Cómo apoyar el proyecto?',
|
||||
descr: '<ul class="mylist" style="padding-left: 20px;">' +
|
||||
'<li> <strong>Compartiéndolo</strong> a todos aquellos que quieran unirse en el crecimiento y desarrollo de una Nueva Era </li> ' +
|
||||
'<li> Respondiendo a <strong>Encuestas populares</strong> y dejando <strong>Comentarios</strong> </li>' +
|
||||
'<li> A través de una <strong>donación</strong> (<strong>incluso € 1</strong>) para los gastos. <br>' +
|
||||
'</ul>' +
|
||||
'<br>Veo un <strong>futuro</strong> en el que ya no usarás dinero. Donde las personas <strong>se ayudarán unos a otros</strong> y no necesiten "poseer" cosas, pero <strong>compartirán</strong> con otros. <br> ',
|
||||
},
|
||||
multiplatform: {
|
||||
title: 'Multi-plataforma',
|
||||
descr: 'Compatible con Google Chrome, Firefox, Safari, iOS, Android y PC. La aplicación se instala fácilmente, sin pasar por el store. ' +
|
||||
'para compartirlo, necesita solo el nombre del sitio web: <strong>www.freeplanet.app</strong>.<br>' +
|
||||
'Después del registro, le pedirá que lo agregue a la lista de aplicaciones y en la pantalla.',
|
||||
},
|
||||
free: {
|
||||
title: 'Libre, Código Abierto y Sin Publicidad',
|
||||
descr: 'Esta aplicación <strong>no está a la venta</strong>, no tiene un propósito comercial, <strong>no tiene precio</strong> y pertenece a <strong>la Gente del Nuevo Mundo</strong>.<br>' +
|
||||
'Cualquiera puede usarla y beneficiarse.<br> A mí la tarea de gestionarlo y protegerlo. ' +
|
||||
'Solo se aceptarán donaciones de particulares y asociaciones sin änimo de lucro, en línea con los Principios, que se utilizarán para cubrir los gastos. <br>' +
|
||||
'<strong>Gracias a todos por el apoyo</strong>. '
|
||||
},
|
||||
contacts: 'Contactos'
|
||||
},
|
||||
pages: {
|
||||
home: 'Principal',
|
||||
SignUp: 'Nueva Cuenta',
|
||||
SignIn: 'Entrar',
|
||||
vreg: 'Verifica Reg',
|
||||
Test: 'Test',
|
||||
Category: 'Categorías',
|
||||
Todo: 'Tareas',
|
||||
personal: 'Personal',
|
||||
work: 'Trabajo',
|
||||
shopping: 'Compras',
|
||||
Admin: 'Administración',
|
||||
Test1: 'Test1',
|
||||
Test2: 'Test2',
|
||||
Projects: 'Proyectos Compartidos',
|
||||
MyProjects: 'Proyectos Personales',
|
||||
},
|
||||
components: {
|
||||
authentication: {
|
||||
login: {
|
||||
@@ -498,8 +298,10 @@ const messages = {
|
||||
proj: {
|
||||
newproj: 'Título Projecto',
|
||||
newsubproj: 'Título Sub-Projecto',
|
||||
insertbottom: 'Añadir nuevo Proyecto',
|
||||
longdescr: 'Descripción',
|
||||
hoursplanned: 'Horas Estimadas',
|
||||
hoursleft: 'Horas Restantes',
|
||||
hoursadded: 'Horas Adicional',
|
||||
hoursworked: 'Horas Trabajadas',
|
||||
begin_development: 'Comienzo desarrollo',
|
||||
@@ -510,8 +312,36 @@ const messages = {
|
||||
endwork_estimate: 'Fecha estimada de finalización',
|
||||
privacyread: 'Quien puede verlo:',
|
||||
privacywrite: 'Quien puede modificarlo:',
|
||||
totalphases: 'Fases totales'
|
||||
totalphases: 'Fases totales',
|
||||
themecolor: 'Tema Colores',
|
||||
themebgcolor: 'Tema Colores Fondo'
|
||||
},
|
||||
cal: {
|
||||
starttime: 'Inicio',
|
||||
endtime: 'fin',
|
||||
duration: 'Duración',
|
||||
hours: 'Tiempo',
|
||||
when: 'Cuando',
|
||||
where: 'Donde',
|
||||
teacher: 'Con',
|
||||
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'
|
||||
},
|
||||
newsletter: {
|
||||
name: 'Tu Nombre',
|
||||
namehint: 'Nombre y Apellido',
|
||||
email: 'tu correo',
|
||||
submit: 'Subscribete',
|
||||
reset: 'Reiniciar',
|
||||
typesomething: 'Llenar el campo',
|
||||
acceptlicense: 'Acepto la licencia y los términos',
|
||||
license: 'Necesitas aceptar la licencia y los términos primero',
|
||||
submitted: 'Subscrito'
|
||||
}
|
||||
},
|
||||
'enUs': {
|
||||
dialog: {
|
||||
@@ -520,6 +350,7 @@ const messages = {
|
||||
no: 'No',
|
||||
delete: 'Delete',
|
||||
cancel: 'Cancel',
|
||||
today: 'Today',
|
||||
msg: {
|
||||
titledeleteTask: 'Delete Task',
|
||||
deleteTask: 'Delete Task {mytodo}?'
|
||||
@@ -528,123 +359,6 @@ const messages = {
|
||||
comp: {
|
||||
Conta: "Count",
|
||||
},
|
||||
msg: {
|
||||
hello: 'Hello!',
|
||||
myAppName: 'FreePlanet',
|
||||
underconstruction: 'App in construction...',
|
||||
myDescriz: '',
|
||||
sottoTitoloApp: 'The first Real Social',
|
||||
sottoTitoloApp2: 'Free, Fair and Equitable',
|
||||
sottoTitoloApp3: 'Where the conscience and community help live',
|
||||
sottoTitoloApp4: 'Free and without advertising',
|
||||
},
|
||||
homepage: {
|
||||
descrapp_title1: 'Together to Evolve and Experiment',
|
||||
descrapp_pag1: 'Rediscover how the value of <strong>Sharing</strong> and <strong>Cooperation</strong>, can help us find the deep meaning of' +
|
||||
'<strong>Life</strong>, lost in this consumer society, and showing those <strong>Healthy Natural Principles</strong> and Human <strong>Brotherhood</strong>' +
|
||||
'that entire ancient populations knew well.',
|
||||
descrapp_pag2: 'The time has come to use the new <strong>Technological</strong> tools in our <strong>favor</strong>, to <strong>Free ourselves</strong> ' +
|
||||
'so slowly from the <strong>slavery</strong> of the <strong>"Work to generate Money"</strong> and transforming our <strong>Capacity</strong> into' +
|
||||
'<strong>Human Resources</strong> to be able to support and live in <strong>Harmony</strong> with others.',
|
||||
freesocial: {
|
||||
title: 'Free Social',
|
||||
descr: 'A Community organized by <strong>Categories</strong>, where you can join <strong>Thematic Groups</strong>, ' +
|
||||
'Share <strong>Experiences</strong> and combine Skills to organize and support <strong>Innovative Projects</strong> for the People.<br><br>' +
|
||||
'<strong>Ethical</strong> developments such as <strong>Auto-Production</strong>, <strong>Sustainability</strong>, ' +
|
||||
'Good <strong>Natural Health</strong> and <strong>Respect for the Environment</strong> and for all <strong>Living Beings</strong> of this' +
|
||||
'<strong>Planet</strong>. Anyone can express their <strong>Consent or Dissent</strong> by participating in <strong>Interactive Surveys</strong> ' +
|
||||
'and carry out together the <strong>Changes</strong> needed for our society.',
|
||||
},
|
||||
freetalent: {
|
||||
title: 'Free Talent',
|
||||
descr: 'Share your <strong>Talents</strong> and <strong>Skills</strong>, ' +
|
||||
'instead of money, you\'ll earn <strong>Time</strong>. <br>' +
|
||||
'<strong>"1 hour"</strong> becomes a currency of exchange, equal for all. <br>' +
|
||||
'You can use these <strong>"Time Credits"</strong> to meet your needs, looking in <strong>Available Skills</strong>. <br>' +
|
||||
'In Giving and Receiving, we will thus create bonds of <strong>Friendship, Solidarity, Cooperation and Enjoyment</strong> <br> <br>' +
|
||||
'This project aims to spread this reality, which already exists for many years and is called <strong>"Time Bank"</strong>. ' +
|
||||
'The <strong>secretariats</strong> in all over the world, will serve an extra to give greater <strong>reliability</strong> and <strong>trust</strong> in the exchange of talents between unknown people. ' +
|
||||
'We will thus create a <strong>trust network</strong> in the neighborhood, as is already practiced in numerous <strong>Ecovillages</strong> and Community of the world. ',
|
||||
},
|
||||
freegas: {
|
||||
title: 'Free G.A.S.',
|
||||
descr: 'Would you like to use an App that allows you to easily Buy Local Products directly from <strong>Manufacturer</strong>? <br> ' +
|
||||
'With <strong>Solidarity Purchase Groups</strong> (in Italian: "Gruppo di Aacquisto Solidale") we avoid unnecessary intermediaries, obtaining many benefits including: <br>' +
|
||||
'<ul class="mylist" style="padding-left: 20px;"> <li> <strong>Superior Quality</strong> of the product </li>' +
|
||||
'<li> Consumer <strong>Reviews</strong> will favor Producers with Healthy Intents </li>' +
|
||||
'<li> Possibility to interact with the Producer </li>' +
|
||||
'<li> Open to Relations between people, sharing <strong>Recipes</strong> and precious <strong>Tips</strong> </li>' +
|
||||
'<li> <strong>Savings</strong> money (wholesale prices) </li>' +
|
||||
'<li> Enhancing the <strong>Territory</strong> and the <strong>Local Economy</strong> </li>' +
|
||||
'<li> <strong>Fair Conditions</strong> for Workers </li>' +
|
||||
'<li> Reduced <strong>Environmental Impact</strong> </ul>'
|
||||
},
|
||||
freeliving: {
|
||||
title: 'Free Co-Living',
|
||||
descr: 'Join more reality, sharing the experience of living together, for a defined period: <br> ' +
|
||||
'1) Someone <strong>Lives alone</strong> and has a house. <br>' +
|
||||
'2) Who needs a temporary <strong> accommodation </strong>. <br><br>' +
|
||||
'Today more and more people <strong> live alone </strong> and would like to continue living in their own house. <br>' +
|
||||
'Other people instead need a <strong>room</strong>, by choice or by necessity, and in return they are available to' +
|
||||
'<strong>contribute to expenses</strong> for households or maybe <strong>help</strong> to <strong>go shopping</strong>, cooking, <strong>cleaning house</strong> or simply offering him <strong>companionship</strong>. <br> ' +
|
||||
'Through this tool, people can get in touch and decide in which way <strong>co-living</strong>. The <strong>reviews</strong> released and the <strong>detail</strong> of user profiles, ' +
|
||||
'will help in <strong>choosing</strong> the person more in <strong>tune</strong>.'
|
||||
|
||||
},
|
||||
freecollabora: {
|
||||
title: 'Who can collaborate?',
|
||||
descr: 'All those who are in line with <strong>Ethical Principles</strong> and research of <strong>Global Wellness of the Planet</strong> <br> ' +
|
||||
'Therefore they are welcome:' +
|
||||
'<ul class = "mylist" style = "padding-left: 20px;">' +
|
||||
'<li> <strong>Non-profit associations, Ecovillages, Communities</strong> </li>' +
|
||||
'<li> Groups that want to promote <strong>Innovative Social Projects</strong> for <strong>Happy Degrowth</strong> </li>' +
|
||||
'<li> Who manages a <strong>Solidarity Purchase Group</strong> </li>' +
|
||||
'<li><strong>Local Ethical Producers</strong></li>' +
|
||||
'<li> Who manages a <strong>Time Bank</strong> </li>' +
|
||||
'<li> <strong>Anyone who wants to participate</strong>, in the form it considers most appropriate. </li>' +
|
||||
'</ul>',
|
||||
},
|
||||
freesostieni: {
|
||||
title: 'How to support the project?',
|
||||
descr: '<ul class="mylist" style="padding-left: 20px;">' +
|
||||
'<li> <strong>Sharing it</strong> to all those who want to join together in the growth and development of a New Era </li> ' +
|
||||
'<li> Answering to <strong>Popular Polls</strong> and leaving <strong>Feedback</strong> </li>' +
|
||||
'<li> Through a <strong>donation</strong> (<strong>even $ 1</strong>) for expenses. <br>' +
|
||||
'</ul><br>' +
|
||||
'I see a <strong>future</strong> where you will no longer use money. Where people <strong>will help each other</strong> and won\'t need to "own" things, but <strong>will share</strong> with others. <br> ',
|
||||
},
|
||||
multiplatform: {
|
||||
title: 'Multi-platform',
|
||||
descr: 'It is compatible with Google Chrome, Firefox, Safari, iOS, Android and PC. The Application is easily installed, without going through the store. ' +
|
||||
'just share the nametranslate of this site <strong>www.freeplanet.app</strong>.<br>' +
|
||||
'After registration it will ask to be added to the application list and in the screen',
|
||||
},
|
||||
free: {
|
||||
title: 'Free, Open Source and No Advertising',
|
||||
descr: 'This App <strong>is not for sale</strong>, has no commercial purpose, <strong>is priceless</strong> and belongs to the <strong>New World People</strong>.' +
|
||||
'<br>Anyone can use it and benefit from it.<br>To me the task of managing it and protecting it. ' +
|
||||
'Only donations from private individuals and non-profit associations will be accepted, in line with the Principles, which will be used to cover the expenses. <br>' +
|
||||
'<strong>Thanks all for the support</strong>. '
|
||||
},
|
||||
contacts: 'Contacts'
|
||||
},
|
||||
pages: {
|
||||
home: 'Dashboard',
|
||||
SignUp: 'SignUp',
|
||||
SignIn: 'SignIn',
|
||||
vreg: 'Verify Reg',
|
||||
Test: 'Test',
|
||||
Category: 'Category',
|
||||
Todo: 'Todo',
|
||||
personal: 'Personal',
|
||||
work: 'Work',
|
||||
shopping: 'Shopping',
|
||||
Admin: 'Admin',
|
||||
Test1: 'Test1',
|
||||
Test2: 'Test2',
|
||||
Projects: 'Shared Projects',
|
||||
MyProjects: 'Personal Projects',
|
||||
},
|
||||
components: {
|
||||
authentication: {
|
||||
login: {
|
||||
@@ -752,8 +466,10 @@ const messages = {
|
||||
proj: {
|
||||
newproj: 'Project Title',
|
||||
newsubproj: 'SubProject Title',
|
||||
insertbottom: 'Insert New Project',
|
||||
longdescr: 'Description',
|
||||
hoursplanned: 'Estimated Hours',
|
||||
hoursleft: 'Left Hours',
|
||||
hoursadded: 'Additional Hours',
|
||||
hoursworked: 'Worked Hours',
|
||||
begin_development: 'Start Dev',
|
||||
@@ -764,9 +480,61 @@ const messages = {
|
||||
endwork_estimate: 'Estimated completion date',
|
||||
privacyread: 'Who can see it:',
|
||||
privacywrite: 'Who can modify if:',
|
||||
totalphases: 'Total Phase'
|
||||
totalphases: 'Total Phase',
|
||||
themecolor: 'Theme Color',
|
||||
themebgcolor: 'Theme Color Background'
|
||||
},
|
||||
cal: {
|
||||
starttime: 'From',
|
||||
endtime: 'to',
|
||||
duration: 'Duration',
|
||||
hours: 'Hours',
|
||||
when: 'When',
|
||||
where: 'Where',
|
||||
teacher: 'With',
|
||||
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'
|
||||
},
|
||||
newsletter: {
|
||||
name: 'Your name',
|
||||
namehint: 'Name and surname',
|
||||
email: 'Your email',
|
||||
submit: 'Subscribe',
|
||||
reset: 'Reset',
|
||||
typesomething: 'Please type something',
|
||||
acceptlicense: 'I accept the license and terms',
|
||||
license: 'You need to accept the license and terms first',
|
||||
submitted: 'Subscribed'
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
const msgit = { ...msg_website.it, ...msgglobal.it }
|
||||
const msges = { ...msg_website.es, ...msgglobal.es }
|
||||
const msgenUs = { ...msg_website.enUs, ...msgglobal.enUs }
|
||||
|
||||
|
||||
const messages = {
|
||||
it: { ...msgit,
|
||||
pages: { ...msg_website.it.pages, ...msgglobal.it.pages },
|
||||
msg: { ...msg_website.it.msg, ...msgglobal.it.msg },
|
||||
homepage: { ...msg_website.it.homepage, ...msgglobal.it.homepage },
|
||||
},
|
||||
es: { ...msges ,
|
||||
pages: { ...msg_website.es.pages, ...msgglobal.es.pages },
|
||||
msg: { ...msg_website.es.msg, ...msgglobal.es.msg },
|
||||
homepage: { ...msg_website.es.homepage, ...msgglobal.es.homepage }
|
||||
},
|
||||
enUs: { ...msgenUs ,
|
||||
pages: { ...msg_website.enUs.pages, ...msgglobal.enUs.pages },
|
||||
msg: { ...msg_website.enUs.msg, ...msgglobal.enUs.msg },
|
||||
homepage: { ...msg_website.enUs.homepage, ...msgglobal.enUs.homepage }
|
||||
},
|
||||
}
|
||||
|
||||
export default messages;
|
||||
|
||||
369
src/statics/i18n_website.js
Normal file
369
src/statics/i18n_website.js
Normal file
@@ -0,0 +1,369 @@
|
||||
const msg_website = {
|
||||
it: {
|
||||
pages: {
|
||||
home: 'Principale',
|
||||
SignUp: 'Registrazione',
|
||||
SignIn: 'Login',
|
||||
vreg: 'Verifica Reg',
|
||||
Test: 'Test',
|
||||
Category: 'Categorie',
|
||||
Todo: 'Todo',
|
||||
personal: 'Personale',
|
||||
work: 'Lavoro',
|
||||
shopping: 'Spesa',
|
||||
Admin: 'Admin',
|
||||
Test1: 'Test1',
|
||||
Test2: 'Test2',
|
||||
projects: 'Progetti',
|
||||
favproj: 'Favoriti',
|
||||
projall: 'Tutti',
|
||||
projectsShared: 'Miei Condivisi',
|
||||
myprojects: 'Miei Personali'
|
||||
},
|
||||
msg: {
|
||||
hello: 'Buongiorno',
|
||||
myAppName: 'FreePlanet',
|
||||
underconstruction: 'App in costruzione...',
|
||||
myDescriz: '',
|
||||
sottoTitoloApp: 'Il primo Vero Social',
|
||||
sottoTitoloApp2: 'Libero, Equo e Solidale',
|
||||
sottoTitoloApp3: 'dove Vive Consapevolezza e Aiuto Comunitario',
|
||||
sottoTitoloApp4: 'Gratuito e senza Pubblicità',
|
||||
},
|
||||
homepage: {
|
||||
descrapp_title1: 'Uniti per Evolvere e Sperimentare',
|
||||
descrapp_pag1: 'Riscopri come il valore della <strong>Condivisione</strong> e della <strong>Cooperazione</strong>, possa aiutarci a ritrovare il profondo ' +
|
||||
'senso della <strong>Vita</strong>, perduto in questa società consumista, e riporti quei <strong>Sani Pricìpi Naturali</strong> ed Umani di <strong>Fratellanza</strong>' +
|
||||
' che intere popolazioni antiche conoscevano bene.',
|
||||
descrapp_pag2: 'E\' giunta l\'ora di utilizzare i nuovi strumenti <strong>Tecnologici</strong> a nostro <strong>favore</strong>, per <strong>Liberarci</strong> ' +
|
||||
'così piano piano dalla <strong>schiavitù</strong> del <strong>"Lavoro per generare Denaro"</strong> e trasformando le nostre <strong>Capacitá</strong> in ' +
|
||||
'<strong>Risorse Umane</strong> per poterci sostenere e vivere in <strong>Armonia</strong> con gli altri.',
|
||||
freesocial: {
|
||||
title: 'Free Social',
|
||||
descr: 'Una Community organizzata per <strong>Categorie</strong>, dove potrai unirti a <strong>Gruppi Tematici</strong>, ' +
|
||||
'Condividere <strong>Esperienze</strong> e unire Competenze per organizzare e sostenere <strong>Progetti Innovativi</strong> per il Popolo.<br><br>' +
|
||||
'Verranno evidenziati sviluppi <strong>Etici</strong> come l\'<strong>Auto-Produzione</strong>, la <strong>Sostenibilitá</strong>, ' +
|
||||
'la Buona <strong>Salute Naturale</strong> e il <strong>Rispetto per l\'Ambiente</strong> e per tutti gli <strong>Esseri Viventi</strong> di questo ' +
|
||||
'<strong>Pianeta</strong>. Chiunque potrá esprimere il proprio <strong>Consenso o Dissenso</strong> partecipando a <strong>Sondaggi Interattivi</strong>' +
|
||||
' e realizzare insieme i <strong>Cambiamenti</strong> necessari alla nostra Società.',
|
||||
},
|
||||
freetalent: {
|
||||
title: 'Free Talent',
|
||||
descr: 'Condividi i tuoi <strong>Talenti</strong> e <strong>Abilità</strong>, ' +
|
||||
'al posto del denaro guadagnagnerai <strong>Tempo</strong>.<br> ' +
|
||||
'<strong>"1 ora"</strong> diventa moneta di scambio, uguale per tutti.<br>' +
|
||||
'Potrai utilizzare questi tuoi <strong>"Crediti Tempo"</strong> per soddisfare le tue necessità, cercando nelle <strong>Competenze Disponibili</strong>.<br>' +
|
||||
'Nel Dare e Ricevere, si creeranno così legami di <strong>Amicizia, Solidarietà, Cooperazione e Divertimento</strong><br><br>' +
|
||||
'Questo progetto vuole diffondere, ora in maniera informatizzata, questa realtà che gia esiste da tanti anni, e viene chiamata <strong>"Banca del Tempo"</strong>. ' +
|
||||
'Le <strong>segreterie</strong> sparse in tutto il mondo, serviranno a dare maggiore <strong>affidabilità</strong> e <strong>fiducia</strong> negli scambi di talenti tra persone sconosciute. ' +
|
||||
'Creeremo così una <strong>rete di fiducia</strong> nel vicinato, come giá viene praticato in numerosi <strong>Ecovillaggi</strong> e Comunità del mondo.',
|
||||
},
|
||||
freegas: {
|
||||
title: 'Free G.A.S.',
|
||||
descr: 'Ti piacerebbe utilizzare una App che ti permetta facilmente di acquistare Prodotti Locali direttamente dal <strong>Produttore</strong>?<br>' +
|
||||
'Con i <strong>Gruppi di Acquisto Solidale</strong> si evitano intermediazioni inutili, ottenendo parecchi benefici tra cui:<br>' +
|
||||
'<ul class="mylist" style="padding-left: 20px;"><li><strong>Qualitá Superiore</strong> del prodotto</li>' +
|
||||
'<li>Le <strong>Recensioni</strong> dei consumatori favoriranno i Produttori con Sani Intenti</li>' +
|
||||
'<li>Possiblità d\'interagire con il Produttore</li>' +
|
||||
'<li>Apertura alle Relazioni tra persone, condividendo <strong>Ricette</strong> e <strong>Consigli</strong> preziosi</li>' +
|
||||
'<li><strong>Risparmio</strong> di soldi (prezzi all\'Ingrosso)</li>' +
|
||||
'<li>Valorizzare il <strong>Territorio</strong> e l\'Economia <strong>Locale</strong></li>' +
|
||||
'<li>Condizioni <strong>Eque</strong> per i Lavoratori</li>' +
|
||||
'<li>Ridotto <strong>Impatto Ambientale</strong></ul>',
|
||||
},
|
||||
freeliving: {
|
||||
title: 'Free Co-Living',
|
||||
descr: 'Unire più realtà, condividendo l\'esperienza di abitare insieme, per un periodo definito:<br>' +
|
||||
'1) C\'è chi <strong>Vive solo</strong> ed ha una casa.<br>' +
|
||||
'2) Chi ha bisogno di un <strong>alloggio</strong> temporaneo.<br><br>' +
|
||||
'Oggi sempre più persone <strong>abitano da sole</strong> e vorrebbero continuare a vivere nella propria abitazione.<br>' +
|
||||
'Altre persone invece hanno bisogno di una <strong>stanza</strong>, per scelta o per necessita, ed in cambio sono disponibili a ' +
|
||||
'<strong>contribuire alle spese</strong> per le utenze domestiche o magari <strong>aiutare</strong> la persona a <strong>fare la spesa</strong>, cucinare, <strong>pulire casa</strong> oppure offrendogli semplicemente <strong>compagnia</strong>.<br><br>' +
|
||||
'Tramite questo strumento, le persone potranno trovarsi, mettersi in contatto e decidere in che forma <strong>co-abitare</strong> e per quanto tempo. Le <strong>recensioni</strong> rilasciate ed il <strong>dettaglio</strong> dei profili utenti, ' +
|
||||
'aiuterà nella scelta della persona più in <strong>sintonia</strong>.'
|
||||
|
||||
},
|
||||
freecollabora: {
|
||||
title: 'Chi può Collaborare?',
|
||||
descr: 'Tutti coloro che sono in linea con <strong>Princìpi Etici</strong> e ricerca del <strong>Benessere Globale del Pianeta</strong><br>' +
|
||||
'Pertanto sono i benvenuti:' +
|
||||
'<ul class="mylist" style="padding-left: 20px;">' +
|
||||
'<li><strong>Associazioni no-profit, Ecovillaggi, Comunità</strong></li>' +
|
||||
'<li>Gruppi che intendono promuovere <strong>Progetti Sociali Innovativi</strong> per una <strong>Decrescita Felice</strong></li>' +
|
||||
'<li>Chi gestisce un <strong>Gruppo di Acquisto Solidale (G.A.S.)</strong></li>' +
|
||||
'<li><strong>Produttori Locali Etici</strong></li>' +
|
||||
'<li>Chi gestisce una <strong>Banca del Tempo</strong></li>' +
|
||||
'<li><strong>Chiunque voglia partecipare</strong>, nella forma che ritiene più opportuna.</li>' +
|
||||
'</ul>',
|
||||
},
|
||||
freesostieni: {
|
||||
title: 'Come Sostenere il progetto?',
|
||||
descr: '<ul class="mylist" style="padding-left: 20px;">' +
|
||||
'<li><strong>Condividendolo</strong> a tutti coloro che vogliono far parte insieme della crescita e sviluppo di una Nuova Era</li>' +
|
||||
'<li>Rispondendo ai <strong>Sondaggi Popolari</strong> e lasciando <strong>Feedback</strong></li>' +
|
||||
'<li>Tramite una <strong>donazione</strong> (<strong>anche 1€</strong> ) per le spese.<br>' +
|
||||
'</ul>' +
|
||||
'Vedo un <strong>futuro</strong> dove non si utilizzerà più denaro. Dove le persone si <strong>aiuteranno</strong> a vicenda e non avranno bisogno di "possedere" cose, ma le <strong>condivideranno</strong> con gli altri.<br>',
|
||||
},
|
||||
multiplatform: {
|
||||
title: 'Multi-piattaforma',
|
||||
descr: 'E\' compatibile con Google Chrome, Firefox, Safari, iOS, Android e PC. L\'Applicazione s\'installa facilmente, senza passare dallo store. ' +
|
||||
'basta condividere il nome del sito <strong>www.freeplanet.app</strong>.<br>' +
|
||||
'Dopo la registrazione chiederà di aggiungerlo alla lista delle applicazioni e sullo sfondo',
|
||||
},
|
||||
free: {
|
||||
title: 'Gratuita, Open Source e Niente Pubblicità',
|
||||
descr: 'Questa App <strong>non è in vendita</strong>, non ha scopi commerciali, <strong>non ha prezzo</strong> ed appartiene al <strong>Popolo del Nuovo Mondo</strong>.<br>Chiunque potrá utilizzarla e beneficiarne.<br>A me il compito di gestirla e proteggerla. ' +
|
||||
'Verranno accettate solo donazioni Libere di privati ed Associazioni no-profit, in linea con i Principi, che serviranno per coprire le spese.<br>' +
|
||||
'<strong>Grazie a Tutti per il sostegno</strong>. '
|
||||
},
|
||||
contacts: 'Contatti'
|
||||
},
|
||||
},
|
||||
es: {
|
||||
pages: {
|
||||
home: 'Principal',
|
||||
SignUp: 'Nueva Cuenta',
|
||||
SignIn: 'Entrar',
|
||||
vreg: 'Verifica Reg',
|
||||
Test: 'Test',
|
||||
Category: 'Categorías',
|
||||
Todo: 'Tareas',
|
||||
personal: 'Personal',
|
||||
work: 'Trabajo',
|
||||
shopping: 'Compras',
|
||||
Admin: 'Administración',
|
||||
Test1: 'Test1',
|
||||
Test2: 'Test2',
|
||||
projects: 'Proyectos',
|
||||
favproj: 'Favoritos',
|
||||
projall: 'Todos',
|
||||
projectsShared: 'Mis Compartidos',
|
||||
myprojects: 'Mis Personales',
|
||||
},
|
||||
msg: {
|
||||
hello: 'Buenos Días',
|
||||
myAppName: 'FreePlanet',
|
||||
underconstruction: 'App en construcción...',
|
||||
myDescriz: '',
|
||||
sottoTitoloApp: 'El primer Verdadero Social',
|
||||
sottoTitoloApp2: 'Libre, justo y Solidario',
|
||||
sottoTitoloApp3: 'Donde vive Conciencia y Ayuda comunitaria',
|
||||
sottoTitoloApp4: 'Gratis y sin publicidad',
|
||||
},
|
||||
homepage: {
|
||||
descrapp_title1: 'Unidos para evolucionar y experimentar',
|
||||
descrapp_pag1: 'Redescubra cómo el valor de <strong>Compartir</strong> y <strong>Cooperación</strong> puede ayudarnos a encontrar el profundo ' +
|
||||
'sentido de la <strong>Vida</strong>, perdido en esta sociedad consumista, y mostrando esos <strong>Principios Naturales Saludables</strong> y la <strong>Hermandad Humana</strong>' +
|
||||
'que toda la población antigua conocía bien.',
|
||||
descrapp_pag2: 'Ha llegado el momento de utilizar las nuevas herramientas <strong>tecnológicas</strong> en nuestro <strong>favor</strong>, para <strong>liberarnos</strong> ' +
|
||||
'tan lentamente desde la <strong>esclavitud</strong> de <strong>"Trabaja para generar dinero"</strong> y transformando nuestra <strong>Capacidad</strong> en' +
|
||||
'<strong>Recursos humanos</strong> para poder apoyar y vivir en <strong>Armonia</strong> con otros.',
|
||||
freesocial: {
|
||||
title: 'Free Social',
|
||||
descr: 'Una comunidad organizada por <strong>Categorías</strong>, donde puedes unirte a <strong>Grupos temáticos</strong>, ' +
|
||||
'Compartir <strong>experiencias</strong> y combinar habilidades para organizar y apoyar <strong>proyectos innovadores</strong> para la gente.<br><br>' +
|
||||
'Los desarrollos <strong>éticos</strong> como <strong>:<br>Auto-producción</strong>, <strong>Sostenibilidad</strong>, ' +
|
||||
'la Buena <strong>Salud natural</strong> y <strong>Respeto por el Medio Ambiente</strong> y para todos los <strong>Seres vivos</strong> de este' +
|
||||
'<strong>Planeta</strong>. Cualquiera puede expresar su <strong>consentimiento o disidencia</strong> participando en <strong>Encuestas Interactivas</strong> ' +
|
||||
'y llevar a cabo juntos los <strong>Cambios</strong> necesarios para nuestra sociedad.',
|
||||
},
|
||||
freetalent: {
|
||||
title: 'Free Talent',
|
||||
descr: 'Comparte tus <strong>Talentos</strong> y <strong>Habilidades</strong>, ' +
|
||||
'en lugar de dinero, ganarás <strong>Tiempo</strong>. <br>' +
|
||||
'<strong>"1 hora"</strong> se convierte en una moneda de intercambio, igual para todos. <br>' +
|
||||
'Puedes usar estos <strong>"Créditos de tiempo"</strong> para satisfacer tus necesidades, buscando en <strong>Habilidades disponibles</strong>. <br> ' +
|
||||
'En Dar y Recibir, crearemos así vínculos de <strong>Amistad, Solidaridad, Cooperación y Diversión</strong>. <br> <br>' +
|
||||
'Este proyecto apunta a difundir esta realidad, que ya existe desde hace muchos años y se llama <strong>"Banco de tiempo"</strong>. ' +
|
||||
'Las <strong>secretarías</strong> dispersas por todo el mundo, servirán para dar mayor <strong>fiabilidad</strong> y <strong>confianza</strong> en el intercambio de talentos entre personas desconocidas. ' +
|
||||
'Así crearemos una <strong>red de confianza</strong> en el vecindario, como ya se practica en numerosos <strong>Ecoaldeas</strong> y en la Comunidades del mundo.',
|
||||
},
|
||||
freegas: {
|
||||
title: 'Free G.A.S. (G.C.S.)',
|
||||
descr: '¿Le gustaría usar una aplicación que le permita comprar productos locales directamente desde el <strong>Productor</strong>? <br> ' +
|
||||
'Con <strong>Grupos de Compra Solidarios</strong> evitamos intermediarios innecesarios, obteniendo muchos beneficios, incluyendo: <br>' +
|
||||
'<ul class = "mylist" style = "padding-left: 20px;"> <li> <strong>Superior Quality</strong> del producto </li>' +
|
||||
'<li> Opiniones <strong>de consumidores</strong> favorecerá a los productores con intenciones saludables </li>' +
|
||||
'<li> Posibilidad de interactuar con el Productor </li>' +
|
||||
'<li> Abierto a relaciones entre personas, compartiendo <strong>Recetas</strong> y <strong>Consejos</strong> preciosos </li>' +
|
||||
'<li> <strong>Ahorros</strong> de dinero (precios al por mayor) </li>' +
|
||||
'<li> Mejorando el <strong>Territorio</strong> y la Economía <strong>Local</strong> </li>' +
|
||||
'<li> Condiciones <strong>Justa</strong> para Trabajadores </li>' +
|
||||
'<li> Reducido <strong>Impacto Ambiental</strong> </ul>',
|
||||
},
|
||||
freeliving: {
|
||||
title: 'Free Co-Living',
|
||||
descr: 'Para unir más realidad, compartiendo la experiencia de vivir juntos, por un período definido: <br> ' +
|
||||
'1) Hay quien <strong>vive solo</strong> y tiene un hogar. <br>' +
|
||||
'2) Quién necesita un alojamiento <strong>temporal</strong>. <br><br>' +
|
||||
'Hoy en día, más y más personas <strong>viven solas</strong> y les gustaría seguir viviendo en sus propios hogares. <br>' +
|
||||
'Otras personas necesitan una <strong>Habitación</strong>, por elección o por necesidad, y a cambio están disponibles en' +
|
||||
'<strong>contribuir a los gastos</strong> para los billetes de casa o tal vez <strong>ayuda</strong> a la persona mayor para <strong>ir de compras</strong>, cocinar, <strong>limpiar casa</strong> o simplemente ofreciéndole <strong>compañía</strong>. <br><br> ' +
|
||||
'A través de esta herramienta, las personas pueden ponerse en contacto y decidir en qué forma <strong>co-habitar</strong>. Los <strong>comentarios</strong> publicados y el <strong>detalle</strong> de los perfiles de usuario, ' +
|
||||
'ayudará a elegir a la persona más en <strong>armonía</strong>.'
|
||||
|
||||
},
|
||||
freecollabora: {
|
||||
title: '¿Quién puede colaborar?',
|
||||
descr: 'Todos aquellos que están en línea con <strong>Principios éticos</strong> y la investigación de <strong>Bienestar Global del Planeta</strong> <br> ' +
|
||||
'Por eso son bienvenidos:' +
|
||||
'<ul class = "mylist" style = "padding-left: 20px;">' +
|
||||
'<li> <strong>Asociaciones sin ánimo de lucro, Ecoaldeas, Comunidades</strong> </li>' +
|
||||
'<li> Grupos que desean promover <strong>Proyectos sociales innovadores</strong> para <strong>Feliz Decrecimiento</strong> </li>' +
|
||||
'<li> Quién administra un <strong>Grupo de Compra Solidario (G.C.S.)</strong> </li>' +
|
||||
'<li><strong>Productores locales Éticos</strong></li>' +
|
||||
'<li> Quién administra un <strong>Banco de Tiempo</strong> </li>' +
|
||||
'<li> <strong>Cualquier persona que quiera participar</strong>, en la forma que considere más apropiada. </li>' +
|
||||
'</ul>',
|
||||
},
|
||||
freesostieni: {
|
||||
title: '¿Cómo apoyar el proyecto?',
|
||||
descr: '<ul class="mylist" style="padding-left: 20px;">' +
|
||||
'<li> <strong>Compartiéndolo</strong> a todos aquellos que quieran unirse en el crecimiento y desarrollo de una Nueva Era </li> ' +
|
||||
'<li> Respondiendo a <strong>Encuestas populares</strong> y dejando <strong>Comentarios</strong> </li>' +
|
||||
'<li> A través de una <strong>donación</strong> (<strong>incluso € 1</strong>) para los gastos. <br>' +
|
||||
'</ul>' +
|
||||
'<br>Veo un <strong>futuro</strong> en el que ya no usarás dinero. Donde las personas <strong>se ayudarán unos a otros</strong> y no necesiten "poseer" cosas, pero <strong>compartirán</strong> con otros. <br> ',
|
||||
},
|
||||
multiplatform: {
|
||||
title: 'Multi-plataforma',
|
||||
descr: 'Compatible con Google Chrome, Firefox, Safari, iOS, Android y PC. La aplicación se instala fácilmente, sin pasar por el store. ' +
|
||||
'para compartirlo, necesita solo el nombre del sitio web: <strong>www.freeplanet.app</strong>.<br>' +
|
||||
'Después del registro, le pedirá que lo agregue a la lista de aplicaciones y en la pantalla.',
|
||||
},
|
||||
free: {
|
||||
title: 'Libre, Código Abierto y Sin Publicidad',
|
||||
descr: 'Esta aplicación <strong>no está a la venta</strong>, no tiene un propósito comercial, <strong>no tiene precio</strong> y pertenece a <strong>la Gente del Nuevo Mundo</strong>.<br>' +
|
||||
'Cualquiera puede usarla y beneficiarse.<br> A mí la tarea de gestionarlo y protegerlo. ' +
|
||||
'Solo se aceptarán donaciones de particulares y asociaciones sin änimo de lucro, en línea con los Principios, que se utilizarán para cubrir los gastos. <br>' +
|
||||
'<strong>Gracias a todos por el apoyo</strong>. '
|
||||
},
|
||||
contacts: 'Contactos'
|
||||
},
|
||||
},
|
||||
enUs:{
|
||||
pages: {
|
||||
home: 'Dashboard',
|
||||
SignUp: 'SignUp',
|
||||
SignIn: 'SignIn',
|
||||
vreg: 'Verify Reg',
|
||||
Test: 'Test',
|
||||
Category: 'Category',
|
||||
Todo: 'Todo',
|
||||
personal: 'Personal',
|
||||
work: 'Work',
|
||||
shopping: 'Shopping',
|
||||
Admin: 'Admin',
|
||||
Test1: 'Test1',
|
||||
Test2: 'Test2',
|
||||
projects: 'Projects',
|
||||
favproj: 'Favorite',
|
||||
projall: 'All',
|
||||
projectsShared: 'My Shared',
|
||||
myprojects: 'My Personals',
|
||||
},
|
||||
msg: {
|
||||
hello: 'Hello!',
|
||||
myAppName: 'FreePlanet',
|
||||
underconstruction: 'App in construction...',
|
||||
myDescriz: '',
|
||||
sottoTitoloApp: 'The first Real Social',
|
||||
sottoTitoloApp2: 'Free, Fair and Equitable',
|
||||
sottoTitoloApp3: 'Where the conscience and community help live',
|
||||
sottoTitoloApp4: 'Free and without advertising',
|
||||
},
|
||||
homepage: {
|
||||
descrapp_title1: 'Together to Evolve and Experiment',
|
||||
descrapp_pag1: 'Rediscover how the value of <strong>Sharing</strong> and <strong>Cooperation</strong>, can help us find the deep meaning of' +
|
||||
'<strong>Life</strong>, lost in this consumer society, and showing those <strong>Healthy Natural Principles</strong> and Human <strong>Brotherhood</strong>' +
|
||||
'that entire ancient populations knew well.',
|
||||
descrapp_pag2: 'The time has come to use the new <strong>Technological</strong> tools in our <strong>favor</strong>, to <strong>Free ourselves</strong> ' +
|
||||
'so slowly from the <strong>slavery</strong> of the <strong>"Work to generate Money"</strong> and transforming our <strong>Capacity</strong> into' +
|
||||
'<strong>Human Resources</strong> to be able to support and live in <strong>Harmony</strong> with others.',
|
||||
freesocial: {
|
||||
title: 'Free Social',
|
||||
descr: 'A Community organized by <strong>Categories</strong>, where you can join <strong>Thematic Groups</strong>, ' +
|
||||
'Share <strong>Experiences</strong> and combine Skills to organize and support <strong>Innovative Projects</strong> for the People.<br><br>' +
|
||||
'<strong>Ethical</strong> developments such as <strong>Auto-Production</strong>, <strong>Sustainability</strong>, ' +
|
||||
'Good <strong>Natural Health</strong> and <strong>Respect for the Environment</strong> and for all <strong>Living Beings</strong> of this' +
|
||||
'<strong>Planet</strong>. Anyone can express their <strong>Consent or Dissent</strong> by participating in <strong>Interactive Surveys</strong> ' +
|
||||
'and carry out together the <strong>Changes</strong> needed for our society.',
|
||||
},
|
||||
freetalent: {
|
||||
title: 'Free Talent',
|
||||
descr: 'Share your <strong>Talents</strong> and <strong>Skills</strong>, ' +
|
||||
'instead of money, you\'ll earn <strong>Time</strong>. <br>' +
|
||||
'<strong>"1 hour"</strong> becomes a currency of exchange, equal for all. <br>' +
|
||||
'You can use these <strong>"Time Credits"</strong> to meet your needs, looking in <strong>Available Skills</strong>. <br>' +
|
||||
'In Giving and Receiving, we will thus create bonds of <strong>Friendship, Solidarity, Cooperation and Enjoyment</strong> <br> <br>' +
|
||||
'This project aims to spread this reality, which already exists for many years and is called <strong>"Time Bank"</strong>. ' +
|
||||
'The <strong>secretariats</strong> in all over the world, will serve an extra to give greater <strong>reliability</strong> and <strong>trust</strong> in the exchange of talents between unknown people. ' +
|
||||
'We will thus create a <strong>trust network</strong> in the neighborhood, as is already practiced in numerous <strong>Ecovillages</strong> and Community of the world. ',
|
||||
},
|
||||
freegas: {
|
||||
title: 'Free G.A.S.',
|
||||
descr: 'Would you like to use an App that allows you to easily Buy Local Products directly from <strong>Manufacturer</strong>? <br> ' +
|
||||
'With <strong>Solidarity Purchase Groups</strong> (in Italian: "Gruppo di Aacquisto Solidale") we avoid unnecessary intermediaries, obtaining many benefits including: <br>' +
|
||||
'<ul class="mylist" style="padding-left: 20px;"> <li> <strong>Superior Quality</strong> of the product </li>' +
|
||||
'<li> Consumer <strong>Reviews</strong> will favor Producers with Healthy Intents </li>' +
|
||||
'<li> Possibility to interact with the Producer </li>' +
|
||||
'<li> Open to Relations between people, sharing <strong>Recipes</strong> and precious <strong>Tips</strong> </li>' +
|
||||
'<li> <strong>Savings</strong> money (wholesale prices) </li>' +
|
||||
'<li> Enhancing the <strong>Territory</strong> and the <strong>Local Economy</strong> </li>' +
|
||||
'<li> <strong>Fair Conditions</strong> for Workers </li>' +
|
||||
'<li> Reduced <strong>Environmental Impact</strong> </ul>'
|
||||
},
|
||||
freeliving: {
|
||||
title: 'Free Co-Living',
|
||||
descr: 'Join more reality, sharing the experience of living together, for a defined period: <br> ' +
|
||||
'1) Someone <strong>Lives alone</strong> and has a house. <br>' +
|
||||
'2) Who needs a temporary <strong> accommodation </strong>. <br><br>' +
|
||||
'Today more and more people <strong> live alone </strong> and would like to continue living in their own house. <br>' +
|
||||
'Other people instead need a <strong>room</strong>, by choice or by necessity, and in return they are available to' +
|
||||
'<strong>contribute to expenses</strong> for households or maybe <strong>help</strong> to <strong>go shopping</strong>, cooking, <strong>cleaning house</strong> or simply offering him <strong>companionship</strong>. <br> ' +
|
||||
'Through this tool, people can get in touch and decide in which way <strong>co-living</strong>. The <strong>reviews</strong> released and the <strong>detail</strong> of user profiles, ' +
|
||||
'will help in <strong>choosing</strong> the person more in <strong>tune</strong>.'
|
||||
|
||||
},
|
||||
freecollabora: {
|
||||
title: 'Who can collaborate?',
|
||||
descr: 'All those who are in line with <strong>Ethical Principles</strong> and research of <strong>Global Wellness of the Planet</strong> <br> ' +
|
||||
'Therefore they are welcome:' +
|
||||
'<ul class = "mylist" style = "padding-left: 20px;">' +
|
||||
'<li> <strong>Non-profit associations, Ecovillages, Communities</strong> </li>' +
|
||||
'<li> Groups that want to promote <strong>Innovative Social Projects</strong> for <strong>Happy Degrowth</strong> </li>' +
|
||||
'<li> Who manages a <strong>Solidarity Purchase Group</strong> </li>' +
|
||||
'<li><strong>Local Ethical Producers</strong></li>' +
|
||||
'<li> Who manages a <strong>Time Bank</strong> </li>' +
|
||||
'<li> <strong>Anyone who wants to participate</strong>, in the form it considers most appropriate. </li>' +
|
||||
'</ul>',
|
||||
},
|
||||
freesostieni: {
|
||||
title: 'How to support the project?',
|
||||
descr: '<ul class="mylist" style="padding-left: 20px;">' +
|
||||
'<li> <strong>Sharing it</strong> to all those who want to join together in the growth and development of a New Era </li> ' +
|
||||
'<li> Answering to <strong>Popular Polls</strong> and leaving <strong>Feedback</strong> </li>' +
|
||||
'<li> Through a <strong>donation</strong> (<strong>even $ 1</strong>) for expenses. <br>' +
|
||||
'</ul><br>' +
|
||||
'I see a <strong>future</strong> where you will no longer use money. Where people <strong>will help each other</strong> and won\'t need to "own" things, but <strong>will share</strong> with others. <br> ',
|
||||
},
|
||||
multiplatform: {
|
||||
title: 'Multi-platform',
|
||||
descr: 'It is compatible with Google Chrome, Firefox, Safari, iOS, Android and PC. The Application is easily installed, without going through the store. ' +
|
||||
'just share the nametranslate of this site <strong>www.freeplanet.app</strong>.<br>' +
|
||||
'After registration it will ask to be added to the application list and in the screen',
|
||||
},
|
||||
free: {
|
||||
title: 'Free, Open Source and No Advertising',
|
||||
descr: 'This App <strong>is not for sale</strong>, has no commercial purpose, <strong>is priceless</strong> and belongs to the <strong>New World People</strong>.' +
|
||||
'<br>Anyone can use it and benefit from it.<br>To me the task of managing it and protecting it. ' +
|
||||
'Only donations from private individuals and non-profit associations will be accepted, in line with the Principles, which will be used to cover the expenses. <br>' +
|
||||
'<strong>Thanks all for the support</strong>. '
|
||||
},
|
||||
contacts: 'Contacts'
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export default msg_website;
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 40 KiB |
@@ -5,6 +5,7 @@ import { clone } from 'lodash'
|
||||
import * as Types from './ApiTypes'
|
||||
import { GlobalStore, UserStore } from '@store'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
|
||||
export const API_URL = process.env.MONGODB_HOST
|
||||
|
||||
@@ -8,6 +8,7 @@ export { addAuthHeaders, removeAuthHeaders, API_URL } from './Instance'
|
||||
// import {AlgoliaSearch} from './AlgoliaController'
|
||||
import Paths from '@paths'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
import { GlobalStore, Projects, UserStore } from '@modules'
|
||||
import globalroutines from './../../globalroutines/index'
|
||||
@@ -173,7 +174,7 @@ export namespace ApiTool {
|
||||
link += '/' + rec._id
|
||||
}
|
||||
|
||||
// console.log('----------------------- LEGGO QUALCOSA ', link)
|
||||
console.log('----------------------- LEGGO QUALCOSA ', link)
|
||||
|
||||
// Insert/Delete/Update table to the server
|
||||
return SendReq(link, method, rec)
|
||||
|
||||
@@ -4,6 +4,7 @@ import { GlobalStore, Todos, Projects, UserStore } from '@store'
|
||||
import globalroutines from './../../globalroutines/index'
|
||||
import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
export const OtherTables = ['categories', 'config', 'swmsg']
|
||||
export const MainTables = ['todos', 'projects']
|
||||
@@ -108,17 +109,25 @@ async function Sync_Execute(cmd, tablesync, nametab, method, item: ITodo, id, ms
|
||||
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) {
|
||||
return await navigator.serviceWorker.ready
|
||||
.then((sw) => {
|
||||
// console.log('---------------------- navigator.serviceWorker.ready')
|
||||
|
||||
return globalroutines(null, 'write', tablesync, item, id)
|
||||
.then((id) => {
|
||||
// console.log('id', id)
|
||||
.then((ris) => {
|
||||
console.log('ris write:', ris)
|
||||
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 + toolsext.getLocale()
|
||||
const mymsgkey = {
|
||||
_id: multiparams,
|
||||
value: multiparams
|
||||
@@ -145,6 +154,9 @@ async function Sync_Execute(cmd, tablesync, nametab, method, item: ITodo, id, ms
|
||||
console.error('Errore in globalroutines', tablesync, nametab, err)
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('Errore catch in globalroutines write', tablesync, nametab, err)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -408,6 +420,7 @@ export async function table_ModifyRecord(nametable, myitem, listFieldsToChange,
|
||||
tools.notifyarraychanged(miorec)
|
||||
|
||||
// 2) Modify on IndexedDb
|
||||
console.log('// 2) Modify on IndexedDb', miorec)
|
||||
return globalroutines(null, 'write', nametable, miorec)
|
||||
.then((ris) => {
|
||||
|
||||
|
||||
@@ -11,11 +11,15 @@ import Api from '@api'
|
||||
import * as Types from '@src/store/Api/ApiTypes'
|
||||
import { costanti } from '@src/store/Modules/costanti'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import * as ApiTables from '@src/store/Modules/ApiTables'
|
||||
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'
|
||||
|
||||
getstateConnSaved()
|
||||
@@ -50,7 +54,12 @@ const state: IGlobalState = {
|
||||
downloading_server: 0,
|
||||
downloading_indexeddb: 0
|
||||
},
|
||||
arrConfig: []
|
||||
arrConfig: [],
|
||||
lastaction: {
|
||||
table: '',
|
||||
type: 0,
|
||||
_id: 0
|
||||
}
|
||||
}
|
||||
|
||||
async function getConfig(id) {
|
||||
@@ -72,10 +81,6 @@ async function getstateConnSaved() {
|
||||
}
|
||||
}
|
||||
|
||||
function addRoute(myarr, values) {
|
||||
myarr.push(values)
|
||||
}
|
||||
|
||||
const b = storeBuilder.module<IGlobalState>('GlobalModule', state)
|
||||
|
||||
// Getters
|
||||
@@ -111,94 +116,24 @@ namespace Getters {
|
||||
}, 'showtype')
|
||||
|
||||
const getmenu = b.read((state) => {
|
||||
console.log('getmenu')
|
||||
|
||||
const arrlista = GlobalStore.state.listatodo
|
||||
const lista = []
|
||||
|
||||
arrlista.forEach((elem: IMenuList) => {
|
||||
const item = {
|
||||
faIcon: 'fa fa-list-alt',
|
||||
materialIcon: 'todo',
|
||||
name: 'pages.' + elem.description,
|
||||
route: '/todo/' + elem.nametranslate
|
||||
}
|
||||
lista.push(item)
|
||||
|
||||
})
|
||||
|
||||
const arrlistaprojtutti = Projects.getters.listaprojects(false)
|
||||
const arrlistaprojmiei = Projects.getters.listaprojects(true)
|
||||
const listaprojectstutti = []
|
||||
const listaprojectsmiei = []
|
||||
|
||||
for (const elem of arrlistaprojtutti) {
|
||||
const item = {
|
||||
materialIcon: 'next_week',
|
||||
name: elem.nametranslate,
|
||||
text: elem.description,
|
||||
route: tools.getUrlByTipoProj(false) + elem.idelem
|
||||
}
|
||||
listaprojectstutti.push(item)
|
||||
}
|
||||
|
||||
for (const elem of arrlistaprojmiei) {
|
||||
const item = {
|
||||
materialIcon: 'next_week',
|
||||
name: elem.nametranslate,
|
||||
text: elem.description,
|
||||
route: tools.getUrlByTipoProj(true) + elem.idelem
|
||||
}
|
||||
listaprojectsmiei.push(item)
|
||||
}
|
||||
|
||||
const arrroutes: IListRoutes[] = []
|
||||
|
||||
addRoute(arrroutes, { route: '/', faIcon: 'fa fa-home', materialIcon: 'home', name: 'pages.home' }) // HOME
|
||||
|
||||
if (!process.env.PROD) {
|
||||
addRoute(arrroutes, { route: '/todo', faIcon: 'fa fa-list-alt', materialIcon: 'format_list_numbered', name: 'pages.Todo',
|
||||
routes2: lista,
|
||||
level_parent: 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
|
||||
})
|
||||
}
|
||||
|
||||
if (UserStore.state.isAdmin) {
|
||||
addRoute(arrroutes, { route: '/category', faIcon: 'fa fa-list-alt', materialIcon: 'category', name: 'pages.Category' })
|
||||
addRoute(arrroutes, { route: '/admin/cfgserv', faIcon: 'fa fa-database', materialIcon: 'event_seat', name: 'pages.Admin' })
|
||||
addRoute(arrroutes, { route: '/admin/testp1/par1', faIcon: 'fa fa-database', materialIcon: 'restore', name: 'pages.Test1' })
|
||||
addRoute(arrroutes, { route: '/admin/testp1/par2', faIcon: 'fa fa-database', materialIcon: 'restore', name: 'pages.Test2' })
|
||||
}
|
||||
// console.log('getmenu', cfgrouter.getmenu())
|
||||
|
||||
state.menulinks = {
|
||||
Dashboard: {
|
||||
routes: arrroutes,
|
||||
routes: cfgrouter.getmenu(),
|
||||
show: true
|
||||
}
|
||||
}
|
||||
|
||||
return state.menulinks
|
||||
|
||||
console.log('state.menulinks', state.menulinks)
|
||||
// console.log('state.menulinks', state.menulinks)
|
||||
|
||||
}, 'getmenu')
|
||||
|
||||
const t = b.read((state) => (params) => {
|
||||
const msg = params.split('.')
|
||||
const lang = UserStore.state.lang
|
||||
const lang = toolsext.getLocale()
|
||||
|
||||
const stringa = messages[lang]
|
||||
|
||||
@@ -370,11 +305,11 @@ namespace Actions {
|
||||
const mykey = process.env.PUBLICKEY_PUSH
|
||||
const mystate = state
|
||||
return navigator.serviceWorker.ready
|
||||
.then(function (swreg) {
|
||||
.then((swreg) => {
|
||||
reg = swreg
|
||||
return swreg.pushManager.getSubscription()
|
||||
})
|
||||
.then(function (subscription) {
|
||||
.then((subscription) => {
|
||||
mystate.wasAlreadySubscribed = !(subscription === null)
|
||||
|
||||
if (mystate.wasAlreadySubscribed) {
|
||||
@@ -391,10 +326,10 @@ namespace Actions {
|
||||
})
|
||||
}
|
||||
})
|
||||
.then(function (newSub) {
|
||||
.then((newSub) => {
|
||||
saveNewSubscriptionToServer(context, newSub)
|
||||
})
|
||||
.catch(function (err) {
|
||||
.catch((err) => {
|
||||
console.log('ERR createPushSubscription:', err)
|
||||
})
|
||||
}
|
||||
@@ -480,7 +415,7 @@ namespace Actions {
|
||||
subscription.unsubscribe().then((successful) => {
|
||||
// You've successfully unsubscribed
|
||||
console.log('You\'ve successfully unsubscribed')
|
||||
}).catch( (e) => {
|
||||
}).catch((e) => {
|
||||
// Unsubscription failed
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
import { IProject, IProjectsState, IDrag, IMenuList } from 'model'
|
||||
import { IProject, IProjectsState, IDrag, IMenuList, IAction } from 'model'
|
||||
import { Privacy } from '@src/model'
|
||||
import { storeBuilder } from './Store/Store'
|
||||
|
||||
import Api from '@api'
|
||||
import { tools } from './tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { lists } from './lists'
|
||||
import * as ApiTables from './ApiTables'
|
||||
import { GlobalStore, UserStore } from '@store'
|
||||
import globalroutines from './../../globalroutines/index'
|
||||
import objectId from '@src/js/objectId'
|
||||
import { costanti } from '@src/store/Modules/costanti'
|
||||
import { RouteNames } from '@src/router/route-names'
|
||||
import * as Types from '@src/store/Api/ApiTypes'
|
||||
import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
|
||||
const nametable = 'projects'
|
||||
|
||||
@@ -21,12 +26,12 @@ const stateglob: IProjectsState = {
|
||||
visuLastCompleted: 10
|
||||
}
|
||||
|
||||
const listFieldsToChange: string [] = ['descr', 'longdescr', 'hoursplanned', 'hoursworked', 'id_parent', 'statusproj',
|
||||
const listFieldsToChange: string [] = ['descr', 'longdescr', 'hoursplanned', 'hoursleft', 'hoursworked', 'id_parent', 'statusproj',
|
||||
'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progressCalc', 'live_url', 'test_url',
|
||||
'begin_development', 'begin_test', 'actualphase', 'totalphases', 'hoursweeky_plannedtowork', 'endwork_estimate',
|
||||
'privacyread', 'privacywrite', 'id_main_project', 'typeproj']
|
||||
'privacyread', 'privacywrite', 'id_main_project', 'typeproj', 'favourite', 'themecolor', 'themebgcolor']
|
||||
|
||||
const listFieldsUpdateCalculation: string [] = ['hoursplanned', 'hoursworked', 'progressCalc', 'endwork_estimate']
|
||||
const listFieldsUpdateCalculation: string [] = ['hoursplanned', 'hoursleft', 'hoursworked', 'progressCalc', 'endwork_estimate']
|
||||
|
||||
const b = storeBuilder.module<IProjectsState>('Projects', stateglob)
|
||||
const stateGetter = b.state()
|
||||
@@ -51,12 +56,15 @@ function updateDataCalculated(projout, projin) {
|
||||
})
|
||||
}
|
||||
|
||||
function getproj(projects, idproj, miei: boolean) {
|
||||
if (miei) {
|
||||
return tools.mapSort(projects.filter((proj) => (proj.id_parent === idproj) && proj.userId === UserStore.state.userId))
|
||||
} else {
|
||||
return tools.mapSort(projects.filter((proj) => (proj.id_parent === idproj) && proj.userId !== UserStore.state.userId ))
|
||||
}
|
||||
function getproj(projects, idproj, tipoproj: string) {
|
||||
console.log('getproj', tipoproj)
|
||||
|
||||
if (tipoproj === RouteNames.myprojects)
|
||||
return projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId === UserStore.state.userId) && (proj.privacyread === Privacy.onlyme))
|
||||
else if (tipoproj === RouteNames.projectsshared)
|
||||
return projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId === UserStore.state.userId) && (proj.privacyread !== Privacy.onlyme))
|
||||
else if (tipoproj === RouteNames.projectsall)
|
||||
return projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId !== UserStore.state.userId) )
|
||||
}
|
||||
|
||||
namespace Getters {
|
||||
@@ -88,37 +96,40 @@ namespace Getters {
|
||||
actualphase: 1,
|
||||
hoursworked: 0,
|
||||
hoursplanned: 0,
|
||||
hoursleft: 0,
|
||||
progressCalc: 0,
|
||||
privacyread: 'onlyme',
|
||||
privacywrite: 'onlyme',
|
||||
begin_development: tools.getDateNull(),
|
||||
begin_test: tools.getDateNull(),
|
||||
hoursweeky_plannedtowork: 0,
|
||||
endwork_estimate: tools.getDateNull()
|
||||
endwork_estimate: tools.getDateNull(),
|
||||
themecolor: '',
|
||||
themebgcolor: ''
|
||||
}
|
||||
|
||||
return obj
|
||||
}, 'getRecordEmpty')
|
||||
|
||||
const projs_dacompletare = b.read((state: IProjectsState) => (id_parent: string, miei: boolean): IProject[] => {
|
||||
// console.log('projs_dacompletare', miei)
|
||||
const projs_dacompletare = b.read((state: IProjectsState) => (id_parent: string, tipoproj: string): IProject[] => {
|
||||
// console.log('projs_dacompletare')
|
||||
if (state.projects) {
|
||||
// console.log('state.projects', state.projects)
|
||||
return getproj(state.projects, id_parent, miei)
|
||||
return getproj(state.projects, id_parent, tipoproj)
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
}, 'projs_dacompletare')
|
||||
|
||||
const listaprojects = b.read((state: IProjectsState) => (miei: boolean): IMenuList[] => {
|
||||
const listaprojects = b.read((state: IProjectsState) => (tipoproj: string): IMenuList[] => {
|
||||
if (state.projects) {
|
||||
// console.log('state.projects', state.projects)
|
||||
const listaproj = getproj(state.projects, process.env.PROJECT_ID_MAIN, miei)
|
||||
console.log('listaprojects')
|
||||
const listaproj = getproj(state.projects, process.env.PROJECT_ID_MAIN, tipoproj)
|
||||
const myarr: IMenuList[] = []
|
||||
for (const proj of listaproj) {
|
||||
myarr.push({ nametranslate: '', description: proj.descr, idelem: proj._id })
|
||||
}
|
||||
console.log(' myarr', myarr, listaproj)
|
||||
// console.log(' myarr', myarr, listaproj)
|
||||
return myarr
|
||||
|
||||
} else {
|
||||
@@ -146,7 +157,7 @@ namespace Getters {
|
||||
}, 'getRecordById')
|
||||
|
||||
const getifCanISeeProj = b.read((state: IProjectsState) => (proj: IProject): boolean => {
|
||||
if (proj === undefined)
|
||||
if ((proj === undefined) || (proj === null))
|
||||
return false
|
||||
|
||||
if (!!UserStore.state) {
|
||||
@@ -164,7 +175,7 @@ namespace Getters {
|
||||
}, 'getifCanISeeProj')
|
||||
|
||||
const CanIModifyPanelPrivacy = b.read((state: IProjectsState) => (proj: IProject): boolean => {
|
||||
if (proj === undefined)
|
||||
if ((proj === undefined) || (proj === null))
|
||||
return false
|
||||
|
||||
if (!!UserStore) {
|
||||
@@ -240,10 +251,20 @@ namespace Mutations {
|
||||
ApiTables.removeitemfromarray(state.projects, ind)
|
||||
}
|
||||
|
||||
async function movemyitem(state: IProjectsState, { myitemorig, myitemdest } ) {
|
||||
const indorig = tools.getIndexById(state.projects, myitemorig._id)
|
||||
|
||||
state.projects.splice(indorig, 1)
|
||||
state.projects.push(myitemdest)
|
||||
|
||||
await Actions.actions.modify({ myitem: myitemdest, field: 'id_parent' })
|
||||
}
|
||||
|
||||
export const mutations = {
|
||||
deletemyitem: b.commit(deletemyitem),
|
||||
createNewItem: b.commit(createNewItem),
|
||||
updateProject: b.commit(updateProject)
|
||||
updateProject: b.commit(updateProject),
|
||||
movemyitem: b.commit(movemyitem)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -255,7 +276,7 @@ namespace Actions {
|
||||
if (onlyiffirsttime) {
|
||||
if (stateglob.projects.length > 0) {
|
||||
// if already set, then exit.
|
||||
return false
|
||||
return new Types.AxiosError(0, null, 0, '')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,7 +308,7 @@ namespace Actions {
|
||||
.catch((error) => {
|
||||
console.log('error dbLoad', error)
|
||||
UserStore.mutations.setErrorCatch(error)
|
||||
return error
|
||||
return new Types.AxiosError(serv_constants.RIS_CODE_ERR, null, tools.ERR_GENERICO, error)
|
||||
})
|
||||
|
||||
ApiTables.aftercalling(ris, checkPending, nametable)
|
||||
@@ -324,6 +345,9 @@ namespace Actions {
|
||||
objproj.id_parent = myobj.id_parent
|
||||
objproj.id_main_project = myobj.id_main_project
|
||||
objproj.typeproj = myobj.typeproj
|
||||
objproj.privacyread = myobj.privacyread
|
||||
objproj.privacywrite = myobj.privacywrite
|
||||
objproj.actualphase = myobj.actualphase
|
||||
|
||||
let elemtochange: IProject = null
|
||||
|
||||
@@ -336,7 +360,7 @@ namespace Actions {
|
||||
} else {
|
||||
console.log('INSERT AT THE BOTTOM')
|
||||
// INSERT AT THE BOTTOM , so GET LAST ITEM
|
||||
const lastelem = tools.getLastListNotCompleted(nametable, objproj.id_parent)
|
||||
const lastelem = tools.getLastListNotCompleted(nametable, objproj.id_parent, this.tipoProj)
|
||||
|
||||
objproj.id_prev = (!!lastelem) ? lastelem._id : ApiTables.LIST_START
|
||||
}
|
||||
@@ -371,18 +395,48 @@ namespace Actions {
|
||||
async function swapElems(context, itemdragend: IDrag) {
|
||||
console.log('PROJECT swapElems', itemdragend, stateglob.projects)
|
||||
|
||||
const myarr = Getters.getters.projs_dacompletare(itemdragend.id_proj, itemdragend.mieiproj)
|
||||
const myarr = Getters.getters.projs_dacompletare(itemdragend.id_proj, itemdragend.tipoproj)
|
||||
|
||||
tools.swapGeneralElem(nametable, myarr, itemdragend, listFieldsToChange)
|
||||
|
||||
}
|
||||
|
||||
async function ActionCutPaste(context, action: IAction) {
|
||||
|
||||
if (action.type === lists.MenuAction.CUT) {
|
||||
GlobalStore.state.lastaction = action
|
||||
} else if (action.type === lists.MenuAction.PASTE) {
|
||||
if (GlobalStore.state.lastaction.type === lists.MenuAction.CUT) {
|
||||
|
||||
// Change id_parent
|
||||
const orig_obj = Getters.getters.getRecordById(GlobalStore.state.lastaction._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
|
||||
|
||||
GlobalStore.state.lastaction.type = 0
|
||||
|
||||
return await Mutations.mutations.movemyitem({ myitemorig: orig_obj, myitemdest: dest_obj })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const actions = {
|
||||
dbLoad: b.dispatch(dbLoad),
|
||||
swapElems: b.dispatch(swapElems),
|
||||
deleteItem: b.dispatch(deleteItem),
|
||||
dbInsert: b.dispatch(dbInsert),
|
||||
modify: b.dispatch(modify)
|
||||
modify: b.dispatch(modify),
|
||||
ActionCutPaste: b.dispatch(ActionCutPaste)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ import { storeBuilder } from './Store/Store'
|
||||
|
||||
import Api from '@api'
|
||||
import { tools } from './tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { lists } from './lists'
|
||||
import * as ApiTables from './ApiTables'
|
||||
import { GlobalStore, Todos, UserStore } from '@store'
|
||||
import globalroutines from './../../globalroutines/index'
|
||||
@@ -11,6 +13,8 @@ import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
import { GetterTree } from 'vuex'
|
||||
import objectId from '@src/js/objectId'
|
||||
import { costanti } from '@src/store/Modules/costanti'
|
||||
import { IAction } from '@src/model'
|
||||
import * as Types from '@src/store/Api/ApiTypes'
|
||||
|
||||
const nametable = 'todos'
|
||||
|
||||
@@ -27,7 +31,7 @@ const state: ITodosState = {
|
||||
visuLastCompleted: 10
|
||||
}
|
||||
|
||||
const listFieldsToChange: string [] = ['descr', 'statustodo', 'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progress', 'phase', 'assigned_to_userId', 'hoursplanned', 'hoursworked', 'start_date', 'completed_at']
|
||||
const listFieldsToChange: string [] = ['descr', 'statustodo', 'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progress', 'phase', 'assigned_to_userId', 'hoursplanned', 'hoursworked', 'start_date', 'completed_at', 'themecolor', 'themebgcolor']
|
||||
|
||||
const b = storeBuilder.module<ITodosState>('Todos', state)
|
||||
const stateGetter = b.state()
|
||||
@@ -46,7 +50,7 @@ function gettodosByCategory(category: string): [] {
|
||||
|
||||
function initcat() {
|
||||
|
||||
let rec = Getters.getters.getRecordEmpty()
|
||||
const rec = Getters.getters.getRecordEmpty()
|
||||
rec.userId = UserStore.state.userId
|
||||
|
||||
return rec
|
||||
@@ -54,7 +58,7 @@ function initcat() {
|
||||
}
|
||||
|
||||
namespace Getters {
|
||||
const getRecordEmpty = b.read((state: ITodosState) => (): ITodo => {
|
||||
const getRecordEmpty = b.read((stateparamf: ITodosState) => (): ITodo => {
|
||||
|
||||
const tomorrow = tools.getDateNow()
|
||||
tomorrow.setDate(tomorrow.getDate() + 1)
|
||||
@@ -82,56 +86,69 @@ namespace Getters {
|
||||
hoursplanned: 0,
|
||||
hoursworked: 0,
|
||||
start_date: tools.getDateNull(),
|
||||
themecolor: 'blue',
|
||||
themebgcolor: 'white'
|
||||
}
|
||||
// return this.copy(objtodo)
|
||||
return objtodo
|
||||
}, 'getRecordEmpty')
|
||||
const items_dacompletare = b.read((state: ITodosState) => (cat: string): ITodo[] => {
|
||||
const items_dacompletare = b.read((stateparam: ITodosState) => (cat: string): ITodo[] => {
|
||||
// console.log('items_dacompletare')
|
||||
const indcat = getindexbycategory(cat)
|
||||
// console.log('items_dacompletare', 'indcat', indcat, state.todos[indcat])
|
||||
if (state.todos[indcat]) {
|
||||
return state.todos[indcat].filter((todo) => todo.statustodo !== tools.Status.COMPLETED)
|
||||
let arrout = []
|
||||
// console.log('items_dacompletare', 'indcat', indcat, stateparam.todos[indcat])
|
||||
if (stateparam.todos[indcat]) {
|
||||
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((state: ITodosState) => (cat: string): ITodo[] => {
|
||||
const todos_completati = b.read((stateparam: ITodosState) => (cat: string): ITodo[] => {
|
||||
console.log('todos_completati')
|
||||
const indcat = getindexbycategory(cat)
|
||||
if (state.todos[indcat]) {
|
||||
if (state.showtype === costanti.ShowTypeTask.SHOW_LAST_N_COMPLETED) { // Show only the first N completed
|
||||
return state.todos[indcat].filter((todo) => todo.statustodo === tools.Status.COMPLETED).slice(0, state.visuLastCompleted)
|
||||
if (stateparam.todos[indcat]) {
|
||||
let arrout = []
|
||||
if (stateparam.showtype === costanti.ShowTypeTask.SHOW_LAST_N_COMPLETED) { // Show only the first N completed
|
||||
arrout = stateparam.todos[indcat].filter((todo) => todo.statustodo === tools.Status.COMPLETED).slice(0, stateparam.visuLastCompleted)
|
||||
}
|
||||
else if (state.showtype === costanti.ShowTypeTask.SHOW_ONLY_TOCOMPLETE) {
|
||||
return []
|
||||
else if (stateparam.showtype === costanti.ShowTypeTask.SHOW_ONLY_TOCOMPLETE) {
|
||||
arrout = []
|
||||
}
|
||||
else if (state.showtype === costanti.ShowTypeTask.SHOW_ALL) {
|
||||
return state.todos[indcat].filter((todo) => todo.statustodo === tools.Status.COMPLETED)
|
||||
else if (stateparam.showtype === costanti.ShowTypeTask.SHOW_ALL) {
|
||||
arrout = stateparam.todos[indcat].filter((todo) => todo.statustodo === tools.Status.COMPLETED)
|
||||
}
|
||||
else {
|
||||
return []
|
||||
arrout = []
|
||||
}
|
||||
|
||||
return arrout
|
||||
// return tools.mapSort(arrout)
|
||||
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
}, 'todos_completati')
|
||||
|
||||
const doneTodosCount = b.read((state: ITodosState) => (cat: string): number => {
|
||||
const doneTodosCount = b.read((stateparam: ITodosState) => (cat: string): number => {
|
||||
return getters.todos_completati(cat).length
|
||||
}, 'doneTodosCount')
|
||||
const TodosCount = b.read((state: ITodosState) => (cat: string): number => {
|
||||
const TodosCount = b.read((stateparam: ITodosState) => (cat: string): number => {
|
||||
const indcat = getindexbycategory(cat)
|
||||
if (state.todos[indcat]) {
|
||||
return state.todos[indcat].length
|
||||
if (stateparam.todos[indcat]) {
|
||||
return stateparam.todos[indcat].length
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}, 'TodosCount')
|
||||
|
||||
const getRecordById = b.read((state: ITodosState) => (id: string, cat: string): ITodo => {
|
||||
const getRecordById = b.read((stateparam: ITodosState) => (id: string, cat: string): ITodo => {
|
||||
const indcat = getindexbycategory(cat)
|
||||
if (state.todos) {
|
||||
return state.todos[indcat].find((item) => item._id === id)
|
||||
if (stateparam.todos) {
|
||||
return stateparam.todos[indcat].find((item) => item._id === id)
|
||||
}
|
||||
return null
|
||||
}, 'getRecordById')
|
||||
@@ -160,49 +177,73 @@ namespace Getters {
|
||||
|
||||
namespace Mutations {
|
||||
|
||||
function findIndTodoById(state: ITodosState, data: IParamTodo) {
|
||||
const indcat = state.categories.indexOf(data.categorySel)
|
||||
function findIndTodoById(stateparam: ITodosState, data: IParamTodo) {
|
||||
const indcat = stateparam.categories.indexOf(data.categorySel)
|
||||
if (indcat >= 0) {
|
||||
return tools.getIndexById(state.todos[indcat], data.id)
|
||||
return tools.getIndexById(stateparam.todos[indcat], data.id)
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
function createNewItem(state: ITodosState, { objtodo, atfirst, categorySel }) {
|
||||
let indcat = state.categories.indexOf(categorySel)
|
||||
if (indcat == -1) {
|
||||
state.categories.push(categorySel)
|
||||
indcat = state.categories.indexOf(categorySel)
|
||||
function createNewItem(stateparam: ITodosState, { objtodo, atfirst, categorySel }) {
|
||||
let indcat = stateparam.categories.indexOf(categorySel)
|
||||
if (indcat === -1) {
|
||||
stateparam.categories.push(categorySel)
|
||||
indcat = stateparam.categories.indexOf(categorySel)
|
||||
}
|
||||
console.log('createNewItem', objtodo, 'cat=', categorySel, 'state.todos[indcat]', state.todos[indcat])
|
||||
if (state.todos[indcat] === undefined) {
|
||||
state.todos[indcat] = []
|
||||
state.todos[indcat].push(objtodo)
|
||||
console.log('push state.todos[indcat]', state.todos)
|
||||
console.log('createNewItem', objtodo, 'cat=', categorySel, 'stateparam.todos[indcat]', stateparam.todos[indcat])
|
||||
if (stateparam.todos[indcat] === undefined) {
|
||||
stateparam.todos[indcat] = []
|
||||
stateparam.todos[indcat].push(objtodo)
|
||||
console.log('push stateparam.todos[indcat]', stateparam.todos)
|
||||
return
|
||||
}
|
||||
if (atfirst) {
|
||||
state.todos[indcat].unshift(objtodo)
|
||||
stateparam.todos[indcat].unshift(objtodo)
|
||||
}
|
||||
else {
|
||||
state.todos[indcat].push(objtodo)
|
||||
stateparam.todos[indcat].push(objtodo)
|
||||
}
|
||||
|
||||
console.log('state.todos[indcat]', state.todos[indcat])
|
||||
console.log('stateparam.todos[indcat]', stateparam.todos[indcat])
|
||||
|
||||
}
|
||||
|
||||
function deletemyitem(state: ITodosState, myitem: ITodo) {
|
||||
function deletemyitem(stateparam: ITodosState, myitem: ITodo) {
|
||||
// Find record
|
||||
const indcat = state.categories.indexOf(myitem.category)
|
||||
const ind = findIndTodoById(state, { id: myitem._id, categorySel: myitem.category })
|
||||
const indcat = stateparam.categories.indexOf(myitem.category)
|
||||
const ind = findIndTodoById(stateparam, { id: myitem._id, categorySel: myitem.category })
|
||||
|
||||
ApiTables.removeitemfromarray(state.todos[indcat], ind)
|
||||
ApiTables.removeitemfromarray(stateparam.todos[indcat], ind)
|
||||
}
|
||||
|
||||
async function movemyitem(stateparam: ITodosState, { myitemorig, myitemdest } ) {
|
||||
|
||||
const indcat = stateparam.categories.indexOf(myitemorig.category)
|
||||
const indorig = tools.getIndexById(stateparam.todos[indcat], myitemorig._id)
|
||||
let indcatdest = stateparam.categories.indexOf(myitemdest.category)
|
||||
|
||||
console.log('stateparam.categories', stateparam.categories)
|
||||
console.log('myitemdest', myitemdest)
|
||||
console.log('indcat', indcat, 'indcatdest', indcatdest, 'indorig', indorig)
|
||||
|
||||
if (indcatdest === -1) {
|
||||
stateparam.categories.push(myitemdest.category)
|
||||
const newindcat = stateparam.categories.indexOf(myitemdest.category)
|
||||
stateparam.todos[newindcat] = []
|
||||
indcatdest = newindcat
|
||||
}
|
||||
|
||||
stateparam.todos[indcat].splice(indorig, 1)
|
||||
stateparam.todos[indcatdest].push(myitemdest)
|
||||
|
||||
await Actions.actions.modify({ myitem: myitemdest, field: 'category' })
|
||||
}
|
||||
|
||||
export const mutations = {
|
||||
deletemyitem: b.commit(deletemyitem),
|
||||
createNewItem: b.commit(createNewItem)
|
||||
createNewItem: b.commit(createNewItem),
|
||||
movemyitem: b.commit(movemyitem)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -212,9 +253,9 @@ namespace Actions {
|
||||
async function dbLoad(context, { checkPending }) {
|
||||
console.log('dbLoad', nametable, checkPending, 'userid=', UserStore.state.userId)
|
||||
|
||||
if (UserStore.state.userId === '') {
|
||||
return false // Login not made
|
||||
}
|
||||
// if (UserStore.state.userId === '') {
|
||||
// return new Types.AxiosError(0, null, 0, '')
|
||||
// }
|
||||
|
||||
const ris = await Api.SendReq('/todos/' + UserStore.state.userId, 'GET', null)
|
||||
.then((res) => {
|
||||
@@ -240,10 +281,12 @@ namespace Actions {
|
||||
.catch((error) => {
|
||||
console.log('error dbLoad', error)
|
||||
UserStore.mutations.setErrorCatch(error)
|
||||
return error
|
||||
return new Types.AxiosError(serv_constants.RIS_CODE_ERR, null, tools.ERR_GENERICO, error)
|
||||
})
|
||||
|
||||
ApiTables.aftercalling(ris, checkPending, 'categories')
|
||||
|
||||
return ris
|
||||
}
|
||||
|
||||
async function deleteItemtodo(context, { cat, idobj }) {
|
||||
@@ -288,7 +331,7 @@ namespace Actions {
|
||||
} else {
|
||||
console.log('INSERT AT THE BOTTOM')
|
||||
// INSERT AT THE BOTTOM , so GET LAST ITEM
|
||||
const lastelem = tools.getLastListNotCompleted(nametable, objtodo.category)
|
||||
const lastelem = tools.getLastListNotCompleted(nametable, objtodo.category, this.tipoProj)
|
||||
|
||||
objtodo.id_prev = (!!lastelem) ? lastelem._id : ApiTables.LIST_START
|
||||
}
|
||||
@@ -363,7 +406,7 @@ namespace Actions {
|
||||
}
|
||||
|
||||
async function swapElems(context, itemdragend: IDrag) {
|
||||
console.log('TODOS swapElems', itemdragend, state.todos, state.categories)
|
||||
// console.log('TODOS swapElems', itemdragend, state.todos, state.categories)
|
||||
|
||||
const cat = itemdragend.category
|
||||
const indcat = state.categories.indexOf(cat)
|
||||
@@ -373,12 +416,42 @@ namespace Actions {
|
||||
|
||||
}
|
||||
|
||||
async function ActionCutPaste(context, action: IAction) {
|
||||
console.log('ActionCutPaste', action)
|
||||
|
||||
if (action.type === lists.MenuAction.CUT) {
|
||||
GlobalStore.state.lastaction = action
|
||||
} else if (action.type === lists.MenuAction.PASTE) {
|
||||
if (GlobalStore.state.lastaction.type === lists.MenuAction.CUT) {
|
||||
|
||||
// Change id_parent
|
||||
const orig_obj = Getters.getters.getRecordById(GlobalStore.state.lastaction._id, GlobalStore.state.lastaction.cat)
|
||||
// const dest = Getters.getters.getRecordById(action._id, action.cat)
|
||||
|
||||
console.log('action', action, 'orig_obj', orig_obj)
|
||||
|
||||
const dest_obj = tools.jsonCopy(orig_obj)
|
||||
|
||||
if (!!dest_obj) {
|
||||
dest_obj.category = action._id
|
||||
dest_obj.modified = true
|
||||
dest_obj.id_prev = null
|
||||
|
||||
GlobalStore.state.lastaction.type = 0
|
||||
|
||||
return await Mutations.mutations.movemyitem({ myitemorig: orig_obj, myitemdest: dest_obj })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const actions = {
|
||||
dbLoad: b.dispatch(dbLoad),
|
||||
swapElems: b.dispatch(swapElems),
|
||||
deleteItemtodo: b.dispatch(deleteItemtodo),
|
||||
dbInsert: b.dispatch(dbInsert),
|
||||
modify: b.dispatch(modify)
|
||||
modify: b.dispatch(modify),
|
||||
ActionCutPaste: b.dispatch(ActionCutPaste)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import router from '@router'
|
||||
|
||||
import { serv_constants } from '../Modules/serv_constants'
|
||||
import { tools } from '../Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { GlobalStore, UserStore, Todos, Projects } from '@store'
|
||||
import globalroutines from './../../globalroutines/index'
|
||||
|
||||
@@ -20,7 +21,7 @@ const state: IUserState = {
|
||||
email: '',
|
||||
username: '',
|
||||
password: '',
|
||||
lang: '',
|
||||
lang: process.env.LANG_DEFAULT,
|
||||
repeatPassword: '',
|
||||
tokens: [],
|
||||
verified_email: false,
|
||||
@@ -520,10 +521,11 @@ namespace Actions {
|
||||
GlobalStore.actions.checkUpdates()
|
||||
}
|
||||
|
||||
await GlobalStore.actions.loadAfterLogin()
|
||||
return await GlobalStore.actions.loadAfterLogin()
|
||||
.then(() => {
|
||||
Todos.actions.dbLoad({ checkPending: true })
|
||||
Projects.actions.dbLoad({ checkPending: true, onlyiffirsttime: true })
|
||||
return Todos.actions.dbLoad({ checkPending: true })
|
||||
}).then(() => {
|
||||
return Projects.actions.dbLoad({ checkPending: true, onlyiffirsttime: true })
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { UserStore } from '@store'
|
||||
|
||||
export const costanti = {
|
||||
ShowTypeTask: {
|
||||
SHOW_LAST_N_COMPLETED: 200,
|
||||
@@ -8,5 +10,5 @@ export const costanti = {
|
||||
CONFIG_ID_STATE_CONN: '2',
|
||||
CONFIG_ID_SHOW_TYPE_TODOS: '3',
|
||||
|
||||
MAX_PHASES: 5
|
||||
MAX_PHASES: 5,
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
|
||||
160
src/store/Modules/lists.ts
Normal file
160
src/store/Modules/lists.ts
Normal file
@@ -0,0 +1,160 @@
|
||||
import { Todos, Projects, UserStore } from '@store'
|
||||
|
||||
export const lists = {
|
||||
MenuAction: {
|
||||
CUT: 71,
|
||||
PASTE: 72,
|
||||
DELETE: 100,
|
||||
TOGGLE_EXPIRING: 101,
|
||||
COMPLETED: 110,
|
||||
PROGRESS_BAR: 120,
|
||||
PRIORITY: 130,
|
||||
SHOW_TASK: 150,
|
||||
EDIT: 160,
|
||||
ADD_PROJECT: 200,
|
||||
THEME: 210,
|
||||
THEMEBG: 211
|
||||
},
|
||||
|
||||
selectTheme: [
|
||||
{
|
||||
id: 1,
|
||||
label: 'Theme 1',
|
||||
value: 'red'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
label: 'Theme 2',
|
||||
value: 'pink'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
label: 'Theme 3',
|
||||
value: 'purple'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
label: 'Theme 4',
|
||||
value: 'deep-purple'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
label: 'Theme 5',
|
||||
value: 'indigo'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
label: 'Theme 6',
|
||||
value: 'blue'
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
label: 'Theme 7',
|
||||
value: 'green'
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
label: 'Theme 8',
|
||||
value: 'orange'
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
label: 'Theme 9',
|
||||
value: 'brown'
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
label: 'Theme 10',
|
||||
value: 'black'
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
label: 'Theme 11',
|
||||
value: 'white'
|
||||
}
|
||||
],
|
||||
|
||||
selectPriority: {
|
||||
it: [
|
||||
{
|
||||
id: 1,
|
||||
label: 'Alta',
|
||||
value: 2,
|
||||
icon: 'expand_less'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
label: 'Normale',
|
||||
value: 1,
|
||||
icon: 'remove'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
label: 'Bassa',
|
||||
value: 0,
|
||||
icon: 'expand_more'
|
||||
}],
|
||||
es:
|
||||
[
|
||||
{
|
||||
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:
|
||||
[
|
||||
{
|
||||
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'
|
||||
}]
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,10 +10,15 @@ export const translation = {
|
||||
proj: {
|
||||
newproj: 'Nuovo Progetto',
|
||||
newsubproj: 'Nuovo Sotto-Progetto',
|
||||
themecolor: 'Tema Colore',
|
||||
themebgcolor: 'Tema Colore Sfondo'
|
||||
},
|
||||
task: {
|
||||
showtask: 'Mostra Task',
|
||||
},
|
||||
action: {
|
||||
paste: 'Incolla'
|
||||
},
|
||||
end: ''
|
||||
},
|
||||
es: {
|
||||
@@ -27,10 +32,15 @@ export const translation = {
|
||||
proj: {
|
||||
newproj: 'Nuevo Projecto',
|
||||
newsubproj: 'Nuevo Sub-Projecto',
|
||||
themecolor: 'Tema Colores',
|
||||
themebgcolor: 'Tema Colores Fondo'
|
||||
},
|
||||
task: {
|
||||
showtask: 'Mostrar Tarea',
|
||||
},
|
||||
action: {
|
||||
paste: 'Pegar'
|
||||
},
|
||||
end: ''
|
||||
},
|
||||
enUs: {
|
||||
@@ -44,9 +54,14 @@ export const translation = {
|
||||
proj: {
|
||||
newproj: 'New Project',
|
||||
newsubproj: 'New Sub-Project',
|
||||
themecolor: 'Theme Color',
|
||||
themebgcolor: 'Theme Background Color'
|
||||
},
|
||||
task: {
|
||||
showtask: 'Show Task',
|
||||
showtask: 'Show Task'
|
||||
},
|
||||
action: {
|
||||
paste: 'Paste'
|
||||
},
|
||||
end: ''
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { GlobalStore, UserStore } from '@store'
|
||||
import { Getter } from 'vuex-class'
|
||||
import { ICfgServer, IGlobalState, ITodo, ITodosState } from '../../../model/index'
|
||||
|
||||
const namespace: string = 'GlobalModule'
|
||||
const namespace: string = 'Testp1'
|
||||
|
||||
@Component({})
|
||||
export default class Testp1 extends Vue {
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Component, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { ICategory } from '../../../model/index'
|
||||
import { tools } from '../../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
@Component({
|
||||
})
|
||||
|
||||
@@ -4,6 +4,7 @@ import { Component, Watch } from 'vue-property-decorator'
|
||||
import { SingleCat } from '../SingleCat/index'
|
||||
import { ICategory } from '../../../model/index'
|
||||
import { tools } from '../../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
import { UserStore } from "../../store/Modules";
|
||||
import { IUserState } from "../../model";
|
||||
import { tools } from "../../store/Modules/tools";
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
export default class RequestResetPwd extends Vue{
|
||||
emailsent = false
|
||||
form: IUserState = {
|
||||
|
||||
@@ -3,6 +3,7 @@ import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import { serv_constants } from '../../../store/Modules/serv_constants'
|
||||
import { tools } from '../../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
import { ISigninOptions, IUserState } from 'model'
|
||||
import { TSignin, validations } from './signin-validate'
|
||||
@@ -161,14 +162,14 @@ export default class Signin extends Vue {
|
||||
}
|
||||
return riscode
|
||||
}).then((riscode) => {
|
||||
if (UserStore.state.lang !== '') {
|
||||
this.$i18n.locale = UserStore.state.lang
|
||||
if (toolsext.getLocale() !== '') {
|
||||
this.$i18n.locale = toolsext.getLocale()
|
||||
} // Set Lang
|
||||
else {
|
||||
UserStore.mutations.setlang(this.$i18n.locale)
|
||||
} // Set Lang
|
||||
|
||||
// console.log('LANG ORA=', UserStore.state.lang)
|
||||
// console.log('LANG ORA=', toolsext.getLocale())
|
||||
|
||||
globalroutines(this, 'loadapp', '')
|
||||
return riscode
|
||||
|
||||
@@ -2,6 +2,7 @@ import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import { UserStore } from '@store'
|
||||
import { tools } from '../../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
import { ISignupOptions, IUserState } from 'model'
|
||||
import { validations, TSignup } from './signup-validate'
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
import { UserStore } from "../../store/Modules";
|
||||
import { IUserState } from "../../model";
|
||||
import { tools } from "../../store/Modules/tools";
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
export default class UpdatePassword extends Vue {
|
||||
emailsent = false
|
||||
|
||||
@@ -4,6 +4,11 @@ $heightBtn: 100%;
|
||||
min-width: 350px;
|
||||
}
|
||||
|
||||
.clVista {
|
||||
max-height: 400px !important;
|
||||
}
|
||||
|
||||
|
||||
.flex-container, .flex-container_col{
|
||||
background-color: rgb(250, 250, 250);
|
||||
padding: 2px 4px 2px 4px;
|
||||
@@ -90,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;
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import Vue from 'vue'
|
||||
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 { CTodo } from '../../../components/todos/CTodo'
|
||||
|
||||
import { tools } from '../../../store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { lists } from '../../../store/Modules/lists'
|
||||
import * as ApiTables from '../../../store/Modules/ApiTables'
|
||||
|
||||
import { GlobalStore, Projects, Todos } from '@store'
|
||||
@@ -37,6 +39,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
|
||||
@@ -51,10 +55,11 @@ export default class ProjList extends Vue {
|
||||
public whatisSel: number = 0
|
||||
public colProgress: string = 'blue'
|
||||
public percProgress: string = 'percProgress'
|
||||
public readonly: boolean = false
|
||||
|
||||
public selectStatus: [] = tools.selectStatus[UserStore.state.lang]
|
||||
public selectPhase: [] = tools.selectPhase[UserStore.state.lang]
|
||||
public selectPrivacy: [] = tools.selectPrivacy[UserStore.state.lang]
|
||||
public selectStatus: [] = tools.selectStatus[toolsext.getLocale()]
|
||||
public selectPhase: [] = tools.selectPhase[toolsext.getLocale()]
|
||||
public selectPrivacy: [] = tools.selectPrivacy[toolsext.getLocale()]
|
||||
|
||||
public $refs: {
|
||||
singleproject: SingleProject[],
|
||||
@@ -62,16 +67,17 @@ export default class ProjList extends Vue {
|
||||
}
|
||||
|
||||
@Getter('projs_dacompletare', { namespace })
|
||||
public projs_dacompletare: (state: IProjectsState, id_parent: string, miei: boolean) => IProject[]
|
||||
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() {
|
||||
console.log('tools.getUrlByTipoProj(this.areMyProjects)', tools.getUrlByTipoProj(this.areMyProjects))
|
||||
console.log('tools.getUrlByTipoProj(this.tipoProj)', tools.getUrlByTipoProj(this.tipoProj))
|
||||
this.changeparent()
|
||||
}
|
||||
|
||||
@Watch('$route.params.idProj')
|
||||
@@ -96,9 +102,43 @@ export default class ProjList extends Vue {
|
||||
// console.log('idproj', this.idProjAtt, 'params' , this.$route.params)
|
||||
}
|
||||
|
||||
get areMyProjects() {
|
||||
console.log('this.$route.name', this.$route.name)
|
||||
return this.$route.name === RouteNames.myprojects
|
||||
public keyDownArea(e) {
|
||||
console.log('keyDownArea')
|
||||
}
|
||||
|
||||
get classTitle() {
|
||||
let cl = 'flex-item categorytitle shadow-4'
|
||||
if (!!this.itemprojparent) {
|
||||
cl += ' text-' + this.itemprojparent.themecolor + ' bg-' + this.itemprojparent.themebgcolor
|
||||
} else {
|
||||
cl += ' text-black' + ' bg-light-blue'
|
||||
}
|
||||
return cl
|
||||
}
|
||||
|
||||
get classTitleTodoSel() {
|
||||
let cl = 'flex-item shadow-4'
|
||||
if (!!this.itemtodosel) {
|
||||
cl += ' text-' + this.itemtodosel.themecolor + ' bg-' + this.itemtodosel.themebgcolor
|
||||
} else {
|
||||
cl += ' text-black' + ' bg-light-blue'
|
||||
}
|
||||
return cl
|
||||
}
|
||||
|
||||
get classTitleProjSel() {
|
||||
let cl = 'flex-item categorytitle shadow-4'
|
||||
if (!!this.itemselproj) {
|
||||
cl += ' text-' + this.itemselproj.themecolor + ' bg-' + this.itemselproj.themebgcolor
|
||||
} else {
|
||||
cl += ' text-black' + ' bg-light-blue'
|
||||
}
|
||||
return cl
|
||||
}
|
||||
|
||||
get tipoProj() {
|
||||
// console.log('this.$route.name', this.$route.name)
|
||||
return this.$route.name
|
||||
}
|
||||
|
||||
get readonly_PanelPrivacy() {
|
||||
@@ -106,7 +146,7 @@ export default class ProjList extends Vue {
|
||||
}
|
||||
|
||||
get readonly_PanelPrivacySel() {
|
||||
return !this.CanIModifyPanelPrivacySel
|
||||
return !this.CanIModifyPanelPrivacySel || this.readonly
|
||||
}
|
||||
|
||||
get CanISeeProject() {
|
||||
@@ -130,7 +170,7 @@ export default class ProjList extends Vue {
|
||||
}
|
||||
|
||||
get getrouteup() {
|
||||
return tools.getUrlByTipoProj(this.areMyProjects) + this.itemproj.id_parent
|
||||
return tools.getUrlByTipoProj(this.tipoProj) + this.itemproj.id_parent
|
||||
}
|
||||
|
||||
get tools() {
|
||||
@@ -162,14 +202,20 @@ export default class ProjList extends Vue {
|
||||
}
|
||||
|
||||
get menuPopupConfigProject() {
|
||||
let mymenu = null
|
||||
if (this.isMainProject)
|
||||
return tools.menuPopupConfigMAINProject[UserStore.state.lang]
|
||||
mymenu = tools.menuPopupConfigMAINProject[toolsext.getLocale()]
|
||||
else
|
||||
return tools.menuPopupConfigProject[UserStore.state.lang]
|
||||
mymenu = tools.menuPopupConfigProject[toolsext.getLocale()]
|
||||
|
||||
if (mymenu.length > 0)
|
||||
mymenu[0].disable = !(GlobalStore.state.lastaction.type === lists.MenuAction.CUT)
|
||||
|
||||
return mymenu
|
||||
}
|
||||
|
||||
get listOptionShowTask() {
|
||||
return tools.listOptionShowTask[UserStore.state.lang]
|
||||
return tools.listOptionShowTask[toolsext.getLocale()]
|
||||
}
|
||||
|
||||
get descrProject() {
|
||||
@@ -183,6 +229,14 @@ export default class ProjList extends Vue {
|
||||
}
|
||||
return Math.round(this.itemselproj.hoursworked / this.itemselproj.hoursplanned * 100)
|
||||
|
||||
}
|
||||
get getCalcHoursLeft() {
|
||||
|
||||
if (this.itemselproj.hoursleft <= 0) {
|
||||
return 0
|
||||
}
|
||||
return Math.round(this.itemselproj.hoursworked / this.itemselproj.hoursleft * 100)
|
||||
|
||||
}
|
||||
|
||||
get calcprogressWeekly() {
|
||||
@@ -199,7 +253,8 @@ export default class ProjList extends Vue {
|
||||
|
||||
try {
|
||||
|
||||
let orerimaste = this.itemselproj.hoursplanned - this.itemselproj.hoursworked
|
||||
// let orerimaste = this.itemselproj.hoursplanned - this.itemselproj.hoursworked
|
||||
let orerimaste = this.itemselproj.hoursleft
|
||||
if (orerimaste < 0) {
|
||||
orerimaste = 0
|
||||
}
|
||||
@@ -219,7 +274,7 @@ export default class ProjList extends Vue {
|
||||
console.log(' days', days, 'weeks', weeks, 'orerimaste', orerimaste, 'dateestimated', this.itemselproj.endwork_estimate)
|
||||
|
||||
return this.itemselproj.endwork_estimate
|
||||
}catch (e) {
|
||||
} catch (e) {
|
||||
this.itemselproj.endwork_estimate = tools.getDateNull()
|
||||
}
|
||||
|
||||
@@ -254,7 +309,7 @@ export default class ProjList extends Vue {
|
||||
}
|
||||
|
||||
public showTask(field_value) {
|
||||
return field_value === tools.MenuAction.SHOW_TASK
|
||||
return field_value === lists.MenuAction.SHOW_TASK
|
||||
}
|
||||
|
||||
public async onEndproj(itemdragend) {
|
||||
@@ -277,7 +332,7 @@ export default class ProjList extends Vue {
|
||||
id_proj: this.idProjAtt,
|
||||
newIndex: this.getElementIndex(args.el),
|
||||
oldIndex: this.getElementOldIndex(args.el),
|
||||
mieiproj: this.areMyProjects
|
||||
tipoproj: this.tipoProj
|
||||
}
|
||||
|
||||
// console.log('args', args, itemdragend)
|
||||
@@ -295,16 +350,27 @@ export default class ProjList extends Vue {
|
||||
this.load()
|
||||
}
|
||||
|
||||
get isHorizontal() {
|
||||
return (Screen.width < 600)
|
||||
}
|
||||
|
||||
get myStyle(){
|
||||
if (this.isHorizontal)
|
||||
return 'height: 600px'
|
||||
else
|
||||
return ''
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
|
||||
// console.log('Screen.width', Screen.width)
|
||||
// console.log('this.$route', this.$route)
|
||||
|
||||
if (Screen.width < 400) {
|
||||
this.splitterModel = 100
|
||||
} else {
|
||||
this.splitterModel = 50
|
||||
}
|
||||
// if (Screen.width < 400) {
|
||||
// this.splitterModel = 100
|
||||
// } else {
|
||||
// this.splitterModel = 50
|
||||
// }
|
||||
this.idProjAtt = this.$route.params.idProj
|
||||
this.updateindexProj()
|
||||
|
||||
@@ -341,26 +407,40 @@ export default class ProjList extends Vue {
|
||||
}
|
||||
|
||||
public dbInsert() {
|
||||
console.log('dbInsert')
|
||||
const descr = this.projbottom.trim()
|
||||
|
||||
this.projbottom = ''
|
||||
|
||||
return this.addProject(descr)
|
||||
return this.addProject(descr, this.tipoProj)
|
||||
}
|
||||
|
||||
public async clickMenuProjList(action) {
|
||||
console.log('clickMenuProjList: ', action)
|
||||
if (action === tools.MenuAction.ADD_PROJECT) {
|
||||
const idnewelem = await this.addProject('')
|
||||
if (action === lists.MenuAction.ADD_PROJECT) {
|
||||
const idnewelem = await this.addProject('', this.tipoProj)
|
||||
// get element by id
|
||||
const elem = this.getCompProjectById(idnewelem)
|
||||
// @ts-ignore
|
||||
elem.activeEdit()
|
||||
// console.log('idnewelem', idnewelem, 'Elem Trovato', elem)
|
||||
} else if (action === lists.MenuAction.PASTE) {
|
||||
|
||||
const myaction: IAction = {
|
||||
table: GlobalStore.state.lastaction.table,
|
||||
type: lists.MenuAction.PASTE,
|
||||
_id: this.itemselproj._id
|
||||
}
|
||||
|
||||
if (myaction.table === tools.projects)
|
||||
return await Projects.actions.ActionCutPaste(myaction)
|
||||
else if (myaction.table === tools.todos)
|
||||
return await Todos.actions.ActionCutPaste(myaction)
|
||||
}
|
||||
}
|
||||
|
||||
public getCompProjectById(id): SingleProject {
|
||||
if (!!this.$refs.singleproject) {
|
||||
console.log('this.$refs.singleproject', this.$refs.singleproject)
|
||||
for (const elem of this.$refs.singleproject) {
|
||||
// @ts-ignore
|
||||
@@ -369,17 +449,33 @@ export default class ProjList extends Vue {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// const descr = this.$t('project.newproj').toString()
|
||||
|
||||
public async addProject(descr) {
|
||||
const myobj: IProject = {
|
||||
public async addProject(descr, tipoproj: string) {
|
||||
const projatt = Projects.getters.getRecordById(this.idProjAtt)
|
||||
let myobj: IProject = null
|
||||
if (this.idProjAtt === process.env.PROJECT_ID_MAIN) {
|
||||
myobj = {
|
||||
descr,
|
||||
id_parent: this.idProjAtt
|
||||
id_parent: this.idProjAtt,
|
||||
privacyread: tools.getprivacyreadbytipoproj(tipoproj),
|
||||
privacywrite: tools.getprivacywritebytipoproj(tipoproj),
|
||||
actualphase: projatt.actualphase
|
||||
}
|
||||
} else {
|
||||
myobj = {
|
||||
descr,
|
||||
id_parent: this.idProjAtt,
|
||||
privacyread: projatt.privacyread,
|
||||
privacywrite: projatt.privacywrite,
|
||||
actualphase: projatt.actualphase
|
||||
}
|
||||
}
|
||||
|
||||
if (this.itemproj === undefined)
|
||||
this.itemproj = Projects.getters.getRecordById(this.idProjAtt)
|
||||
this.itemproj = projatt
|
||||
|
||||
if (this.isRootProject) {
|
||||
myobj.typeproj = TypeProj.TYPE_PROJECT
|
||||
@@ -396,6 +492,7 @@ export default class ProjList extends Vue {
|
||||
return
|
||||
}
|
||||
|
||||
console.log('Nuovo PROJ', myobj)
|
||||
return await Projects.actions.dbInsert({ myobj, atfirst: false })
|
||||
}
|
||||
|
||||
@@ -403,10 +500,36 @@ export default class ProjList extends Vue {
|
||||
this.idsel = id
|
||||
this.whatisSel = tools.WHAT_PROJECT
|
||||
this.itemselproj = Projects.getters.getRecordById(this.idsel)
|
||||
if ((this.itemselproj === undefined || this.itemselproj === null))
|
||||
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) {
|
||||
@@ -424,7 +547,7 @@ export default class ProjList extends Vue {
|
||||
public deselectAllRowstodo(item: ITodo, check, onlythis: boolean = false) {
|
||||
// console.log('PROJ-LIST deselectAllRowstodo : ', item)
|
||||
|
||||
return false
|
||||
// return false
|
||||
|
||||
// @ts-ignore
|
||||
for (const i in this.$refs.ctodo.$refs.single) {
|
||||
@@ -451,9 +574,24 @@ 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')
|
||||
this.setidsel(item._id)
|
||||
this.readonly = false
|
||||
}
|
||||
|
||||
if (this.$refs.singleproject === undefined)
|
||||
return
|
||||
|
||||
for (const i in this.$refs.singleproject) {
|
||||
|
||||
const contr = this.$refs.singleproject[i] as SingleProject
|
||||
@@ -478,7 +616,11 @@ export default class ProjList extends Vue {
|
||||
}
|
||||
|
||||
public updateclasses() {
|
||||
if (!!this.itemselproj) {
|
||||
this.colProgress = tools.getProgressColor(this.itemselproj.progressCalc)
|
||||
} else {
|
||||
this.whatisSel = tools.WHAT_NOTHING
|
||||
}
|
||||
}
|
||||
|
||||
public checkUpdate() {
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
<div class="panel">
|
||||
<q-splitter
|
||||
v-model="splitterModel"
|
||||
:horizontal="isHorizontal"
|
||||
:style="myStyle"
|
||||
:limits="[50, 100]"
|
||||
>
|
||||
|
||||
<template v-slot:before class="clMain">
|
||||
<template v-slot:before>
|
||||
<div>
|
||||
<!--{{idProjAtt}}-->
|
||||
<div class="divtitlecat clMain">
|
||||
@@ -17,7 +19,7 @@
|
||||
|
||||
</q-btn>
|
||||
|
||||
<div class="flex-item categorytitle shadow-4">{{descrProject | capitalize}}</div>
|
||||
<div :class="classTitle">{{descrProject | capitalize}}</div>
|
||||
<div class="flex-item">
|
||||
<q-btn push
|
||||
size="sm"
|
||||
@@ -59,7 +61,7 @@
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</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)">
|
||||
|
||||
<q-item-section avatar>
|
||||
@@ -79,9 +81,9 @@
|
||||
<div style="display: none">{{ prior = 0, priorcomplet = false }}</div>
|
||||
<div>
|
||||
<!--<q-infinite-scroll :handler="loadMoreTodo" :offset="7">-->
|
||||
<div class="container" v-dragula="projs_dacompletare(idProjAtt, areMyProjects)" drake="second">
|
||||
<div class="container" v-dragula="projs_dacompletare(idProjAtt, tipoProj)" drake="second">
|
||||
<div :id="tools.getmyid(myproj._id)" :index="index"
|
||||
v-for="(myproj, index) in projs_dacompletare(idProjAtt, areMyProjects)"
|
||||
v-for="(myproj, index) in projs_dacompletare(idProjAtt, tipoProj)"
|
||||
:key="myproj._id" class="myitemdrag">
|
||||
|
||||
<SingleProject ref="singleproject" @deleteItemproj="mydeleteitemproj(myproj._id)"
|
||||
@@ -98,6 +100,20 @@
|
||||
</div>
|
||||
<q-separator></q-separator>
|
||||
|
||||
<q-input v-model="projbottom"
|
||||
style="margin-left: 6px;"
|
||||
color="blue-12"
|
||||
:label="$t('proj.insertbottom')"
|
||||
:after="[{icon: 'arrow_forward', content: true, handler () {}}]"
|
||||
>
|
||||
|
||||
</q-input>
|
||||
|
||||
<br>
|
||||
<q-separator></q-separator>
|
||||
|
||||
|
||||
|
||||
<!--CanIModifyPanelPrivacy = {{CanIModifyPanelPrivacy}}<br>-->
|
||||
<!--CanIModifyPanelPrivacySel = {{CanIModifyPanelPrivacySel}}<br>-->
|
||||
<!--CanISeeProject = {{CanISeeProject}}<br>-->
|
||||
@@ -113,11 +129,20 @@
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="(whatisSel === tools.WHAT_PROJECT) && (!!itemselproj.descr)" v-slot:after>
|
||||
|
||||
<!--ID = {{itemselproj._id}}-->
|
||||
<div class="q-pa-xs 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"/>
|
||||
<div class="flex-item projecttitle shadow-4">
|
||||
<div :class="classTitleProjSel">
|
||||
{{itemselproj.descr}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -246,8 +271,10 @@
|
||||
<q-input
|
||||
ref="input4"
|
||||
v-model="itemtodosel.descr"
|
||||
:class="classTitleTodoSel"
|
||||
:label="$t('proj.longdescr')"
|
||||
outlined
|
||||
:readonly="readonly_PanelPrivacy"
|
||||
debounce="1000"
|
||||
autogrow>
|
||||
|
||||
@@ -259,6 +286,7 @@
|
||||
<q-icon class="flex-item flex-icon" name="done_outline"/>
|
||||
<div class="flex-item itemstatus">
|
||||
<q-select rounded outlined v-model="itemtodosel.statustodo" :options="selectStatus"
|
||||
:readonly="readonly_PanelPrivacy"
|
||||
:label="$t('todo.status')" emit-value map-options
|
||||
@input="modifyfieldtodo('statustodo')">
|
||||
</q-select>
|
||||
@@ -266,6 +294,7 @@
|
||||
<q-icon class="flex-item flex-icon" name="outlined_flag"/>
|
||||
<div class="flex-item itemstatus">
|
||||
<q-select rounded outlined v-model="itemtodosel.phase" :options="selectPhase"
|
||||
:readonly="readonly_PanelPrivacy"
|
||||
:label="$t('todo.phase')" emit-value map-options>
|
||||
</q-select>
|
||||
</div>
|
||||
@@ -275,6 +304,7 @@
|
||||
<div class="flex-item itemdescr">
|
||||
<q-input
|
||||
ref="input5"
|
||||
:readonly="readonly_PanelPrivacy"
|
||||
v-model="itemtodosel.hoursworked"
|
||||
type="number"
|
||||
rounded outlined
|
||||
@@ -288,6 +318,7 @@
|
||||
<div class="flex-item itemdata content-center">
|
||||
<q-input
|
||||
ref="input6"
|
||||
:readonly="readonly_PanelPrivacy"
|
||||
type="number"
|
||||
v-model="itemtodosel.hoursplanned"
|
||||
rounded outlined
|
||||
@@ -297,6 +328,7 @@
|
||||
</q-input>
|
||||
|
||||
<CProgress :descr="$t('proj.progresstask')"
|
||||
:readonly="readonly_PanelPrivacy"
|
||||
:progressval="itemtodosel.progress"
|
||||
:slider="true" @input="itemtodosel.progress = arguments[0]"></CProgress>
|
||||
</div>
|
||||
@@ -305,6 +337,7 @@
|
||||
<q-icon class="flex-item flex-icon" name="developer_mode"/>
|
||||
<div class="flex-item itemdata">
|
||||
<CDate :mydate="itemtodosel.start_date"
|
||||
:readonly="readonly_PanelPrivacy"
|
||||
@input="itemtodosel.start_date = new Date(arguments[0])"
|
||||
:label="$t('todo.start_date')">
|
||||
|
||||
@@ -313,7 +346,7 @@
|
||||
<div style="margin: 10px;"></div>
|
||||
<q-icon class="flex-item flex-icon" name="event"/>
|
||||
<div class="flex-item itemdata">
|
||||
<CDate :readonly="itemtodosel.statustodo !== tools.Status.COMPLETED"
|
||||
<CDate :readonly="((itemtodosel.statustodo !== tools.Status.COMPLETED) || readonly_PanelPrivacy)"
|
||||
:mydate="itemtodosel.completed_at"
|
||||
@input="itemtodosel.completed_at = new Date(arguments[0])"
|
||||
:label="$t('todo.completed_at')">
|
||||
|
||||
@@ -66,8 +66,6 @@
|
||||
}
|
||||
|
||||
.categorytitle{
|
||||
color:blue;
|
||||
background-color: lightblue;
|
||||
font-size: 1.25rem;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
|
||||
@@ -2,6 +2,7 @@ import Vue from 'vue'
|
||||
import { Component, Watch } from 'vue-property-decorator'
|
||||
import { CTodo } from '@src/components/todos/CTodo'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
@Component({
|
||||
components: { CTodo },
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
"es2015.promise",
|
||||
"es2017",
|
||||
"es2017.object",
|
||||
"es2018",
|
||||
"es7"
|
||||
],
|
||||
"baseUrl": "./src",
|
||||
|
||||
Reference in New Issue
Block a user