added refused

This commit is contained in:
johan 2023-01-09 09:49:19 +01:00
parent aafe149fe3
commit 2cc2c3abb0
2 changed files with 9 additions and 2 deletions

View file

@ -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;

View file

@ -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');
$(`<div class="treasure-image">Image: <a href="${base_url}images/${td[td_uid].image}.html" target="_blank"> Lien</a></div>`).insertAfter($elem.find('.treasure-desc'))