From 2cc2c3abb0a6fe9379890d8a7478e3f1078c97ed Mon Sep 17 00:00:00 2001 From: johan Date: Mon, 9 Jan 2023 09:49:19 +0100 Subject: [PATCH] added refused --- static/css/main.css | 4 ++++ static/js/main.js | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/static/css/main.css b/static/css/main.css index f3707c9..2f686b0 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -276,6 +276,10 @@ button[type="submit"]:hover { background-color: rgba(0, 255, 0, 0.46); } +.treasure-refused { + background-color: rgba(255, 0, 0, 0.397); +} + .overlay { z-index: 99; position: fixed; diff --git a/static/js/main.js b/static/js/main.js index dd6cfb4..7010c80 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -812,9 +812,12 @@ function updateDemandes() { let td = data.treasureData; for(const td_uid in td) { - if(td[td_uid].state != "Refused") { + if(td[td_uid].treasureState != "Accepted") { $elem = $('#' + td[td_uid].activityUid); - $elem.addClass('treasure-submitted'); + if(td[td_uid].treasureState == "Refused") + $elem.addClass('treasure-refused'); + else + $elem.addClass('treasure-submitted'); $elem.find(".treasure-btn-submit").text('Editer la soumission'); $(`
Image: Lien
`).insertAfter($elem.find('.treasure-desc'))