fix: update alert level code handling and binding in TicketLackTable

This commit is contained in:
Javier Segarra 2025-05-14 14:24:28 +02:00
parent 9f7994319b
commit ac59c79baf
1 changed files with 7 additions and 3 deletions

View File

@ -136,9 +136,13 @@ const saveChange = async (field, { row }) => {
try {
switch (field) {
case 'alertLevelCode':
const { id: code } = editableStates.value.find(
({ name }) => name === row.code,
);
debugger;
await axios.post(`Tickets/state`, {
ticketFk: row.ticketFk,
code: row[field],
code,
});
break;
@ -318,9 +322,9 @@ function onBuysFetched(data) {
:options="editableStates"
auto-load
hide-selected
option-value="id"
option-value="name"
option-label="name"
v-model="props.row.alertLevelCode"
v-model="props.row.code"
v-on="getInputEvents(props)"
/>
</template>