Fix case status save on v3 detail by binding inline onchange fallback

This commit is contained in:
Christian 2026-06-11 09:34:02 +02:00
parent fd8f4d6d88
commit f4bc2828e8

View File

@ -3461,7 +3461,7 @@
<div class="d-flex justify-content-between align-items-center mb-1"> <div class="d-flex justify-content-between align-items-center mb-1">
<label class="mb-0 text-secondary" style="font-size:0.8rem;">Status</label> <label class="mb-0 text-secondary" style="font-size:0.8rem;">Status</label>
<select id="topbarStatusSelect" class="form-select form-select-sm bg-light" style="width: 62%;"> <select id="topbarStatusSelect" class="form-select form-select-sm bg-light" style="width: 62%;" onchange="saveCaseStatusFromTopbar()">
{% for st in status_options %} {% for st in status_options %}
<option value="{{ st }}" {% if (case.status or '')|lower == st|lower %}selected{% endif %}>{{ st|capitalize }}</option> <option value="{{ st }}" {% if (case.status or '')|lower == st|lower %}selected{% endif %}>{{ st|capitalize }}</option>
{% endfor %} {% endfor %}
@ -3708,11 +3708,6 @@
}); });
}; };
bindChange('topbarStatusSelect', async (el) => {
await patchCase({ status: el.value || 'åben' });
location.reload();
});
bindChange('topbarTypeSelect', async (el) => { bindChange('topbarTypeSelect', async (el) => {
await patchCase({ type: String(el.value || 'ticket').toLowerCase() }); await patchCase({ type: String(el.value || 'ticket').toLowerCase() });
location.reload(); location.reload();