Added begin_development and begin_test
Added status (changed completed field) fixed internet status connection.
This commit is contained in:
@@ -14,7 +14,7 @@ const baseConfig = {
|
||||
'bundle': helpers.root('/src/main.ts'),
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
filename: '[nametranslate].js',
|
||||
publicPath: '/',
|
||||
path: helpers.root('dist'),
|
||||
},
|
||||
@@ -80,10 +80,10 @@ const baseConfig = {
|
||||
}
|
||||
}, {
|
||||
test: /\.(jpe?g|png|ttf|eot|woff(2)?)(\?[a-z0-9=&.]+)?$/,
|
||||
use: 'base64-inline-loader?limit=1000&name=[name].[ext]'
|
||||
use: 'base64-inline-loader?limit=1000&nametranslate=[nametranslate].[ext]'
|
||||
},{
|
||||
test: /\.(svg)(\?[a-z0-9=&.]+)?$/,
|
||||
use: 'base64-inline-loader?limit=4000&name=[name].[ext]'
|
||||
use: 'base64-inline-loader?limit=4000&nametranslate=[nametranslate].[ext]'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
191
npm-shrinkwrap.json
generated
191
npm-shrinkwrap.json
generated
@@ -4353,9 +4353,9 @@
|
||||
}
|
||||
},
|
||||
"@vue/cli-plugin-unit-jest": {
|
||||
"version": "3.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@vue/cli-plugin-unit-jest/-/cli-plugin-unit-jest-3.5.1.tgz",
|
||||
"integrity": "sha512-VFnkM3R/Z91IWLZyKh6CLgsWaRJfhWUThkAR13q7ama8WyIFPpKAyJKM0jdsm1Gx2PnBwCm/mrjUpzK4VB0ssA==",
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@vue/cli-plugin-unit-jest/-/cli-plugin-unit-jest-3.5.3.tgz",
|
||||
"integrity": "sha512-6GRN3dhFXF8FTqvAylHA8fh+ii5+KoKPPz972j18V/MedYgm39qVSkDWD2sLKOueTX5SSVqk3QKyF6gy+Uhp7Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@vue/cli-shared-utils": "^3.5.1",
|
||||
@@ -4382,6 +4382,32 @@
|
||||
"integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=",
|
||||
"dev": true
|
||||
},
|
||||
"babel-jest": {
|
||||
"version": "23.6.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-23.6.0.tgz",
|
||||
"integrity": "sha512-lqKGG6LYXYu+DQh/slrQ8nxXQkEkhugdXsU6St7GmhVS7Ilc/22ArwqXNJrf0QaOBjZB0360qZMwXqDYQHXaew==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-plugin-istanbul": "^4.1.6",
|
||||
"babel-preset-jest": "^23.2.0"
|
||||
}
|
||||
},
|
||||
"babel-plugin-jest-hoist": {
|
||||
"version": "23.2.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz",
|
||||
"integrity": "sha1-5h+uBaHKiAGq3uV6bWa4zvr0QWc=",
|
||||
"dev": true
|
||||
},
|
||||
"babel-preset-jest": {
|
||||
"version": "23.2.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz",
|
||||
"integrity": "sha1-jsegOhOPABoaj7HoETZSvxpV2kY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-plugin-jest-hoist": "^23.2.0",
|
||||
"babel-plugin-syntax-object-rest-spread": "^6.13.0"
|
||||
}
|
||||
},
|
||||
"braces": {
|
||||
"version": "1.8.5",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
|
||||
@@ -6262,13 +6288,109 @@
|
||||
}
|
||||
},
|
||||
"babel-jest": {
|
||||
"version": "23.6.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-23.6.0.tgz",
|
||||
"integrity": "sha512-lqKGG6LYXYu+DQh/slrQ8nxXQkEkhugdXsU6St7GmhVS7Ilc/22ArwqXNJrf0QaOBjZB0360qZMwXqDYQHXaew==",
|
||||
"version": "24.5.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-24.5.0.tgz",
|
||||
"integrity": "sha512-0fKCXyRwxFTJL0UXDJiT2xYxO9Lu2vBd9n+cC+eDjESzcVG3s2DRGAxbzJX21fceB1WYoBjAh8pQ83dKcl003g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-plugin-istanbul": "^4.1.6",
|
||||
"babel-preset-jest": "^23.2.0"
|
||||
"@jest/transform": "^24.5.0",
|
||||
"@jest/types": "^24.5.0",
|
||||
"@types/babel__core": "^7.1.0",
|
||||
"babel-plugin-istanbul": "^5.1.0",
|
||||
"babel-preset-jest": "^24.3.0",
|
||||
"chalk": "^2.4.2",
|
||||
"slash": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-plugin-istanbul": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.1.tgz",
|
||||
"integrity": "sha512-RNNVv2lsHAXJQsEJ5jonQwrJVWK8AcZpG1oxhnjCUaAjL7xahYLANhPUZbzEQHjKy1NMYUwn+0NPKQc8iSY4xQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"find-up": "^3.0.0",
|
||||
"istanbul-lib-instrument": "^3.0.0",
|
||||
"test-exclude": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"istanbul-lib-coverage": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz",
|
||||
"integrity": "sha512-dKWuzRGCs4G+67VfW9pBFFz2Jpi4vSp/k7zBcJ888ofV5Mi1g5CUML5GvMvV6u9Cjybftu+E8Cgp+k0dI1E5lw==",
|
||||
"dev": true
|
||||
},
|
||||
"istanbul-lib-instrument": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.0.tgz",
|
||||
"integrity": "sha512-ooVllVGT38HIk8MxDj/OIHXSYvH+1tq/Vb38s8ixt9GoJadXska4WkGY+0wkmtYCZNYtaARniH/DixUGGLZ0uA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/generator": "^7.0.0",
|
||||
"@babel/parser": "^7.0.0",
|
||||
"@babel/template": "^7.0.0",
|
||||
"@babel/traverse": "^7.0.0",
|
||||
"@babel/types": "^7.0.0",
|
||||
"istanbul-lib-coverage": "^2.0.3",
|
||||
"semver": "^5.5.0"
|
||||
}
|
||||
},
|
||||
"load-json-file": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
|
||||
"integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
"parse-json": "^4.0.0",
|
||||
"pify": "^3.0.0",
|
||||
"strip-bom": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"pify": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
|
||||
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
|
||||
"dev": true
|
||||
},
|
||||
"read-pkg": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
|
||||
"integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"load-json-file": "^4.0.0",
|
||||
"normalize-package-data": "^2.3.2",
|
||||
"path-type": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"read-pkg-up": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz",
|
||||
"integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"find-up": "^3.0.0",
|
||||
"read-pkg": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"strip-bom": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
|
||||
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
|
||||
"dev": true
|
||||
},
|
||||
"test-exclude": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.1.0.tgz",
|
||||
"integrity": "sha512-gwf0S2fFsANC55fSeSqpb8BYk6w3FDvwZxfNjeF6FRgvFa43r+7wRiA/Q0IxoRU37wB/LE8IQ4221BsNucTaCA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arrify": "^1.0.1",
|
||||
"minimatch": "^3.0.4",
|
||||
"read-pkg-up": "^4.0.0",
|
||||
"require-main-filename": "^1.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"babel-loader": {
|
||||
@@ -6438,10 +6560,13 @@
|
||||
}
|
||||
},
|
||||
"babel-plugin-jest-hoist": {
|
||||
"version": "23.2.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz",
|
||||
"integrity": "sha1-5h+uBaHKiAGq3uV6bWa4zvr0QWc=",
|
||||
"dev": true
|
||||
"version": "24.3.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.3.0.tgz",
|
||||
"integrity": "sha512-nWh4N1mVH55Tzhx2isvUN5ebM5CDUvIpXPZYMRazQughie/EqGnbR+czzoQlhUmJG9pPJmYDRhvocotb2THl1w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/babel__traverse": "^7.0.6"
|
||||
}
|
||||
},
|
||||
"babel-plugin-syntax-object-rest-spread": {
|
||||
"version": "6.13.0",
|
||||
@@ -6505,13 +6630,13 @@
|
||||
}
|
||||
},
|
||||
"babel-preset-jest": {
|
||||
"version": "23.2.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz",
|
||||
"integrity": "sha1-jsegOhOPABoaj7HoETZSvxpV2kY=",
|
||||
"version": "24.3.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.3.0.tgz",
|
||||
"integrity": "sha512-VGTV2QYBa/Kn3WCOKdfS31j9qomaXSgJqi65B6o05/1GsJyj9LVhSljM9ro4S+IBGj/ENhNBuH9bpqzztKAQSw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-plugin-jest-hoist": "^23.2.0",
|
||||
"babel-plugin-syntax-object-rest-spread": "^6.13.0"
|
||||
"@babel/plugin-syntax-object-rest-spread": "^7.0.0",
|
||||
"babel-plugin-jest-hoist": "^24.3.0"
|
||||
}
|
||||
},
|
||||
"babel-register": {
|
||||
@@ -13341,6 +13466,32 @@
|
||||
"source-map": "^0.5.7"
|
||||
}
|
||||
},
|
||||
"babel-jest": {
|
||||
"version": "23.6.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-23.6.0.tgz",
|
||||
"integrity": "sha512-lqKGG6LYXYu+DQh/slrQ8nxXQkEkhugdXsU6St7GmhVS7Ilc/22ArwqXNJrf0QaOBjZB0360qZMwXqDYQHXaew==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-plugin-istanbul": "^4.1.6",
|
||||
"babel-preset-jest": "^23.2.0"
|
||||
}
|
||||
},
|
||||
"babel-plugin-jest-hoist": {
|
||||
"version": "23.2.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz",
|
||||
"integrity": "sha1-5h+uBaHKiAGq3uV6bWa4zvr0QWc=",
|
||||
"dev": true
|
||||
},
|
||||
"babel-preset-jest": {
|
||||
"version": "23.2.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz",
|
||||
"integrity": "sha1-jsegOhOPABoaj7HoETZSvxpV2kY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-plugin-jest-hoist": "^23.2.0",
|
||||
"babel-plugin-syntax-object-rest-spread": "^6.13.0"
|
||||
}
|
||||
},
|
||||
"braces": {
|
||||
"version": "1.8.5",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
|
||||
@@ -14337,9 +14488,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"js-beautify": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.9.0.tgz",
|
||||
"integrity": "sha512-P0skmY4IDjfLiVrx+GLDeme8w5G0R1IGXgccVU5HP2VM3lRblH7qN2LTea5vZAxrDjpZBD0Jv+ahpjwVcbz/rw==",
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.9.1.tgz",
|
||||
"integrity": "sha512-oxxvVZdOdUfzk8IOLBF2XUZvl2GoBEfA+b0of4u2EBY/46NlXasi8JdFvazA5lCrf9/lQhTjyVy2QCUW7iq0MQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"config-chain": "^1.1.12",
|
||||
|
||||
@@ -98,11 +98,11 @@
|
||||
"@vue/cli-plugin-e2e-cypress": "^3.0.1",
|
||||
"@vue/cli-plugin-pwa": "^3.0.1",
|
||||
"@vue/cli-plugin-typescript": "^3.0.1",
|
||||
"@vue/cli-plugin-unit-jest": "^3.0.1",
|
||||
"@vue/cli-plugin-unit-jest": "^3.5.3",
|
||||
"@vue/cli-service": "^3.0.1",
|
||||
"@vue/test-utils": "^1.0.0-beta.20",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"babel-jest": "^23.4.2",
|
||||
"babel-jest": "^24.5.0",
|
||||
"babel-loader": "8.0.0-beta.2",
|
||||
"babel-plugin-transform-imports": "1.5.1",
|
||||
"eslint": "^5.5.0",
|
||||
|
||||
@@ -262,12 +262,12 @@ export default class Header extends Vue {
|
||||
|
||||
function updateOnlineStatus(event) {
|
||||
if (navigator.onLine) {
|
||||
// console.log('EVENT ONLINE!')
|
||||
console.log('EVENT ONLINE!')
|
||||
// handle online status
|
||||
GlobalStore.mutations.setStateConnection('online')
|
||||
mythis.changeIconConn()
|
||||
} else {
|
||||
// console.log('EVENT OFFLINE!')
|
||||
console.log('EVENT OFFLINE!')
|
||||
// handle offline status
|
||||
GlobalStore.mutations.setStateConnection('offline')
|
||||
mythis.changeIconConn()
|
||||
|
||||
@@ -47,11 +47,11 @@
|
||||
<!--
|
||||
<div v-if="isAdmin">
|
||||
<q-btn flat dense round aria-label="">
|
||||
<q-icon :class="clCloudUpload" name="cloud_upload"></q-icon>
|
||||
<q-icon :class="clCloudUpload" nametranslate="cloud_upload"></q-icon>
|
||||
</q-btn>
|
||||
|
||||
<q-btn flat dense round aria-label="">
|
||||
<q-icon :class="clCloudUp_Indexeddb" name="arrow_upward"></q-icon>
|
||||
<q-icon :class="clCloudUp_Indexeddb" nametranslate="arrow_upward"></q-icon>
|
||||
</q-btn>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
import { UserStore } from '@modules'
|
||||
import { Projects, UserStore } from '@modules'
|
||||
import { tools } from '../../../store/Modules/tools'
|
||||
|
||||
import { IProject } from '../../../model/index'
|
||||
@@ -39,7 +39,7 @@ export default class SingleProject extends Vue {
|
||||
@Prop({ required: true }) public itemproject: IProject
|
||||
|
||||
// @Watch('itemproject.completed') valueChanged() {
|
||||
// this.watchupdate('completed')
|
||||
// this.watchupdate('status')
|
||||
// }
|
||||
|
||||
@Watch('itemproject.enableExpiring') public valueChanged4() {
|
||||
@@ -64,6 +64,12 @@ export default class SingleProject extends Vue {
|
||||
@Watch('itemproject.hoursworked') public valueChangedhoursworked() {
|
||||
this.watchupdate('hoursworked')
|
||||
}
|
||||
@Watch('itemproject.begin_development') public valueChangedbegin_development() {
|
||||
this.watchupdate('begin_development')
|
||||
}
|
||||
@Watch('itemproject.begin_test') public valueChangedbegin_test() {
|
||||
this.watchupdate('begin_test')
|
||||
}
|
||||
@Watch('itemproject.progressCalc') public valueChanged6() {
|
||||
console.log('itemproject.progressCalc')
|
||||
this.updateClasses()
|
||||
@@ -72,6 +78,10 @@ export default class SingleProject extends Vue {
|
||||
this.watchupdate('progressCalc')
|
||||
}
|
||||
|
||||
get getlabeltext() {
|
||||
return this.$t('proj.newproj')
|
||||
}
|
||||
|
||||
/*
|
||||
public dateToYYYYMMDD(date) {
|
||||
// may have timezone caveats https://stackoverflow.com/a/29774197/1850609
|
||||
@@ -93,7 +103,7 @@ export default class SingleProject extends Vue {
|
||||
}
|
||||
|
||||
public watchupdate(field = '') {
|
||||
this.$emit('eventupdate', {myitem: this.itemproject, field } )
|
||||
this.$emit('eventupdateproj', {myitem: this.itemproject, field } )
|
||||
this.updateicon()
|
||||
}
|
||||
|
||||
@@ -122,11 +132,10 @@ export default class SingleProject extends Vue {
|
||||
|
||||
this.clButtPopover = this.sel ? 'pos-item-popover comp_selected' : 'pos-item-popover'
|
||||
|
||||
if (!this.itemproject.completed) {
|
||||
if (this.itemproject.status !== tools.Status.COMPLETED) {
|
||||
this.clButtPopover += ' pos-item-popover_cursor'
|
||||
}
|
||||
|
||||
|
||||
// this.getinputdescr = 'inputdescr' + this.itemproject._id
|
||||
|
||||
// console.log('classDescrEdit = ', this.classDescrEdit)
|
||||
@@ -143,10 +152,6 @@ export default class SingleProject extends Vue {
|
||||
|
||||
}
|
||||
|
||||
public getstrDate(mytimestamp) {
|
||||
return date.formatDate(mytimestamp, 'DD-MM-YY')
|
||||
}
|
||||
|
||||
public created() {
|
||||
this.precDescr = this.itemproject.descr
|
||||
this.updateicon()
|
||||
@@ -167,7 +172,7 @@ export default class SingleProject extends Vue {
|
||||
if (!this.sel) {
|
||||
if (!this.inEdit) {
|
||||
// this.attivaEdit = true
|
||||
this.$emit('deselectAllRows', this.itemproject, true)
|
||||
this.$emit('deselectAllRowsproj', this.itemproject, true)
|
||||
|
||||
if (!this.sel) {
|
||||
this.selectRiga()
|
||||
@@ -230,9 +235,9 @@ export default class SingleProject extends Vue {
|
||||
}
|
||||
|
||||
public editProject() {
|
||||
console.log('INIZIO - editProject')
|
||||
// console.log('INIZIO - editProject')
|
||||
if (this.attivaEdit) {
|
||||
this.$emit('click')
|
||||
// this.$emit('click')
|
||||
this.precDescr = this.itemproject.descr
|
||||
this.inEdit = true
|
||||
if (!this.sel) {
|
||||
@@ -242,12 +247,12 @@ export default class SingleProject extends Vue {
|
||||
this.updateClasses()
|
||||
}
|
||||
|
||||
this.faiFocus('inputdescr')
|
||||
this.faiFocus('inputdescr', false, true)
|
||||
}
|
||||
// console.log('FINE - editProject')
|
||||
}
|
||||
|
||||
public faiFocus(elem, isparent: boolean = false) {
|
||||
public faiFocus(elem, isparent: boolean = false, select: boolean = false) {
|
||||
setTimeout(() => {
|
||||
let theField = null
|
||||
if (isparent) {
|
||||
@@ -260,10 +265,15 @@ export default class SingleProject extends Vue {
|
||||
if (!!theField) {
|
||||
theField.focus()
|
||||
}
|
||||
|
||||
// console.log('focus()')
|
||||
}, 100)
|
||||
}
|
||||
|
||||
public getFocus(e) {
|
||||
e.target.select()
|
||||
}
|
||||
|
||||
public exitEdit(singola: boolean = false) {
|
||||
if (this.inEdit) {
|
||||
if (this.precDescr !== this.itemproject.descr) {
|
||||
@@ -273,7 +283,7 @@ export default class SingleProject extends Vue {
|
||||
this.inEdit = false
|
||||
this.attivaEdit = false
|
||||
this.updateClasses()
|
||||
this.$emit('deselectAllRows', this.itemproject, false, singola)
|
||||
this.$emit('deselectAllRowsproj', this.itemproject, false, singola)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -367,19 +377,24 @@ export default class SingleProject extends Vue {
|
||||
|
||||
public setCompleted() {
|
||||
// console.log('setCompleted')
|
||||
this.itemproject.completed = !this.itemproject.completed
|
||||
|
||||
if (this.itemproject.status === tools.Status.COMPLETED) {
|
||||
this.itemproject.status = tools.Status.OPENED
|
||||
} else {
|
||||
this.itemproject.status = tools.Status.COMPLETED
|
||||
}
|
||||
|
||||
this.updateicon()
|
||||
|
||||
this.updatedata('completed')
|
||||
this.updatedata('status')
|
||||
|
||||
this.deselectAndExitEdit()
|
||||
}
|
||||
|
||||
public updatedata(field: string) {
|
||||
// const myitem = tools.jsonCopy(this.itemproject)
|
||||
console.log('calling this.$emit(eventupdate)', this.itemproject)
|
||||
this.$emit('eventupdate', { myitem: this.itemproject, field } )
|
||||
console.log('calling this.$emit(eventupdateproj)', this.itemproject)
|
||||
this.$emit('eventupdateproj', { myitem: this.itemproject, field } )
|
||||
}
|
||||
|
||||
public updateicon() {
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
v-model.trim="precDescr"
|
||||
autogrow
|
||||
borderless
|
||||
:label="getlabeltext"
|
||||
dense
|
||||
@focus="getFocus($event)"
|
||||
:class="classDescrEdit" :max-height="100"
|
||||
@keydown="keyDownArea" v-on:keydown.esc="exitEdit" @blur="exitEdit(true)" @click="editProject()"/>
|
||||
|
||||
@@ -35,13 +37,13 @@
|
||||
|
||||
|
||||
<div v-if="itemproject.enableExpiring" :class="classExpiring">
|
||||
<span class="data_string">{{getstrDate(itemproject.expiring_at)}}</span>
|
||||
<span class="data_string">{{tools.getstrDate(itemproject.expiring_at)}}</span>
|
||||
<q-icon name="event" class="cursor-pointer" style="padding: 2px;">
|
||||
<q-popup-proxy>
|
||||
<q-date v-model="itemproject.expiring_at" today-btn/>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
<!--<q-icon name="event" class="cursor-pointer" />-->
|
||||
<!--<q-icon nametranslate="event" class="cursor-pointer" />-->
|
||||
<!--<q-popup-edit v-model="itemproject.expiring_at"-->
|
||||
<!--title="Edit"-->
|
||||
<!--buttons class="">-->
|
||||
|
||||
@@ -45,7 +45,7 @@ export default class SingleTodo extends Vue {
|
||||
@Prop({ required: true }) public itemtodo: ITodo
|
||||
|
||||
// @Watch('itemtodo.completed') valueChanged() {
|
||||
// this.watchupdate('completed')
|
||||
// this.watchupdate('status')
|
||||
// }
|
||||
|
||||
@Watch('itemtodo.enableExpiring') public valueChanged4() {
|
||||
@@ -112,7 +112,7 @@ export default class SingleTodo extends Vue {
|
||||
|
||||
this.classExpiring = 'flex-item data-item shadow-1'
|
||||
this.classExpiringEx = ''
|
||||
if (this.itemtodo.completed) {
|
||||
if (this.itemtodo.status === tools.Status.COMPLETED) {
|
||||
this.percentageProgress = 100
|
||||
this.classCompleted += ' icon_completed'
|
||||
this.classDescr += ' status_completed'
|
||||
@@ -129,7 +129,7 @@ export default class SingleTodo extends Vue {
|
||||
let mycolcl = ' ' + tools.getProgressClassColor(this.itemtodo.progress)
|
||||
this.colProgress = tools.getProgressColor(this.itemtodo.progress)
|
||||
|
||||
if (this.itemtodo.completed) {
|
||||
if (this.itemtodo.status === tools.Status.COMPLETED) {
|
||||
mycolcl = ' percompleted'
|
||||
this.colProgress = 'gray'
|
||||
}
|
||||
@@ -141,7 +141,7 @@ export default class SingleTodo extends Vue {
|
||||
|
||||
this.clButtPopover = this.sel ? 'pos-item-popover comp_selected' : 'pos-item-popover'
|
||||
|
||||
if (!this.itemtodo.completed) {
|
||||
if (this.itemtodo.status !== tools.Status.COMPLETED) {
|
||||
this.clButtPopover += ' pos-item-popover_cursor'
|
||||
}
|
||||
|
||||
@@ -169,10 +169,6 @@ export default class SingleTodo extends Vue {
|
||||
|
||||
}
|
||||
|
||||
public getstrDate(mytimestamp) {
|
||||
return date.formatDate(mytimestamp, 'DD-MM-YY')
|
||||
}
|
||||
|
||||
public created() {
|
||||
this.precDescr = this.itemtodo.descr
|
||||
this.updateicon()
|
||||
@@ -192,7 +188,7 @@ export default class SingleTodo extends Vue {
|
||||
|
||||
if (!this.sel) {
|
||||
if (!this.inEdit) {
|
||||
this.$emit('deselectAllRows', this.itemtodo, true)
|
||||
this.$emit('deselectAllRowstodo', this.itemtodo, true)
|
||||
|
||||
if (!this.sel) {
|
||||
this.selectRiga()
|
||||
@@ -239,7 +235,7 @@ export default class SingleTodo extends Vue {
|
||||
}
|
||||
|
||||
public editTodo() {
|
||||
if (!this.itemtodo.completed) {
|
||||
if (this.itemtodo.status !== tools.Status.COMPLETED) {
|
||||
// console.log('INIZIO - editTodo')
|
||||
this.$emit('click')
|
||||
this.precDescr = this.itemtodo.descr
|
||||
@@ -281,7 +277,7 @@ export default class SingleTodo extends Vue {
|
||||
// console.log('exitEdit')
|
||||
this.inEdit = false
|
||||
this.updateClasses()
|
||||
this.$emit('deselectAllRows', this.itemtodo, false, singola)
|
||||
this.$emit('deselectAllRowstodo', this.itemtodo, false, singola)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -374,11 +370,15 @@ export default class SingleTodo extends Vue {
|
||||
|
||||
public setCompleted() {
|
||||
// console.log('setCompleted')
|
||||
this.itemtodo.completed = !this.itemtodo.completed
|
||||
if (this.itemtodo.status === tools.Status.COMPLETED) {
|
||||
this.itemtodo.status = tools.Status.OPENED
|
||||
} else {
|
||||
this.itemtodo.status = tools.Status.COMPLETED
|
||||
}
|
||||
|
||||
this.updateicon()
|
||||
|
||||
this.updatedata('completed')
|
||||
this.updatedata('status')
|
||||
|
||||
this.deselectAndExitEdit()
|
||||
}
|
||||
@@ -391,7 +391,7 @@ export default class SingleTodo extends Vue {
|
||||
|
||||
public updateicon() {
|
||||
// console.log('updateicon')
|
||||
if (this.itemtodo.completed) {
|
||||
if (this.itemtodo.status === tools.Status.COMPLETED) {
|
||||
this.iconCompleted = 'check_circle'
|
||||
}
|
||||
else {
|
||||
@@ -412,7 +412,7 @@ export default class SingleTodo extends Vue {
|
||||
}
|
||||
|
||||
public removeitem(id) {
|
||||
this.$emit('deleteItem', id)
|
||||
this.$emit('deleteItemtodo', id)
|
||||
}
|
||||
|
||||
public enableExpiring() {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
|
||||
<div class="flex-item donotdrag divdescrTot">
|
||||
<q-input v-if="sel && !itemtodo.completed" hide-underline type="textarea" ref="inputdescr"
|
||||
<q-input v-if="sel && itemtodo.status !== tools.Status.COMPLETED" hide-underline type="textarea" ref="inputdescr"
|
||||
v-model.trim="precDescr"
|
||||
autogrow
|
||||
borderless
|
||||
@@ -56,13 +56,13 @@
|
||||
|
||||
|
||||
<div v-if="itemtodo.enableExpiring" :class="classExpiring">
|
||||
<span class="data_string">{{getstrDate(itemtodo.expiring_at)}}</span>
|
||||
<span class="data_string">{{tools.getstrDate(itemtodo.expiring_at)}}</span>
|
||||
<q-icon name="event" class="cursor-pointer" style="padding: 2px;">
|
||||
<q-popup-proxy>
|
||||
<q-date v-model="itemtodo.expiring_at" today-btn/>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
<!--<q-icon name="event" class="cursor-pointer" />-->
|
||||
<!--<q-icon nametranslate="event" class="cursor-pointer" />-->
|
||||
<!--<q-popup-edit v-model="itemtodo.expiring_at"-->
|
||||
<!--title="Edit"-->
|
||||
<!--buttons class="">-->
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<q-checkbox v-model="itemtodo.enableExpiring"/>
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="field.value === 110">
|
||||
<q-checkbox v-model="itemtodo.completed"/>
|
||||
<q-checkbox v-model="itemtodo.status"/>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-if="(field.value === 120)" :icon="field.icon"
|
||||
|
||||
@@ -4,7 +4,7 @@ import Graphql from './graphql'
|
||||
|
||||
export default (context, error) => {
|
||||
/*
|
||||
if (error.constructor.name === 'FirebaseError') {
|
||||
if (error.constructor.nametranslate === 'FirebaseError') {
|
||||
Firebase(error)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { GlobalStore } from '../store/Modules'
|
||||
import { idbKeyval as storage } from '../js/storage.js'
|
||||
import { costanti } from '../store/Modules/costanti'
|
||||
import { ICfgData, IGlobalState } from '@src/model'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
|
||||
function saveConfigIndexDb(context) {
|
||||
|
||||
@@ -25,7 +26,7 @@ function writeConfigIndexDb(context, data) {
|
||||
}
|
||||
|
||||
async function readfromIndexDbToState(context, table) {
|
||||
console.log('*** readfromIndexDbToState ***')
|
||||
console.log('*** readfromIndexDbToState ***', table)
|
||||
|
||||
return await storage.getalldata(table)
|
||||
.then((reccat) => {
|
||||
@@ -45,30 +46,31 @@ async function readfromIndexDbToState(context, table) {
|
||||
console.log(table + ' records', records)
|
||||
// console.log('&&&&&&& readfromIndexDbToState OK: Num RECORD: ', records.length)
|
||||
|
||||
const arrinit = []
|
||||
|
||||
for (const mytodo of records) {
|
||||
const cat = mytodo.category
|
||||
const indcat = Todos.state.categories.indexOf(cat)
|
||||
if (Todos.state.todos[indcat] === undefined) {
|
||||
Todos.state.todos[indcat] = {}
|
||||
if (arrinit.indexOf(indcat) < 0) {
|
||||
Todos.state.todos[indcat] = []
|
||||
arrinit.push(indcat)
|
||||
}
|
||||
|
||||
// add to the right array
|
||||
Todos.state.todos[indcat].push(mytodo)
|
||||
|
||||
}
|
||||
|
||||
console.log('************ ARRAYS SALVATI IN MEMORIA ', records)
|
||||
console.log('************ ARRAYS SALVATI IN MEMORIA ', table, records)
|
||||
})
|
||||
|
||||
} else if (table === 'projects') {
|
||||
Projects.state.projects = []
|
||||
for (const elem of reccat) {
|
||||
Projects.state.projects.push(elem.valore)
|
||||
}
|
||||
} else {
|
||||
const arrris = tools.setArrayMainByTable(table, reccat)
|
||||
// console.log('************ ARRAYS SALVATI IN MEMORIA ', table, arrris)
|
||||
|
||||
}
|
||||
|
||||
|
||||
}).catch((error) => {
|
||||
console.log('err: ', error)
|
||||
console.log('err readfromIndexDbToState: ', error)
|
||||
})
|
||||
|
||||
}
|
||||
@@ -95,7 +97,7 @@ export default async (context, cmd, table, datakey = null, id = '') => {
|
||||
GlobalStore.state.connData.uploading_indexeddb = 1
|
||||
}
|
||||
return await storage.setdata(table, datakey)
|
||||
} else if (cmd === 'updatefromIndexedDbToStateTodo') {
|
||||
} else if (cmd === 'updatefromIndexedDbToState') {
|
||||
return await readfromIndexDbToState(context, table)
|
||||
} else if (cmd === 'readall') {
|
||||
if (GlobalStore) {
|
||||
|
||||
64
src/jquery.d.ts
vendored
64
src/jquery.d.ts
vendored
@@ -225,7 +225,7 @@ interface JQueryStatic<TElement extends Node = HTMLElement> {
|
||||
contains(container: Element, contained: Element): boolean
|
||||
css(elem: Element, unknown: any): any
|
||||
/**
|
||||
* Returns value at named data store for the element, as set by jQuery.data(element, name, value), or
|
||||
* Returns value at named data store for the element, as set by jQuery.data(element, nametranslate, value), or
|
||||
* the full data store for the element.
|
||||
*
|
||||
* @param element The DOM element to query for the data.
|
||||
@@ -246,7 +246,7 @@ interface JQueryStatic<TElement extends Node = HTMLElement> {
|
||||
*/
|
||||
data<T>(element: Element, key: string, value: T): T
|
||||
/**
|
||||
* Returns value at named data store for the element, as set by jQuery.data(element, name, value), or
|
||||
* Returns value at named data store for the element, as set by jQuery.data(element, nametranslate, value), or
|
||||
* the full data store for the element.
|
||||
*
|
||||
* @param element The DOM element to query for the data.
|
||||
@@ -260,7 +260,7 @@ interface JQueryStatic<TElement extends Node = HTMLElement> {
|
||||
* Execute the next function on the queue for the matched element.
|
||||
*
|
||||
* @param element A DOM element from which to remove and execute a queued function.
|
||||
* @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
|
||||
* @param queueName A string containing the nametranslate of the queue. Defaults to fx, the standard effects queue.
|
||||
* @see {@link https://api.jquery.com/jQuery.dequeue/}
|
||||
* @since 1.3
|
||||
*/
|
||||
@@ -695,7 +695,7 @@ interface JQueryStatic<TElement extends Node = HTMLElement> {
|
||||
/**
|
||||
* Create a serialized representation of an array, a plain object, or a jQuery object suitable for use
|
||||
* in a URL query string or Ajax request. In case a jQuery object is passed, it should contain input
|
||||
* elements with name/value properties.
|
||||
* elements with nametranslate/value properties.
|
||||
*
|
||||
* @param obj An array, a plain object, or a jQuery object to serialize.
|
||||
* @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization.
|
||||
@@ -2772,14 +2772,14 @@ interface JQueryStatic<TElement extends Node = HTMLElement> {
|
||||
|
||||
// endregion
|
||||
|
||||
// region (context, name)
|
||||
// region (context, nametranslate)
|
||||
|
||||
/**
|
||||
* Takes a function and returns a new one that will always have a particular context.
|
||||
*
|
||||
* @param context The object to which the context of the function should be set.
|
||||
* @param name The name of the function whose context will be changed (should be a property of the context object).
|
||||
* @param additionalArguments Any number of arguments to be passed to the function named in the name argument.
|
||||
* @param name The nametranslate of the function whose context will be changed (should be a property of the context object).
|
||||
* @param additionalArguments Any number of arguments to be passed to the function named in the nametranslate argument.
|
||||
* @see {@link https://api.jquery.com/jQuery.proxy/}
|
||||
* @since 1.4
|
||||
* @since 1.6
|
||||
@@ -2796,7 +2796,7 @@ interface JQueryStatic<TElement extends Node = HTMLElement> {
|
||||
* Manipulate the queue of functions to be executed on the matched element.
|
||||
*
|
||||
* @param element A DOM element where the array of queued functions is attached.
|
||||
* @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
|
||||
* @param queueName A string containing the nametranslate of the queue. Defaults to fx, the standard effects queue.
|
||||
* @param newQueue The new function to add to the queue.
|
||||
* An array of functions to replace the current queue contents.
|
||||
* @see {@link https://api.jquery.com/jQuery.queue/}
|
||||
@@ -3004,7 +3004,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
*
|
||||
* @param className One or more space-separated classes to be added to the class attribute of each matched element.
|
||||
* A function returning one or more space-separated class names to be added to the existing class
|
||||
* name(s). Receives the index position of the element in the set and the existing class name(s) as
|
||||
* nametranslate(s). Receives the index position of the element in the set and the existing class nametranslate(s) as
|
||||
* arguments. Within the function, this refers to the current element in the set.
|
||||
* @see {@link https://api.jquery.com/addClass/}
|
||||
* @since 1.0
|
||||
@@ -3159,7 +3159,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
/**
|
||||
* Set one or more attributes for the set of matched elements.
|
||||
*
|
||||
* @param attributeName The name of the attribute to set.
|
||||
* @param attributeName The nametranslate of the attribute to set.
|
||||
* @param value A value to set for the attribute. If null, the specified attribute will be removed (as in .removeAttr()).
|
||||
* A function returning the value to set. this is the current element. Receives the index position of
|
||||
* the element in the set and the old attribute value as arguments.
|
||||
@@ -3180,7 +3180,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
/**
|
||||
* Get the value of an attribute for the first element in the set of matched elements.
|
||||
*
|
||||
* @param attributeName The name of the attribute to get.
|
||||
* @param attributeName The nametranslate of the attribute to get.
|
||||
* @see {@link https://api.jquery.com/attr/}
|
||||
* @since 1.0
|
||||
*/
|
||||
@@ -3291,7 +3291,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
/**
|
||||
* Remove from the queue all items that have not yet been run.
|
||||
*
|
||||
* @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
|
||||
* @param queueName A string containing the nametranslate of the queue. Defaults to fx, the standard effects queue.
|
||||
* @see {@link https://api.jquery.com/clearQueue/}
|
||||
* @since 1.4
|
||||
*/
|
||||
@@ -3377,7 +3377,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
/**
|
||||
* Set one or more CSS properties for the set of matched elements.
|
||||
*
|
||||
* @param propertyName A CSS property name.
|
||||
* @param propertyName A CSS property nametranslate.
|
||||
* @param value A value to set for the property.
|
||||
* A function returning the value to set. this is the current element. Receives the index position of
|
||||
* the element in the set and the old value as arguments.
|
||||
@@ -3414,7 +3414,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
css(propertyNames: string[]): JQuery.PlainObject<string>
|
||||
/**
|
||||
* Return the value at the named data store for the first element in the jQuery collection, as set by
|
||||
* data(name, value) or by an HTML5 data-* attribute.
|
||||
* data(nametranslate, value) or by an HTML5 data-* attribute.
|
||||
*
|
||||
* @param key Name of the data stored.
|
||||
* @param undefined
|
||||
@@ -3441,7 +3441,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
data(obj: JQuery.PlainObject): this
|
||||
/**
|
||||
* Return the value at the named data store for the first element in the jQuery collection, as set by
|
||||
* data(name, value) or by an HTML5 data-* attribute.
|
||||
* data(nametranslate, value) or by an HTML5 data-* attribute.
|
||||
*
|
||||
* @param key Name of the data stored.
|
||||
* @see {@link https://api.jquery.com/data/}
|
||||
@@ -3450,7 +3450,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
data(key: string): any
|
||||
/**
|
||||
* Return the value at the named data store for the first element in the jQuery collection, as set by
|
||||
* data(name, value) or by an HTML5 data-* attribute.
|
||||
* data(nametranslate, value) or by an HTML5 data-* attribute.
|
||||
*
|
||||
* @see {@link https://api.jquery.com/data/}
|
||||
* @since 1.4
|
||||
@@ -3478,7 +3478,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
* Set a timer to delay execution of subsequent items in the queue.
|
||||
*
|
||||
* @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue.
|
||||
* @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
|
||||
* @param queueName A string containing the nametranslate of the queue. Defaults to fx, the standard effects queue.
|
||||
* @see {@link https://api.jquery.com/delay/}
|
||||
* @since 1.4
|
||||
*/
|
||||
@@ -3530,7 +3530,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
/**
|
||||
* Execute the next function on the queue for the matched elements.
|
||||
*
|
||||
* @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
|
||||
* @param queueName A string containing the nametranslate of the queue. Defaults to fx, the standard effects queue.
|
||||
* @see {@link https://api.jquery.com/dequeue/}
|
||||
* @since 1.2
|
||||
*/
|
||||
@@ -3731,7 +3731,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
* Stop the currently-running animation, remove all queued animations, and complete all animations for
|
||||
* the matched elements.
|
||||
*
|
||||
* @param queue The name of the queue in which to stop animations.
|
||||
* @param queue The nametranslate of the queue in which to stop animations.
|
||||
* @see {@link https://api.jquery.com/finish/}
|
||||
* @since 1.9
|
||||
*/
|
||||
@@ -3824,7 +3824,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
/**
|
||||
* Determine whether any of the matched elements are assigned the given class.
|
||||
*
|
||||
* @param className The class name to search for.
|
||||
* @param className The class nametranslate to search for.
|
||||
* @see {@link https://api.jquery.com/hasClass/}
|
||||
* @since 1.2
|
||||
*/
|
||||
@@ -4678,7 +4678,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
/**
|
||||
* Set one or more properties for the set of matched elements.
|
||||
*
|
||||
* @param propertyName The name of the property to set.
|
||||
* @param propertyName The nametranslate of the property to set.
|
||||
* @param value A function returning the value to set. Receives the index position of the element in the set and the
|
||||
* old property value as arguments. Within the function, the keyword this refers to the current element.
|
||||
* @see {@link https://api.jquery.com/prop/}
|
||||
@@ -4688,7 +4688,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
/**
|
||||
* Set one or more properties for the set of matched elements.
|
||||
*
|
||||
* @param propertyName The name of the property to set.
|
||||
* @param propertyName The nametranslate of the property to set.
|
||||
* @param value A value to set for the property.
|
||||
* @see {@link https://api.jquery.com/prop/}
|
||||
* @since 1.6
|
||||
@@ -4705,7 +4705,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
/**
|
||||
* Get the value of a property for the first element in the set of matched elements.
|
||||
*
|
||||
* @param propertyName The name of the property to get.
|
||||
* @param propertyName The nametranslate of the property to get.
|
||||
* @see {@link https://api.jquery.com/prop/}
|
||||
* @since 1.6
|
||||
*/
|
||||
@@ -4714,7 +4714,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
* Add a collection of DOM elements onto the jQuery stack.
|
||||
*
|
||||
* @param elements An array of elements to push onto the stack and make into a new jQuery object.
|
||||
* @param name The name of a jQuery method that generated the array of elements.
|
||||
* @param name The nametranslate of a jQuery method that generated the array of elements.
|
||||
* @param args The arguments that were passed in to the jQuery method (for serialization).
|
||||
* @see {@link https://api.jquery.com/pushStack/}
|
||||
* @since 1.3
|
||||
@@ -4731,7 +4731,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
/**
|
||||
* Manipulate the queue of functions to be executed, once for each matched element.
|
||||
*
|
||||
* @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
|
||||
* @param queueName A string containing the nametranslate of the queue. Defaults to fx, the standard effects queue.
|
||||
* @param newQueue The new function to add to the queue, with a function to call that will dequeue the next item.
|
||||
* An array of functions to replace the current queue contents.
|
||||
* @see {@link https://api.jquery.com/queue/}
|
||||
@@ -4750,7 +4750,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
/**
|
||||
* Show the queue of functions to be executed on the matched elements.
|
||||
*
|
||||
* @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
|
||||
* @param queueName A string containing the nametranslate of the queue. Defaults to fx, the standard effects queue.
|
||||
* @see {@link https://api.jquery.com/queue/}
|
||||
* @since 1.2
|
||||
*/
|
||||
@@ -4804,7 +4804,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
/**
|
||||
* Remove a property for the set of matched elements.
|
||||
*
|
||||
* @param propertyName The name of the property to remove.
|
||||
* @param propertyName The nametranslate of the property to remove.
|
||||
* @see {@link https://api.jquery.com/removeProp/}
|
||||
* @since 1.6
|
||||
*/
|
||||
@@ -5079,7 +5079,7 @@ interface JQuery<TElement extends Node = HTMLElement> extends Iterable<TElement>
|
||||
/**
|
||||
* Stop the currently-running animation on the matched elements.
|
||||
*
|
||||
* @param queue The name of the queue in which to stop animations.
|
||||
* @param queue The nametranslate of the queue in which to stop animations.
|
||||
* @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false.
|
||||
* @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false.
|
||||
* @see {@link https://api.jquery.com/stop/}
|
||||
@@ -5584,7 +5584,7 @@ declare namespace JQuery {
|
||||
*/
|
||||
isLocal?: boolean
|
||||
/**
|
||||
* Override the callback function name in a JSONP request. This value will be used instead of
|
||||
* Override the callback function nametranslate in a JSONP request. This value will be used instead of
|
||||
* 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would
|
||||
* result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false
|
||||
* prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for
|
||||
@@ -5594,8 +5594,8 @@ declare namespace JQuery {
|
||||
*/
|
||||
jsonp?: string | false
|
||||
/**
|
||||
* Specify the callback function name for a JSONP request. This value will be used instead of the
|
||||
* random name automatically generated by jQuery. It is preferable to let jQuery generate a unique name
|
||||
* Specify the callback function nametranslate for a JSONP request. This value will be used instead of the
|
||||
* random nametranslate automatically generated by jQuery. It is preferable to let jQuery generate a unique nametranslate
|
||||
* as it'll make it easier to manage the requests and provide callbacks and error handling. You may
|
||||
* want to specify the callback when you want to enable better browser caching of GET requests. As of
|
||||
* jQuery 1.5, you can also use a function for this setting, in which case the value of jsonpCallback
|
||||
@@ -7436,7 +7436,7 @@ declare namespace JQuery {
|
||||
/**
|
||||
* A Boolean indicating whether to place the animation in the effects queue. If false, the animation
|
||||
* will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case
|
||||
* the animation is added to the queue represented by that string. When a custom queue name is used the
|
||||
* the animation is added to the queue represented by that string. When a custom queue nametranslate is used the
|
||||
* animation does not automatically start; you must call .dequeue("queuename") to start it.
|
||||
*/
|
||||
queue?: boolean | string
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
name = String(name)
|
||||
}
|
||||
if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
|
||||
throw new TypeError('Invalid character in header field name')
|
||||
throw new TypeError('Invalid character in header field nametranslate')
|
||||
}
|
||||
return name.toLowerCase()
|
||||
}
|
||||
|
||||
@@ -19,6 +19,13 @@ export default class MenuOne extends Vue {
|
||||
return GlobalStore.getters.getmenu
|
||||
}
|
||||
|
||||
public getLabelByItem(item) {
|
||||
if (!!item.name)
|
||||
return this.$t(item.name)
|
||||
else
|
||||
return item.text
|
||||
}
|
||||
|
||||
public setParentVisibilityBasedOnRoute(parent) {
|
||||
parent.routes.forEach((item) => {
|
||||
if (this.$route.path === item.route) {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<q-expansion-item
|
||||
:header-inset-level="item.level_parent"
|
||||
:content-inset-level="item.level_parent"
|
||||
:label="$t(item.name)"
|
||||
:label="getLabelByItem(item)"
|
||||
:icon="item.materialIcon"
|
||||
expand-icon-class="my-menu-separat"
|
||||
header-class="my-menu"
|
||||
@@ -21,7 +21,7 @@
|
||||
expand-icon="map"
|
||||
active-class="my-menu-active"
|
||||
class="item item-link drawer-closer cursor-pointer my-menu"
|
||||
:label="$t(child2.name)">
|
||||
:label="getLabelByItem(child2)">
|
||||
</q-expansion-item>
|
||||
|
||||
</q-expansion-item>
|
||||
|
||||
@@ -60,7 +60,7 @@ export interface IGlobalState {
|
||||
}
|
||||
|
||||
export interface IMenuList {
|
||||
name: string
|
||||
nametranslate: string
|
||||
description: string
|
||||
idelem?: string
|
||||
icon?: string
|
||||
@@ -71,7 +71,8 @@ export interface IListRoutes {
|
||||
faIcon: string
|
||||
materialIcon: string
|
||||
name: string
|
||||
text?: string
|
||||
routes2: []
|
||||
level_parent: string
|
||||
level_child: string
|
||||
level_parent: number
|
||||
level_child: number
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface IProject {
|
||||
hoursplanned?: number
|
||||
hoursworked?: number
|
||||
priority?: number
|
||||
completed?: boolean
|
||||
status?: number
|
||||
created_at?: Date
|
||||
modify_at?: Date
|
||||
completed_at?: Date
|
||||
@@ -23,9 +23,12 @@ export interface IProject {
|
||||
pos?: number
|
||||
order?: number
|
||||
progressCalc?: number
|
||||
live_url?: string
|
||||
test_url?: string
|
||||
begin_development?: Date
|
||||
begin_test?: Date
|
||||
}
|
||||
|
||||
|
||||
export interface IParamIProject {
|
||||
categorySel?: string
|
||||
checkPending?: boolean
|
||||
|
||||
@@ -4,7 +4,7 @@ export interface ITodo {
|
||||
category?: string
|
||||
descr?: string,
|
||||
priority?: number,
|
||||
completed?: boolean,
|
||||
status?: number,
|
||||
created_at?: Date,
|
||||
modify_at?: Date,
|
||||
completed_at?: Date,
|
||||
|
||||
@@ -78,7 +78,7 @@ Router.beforeEach(async (to: IMyRoute, from: IMyRoute, next) => {
|
||||
/*
|
||||
if (to.matched[0] && to.meta.isModal) {
|
||||
console.log('Route interceptor log: <7>')
|
||||
if (!from.name) {
|
||||
if (!from.nametranslate) {
|
||||
getRouteData(to.matched[0])
|
||||
GlobalStore.mutations.setPreviousModalRoute(to.matched[0].path)
|
||||
} else {
|
||||
@@ -108,7 +108,7 @@ Router.beforeEach(async (to: IMyRoute, from: IMyRoute, next) => {
|
||||
message: `Vous n'avez pas accès à cette page`
|
||||
})
|
||||
ProgressBar.mutations.fail()
|
||||
if (from.name) {
|
||||
if (from.nametranslate) {
|
||||
return
|
||||
} else {
|
||||
next('/')
|
||||
|
||||
@@ -109,23 +109,23 @@ export const routesList: IMyRouteConfig[] = [
|
||||
{
|
||||
path: '/requestresetpwd',
|
||||
component: () => import('@/views/login/requestresetpwd.vue'),
|
||||
meta: { name: 'Reset your Password' }
|
||||
meta: { nametranslate: 'Reset your Password' }
|
||||
},
|
||||
{
|
||||
path: '/updatepwd',
|
||||
component: () => import('@/views/login/updatepassword.vue'),
|
||||
meta: { name: 'Update your Password' }
|
||||
meta: { nametranslate: 'Update your Password' }
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
path: '/simpleform',
|
||||
component: () => import('@/views/form/simpleForm/simpleForm.vue'),
|
||||
meta: { name: 'SimpleForm' }
|
||||
meta: { nametranslate: 'SimpleForm' }
|
||||
},
|
||||
{
|
||||
path: '/embeeded',
|
||||
component: () => import('@/views/form/embeeded/embeeded.vue'),
|
||||
meta: { name: 'Embeeded' }
|
||||
meta: { nametranslate: 'Embeeded' }
|
||||
}*/
|
||||
]
|
||||
|
||||
@@ -236,10 +236,13 @@ const messages = {
|
||||
},
|
||||
connection: 'Connessione',
|
||||
proj: {
|
||||
newproj: 'Titolo Progetto',
|
||||
longdescr: 'Descrizione',
|
||||
hoursplanned: 'Ore Preventivate',
|
||||
hoursadded: 'Ore Aggiuntive',
|
||||
hoursworked: 'Ore Lavorate',
|
||||
begin_development: 'Inizio Sviluppo',
|
||||
begin_test: 'Inizio Test',
|
||||
progresstask: 'Progressione Compiti'
|
||||
}
|
||||
},
|
||||
@@ -474,10 +477,13 @@ const messages = {
|
||||
},
|
||||
connection: 'Connection',
|
||||
proj: {
|
||||
newproj: 'Título Projecto',
|
||||
longdescr: 'Descripción',
|
||||
hoursplanned: 'Horas Estimadas',
|
||||
hoursadded: 'Horas Adicional',
|
||||
hoursworked: 'Horas Trabajadas',
|
||||
begin_development: 'Comienzo desarrollo',
|
||||
begin_test: 'Comienzo Prueba',
|
||||
progresstask: 'Progresion Tareas'
|
||||
}
|
||||
},
|
||||
@@ -584,7 +590,7 @@ const messages = {
|
||||
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 name of this site <strong>www.freeplanet.app</strong>.<br>' +
|
||||
'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: {
|
||||
@@ -712,10 +718,13 @@ const messages = {
|
||||
},
|
||||
connection: 'Conexión',
|
||||
proj: {
|
||||
newproj: 'Project Title',
|
||||
longdescr: 'Description',
|
||||
hoursplanned: 'Estimated Hours',
|
||||
hoursadded: 'Additional Hours',
|
||||
hoursworked: 'Worked Hours',
|
||||
begin_development: 'Start Dev',
|
||||
begin_test: 'Start Test',
|
||||
progresstask: 'Todos progression'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
name = String(name)
|
||||
}
|
||||
if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
|
||||
throw new TypeError('Invalid character in header field name')
|
||||
throw new TypeError('Invalid character in header field nametranslate')
|
||||
}
|
||||
return name.toLowerCase()
|
||||
}
|
||||
|
||||
@@ -27,8 +27,10 @@ axiosInstance.interceptors.response.use(
|
||||
if (process.env.DEBUG === '1')
|
||||
console.log('Status = ', error.response.status)
|
||||
console.log('Request Error: ', error.response)
|
||||
if (error.response.status) {
|
||||
if (error.response.status !== 0) {
|
||||
GlobalStore.mutations.setStateConnection('online')
|
||||
} else {
|
||||
GlobalStore.mutations.setStateConnection('offline')
|
||||
}
|
||||
} else {
|
||||
GlobalStore.mutations.setStateConnection('offline')
|
||||
|
||||
@@ -163,10 +163,12 @@ export namespace ApiTool {
|
||||
return globalroutines(null, 'delete', 'swmsg', null, mystrparam)
|
||||
})
|
||||
.catch((err) => {
|
||||
if (err.message === 'Failed to fetch') {
|
||||
errorfromserver = true
|
||||
if (!!err.msgerr) {
|
||||
if (err.msgerr.message.includes('Failed to fetch') || err.msgerr.message.includes('Network Error')) {
|
||||
errorfromserver = true
|
||||
}
|
||||
}
|
||||
// console.log(' [Alternative] !!!!!!!!!!!!!!! Error while sending data', err, errorfromserver, 'lettoqualcosa', lettoqualcosa)
|
||||
console.log(' [Alternative] !!!!!!!!!!!!!!! Error while sending data', err, errorfromserver, 'lettoqualcosa', lettoqualcosa)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -181,8 +183,8 @@ export namespace ApiTool {
|
||||
return (errorfromserver && !lettoqualcosa)
|
||||
})
|
||||
.then((error) => {
|
||||
// console.log('¨¨¨¨¨¨¨¨¨¨¨¨¨¨ errorfromserver:', errorfromserver)
|
||||
const mystate = error ? 'offline' : 'online'
|
||||
console.log('¨¨¨¨¨¨¨¨¨¨¨¨¨¨ errorfromserver:', errorfromserver, error)
|
||||
const mystate = (error || errorfromserver) ? 'offline' : 'online'
|
||||
GlobalStore.mutations.setStateConnection(mystate)
|
||||
GlobalStore.mutations.saveConfig( { _id: costanti.CONFIG_ID_STATE_CONN, value: mystate })
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ async function dbDeleteItem(call, item) {
|
||||
})
|
||||
.catch((error) => {
|
||||
UserStore.mutations.setErrorCatch(error)
|
||||
return UserStore.getters.getServerCode()
|
||||
return UserStore.getters.getServerCode
|
||||
})
|
||||
|
||||
return res
|
||||
@@ -188,11 +188,11 @@ export async function aftercalling(ris, checkPending: boolean, nametabindex: str
|
||||
if (ris.status === serv_constants.RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN) {
|
||||
tools.consolelogpao('UNAUTHORIZING... TOKEN EXPIRED... !! ')
|
||||
} else {
|
||||
tools.consolelogpao('NETWORK UNREACHABLE ! (Error in fetch)', UserStore.getters.getServerCode(), ris.status)
|
||||
tools.consolelogpao('NETWORK UNREACHABLE ! (Error in fetch)', UserStore.getters.getServerCode, ris.status)
|
||||
}
|
||||
if ('serviceWorker' in navigator) {
|
||||
// Read all data from IndexedDB Store into Memory
|
||||
await updatefromIndexedDbToStateTodo(nametabindex)
|
||||
await updatefromIndexedDbToState(nametabindex)
|
||||
}
|
||||
} else {
|
||||
if (ris.status === tools.OK && checkPending) {
|
||||
@@ -210,7 +210,7 @@ async function checkPendingMsg() {
|
||||
try {
|
||||
if (config) {
|
||||
if (!!config[1].stateconn) {
|
||||
// console.log('config.stateconn', config[1].stateconn)
|
||||
console.log('config.stateconn', config[1].stateconn)
|
||||
|
||||
if (config[1].stateconn !== GlobalStore.state.stateConnection) {
|
||||
GlobalStore.mutations.setStateConnection(config[1].stateconn)
|
||||
@@ -288,7 +288,7 @@ async function sendSwMsgIfAvailable() {
|
||||
}
|
||||
|
||||
async function waitAndRefreshData() {
|
||||
// #Todo++ Check if is OK
|
||||
// #Todo++ waitAndRefreshData: Check if is OK
|
||||
await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: false })
|
||||
return await Todos.actions.dbLoad({ checkPending: false })
|
||||
}
|
||||
@@ -300,6 +300,10 @@ export async function waitAndcheckPendingMsg() {
|
||||
return await checkPendingMsg()
|
||||
.then((ris) => {
|
||||
if (ris) {
|
||||
if (!GlobalStore.getters.isOnline) { // If is Offline, then check
|
||||
|
||||
}
|
||||
|
||||
// console.log('risPending = ', ris)
|
||||
return sendSwMsgIfAvailable()
|
||||
.then((something) => {
|
||||
@@ -315,10 +319,10 @@ export async function waitAndcheckPendingMsg() {
|
||||
})
|
||||
}
|
||||
|
||||
async function updatefromIndexedDbToStateTodo(nametab) {
|
||||
await globalroutines(null, 'updatefromIndexedDbToStateTodo', nametab, null)
|
||||
async function updatefromIndexedDbToState(nametab) {
|
||||
await globalroutines(null, 'updatefromIndexedDbToState', nametab, null)
|
||||
.then(() => {
|
||||
console.log('updatefromIndexedDbToStateTodo! ')
|
||||
console.log('updatefromIndexedDbToState! ')
|
||||
return true
|
||||
})
|
||||
}
|
||||
@@ -377,14 +381,14 @@ export async function table_ModifyRecord(nametable, myitem, fieldtochange) {
|
||||
|
||||
const myobjsaved = tools.jsonCopy(myitem)
|
||||
|
||||
/*
|
||||
const mymodule = tools.getModulesByTable(nametable)
|
||||
let param2 = ''
|
||||
if (nametable === 'todos') {
|
||||
param2 = myitem.category
|
||||
}
|
||||
const miorec = mymodule.getters.getRecordById(myobjsaved._id, param2)
|
||||
*/
|
||||
/*
|
||||
const mymodule = tools.getModulesByTable(nametable)
|
||||
let param2 = ''
|
||||
if (nametable === 'todos') {
|
||||
param2 = myitem.category
|
||||
}
|
||||
const miorec = mymodule.getters.getRecordById(myobjsaved._id, param2)
|
||||
*/
|
||||
|
||||
// get record from IndexedDb
|
||||
const miorec = await globalroutines(null, 'read', nametable, null, myobjsaved._id)
|
||||
@@ -396,7 +400,7 @@ export async function table_ModifyRecord(nametable, myitem, fieldtochange) {
|
||||
console.log('miorec', miorec.descr, miorec.id_prev)
|
||||
|
||||
if (nametable === 'todos') {
|
||||
if (setmodifiedIfchanged(miorec, myobjsaved, 'completed')) {
|
||||
if (setmodifiedIfchanged(miorec, myobjsaved, 'status')) {
|
||||
miorec.completed_at = new Date().getDate()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,9 +40,9 @@ const state: IGlobalState = {
|
||||
posts: [],
|
||||
menulinks: {},
|
||||
listatodo: [
|
||||
{ name: 'personal', description: 'personal' },
|
||||
{ name: 'work', description: 'work' },
|
||||
{ name: 'shopping', description: 'shopping' }
|
||||
{ nametranslate: 'personal', description: 'personal' },
|
||||
{ nametranslate: 'work', description: 'work' },
|
||||
{ nametranslate: 'shopping', description: 'shopping' }
|
||||
],
|
||||
connData: {
|
||||
uploading_server: 0,
|
||||
@@ -120,7 +120,7 @@ namespace Getters {
|
||||
faIcon: 'fa fa-list-alt',
|
||||
materialIcon: 'todo',
|
||||
name: 'pages.' + elem.description,
|
||||
route: '/todo/' + elem.name
|
||||
route: '/todo/' + elem.nametranslate
|
||||
}
|
||||
listatodo.push(item)
|
||||
|
||||
@@ -132,7 +132,8 @@ namespace Getters {
|
||||
for (const elem of arrlistaproj) {
|
||||
const item = {
|
||||
materialIcon: 'next_week',
|
||||
name: elem.description,
|
||||
name: elem.nametranslate,
|
||||
text: elem.description,
|
||||
route: '/projects/' + elem.idelem
|
||||
}
|
||||
listaprojects.push(item)
|
||||
@@ -145,14 +146,14 @@ namespace Getters {
|
||||
if (!process.env.PROD) {
|
||||
addRoute(arrroutes, { route: '/todo', faIcon: 'fa fa-list-alt', materialIcon: 'format_list_numbered', name: 'pages.Todo',
|
||||
routes2: listatodo,
|
||||
level_parent: '0.5',
|
||||
level_child: '0.5'
|
||||
level_parent: 0.5,
|
||||
level_child: 0.5
|
||||
})
|
||||
|
||||
addRoute(arrroutes,{ route: '/projects/' + tools.FIRST_PROJ, faIcon: 'fa fa-list-alt', materialIcon: 'next_week', name: 'pages.Projects',
|
||||
routes2: listaprojects,
|
||||
level_parent: '0',
|
||||
level_child: '0.5'
|
||||
level_parent: 0,
|
||||
level_child: 0.5
|
||||
})
|
||||
}
|
||||
|
||||
@@ -210,7 +211,7 @@ namespace Getters {
|
||||
},
|
||||
|
||||
get isOnline() {
|
||||
console.log('*********************** isOnline')
|
||||
// console.log('*********************** isOnline')
|
||||
return state.stateConnection === 'online'
|
||||
},
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ const state: IProjectsState = {
|
||||
visuLastCompleted: 10
|
||||
}
|
||||
|
||||
const fieldtochange: string [] = ['descr', 'longdescr', 'hoursplanned', 'hoursworked', 'id_parent', 'completed', 'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progress']
|
||||
const fieldtochange: string [] = ['descr', 'longdescr', 'hoursplanned', 'hoursworked', 'id_parent', 'status', 'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progress', 'live_url', 'test_url', 'begin_development', 'begin_test']
|
||||
|
||||
const b = storeBuilder.module<IProjectsState>('Projects', state)
|
||||
const stateGetter = b.state()
|
||||
@@ -55,19 +55,27 @@ namespace Getters {
|
||||
const obj: IProject = {
|
||||
_id: objectId(),
|
||||
descr: '',
|
||||
longdescr: '',
|
||||
id_parent: '',
|
||||
priority: tools.Priority.PRIORITY_NORMAL,
|
||||
completed: false,
|
||||
status: tools.Status.OPENED,
|
||||
created_at: new Date(),
|
||||
modify_at: new Date(),
|
||||
completed_at: new Date(),
|
||||
begin_development: new Date(0),
|
||||
begin_test: new Date(0),
|
||||
category: '',
|
||||
// expiring_at: tomorrow,
|
||||
enableExpiring: false,
|
||||
id_prev: '',
|
||||
pos: 0,
|
||||
modified: false,
|
||||
hoursworked: 0,
|
||||
hoursplanned: 0,
|
||||
live_url: '',
|
||||
test_url: '',
|
||||
progressCalc: 0
|
||||
|
||||
}
|
||||
|
||||
return obj
|
||||
@@ -75,6 +83,7 @@ namespace Getters {
|
||||
|
||||
const items_dacompletare = b.read((state: IProjectsState) => (id_parent: string): IProject[] => {
|
||||
if (state.projects) {
|
||||
// console.log('state.projects', state.projects)
|
||||
return tools.mapSort(state.projects.filter((proj) => proj.id_parent === id_parent))
|
||||
} else {
|
||||
return []
|
||||
@@ -83,10 +92,11 @@ namespace Getters {
|
||||
|
||||
const listaprojects = b.read((state: IProjectsState) => (): IMenuList[] => {
|
||||
if (state.projects) {
|
||||
// console.log('state.projects', state.projects)
|
||||
const listaproj = tools.mapSort(state.projects.filter((proj) => proj.id_parent === tools.FIRST_PROJ))
|
||||
const myarr: IMenuList[] = []
|
||||
for (const proj of listaproj) {
|
||||
myarr.push({name: proj.descr, description: proj.descr, idelem: proj._id})
|
||||
myarr.push({nametranslate: '', description: proj.descr, idelem: proj._id})
|
||||
}
|
||||
return myarr
|
||||
|
||||
@@ -150,7 +160,7 @@ namespace Getters {
|
||||
namespace Mutations {
|
||||
|
||||
function createNewItem(state: IProjectsState, { objproj, atfirst, categorySel }) {
|
||||
console.log('createNewItem', objproj, 'cat=', categorySel, 'state.projects', state.projects)
|
||||
// console.log('createNewItem', objproj, 'cat=', categorySel, 'state.projects', state.projects)
|
||||
if (state.projects === undefined) {
|
||||
state.projects = []
|
||||
state.projects.push(objproj)
|
||||
@@ -164,7 +174,7 @@ namespace Mutations {
|
||||
state.projects.push(objproj)
|
||||
}
|
||||
|
||||
console.log('state.projects', state.projects)
|
||||
// console.log('state.projects', state.projects)
|
||||
|
||||
}
|
||||
|
||||
@@ -212,7 +222,6 @@ namespace Actions {
|
||||
default: costanti.ShowTypeTask.SHOW_LAST_N_COMPLETED
|
||||
}), 10)
|
||||
|
||||
// console.log('ARRAY TODOS = ', state.projects)
|
||||
if (process.env.DEBUG === '1') {
|
||||
console.log('dbLoad', 'state.projects', state.projects)
|
||||
}
|
||||
@@ -225,7 +234,7 @@ namespace Actions {
|
||||
return error
|
||||
})
|
||||
|
||||
ApiTables.aftercalling(ris, checkPending, 'categories')
|
||||
ApiTables.aftercalling(ris, checkPending, nametable)
|
||||
}
|
||||
|
||||
async function deleteItem(context, { idobj }) {
|
||||
@@ -292,7 +301,9 @@ namespace Actions {
|
||||
}
|
||||
|
||||
// 3) send to the Server
|
||||
return await ApiTables.Sync_SaveItem(nametable, 'POST', objproj)
|
||||
await ApiTables.Sync_SaveItem(nametable, 'POST', objproj)
|
||||
|
||||
return id
|
||||
}
|
||||
|
||||
async function modify(context, { myitem, field }) {
|
||||
|
||||
@@ -27,7 +27,7 @@ const state: ITodosState = {
|
||||
visuLastCompleted: 10
|
||||
}
|
||||
|
||||
const fieldtochange: string [] = ['descr', 'completed', 'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progress']
|
||||
const fieldtochange: string [] = ['descr', 'status', 'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progress']
|
||||
|
||||
const b = storeBuilder.module<ITodosState>('Todos', state)
|
||||
const stateGetter = b.state()
|
||||
@@ -55,7 +55,7 @@ function initcat() {
|
||||
userId: UserStore.state.userId,
|
||||
descr: '',
|
||||
priority: tools.Priority.PRIORITY_NORMAL,
|
||||
completed: false,
|
||||
status: tools.Status.OPENED,
|
||||
created_at: new Date(),
|
||||
modify_at: new Date(),
|
||||
completed_at: new Date(),
|
||||
@@ -76,7 +76,7 @@ namespace Getters {
|
||||
const items_dacompletare = b.read((state: ITodosState) => (cat: string): ITodo[] => {
|
||||
const indcat = getindexbycategory(cat)
|
||||
if (state.todos[indcat]) {
|
||||
return state.todos[indcat].filter((todo) => !todo.completed)
|
||||
return state.todos[indcat].filter((todo) => todo.status !== tools.Status.COMPLETED)
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
@@ -86,10 +86,10 @@ namespace Getters {
|
||||
const indcat = getindexbycategory(cat)
|
||||
if (state.todos[indcat]) {
|
||||
if (state.showtype === costanti.ShowTypeTask.SHOW_LAST_N_COMPLETED) {
|
||||
return state.todos[indcat].filter((todo) => todo.completed).slice(0, state.visuLastCompleted)
|
||||
return state.todos[indcat].filter((todo) => todo.status === tools.Status.COMPLETED).slice(0, state.visuLastCompleted)
|
||||
} // Show only the first N completed
|
||||
else if (state.showtype === costanti.ShowTypeTask.SHOW_ALL) {
|
||||
return state.todos[indcat].filter((todo) => todo.completed)
|
||||
return state.todos[indcat].filter((todo) => todo.completed === tools.Status.COMPLETED)
|
||||
}
|
||||
else {
|
||||
return []
|
||||
@@ -226,8 +226,8 @@ namespace Actions {
|
||||
ApiTables.aftercalling(ris, checkPending, 'categories')
|
||||
}
|
||||
|
||||
async function deleteItem(context, { cat, idobj }) {
|
||||
console.log('deleteItem: KEY = ', idobj)
|
||||
async function deleteItemtodo(context, { cat, idobj }) {
|
||||
console.log('deleteItemtodo: KEY = ', idobj)
|
||||
|
||||
const myarr = gettodosByCategory(cat)
|
||||
|
||||
@@ -354,7 +354,7 @@ namespace Actions {
|
||||
export const actions = {
|
||||
dbLoad: b.dispatch(dbLoad),
|
||||
swapElems: b.dispatch(swapElems),
|
||||
deleteItem: b.dispatch(deleteItem),
|
||||
deleteItemtodo: b.dispatch(deleteItemtodo),
|
||||
dbInsert: b.dispatch(dbInsert),
|
||||
modify: b.dispatch(modify)
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ namespace Actions {
|
||||
})
|
||||
.catch((error: Types.AxiosError) => {
|
||||
UserStore.mutations.setErrorCatch(error)
|
||||
return { code: UserStore.getters.getServerCode(), msg: error.getMsgError() }
|
||||
return { code: UserStore.getters.getServerCode, msg: error.getMsgError() }
|
||||
})
|
||||
|
||||
}
|
||||
@@ -254,7 +254,7 @@ namespace Actions {
|
||||
return { code: res.data.code, msg: res.data.msg }
|
||||
}).catch((error) => {
|
||||
UserStore.mutations.setErrorCatch(error)
|
||||
return UserStore.getters.getServerCode()
|
||||
return UserStore.getters.getServerCode
|
||||
})
|
||||
|
||||
}
|
||||
@@ -280,7 +280,7 @@ namespace Actions {
|
||||
return { code: res.data.code, msg: res.data.msg }
|
||||
}).catch((error) => {
|
||||
UserStore.mutations.setErrorCatch(error)
|
||||
return UserStore.getters.getServerCode()
|
||||
return UserStore.getters.getServerCode
|
||||
})
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ namespace Actions {
|
||||
})
|
||||
.catch((error) => {
|
||||
UserStore.mutations.setErrorCatch(error)
|
||||
return UserStore.getters.getServerCode()
|
||||
return UserStore.getters.getServerCode
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -456,7 +456,7 @@ namespace Actions {
|
||||
})
|
||||
.catch((error) => {
|
||||
UserStore.mutations.setErrorCatch(error)
|
||||
return UserStore.getters.getServerCode()
|
||||
return UserStore.getters.getServerCode
|
||||
})
|
||||
}
|
||||
|
||||
@@ -484,7 +484,7 @@ namespace Actions {
|
||||
Mutations.mutations.clearAuthData()
|
||||
}).catch((error) => {
|
||||
UserStore.mutations.setErrorCatch(error)
|
||||
return UserStore.getters.getServerCode()
|
||||
return UserStore.getters.getServerCode
|
||||
})
|
||||
|
||||
return riscall
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Todos, Projects, UserStore } from '@store'
|
||||
import globalroutines from './../../globalroutines/index'
|
||||
import { costanti } from './costanti'
|
||||
import Quasar from 'quasar'
|
||||
import Quasar, { date } from 'quasar'
|
||||
import { IProject, ITodo } from '@src/model'
|
||||
import * as ApiTables from '@src/store/Modules/ApiTables'
|
||||
|
||||
@@ -21,6 +21,8 @@ export const tools = {
|
||||
DUPLICATE_EMAIL_ID: 11000,
|
||||
DUPLICATE_USERNAME_ID: 11100,
|
||||
|
||||
NUMSEC_CHECKUPDATE: 20000,
|
||||
|
||||
FIRST_PROJ: '__PROJECTS',
|
||||
|
||||
arrLangUsed: ['enUs', 'it', 'es'],
|
||||
@@ -46,6 +48,12 @@ export const tools = {
|
||||
PRIORITY_LOW: 0
|
||||
},
|
||||
|
||||
Status: {
|
||||
NONE: 0,
|
||||
OPENED: 1,
|
||||
COMPLETED: 10,
|
||||
},
|
||||
|
||||
MenuAction: {
|
||||
DELETE: 100,
|
||||
TOGGLE_EXPIRING: 101,
|
||||
@@ -53,7 +61,8 @@ export const tools = {
|
||||
PROGRESS_BAR: 120,
|
||||
PRIORITY: 130,
|
||||
SHOW_TASK: 150,
|
||||
EDIT: 160
|
||||
EDIT: 160,
|
||||
ADD_PROJECT: 200
|
||||
},
|
||||
|
||||
selectPriority: {
|
||||
@@ -350,6 +359,12 @@ export const tools = {
|
||||
|
||||
menuPopupConfigProject: {
|
||||
it: [
|
||||
{
|
||||
id: 5,
|
||||
label: 'Nuovo Progetto',
|
||||
value: 200, // ADD_PROJECT
|
||||
icon: 'next_week'
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
label: 'Mostra Task',
|
||||
@@ -358,6 +373,12 @@ export const tools = {
|
||||
}
|
||||
],
|
||||
es: [
|
||||
{
|
||||
id: 5,
|
||||
label: 'Nuevo Projecto',
|
||||
value: 200, // ADD_PROJECT
|
||||
icon: 'next_week'
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
label: 'Mostrar Tareas',
|
||||
@@ -366,6 +387,12 @@ export const tools = {
|
||||
}
|
||||
],
|
||||
enUs: [
|
||||
{
|
||||
id: 5,
|
||||
label: 'New Project',
|
||||
value: 200, // ADD_PROJECT
|
||||
icon: 'next_week'
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
label: 'Show Task',
|
||||
@@ -555,7 +582,7 @@ export const tools = {
|
||||
// tools.notifyarraychanged(myarr)
|
||||
// myarr[indelemchange].modified = true
|
||||
// console.log('update_idprev Index=', indelemchange, 'indtoget', indelemId, tools.getstrelem(myarr[indelemchange]))
|
||||
console.log(' MODIFICATO! ', myarr[indelemchange].descr , ' PRIMA:', myarr[indelemchange].id_prev, 'DOPO: ', id_prev)
|
||||
console.log(' MODIFICATO! ', myarr[indelemchange].descr, ' PRIMA:', myarr[indelemchange].id_prev, 'DOPO: ', id_prev)
|
||||
myarr[indelemchange].id_prev = id_prev
|
||||
return myarr[indelemchange]
|
||||
}
|
||||
@@ -703,6 +730,20 @@ export const tools = {
|
||||
}
|
||||
},
|
||||
|
||||
setArrayMainByTable(nametable, myarr) {
|
||||
if (nametable === 'todos') {
|
||||
Todos.state.todos = tools.jsonCopy(myarr)
|
||||
return Todos.state.todos
|
||||
} else if (nametable === 'projects') {
|
||||
Projects.state.projects = tools.jsonCopy(myarr)
|
||||
return Projects.state.projects
|
||||
}
|
||||
},
|
||||
|
||||
getmyid(id) {
|
||||
return 'row' + id
|
||||
},
|
||||
|
||||
getLastListNotCompleted(nametable, cat) {
|
||||
const module = tools.getModulesByTable(nametable)
|
||||
const arr = module.getters.items_dacompletare(cat)
|
||||
@@ -937,6 +978,11 @@ export const tools = {
|
||||
} else {
|
||||
return 'red'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getstrDate(mytimestamp) {
|
||||
return date.formatDate(mytimestamp, 'DD-MM-YY')
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
||||
8
src/typings/libs/vuelidate.d.ts
vendored
8
src/typings/libs/vuelidate.d.ts
vendored
@@ -85,7 +85,7 @@ declare module 'vuelidate' {
|
||||
*/
|
||||
required?: boolean
|
||||
/**
|
||||
* Checks for equality with a given property. Locator might be either a sibling property name or a function, that will get your component as this and nested model which sibling properties under second parameter.
|
||||
* Checks for equality with a given property. Locator might be either a sibling property nametranslate or a function, that will get your component as this and nested model which sibling properties under second parameter.
|
||||
*/
|
||||
sameAs?: boolean
|
||||
/**
|
||||
@@ -155,7 +155,7 @@ declare module 'vuelidate' {
|
||||
/**
|
||||
* Represents Vuelidate mixin data extending a Vue component instance. Have your Vue component options implement this
|
||||
* @param {Type} T - The interface or type being used to store model data requiring validation
|
||||
*
|
||||
*
|
||||
* @example
|
||||
* export class Foo implements IVuelidate<IBar> {
|
||||
* data() {
|
||||
@@ -231,7 +231,7 @@ declare module 'vuelidate/lib/validators' {
|
||||
*/
|
||||
function required(value: any): boolean
|
||||
/**
|
||||
* Checks for equality with a given property. Locator might be either a sibling property name or a function, that will get your component as this and nested model which sibling properties under second parameter.
|
||||
* Checks for equality with a given property. Locator might be either a sibling property nametranslate or a function, that will get your component as this and nested model which sibling properties under second parameter.
|
||||
*/
|
||||
function sameAs(locator: any): (value: any, vm?: any) => boolean
|
||||
/**
|
||||
@@ -247,4 +247,4 @@ declare module 'vuelidate/lib/validators' {
|
||||
function minValue(value: number)
|
||||
function maxValue(value: number)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
|
||||
<q-tr slot="body" slot-scope="props" :props="props">
|
||||
<q-td key="desc" :props="props">
|
||||
{{ props.row.name }}
|
||||
<q-popup-edit v-model="props.row.name">
|
||||
{{ props.row.nametranslate }}
|
||||
<q-popup-edit v-model="props.row.nametranslate">
|
||||
<q-field count>
|
||||
<q-input v-model="props.row.name" />
|
||||
<q-input v-model="props.row.nametranslate" />
|
||||
</q-field>
|
||||
</q-popup-edit>
|
||||
</q-td>
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
|
||||
<q-tr slot="body" slot-scope="props" :props="props">
|
||||
<q-td key="desc" :props="props">
|
||||
{{ props.row.name }}
|
||||
<q-popup-edit v-model="props.row.name">
|
||||
{{ props.row.nametranslate }}
|
||||
<q-popup-edit v-model="props.row.nametranslate">
|
||||
<q-field count>
|
||||
<q-input v-model="props.row.name" />
|
||||
<q-input v-model="props.row.nametranslate" />
|
||||
</q-field>
|
||||
</q-popup-edit>
|
||||
</q-td>
|
||||
|
||||
@@ -90,6 +90,12 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.itemdata{
|
||||
font-size: 1rem;
|
||||
flex: 1;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.progress-item {
|
||||
margin: 1px;
|
||||
padding: 2px;
|
||||
|
||||
@@ -48,7 +48,7 @@ export default class ProjList extends Vue {
|
||||
public percProgress: string = 'percProgress'
|
||||
|
||||
public $refs: {
|
||||
single: SingleProject[]
|
||||
singleproject: SingleProject[]
|
||||
}
|
||||
|
||||
get getrouteup() {
|
||||
@@ -102,15 +102,11 @@ export default class ProjList extends Vue {
|
||||
this.updateclasses()
|
||||
}
|
||||
|
||||
public getmyid(id) {
|
||||
return 'row' + id
|
||||
}
|
||||
|
||||
public showTask(field_value) {
|
||||
return field_value === tools.MenuAction.SHOW_TASK
|
||||
}
|
||||
|
||||
public async onEnd2(itemdragend) {
|
||||
public async onEndproj(itemdragend) {
|
||||
await Projects.actions.swapElems(itemdragend)
|
||||
}
|
||||
|
||||
@@ -130,7 +126,7 @@ export default class ProjList extends Vue {
|
||||
}
|
||||
|
||||
// console.log('args', args, itemdragend)
|
||||
this.onEnd2(itemdragend)
|
||||
this.onEndproj(itemdragend)
|
||||
})
|
||||
|
||||
$service.eventBus.$on('drag', (el, source) => {
|
||||
@@ -178,37 +174,60 @@ export default class ProjList extends Vue {
|
||||
public checkUpdate_everytime() {
|
||||
this.polling = setInterval(() => {
|
||||
this.checkUpdate()
|
||||
}, 60000)
|
||||
}, tools.NUMSEC_CHECKUPDATE)
|
||||
}
|
||||
|
||||
public beforeDestroy() {
|
||||
clearInterval(this.polling)
|
||||
}
|
||||
|
||||
public mydeleteItem(idobj: string) {
|
||||
// console.log('mydeleteItem', idobj)
|
||||
public mydeleteitemproj(idobj: string) {
|
||||
// console.log('mydeleteitemtodo', idobj)
|
||||
return Projects.actions.deleteItem({ idobj })
|
||||
}
|
||||
|
||||
public dbInsert(atfirst: boolean = false) {
|
||||
let descr = this.projbottom.trim()
|
||||
public dbInsert() {
|
||||
const descr = this.projbottom.trim()
|
||||
|
||||
if (descr === '') {
|
||||
return
|
||||
this.projbottom = ''
|
||||
|
||||
return this.addProject(descr)
|
||||
}
|
||||
|
||||
public async clickMenuProjList(action) {
|
||||
console.log('clickMenuProjList: ', action)
|
||||
if (action === tools.MenuAction.ADD_PROJECT) {
|
||||
const idnewelem = await this.addProject('')
|
||||
// get element by id
|
||||
const elem = this.getCompProjectById(idnewelem)
|
||||
// @ts-ignore
|
||||
elem.activeEdit()
|
||||
// console.log('idnewelem', idnewelem, 'Elem Trovato', elem)
|
||||
}
|
||||
}
|
||||
|
||||
public getCompProjectById(id): SingleProject {
|
||||
console.log('this.$refs.singleproject', this.$refs.singleproject)
|
||||
for (const elem of this.$refs.singleproject) {
|
||||
// @ts-ignore
|
||||
if (elem.itemproject._id === id)
|
||||
return elem
|
||||
}
|
||||
}
|
||||
|
||||
// const descr = this.$t('project.newproj').toString()
|
||||
|
||||
public async addProject(descr) {
|
||||
const myobj: IProject = {
|
||||
descr,
|
||||
id_parent: this.idProjAtt
|
||||
}
|
||||
|
||||
if (!tools.checkIfUserExist(this)) {
|
||||
return
|
||||
}
|
||||
|
||||
const myobj: IProject = {
|
||||
descr,
|
||||
id_parent: this.idProjAtt
|
||||
}
|
||||
|
||||
this.projbottom = ''
|
||||
|
||||
return Projects.actions.dbInsert({ myobj, atfirst })
|
||||
return await Projects.actions.dbInsert({ myobj, atfirst: false })
|
||||
}
|
||||
|
||||
public setidsel(id: string) {
|
||||
@@ -216,8 +235,8 @@ export default class ProjList extends Vue {
|
||||
this.itemsel = Projects.getters.getRecordById(this.idsel)
|
||||
}
|
||||
|
||||
public async updateitem({ myitem, field }) {
|
||||
console.log('calling MODIFY updateitem', myitem, field)
|
||||
public async updateitemproj({ myitem, field }) {
|
||||
console.log('calling MODIFY updateitemproj', myitem, field)
|
||||
|
||||
const itemdragend: IDrag = {
|
||||
id_proj: this.idProjAtt,
|
||||
@@ -232,12 +251,12 @@ export default class ProjList extends Vue {
|
||||
|
||||
}
|
||||
|
||||
public deselectAllRows(item: IProject, check, onlythis: boolean = false) {
|
||||
// console.log('deselectAllRows : ', item)
|
||||
public deselectAllRowsproj(item: IProject, check, onlythis: boolean = false) {
|
||||
// console.log('deselectAllRowsproj : ', item)
|
||||
|
||||
for (let i = 0; i < this.$refs.single.length; i++) {
|
||||
for (let i = 0; i < this.$refs.singleproject.length; i++) {
|
||||
|
||||
const contr = this.$refs.single[i] as SingleProject
|
||||
const contr = this.$refs.singleproject[i] as SingleProject
|
||||
// @ts-ignore
|
||||
const id = contr.itemproject._id
|
||||
// Don't deselect the actual clicked!
|
||||
@@ -271,6 +290,8 @@ export default class ProjList extends Vue {
|
||||
}
|
||||
|
||||
get getCalcHoursWorked() {
|
||||
if (this.itemsel.hoursplanned <= 0)
|
||||
return 0
|
||||
let myperc = Math.round(this.itemsel.hoursworked / this.itemsel.hoursplanned * 100)
|
||||
|
||||
return myperc
|
||||
|
||||
@@ -21,22 +21,20 @@
|
||||
icon="settings">
|
||||
<q-menu id="popconfig" self="top right">
|
||||
<q-list link separator no-border class="todo-menu">
|
||||
<q-item clickable v-for="field in menuPopupConfigProject"
|
||||
:key="field.value">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="field.icon"/>
|
||||
</q-item-section>
|
||||
<div v-for="field in menuPopupConfigProject" :key="field.value">
|
||||
<q-item clickable v-if="(field.value === 150)">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="field.icon"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>{{field.label}}</q-item-section>
|
||||
|
||||
<q-item-section side v-if="showTask(field.value)">
|
||||
<q-item-section>{{field.label}}</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-icon name="keyboard_arrow_right"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-menu auto-close anchor="bottom middle" self="top middle">
|
||||
<q-list dense>
|
||||
<q-item side :icon="field.icon">
|
||||
<q-item side clickable :icon="field.icon">
|
||||
|
||||
<q-item-section>
|
||||
<q-list dense>
|
||||
@@ -45,8 +43,7 @@
|
||||
:key="opt.value"
|
||||
@click="showtype = opt.value">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="opt.icon"
|
||||
inverted
|
||||
<q-icon :name="opt.icon" inverted
|
||||
color="primary"/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
@@ -58,8 +55,17 @@
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-item>
|
||||
<q-item v-else v-close-popup clickable :icon="field.icon"
|
||||
@click="clickMenuProjList(field.value)">
|
||||
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="field.icon"/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>{{field.label}}</q-item-section>
|
||||
</q-item>
|
||||
</div>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
@@ -71,15 +77,17 @@
|
||||
<div>
|
||||
<!--<q-infinite-scroll :handler="loadMoreTodo" :offset="7">-->
|
||||
<div class="container" v-dragula="items_dacompletare(idProjAtt)" drake="second">
|
||||
<div :id="getmyid(myproj._id)" :index="index"
|
||||
<div :id="tools.getmyid(myproj._id)" :index="index"
|
||||
v-for="(myproj, index) in items_dacompletare(idProjAtt)"
|
||||
:key="myproj._id" class="myitemdrag">
|
||||
|
||||
<SingleProject ref="single" @deleteItem="mydeleteItem(myproj._id)"
|
||||
@eventupdate="updateitem"
|
||||
<SingleProject ref="singleproject" @deleteItemproj="mydeleteitemproj(myproj._id)"
|
||||
@eventupdateproj="updateitemproj"
|
||||
@idsel="setidsel"
|
||||
@deselectAllRows="deselectAllRows" @onEnd="onEnd2"
|
||||
:itemproject='myproj'/>
|
||||
@deselectAllRowsproj="deselectAllRowsproj" @onEnd="onEndproj"
|
||||
:itemproject='myproj'>
|
||||
|
||||
</SingleProject>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -91,7 +99,9 @@
|
||||
color="blue-12"
|
||||
:label="$t('todo.insertbottom')"
|
||||
:after="[{icon: 'arrow_forward', content: true, handler () {}}]"
|
||||
v-on:keyup.enter="dbInsert(false)"/>
|
||||
v-on:keyup.enter="dbInsert()">
|
||||
|
||||
</q-input>
|
||||
|
||||
<br>
|
||||
</div>
|
||||
@@ -135,7 +145,7 @@
|
||||
|
||||
</div>
|
||||
<q-icon class="flex-item flex-icon" name="watch_later"/>
|
||||
<div class="flex-item itemdescr content-center">
|
||||
<div class="flex-item itemdata content-center">
|
||||
<q-input
|
||||
ref="input"
|
||||
type="number"
|
||||
@@ -144,7 +154,32 @@
|
||||
:label="$t('proj.hoursplanned')"
|
||||
debounce="500"
|
||||
/>
|
||||
<CProgress :descr="$t('proj.progresstask')" :progressval="itemsel.progressCalc"></CProgress>
|
||||
<CProgress :descr="$t('proj.progresstask')"
|
||||
:progressval="itemsel.progressCalc"></CProgress>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-container clMain">
|
||||
<div style="margin: 10px;"></div>
|
||||
<div class="flex-item itemdata">
|
||||
<q-input v-model="itemsel.begin_development" mask="date" :hint="$t('proj.begin_development')">
|
||||
<!--<span class="data_string">{{tools.getstrDate(itemsel.begin_development)}}</span>-->
|
||||
<q-icon name="event" class="cursor-pointer">
|
||||
<q-popup-proxy>
|
||||
<q-date v-model="itemsel.begin_development" today-btn/>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</q-input>
|
||||
</div>
|
||||
<div style="margin: 10px;"></div>
|
||||
<div class="flex-item itemdata">
|
||||
<q-input v-model="itemsel.begin_test" mask="date" :hint="$t('proj.begin_test')">
|
||||
<!--<span class="data_string">{{tools.getstrDate(itemsel.begin_development)}}</span>-->
|
||||
<q-icon name="event" class="cursor-pointer">
|
||||
<q-popup-proxy>
|
||||
<q-date v-model="itemsel.begin_test" today-btn/>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</q-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -81,15 +81,11 @@ export default class Todo extends Vue {
|
||||
this.categoryAtt = this.$route.params.category
|
||||
}
|
||||
|
||||
public getmyid(id) {
|
||||
return 'row' + id
|
||||
}
|
||||
|
||||
public showTask(field_value) {
|
||||
return field_value === tools.MenuAction.SHOW_TASK
|
||||
}
|
||||
|
||||
public async onEnd(itemdragend) {
|
||||
public async onEndtodo(itemdragend) {
|
||||
await Todos.actions.swapElems(itemdragend)
|
||||
}
|
||||
|
||||
@@ -105,7 +101,7 @@ export default class Todo extends Vue {
|
||||
oldIndex: this.getElementOldIndex(args.el)
|
||||
}
|
||||
|
||||
this.onEnd(itemdragend)
|
||||
this.onEndtodo(itemdragend)
|
||||
})
|
||||
|
||||
$service.eventBus.$on('drag', (el, source) => {
|
||||
@@ -138,19 +134,19 @@ export default class Todo extends Vue {
|
||||
public checkUpdate_everytime() {
|
||||
this.polling = setInterval(() => {
|
||||
this.checkUpdate()
|
||||
}, 60000)
|
||||
}, tools.NUMSEC_CHECKUPDATE)
|
||||
}
|
||||
|
||||
public beforeDestroy() {
|
||||
clearInterval(this.polling)
|
||||
}
|
||||
|
||||
public mydeleteItem(idobj: string) {
|
||||
// console.log('mydeleteItem', idobj)
|
||||
return Todos.actions.deleteItem({ cat: this.categoryAtt, idobj })
|
||||
public mydeleteitemtodo(idobj: string) {
|
||||
// console.log('mydeleteitemtodo', idobj)
|
||||
return Todos.actions.deleteItemtodo({ cat: this.categoryAtt, idobj })
|
||||
}
|
||||
|
||||
public dbInsert(atfirst: boolean = false) {
|
||||
public async dbInsert(atfirst: boolean = false) {
|
||||
let descr = this.todobottom.trim()
|
||||
if (atfirst) {
|
||||
descr = this.todotop.trim()
|
||||
@@ -177,11 +173,11 @@ export default class Todo extends Vue {
|
||||
this.todobottom = ''
|
||||
}
|
||||
|
||||
return Todos.actions.dbInsert({ myobj, atfirst })
|
||||
return await Todos.actions.dbInsert({ myobj, atfirst })
|
||||
}
|
||||
|
||||
public async updateitem({ myitem, field }) {
|
||||
console.log('calling MODIFY updateitem', myitem, field)
|
||||
public async updateitemtodo({ myitem, field }) {
|
||||
console.log('calling MODIFY updateitemtodo', myitem, field)
|
||||
|
||||
const itemdragend: IDrag = {
|
||||
category: this.categoryAtt,
|
||||
@@ -197,8 +193,8 @@ export default class Todo extends Vue {
|
||||
|
||||
}
|
||||
|
||||
public deselectAllRows(item: ITodo, check, onlythis: boolean = false) {
|
||||
// console.log('deselectAllRows : ', item)
|
||||
public deselectAllRowstodo(item: ITodo, check, onlythis: boolean = false) {
|
||||
// console.log('deselectAllRowstodo : ', item)
|
||||
|
||||
for (let i = 0; i < this.$refs.single.length; i++) {
|
||||
|
||||
|
||||
@@ -65,21 +65,21 @@
|
||||
<div>
|
||||
<!--<q-infinite-scroll :handler="loadMoreTodo" :offset="7">-->
|
||||
<div class="container" v-dragula="items_dacompletare(categoryAtt)" :drake="dragname">
|
||||
<div :id="getmyid(mytodo._id)" :index="index"
|
||||
<div :id="tools.getmyid(mytodo._id)" :index="index"
|
||||
v-for="(mytodo, index) in items_dacompletare(categoryAtt)"
|
||||
:key="mytodo._id" class="myitemdrag">
|
||||
|
||||
<div v-if="(prior !== mytodo.priority) && !mytodo.completed"
|
||||
<div v-if="(prior !== mytodo.priority) && mytodo.status !== tools.Status.COMPLETED"
|
||||
:class="tools.getTitlePriority(mytodo.priority)">
|
||||
<label>{{tools.getPriorityByInd(mytodo.priority)}}</label>
|
||||
</div>
|
||||
<SingleTodo ref="single" @deleteItem="mydeleteItem(mytodo._id)" @eventupdate="updateitem"
|
||||
@deselectAllRows="deselectAllRows" @onEnd="onEnd"
|
||||
<SingleTodo ref="single" @deleteItemtodo="mydeleteitemtodo(mytodo._id)" @eventupdate="updateitemtodo"
|
||||
@deselectAllRowstodo="deselectAllRowstodo" @onEnd="onEndtodo"
|
||||
:itemtodo='mytodo'/>
|
||||
|
||||
<!--<div :name="`REF${index}`" class="divdrag non-draggato"></div>-->
|
||||
<!--<div :nametranslate="`REF${index}`" class="divdrag non-draggato"></div>-->
|
||||
|
||||
<div style="display: none">{{ prior = mytodo.priority, priorcomplet = mytodo.completed }}
|
||||
<div style="display: none">{{ prior = mytodo.priority, priorcomplet = (mytodo.status === tools.Status.COMPLETED) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -91,17 +91,17 @@
|
||||
|
||||
<!--<q-infinite-scroll :handler="loadMoreTodo" :offset="7">-->
|
||||
<div class="container">
|
||||
<div :id="getmyid(mytodo._id)" :index="index"
|
||||
<div :id="tools.getmyid(mytodo._id)" :index="index"
|
||||
v-for="(mytodo, index) in todos_completati(categoryAtt)"
|
||||
:key="mytodo._id" class="myitemdrag">
|
||||
|
||||
<SingleTodo ref="single" @deleteItem="mydeleteItem(mytodo._id)" @eventupdate="updateitem"
|
||||
@deselectAllRows="deselectAllRows" @onEnd="onEnd"
|
||||
<SingleTodo ref="single" @deleteItemtodo="mydeleteItemtodo(mytodo._id)" @eventupdate="updateitemtodo"
|
||||
@deselectAllRows="deselectAllRowstodo" @onEndtodo="onEndtodo"
|
||||
:itemtodo='mytodo'/>
|
||||
|
||||
<!--<div :name="`REF${index}`" class="divdrag non-draggato"></div>-->
|
||||
<!--<div :nametranslate="`REF${index}`" class="divdrag non-draggato"></div>-->
|
||||
|
||||
<div style="display: none">{{ prior = mytodo.priority, priorcomplet = mytodo.completed }}
|
||||
<div style="display: none">{{ prior = mytodo.priority, priorcomplet = (mytodo.status === tools.Status.COMPLETED) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// "no-restricted-syntax": [
|
||||
// "error",
|
||||
// {
|
||||
// "selector": "CallExpression[callee.object.name='console'][callee.property.name!=/^(log|warn|error|info|trace)$/]",
|
||||
// "selector": "CallExpression[callee.object.nametranslate='console'][callee.property.nametranslate!=/^(log|warn|error|info|trace)$/]",
|
||||
// "message": "Unexpected property on console object was called"
|
||||
// }
|
||||
// ],
|
||||
|
||||
Reference in New Issue
Block a user