From 8048318a83d14f1516f6275b2b46ad85b46f2ea4 Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 15 Oct 2020 18:56:31 +0200 Subject: [PATCH] fix: joblist reset fix --- package.json | 8 ++++---- public/app/js/joblist.js | 10 ++++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index c8651fb..a3865da 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "mongodb": "^3.6.2", "@hapi/hapi": "^20.0.1", "@hapi/inert": "^6.0.3", - "@hokify/agenda": "^4.0.6", + "@hokify/agenda": "^4.0.20", "async": "^3.2.0", "body-parser": "^1.19.0", "commander": "^6.1.0", @@ -41,18 +41,18 @@ "semver": "^7.3.2" }, "devDependencies": { - "@hokify/eslint-config": "^0.5.5", + "@hokify/eslint-config": "^0.5.9", "@typescript-eslint/eslint-plugin": "^4.4.1", "@typescript-eslint/parser": "^4.4.1", "ava": "^3.13.0", "eslint": "^7.11.0", "eslint-plugin-react-hooks": "^4.1.2", "eslint-plugin-unicorn": "^22.0.0", - "nodemon": "^2.0.4", + "nodemon": "^2.0.5", "npm-run-all": "^4.1.5", "prettier": "^2.1.2", "supertest": "^5.0.0", "typescript": "^4.0.3", - "webpack": "^5.1.0" + "webpack": "^5.1.1" } } diff --git a/public/app/js/joblist.js b/public/app/js/joblist.js index 35e3bb1..5c0077d 100644 --- a/public/app/js/joblist.js +++ b/public/app/js/joblist.js @@ -26,6 +26,12 @@ const jobList = Vue.component('job-list', { }); } }, + watch: { + jobs() { + // reset multijobs when jobs have changed + this.multijobs = []; + } + }, methods: { sort(s) { // if s == current sort, reverse @@ -36,11 +42,11 @@ const jobList = Vue.component('job-list', { }, sendQueued() { this.$emit('confirm-multi-requeue', this.multijobs); - this.multijobs = []; + // this.multijobs = []; }, sendDelete() { this.$emit('confirm-multi-delete', this.multijobs); - this.multijobs = []; + // this.multijobs = []; }, cleanMulti() { return console.log('received Clean Multi');