This commit is contained in:
asyncnomi 2023-01-08 23:22:50 +01:00
parent 72a9b4f533
commit df92dd65ba

View file

@ -645,13 +645,14 @@ function updateDemandes() {
let pd = [];
for (pd_uid in data.prankData) {
if (data.prankData[pd_uid].creator == localStorage.getItem('user')) {
data.prankData[pd_uid].prankUid = pd_uid;
pd.push(data.prankData[pd_uid]);
}
}
pd.sort((a, b) => new Date(b.date) - new Date(a.date));
for(const pd_uid in pd) {
$('#demande-list').append(`
<span id="${pd_uid}" class="prank">
<span id="${pd[pd_uid].prankUid}" class="prank">
<h2 class="prank-title">Demande de crêpe</h2>
<div class="prank-amount">Quantité: ${pd[pd_uid].amount}</div>
<div class="prank-supplement">Garniture: ${pd[pd_uid].supplement}</div>