Merge branch 'develop' into feature/drinkList

This commit is contained in:
Tim Gröger 2020-08-28 11:01:10 +02:00
commit affaa639d8
19 changed files with 208 additions and 157 deletions

166
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "newgruecht-vue", "name": "newgruecht-vue",
"version": "0.1.0", "version": "1.1.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -2233,14 +2233,15 @@
} }
}, },
"asn1.js": { "asn1.js": {
"version": "4.10.1", "version": "5.4.1",
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz",
"integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==",
"dev": true, "dev": true,
"requires": { "requires": {
"bn.js": "^4.0.0", "bn.js": "^4.0.0",
"inherits": "^2.0.1", "inherits": "^2.0.1",
"minimalistic-assert": "^1.0.0" "minimalistic-assert": "^1.0.0",
"safer-buffer": "^2.1.0"
}, },
"dependencies": { "dependencies": {
"bn.js": { "bn.js": {
@ -2561,9 +2562,9 @@
"dev": true "dev": true
}, },
"bn.js": { "bn.js": {
"version": "5.1.2", "version": "5.1.3",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.2.tgz", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz",
"integrity": "sha512-40rZaf3bUNKTVYu9sIeeEGOg7g14Yvnj9kH7b50EiwX0Q7A6umbvfI5tvHaOERH0XigqKkfLkFQxzb4e6CIXnA==", "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==",
"dev": true "dev": true
}, },
"body-parser": { "body-parser": {
@ -2736,16 +2737,16 @@
} }
}, },
"browserify-sign": { "browserify-sign": {
"version": "4.2.0", "version": "4.2.1",
"resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.0.tgz", "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz",
"integrity": "sha512-hEZC1KEeYuoHRqhGhTy6gWrpJA3ZDjFWv0DE61643ZnOXAKJb3u7yWcrU0mMc9SwAqK1n7myPGndkp0dFG7NFA==", "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==",
"dev": true, "dev": true,
"requires": { "requires": {
"bn.js": "^5.1.1", "bn.js": "^5.1.1",
"browserify-rsa": "^4.0.1", "browserify-rsa": "^4.0.1",
"create-hash": "^1.2.0", "create-hash": "^1.2.0",
"create-hmac": "^1.1.7", "create-hmac": "^1.1.7",
"elliptic": "^6.5.2", "elliptic": "^6.5.3",
"inherits": "^2.0.4", "inherits": "^2.0.4",
"parse-asn1": "^5.1.5", "parse-asn1": "^5.1.5",
"readable-stream": "^3.6.0", "readable-stream": "^3.6.0",
@ -3748,13 +3749,13 @@
} }
}, },
"create-ecdh": { "create-ecdh": {
"version": "4.0.3", "version": "4.0.4",
"resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz",
"integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==",
"dev": true, "dev": true,
"requires": { "requires": {
"bn.js": "^4.1.0", "bn.js": "^4.1.0",
"elliptic": "^6.0.0" "elliptic": "^6.5.3"
}, },
"dependencies": { "dependencies": {
"bn.js": { "bn.js": {
@ -4591,9 +4592,9 @@
} }
}, },
"enhanced-resolve": { "enhanced-resolve": {
"version": "4.1.1", "version": "4.3.0",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.3.0.tgz",
"integrity": "sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA==", "integrity": "sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"graceful-fs": "^4.1.2", "graceful-fs": "^4.1.2",
@ -4896,9 +4897,9 @@
"dev": true "dev": true
}, },
"events": { "events": {
"version": "3.1.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz", "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz",
"integrity": "sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg==", "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==",
"dev": true "dev": true
}, },
"eventsource": { "eventsource": {
@ -7818,14 +7819,13 @@
} }
}, },
"parse-asn1": { "parse-asn1": {
"version": "5.1.5", "version": "5.1.6",
"resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz",
"integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==",
"dev": true, "dev": true,
"requires": { "requires": {
"asn1.js": "^4.0.0", "asn1.js": "^5.2.0",
"browserify-aes": "^1.0.0", "browserify-aes": "^1.0.0",
"create-hash": "^1.1.0",
"evp_bytestokey": "^1.0.0", "evp_bytestokey": "^1.0.0",
"pbkdf2": "^3.0.3", "pbkdf2": "^3.0.3",
"safe-buffer": "^5.1.1" "safe-buffer": "^5.1.1"
@ -7936,9 +7936,9 @@
} }
}, },
"pbkdf2": { "pbkdf2": {
"version": "3.0.17", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz",
"integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==",
"dev": true, "dev": true,
"requires": { "requires": {
"create-hash": "^1.1.2", "create-hash": "^1.1.2",
@ -10334,16 +10334,16 @@
} }
}, },
"terser-webpack-plugin": { "terser-webpack-plugin": {
"version": "1.4.3", "version": "1.4.5",
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz",
"integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==", "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==",
"dev": true, "dev": true,
"requires": { "requires": {
"cacache": "^12.0.2", "cacache": "^12.0.2",
"find-cache-dir": "^2.1.0", "find-cache-dir": "^2.1.0",
"is-wsl": "^1.1.0", "is-wsl": "^1.1.0",
"schema-utils": "^1.0.0", "schema-utils": "^1.0.0",
"serialize-javascript": "^2.1.2", "serialize-javascript": "^4.0.0",
"source-map": "^0.6.1", "source-map": "^0.6.1",
"terser": "^4.1.2", "terser": "^4.1.2",
"webpack-sources": "^1.4.0", "webpack-sources": "^1.4.0",
@ -10361,6 +10361,15 @@
"ajv-keywords": "^3.1.0" "ajv-keywords": "^3.1.0"
} }
}, },
"serialize-javascript": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz",
"integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==",
"dev": true,
"requires": {
"randombytes": "^2.1.0"
}
},
"source-map": { "source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
@ -11049,15 +11058,71 @@
"integrity": "sha512-ajtqwEW/QhnrBZQsZxCLHThZZaa+Db45c92Asf46ZDXu6uHXgbfVuBaJ4gzD2r4UX0oMJHstFwd2r2HM4l8umg==" "integrity": "sha512-ajtqwEW/QhnrBZQsZxCLHThZZaa+Db45c92Asf46ZDXu6uHXgbfVuBaJ4gzD2r4UX0oMJHstFwd2r2HM4l8umg=="
}, },
"watchpack": { "watchpack": {
"version": "1.7.2", "version": "1.7.4",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.2.tgz", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.4.tgz",
"integrity": "sha512-ymVbbQP40MFTp+cNMvpyBpBtygHnPzPkHqoIwRRj/0B8KhqQwV8LaKjtbaxF2lK4vl8zN9wCxS46IFCU5K4W0g==", "integrity": "sha512-aWAgTW4MoSJzZPAicljkO1hsi1oKj/RRq/OJQh2PKI2UKL04c2Bs+MBOB+BBABHTXJpf9mCwHN7ANCvYsvY2sg==",
"dev": true, "dev": true,
"requires": { "requires": {
"chokidar": "^3.4.0", "chokidar": "^3.4.1",
"graceful-fs": "^4.1.2", "graceful-fs": "^4.1.2",
"neo-async": "^2.5.0", "neo-async": "^2.5.0",
"watchpack-chokidar2": "^2.0.0" "watchpack-chokidar2": "^2.0.0"
},
"dependencies": {
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true,
"optional": true,
"requires": {
"fill-range": "^7.0.1"
}
},
"chokidar": {
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz",
"integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==",
"dev": true,
"optional": true,
"requires": {
"anymatch": "~3.1.1",
"braces": "~3.0.2",
"fsevents": "~2.1.2",
"glob-parent": "~5.1.0",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.4.0"
}
},
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true,
"optional": true,
"requires": {
"to-regex-range": "^5.0.1"
}
},
"is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true,
"optional": true
},
"to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"optional": true,
"requires": {
"is-number": "^7.0.0"
}
}
} }
}, },
"watchpack-chokidar2": { "watchpack-chokidar2": {
@ -11198,9 +11263,9 @@
} }
}, },
"webpack": { "webpack": {
"version": "4.43.0", "version": "4.44.1",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-4.43.0.tgz", "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.44.1.tgz",
"integrity": "sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g==", "integrity": "sha512-4UOGAohv/VGUNQJstzEywwNxqX417FnjZgZJpJQegddzPmTvph37eBIRbRTfdySXzVtJXLJfbMN3mMYhM6GdmQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@webassemblyjs/ast": "1.9.0", "@webassemblyjs/ast": "1.9.0",
@ -11211,7 +11276,7 @@
"ajv": "^6.10.2", "ajv": "^6.10.2",
"ajv-keywords": "^3.4.1", "ajv-keywords": "^3.4.1",
"chrome-trace-event": "^1.0.2", "chrome-trace-event": "^1.0.2",
"enhanced-resolve": "^4.1.0", "enhanced-resolve": "^4.3.0",
"eslint-scope": "^4.0.3", "eslint-scope": "^4.0.3",
"json-parse-better-errors": "^1.0.2", "json-parse-better-errors": "^1.0.2",
"loader-runner": "^2.4.0", "loader-runner": "^2.4.0",
@ -11224,25 +11289,10 @@
"schema-utils": "^1.0.0", "schema-utils": "^1.0.0",
"tapable": "^1.1.3", "tapable": "^1.1.3",
"terser-webpack-plugin": "^1.4.3", "terser-webpack-plugin": "^1.4.3",
"watchpack": "^1.6.1", "watchpack": "^1.7.4",
"webpack-sources": "^1.4.1" "webpack-sources": "^1.4.1"
}, },
"dependencies": { "dependencies": {
"acorn": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz",
"integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==",
"dev": true
},
"mkdirp": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
"dev": true,
"requires": {
"minimist": "^1.2.5"
}
},
"schema-utils": { "schema-utils": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz",

View File

@ -1,6 +1,6 @@
{ {
"name": "newgruecht-vue", "name": "newgruecht-vue",
"version": "0.1.0", "version": "1.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",

View File

@ -65,7 +65,7 @@
:items="lifeTimes" :items="lifeTimes"
item-text="text" item-text="text"
item-value="value" item-value="value"
v-model="selectLifeTime" v-model="selectLifetime"
return-object return-object
/> />
</v-card-text> </v-card-text>
@ -90,7 +90,7 @@ export default {
render: 0, render: 0,
timer: null, timer: null,
change: false, change: false,
selectLifeTime: { text: '30 Minuten', value: 1800 }, selectLifetime: { text: '30 Minuten', value: 1800 },
lifeTimes: [ lifeTimes: [
{ {
text: '5 Minuten', text: '5 Minuten',
@ -140,20 +140,20 @@ export default {
}), }),
created() { created() {
if (this.isLoggedIn) { if (this.isLoggedIn) {
this.getLifeTime() this.getLifetime()
} }
this.timer = setInterval(this.test, 1000) this.timer = setInterval(this.test, 1000)
}, },
methods: { methods: {
...mapActions(['setLifeTime', 'saveLifeTime', 'logout', 'getLifeTime']), ...mapActions(['setLifetime', 'saveLifetime', 'logout', 'getLifetime']),
test() { test() {
if (this.isLoggedIn) { if (this.isLoggedIn) {
if (this.lifeTime == 0) this.logout() if (this.lifeTime == 0) this.logout()
this.setLifeTime(this.lifeTime - 1) this.setLifetime(this.lifeTime - 1)
} }
}, },
save() { save() {
this.saveLifeTime(this.selectLifeTime.value) this.saveLifetime(this.selectLifetime.value)
this.change = false this.change = false
} }
}, },

View File

@ -12,7 +12,7 @@
<v-btn icon @click="reload()"> <v-btn icon @click="reload()">
<v-img src="@/assets/logo-64.png" contain height="40"></v-img> <v-img src="@/assets/logo-64.png" contain height="40"></v-img>
</v-btn> </v-btn>
<v-toolbar-title>Flaschengeist</v-toolbar-title> <v-toolbar-title>Flaschengeist <span class="caption">v1.1.0 beta 0</span></v-toolbar-title>
<v-spacer/> <v-spacer/>
<v-btn icon v-if="getRouteName == 'resetPassword'" @click="goTo('login')"> <v-btn icon v-if="getRouteName == 'resetPassword'" @click="goTo('login')">
<v-icon> <v-icon>

View File

@ -365,8 +365,8 @@ export default {
console.log(user) console.log(user)
if (user.toSetAmount && user.autoLock) { if (user.toSetAmount && user.autoLock) {
if ( if (
Math.abs(user.amount - Number.parseInt(user.toSetAmount)) > (user.amount - Number.parseInt(user.toSetAmount)) <
user.limit + 500 -(user.limit + 500)
) { ) {
this.overOverLimit = user this.overOverLimit = user
user.toSetAmount = null user.toSetAmount = null
@ -377,8 +377,9 @@ export default {
return true return true
}, },
checkOverLimit(user) { checkOverLimit(user) {
console.log(user)
if (user.toSetAmount) { if (user.toSetAmount) {
if (Math.abs(user.amount - user.toSetAmount) > user.limit) { if ((user.amount - user.toSetAmount) < -user.limit) {
return user.checkedOverLimit ? false : true return user.checkedOverLimit ? false : true
} }
} }

View File

@ -315,7 +315,7 @@ export default {
}, },
checkOverLimitIsValid(user) { checkOverLimitIsValid(user) {
if (this.toSetAmount && user.autoLock) { if (this.toSetAmount && user.autoLock) {
if (Math.abs(this.getAllSum() - Number.parseInt(this.toSetAmount)) > user.limit + 500) { if ((this.getAllSum() - Number.parseInt(this.toSetAmount)) < -(user.limit + 500)) {
this.overOverLimit = user this.overOverLimit = user
this.toSetAmount = null this.toSetAmount = null
this.value = null this.value = null
@ -326,7 +326,7 @@ export default {
}, },
checkOverLimit(user) { checkOverLimit(user) {
if (this.toSetAmount) { if (this.toSetAmount) {
if (Math.abs( this.getAllSum() - this.toSetAmount) > user.limit) { if (( this.getAllSum() - this.toSetAmount) < -user.limit) {
return user.checkedOverLimit ? false : true return user.checkedOverLimit ? false : true
} }
} }

View File

@ -1,8 +1,8 @@
//const main = 'https://192.168.5.128:5000/' //const main = 'https://192.168.5.128:5000/'
const main = 'http://localhost:5000/' //const main = 'http://localhost:5000/'
//const main = 'http://192.168.5.118:5000/' //const main = 'http://192.168.5.118:5000/'
//const main = 'https://groeger-clan.duckdns.org:5000/' //const main = 'https://groeger-clan.duckdns.org:5000/'
//const main = 'https://flaschengeist.wu5.de:5000/' const main = 'https://flaschengeist.wu5.de:5000/'
const url = { const url = {
login: main + 'login', login: main + 'login',
@ -25,8 +25,8 @@ const url = {
finanzerSendOneMail: main + 'finanzerSendOneMail', finanzerSendOneMail: main + 'finanzerSendOneMail',
userMain: main + 'user/main', userMain: main + 'user/main',
userAddAmount: main + 'user/addAmount', userAddAmount: main + 'user/addAmount',
saveLifeTime: main + 'saveLifeTime', saveLifetime: main + 'setLifetime',
getLifeTime: main + 'getLifeTime', getLifetime: main + 'getLifetime',
resetPassword: main + 'passwordReset', resetPassword: main + 'passwordReset',
freeDrinkListConfig: main + 'freeDrinkListConfig', freeDrinkListConfig: main + 'freeDrinkListConfig',
freeDrinkListHistory: main + 'freeDrinkListHistory', freeDrinkListHistory: main + 'freeDrinkListHistory',

View File

@ -160,14 +160,14 @@ const actions = {
timeout timeout
}) })
commit('setUsers', response.data) commit('setUsers', response.data)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
} }
if (e.response) if (e.response)
if (e.response.status === 401) { if (e.response.status === 401) {
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
location.reload() location.reload()
} }
} }
@ -191,7 +191,7 @@ const actions = {
amount: data.amount, amount: data.amount,
error: false error: false
}) })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
console.log(typeof e) console.log(typeof e)
for (const [key, value] of Object.entries(e)) { for (const [key, value] of Object.entries(e)) {
@ -207,7 +207,7 @@ const actions = {
}) })
if (e.response) if (e.response)
if (e.response.status === 401) { if (e.response.status === 401) {
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
location.reload() location.reload()
} }
} }
@ -230,14 +230,14 @@ const actions = {
{ headers: { Token: rootState.login.user.accessToken }, timeout } { headers: { Token: rootState.login.user.accessToken }, timeout }
) )
commit('setUsers', { [response.data.username]: response.data }) commit('setUsers', { [response.data.username]: response.data })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
} }
if (e.response) if (e.response)
if (e.response.status === 401) { if (e.response.status === 401) {
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
location.reload() location.reload()
} }
} }
@ -259,14 +259,14 @@ const actions = {
timeout timeout
}) })
commit('setAllUsers', response.data) commit('setAllUsers', response.data)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
} }
if (e.response) if (e.response)
if (e.response.data === 401) { if (e.response.data === 401) {
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
location.reload() location.reload()
} }
} }
@ -285,14 +285,14 @@ const actions = {
) )
commit('setUsers', { [response.data.username]: response.data }) commit('setUsers', { [response.data.username]: response.data })
commit('updateMessage', { date: data.date, storno: true }) commit('updateMessage', { date: data.date, storno: true })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
} }
if (e.response) if (e.response)
if (e.response.status === 401) { if (e.response.status === 401) {
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
location.reload() location.reload()
} }
} }
@ -311,7 +311,7 @@ const actions = {
} }
if (e.response) if (e.response)
if (e.response.status === 401) { if (e.response.status === 401) {
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
location.reload() location.reload()
} }
} }
@ -330,7 +330,7 @@ const actions = {
} }
if (e.response) if (e.response)
if (e.response.status === 401) { if (e.response.status === 401) {
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
location.reload() location.reload()
} }
} }
@ -356,7 +356,7 @@ const actions = {
} }
if (e.response) if (e.response)
if (e.response.status === 401) { if (e.response.status === 401) {
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
location.reload() location.reload()
} }
} }

View File

@ -257,7 +257,7 @@ const actions = {
timeout timeout
}) })
commit('setAllUsers', response.data) commit('setAllUsers', response.data)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (err) { } catch (err) {
if (err.message == 'Network Error') { if (err.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -276,7 +276,7 @@ const actions = {
timeout timeout
}) })
commit('setUsers', response.data) commit('setUsers', response.data)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (err) { } catch (err) {
if (err.message == 'Network Error') { if (err.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -310,7 +310,7 @@ const actions = {
locked: response.data.locked, locked: response.data.locked,
username: data.user.username username: data.user.username
}) })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (err) { } catch (err) {
if (err.message == 'Network Error') { if (err.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -341,7 +341,7 @@ const actions = {
locked: response.data.locked, locked: response.data.locked,
username: data.user.username username: data.user.username
}) })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (err) { } catch (err) {
if (err.message == 'Network Error') { if (err.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -361,7 +361,7 @@ const actions = {
{ headers: { Token: rootState.login.user.accessToken }, timeout } { headers: { Token: rootState.login.user.accessToken }, timeout }
) )
commit('updateUsers', response.data) commit('updateUsers', response.data)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -384,7 +384,7 @@ const actions = {
{ headers: { Token: rootState.login.user.accessToken }, timeout } { headers: { Token: rootState.login.user.accessToken }, timeout }
) )
commit('updateUsers', response.data) commit('updateUsers', response.data)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -403,7 +403,7 @@ const actions = {
{ headers: { Token: rootState.login.user.accessToken }, timeout } { headers: { Token: rootState.login.user.accessToken }, timeout }
) )
commit('setUsers', response.data) commit('setUsers', response.data)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -421,7 +421,7 @@ const actions = {
timeout: 60000 timeout: 60000
}) })
commit('setMails', response.data) commit('setMails', response.data)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -440,7 +440,7 @@ const actions = {
{ headers: { Token: rootState.login.user.accessToken }, timeout } { headers: { Token: rootState.login.user.accessToken }, timeout }
) )
commit('setMail', response.data) commit('setMail', response.data)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })

View File

@ -265,7 +265,7 @@ const actions = {
}) })
}) })
commit('setJobInvitesLoading', false) commit('setJobInvitesLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -283,7 +283,7 @@ const actions = {
}) })
commit('setJobInvitesFromMe', response.data) commit('setJobInvitesFromMe', response.data)
commit('setJobInvitesLoading', false) commit('setJobInvitesLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -312,7 +312,7 @@ const actions = {
from_me: false from_me: false
}) })
commit('setDayLoading', { date, getters, value: false }) commit('setDayLoading', { date, getters, value: false })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
commit('setJobInvitesLoading', false) commit('setJobInvitesLoading', false)
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
@ -342,7 +342,7 @@ const actions = {
getters getters
}) })
commit('setDayLoading', { date, getters, value: false }) commit('setDayLoading', { date, getters, value: false })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
commit('setJobInvitesLoading', false) commit('setJobInvitesLoading', false)
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
@ -360,7 +360,7 @@ const actions = {
timeout timeout
}) })
commit('updateJobInviteToMe', response.data) commit('updateJobInviteToMe', response.data)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
commit('setJobInvitesLoading', false) commit('setJobInvitesLoading', false)
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {

View File

@ -265,7 +265,7 @@ const actions = {
}) })
}) })
commit('setJobRequestsLoading', false) commit('setJobRequestsLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -283,7 +283,7 @@ const actions = {
}) })
commit('setJobRequestsFromMe', response.data) commit('setJobRequestsFromMe', response.data)
commit('setJobRequestsLoading', false) commit('setJobRequestsLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -311,7 +311,7 @@ const actions = {
) )
commit('updateJobRequestToMe', response.data) commit('updateJobRequestToMe', response.data)
commit('setJobRequestsLoading', false) commit('setJobRequestsLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })

View File

@ -46,7 +46,7 @@ const actions = {
}) })
commit('setJobkinds', response.data) commit('setJobkinds', response.data)
commit('setJobkindsLoading', false) commit('setJobkindsLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -65,7 +65,7 @@ const actions = {
) )
commit('updateJobKind', response.data) commit('updateJobKind', response.data)
commit('setJobkindsLoading', false) commit('setJobkindsLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -84,7 +84,7 @@ const actions = {
) )
commit('updateJobKind', response.data) commit('updateJobKind', response.data)
commit('setJobkindsLoading', false) commit('setJobkindsLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -103,7 +103,7 @@ const actions = {
) )
commit('deleteJobKind', data) commit('deleteJobKind', data)
commit('setJobkindsLoading', false) commit('setJobkindsLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })

View File

@ -306,7 +306,7 @@ const actions = {
users: response.data, users: response.data,
username: rootState.login.user.username username: rootState.login.user.username
}) })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -383,7 +383,7 @@ const actions = {
getters getters
}) })
commit('setDayNotLoading', { date, getters }) commit('setDayNotLoading', { date, getters })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -412,7 +412,7 @@ const actions = {
getters getters
}) })
commit('setDayNotLoading', { date, getters }) commit('setDayNotLoading', { date, getters })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -429,7 +429,7 @@ const actions = {
{ ...data }, { ...data },
{ headers: { Token: rootState.login.user.accessToken }, timeout } { headers: { Token: rootState.login.user.accessToken }, timeout }
) )
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })

View File

@ -34,7 +34,7 @@ const mutations = {
} else { } else {
state.user.username = data.username state.user.username = data.username
state.user.accessToken = data.accessToken state.user.accessToken = data.accessToken
state.user.group = data.group state.user.group = data.groups
state.user.firstname = data.firstname state.user.firstname = data.firstname
state.user.lastname = data.lastname state.user.lastname = data.lastname
} }
@ -52,7 +52,7 @@ const mutations = {
setCookieAccepted(state, value) { setCookieAccepted(state, value) {
state.cookieAccepted = value state.cookieAccepted = value
}, },
setLifeTime(state, value) { setLifetime(state, value) {
state.lifeTime = value state.lifeTime = value
} }
} }
@ -73,8 +73,8 @@ const actions = {
'user', 'user',
JSON.stringify({ JSON.stringify({
username: response.data.username, username: response.data.username,
accessToken: response.data.token, accessToken: response.data.accessToken,
group: response.data.group, group: response.data.groups,
firstname: response.data.firstname, firstname: response.data.firstname,
lastname: response.data.lastname lastname: response.data.lastname
}) })
@ -132,17 +132,17 @@ const actions = {
var cookie = localStorage.getItem('cookie:accepted') var cookie = localStorage.getItem('cookie:accepted')
commit('setCookieAccepted', cookie) commit('setCookieAccepted', cookie)
}, },
setLifeTime({ commit }, value) { setLifetime({ commit }, value) {
commit('setLifeTime', value) commit('setLifetime', value)
}, },
async saveLifeTime({ commit, rootState, dispatch }, value) { async saveLifetime({ commit, rootState, dispatch }, value) {
try { try {
const response = await axios.post( const response = await axios.post(
url.saveLifeTime, url.saveLifetime,
{ value: value }, { value: value },
{ headers: { Token: rootState.login.user.accessToken }, timeout } { headers: { Token: rootState.login.user.accessToken }, timeout }
) )
commit('setLifeTime', response.data.value) commit('setLifetime', response.data.value)
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -151,18 +151,18 @@ const actions = {
if (e.response.status === 401) dispatch('logout', null, { root: true }) if (e.response.status === 401) dispatch('logout', null, { root: true })
} }
}, },
async getLifeTime({ commit, rootState, dispatch }) { async getLifetime({ commit, rootState, dispatch }) {
try { try {
if (!rootState.login.user.accessToken) { if (!rootState.login.user.accessToken) {
return return
} }
const response = await axios.get(url.getLifeTime, { const response = await axios.get(url.getLifetime, {
headers: { Token: rootState.login.user.accessToken }, headers: { Token: rootState.login.user.accessToken },
timeout timeout
}) })
commit('setLifeTime', response.data.value) commit('setLifetime', response.data.value)
var user = JSON.parse(localStorage.getItem('user')) var user = JSON.parse(localStorage.getItem('user'))
user.group = response.data.group user.group = response.data.groups
localStorage.setItem('user', JSON.stringify(user)) localStorage.setItem('user', JSON.stringify(user))
commit('updateAccessToken', user) commit('updateAccessToken', user)
dispatch('barUsers/setLockStatus', response.data.lock_bar, { dispatch('barUsers/setLockStatus', response.data.lock_bar, {

View File

@ -101,7 +101,7 @@ const actions = {
const response = await axios.get(url.pricelist, { timeout }) const response = await axios.get(url.pricelist, { timeout })
commit('setPriceList', response.data) commit('setPriceList', response.data)
commit('setPriceListLoading', false) commit('setPriceListLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -115,7 +115,7 @@ const actions = {
const response = await axios.get(url.getTypes, { timeout }) const response = await axios.get(url.getTypes, { timeout })
commit('setTypes', response.data) commit('setTypes', response.data)
commit('setTypesLoading', false) commit('setTypesLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -133,7 +133,7 @@ const actions = {
) )
commit('updatePriceList', response.data) commit('updatePriceList', response.data)
commit('setPriceListLoading', false) commit('setPriceListLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -153,7 +153,7 @@ const actions = {
) )
commit('updatePriceList', response.data) commit('updatePriceList', response.data)
commit('setPriceListLoading', false) commit('setPriceListLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -173,7 +173,7 @@ const actions = {
) )
commit('deleteDrinkPrice', data) commit('deleteDrinkPrice', data)
commit('setPriceListLoading', false) commit('setPriceListLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -193,7 +193,7 @@ const actions = {
) )
commit('updateDrinkType', response.data) commit('updateDrinkType', response.data)
commit('setTypesLoading', false) commit('setTypesLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -213,7 +213,7 @@ const actions = {
) )
commit('updateDrinkType', response.data) commit('updateDrinkType', response.data)
commit('setTypesLoading', false) commit('setTypesLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -233,7 +233,7 @@ const actions = {
) )
commit('deleteDrinkType', data) commit('deleteDrinkType', data)
commit('setTypesLoading', false) commit('setTypesLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })

View File

@ -274,7 +274,7 @@ const actions = {
timeout timeout
}) })
commit('setAllUsers', response.data) commit('setAllUsers', response.data)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -296,7 +296,7 @@ const actions = {
} }
) )
//commit('updateMonth', { ...response.data[0], com: 'add' }) //commit('updateMonth', { ...response.data[0], com: 'add' })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -355,7 +355,7 @@ const actions = {
{ headers: { Token: rootState.login.user.accessToken }, timeout } { headers: { Token: rootState.login.user.accessToken }, timeout }
) )
//commit('updateMonth', { ...data, com: 'delete' }) //commit('updateMonth', { ...data, com: 'delete' })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -382,7 +382,7 @@ const actions = {
date, date,
getters getters
}) })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -404,7 +404,7 @@ const actions = {
) )
commit('updateMonthJobkind', { data: response.data, date, getters }) commit('updateMonthJobkind', { data: response.data, date, getters })
commit('setDayNotLoading', { date, getters }) commit('setDayNotLoading', { date, getters })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })

View File

@ -223,7 +223,7 @@ const actions = {
}) })
commit('setUser', response.data) commit('setUser', response.data)
commit('setError', '') commit('setError', '')
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -248,7 +248,7 @@ const actions = {
error: false error: false
}) })
commit('setError', '') commit('setError', '')
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -274,7 +274,7 @@ const actions = {
console.log(response.data) console.log(response.data)
commit('setUser', response.data) commit('setUser', response.data)
commit('setError', { value: 'Daten gespeichert', error: false }) commit('setError', { value: 'Daten gespeichert', error: false })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -300,7 +300,7 @@ const actions = {
{ headers: { Token: rootState.login.user.accessToken }, timeout } { headers: { Token: rootState.login.user.accessToken }, timeout }
) )
commit('updateDay', { ...response.data, date: data.date }) commit('updateDay', { ...response.data, date: data.date })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -326,7 +326,7 @@ const actions = {
) )
commit('setUser', response.data) commit('setUser', response.data)
commit('updateMessage', { date: data.date, storno: true }) commit('updateMessage', { date: data.date, storno: true })
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -343,7 +343,7 @@ const actions = {
timeout timeout
}) })
commit('setStatus', response.data) commit('setStatus', response.data)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -359,7 +359,7 @@ const actions = {
timeout timeout
}) })
commit('setTokens', response.data) commit('setTokens', response.data)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -375,7 +375,7 @@ const actions = {
timeout timeout
}) })
commit('setTokens', response.data) commit('setTokens', response.data)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })

View File

@ -82,7 +82,7 @@ const actions = {
}) })
commit('setUsers', response.data) commit('setUsers', response.data)
commit('setUsersLoading', false) commit('setUsersLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -101,7 +101,7 @@ const actions = {
}) })
commit('setUsers', response.data) commit('setUsers', response.data)
commit('setUsersLoading', false) commit('setUsersLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -120,7 +120,7 @@ const actions = {
}) })
commit('setStatus', response.data) commit('setStatus', response.data)
commit('setStatusLoading', false) commit('setStatusLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -140,7 +140,7 @@ const actions = {
) )
commit('updateUser', response.data) commit('updateUser', response.data)
commit('setUsersLoading', false) commit('setUsersLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -160,7 +160,7 @@ const actions = {
) )
commit('updateUser', response.data) commit('updateUser', response.data)
commit('setUsersLoading', false) commit('setUsersLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -180,7 +180,7 @@ const actions = {
) )
commit('updateWorkgroups', { id: data.id, workgroups: response.data }) commit('updateWorkgroups', { id: data.id, workgroups: response.data })
commit('setUsersLoading', false) commit('setUsersLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })

View File

@ -46,7 +46,7 @@ const actions = {
}) })
commit('setWorkgroups', response.data) commit('setWorkgroups', response.data)
commit('setWorkgroupLoading', false) commit('setWorkgroupLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -66,7 +66,7 @@ const actions = {
) )
commit('updateWorkgroup', response.data) commit('updateWorkgroup', response.data)
commit('setWorkgroupLoading', false) commit('setWorkgroupLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -85,7 +85,7 @@ const actions = {
) )
commit('updateWorkgroup', repsonse.data) commit('updateWorkgroup', repsonse.data)
commit('setWorkgroupLoading', false) commit('setWorkgroupLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })
@ -104,7 +104,7 @@ const actions = {
) )
commit('deleteWorkgroup', data) commit('deleteWorkgroup', data)
commit('setWorkgroupLoading', false) commit('setWorkgroupLoading', false)
dispatch('getLifeTime', null, { root: true }) dispatch('getLifetime', null, { root: true })
} catch (e) { } catch (e) {
if (e.message == 'Network Error') { if (e.message == 'Network Error') {
dispatch('connectionError/addError', null, { root: true }) dispatch('connectionError/addError', null, { root: true })