[PIE-29] New recipe form submission #15
@ -15,8 +15,19 @@ function formatTime(seconds) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
const workTime = formatTime(re.worktime)
|
function formatTimeMin(minutes) {
|
||||||
const waitTime = formatTime(re.waittime)
|
if (minutes === 0) return null
|
||||||
|
const h = Math.floor(minutes / 60);
|
||||||
|
const m = minutes % 60;
|
||||||
|
let result = "";
|
||||||
|
if (h > 0) result += `${h}h`;
|
||||||
|
if (m > 0) result += `${m}m`;
|
||||||
|
if (result === "") result = "0m";
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
const workTime = formatTimeMin(re.worktime)
|
||||||
|
const waitTime = formatTimeMin(re.waittime)
|
||||||
---
|
---
|
||||||
|
|
||||||
<p class="text-white/60 text-sm mt-1 italic">{re.description}</p>
|
<p class="text-white/60 text-sm mt-1 italic">{re.description}</p>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user