diff --git a/.eslintrc.js b/.eslintrc.js index 3a676f5d..3343669e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,5 +1,5 @@ module.exports = { extends: [ - 'nextcloud' - ] + '@nextcloud' + ], }; diff --git a/composer.lock b/composer.lock deleted file mode 100644 index be90a6f7..00000000 --- a/composer.lock +++ /dev/null @@ -1,18 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "25e655b97a6f68ca56ef58b83b231ea1", - "packages": [], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [], - "plugin-api-version": "2.0.0" -} diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index c646fdb1..411679a6 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -45,7 +45,7 @@ public function __construct($appName, IRequest $request) { public function index() { // $this->cesService->transformDatasets(); // Util::addScript($this->appName, 'vue-chartjs.min'); - // Util::addScript($this->appName, 'Chart'); + Util::addScript($this->appName, 'health-main'); Util::addScript($this->appName, 'health'); Util::addStyle($this->appName, 'icons'); //Util::addStyle($this->appName, 'bulma.min'); diff --git a/lib/Db/Measurementdata.php b/lib/Db/Measurementdata.php index 1d088134..ef092d3b 100644 --- a/lib/Db/Measurementdata.php +++ b/lib/Db/Measurementdata.php @@ -53,8 +53,6 @@ public function __construct() { $this->addType('bloodSugar','float'); $this->addType('oxygenSat','float'); $this->addType('defecation','integer'); - $this->addType('appetite','integer'); - $this->addType('allergies','integer'); $this->addType('cigarettes','integer'); $this->addType('alcohol','integer'); } diff --git a/lib/Db/MeasurementdataMapper.php b/lib/Db/MeasurementdataMapper.php index c6f8651c..1ad31da7 100644 --- a/lib/Db/MeasurementdataMapper.php +++ b/lib/Db/MeasurementdataMapper.php @@ -24,6 +24,7 @@ namespace OCA\Health\Db; use OCP\AppFramework\Db\DoesNotExistException; +use OCP\AppFramework\Db\Entity; use OCP\AppFramework\Db\MultipleObjectsReturnedException; use OCP\IDbConnection; use OCP\AppFramework\Db\QBMapper; @@ -34,7 +35,7 @@ public function __construct(IDbConnection $db) { parent::__construct($db, 'health_measurementdata', Measurementdata::class); } - public function find(int $id): ?\OCP\AppFramework\Db\Entity + public function find(int $id): ?Entity { $qb = $this->db->getQueryBuilder(); diff --git a/package.json b/package.json index fa84d9e8..200cc306 100644 --- a/package.json +++ b/package.json @@ -22,29 +22,25 @@ "license": "agpl", "private": true, "scripts": { - "build": "NODE_ENV=production webpack --progress --hide-modules --config webpack.prod.js", - "dev": "NODE_ENV=development webpack --progress --config webpack.dev.js", - "watch": "NODE_ENV=development webpack --progress --watch --config webpack.dev.js", + "build": "NODE_ENV=production webpack --progress --hide-modules --config webpack.js", + "dev": "NODE_ENV=development webpack --progress --config webpack.js", + "watch": "NODE_ENV=development webpack --progress --watch --config webpack.js", "lint": "eslint --ext .js,.vue src", "lint:fix": "eslint --ext .js,.vue src --fix", "stylelint": "stylelint src", "stylelint:fix": "stylelint src --fix" }, "dependencies": { - "@bundle-analyzer/webpack-plugin": "^0.2.1", - "@nextcloud/axios": "^1.5.0", - "@nextcloud/moment": "^1.1.1", + "@nextcloud/axios": "^1.6.0", + "@nextcloud/dialogs": "^3.1.1", "@nextcloud/router": "^1.2.0", - "@nextcloud/vue": "^2.9.0", + "@nextcloud/vue": "^3.5.4", "chart.js": "^2.9.4", - "dayjs": "^1.10.4", "moment": "^2.29.1", "nextcloud-l10n": "^0.1.1", "vue": "^2.6.12", "vue-chartjs": "^3.5.1", "vue-json-csv": "^1.2.12", - "vue-table-dynamic": "^0.2.8", - "vue2-datepicker": "^3.9.0", "vuex": "^3.6.2" }, "browserslist": [ @@ -54,36 +50,36 @@ "node": ">=10.0.0" }, "devDependencies": { - "@babel/core": "^7.12.13", + "@babel/core": "^7.12.17", "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/preset-env": "^7.12.13", + "@babel/preset-env": "^7.12.17", "@nextcloud/browserslist-config": "^1.0.0", + "@nextcloud/eslint-config": "^2.2.0", + "@nextcloud/eslint-plugin": "^1.5.0", + "@nextcloud/webpack-vue-config": "^1.1.0", "@vue/test-utils": "^1.1.3", "babel-eslint": "^10.1.0", "babel-loader": "^8.2.2", "css-loader": "^3.6.0", - "eslint": "^5.16.0", - "eslint-config-nextcloud": "0.1.1", + "eslint": "^6.8.0", "eslint-config-standard": "^14.1.1", - "eslint-import-resolver-webpack": "^0.12.2", + "eslint-import-resolver-webpack": "^0.13.0", "eslint-loader": "^4.0.2", "eslint-plugin-import": "^2.22.1", - "eslint-plugin-nextcloud": "^0.3.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.3.1", "eslint-plugin-standard": "^4.1.0", "eslint-plugin-vue": "^6.2.2", "node-sass": "^4.14.1", "sass-loader": "^8.0.2", - "stylelint": "^13.9.0", - "stylelint-config-recommended-scss": "^3.3.0", + "stylelint": "^13.11.0", + "stylelint-config-recommended-scss": "^4.2.0", "stylelint-scss": "^3.19.0", - "stylelint-webpack-plugin": "^1.2.3", + "stylelint-webpack-plugin": "^2.1.1", "vue-loader": "^15.9.6", "vue-template-compiler": "^2.6.12", "webpack": "^4.46.0", "webpack-cli": "^3.3.12", - "webpack-merge": "^4.2.2", - "webpack-node-externals": "^1.7.2" + "webpack-merge": "^5.7.3" } } diff --git a/src/App.vue b/src/App.vue index d28a069d..eeb485f8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -116,7 +116,7 @@ import SleepContent from './modules/sleep/SleepContent' import MeasurementContent from './modules/measurement/MeasurementContent' import MeasurementSidebar from './modules/measurement/MeasurementSidebar' import SleepSidebar from './modules/sleep/SleepSidebar' -import moment from '@nextcloud/moment' +import moment from 'moment' import SmokingSidebar from './modules/smoking/SmokingSidebar' import SmokingContent from './modules/smoking/SmokingContent' @@ -143,7 +143,7 @@ export default { SmokingSidebar, SmokingContent, }, - data: function() { + data() { return { loading: true, } @@ -158,7 +158,7 @@ export default { this.loading = false }, methods: { - formatMyDate: function(v) { + formatMyDate(v) { return moment(v).format('DD.MM.YYYY') }, }, diff --git a/src/general/Chart.vue b/src/general/Chart.vue index 5967d85e..850a927a 100644 --- a/src/general/Chart.vue +++ b/src/general/Chart.vue @@ -85,7 +85,7 @@