show already completed tasks
This commit is contained in:
@@ -34,7 +34,11 @@
|
||||
</select>
|
||||
|
||||
<label>Target Hours</label>
|
||||
<input type="number" name="target_hours" step="0.1" value="{{ goal.target_hours }}" required>
|
||||
<div class="stepper-input">
|
||||
<button type="button" onclick="stepValue(this, -0.5)">-</button>
|
||||
<input type="number" name="target_hours" step="0.1" value="{{ goal.target_hours }}" required>
|
||||
<button type="button" onclick="stepValue(this, 0.5)">+</button>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 1rem; display: flex; gap: 10px;">
|
||||
<button type="submit" class="btn">Save Changes</button>
|
||||
@@ -44,6 +48,14 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function stepValue(btn, step) {
|
||||
const input = btn.parentElement.querySelector('input');
|
||||
let val = parseFloat(input.value) || 0;
|
||||
val += step;
|
||||
if (val < 0) val = 0;
|
||||
input.value = val.toFixed(1);
|
||||
}
|
||||
|
||||
// Logic to populate subcategories and set current value
|
||||
const currentSubcat = "{{ goal.subcategory }}";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user