From d85396db0f3a8320b47444d4b947fdf3f63f437e Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 27 Feb 2021 22:24:40 +0100 Subject: [PATCH 1/3] fix typos --- templates/casetmr-specific-list.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/casetmr-specific-list.html b/templates/casetmr-specific-list.html index ccedfd1f..48be5d5b 100644 --- a/templates/casetmr-specific-list.html +++ b/templates/casetmr-specific-list.html @@ -5,8 +5,8 @@ - - + + From cfe99ec188443ae083e115ebb96b0fc5ffb30093 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sun, 28 Feb 2021 01:26:32 +0100 Subject: [PATCH 2/3] =?UTF-8?q?#166=20Supprimer=20seulement=20le=20sort=20?= =?UTF-8?q?d=C3=A9clench=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/actor.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/module/actor.js b/module/actor.js index 5ee13feb..dec691aa 100644 --- a/module/actor.js +++ b/module/actor.js @@ -313,15 +313,13 @@ export class RdDActor extends Actor { /* -------------------------------------------- */ async deleteSortReserve(sortReserve) { let reserve = duplicate(this.data.data.reve.reserve); - let len = reserve.list.length; - let i = 0; - let newTable = []; - for (i = 0; i < len; i++) { - if (reserve.list[i].coord != sortReserve.coord && reserve.list[i].sort.name != sortReserve.sort.name) - newTable.push(reserve.list[i]); - } - if (newTable.length != len) { - reserve.list = newTable; + let tmr = TMRUtility.getTMR(sortReserve.coord); + let index = reserve.list.findIndex(tmr.type == 'fleuve' + ? sort => (TMRUtility.getTMR(sort.coord).type == 'fleuve' && sort.sort.name == sortReserve.sort.name) + : sort => (sort.coord == sortReserve.coord && sort.sort.name == sortReserve.sort.name) + ); + if (index >=0 ) { + reserve.list.splice(index,1); await this.update({ "data.reve.reserve": reserve }); } } From 948f7073406920695dce3bd5accead1ba0faacea Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sun, 28 Feb 2021 01:38:40 +0100 Subject: [PATCH 3/3] fix Grammar --- module/grammar.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/grammar.js b/module/grammar.js index e75bdc77..7a35cebc 100644 --- a/module/grammar.js +++ b/module/grammar.js @@ -26,7 +26,7 @@ export class Grammar { /* -------------------------------------------- */ static articleDetermine(genre) { - switch (toLowerCaseNoAccent(genre)) { + switch (Grammar.toLowerCaseNoAccent(genre)) { case 'f': case 'feminin': return 'la'; case 'p': case 'mp': case 'fp': case 'pluriel': return 'les'; default: @@ -35,8 +35,8 @@ export class Grammar { } /* -------------------------------------------- */ - static articleIndétermine(genre) { - switch (toLowerCaseNoAccent(genre)) { + static articleIndetermine(genre) { + switch (Grammar.toLowerCaseNoAccent(genre)) { case 'f': case 'feminin': return 'une'; case 'p': case 'fp': case 'mp': case 'pluriel': return 'des'; case 'n': case 'neutre': return 'du' @@ -58,7 +58,7 @@ export class Grammar { * @param {...any} mots */ static accord(genre, ...mots) { - switch (toLowerCaseNoAccent(genre)) { + switch (Grammar.toLowerCaseNoAccent(genre)) { default: case 'n': case 'neutre': case 'm': case 'masculin': return mots[0];