Reformat inventory view

This should all deserve flex
..or move to off the shelf inventory sofwtare
This commit is contained in:
2025-05-26 01:49:09 +03:00
parent 35dc28a8f5
commit 971920f94c
5 changed files with 125 additions and 243 deletions

View File

@@ -40,10 +40,10 @@
</td>
<td>{{ item.inventory.visibility }}</td>
<td>{{ item.type }}</td>
<td><a href="/m/inventory/{{ item._id }}/view">{{ item | format_name }} {{ item.comment }}</a></td>
<td><a href="/m/inventory/{{ item._id }}/view">{{ item | format_name }}</a> {{ item.comment }}</td>
<td>{{ item.location }}</td>
<td>{{ item | owner_link}}</td>
<td>{{ item | user_link}}</td>
<td>{{ item | owner_link }}</td>
<td>{{ item | user_link }}</td>
{% if can_audit %}
<td>
<form onsubmit="return false;">
@@ -63,20 +63,4 @@
</table>
{{ add_item_button() }}
</div>
<script>
$('button.audit-button').on('click', function() {
let button = $(this);
$.ajax({
method: 'POST',
url: "/m/inventory/" + button.data('itemId') + "/audit",
data: { noRedirect: true },
success: function() {
button.unbind('click');
button.removeClass(['orange', 'red', 'waves-effect', 'waves-light']);
button.addClass(['unclickable', 'green']);
button.text('Just now');
}
})
});
</script>
{% endblock %}