|
@@ -354,22 +354,23 @@
|
|
|
if (Number(o.id) === Number(task.owner_worker_id)) { $opt.attr('selected', 'selected'); }
|
|
if (Number(o.id) === Number(task.owner_worker_id)) { $opt.attr('selected', 'selected'); }
|
|
|
$sel.append($opt);
|
|
$sel.append($opt);
|
|
|
});
|
|
});
|
|
|
- $tr.append($('<td class="px-2 py-1"></td>').append($sel));
|
|
|
|
|
|
|
+ $tr.append($('<td class="px-2 py-1" data-col="owner"></td>').append($sel));
|
|
|
|
|
|
|
|
// priority
|
|
// priority
|
|
|
const $prio = $('<select data-prio-select class="rounded border border-slate-200 px-2 py-1 bg-white font-mono focus:outline-none focus:ring-2 focus:ring-slate-400"><option value="1">1</option><option value="2">2</option></select>');
|
|
const $prio = $('<select data-prio-select class="rounded border border-slate-200 px-2 py-1 bg-white font-mono focus:outline-none focus:ring-2 focus:ring-slate-400"><option value="1">1</option><option value="2">2</option></select>');
|
|
|
$prio.val(String(task.priority));
|
|
$prio.val(String(task.priority));
|
|
|
- $tr.append($('<td class="px-2 py-1 text-center"></td>').append($prio));
|
|
|
|
|
|
|
+ $tr.append($('<td class="px-2 py-1 text-center" data-col="prio"></td>').append($prio));
|
|
|
|
|
|
|
|
// tot
|
|
// tot
|
|
|
let tot = 0;
|
|
let tot = 0;
|
|
|
Object.keys(assignments).forEach(function (k) { tot += Number(assignments[k]) || 0; });
|
|
Object.keys(assignments).forEach(function (k) { tot += Number(assignments[k]) || 0; });
|
|
|
- $tr.append($('<td class="px-2 py-1 text-center font-mono font-semibold" data-task-tot>').text(fmtDays(tot)));
|
|
|
|
|
|
|
+ $tr.append($('<td class="px-2 py-1 text-center font-mono font-semibold" data-col="tot" data-task-tot>').text(fmtDays(tot)));
|
|
|
|
|
|
|
|
// per-worker assignment cells
|
|
// per-worker assignment cells
|
|
|
sprintWorkerHeaders().forEach(function (sw) {
|
|
sprintWorkerHeaders().forEach(function (sw) {
|
|
|
const v = Number(assignments[sw.id] || 0);
|
|
const v = Number(assignments[sw.id] || 0);
|
|
|
const $td = $('<td class="px-1 py-1 text-center"></td>')
|
|
const $td = $('<td class="px-1 py-1 text-center"></td>')
|
|
|
|
|
+ .attr('data-col', 'sw-' + sw.id)
|
|
|
.attr('data-sort-value-sw-' + sw.id, v.toFixed(2));
|
|
.attr('data-sort-value-sw-' + sw.id, v.toFixed(2));
|
|
|
$td.append(
|
|
$td.append(
|
|
|
$('<input type="number" min="0" step="0.5" data-assign class="w-14 rounded border border-slate-200 px-1 py-1 text-center font-mono focus:outline-none focus:ring-2 focus:ring-slate-400">')
|
|
$('<input type="number" min="0" step="0.5" data-assign class="w-14 rounded border border-slate-200 px-1 py-1 text-center font-mono focus:outline-none focus:ring-2 focus:ring-slate-400">')
|
|
@@ -399,6 +400,7 @@
|
|
|
$taskTbody.append($row);
|
|
$taskTbody.append($row);
|
|
|
// Clear any active sort so the new row is actually visible at the end.
|
|
// Clear any active sort so the new row is actually visible at the end.
|
|
|
clearSort();
|
|
clearSort();
|
|
|
|
|
+ applyColumnVisibility();
|
|
|
applyFilters();
|
|
applyFilters();
|
|
|
$row.find('[data-title]').trigger('focus').trigger('select');
|
|
$row.find('[data-title]').trigger('focus').trigger('select');
|
|
|
flash('Task added');
|
|
flash('Task added');
|