From 0f8d6d8a59762e486cf909370afa9ee95dd3de25 Mon Sep 17 00:00:00 2001 From: PMKuipers Date: Fri, 19 Jul 2024 17:48:21 +0200 Subject: [PATCH] Some cleanup --- amd/src/page-coach.js | 1 + amd/src/page-invitemanager.js | 1 + amd/src/page-view-plan.js | 1 + amd/src/report-viewer-components.js | 3 ++- amd/src/studyplan-editor-components.js | 1 + amd/src/studyplan-report-components.js | 1 + amd/src/util/fittext-vue.js | 1 - templates/form/element_text_integer.mustache | 2 +- 8 files changed, 8 insertions(+), 3 deletions(-) diff --git a/amd/src/page-coach.js b/amd/src/page-coach.js index 639b3e4..f794608 100644 --- a/amd/src/page-coach.js +++ b/amd/src/page-coach.js @@ -2,6 +2,7 @@ /* eslint no-unused-vars: "off" */ /* eslint linebreak-style: "off" */ /* eslint no-trailing-spaces: "off" */ +/* eslint promise/no-nesting: "off" */ /* eslint max-depth: ["error", 6]*/ /* eslint-env es6*/ // Put this file in path/to/plugin/amd/src diff --git a/amd/src/page-invitemanager.js b/amd/src/page-invitemanager.js index d88fbee..9e63679 100644 --- a/amd/src/page-invitemanager.js +++ b/amd/src/page-invitemanager.js @@ -1,6 +1,7 @@ /* eslint no-var: "error" */ /* eslint no-unused-vars: "off" */ /* eslint linebreak-style: "off" */ +/* eslint promise/no-nesting: "off" */ /* eslint-env es6*/ /* eslint camelcase: "off" */ // Put this file in path/to/plugin/amd/src diff --git a/amd/src/page-view-plan.js b/amd/src/page-view-plan.js index 72c861a..b6f557e 100644 --- a/amd/src/page-view-plan.js +++ b/amd/src/page-view-plan.js @@ -1,5 +1,6 @@ /* eslint no-unused-vars: "off" */ /* eslint no-trailing-spaces: "off" */ +/* eslint promise/no-nesting: "off" */ /* eslint max-depth: ["error", 5] */ // Put this file in path/to/plugin/amd/src // You can call it anything you like diff --git a/amd/src/report-viewer-components.js b/amd/src/report-viewer-components.js index 97eaf9f..64be9a1 100644 --- a/amd/src/report-viewer-components.js +++ b/amd/src/report-viewer-components.js @@ -2,6 +2,7 @@ /* eslint no-console: "off"*/ /* eslint no-unused-vars: warn */ /* eslint max-len: ["error", { "code": 160 }] */ +/* eslint promise/no-nesting: "off" */ /* eslint max-depth: ["error", 6] */ /* eslint no-trailing-spaces: warn */ /* eslint-env es6*/ @@ -429,7 +430,7 @@ export default { for (const ix in plans) { plans[ix].sort((a, b) => { - const t = new Date(b.startdate).getTime() - new Date(a.startdate).getTime(); + let t = new Date(b.startdate).getTime() - new Date(a.startdate).getTime(); if (t == 0) { // Sort by name if timing is equal t = a.name.localeCompare(b.name); diff --git a/amd/src/studyplan-editor-components.js b/amd/src/studyplan-editor-components.js index a089932..44c3653 100644 --- a/amd/src/studyplan-editor-components.js +++ b/amd/src/studyplan-editor-components.js @@ -2,6 +2,7 @@ /* eslint no-console: "off"*/ /* eslint no-unused-vars: warn */ /* eslint max-len: ["error", { "code": 160 }] */ +/* eslint promise/no-nesting: "off" */ /* eslint no-trailing-spaces: warn */ /* eslint max-depth: ["error", 6] */ /* eslint-env es6*/ diff --git a/amd/src/studyplan-report-components.js b/amd/src/studyplan-report-components.js index 88693fb..248d82d 100644 --- a/amd/src/studyplan-report-components.js +++ b/amd/src/studyplan-report-components.js @@ -1,6 +1,7 @@ /* eslint no-var: "error"*/ /* eslint no-unused-vars: warn */ /* eslint max-depth: ["error", 6] */ +/* eslint promise/no-nesting: "off" */ /* eslint camelcase: "off" */ /* eslint-env es6*/ // Put this file in path/to/plugin/amd/src diff --git a/amd/src/util/fittext-vue.js b/amd/src/util/fittext-vue.js index b28aee1..63bb968 100644 --- a/amd/src/util/fittext-vue.js +++ b/amd/src/util/fittext-vue.js @@ -1,6 +1,5 @@ /* eslint no-unused-vars: warn */ /* eslint max-len: ["error", { "code": 160 }] */ -/* eslint-disable no-trailing-spaces */ /* eslint capitalized-comments: "off" */ /* eslint-env es6*/ diff --git a/templates/form/element_text_integer.mustache b/templates/form/element_text_integer.mustache index 5438b57..cf80373 100644 --- a/templates/form/element_text_integer.mustache +++ b/templates/form/element_text_integer.mustache @@ -39,6 +39,6 @@ {{/ core_form/element-template }} {{#js}} require(['local_treestudyplan/util/formfields'], function(formfields) { - formfields.textInteger({{#quote}}{{element.id}}{{/quote}},{{unsigned}},{{nonzero}}); + formfields.textInteger({{#quote}}{{element.id}}{{/quote}}, {{unsigned}}, {{nonzero}}); }); {{/js}} \ No newline at end of file