Infinity-1995 commited on
Commit
08ff806
·
verified ·
1 Parent(s): 777400d

Update log.html

Browse files
Files changed (1) hide show
  1. log.html +10 -6
log.html CHANGED
@@ -47,7 +47,6 @@ body{
47
  line-height:1.5;
48
  }
49
 
50
- /* CHANGED: hover glow on recipient cards */
51
  .recipient-card {
52
  border: 1px solid #e5e7eb;
53
  padding: 20px;
@@ -167,7 +166,7 @@ current=await res.json();
167
  renderAI();
168
  }
169
 
170
- /* AI LIST — CHANGED: added margin-bottom to name, km, reason, badge; mt-4 on buttons */
171
  function renderAI(){
172
 
173
  aiBox.innerHTML=current.map((x,i)=>`
@@ -180,11 +179,11 @@ aiBox.innerHTML=current.map((x,i)=>`
180
  <span class="btn ${
181
  x.priority=="High"?"high":
182
  x.priority=="Medium"?"medium":"low"
183
- } mb-4" style="display:inline-block;margin-bottom:16px;">
184
  ${x.priority}
185
  </span>
186
 
187
- <div class="mt-2 flex gap-3 flex-wrap">
188
 
189
  <button class="btn"
190
  style="background:#10b981;color:white"
@@ -247,13 +246,18 @@ accepted.splice(i,1);
247
  renderAccepted();
248
  }
249
 
250
- /* confirm */
251
  function confirmDonation(){
252
  if(accepted.length==0){
253
  alert("Select recipients");
254
  return;
255
  }
256
- localStorage.setItem("donationData",JSON.stringify({accepted}));
 
 
 
 
 
257
  location.href="confirmation.html";
258
  }
259
 
 
47
  line-height:1.5;
48
  }
49
 
 
50
  .recipient-card {
51
  border: 1px solid #e5e7eb;
52
  padding: 20px;
 
166
  renderAI();
167
  }
168
 
169
+ /* AI LIST */
170
  function renderAI(){
171
 
172
  aiBox.innerHTML=current.map((x,i)=>`
 
179
  <span class="btn ${
180
  x.priority=="High"?"high":
181
  x.priority=="Medium"?"medium":"low"
182
+ }" style="display:inline-block;margin-bottom:16px;">
183
  ${x.priority}
184
  </span>
185
 
186
+ <div class="flex gap-3 flex-wrap">
187
 
188
  <button class="btn"
189
  style="background:#10b981;color:white"
 
246
  renderAccepted();
247
  }
248
 
249
+ /* CHANGED: also save portions, foodType, foodName */
250
  function confirmDonation(){
251
  if(accepted.length==0){
252
  alert("Select recipients");
253
  return;
254
  }
255
+ localStorage.setItem("donationData", JSON.stringify({
256
+ accepted,
257
+ portions: document.getElementById("portions").value,
258
+ foodType: document.getElementById("foodType").value,
259
+ foodName: document.getElementById("foodName").value
260
+ }));
261
  location.href="confirmation.html";
262
  }
263