Merge pull request #23 from paoloar77/FunzProjects

Funz projects
This commit is contained in:
Paolo Arena
2019-07-12 14:11:25 +02:00
committed by GitHub
72 changed files with 2583 additions and 1286 deletions

9
.gitignore vendored
View File

@@ -30,12 +30,11 @@ yarn-error.log*
coverage coverage
/_PROVE /_PROVE
/_LOCALE /_LOCALE
deploy.sh
deploy_on_production.sh
deploy_on_test_server.sh
send_to_production.sh
compileandserve.sh compileandserve.sh
deploy_all.sh deploy_all.sh
deploy_frontend.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 serve_on_localhost.sh

1
cfg_locale Symbolic link
View File

@@ -0,0 +1 @@
cfg_freeplanet.app/

View File

@@ -28,7 +28,7 @@
"dependencies": { "dependencies": {
"@babel/plugin-transform-runtime": "^7.4.0", "@babel/plugin-transform-runtime": "^7.4.0",
"@babel/runtime": "^7.0.0", "@babel/runtime": "^7.0.0",
"@quasar/extras": "^1.1.0", "@quasar/extras": "^1.1.2",
"@types/vuelidate": "^0.7.0", "@types/vuelidate": "^0.7.0",
"@vue/eslint-config-standard": "^4.0.0", "@vue/eslint-config-standard": "^4.0.0",
"acorn": "^6.0.0", "acorn": "^6.0.0",
@@ -50,7 +50,7 @@
"normalize.css": "^8.0.0", "normalize.css": "^8.0.0",
"npm": "^6.9.0", "npm": "^6.9.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"quasar": "^1.0.0-beta.17", "quasar": "^1.0.0-beta.21",
"quasar-extras": "^2.0.8", "quasar-extras": "^2.0.8",
"register-service-worker": "^1.0.0", "register-service-worker": "^1.0.0",
"vee-validate": "^2.1.2", "vee-validate": "^2.1.2",
@@ -85,7 +85,7 @@
"@babel/plugin-syntax-dynamic-import": "^7.2.0", "@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-syntax-import-meta": "^7.2.0", "@babel/plugin-syntax-import-meta": "^7.2.0",
"@babel/preset-env": "^7.4.2", "@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", "@quasar/quasar-app-extension-typescript": "^1.0.0-alpha.11",
"@types/dotenv": "^4.0.3", "@types/dotenv": "^4.0.3",
"@types/jest": "^23.1.4", "@types/jest": "^23.1.4",

View File

@@ -116,7 +116,7 @@ module.exports = function (ctx) {
}, },
devServer: { devServer: {
https: false, https: false,
port: 8080, port: 8082,
open: false // opens browser window automatically open: false // opens browser window automatically
}, },
// framework: 'all' --- includes everything; for dev only! // framework: 'all' --- includes everything; for dev only!
@@ -172,6 +172,7 @@ module.exports = function (ctx) {
'QAvatar', 'QAvatar',
'QImg', 'QImg',
'QSplitter', 'QSplitter',
'QRating',
'QSeparator' 'QSeparator'
], ],
directives: [ directives: [

View File

@@ -6,15 +6,17 @@
// Questo è il swSrc // 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/idb.js');
importScripts('../statics/js/storage.js'); importScripts('../statics/js/storage.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.0.0/workbox-sw.js'); //++Todo: Replace with local workbox.js importScripts('../statics/js/workbox-sw.js');
// importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.0.0/workbox-sw.js');
let port = 3000; let port = 3000;
if (self.location.hostname === 'test.freeplanet.app') { if (self.location.hostname.startsWith('test')) {
port = 3001; port = 3001;
} }
// console.log('SW-06 1'); // console.log('SW-06 1');
@@ -66,7 +68,7 @@ if (workbox) {
const debug = false; const debug = false;
workbox.setConfig({ debug: debug }); 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 * The workboxSW.precacheAndRoute() method efficiently caches and responds to
@@ -279,7 +281,7 @@ if (workbox) {
// Storage // Storage
workbox.routing.registerRoute( workbox.routing.registerRoute(
new RegExp(/.*(?:storage\.freeplanet)\.app.*$/), new RegExp(/.*(?:storage)/),
workbox.strategies.staleWhileRevalidate({ workbox.strategies.staleWhileRevalidate({
cacheName: 'storage', cacheName: 'storage',
plugins: [ plugins: [

View File

@@ -2,6 +2,7 @@
import VueI18n from 'vue-i18n' import VueI18n from 'vue-i18n'
import messages from '../statics/i18n' import messages from '../statics/i18n'
import { tools } from '../store/Modules/tools' import { tools } from '../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
export default ({ app, store, Vue }) => { export default ({ app, store, Vue }) => {
Vue.use(VueI18n) Vue.use(VueI18n)

View File

@@ -1,20 +1,5 @@
$heightBtn: 100%; $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 { .progress-item {
margin: 1px; margin: 1px;
padding: 2px; padding: 2px;

View File

@@ -1,6 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
import { Component, Prop, Watch } from 'vue-property-decorator' import { Component, Prop, Watch } from 'vue-property-decorator'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { date } from 'quasar' import { date } from 'quasar'

View File

@@ -1,20 +1,5 @@
$heightBtn: 100%; $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 { .progress-item {
margin: 1px; margin: 1px;
padding: 2px; padding: 2px;

View File

@@ -2,6 +2,7 @@ import Vue from 'vue'
import { Component, Prop, Watch } from 'vue-property-decorator' import { Component, Prop, Watch } from 'vue-property-decorator'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
@Component({ @Component({
name: 'CProgress' name: 'CProgress'
@@ -20,6 +21,7 @@ export default class CProgress extends Vue {
@Prop({ required: true }) public progressval: number @Prop({ required: true }) public progressval: number
@Prop() public descr: string @Prop() public descr: string
@Prop({ default: false }) public slider: boolean @Prop({ default: false }) public slider: boolean
@Prop({ default: false }) public readonly: boolean
@Watch('progressval') @Watch('progressval')
public valchanged(value) { public valchanged(value) {

View File

@@ -3,6 +3,7 @@
<div class="flex-item progress-item shadow-1"> <div class="flex-item progress-item shadow-1">
<q-slider v-if="slider" label <q-slider v-if="slider" label
class="cpr-slider-item" class="cpr-slider-item"
:readonly="readonly"
:value="progressval" :value="progressval"
:min="0" :min="0"
:max="100" :max="100"
@@ -12,6 +13,7 @@
<q-linear-progress <q-linear-progress
v-else v-else
stripe stripe
:readonly="readonly"
rounded rounded
:value="progressval / 100" :value="progressval / 100"
class="cpr-progrbar-item" class="cpr-progrbar-item"

View File

@@ -8,10 +8,12 @@ import { GlobalStore, UserStore } from '@modules'
// import { StateConnection } from '../../model' // import { StateConnection } from '../../model'
import { Watch } from 'vue-property-decorator' import { Watch } from 'vue-property-decorator'
import { tools } from '../../store/Modules/tools' import { tools } from '../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import Quasar from 'quasar' import Quasar, { Screen } from 'quasar'
@Component({ @Component({
name: 'Header',
components: { components: {
drawer, drawer,
messagePopover 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' }, // { 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() { get conn_changed() {
return GlobalStore.state.stateConnection return GlobalStore.state.stateConnection
} }

View File

@@ -39,7 +39,7 @@
<q-avatar> <q-avatar>
<img :src="imglogo" height="27"> <img :src="imglogo" height="27">
</q-avatar> </q-avatar>
{{$t('msg.myAppName')}} {{getappname}}
<div slot="subtitle">{{$t('msg.myDescriz')}} {{ getAppVersion() }}</div> <div slot="subtitle">{{$t('msg.myDescriz')}} {{ getAppVersion() }}</div>
</q-toolbar-title> </q-toolbar-title>

View File

@@ -2,4 +2,10 @@ export * from '../views/categories'
export * from './todos' export * from './todos'
export * from './logo' export * from './logo'
export * from './CProgress' export * from './CProgress'
export * from './CCard'
export * from './CPage'
export * from './CTitle'
export * from './CDate' export * from './CDate'
export * from './BannerCookies'
export * from './PagePolicy'
export * from './FormNewsletter'

View File

@@ -1,11 +1,17 @@
import Vue from 'vue' import Vue from 'vue'
import { Component } from 'vue-property-decorator' import { Component } from 'vue-property-decorator'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
@Component({ @Component({
name: 'Logo'
}) })
export default class Logo extends Vue { export default class Logo extends Vue {
get logoimg() { get logoimg() {
return '../../' + tools.getimglogo() return '../../' + tools.getimglogo()
} }
get logoalt() {
return process.env.APP_NAME
}
} }

View File

@@ -1,6 +1,6 @@
<template> <template>
<div id="logo"> <div id="logo">
<img id="logoimg" alt="FreePlanet" :src=logoimg> <img id="logoimg" :alt="logoalt" :src=logoimg>
</div> </div>
</template> </template>
<script lang="ts" src="./logo.ts"> <script lang="ts" src="./logo.ts">

View File

@@ -7,25 +7,11 @@ $heightBtn: 100%;
$heightcounter: 26px; $heightcounter: 26px;
$heightdescr: 20px; $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-container2 {
flex-flow: row wrap; flex-flow: row wrap;
justify-content: space-between; 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 // Set visibility: visible to the icon menu of pos-item-popover
@@ -270,7 +256,7 @@ $heightdescr: 20px;
//padding: 2px; //padding: 2px;
min-width: 100px; min-width: 100px;
text-align: left; text-align: left;
color: blue !important; color: blue;
overflow: hidden; overflow: hidden;
align-items: center; align-items: center;

View File

@@ -3,6 +3,8 @@ import { Component, Prop, Watch } from 'vue-property-decorator'
import { Projects, UserStore } from '@modules' import { Projects, UserStore } from '@modules'
import { tools } from '../../../store/Modules/tools' import { tools } from '../../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { lists } from '../../../store/Modules/lists'
import { IProject } from '../../../model/index' import { IProject } from '../../../model/index'
@@ -10,13 +12,14 @@ import { SubMenusProj } from '../SubMenusProj'
import { CDate } from '../../CDate' import { CDate } from '../../CDate'
import { date } from 'quasar' import { date } from 'quasar'
import { GlobalStore } from '@store'
import { RouteNames } from '@src/router/route-names'
@Component({ @Component({
components: { SubMenusProj, CDate }, components: { SubMenusProj, CDate },
name: 'SingleProject' name: 'SingleProject'
}) })
export default class SingleProject extends Vue { export default class SingleProject extends Vue {
public selectPriority: [] = []
public menuPopupProj: any[] = [] public menuPopupProj: any[] = []
public classDescr: string = '' public classDescr: string = ''
public classDescrEdit: string = '' public classDescrEdit: string = ''
@@ -50,50 +53,83 @@ export default class SingleProject extends Vue {
@Prop({ required: true }) public itemproject: IProject @Prop({ required: true }) public itemproject: IProject
@Watch('itemproject.enableExpiring') public valueChanged4() { @Watch('itemproject.enableExpiring')
public valueChanged4() {
this.watchupdate('enableExpiring') this.watchupdate('enableExpiring')
} }
@Watch('itemproject.expiring_at') public valueChanged2() { @Watch('itemproject.expiring_at')
public valueChanged2() {
this.watchupdate('expiring_at') this.watchupdate('expiring_at')
} }
@Watch('itemproject.descr') public valueChanged5() { @Watch('itemproject.descr')
public valueChanged5() {
this.precDescr = this.itemproject.descr this.precDescr = this.itemproject.descr
} }
@Watch('itemproject.longdescr') public valueChangedlongdescr() { @Watch('itemproject.longdescr')
public valueChangedlongdescr() {
this.watchupdate('longdescr') this.watchupdate('longdescr')
} }
@Watch('itemproject.hoursplanned') public valueChangedhoursplanned() { @Watch('itemproject.hoursplanned')
public valueChangedhoursplanned() {
this.watchupdate('hoursplanned') this.watchupdate('hoursplanned')
} }
@Watch('itemproject.hoursworked') public valueChangedhoursworked() {
@Watch('itemproject.themecolor')
public valueChangedthemecolor() {
this.watchupdate('themecolor')
}
@Watch('itemproject.themebgcolor')
public valueChangedthemebgcolor() {
this.watchupdate('themebgcolor')
}
@Watch('itemproject.hoursworked')
public valueChangedhoursworked() {
this.watchupdate('hoursworked') this.watchupdate('hoursworked')
} }
@Watch('itemproject.begin_development') public valueChangedbegin_development() {
@Watch('itemproject.begin_development')
public valueChangedbegin_development() {
this.watchupdate('begin_development') this.watchupdate('begin_development')
} }
@Watch('itemproject.hoursweeky_plannedtowork') public valueChangedhoursweeky_plannedtowork() {
@Watch('itemproject.hoursweeky_plannedtowork')
public valueChangedhoursweeky_plannedtowork() {
this.watchupdate('hoursweeky_plannedtowork') this.watchupdate('hoursweeky_plannedtowork')
} }
@Watch('itemproject.begin_test') public valueChangedbegin_test() {
@Watch('itemproject.begin_test')
public valueChangedbegin_test() {
this.watchupdate('begin_test') this.watchupdate('begin_test')
} }
@Watch('itemproject.actualphase') public valueChangedactualphase() {
@Watch('itemproject.actualphase')
public valueChangedactualphase() {
this.watchupdate('actualphase') this.watchupdate('actualphase')
} }
@Watch('itemproject.privacyread') public valueChanged_privacyread() {
@Watch('itemproject.privacyread')
public valueChanged_privacyread() {
this.watchupdate('privacyread') this.watchupdate('privacyread')
} }
@Watch('itemproject.privacywrite') public valueChanged_privacywrite() {
@Watch('itemproject.privacywrite')
public valueChanged_privacywrite() {
this.watchupdate('privacywrite') this.watchupdate('privacywrite')
} }
@Watch('itemproject.totalphases') public valueChangedtotalphases() {
@Watch('itemproject.totalphases')
public valueChangedtotalphases() {
this.watchupdate('totalphases') this.watchupdate('totalphases')
} }
@Watch('itemproject.progressCalc') public valueChanged6() {
@Watch('itemproject.progressCalc')
public valueChanged6() {
console.log('itemproject.progressCalc') console.log('itemproject.progressCalc')
this.updateClasses() this.updateClasses()
@@ -112,12 +148,12 @@ export default class SingleProject extends Vue {
return this.$t('proj.newsubproj') return this.$t('proj.newsubproj')
} }
/* /*
public dateToYYYYMMDD(date) { public dateToYYYYMMDD(date) {
// may have timezone caveats https://stackoverflow.com/a/29774197/1850609 // may have timezone caveats https://stackoverflow.com/a/29774197/1850609
return date && date.toISOString().split('T')[0] return date && date.toISOString().split('T')[0]
} }
*/ */
// Computed: // Computed:
get isSel() { get isSel() {
@@ -134,7 +170,7 @@ export default class SingleProject extends Vue {
public watchupdate(field = '') { public watchupdate(field = '') {
console.log('watchupdate PROJ', field) console.log('watchupdate PROJ', field)
this.$emit('eventupdateproj', {myitem: this.itemproject, field } ) this.$emit('eventupdateproj', { myitem: this.itemproject, field })
this.updateicon() this.updateicon()
} }
@@ -147,32 +183,37 @@ export default class SingleProject extends Vue {
this.classDescrEdit += ' titleLista-item' this.classDescrEdit += ' titleLista-item'
} }
if (this.itemproject.progressCalc > 100) this.classDescr += ' text-' + this.itemproject.themecolor + ' bg-' + this.itemproject.themebgcolor
this.itemproject.progressCalc = 100 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.classExpiring = 'flex-item data-item shadow-1 hide-if-small'
this.classExpiringEx = '' this.classExpiringEx = ''
this.percentageProgress = this.itemproject.progressCalc
this.percProgress = 'percProgress'
this.colProgress = tools.getProgressColor(this.itemproject.progressCalc)
this.percProgress += ' ' + tools.getProgressClassColor(this.itemproject.progressCalc)
this.clButtPopover = this.sel ? 'pos-item-popover comp_selected' : 'pos-item-popover' this.clButtPopover = this.sel ? 'pos-item-popover comp_selected' : 'pos-item-popover'
if (this.itemproject.statusproj !== tools.Status.COMPLETED) { if (!!this.itemproject) {
this.clButtPopover += ' pos-item-popover_cursor' 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()) { if (this.isProject()) {
this.menuPopupProj = tools.menuPopupProj[UserStore.state.lang] this.menuPopupProj = tools.menuPopupProj[toolsext.getLocale()]
} }
else { else {
this.menuPopupProj = [] 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.updateClasses()
this.selectPriority = tools.selectPriority[UserStore.state.lang]
} }
public getClassRow() { public getClassRow() {
@@ -192,19 +231,20 @@ export default class SingleProject extends Vue {
} }
public clickRiga(clickmenu: boolean = false) { public clickRiga(clickmenu: boolean = false) {
console.log('CLICK RIGA PROJ************') console.log('CLICK RIGA PROJ ************')
if (!this.sel) { // if (!this.sel) {
if (!this.inEdit) {
// this.attivaEdit = true
this.$emit('deselectAllRowstodo', null, false)
this.$emit('deselectAllRowsproj', this.itemproject, true)
if (!this.sel) { if (!this.inEdit) {
this.selectRiga() // console.log('entrato...')
} else { this.$emit('deselectAllRowstodo', null, false)
this.deselectRiga() this.$emit('deselectAllRowsproj', this.itemproject, true)
}
if (!this.sel) {
this.selectRiga()
} else {
this.$emit('deselectAllRowsproj', null, false, false, true)
this.deselectRiga()
} }
} }
} }
@@ -246,7 +286,7 @@ export default class SingleProject extends Vue {
this.clickRiga() this.clickRiga()
} }
public activeEdit(){ public activeEdit() {
console.log('Attiva Edit') console.log('Attiva Edit')
this.attivaEdit = true this.attivaEdit = true
this.editProject() this.editProject()
@@ -256,12 +296,16 @@ export default class SingleProject extends Vue {
return this.itemproject.userId === UserStore.state.userId return this.itemproject.userId === UserStore.state.userId
} }
get tipoProj() {
return this.$route.name
}
get getrouteto() { get getrouteto() {
return tools.getUrlByTipoProj(this.isMyProject) + this.itemproject._id return tools.getUrlByTipoProj(this.tipoProj) + this.itemproject._id
} }
public goIntoTheProject() { public goIntoTheProject() {
this.$router.replace(tools.getUrlByTipoProj(this.isMyProject) + this.itemproject._id) this.$router.replace(tools.getUrlByTipoProj(this.tipoProj) + this.itemproject._id)
} }
public editProject() { public editProject() {
@@ -277,7 +321,7 @@ export default class SingleProject extends Vue {
this.updateClasses() this.updateClasses()
} }
this.faiFocus('inputprojdescr', false, true) this.faiFocus('inputprojdescr', false, true)
} }
// console.log('FINE - editProject') // console.log('FINE - editProject')
} }
@@ -298,7 +342,7 @@ export default class SingleProject extends Vue {
} }
// console.log('focus()') // console.log('focus()')
}, 500) }, 400)
} }
public getFocus(e) { public getFocus(e) {
@@ -325,7 +369,7 @@ export default class SingleProject extends Vue {
if (((e.keyCode === 46)) && (this.precDescr === '') && !e.shiftKey) { if (((e.keyCode === 46)) && (this.precDescr === '') && !e.shiftKey) {
e.preventDefault() e.preventDefault()
this.deselectRiga() this.deselectRiga()
this.clickMenu(tools.MenuAction.DELETE) this.clickMenu(lists.MenuAction.DELETE)
.then(() => { .then(() => {
this.faiFocus('insertProjectBottom', true) this.faiFocus('insertProjectBottom', true)
return return
@@ -336,24 +380,24 @@ export default class SingleProject extends Vue {
public keyDownArea(e) { public keyDownArea(e) {
console.log('keyDownArea') console.log('keyDownArea')
/* /*
if ((e.key === 'ArrowUp') && !e.shiftKey) { if ((e.key === 'ArrowUp') && !e.shiftKey) {
e.key = 'Tab' e.key = 'Tab'
e.shiftKey = true e.shiftKey = true
} }
if ((e.key === 'ArrowDown') && !e.shiftKey) { if ((e.key === 'ArrowDown') && !e.shiftKey) {
let nextInput = inputs.get(inputs.index(this) + 1) let nextInput = inputs.get(inputs.index(this) + 1)
if (nextInput) { if (nextInput) {
nextInput.focus() nextInput.focus()
} }
} }
*/ */
// Delete Key or Backspage // Delete Key or Backspage
if (((e.keyCode === 46)) && (this.precDescr === '') && !e.shiftKey) { if (((e.keyCode === 46)) && (this.precDescr === '') && !e.shiftKey) {
e.preventDefault() e.preventDefault()
this.deselectRiga() this.deselectRiga()
this.clickMenu(tools.MenuAction.DELETE) this.clickMenu(lists.MenuAction.DELETE)
.then(() => { .then(() => {
this.faiFocus('insertProjectBottom', true) this.faiFocus('insertProjectBottom', true)
return return
@@ -399,7 +443,7 @@ export default class SingleProject extends Vue {
this.updateClasses() this.updateClasses()
} }
public aggiornaProgress(value, initialval){ public aggiornaProgress(value, initialval) {
if (value !== initialval) { if (value !== initialval) {
this.itemproject.progressCalc = value this.itemproject.progressCalc = value
this.updatedata('progressCalc') this.updatedata('progressCalc')
@@ -424,7 +468,7 @@ export default class SingleProject extends Vue {
public updatedata(field: string) { public updatedata(field: string) {
// const myitem = tools.jsonCopy(this.itemproject) // const myitem = tools.jsonCopy(this.itemproject)
console.log('calling this.$emit(eventupdateproj)', 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() { public updateicon() {
@@ -435,10 +479,10 @@ export default class SingleProject extends Vue {
} // expand_less } // expand_less
else if (this.itemproject.priority === tools.Priority.PRIORITY_NORMAL) { else if (this.itemproject.priority === tools.Priority.PRIORITY_NORMAL) {
this.iconPriority = 'remove' this.iconPriority = 'remove'
} }
else if (this.itemproject.priority === tools.Priority.PRIORITY_LOW) { else if (this.itemproject.priority === tools.Priority.PRIORITY_LOW) {
this.iconPriority = 'expand_more' this.iconPriority = 'expand_more'
} // expand_more } // expand_more
this.updateClasses() this.updateClasses()
} }
@@ -454,18 +498,58 @@ export default class SingleProject extends Vue {
public async clickMenu(action) { public async clickMenu(action) {
console.log('click menu: ', action) console.log('click menu: ', action)
if (action === tools.MenuAction.DELETE) { if (action === lists.MenuAction.DELETE) {
return await this.askConfirmDelete() return await this.askConfirmDelete()
} else if (action === tools.MenuAction.TOGGLE_EXPIRING) { } else if (action === lists.MenuAction.TOGGLE_EXPIRING) {
return await this.enableExpiring() return await this.enableExpiring()
} else if (action === tools.MenuAction.EDIT) { } else if (action === lists.MenuAction.EDIT) {
this.activeEdit() 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) { } else if (action === 0) {
this.deselectAndExitEdit() 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) { public setPriority(newpriority) {
if (this.itemproject.priority !== newpriority) { if (this.itemproject.priority !== newpriority) {
@@ -482,7 +566,7 @@ export default class SingleProject extends Vue {
const deletestr = this.$t('dialog.delete') const deletestr = this.$t('dialog.delete')
const cancelstr = this.$t('dialog.cancel') 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({ this.$q.dialog({
cancel: { cancel: {

View File

@@ -50,7 +50,7 @@
icon="menu"> icon="menu">
<q-menu ref="popmenu" self="top right"> <q-menu ref="popmenu" self="top right">
<SubMenusProj :menuPopupProj="menuPopupProj" :itemproject="itemproject" @clickMenu="clickMenu" <SubMenusProj :menuPopupProj="menuPopupProj" :itemproject="itemproject" @clickMenu="clickMenu"
@setPriority="setPriority"></SubMenusProj> @selectSubMenu="selectSubMenu"></SubMenusProj>
</q-menu> </q-menu>
</q-btn> </q-btn>
</div> </div>

View File

@@ -2,6 +2,8 @@ import Vue from 'vue'
import { Component, Prop, Watch } from 'vue-property-decorator' import { Component, Prop, Watch } from 'vue-property-decorator'
import { tools } from '@src/store/Modules/tools' 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 { UserStore } from '@store'
import { IProject } from '../../../model/index' import { IProject } from '../../../model/index'
@@ -16,18 +18,21 @@ import { IProject } from '../../../model/index'
}) })
export default class SubMenusProj extends Vue { export default class SubMenusProj extends Vue {
public selectPriority: [] = tools.selectPriority[UserStore.state.lang]
@Prop({ required: false }) public menuPopupProj: any[] @Prop({ required: false }) public menuPopupProj: any[]
@Prop({ required: false }) public itemproject: IProject @Prop({ required: false }) public itemproject: IProject
public $q: any public $q: any
get lists() {
return lists
}
public clickMenu(field) { public clickMenu(field) {
this.$emit('clickMenu', field) this.$emit('clickMenu', field)
} }
public setPriority(field) { public selectSubMenu(action, field) {
this.$emit('setPriority', field) this.$emit('selectSubMenu', action, field)
} }
public KeychangeProgress(e) { 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')
}
} }

View File

@@ -1,7 +1,9 @@
<template> <template>
<q-list separator no-border class="todo-menu"> <q-list separator no-border class="todo-menu">
<div v-for="field in menuPopupProj" :key="field.value"> <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)"> @click="clickMenu(field.value)">
<q-item-section avatar> <q-item-section avatar>
<q-icon :name="field.icon"/> <q-icon :name="field.icon"/>
@@ -11,11 +13,11 @@
<q-item-label>{{field.label}}</q-item-label> <q-item-label>{{field.label}}</q-item-label>
</q-item-section> </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-checkbox v-model="itemproject.enableExpiring"/>
</q-item-section> </q-item-section>
</q-item> </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)"> @click="clickMenu(field.value)">
<q-item-section avatar> <q-item-section avatar>
<q-icon :name="field.icon"/> <q-icon :name="field.icon"/>
@@ -37,9 +39,10 @@
</div> </div>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-if="(field.value === 130)"> <q-item clickable
v-if="(field.arrlista !== undefined)">
<q-item-section avatar> <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>
<q-item-section>{{field.label}}</q-item-section> <q-item-section>{{field.label}}</q-item-section>
@@ -54,14 +57,16 @@
<q-item-section> <q-item-section>
<q-list dense> <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" :key="fieldprior.value"
@click="setPriority(fieldprior.value)"> @click="selectSubMenu(field.value, fieldprior.value)">
<q-item-section avatar> <q-item-section avatar v-if="!!fieldprior.icon">
<q-icon :name="fieldprior.icon" inverted color="primary"/> <q-icon :name="fieldprior.icon" inverted color="primary"/>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
{{fieldprior.label}} <span :class="`text-`+fieldprior.value">
{{fieldprior.label}}
</span>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-list> </q-list>

View File

@@ -4,6 +4,8 @@ import { Component, Prop, Watch } from 'vue-property-decorator'
import { IDrag, IProject, ITodo, ITodosState } from '../../../model/index' import { IDrag, IProject, ITodo, ITodosState } from '../../../model/index'
import { tools } from '../../../store/Modules/tools' 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 * as ApiTables from '../../../store/Modules/ApiTables'
import { GlobalStore, Todos } from '@store' import { GlobalStore, Todos } from '@store'
@@ -15,6 +17,7 @@ import { SingleTodo } from '../SingleTodo'
const namespace: string = 'Todos' const namespace: string = 'Todos'
@Component({ @Component({
name: 'CTodo',
components: { SingleTodo }, components: { SingleTodo },
filters: { filters: {
capitalize(value) { capitalize(value) {
@@ -22,6 +25,7 @@ const namespace: string = 'Todos'
} }
} }
}) })
export default class CTodo extends Vue { export default class CTodo extends Vue {
public $q: any public $q: any
public todotop: string = '' public todotop: string = ''
@@ -60,11 +64,11 @@ export default class CTodo extends Vue {
} }
get menuPopupConfigTodo() { get menuPopupConfigTodo() {
return tools.menuPopupConfigTodo[UserStore.state.lang] return tools.menuPopupConfigTodo[toolsext.getLocale()]
} }
get listOptionShowTask() { get listOptionShowTask() {
return tools.listOptionShowTask[UserStore.state.lang] return tools.listOptionShowTask[toolsext.getLocale()]
} }
get TodosCount() { get TodosCount() {
@@ -78,7 +82,7 @@ export default class CTodo extends Vue {
public todos_completati: (state: ITodosState, category: string) => ITodo[] public todos_completati: (state: ITodosState, category: string) => ITodo[]
public showTask(field_value) { public showTask(field_value) {
return field_value === tools.MenuAction.SHOW_TASK return field_value === lists.MenuAction.SHOW_TASK
} }
public async onEndtodo(itemdragend) { public async onEndtodo(itemdragend) {
@@ -174,22 +178,22 @@ export default class CTodo extends Vue {
public async updateitemtodo({ myitem, field }) { public async updateitemtodo({ myitem, field }) {
console.log('calling MODIFY updateitemtodo', myitem, field) console.log('calling MODIFY updateitemtodo', myitem, field)
const itemdragend: IDrag = { // const itemdragend: IDrag = {
category: this.categoryAtt, // category: this.categoryAtt,
field, // field,
idelemtochange: myitem._id, // idelemtochange: myitem._id,
prioritychosen: myitem.priority, // prioritychosen: myitem.priority,
atfirst: false // atfirst: false
} // }
//
await Todos.actions.swapElems(itemdragend) // await Todos.actions.swapElems(itemdragend)
await Todos.actions.modify({ myitem, field }) await Todos.actions.modify({ myitem, field })
} }
public deselectAllRowsproj(item: IProject, check, onlythis: boolean = false) { public deselectAllRowsproj(item: IProject, check, onlythis: boolean = false, deselectRiga: boolean = false) {
this.$emit('deselectAllRowsproj', item, check, onlythis) this.$emit('deselectAllRowsproj', item, check, onlythis, deselectRiga)
} }
public setitemsel(item: ITodo) { public setitemsel(item: ITodo) {
@@ -197,7 +201,7 @@ export default class CTodo extends Vue {
} }
public deselectAllRowstodo(item: ITodo, check, onlythis: boolean = false) { 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++) { for (let i = 0; i < this.$refs.single.length; i++) {
@@ -216,6 +220,7 @@ export default class CTodo extends Vue {
} }
} }
if (des) { if (des) {
// console.log('contr', contr)
// @ts-ignore // @ts-ignore
contr.deselectAndExitEdit() contr.deselectAndExitEdit()
} }

View File

@@ -7,25 +7,10 @@ $heightBtn: 100%;
$heightcounter: 26px; $heightcounter: 26px;
$heightdescr: 20px; $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-container2 {
flex-flow: row wrap; flex-flow: row wrap;
justify-content: space-between; 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 // Set visibility: visible to the icon menu of pos-item-popover
@@ -264,7 +249,6 @@ $heightdescr: 20px;
//padding: 2px; //padding: 2px;
min-width: 100px; min-width: 100px;
text-align: left; text-align: left;
color: blue !important;
overflow: hidden; overflow: hidden;
align-items: center; align-items: center;
@@ -272,8 +256,6 @@ $heightdescr: 20px;
vertical-align: middle; vertical-align: middle;
line-height: 120%; line-height: 120%;
//background-color: #d50000;
//order: 2; //order: 2;
&.hide { &.hide {

View File

@@ -1,8 +1,10 @@
import Vue from 'vue' import Vue from 'vue'
import { Component, Prop, Watch } from 'vue-property-decorator' import { Component, Prop, Watch } from 'vue-property-decorator'
import { UserStore } from '@modules' import { Projects, UserStore } from '@modules'
import { tools } from '../../../store/Modules/tools' import { tools } from '../../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { lists } from '../../../store/Modules/lists'
import { ITodo } from '../../../model/index' import { ITodo } from '../../../model/index'
@@ -17,7 +19,6 @@ import { CDate } from '../../CDate'
name: 'SingleTodo' name: 'SingleTodo'
}) })
export default class SingleTodo extends Vue { export default class SingleTodo extends Vue {
public selectPriority: [] = []
public menuPopupTodo: any[] = [] public menuPopupTodo: any[] = []
public iconCompleted: string = '' public iconCompleted: string = ''
public classCompleted: string = '' public classCompleted: string = ''
@@ -41,6 +42,7 @@ export default class SingleTodo extends Vue {
public itemtodoPrec: ITodo public itemtodoPrec: ITodo
public clButtPopover: string = 'pos-item-popover' public clButtPopover: string = 'pos-item-popover'
public numpos: number = 0 public numpos: number = 0
public attivaEdit: boolean = false
public $q: any public $q: any
@@ -90,6 +92,12 @@ export default class SingleTodo extends Vue {
@Watch('itemtodo.assigned_to_userId') public valueChangedend_assigned_to_userId() { @Watch('itemtodo.assigned_to_userId') public valueChangedend_assigned_to_userId() {
this.watchupdate('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() { @Watch('itemtodo.phase') public valueChangedend_phase() {
this.watchupdate('phase') this.watchupdate('phase')
} }
@@ -138,6 +146,9 @@ export default class SingleTodo extends Vue {
this.classDescrEdit += ' titleLista-item' 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) if (this.itemtodo.progress > 100)
this.itemtodo.progress = 100 this.itemtodo.progress = 100
@@ -183,11 +194,11 @@ export default class SingleTodo extends Vue {
} }
if (this.isTodo()) { if (this.isTodo()) {
this.menuPopupTodo = tools.menuPopupTodo[UserStore.state.lang] this.menuPopupTodo = tools.menuPopupTodo[toolsext.getLocale()]
} }
else { else {
this.menuPopupTodo = [] 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.updateicon()
this.updateClasses() this.updateClasses()
this.selectPriority = tools.selectPriority[UserStore.state.lang]
} }
public getClassRow() { public getClassRow() {
@@ -209,16 +217,15 @@ export default class SingleTodo extends Vue {
public clickRiga(clickmenu: boolean = false) { public clickRiga(clickmenu: boolean = false) {
// console.log('CLICK RIGA ************') // console.log('CLICK RIGA ************')
if (!this.sel) { if (!this.inEdit) {
if (!this.inEdit) { this.$emit('deselectAllRowsproj', null, false, false)
this.$emit('deselectAllRowsproj', null, false, false) this.$emit('deselectAllRowstodo', this.itemtodo, true)
this.$emit('deselectAllRowstodo', this.itemtodo, true)
if (!this.sel) { if (!this.sel) {
this.selectRiga() this.selectRiga()
} else { } else {
this.deselectRiga() this.$emit('deselectAllRowsproj', null, false, false, true)
} this.deselectRiga()
} }
} }
} }
@@ -232,10 +239,11 @@ export default class SingleTodo extends Vue {
} }
public deselectRiga() { public deselectRiga() {
// console.log('DeselectRiga', this.itemtodo.descr) console.log('DeselectRiga', this.itemtodo.descr)
this.sel = false this.sel = false
this.classRow = '' this.classRow = ''
this.inEdit = false this.inEdit = false
this.attivaEdit = false
this.updateClasses() this.updateClasses()
} }
@@ -261,7 +269,8 @@ export default class SingleTodo extends Vue {
} }
public editTodo() { public editTodo() {
if (this.itemtodo.statustodo !== tools.Status.COMPLETED) {
if (this.attivaEdit) {
// console.log('INIZIO - editTodo') // console.log('INIZIO - editTodo')
this.$emit('click') this.$emit('click')
this.precDescr = this.itemtodo.descr this.precDescr = this.itemtodo.descr
@@ -293,7 +302,7 @@ export default class SingleTodo extends Vue {
theField.focus() theField.focus()
} }
// console.log('focus()') // console.log('focus()')
}, 300) }, 400)
} }
public exitEdit(singola: boolean = false) { public exitEdit(singola: boolean = false) {
@@ -303,6 +312,7 @@ export default class SingleTodo extends Vue {
} }
// console.log('exitEdit') // console.log('exitEdit')
this.inEdit = false this.inEdit = false
this.attivaEdit = false
this.updateClasses() this.updateClasses()
this.$emit('deselectAllRowsproj', null, false, false) this.$emit('deselectAllRowsproj', null, false, false)
this.$emit('deselectAllRowstodo', this.itemtodo, false, singola) 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) { if (((e.keyCode === 8) || (e.keyCode === 46)) && (this.precDescr === '') && !e.shiftKey) {
e.preventDefault() e.preventDefault()
this.deselectRiga() this.deselectRiga()
this.clickMenu(tools.MenuAction.DELETE) this.clickMenu(lists.MenuAction.DELETE)
.then(() => { .then(() => {
this.faiFocus('insertTask', true) this.faiFocus('insertTask', true)
return return
@@ -343,7 +353,7 @@ export default class SingleTodo extends Vue {
if (((e.keyCode === 8) || (e.keyCode === 46)) && (this.precDescr === '') && !e.shiftKey) { if (((e.keyCode === 8) || (e.keyCode === 46)) && (this.precDescr === '') && !e.shiftKey) {
e.preventDefault() e.preventDefault()
this.deselectRiga() this.deselectRiga()
this.clickMenu(tools.MenuAction.DELETE) this.clickMenu(lists.MenuAction.DELETE)
.then(() => { .then(() => {
this.faiFocus('insertTask', true) this.faiFocus('insertTask', true)
return return
@@ -384,6 +394,7 @@ export default class SingleTodo extends Vue {
this.watchupdate('descr') this.watchupdate('descr')
this.inEdit = false this.inEdit = false
this.attivaEdit = false
// this.precDescr = this.itemtodo.descr // this.precDescr = this.itemtodo.descr
this.updateClasses() 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) { public async clickMenu(action) {
console.log('click menu: ', action) console.log('click menu: ', action)
if (action === tools.MenuAction.DELETE) { if (action === lists.MenuAction.DELETE) {
return await this.askConfirmDelete() return await this.askConfirmDelete()
} else if (action === tools.MenuAction.TOGGLE_EXPIRING) { } else if (action === lists.MenuAction.TOGGLE_EXPIRING) {
return await this.enableExpiring() return await this.enableExpiring()
} else if (action === tools.MenuAction.COMPLETED) { } else if (action === lists.MenuAction.COMPLETED) {
return await this.setCompleted() 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') 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) { } else if (action === 0) {
this.deselectAndExitEdit() 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) { public setPriority(newpriority) {
if (this.itemtodo.priority !== newpriority) { if (this.itemtodo.priority !== newpriority) {

View File

@@ -11,7 +11,7 @@
</div> </div>
<div class="flex-item donotdrag divdescrTot"> <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" v-model.trim="precDescr"
autogrow autogrow
borderless borderless
@@ -65,14 +65,14 @@
data_class="data_string" :readonly="!CanIModifyTodo"> data_class="data_string" :readonly="!CanIModifyTodo">
</CDate> </CDate>
</div> </div>
<div v-if="isTodo()" :class="classMenuBtn" @mousedown="clickRiga"> <div :class="classMenuBtn" @mousedown="clickRiga">
<q-btn flat <q-btn flat
:class="clButtPopover" :class="clButtPopover"
:readonly="!CanIModifyTodo" :readonly="!CanIModifyTodo"
icon="menu"> icon="menu">
<q-menu v-if="CanIModifyTodo" ref="popmenu" self="top right"> <q-menu v-if="CanIModifyTodo" ref="popmenu" self="top right">
<SubMenus :menuPopupTodo="menuPopupTodo" :itemtodo="itemtodo" @clickMenu="clickMenu" <SubMenus :menuPopupTodo="menuPopupTodo" :itemtodo="itemtodo" @clickMenu="clickMenu"
@setPriority="setPriority"></SubMenus> @selectSubMenu="selectSubMenu"></SubMenus>
</q-menu> </q-menu>
</q-btn> </q-btn>

View File

@@ -2,6 +2,8 @@ import Vue from 'vue'
import { Component, Prop, Watch } from 'vue-property-decorator' import { Component, Prop, Watch } from 'vue-property-decorator'
import { tools } from '@src/store/Modules/tools' 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 { UserStore } from '@store'
import { ITodo } from '../../../model/index' import { ITodo } from '../../../model/index'
@@ -16,18 +18,21 @@ import { ITodo } from '../../../model/index'
}) })
export default class SubMenus extends Vue { export default class SubMenus extends Vue {
public selectPriority: [] = tools.selectPriority[UserStore.state.lang]
@Prop({ required: false }) public menuPopupTodo: any[] @Prop({ required: false }) public menuPopupTodo: any[]
@Prop({ required: false }) public itemtodo: ITodo @Prop({ required: false }) public itemtodo: ITodo
public $q: any public $q: any
get lists() {
return lists
}
public clickMenu(field) { public clickMenu(field) {
this.$emit('clickMenu', field) this.$emit('clickMenu', field)
} }
public setPriority(field) { public selectSubMenu(action, field) {
this.$emit('setPriority', field) this.$emit('selectSubMenu', action, field)
} }
public KeychangeProgress(e) { 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')
}
} }

View File

@@ -1,7 +1,9 @@
<template> <template>
<q-list separator no-border class="todo-menu"> <q-list separator no-border class="todo-menu">
<div v-for="field in menuPopupTodo" :key="field.value"> <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)"> @click="clickMenu(field.value)">
<q-item-section avatar> <q-item-section avatar>
<q-icon :name="field.icon"/> <q-icon :name="field.icon"/>
@@ -11,14 +13,14 @@
<q-item-label>{{field.label}}</q-item-label> <q-item-label>{{field.label}}</q-item-label>
</q-item-section> </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-checkbox v-model="itemtodo.enableExpiring"/>
</q-item-section> </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-checkbox v-model="itemtodo.statustodo"/>
</q-item-section> </q-item-section>
</q-item> </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)"> @click="clickMenu(field.value)">
<q-item-section avatar> <q-item-section avatar>
<q-icon :name="field.icon"/> <q-icon :name="field.icon"/>
@@ -40,9 +42,10 @@
</div> </div>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-if="(field.value === 130)"> <q-item clickable
v-if="(field.arrlista !== undefined)">
<q-item-section avatar> <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>
<q-item-section>{{field.label}}</q-item-section> <q-item-section>{{field.label}}</q-item-section>
@@ -57,14 +60,16 @@
<q-item-section> <q-item-section>
<q-list dense> <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" :key="fieldprior.value"
@click="setPriority(fieldprior.value)"> @click="selectSubMenu(field.value, fieldprior.value)">
<q-item-section avatar> <q-item-section avatar v-if="!!fieldprior.icon">
<q-icon :name="fieldprior.icon" inverted color="primary"/> <q-icon :name="fieldprior.icon" inverted color="primary"/>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<span :class="`text-`+fieldprior.value">
{{fieldprior.label}} {{fieldprior.label}}
</span>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-list> </q-list>

View File

@@ -6,12 +6,14 @@ import { idbKeyval as storage } from '../js/storage.js'
import { costanti } from '../store/Modules/costanti' import { costanti } from '../store/Modules/costanti'
import { ICfgData, IGlobalState } from '@src/model' import { ICfgData, IGlobalState } from '@src/model'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
function saveConfigIndexDb(context) { function saveConfigIndexDb(context) {
const data: ICfgData = { const data: ICfgData = {
_id: costanti.CONFIG_ID_CFG, _id: costanti.CONFIG_ID_CFG,
lang: UserStore.state.lang, lang: toolsext.getLocale(),
token: UserStore.state.x_auth_token, token: UserStore.state.x_auth_token,
userId: UserStore.state.userId userId: UserStore.state.userId
} }

View File

@@ -1,9 +1,9 @@
import { UserStore } from '@modules' import { toolsext } from '@src/store/Modules/toolsext'
import messages from '../statics/i18n' import messages from '../statics/i18n'
function translate(params) { function translate(params) {
const msg = params.split('.') const msg = params.split('.')
const lang = UserStore.state.lang const lang = toolsext.getLocale()
const stringa = messages[lang] const stringa = messages[lang]

View File

@@ -5,7 +5,7 @@ import { GlobalStore } from '@modules'
import Vue from 'vue' import Vue from 'vue'
import { Component, Prop } from 'vue-property-decorator' import { Component, Prop } from 'vue-property-decorator'
const namespace: string = 'GlobalModule' const namespace: string = 'Drawer'
@Component({ @Component({
components: { components: {

View File

@@ -66,6 +66,10 @@
font-size: 1.5rem; font-size: 1.5rem;
} }
.clexpansion{
min-width: 0px !important;
}
.my-menu-active { .my-menu-active {
background-color: rgba(174, 189, 241, 0.71); background-color: rgba(174, 189, 241, 0.71);
} }
@@ -74,3 +78,7 @@
min-width: 26px; min-width: 26px;
font-size: 1rem; font-size: 1rem;
} }
.my-menu-icon-none > i{
display: none;
}

View File

@@ -1,6 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
import { Watch } from 'vue-property-decorator' import { Watch } from 'vue-property-decorator'
import { GlobalStore } from '../../store/Modules' import { GlobalStore } from '../../store/Modules'
import Component from 'vue-class-component'
export default class MenuOne extends Vue { export default class MenuOne extends Vue {

View File

@@ -3,25 +3,40 @@
<q-list class="rounded-borders text-primary"> <q-list class="rounded-borders text-primary">
<template v-for="(parent, index) in getmenu"> <template v-for="(parent, index) in getmenu">
<!--<div class="q-list-header">{{replaceUnderlineToSpace(index)}}</div>--> <!--<div class="q-list-header">{{replaceUnderlineToSpace(index)}}</div>-->
<div v-for="item in parent.routes"> <div v-for="myitemmenu in parent.routes">
<div v-if="item.routes2"> <div v-if="!!myitemmenu.routes2">
<q-expansion-item <q-expansion-item
:header-inset-level="item.level_parent" :header-inset-level="myitemmenu.level_parent"
:content-inset-level="item.level_parent" :content-inset-level="myitemmenu.level_parent"
:label="getLabelByItem(item)" :label="getLabelByItem(myitemmenu)"
:icon="item.materialIcon" :icon="myitemmenu.materialIcon"
expand-icon-class="my-menu-separat" expand-icon-class="my-menu-separat"
header-class="my-menu" header-class="my-menu"
active-class="my-menu-active" active-class="my-menu-active">
>
<q-expansion-item v-for="(child2, index) in item.routes2" :to="child2.route" :key="index" <q-expansion-item v-for="(child2, index) in myitemmenu.routes2"
:header-inset-level="item.level_child" :key="index"
:to="child2.route"
:header-inset-level="child2.level_child"
:duration="300" :duration="300"
expand-icon="map" :icon="child2.materialIcon"
active-class="my-menu-active" active-class="my-menu-active"
expand-icon-class="my-menu-icon-none"
class="item item-link drawer-closer cursor-pointer my-menu" class="item item-link drawer-closer cursor-pointer my-menu"
:label="getLabelByItem(child2)"> :label="getLabelByItem(child2)">
<q-expansion-item v-if="!!child2.routes2" v-for="(child3, index) in child2.routes2"
:key="index"
:to="child3.route"
:header-inset-level="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>
</q-expansion-item> </q-expansion-item>
@@ -29,28 +44,37 @@
<div v-else> <div v-else>
<q-slide-transition :duration=200> <q-slide-transition :duration=200>
<div v-show="true"> <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 <q-item
clickable clickable
v-ripple v-ripple
exact exact
:to="item.route" :to="myitemmenu.route"
active-class="my-menu-active" active-class="my-menu-active">
>
<q-item-section avatar class="my-menu-icon"> <q-item-section avatar class="my-menu-icon">
<q-icon :name="item.materialIcon"/> <q-icon :name="myitemmenu.materialIcon"/>
</q-item-section> </q-item-section>
<q-item-section class="my-menu"> <q-item-section class="my-menu">
{{$t(item.name)}} {{$t(myitemmenu.name)}}
</q-item-section> </q-item-section>
</q-item> </q-item>
-->
</div> </div>
</q-slide-transition> </q-slide-transition>
</div> </div>
<!--<q-separator spaced />-->
</div> </div>
</template> </template>
</q-list> </q-list>

View File

@@ -6,6 +6,7 @@ import { IPost } from '../../../model/index'
import './messagePopover.scss' import './messagePopover.scss'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
@Component({ @Component({
}) })

View File

@@ -1,11 +1,9 @@
import { tools } from '../store/Modules/tools' import { tools } from '../store/Modules/tools'
import { RouteNames } from '../router/route-names'
export default function auth({ next, router }) { export default function auth({ next, router }) {
const tok = tools.getItemLS(tools.localStorage.token) const tok = tools.getItemLS(tools.localStorage.token)
if (!tok) { if (!tok) {
return router.push({ name: RouteNames.login }) return router.push({ name: 'login' })
} }
return next() return next()

View File

@@ -1,6 +1,4 @@
import { costanti } from "@src/store/Modules/costanti" import { IAction } from '@src/model/Projects'
import { UserStore } from "@store"
import { tools } from '@src/store/Modules/tools'
export interface IPost { export interface IPost {
title: string title: string
@@ -58,22 +56,28 @@ export interface IGlobalState {
menulinks: {} menulinks: {}
listatodo: IMenuList[] listatodo: IMenuList[]
arrConfig: IConfig[] arrConfig: IConfig[]
lastaction: IAction
} }
export interface IMenuList { export interface IMenuList {
nametranslate: string nametranslate: string
description: string description?: string
idelem?: string idelem?: string
icon?: string icon?: string
name?: string
level_parent?: number
level_child?: number
urlroute?: string
routes2?: IMenuList[]
} }
export interface IListRoutes { export interface IListRoutes {
route: string route: string
faIcon: string faIcon?: string
materialIcon: string materialIcon?: string
name: string name: string
text?: string text?: string
routes2: [] routes2?: IListRoutes[]
level_parent: number level_parent?: number
level_child: number level_child?: number
} }

View File

@@ -1,6 +1,14 @@
import objectId from '@src/js/objectId' import objectId from '@src/js/objectId'
import { UserStore } from '@store' import { UserStore } from '@store'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
export interface IAction {
table: string
type: number
_id: any
cat?: string
}
export interface IProject { export interface IProject {
_id?: any, _id?: any,
@@ -20,11 +28,13 @@ export interface IProject {
enableExpiring?: boolean enableExpiring?: boolean
id_prev?: string id_prev?: string
modified?: boolean modified?: boolean
favourite?: number
pos?: number pos?: number
order?: number order?: number
live_url?: string live_url?: string
test_url?: string test_url?: string
hoursplanned?: number hoursplanned?: number
hoursleft?: number
hoursworked?: number hoursworked?: number
progressCalc?: number progressCalc?: number
begin_development?: Date begin_development?: Date
@@ -35,6 +45,8 @@ export interface IProject {
actualphase?: number actualphase?: number
privacyread?: string privacyread?: string
privacywrite?: string privacywrite?: string
themecolor?: string
themebgcolor?: string
} }
export interface IProjectsState { export interface IProjectsState {

View File

@@ -1,3 +1,5 @@
import { IAction } from '@src/model/Projects'
export interface ITodo { export interface ITodo {
_id?: any, _id?: any,
userId?: string userId?: string
@@ -21,6 +23,8 @@ export interface ITodo {
hoursplanned?: number hoursplanned?: number
hoursworked?: number hoursworked?: number
start_date?: Date start_date?: Date
themecolor?: string
themebgcolor?: string
} }
export interface IParamTodo { export interface IParamTodo {
@@ -40,7 +44,7 @@ export interface IDrag {
category?: string category?: string
id_proj?: string id_proj?: string
atfirst?: boolean atfirst?: boolean
mieiproj?: boolean tipoproj?: string
} }
export interface ITodosState { export interface ITodosState {

View File

@@ -8,3 +8,5 @@ export * from './key-value'
export * from './Categories' export * from './Categories'
export * from './Todos' export * from './Todos'
export * from './Projects' export * from './Projects'
export * from './Calendar'

View File

@@ -69,6 +69,10 @@ export default class Home extends Vue {
GlobalStore.actions.prova() GlobalStore.actions.prova()
} }
get tools() {
return tools
}
get isLogged() { get isLogged() {
return UserStore.state.isLogged return UserStore.state.isLogged
} }
@@ -116,7 +120,7 @@ export default class Home extends Vue {
} }
public initprompt() { public initprompt() {
window.addEventListener('beforeinstallprompt', function(event) { window.addEventListener('beforeinstallprompt', (event) => {
// console.log('******************************** beforeinstallprompt fired') // console.log('******************************** beforeinstallprompt fired')
event.preventDefault() event.preventDefault()
// console.log('§§§§§§§§§§§§§§§§§§§§ IMPOSTA DEFERRED PROMPT !!!!!!!!!!!!!!!!! ') // console.log('§§§§§§§§§§§§§§§§§§§§ IMPOSTA DEFERRED PROMPT !!!!!!!!!!!!!!!!! ')
@@ -146,128 +150,31 @@ export default class Home extends Vue {
this.$router.replace('/signup') this.$router.replace('/signup')
} }
public displayConfirmNotification() { // public test_fetch() {
let options = null // fetch('https:/httpbin.org/post', {
if ('serviceWorker' in navigator) { // method: 'POST',
options = { // headers: {
body: 'You successfully subscribed to our Notification service!', // 'Content-Type': 'application/json',
icon: '/statics/icons/app-icon-96x96.png', // 'Accept': 'application/json'
image: '/statics/images/sf-boat.jpg', // },
dir: 'ltr', // // mode: 'no-cors',
lang: 'enUs', // BCP 47, // mode: 'cors',
vibrate: [100, 50, 200], // body: JSON.stringify({ message: 'Does this work?' })
badge: '/statics/icons/app-icon-96x96.png', // }).then(function(response) {
tag: 'confirm-notification', // console.log(response)
renotify: true, // if it's already sent, will Vibrate anyway // if (response) {
actions: [ // return response.json()
{ action: 'confirm', title: 'Okay', icon: '/statics/icons/app-icon-96x96.png' }, // }
{ action: 'cancel', title: 'Cancel', icon: '/statics/icons/app-icon-96x96.png' } // else {
] // return null
} // }
// }).then(function(data) {
if ('serviceWorker' in navigator) { // console.log(data)
navigator.serviceWorker.ready // }).catch(function(err) {
.then(function(swreg) { // console.log(err)
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 openCreatePostModal() { public openCreatePostModal() {
console.log('APERTO ! openCreatePostModal') console.log('APERTO ! openCreatePostModal')

View File

@@ -23,7 +23,7 @@
</div> </div>
<div class="flex justify-end"> <div class="flex justify-end">
<div class="q-gutter-xs testo-banda clgutter"> <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"> <div class="text-subtitle1 shadow text-italic q-pl-sm">
{{$t('msg.sottoTitoloApp')}} {{$t('msg.sottoTitoloApp')}}
</div> </div>
@@ -83,7 +83,7 @@
class="enable-notifications shadow" class="enable-notifications shadow"
color="primary" rounded color="primary" rounded
size="md" size="md"
icon="notifications" @click="askfornotification" icon="notifications" @click="tools.askfornotification"
:label="$t('notification.ask')"/> :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="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 !"/>--> <!--<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>
<div class="flex justify-end"> <div class="flex justify-end">
<div class="q-gutter-xs testo-banda clgutter"> <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"> <div class="text-subtitle1 shadow text-italic q-pl-sm">
{{$t('msg.sottoTitoloApp')}} {{$t('msg.sottoTitoloApp')}}
</div> </div>
@@ -170,7 +170,7 @@
class="enable-notifications shadow" class="enable-notifications shadow"
color="primary" rounded color="primary" rounded
size="md" size="md"
icon="notifications" @click="askfornotification" icon="notifications" @click="tools.askfornotification"
:label="$t('notification.ask')"/> :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="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 !"/>--> <!--<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>
<div class="flex justify-end"> <div class="flex justify-end">
<div class="q-gutter-xs testo-banda clgutter"> <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"> <div class="text-subtitle1 shadow text-italic q-pl-sm">
{{$t('msg.sottoTitoloApp')}} {{$t('msg.sottoTitoloApp')}}
</div> </div>
@@ -261,7 +261,7 @@
class="enable-notifications shadow" class="enable-notifications shadow"
color="primary" rounded color="primary" rounded
size="md" size="md"
icon="notifications" @click="askfornotification" icon="notifications" @click="tools.askfornotification"
:label="$t('notification.ask')"/> :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="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 !"/>--> <!--<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>
</div> </div>
</section> </section>
<section class="padding bg-primary landing__swirl-bg" v-scroll-reveal.reset> <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="landing__features row justify-between items-start q-col-gutter-sm">
<div class="col-12 col-sm-5"> <div class="col-12 col-sm-5">

View File

@@ -2,11 +2,10 @@ import Vue from 'vue'
import VueRouter, { RouterMode } from 'vue-router' import VueRouter, { RouterMode } from 'vue-router'
import { PositionResult } from 'vue-router/types/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 { ProgressBar } from '@src/store/Modules/Interface'
import { isEqual } from 'lodash' import { isEqual } from 'lodash'
import { UserStore } from '@store' import { UserStore } from '@store'
import { RouteNames } from '@src/router/route-names'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
Vue.use(VueRouter) Vue.use(VueRouter)
@@ -17,7 +16,7 @@ Vue.use(VueRouter)
const Router = new VueRouter({ const Router = new VueRouter({
scrollBehavior: () => ({ x: 0, y: 0 } as PositionResult), scrollBehavior: () => ({ x: 0, y: 0 } as PositionResult),
routes: routesList, routes: cfgrouter.routes,
// Leave these as is and change from quasar.conf.js instead! // Leave these as is and change from quasar.conf.js instead!
// quasar.conf.js -> build -> vueRouterMode // quasar.conf.js -> build -> vueRouterMode
@@ -124,7 +123,7 @@ Router.beforeEach(async (to: IMyRoute, from: IMyRoute, next) => {
// 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) { } else if (to.matched.some((m) => m.meta.noAuth) && UserStore.state.isLogged) {
next('/') next('/')

View File

@@ -1,10 +1,11 @@
import { RouteConfig, Route, RouteRecord } from 'vue-router/types' import { RouteConfig, Route, RouteRecord } from 'vue-router/types'
import { RouteNames } from './route-names'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import auth from '../middleware/auth' 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 { interface IMyMeta {
title?: string, title?: string,
@@ -34,116 +35,296 @@ export interface IMyRouteConfig extends RouteConfig {
meta?: IMyMeta meta?: IMyMeta
} }
export const routesList: IMyRouteConfig[] = [ export const cfgrouter = {
{ routes: [
path: '/', {
name: RouteNames.home, path: '/',
component: () => import('@/root/home/home.vue') name: RouteNames.home,
}, component: () => import('@/root/home/home.vue')
{ },
path: '/signup', {
name: 'Registration', path: '/signup',
component: () => import('@/views/login/signup/signup.vue') name: 'Registration',
}, component: () => import('@/views/login/signup/signup.vue')
{ },
path: '/signin', {
name: RouteNames.login, path: '/signin',
component: () => import('@/views/login/signin/signin.vue') name: RouteNames.login,
}, component: () => import('@/views/login/signin/signin.vue')
{ },
path: '/vreg', {
name: 'Verify Reg', path: '/vreg',
component: () => import('@/views/login/vreg/vreg.vue') name: 'Verify Reg',
}, component: () => import('@/views/login/vreg/vreg.vue')
{ },
path: '/todo/:category', {
name: 'Todos', path: '/todo/:category',
component: () => import('@/views/todo-list/todo-list.vue'), name: 'Todos',
meta: { component: () => import('@/views/todo-list/todo-list.vue'),
requiresAuth: true, meta: {
async asyncData() { requiresAuth: true,
await Todos.actions.dbLoad({ checkPending: false }) async asyncData() {
await Todos.actions.dbLoad({ checkPending: false })
}
// middleware: [auth]
} }
// middleware: [auth] },
} {
}, path: '/category',
{ name: 'category',
path: '/category', component: () => import('@/views/categories/category/category.vue')
name: 'category', },
component: () => import('@/views/categories/category/category.vue') {
}, path: '/admin/cfgserv',
{ name: 'cfgserv',
path: '/admin/cfgserv', component: () => import('@/views/admin/cfgServer/cfgServer.vue'),
name: 'cfgserv', meta: {
component: () => import('@/views/admin/cfgServer/cfgServer.vue'), requiresAuth: true
meta: { // middleware: [auth]
requiresAuth: true
// middleware: [auth]
}
},
{
path: '/admin/testp1/:category',
name: 'Categories',
component: () => import('@/views/admin/testp1/testp1.vue')
},
{
path: '/offline',
name: 'Offline',
component: () => import('@/views/offline/offline.vue')
},
// {
// path: '/malaga',
// name: 'malaga',
// component: () => import('@/root/malaga/malaga.vue')
// },
{
path: '/projects/:idProj',
name: RouteNames.projects,
component: () => import('@/views/projects/proj-list/proj-list.vue'),
meta: {
requiresAuth: true,
async asyncData() {
await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true })
} }
// middleware: [auth] },
} {
}, path: '/admin/testp1/:category',
{ name: 'Categories',
path: '/myprojects/:idProj', component: () => import('@/views/admin/testp1/testp1.vue')
name: RouteNames.myprojects, },
component: () => import('@/views/projects/proj-list/proj-list.vue'), {
meta: { path: '/offline',
requiresAuth: true, name: 'Offline',
async asyncData() { component: () => import('@/views/offline/offline.vue')
await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true }) },
// {
// path: '/malaga',
// name: 'malaga',
// component: () => import('@/root/malaga/malaga.vue')
// },
{
path: '/' + RouteNames.projectsall + '/:idProj',
name: RouteNames.projectsall,
component: () => import('@/views/projects/proj-list/proj-list.vue'),
meta: {
requiresAuth: false,
async asyncData() {
// await Todos.actions.dbLoad({ checkPending: false })
await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true })
}
// middleware: [auth]
}
},
{
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]
} }
// middleware: [auth]
} }
/*
{
path: '/requestresetpwd',
component: () => import('@/views/login/requestresetpwd.vue'),
meta: { nametranslate: 'Reset your Password' }
},
{
path: '/updatepwd',
component: () => import('@/views/login/updatepassword.vue'),
meta: { nametranslate: 'Update your Password' }
}
{
path: '/simpleform',
component: () => import('@/views/form/simpleForm/simpleForm.vue'),
meta: { nametranslate: 'SimpleForm' }
},
{
path: '/embeeded',
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
} }
}
/*
{
path: '/requestresetpwd',
component: () => import('@/views/login/requestresetpwd.vue'),
meta: { nametranslate: 'Reset your Password' }
},
{
path: '/updatepwd',
component: () => import('@/views/login/updatepassword.vue'),
meta: { nametranslate: 'Update your Password' }
}
{
path: '/simpleform',
component: () => import('@/views/form/simpleForm/simpleForm.vue'),
meta: { nametranslate: 'SimpleForm' }
},
{
path: '/embeeded',
component: () => import('@/views/form/embeeded/embeeded.vue'),
meta: { nametranslate: 'Embeeded' }
}*/
]

View File

@@ -2,5 +2,9 @@ export const RouteNames = {
home: 'home', home: 'home',
login: 'login', login: 'login',
projects: 'projects', projects: 'projects',
myprojects: 'myprojects' projectsall: 'projall',
projectsshared: 'projectsShared',
myprojects: 'myprojects',
favouriteprojects: 'favproj',
listprojects: 'listproj'
} }

View File

@@ -1,4 +1,6 @@
const messages = { import msg_website from './i18n_website'
const msgglobal = {
it: { it: {
dialog: { dialog: {
ok: 'Ok', ok: 'Ok',
@@ -6,6 +8,7 @@ const messages = {
no: 'No', no: 'No',
delete: 'Elimina', delete: 'Elimina',
cancel: 'Annulla', cancel: 'Annulla',
today: 'Oggi',
msg: { msg: {
titledeleteTask: 'Elimina Task', titledeleteTask: 'Elimina Task',
deleteTask: "Vuoi Eliminare {mytodo}?" deleteTask: "Vuoi Eliminare {mytodo}?"
@@ -14,122 +17,6 @@ const messages = {
comp: { comp: {
Conta: "Conta", 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: { components: {
authentication: { authentication: {
login: { login: {
@@ -244,6 +131,7 @@ const messages = {
proj: { proj: {
newproj: 'Titolo Progetto', newproj: 'Titolo Progetto',
newsubproj: 'Titolo Sotto-Progetto', newsubproj: 'Titolo Sotto-Progetto',
insertbottom: 'Inserisci Nuovo Project',
longdescr: 'Descrizione', longdescr: 'Descrizione',
hoursplanned: 'Ore Preventivate', hoursplanned: 'Ore Preventivate',
hoursadded: 'Ore Aggiuntive', hoursadded: 'Ore Aggiuntive',
@@ -256,8 +144,36 @@ const messages = {
endwork_estimate: 'Data fine lavori stimata', endwork_estimate: 'Data fine lavori stimata',
privacyread: 'Chi lo puo vedere:', privacyread: 'Chi lo puo vedere:',
privacywrite: 'Chi lo puo modificare:', 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': { 'es': {
dialog: { dialog: {
@@ -266,6 +182,7 @@ const messages = {
no: 'No', no: 'No',
delete: 'Borrar', delete: 'Borrar',
cancel: 'Cancelar', cancel: 'Cancelar',
today: 'Hoy',
msg: { msg: {
titledeleteTask: 'Borrar Tarea', titledeleteTask: 'Borrar Tarea',
deleteTask: 'Quieres borrar {mytodo}?' deleteTask: 'Quieres borrar {mytodo}?'
@@ -274,123 +191,6 @@ const messages = {
comp: { comp: {
Conta: "Conta", 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: { components: {
authentication: { authentication: {
login: { login: {
@@ -498,8 +298,10 @@ const messages = {
proj: { proj: {
newproj: 'Título Projecto', newproj: 'Título Projecto',
newsubproj: 'Título Sub-Projecto', newsubproj: 'Título Sub-Projecto',
insertbottom: 'Añadir nuevo Proyecto',
longdescr: 'Descripción', longdescr: 'Descripción',
hoursplanned: 'Horas Estimadas', hoursplanned: 'Horas Estimadas',
hoursleft: 'Horas Restantes',
hoursadded: 'Horas Adicional', hoursadded: 'Horas Adicional',
hoursworked: 'Horas Trabajadas', hoursworked: 'Horas Trabajadas',
begin_development: 'Comienzo desarrollo', begin_development: 'Comienzo desarrollo',
@@ -510,8 +312,36 @@ const messages = {
endwork_estimate: 'Fecha estimada de finalización', endwork_estimate: 'Fecha estimada de finalización',
privacyread: 'Quien puede verlo:', privacyread: 'Quien puede verlo:',
privacywrite: 'Quien puede modificarlo:', 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': { 'enUs': {
dialog: { dialog: {
@@ -520,6 +350,7 @@ const messages = {
no: 'No', no: 'No',
delete: 'Delete', delete: 'Delete',
cancel: 'Cancel', cancel: 'Cancel',
today: 'Today',
msg: { msg: {
titledeleteTask: 'Delete Task', titledeleteTask: 'Delete Task',
deleteTask: 'Delete Task {mytodo}?' deleteTask: 'Delete Task {mytodo}?'
@@ -528,123 +359,6 @@ const messages = {
comp: { comp: {
Conta: "Count", 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: { components: {
authentication: { authentication: {
login: { login: {
@@ -752,8 +466,10 @@ const messages = {
proj: { proj: {
newproj: 'Project Title', newproj: 'Project Title',
newsubproj: 'SubProject Title', newsubproj: 'SubProject Title',
insertbottom: 'Insert New Project',
longdescr: 'Description', longdescr: 'Description',
hoursplanned: 'Estimated Hours', hoursplanned: 'Estimated Hours',
hoursleft: 'Left Hours',
hoursadded: 'Additional Hours', hoursadded: 'Additional Hours',
hoursworked: 'Worked Hours', hoursworked: 'Worked Hours',
begin_development: 'Start Dev', begin_development: 'Start Dev',
@@ -764,9 +480,61 @@ const messages = {
endwork_estimate: 'Estimated completion date', endwork_estimate: 'Estimated completion date',
privacyread: 'Who can see it:', privacyread: 'Who can see it:',
privacywrite: 'Who can modify if:', 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; export default messages;

369
src/statics/i18n_website.js Normal file
View 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

View File

@@ -5,6 +5,7 @@ import { clone } from 'lodash'
import * as Types from './ApiTypes' import * as Types from './ApiTypes'
import { GlobalStore, UserStore } from '@store' import { GlobalStore, UserStore } from '@store'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { serv_constants } from '@src/store/Modules/serv_constants' import { serv_constants } from '@src/store/Modules/serv_constants'
export const API_URL = process.env.MONGODB_HOST export const API_URL = process.env.MONGODB_HOST

View File

@@ -8,6 +8,7 @@ export { addAuthHeaders, removeAuthHeaders, API_URL } from './Instance'
// import {AlgoliaSearch} from './AlgoliaController' // import {AlgoliaSearch} from './AlgoliaController'
import Paths from '@paths' import Paths from '@paths'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { GlobalStore, Projects, UserStore } from '@modules' import { GlobalStore, Projects, UserStore } from '@modules'
import globalroutines from './../../globalroutines/index' import globalroutines from './../../globalroutines/index'
@@ -173,7 +174,7 @@ export namespace ApiTool {
link += '/' + rec._id link += '/' + rec._id
} }
// console.log('----------------------- LEGGO QUALCOSA ', link) console.log('----------------------- LEGGO QUALCOSA ', link)
// Insert/Delete/Update table to the server // Insert/Delete/Update table to the server
return SendReq(link, method, rec) return SendReq(link, method, rec)

View File

@@ -4,6 +4,7 @@ import { GlobalStore, Todos, Projects, UserStore } from '@store'
import globalroutines from './../../globalroutines/index' import globalroutines from './../../globalroutines/index'
import { serv_constants } from '@src/store/Modules/serv_constants' import { serv_constants } from '@src/store/Modules/serv_constants'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
export const OtherTables = ['categories', 'config', 'swmsg'] export const OtherTables = ['categories', 'config', 'swmsg']
export const MainTables = ['todos', 'projects'] 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 cmdSw = DB.CMD_SYNC
} }
// console.log('cmdSw', cmdSw)
// if ('serviceWorker' in navigator) {
// console.log('serviceWorker PRESENTE')
// } else {
// console.log('serviceWorker NON PRESENTE !')
// }
if ('serviceWorker' in navigator) { if ('serviceWorker' in navigator) {
return await navigator.serviceWorker.ready return await navigator.serviceWorker.ready
.then((sw) => { .then((sw) => {
// console.log('---------------------- navigator.serviceWorker.ready') // console.log('---------------------- navigator.serviceWorker.ready')
return globalroutines(null, 'write', tablesync, item, id) return globalroutines(null, 'write', tablesync, item, id)
.then((id) => { .then((ris) => {
// console.log('id', id) console.log('ris write:', ris)
const sep = '|' const sep = '|'
const multiparams = cmdSw + sep + tablesync + sep + nametab + sep + method + sep + UserStore.state.x_auth_token + sep + UserStore.state.lang const multiparams = cmdSw + sep + tablesync + sep + nametab + sep + method + sep + UserStore.state.x_auth_token + sep + toolsext.getLocale()
const mymsgkey = { const mymsgkey = {
_id: multiparams, _id: multiparams,
value: 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) 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) tools.notifyarraychanged(miorec)
// 2) Modify on IndexedDb // 2) Modify on IndexedDb
console.log('// 2) Modify on IndexedDb', miorec)
return globalroutines(null, 'write', nametable, miorec) return globalroutines(null, 'write', nametable, miorec)
.then((ris) => { .then((ris) => {

View File

@@ -11,11 +11,15 @@ import Api from '@api'
import * as Types from '@src/store/Api/ApiTypes' import * as Types from '@src/store/Api/ApiTypes'
import { costanti } from '@src/store/Modules/costanti' import { costanti } from '@src/store/Modules/costanti'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import * as ApiTables from '@src/store/Modules/ApiTables' import * as ApiTables from '@src/store/Modules/ApiTables'
import { GlobalStore, Projects, Todos, UserStore } from '@store' import { GlobalStore, Projects, Todos, UserStore } from '@store'
import messages from '../../statics/i18n' import messages from '../../statics/i18n'
import globalroutines from './../../globalroutines/index' import globalroutines from './../../globalroutines/index'
import { cfgrouter } from '../../router/route-config'
let stateConnDefault = 'online' let stateConnDefault = 'online'
getstateConnSaved() getstateConnSaved()
@@ -50,7 +54,12 @@ const state: IGlobalState = {
downloading_server: 0, downloading_server: 0,
downloading_indexeddb: 0 downloading_indexeddb: 0
}, },
arrConfig: [] arrConfig: [],
lastaction: {
table: '',
type: 0,
_id: 0
}
} }
async function getConfig(id) { 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) const b = storeBuilder.module<IGlobalState>('GlobalModule', state)
// Getters // Getters
@@ -111,94 +116,24 @@ namespace Getters {
}, 'showtype') }, 'showtype')
const getmenu = b.read((state) => { const getmenu = b.read((state) => {
console.log('getmenu') // console.log('getmenu', cfgrouter.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' })
}
state.menulinks = { state.menulinks = {
Dashboard: { Dashboard: {
routes: arrroutes, routes: cfgrouter.getmenu(),
show: true show: true
} }
} }
return state.menulinks return state.menulinks
console.log('state.menulinks', state.menulinks) // console.log('state.menulinks', state.menulinks)
}, 'getmenu') }, 'getmenu')
const t = b.read((state) => (params) => { const t = b.read((state) => (params) => {
const msg = params.split('.') const msg = params.split('.')
const lang = UserStore.state.lang const lang = toolsext.getLocale()
const stringa = messages[lang] const stringa = messages[lang]
@@ -370,11 +305,11 @@ namespace Actions {
const mykey = process.env.PUBLICKEY_PUSH const mykey = process.env.PUBLICKEY_PUSH
const mystate = state const mystate = state
return navigator.serviceWorker.ready return navigator.serviceWorker.ready
.then(function (swreg) { .then((swreg) => {
reg = swreg reg = swreg
return swreg.pushManager.getSubscription() return swreg.pushManager.getSubscription()
}) })
.then(function (subscription) { .then((subscription) => {
mystate.wasAlreadySubscribed = !(subscription === null) mystate.wasAlreadySubscribed = !(subscription === null)
if (mystate.wasAlreadySubscribed) { if (mystate.wasAlreadySubscribed) {
@@ -391,10 +326,10 @@ namespace Actions {
}) })
} }
}) })
.then(function (newSub) { .then((newSub) => {
saveNewSubscriptionToServer(context, newSub) saveNewSubscriptionToServer(context, newSub)
}) })
.catch(function (err) { .catch((err) => {
console.log('ERR createPushSubscription:', err) console.log('ERR createPushSubscription:', err)
}) })
} }
@@ -480,7 +415,7 @@ namespace Actions {
subscription.unsubscribe().then((successful) => { subscription.unsubscribe().then((successful) => {
// You've successfully unsubscribed // You've successfully unsubscribed
console.log('You\'ve successfully unsubscribed') console.log('You\'ve successfully unsubscribed')
}).catch( (e) => { }).catch((e) => {
// Unsubscription failed // Unsubscription failed
}) })
} }

View File

@@ -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 { Privacy } from '@src/model'
import { storeBuilder } from './Store/Store' import { storeBuilder } from './Store/Store'
import Api from '@api' import Api from '@api'
import { tools } from './tools' import { tools } from './tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { lists } from './lists'
import * as ApiTables from './ApiTables' import * as ApiTables from './ApiTables'
import { GlobalStore, UserStore } from '@store' import { GlobalStore, UserStore } from '@store'
import globalroutines from './../../globalroutines/index' import globalroutines from './../../globalroutines/index'
import objectId from '@src/js/objectId' import objectId from '@src/js/objectId'
import { costanti } from '@src/store/Modules/costanti' 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' const nametable = 'projects'
@@ -21,12 +26,12 @@ const stateglob: IProjectsState = {
visuLastCompleted: 10 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', 'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progressCalc', 'live_url', 'test_url',
'begin_development', 'begin_test', 'actualphase', 'totalphases', 'hoursweeky_plannedtowork', 'endwork_estimate', 'begin_development', 'begin_test', 'actualphase', 'totalphases', 'hoursweeky_plannedtowork', 'endwork_estimate',
'privacyread', 'privacywrite', 'id_main_project', 'typeproj'] 'privacyread', 'privacywrite', 'id_main_project', 'typeproj', 'favourite', '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 b = storeBuilder.module<IProjectsState>('Projects', stateglob)
const stateGetter = b.state() const stateGetter = b.state()
@@ -51,12 +56,15 @@ function updateDataCalculated(projout, projin) {
}) })
} }
function getproj(projects, idproj, miei: boolean) { function getproj(projects, idproj, tipoproj: string) {
if (miei) { console.log('getproj', tipoproj)
return tools.mapSort(projects.filter((proj) => (proj.id_parent === idproj) && proj.userId === UserStore.state.userId))
} else { if (tipoproj === RouteNames.myprojects)
return tools.mapSort(projects.filter((proj) => (proj.id_parent === idproj) && proj.userId !== UserStore.state.userId )) return projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId === UserStore.state.userId) && (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 { namespace Getters {
@@ -88,37 +96,40 @@ namespace Getters {
actualphase: 1, actualphase: 1,
hoursworked: 0, hoursworked: 0,
hoursplanned: 0, hoursplanned: 0,
hoursleft: 0,
progressCalc: 0, progressCalc: 0,
privacyread: 'onlyme', privacyread: 'onlyme',
privacywrite: 'onlyme', privacywrite: 'onlyme',
begin_development: tools.getDateNull(), begin_development: tools.getDateNull(),
begin_test: tools.getDateNull(), begin_test: tools.getDateNull(),
hoursweeky_plannedtowork: 0, hoursweeky_plannedtowork: 0,
endwork_estimate: tools.getDateNull() endwork_estimate: tools.getDateNull(),
themecolor: '',
themebgcolor: ''
} }
return obj return obj
}, 'getRecordEmpty') }, 'getRecordEmpty')
const projs_dacompletare = b.read((state: IProjectsState) => (id_parent: string, miei: boolean): IProject[] => { const projs_dacompletare = b.read((state: IProjectsState) => (id_parent: string, tipoproj: string): IProject[] => {
// console.log('projs_dacompletare', miei) // console.log('projs_dacompletare')
if (state.projects) { if (state.projects) {
// console.log('state.projects', state.projects) // console.log('state.projects', state.projects)
return getproj(state.projects, id_parent, miei) return getproj(state.projects, id_parent, tipoproj)
} else { } else {
return [] return []
} }
}, 'projs_dacompletare') }, 'projs_dacompletare')
const listaprojects = b.read((state: IProjectsState) => (miei: boolean): IMenuList[] => { const listaprojects = b.read((state: IProjectsState) => (tipoproj: string): IMenuList[] => {
if (state.projects) { if (state.projects) {
// console.log('state.projects', state.projects) console.log('listaprojects')
const listaproj = getproj(state.projects, process.env.PROJECT_ID_MAIN, miei) const listaproj = getproj(state.projects, process.env.PROJECT_ID_MAIN, tipoproj)
const myarr: IMenuList[] = [] const myarr: IMenuList[] = []
for (const proj of listaproj) { for (const proj of listaproj) {
myarr.push({ nametranslate: '', description: proj.descr, idelem: proj._id }) myarr.push({ nametranslate: '', description: proj.descr, idelem: proj._id })
} }
console.log(' myarr', myarr, listaproj) // console.log(' myarr', myarr, listaproj)
return myarr return myarr
} else { } else {
@@ -146,7 +157,7 @@ namespace Getters {
}, 'getRecordById') }, 'getRecordById')
const getifCanISeeProj = b.read((state: IProjectsState) => (proj: IProject): boolean => { const getifCanISeeProj = b.read((state: IProjectsState) => (proj: IProject): boolean => {
if (proj === undefined) if ((proj === undefined) || (proj === null))
return false return false
if (!!UserStore.state) { if (!!UserStore.state) {
@@ -164,7 +175,7 @@ namespace Getters {
}, 'getifCanISeeProj') }, 'getifCanISeeProj')
const CanIModifyPanelPrivacy = b.read((state: IProjectsState) => (proj: IProject): boolean => { const CanIModifyPanelPrivacy = b.read((state: IProjectsState) => (proj: IProject): boolean => {
if (proj === undefined) if ((proj === undefined) || (proj === null))
return false return false
if (!!UserStore) { if (!!UserStore) {
@@ -240,10 +251,20 @@ namespace Mutations {
ApiTables.removeitemfromarray(state.projects, ind) ApiTables.removeitemfromarray(state.projects, ind)
} }
async function movemyitem(state: IProjectsState, { myitemorig, myitemdest } ) {
const indorig = tools.getIndexById(state.projects, myitemorig._id)
state.projects.splice(indorig, 1)
state.projects.push(myitemdest)
await Actions.actions.modify({ myitem: myitemdest, field: 'id_parent' })
}
export const mutations = { export const mutations = {
deletemyitem: b.commit(deletemyitem), deletemyitem: b.commit(deletemyitem),
createNewItem: b.commit(createNewItem), createNewItem: b.commit(createNewItem),
updateProject: b.commit(updateProject) updateProject: b.commit(updateProject),
movemyitem: b.commit(movemyitem)
} }
} }
@@ -255,7 +276,7 @@ namespace Actions {
if (onlyiffirsttime) { if (onlyiffirsttime) {
if (stateglob.projects.length > 0) { if (stateglob.projects.length > 0) {
// if already set, then exit. // if already set, then exit.
return false return new Types.AxiosError(0, null, 0, '')
} }
} }
@@ -287,7 +308,7 @@ namespace Actions {
.catch((error) => { .catch((error) => {
console.log('error dbLoad', error) console.log('error dbLoad', error)
UserStore.mutations.setErrorCatch(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) ApiTables.aftercalling(ris, checkPending, nametable)
@@ -324,6 +345,9 @@ namespace Actions {
objproj.id_parent = myobj.id_parent objproj.id_parent = myobj.id_parent
objproj.id_main_project = myobj.id_main_project objproj.id_main_project = myobj.id_main_project
objproj.typeproj = myobj.typeproj objproj.typeproj = myobj.typeproj
objproj.privacyread = myobj.privacyread
objproj.privacywrite = myobj.privacywrite
objproj.actualphase = myobj.actualphase
let elemtochange: IProject = null let elemtochange: IProject = null
@@ -336,7 +360,7 @@ namespace Actions {
} else { } else {
console.log('INSERT AT THE BOTTOM') console.log('INSERT AT THE BOTTOM')
// INSERT AT THE BOTTOM , so GET LAST ITEM // 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 objproj.id_prev = (!!lastelem) ? lastelem._id : ApiTables.LIST_START
} }
@@ -371,18 +395,48 @@ namespace Actions {
async function swapElems(context, itemdragend: IDrag) { async function swapElems(context, itemdragend: IDrag) {
console.log('PROJECT swapElems', itemdragend, stateglob.projects) 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) 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 = { export const actions = {
dbLoad: b.dispatch(dbLoad), dbLoad: b.dispatch(dbLoad),
swapElems: b.dispatch(swapElems), swapElems: b.dispatch(swapElems),
deleteItem: b.dispatch(deleteItem), deleteItem: b.dispatch(deleteItem),
dbInsert: b.dispatch(dbInsert), dbInsert: b.dispatch(dbInsert),
modify: b.dispatch(modify) modify: b.dispatch(modify),
ActionCutPaste: b.dispatch(ActionCutPaste)
} }
} }

View File

@@ -3,6 +3,8 @@ import { storeBuilder } from './Store/Store'
import Api from '@api' import Api from '@api'
import { tools } from './tools' import { tools } from './tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { lists } from './lists'
import * as ApiTables from './ApiTables' import * as ApiTables from './ApiTables'
import { GlobalStore, Todos, UserStore } from '@store' import { GlobalStore, Todos, UserStore } from '@store'
import globalroutines from './../../globalroutines/index' import globalroutines from './../../globalroutines/index'
@@ -11,6 +13,8 @@ import { serv_constants } from '@src/store/Modules/serv_constants'
import { GetterTree } from 'vuex' import { GetterTree } from 'vuex'
import objectId from '@src/js/objectId' import objectId from '@src/js/objectId'
import { costanti } from '@src/store/Modules/costanti' import { costanti } from '@src/store/Modules/costanti'
import { IAction } from '@src/model'
import * as Types from '@src/store/Api/ApiTypes'
const nametable = 'todos' const nametable = 'todos'
@@ -27,7 +31,7 @@ const state: ITodosState = {
visuLastCompleted: 10 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 b = storeBuilder.module<ITodosState>('Todos', state)
const stateGetter = b.state() const stateGetter = b.state()
@@ -46,7 +50,7 @@ function gettodosByCategory(category: string): [] {
function initcat() { function initcat() {
let rec = Getters.getters.getRecordEmpty() const rec = Getters.getters.getRecordEmpty()
rec.userId = UserStore.state.userId rec.userId = UserStore.state.userId
return rec return rec
@@ -54,7 +58,7 @@ function initcat() {
} }
namespace Getters { namespace Getters {
const getRecordEmpty = b.read((state: ITodosState) => (): ITodo => { const getRecordEmpty = b.read((stateparamf: ITodosState) => (): ITodo => {
const tomorrow = tools.getDateNow() const tomorrow = tools.getDateNow()
tomorrow.setDate(tomorrow.getDate() + 1) tomorrow.setDate(tomorrow.getDate() + 1)
@@ -82,56 +86,69 @@ namespace Getters {
hoursplanned: 0, hoursplanned: 0,
hoursworked: 0, hoursworked: 0,
start_date: tools.getDateNull(), start_date: tools.getDateNull(),
themecolor: 'blue',
themebgcolor: 'white'
} }
// return this.copy(objtodo) // return this.copy(objtodo)
return objtodo return objtodo
}, 'getRecordEmpty') }, '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) const indcat = getindexbycategory(cat)
// console.log('items_dacompletare', 'indcat', indcat, state.todos[indcat]) let arrout = []
if (state.todos[indcat]) { // console.log('items_dacompletare', 'indcat', indcat, stateparam.todos[indcat])
return state.todos[indcat].filter((todo) => todo.statustodo !== tools.Status.COMPLETED) if (stateparam.todos[indcat]) {
arrout = stateparam.todos[indcat].filter((todo) => todo.statustodo !== tools.Status.COMPLETED)
} else { } else {
return [] arrout = []
} }
// return tools.mapSort(arrout)
return arrout
}, 'items_dacompletare') }, '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) const indcat = getindexbycategory(cat)
if (state.todos[indcat]) { if (stateparam.todos[indcat]) {
if (state.showtype === costanti.ShowTypeTask.SHOW_LAST_N_COMPLETED) { // Show only the first N completed let arrout = []
return state.todos[indcat].filter((todo) => todo.statustodo === tools.Status.COMPLETED).slice(0, state.visuLastCompleted) 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) { else if (stateparam.showtype === costanti.ShowTypeTask.SHOW_ONLY_TOCOMPLETE) {
return [] arrout = []
} }
else if (state.showtype === costanti.ShowTypeTask.SHOW_ALL) { else if (stateparam.showtype === costanti.ShowTypeTask.SHOW_ALL) {
return state.todos[indcat].filter((todo) => todo.statustodo === tools.Status.COMPLETED) arrout = stateparam.todos[indcat].filter((todo) => todo.statustodo === tools.Status.COMPLETED)
} }
else { else {
return [] arrout = []
} }
return arrout
// return tools.mapSort(arrout)
} else { } else {
return [] return []
} }
}, 'todos_completati') }, '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 return getters.todos_completati(cat).length
}, 'doneTodosCount') }, 'doneTodosCount')
const TodosCount = b.read((state: ITodosState) => (cat: string): number => { const TodosCount = b.read((stateparam: ITodosState) => (cat: string): number => {
const indcat = getindexbycategory(cat) const indcat = getindexbycategory(cat)
if (state.todos[indcat]) { if (stateparam.todos[indcat]) {
return state.todos[indcat].length return stateparam.todos[indcat].length
} else { } else {
return 0 return 0
} }
}, 'TodosCount') }, '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) const indcat = getindexbycategory(cat)
if (state.todos) { if (stateparam.todos) {
return state.todos[indcat].find((item) => item._id === id) return stateparam.todos[indcat].find((item) => item._id === id)
} }
return null return null
}, 'getRecordById') }, 'getRecordById')
@@ -160,49 +177,73 @@ namespace Getters {
namespace Mutations { namespace Mutations {
function findIndTodoById(state: ITodosState, data: IParamTodo) { function findIndTodoById(stateparam: ITodosState, data: IParamTodo) {
const indcat = state.categories.indexOf(data.categorySel) const indcat = stateparam.categories.indexOf(data.categorySel)
if (indcat >= 0) { if (indcat >= 0) {
return tools.getIndexById(state.todos[indcat], data.id) return tools.getIndexById(stateparam.todos[indcat], data.id)
} }
return -1 return -1
} }
function createNewItem(state: ITodosState, { objtodo, atfirst, categorySel }) { function createNewItem(stateparam: ITodosState, { objtodo, atfirst, categorySel }) {
let indcat = state.categories.indexOf(categorySel) let indcat = stateparam.categories.indexOf(categorySel)
if (indcat == -1) { if (indcat === -1) {
state.categories.push(categorySel) stateparam.categories.push(categorySel)
indcat = state.categories.indexOf(categorySel) indcat = stateparam.categories.indexOf(categorySel)
} }
console.log('createNewItem', objtodo, 'cat=', categorySel, 'state.todos[indcat]', state.todos[indcat]) console.log('createNewItem', objtodo, 'cat=', categorySel, 'stateparam.todos[indcat]', stateparam.todos[indcat])
if (state.todos[indcat] === undefined) { if (stateparam.todos[indcat] === undefined) {
state.todos[indcat] = [] stateparam.todos[indcat] = []
state.todos[indcat].push(objtodo) stateparam.todos[indcat].push(objtodo)
console.log('push state.todos[indcat]', state.todos) console.log('push stateparam.todos[indcat]', stateparam.todos)
return return
} }
if (atfirst) { if (atfirst) {
state.todos[indcat].unshift(objtodo) stateparam.todos[indcat].unshift(objtodo)
} }
else { 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 // Find record
const indcat = state.categories.indexOf(myitem.category) const indcat = stateparam.categories.indexOf(myitem.category)
const ind = findIndTodoById(state, { id: myitem._id, categorySel: 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 = { export const mutations = {
deletemyitem: b.commit(deletemyitem), 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 }) { async function dbLoad(context, { checkPending }) {
console.log('dbLoad', nametable, checkPending, 'userid=', UserStore.state.userId) console.log('dbLoad', nametable, checkPending, 'userid=', UserStore.state.userId)
if (UserStore.state.userId === '') { // if (UserStore.state.userId === '') {
return false // Login not made // return new Types.AxiosError(0, null, 0, '')
} // }
const ris = await Api.SendReq('/todos/' + UserStore.state.userId, 'GET', null) const ris = await Api.SendReq('/todos/' + UserStore.state.userId, 'GET', null)
.then((res) => { .then((res) => {
@@ -240,10 +281,12 @@ namespace Actions {
.catch((error) => { .catch((error) => {
console.log('error dbLoad', error) console.log('error dbLoad', error)
UserStore.mutations.setErrorCatch(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') ApiTables.aftercalling(ris, checkPending, 'categories')
return ris
} }
async function deleteItemtodo(context, { cat, idobj }) { async function deleteItemtodo(context, { cat, idobj }) {
@@ -288,7 +331,7 @@ namespace Actions {
} else { } else {
console.log('INSERT AT THE BOTTOM') console.log('INSERT AT THE BOTTOM')
// INSERT AT THE BOTTOM , so GET LAST ITEM // 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 objtodo.id_prev = (!!lastelem) ? lastelem._id : ApiTables.LIST_START
} }
@@ -363,7 +406,7 @@ namespace Actions {
} }
async function swapElems(context, itemdragend: IDrag) { 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 cat = itemdragend.category
const indcat = state.categories.indexOf(cat) 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 = { export const actions = {
dbLoad: b.dispatch(dbLoad), dbLoad: b.dispatch(dbLoad),
swapElems: b.dispatch(swapElems), swapElems: b.dispatch(swapElems),
deleteItemtodo: b.dispatch(deleteItemtodo), deleteItemtodo: b.dispatch(deleteItemtodo),
dbInsert: b.dispatch(dbInsert), dbInsert: b.dispatch(dbInsert),
modify: b.dispatch(modify) modify: b.dispatch(modify),
ActionCutPaste: b.dispatch(ActionCutPaste)
} }
} }

View File

@@ -6,6 +6,7 @@ import router from '@router'
import { serv_constants } from '../Modules/serv_constants' import { serv_constants } from '../Modules/serv_constants'
import { tools } from '../Modules/tools' import { tools } from '../Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { GlobalStore, UserStore, Todos, Projects } from '@store' import { GlobalStore, UserStore, Todos, Projects } from '@store'
import globalroutines from './../../globalroutines/index' import globalroutines from './../../globalroutines/index'
@@ -20,7 +21,7 @@ const state: IUserState = {
email: '', email: '',
username: '', username: '',
password: '', password: '',
lang: '', lang: process.env.LANG_DEFAULT,
repeatPassword: '', repeatPassword: '',
tokens: [], tokens: [],
verified_email: false, verified_email: false,
@@ -520,10 +521,11 @@ namespace Actions {
GlobalStore.actions.checkUpdates() GlobalStore.actions.checkUpdates()
} }
await GlobalStore.actions.loadAfterLogin() return await GlobalStore.actions.loadAfterLogin()
.then(() => { .then(() => {
Todos.actions.dbLoad({ checkPending: true }) return Todos.actions.dbLoad({ checkPending: true })
Projects.actions.dbLoad({ checkPending: true, onlyiffirsttime: true }) }).then(() => {
return Projects.actions.dbLoad({ checkPending: true, onlyiffirsttime: true })
}) })
} }

View File

@@ -1,3 +1,5 @@
import { UserStore } from '@store'
export const costanti = { export const costanti = {
ShowTypeTask: { ShowTypeTask: {
SHOW_LAST_N_COMPLETED: 200, SHOW_LAST_N_COMPLETED: 200,
@@ -8,5 +10,5 @@ export const costanti = {
CONFIG_ID_STATE_CONN: '2', CONFIG_ID_STATE_CONN: '2',
CONFIG_ID_SHOW_TYPE_TODOS: '3', CONFIG_ID_SHOW_TYPE_TODOS: '3',
MAX_PHASES: 5 MAX_PHASES: 5,
} }

View File

@@ -3,3 +3,4 @@ export {default as GlobalStore} from './GlobalStore'
export {default as UserStore} from './UserStore' export {default as UserStore} from './UserStore'
export {default as Todos} from './Todos' export {default as Todos} from './Todos'
export {default as Projects} from './Projects' export {default as Projects} from './Projects'
export {default as CalendarStore} from './Store/calendar/CalendarStore'

160
src/store/Modules/lists.ts Normal file
View 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

View File

@@ -10,10 +10,15 @@ export const translation = {
proj: { proj: {
newproj: 'Nuovo Progetto', newproj: 'Nuovo Progetto',
newsubproj: 'Nuovo Sotto-Progetto', newsubproj: 'Nuovo Sotto-Progetto',
themecolor: 'Tema Colore',
themebgcolor: 'Tema Colore Sfondo'
}, },
task: { task: {
showtask: 'Mostra Task', showtask: 'Mostra Task',
}, },
action: {
paste: 'Incolla'
},
end: '' end: ''
}, },
es: { es: {
@@ -27,10 +32,15 @@ export const translation = {
proj: { proj: {
newproj: 'Nuevo Projecto', newproj: 'Nuevo Projecto',
newsubproj: 'Nuevo Sub-Projecto', newsubproj: 'Nuevo Sub-Projecto',
themecolor: 'Tema Colores',
themebgcolor: 'Tema Colores Fondo'
}, },
task: { task: {
showtask: 'Mostrar Tarea', showtask: 'Mostrar Tarea',
}, },
action: {
paste: 'Pegar'
},
end: '' end: ''
}, },
enUs: { enUs: {
@@ -44,9 +54,14 @@ export const translation = {
proj: { proj: {
newproj: 'New Project', newproj: 'New Project',
newsubproj: 'New Sub-Project', newsubproj: 'New Sub-Project',
themecolor: 'Theme Color',
themebgcolor: 'Theme Background Color'
}, },
task: { task: {
showtask: 'Show Task', showtask: 'Show Task'
},
action: {
paste: 'Paste'
}, },
end: '' end: ''
} }

View File

@@ -5,7 +5,7 @@ import { GlobalStore, UserStore } from '@store'
import { Getter } from 'vuex-class' import { Getter } from 'vuex-class'
import { ICfgServer, IGlobalState, ITodo, ITodosState } from '../../../model/index' import { ICfgServer, IGlobalState, ITodo, ITodosState } from '../../../model/index'
const namespace: string = 'GlobalModule' const namespace: string = 'Testp1'
@Component({}) @Component({})
export default class Testp1 extends Vue { export default class Testp1 extends Vue {

View File

@@ -3,6 +3,7 @@ import { Component, Watch } from 'vue-property-decorator'
import { ICategory } from '../../../model/index' import { ICategory } from '../../../model/index'
import { tools } from '../../../store/Modules/tools' import { tools } from '../../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
@Component({ @Component({
}) })

View File

@@ -4,6 +4,7 @@ import { Component, Watch } from 'vue-property-decorator'
import { SingleCat } from '../SingleCat/index' import { SingleCat } from '../SingleCat/index'
import { ICategory } from '../../../model/index' import { ICategory } from '../../../model/index'
import { tools } from '../../../store/Modules/tools' import { tools } from '../../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
@Component({ @Component({

View File

@@ -64,6 +64,7 @@
import { UserStore } from "../../store/Modules"; import { UserStore } from "../../store/Modules";
import { IUserState } from "../../model"; import { IUserState } from "../../model";
import { tools } from "../../store/Modules/tools"; import { tools } from "../../store/Modules/tools";
import { toolsext } from '@src/store/Modules/toolsext'
export default class RequestResetPwd extends Vue{ export default class RequestResetPwd extends Vue{
emailsent = false emailsent = false
form: IUserState = { form: IUserState = {

View File

@@ -3,6 +3,7 @@ import Vue from 'vue'
import { Component, Prop, Watch } from 'vue-property-decorator' import { Component, Prop, Watch } from 'vue-property-decorator'
import { serv_constants } from '../../../store/Modules/serv_constants' import { serv_constants } from '../../../store/Modules/serv_constants'
import { tools } from '../../../store/Modules/tools' import { tools } from '../../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { ISigninOptions, IUserState } from 'model' import { ISigninOptions, IUserState } from 'model'
import { TSignin, validations } from './signin-validate' import { TSignin, validations } from './signin-validate'
@@ -161,14 +162,14 @@ export default class Signin extends Vue {
} }
return riscode return riscode
}).then((riscode) => { }).then((riscode) => {
if (UserStore.state.lang !== '') { if (toolsext.getLocale() !== '') {
this.$i18n.locale = UserStore.state.lang this.$i18n.locale = toolsext.getLocale()
} // Set Lang } // Set Lang
else { else {
UserStore.mutations.setlang(this.$i18n.locale) UserStore.mutations.setlang(this.$i18n.locale)
} // Set Lang } // Set Lang
// console.log('LANG ORA=', UserStore.state.lang) // console.log('LANG ORA=', toolsext.getLocale())
globalroutines(this, 'loadapp', '') globalroutines(this, 'loadapp', '')
return riscode return riscode

View File

@@ -2,6 +2,7 @@ import Vue from 'vue'
import { Component, Prop, Watch } from 'vue-property-decorator' import { Component, Prop, Watch } from 'vue-property-decorator'
import { UserStore } from '@store' import { UserStore } from '@store'
import { tools } from '../../../store/Modules/tools' import { tools } from '../../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { ISignupOptions, IUserState } from 'model' import { ISignupOptions, IUserState } from 'model'
import { validations, TSignup } from './signup-validate' import { validations, TSignup } from './signup-validate'

View File

@@ -76,6 +76,7 @@
import { UserStore } from "../../store/Modules"; import { UserStore } from "../../store/Modules";
import { IUserState } from "../../model"; import { IUserState } from "../../model";
import { tools } from "../../store/Modules/tools"; import { tools } from "../../store/Modules/tools";
import { toolsext } from '@src/store/Modules/toolsext'
export default class UpdatePassword extends Vue { export default class UpdatePassword extends Vue {
emailsent = false emailsent = false

View File

@@ -4,6 +4,11 @@ $heightBtn: 100%;
min-width: 350px; min-width: 350px;
} }
.clVista {
max-height: 400px !important;
}
.flex-container, .flex-container_col{ .flex-container, .flex-container_col{
background-color: rgb(250, 250, 250); background-color: rgb(250, 250, 250);
padding: 2px 4px 2px 4px; padding: 2px 4px 2px 4px;
@@ -90,20 +95,6 @@ $heightBtn: 100%;
flex: 1; 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{ .itemdescr{
font-size: 1rem; font-size: 1rem;
flex: 1; flex: 1;

View File

@@ -1,11 +1,13 @@
import Vue from 'vue' import Vue from 'vue'
import { Component, Watch } from 'vue-property-decorator' import { Component, Watch } from 'vue-property-decorator'
import { IDrag, IProject, IProjectsState, ITodo, Privacy, TypeProj } from '../../../model/index' import { IAction, IDrag, IProject, IProjectsState, ITodo, Privacy, TypeProj } from '../../../model/index'
import { SingleProject } from '../../../components/projects/SingleProject/index' import { SingleProject } from '../../../components/projects/SingleProject/index'
import { CTodo } from '../../../components/todos/CTodo' import { CTodo } from '../../../components/todos/CTodo'
import { tools } from '../../../store/Modules/tools' 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 * as ApiTables from '../../../store/Modules/ApiTables'
import { GlobalStore, Projects, Todos } from '@store' import { GlobalStore, Projects, Todos } from '@store'
@@ -37,6 +39,8 @@ const namespace: string = 'Projects'
export default class ProjList extends Vue { export default class ProjList extends Vue {
public $q: any public $q: any
public projbottom: string = '' public projbottom: string = ''
public prova: string = ''
public provatr: string = ''
public polling = null public polling = null
public service: any public service: any
public scrollable = true public scrollable = true
@@ -51,10 +55,11 @@ export default class ProjList extends Vue {
public whatisSel: number = 0 public whatisSel: number = 0
public colProgress: string = 'blue' public colProgress: string = 'blue'
public percProgress: string = 'percProgress' public percProgress: string = 'percProgress'
public readonly: boolean = false
public selectStatus: [] = tools.selectStatus[UserStore.state.lang] public selectStatus: [] = tools.selectStatus[toolsext.getLocale()]
public selectPhase: [] = tools.selectPhase[UserStore.state.lang] public selectPhase: [] = tools.selectPhase[toolsext.getLocale()]
public selectPrivacy: [] = tools.selectPrivacy[UserStore.state.lang] public selectPrivacy: [] = tools.selectPrivacy[toolsext.getLocale()]
public $refs: { public $refs: {
singleproject: SingleProject[], singleproject: SingleProject[],
@@ -62,16 +67,17 @@ export default class ProjList extends Vue {
} }
@Getter('projs_dacompletare', { namespace }) @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') // @Watch('projs_dacompletare')
public changeitems() { // public changeitems() {
this.updateindexProj() // this.updateindexProj()
} // }
@Watch('$route.name') @Watch('$route.name')
public changename() { public changename() {
console.log('tools.getUrlByTipoProj(this.areMyProjects)', tools.getUrlByTipoProj(this.areMyProjects)) console.log('tools.getUrlByTipoProj(this.tipoProj)', tools.getUrlByTipoProj(this.tipoProj))
this.changeparent()
} }
@Watch('$route.params.idProj') @Watch('$route.params.idProj')
@@ -96,9 +102,43 @@ export default class ProjList extends Vue {
// console.log('idproj', this.idProjAtt, 'params' , this.$route.params) // console.log('idproj', this.idProjAtt, 'params' , this.$route.params)
} }
get areMyProjects() { public keyDownArea(e) {
console.log('this.$route.name', this.$route.name) console.log('keyDownArea')
return this.$route.name === RouteNames.myprojects }
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() { get readonly_PanelPrivacy() {
@@ -106,7 +146,7 @@ export default class ProjList extends Vue {
} }
get readonly_PanelPrivacySel() { get readonly_PanelPrivacySel() {
return !this.CanIModifyPanelPrivacySel return !this.CanIModifyPanelPrivacySel || this.readonly
} }
get CanISeeProject() { get CanISeeProject() {
@@ -130,7 +170,7 @@ export default class ProjList extends Vue {
} }
get getrouteup() { get getrouteup() {
return tools.getUrlByTipoProj(this.areMyProjects) + this.itemproj.id_parent return tools.getUrlByTipoProj(this.tipoProj) + this.itemproj.id_parent
} }
get tools() { get tools() {
@@ -162,14 +202,20 @@ export default class ProjList extends Vue {
} }
get menuPopupConfigProject() { get menuPopupConfigProject() {
let mymenu = null
if (this.isMainProject) if (this.isMainProject)
return tools.menuPopupConfigMAINProject[UserStore.state.lang] mymenu = tools.menuPopupConfigMAINProject[toolsext.getLocale()]
else 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() { get listOptionShowTask() {
return tools.listOptionShowTask[UserStore.state.lang] return tools.listOptionShowTask[toolsext.getLocale()]
} }
get descrProject() { get descrProject() {
@@ -183,6 +229,14 @@ export default class ProjList extends Vue {
} }
return Math.round(this.itemselproj.hoursworked / this.itemselproj.hoursplanned * 100) 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() { get calcprogressWeekly() {
@@ -199,7 +253,8 @@ export default class ProjList extends Vue {
try { 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) { if (orerimaste < 0) {
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) console.log(' days', days, 'weeks', weeks, 'orerimaste', orerimaste, 'dateestimated', this.itemselproj.endwork_estimate)
return this.itemselproj.endwork_estimate return this.itemselproj.endwork_estimate
}catch (e) { } catch (e) {
this.itemselproj.endwork_estimate = tools.getDateNull() this.itemselproj.endwork_estimate = tools.getDateNull()
} }
@@ -254,7 +309,7 @@ export default class ProjList extends Vue {
} }
public showTask(field_value) { public showTask(field_value) {
return field_value === tools.MenuAction.SHOW_TASK return field_value === lists.MenuAction.SHOW_TASK
} }
public async onEndproj(itemdragend) { public async onEndproj(itemdragend) {
@@ -277,7 +332,7 @@ export default class ProjList extends Vue {
id_proj: this.idProjAtt, id_proj: this.idProjAtt,
newIndex: this.getElementIndex(args.el), newIndex: this.getElementIndex(args.el),
oldIndex: this.getElementOldIndex(args.el), oldIndex: this.getElementOldIndex(args.el),
mieiproj: this.areMyProjects tipoproj: this.tipoProj
} }
// console.log('args', args, itemdragend) // console.log('args', args, itemdragend)
@@ -295,16 +350,27 @@ export default class ProjList extends Vue {
this.load() this.load()
} }
get isHorizontal() {
return (Screen.width < 600)
}
get myStyle(){
if (this.isHorizontal)
return 'height: 600px'
else
return ''
}
public mounted() { public mounted() {
// console.log('Screen.width', Screen.width) // console.log('Screen.width', Screen.width)
// console.log('this.$route', this.$route) // console.log('this.$route', this.$route)
if (Screen.width < 400) { // if (Screen.width < 400) {
this.splitterModel = 100 // this.splitterModel = 100
} else { // } else {
this.splitterModel = 50 // this.splitterModel = 50
} // }
this.idProjAtt = this.$route.params.idProj this.idProjAtt = this.$route.params.idProj
this.updateindexProj() this.updateindexProj()
@@ -341,45 +407,75 @@ export default class ProjList extends Vue {
} }
public dbInsert() { public dbInsert() {
console.log('dbInsert')
const descr = this.projbottom.trim() const descr = this.projbottom.trim()
this.projbottom = '' this.projbottom = ''
return this.addProject(descr) return this.addProject(descr, this.tipoProj)
} }
public async clickMenuProjList(action) { public async clickMenuProjList(action) {
console.log('clickMenuProjList: ', action) console.log('clickMenuProjList: ', action)
if (action === tools.MenuAction.ADD_PROJECT) { if (action === lists.MenuAction.ADD_PROJECT) {
const idnewelem = await this.addProject('') const idnewelem = await this.addProject('', this.tipoProj)
// get element by id // get element by id
const elem = this.getCompProjectById(idnewelem) const elem = this.getCompProjectById(idnewelem)
// @ts-ignore // @ts-ignore
elem.activeEdit() elem.activeEdit()
// console.log('idnewelem', idnewelem, 'Elem Trovato', elem) // console.log('idnewelem', idnewelem, 'Elem Trovato', elem)
} else if (action === 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 { public getCompProjectById(id): SingleProject {
console.log('this.$refs.singleproject', this.$refs.singleproject) if (!!this.$refs.singleproject) {
for (const elem of this.$refs.singleproject) { console.log('this.$refs.singleproject', this.$refs.singleproject)
// @ts-ignore for (const elem of this.$refs.singleproject) {
if (elem.itemproject._id === id) { // @ts-ignore
return elem if (elem.itemproject._id === id) {
return elem
}
} }
} }
} }
// const descr = this.$t('project.newproj').toString() // const descr = this.$t('project.newproj').toString()
public async addProject(descr) { public async addProject(descr, tipoproj: string) {
const myobj: IProject = { const projatt = Projects.getters.getRecordById(this.idProjAtt)
descr, let myobj: IProject = null
id_parent: this.idProjAtt if (this.idProjAtt === process.env.PROJECT_ID_MAIN) {
myobj = {
descr,
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) if (this.itemproj === undefined)
this.itemproj = Projects.getters.getRecordById(this.idProjAtt) this.itemproj = projatt
if (this.isRootProject) { if (this.isRootProject) {
myobj.typeproj = TypeProj.TYPE_PROJECT myobj.typeproj = TypeProj.TYPE_PROJECT
@@ -396,6 +492,7 @@ export default class ProjList extends Vue {
return return
} }
console.log('Nuovo PROJ', myobj)
return await Projects.actions.dbInsert({ myobj, atfirst: false }) return await Projects.actions.dbInsert({ myobj, atfirst: false })
} }
@@ -403,10 +500,36 @@ export default class ProjList extends Vue {
this.idsel = id this.idsel = id
this.whatisSel = tools.WHAT_PROJECT this.whatisSel = tools.WHAT_PROJECT
this.itemselproj = Projects.getters.getRecordById(this.idsel) this.itemselproj = Projects.getters.getRecordById(this.idsel)
if ((this.itemselproj === undefined || this.itemselproj === null))
this.whatisSel = tools.WHAT_NOTHING
// console.log('readonly = true')
this.readonly = true
this.checkiftoenable()
} }
public setitemsel(item: ITodo) { public setitemsel(item: ITodo) {
this.whatisSel = tools.WHAT_TODO
this.itemtodosel = item 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) { public cambiadata(value) {
@@ -424,7 +547,7 @@ export default class ProjList extends Vue {
public deselectAllRowstodo(item: ITodo, check, onlythis: boolean = false) { public deselectAllRowstodo(item: ITodo, check, onlythis: boolean = false) {
// console.log('PROJ-LIST deselectAllRowstodo : ', item) // console.log('PROJ-LIST deselectAllRowstodo : ', item)
return false // return false
// @ts-ignore // @ts-ignore
for (const i in this.$refs.ctodo.$refs.single) { 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) // 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) { for (const i in this.$refs.singleproject) {
const contr = this.$refs.singleproject[i] as SingleProject const contr = this.$refs.singleproject[i] as SingleProject
@@ -478,7 +616,11 @@ export default class ProjList extends Vue {
} }
public updateclasses() { public updateclasses() {
this.colProgress = tools.getProgressColor(this.itemselproj.progressCalc) if (!!this.itemselproj) {
this.colProgress = tools.getProgressColor(this.itemselproj.progressCalc)
} else {
this.whatisSel = tools.WHAT_NOTHING
}
} }
public checkUpdate() { public checkUpdate() {

View File

@@ -3,10 +3,12 @@
<div class="panel"> <div class="panel">
<q-splitter <q-splitter
v-model="splitterModel" v-model="splitterModel"
:horizontal="isHorizontal"
:style="myStyle"
:limits="[50, 100]" :limits="[50, 100]"
> >
<template v-slot:before class="clMain"> <template v-slot:before>
<div> <div>
<!--{{idProjAtt}}--> <!--{{idProjAtt}}-->
<div class="divtitlecat clMain"> <div class="divtitlecat clMain">
@@ -17,7 +19,7 @@
</q-btn> </q-btn>
<div class="flex-item categorytitle shadow-4">{{descrProject | capitalize}}</div> <div :class="classTitle">{{descrProject | capitalize}}</div>
<div class="flex-item"> <div class="flex-item">
<q-btn push <q-btn push
size="sm" size="sm"
@@ -59,7 +61,7 @@
</q-list> </q-list>
</q-menu> </q-menu>
</q-item> </q-item>
<q-item v-else v-close-popup clickable :icon="field.icon" <q-item v-else v-close-popup clickable :icon="field.icon" :disable="field.disable"
@click="clickMenuProjList(field.value)"> @click="clickMenuProjList(field.value)">
<q-item-section avatar> <q-item-section avatar>
@@ -79,9 +81,9 @@
<div style="display: none">{{ prior = 0, priorcomplet = false }}</div> <div style="display: none">{{ prior = 0, priorcomplet = false }}</div>
<div> <div>
<!--<q-infinite-scroll :handler="loadMoreTodo" :offset="7">--> <!--<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" <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"> :key="myproj._id" class="myitemdrag">
<SingleProject ref="singleproject" @deleteItemproj="mydeleteitemproj(myproj._id)" <SingleProject ref="singleproject" @deleteItemproj="mydeleteitemproj(myproj._id)"
@@ -98,6 +100,20 @@
</div> </div>
<q-separator></q-separator> <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>--> <!--CanIModifyPanelPrivacy = {{CanIModifyPanelPrivacy}}<br>-->
<!--CanIModifyPanelPrivacySel = {{CanIModifyPanelPrivacySel}}<br>--> <!--CanIModifyPanelPrivacySel = {{CanIModifyPanelPrivacySel}}<br>-->
<!--CanISeeProject = {{CanISeeProject}}<br>--> <!--CanISeeProject = {{CanISeeProject}}<br>-->
@@ -113,11 +129,20 @@
</div> </div>
</template> </template>
<template v-if="(whatisSel === tools.WHAT_PROJECT) && (!!itemselproj.descr)" v-slot:after> <template v-if="(whatisSel === tools.WHAT_PROJECT) && (!!itemselproj.descr)" v-slot:after>
<!--ID = {{itemselproj._id}}--> <!--ID = {{itemselproj._id}}-->
<div class="q-pa-xs clMain"> <div class="q-pa-xs clMain">
<div class="flex-container clMain"> <div class="flex-container clMain">
<!--<q-rating-->
<!--v-model="itemselproj.favourite"-->
<!--class="flex-item flex-icon"-->
<!--size="2em"-->
<!--:max="1"-->
<!--color="primary">-->
<!--</q-rating>-->
<q-icon class="flex-item flex-icon" name="format_align_center"/> <q-icon class="flex-item flex-icon" name="format_align_center"/>
<div class="flex-item projecttitle shadow-4"> <div :class="classTitleProjSel">
{{itemselproj.descr}} {{itemselproj.descr}}
</div> </div>
</div> </div>
@@ -246,8 +271,10 @@
<q-input <q-input
ref="input4" ref="input4"
v-model="itemtodosel.descr" v-model="itemtodosel.descr"
:class="classTitleTodoSel"
:label="$t('proj.longdescr')" :label="$t('proj.longdescr')"
outlined outlined
:readonly="readonly_PanelPrivacy"
debounce="1000" debounce="1000"
autogrow> autogrow>
@@ -259,6 +286,7 @@
<q-icon class="flex-item flex-icon" name="done_outline"/> <q-icon class="flex-item flex-icon" name="done_outline"/>
<div class="flex-item itemstatus"> <div class="flex-item itemstatus">
<q-select rounded outlined v-model="itemtodosel.statustodo" :options="selectStatus" <q-select rounded outlined v-model="itemtodosel.statustodo" :options="selectStatus"
:readonly="readonly_PanelPrivacy"
:label="$t('todo.status')" emit-value map-options :label="$t('todo.status')" emit-value map-options
@input="modifyfieldtodo('statustodo')"> @input="modifyfieldtodo('statustodo')">
</q-select> </q-select>
@@ -266,6 +294,7 @@
<q-icon class="flex-item flex-icon" name="outlined_flag"/> <q-icon class="flex-item flex-icon" name="outlined_flag"/>
<div class="flex-item itemstatus"> <div class="flex-item itemstatus">
<q-select rounded outlined v-model="itemtodosel.phase" :options="selectPhase" <q-select rounded outlined v-model="itemtodosel.phase" :options="selectPhase"
:readonly="readonly_PanelPrivacy"
:label="$t('todo.phase')" emit-value map-options> :label="$t('todo.phase')" emit-value map-options>
</q-select> </q-select>
</div> </div>
@@ -275,6 +304,7 @@
<div class="flex-item itemdescr"> <div class="flex-item itemdescr">
<q-input <q-input
ref="input5" ref="input5"
:readonly="readonly_PanelPrivacy"
v-model="itemtodosel.hoursworked" v-model="itemtodosel.hoursworked"
type="number" type="number"
rounded outlined rounded outlined
@@ -288,6 +318,7 @@
<div class="flex-item itemdata content-center"> <div class="flex-item itemdata content-center">
<q-input <q-input
ref="input6" ref="input6"
:readonly="readonly_PanelPrivacy"
type="number" type="number"
v-model="itemtodosel.hoursplanned" v-model="itemtodosel.hoursplanned"
rounded outlined rounded outlined
@@ -297,6 +328,7 @@
</q-input> </q-input>
<CProgress :descr="$t('proj.progresstask')" <CProgress :descr="$t('proj.progresstask')"
:readonly="readonly_PanelPrivacy"
:progressval="itemtodosel.progress" :progressval="itemtodosel.progress"
:slider="true" @input="itemtodosel.progress = arguments[0]"></CProgress> :slider="true" @input="itemtodosel.progress = arguments[0]"></CProgress>
</div> </div>
@@ -305,6 +337,7 @@
<q-icon class="flex-item flex-icon" name="developer_mode"/> <q-icon class="flex-item flex-icon" name="developer_mode"/>
<div class="flex-item itemdata"> <div class="flex-item itemdata">
<CDate :mydate="itemtodosel.start_date" <CDate :mydate="itemtodosel.start_date"
:readonly="readonly_PanelPrivacy"
@input="itemtodosel.start_date = new Date(arguments[0])" @input="itemtodosel.start_date = new Date(arguments[0])"
:label="$t('todo.start_date')"> :label="$t('todo.start_date')">
@@ -313,7 +346,7 @@
<div style="margin: 10px;"></div> <div style="margin: 10px;"></div>
<q-icon class="flex-item flex-icon" name="event"/> <q-icon class="flex-item flex-icon" name="event"/>
<div class="flex-item itemdata"> <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" :mydate="itemtodosel.completed_at"
@input="itemtodosel.completed_at = new Date(arguments[0])" @input="itemtodosel.completed_at = new Date(arguments[0])"
:label="$t('todo.completed_at')"> :label="$t('todo.completed_at')">

View File

@@ -66,8 +66,6 @@
} }
.categorytitle{ .categorytitle{
color:blue;
background-color: lightblue;
font-size: 1.25rem; font-size: 1.25rem;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;

View File

@@ -2,6 +2,7 @@ import Vue from 'vue'
import { Component, Watch } from 'vue-property-decorator' import { Component, Watch } from 'vue-property-decorator'
import { CTodo } from '@src/components/todos/CTodo' import { CTodo } from '@src/components/todos/CTodo'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
@Component({ @Component({
components: { CTodo }, components: { CTodo },

View File

@@ -23,6 +23,7 @@
"es2015.promise", "es2015.promise",
"es2017", "es2017",
"es2017.object", "es2017.object",
"es2018",
"es7" "es7"
], ],
"baseUrl": "./src", "baseUrl": "./src",